1

I want to play with ZFS at my CentOS. At the moment I have two 750Gb drives and two 400Gb spare drives that I could use. Of course the simplest solution would be to take all of them and use only 400Gb from the bigger one (i.e. 4 drives in ZFS pool), however as it's only fooling around (nothing in production environment), I asked my self is it doable to define from 400Gb drives a RAID-0 md-device with 800Gb and make then the raid-z using /dev/sdb-c and /dev/md0.

3
  • 1
    Why do you want to use an md-type raid when you have ZFS? My suggestion would be to mirror both 750GiB drives, mirror both 400GiB drives create a stripe across them. Commented Jul 25, 2013 at 9:28
  • Marco's right: ZFS has no problem with the drive set you have. You just need to create two mirrors in the same pool. ZFS will cope with this just fine. Commented Jul 25, 2013 at 14:08
  • Sparse files can be used for testing. Commented Jul 25, 2013 at 18:13

2 Answers 2

3

Yes, this is doable. You'll get around 1.5 TB of usable storage which is slightly better than two striped ZFS mirrors (1.15 TB). The latter would be faster though.

Note that there is no way to reliably build an hybrid RAID like the one you are describing with a pure ZFS solution. AFAIK you cannot create a RAIZ which third element is made of a two disk ZFS stripe outside using a zvol but this leads to deadlocks.

3

You don't need md-type RAID when you have ZFS. ZFS has all capabilities you need.

You did not specify your requirements and if you're after read performance, write performance or redundancy, for instance. This influences how you design your storage pool.

I'd recommend to use mirrors wherever you can. And avoid RAID-Z. It's easy to create RAID-Z pools with very bad performance, especially on consumer hardware. Using mirrors eases upgrading to larger disks. A RAID-Z pool grows when all the disks have grown. If you stripe 2-disk mirrors, it's sufficient to replace two disks to enlarge the pool. My suggestion:

  • create one vdev mirroring the two 750GiB drives
  • create one vdev mirroring the two 400GiB drives
  • stripe these two mirrors

This is not perfect, since ZFS prefers to write to less full drives, which means the majority the writes will go to the 750GiB vdev. And upgrading is easy. You can simply replace the 400GiB drives, one after another (you buy drives in pairs, don't you?), and the pool will grow automatically (if the autoexpand option is set).

1
  • It's worth noting that striping is default. ZFS will automatically stripe across all vdevs. A vdev can be a single disk, a mirror or a raidz. Add the two mirrors to a single pool and they will automatically be striped. Commented Jul 28, 2013 at 22:21

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.