New to ZFS, create pool etc.

Hi,

So I just set up my new home-server and want to use ZFS for my storage drives. Right now I have 2x 1TB disks that I want to use ZFS on and later on I'm going to add more disks to the system.

I've read a lot about ZFS and all that but I'm still a bit confused about how I'm going to set this thing up. I think I want to use a raidz option so when I add more drives to it one of them can crash without the whole storage array goes down.

Do I need more drives before I set this up or can I fix this later on? And how should I create a zpool and everything to make it easier for myself later on?

Thanks,
 
For RAIDZ you'll need a minimum of 3 disks. For RAIDZ2 it's 5 disks.
 
SirDice said:
For RAIDZ you'll need a minimum of 3 disks. For RAIDZ2 it's 5 disks.

Code:
3 disks - RAIDZ1 - (RAID 5 equivalent) - single parity
4 disks - RAIDZ2 - (RAID 6 equivalent) - double parity
5 disks - RAIDZ3 -                     - tripple parity
 
Yes, a 4 disk RAIDZ2 is possible but it's kinda silly as a 4 disk RAID 1+0 (or is it 0+1) would probably be preferred ;)
 
One more question. If I'm going to go with raidz, do I need to have all my drives in the same size? Right now I have 2x 1TB disk and was thinking of buying a 2TB disk but will I only get 1TB out of that disk in that case? Or how does it work?
 
I just thought of something. I buy a 1TB disk now and make a raidz out of the 3x 1TB disks that I have and then later on I buy 2TB disks and make a raidz on them too, but can I then somehow add them together?

Like this:

raidz1TB = 3x 1TB disks = 2TB storage
raidz2TB = 3x 2TB disks = 4TB storage

raidz1TB + raidz2TB = 6TB storage?
 
Each of the disks in a vdev (whether its mirror, raidz1, raidz2, raidz3, etc) must be the same size. If they are not the same size, then only the amount of space equal to the smallest drive will be use on each larger drive. For example, if you have 2x 1 TB and 1x 2 TB drives in a 3-drive raidz1, only 1 TB of the larger drive will be used.

You can have "unbalanced" vdevs in a pool without any issues. This means you can create a raidz1 vdev using 1 TB drives, then create a second raidz1 vdev using 2 TB drives and add that to the same pool. Writes will not be perfectly balanced across the vdevs (the larger vdev will get more writes) so performance will not be as high as it could be. But it is possible.

It's even possible (though not recommended) to create a pool with "mis-matched" vdevs (mirror + raidz1 + raidz2 + raidz3 etc). For example, my lowly home server has a 3-drive raidz1 vdev using SATA1 drives and a mirror vdev using IDE drives:
Code:
[fcash@rogue /home/fcash]$ zpool status
  pool: pool
 state: ONLINE
 scrub: none requested
config:

        NAME           STATE     READ WRITE CKSUM
        pool           ONLINE       0     0     0
          raidz1       ONLINE       0     0     0
            ad8        ONLINE       0     0     0
            ad10       ONLINE       0     0     0
            ad9        ONLINE       0     0     0
          mirror       ONLINE       0     0     0
            ad4        ONLINE       0     0     0
            ad6        ONLINE       0     0     0
        cache
          label/cache  ONLINE       0     0     0

errors: No known data errors
 
Back
Top