3

If I start off with a 2 drive stripped ZFS POOL will it automatically become a fault tolerant POOLS like RAID-5 when I add the third drive?

I can't seem to find anything in the ZFS CheatSheets I find online about adding a third drive to a stripe set and changing to RAIDZ1.

Does anyone have any practical experience with such a scenario?

1

2 Answers 2

1

No, it's won't do anything automatically. You can't convert between RAID protection types dynamically.

RAIDZ1 is not the same thing as a striped dev set in ZFS. I you're looking to change between types, you'll likely have to rebuild or backup/restore to the structure you desire.

2
  • Rebuild, could work without having to backup and restore? So there is a shot that its possible? May 24, 2016 at 4:22
  • Found this good tutorial, which mentions nothing on the subject but give great examples. thegeekdiary.com/… May 24, 2016 at 4:35
2

Some background information:

In ZFS you build your storage pools out of vdevs (virtual devices). A single pool can have as many vdevs as you want, and each vdev itself can consist of one or more disks. Redundancy is managed at the vdev level, so your pool will always be striped (concatenated) over all vdevs it consists of. This means you will lose your pool if you lose a single vdev in it.

To prevent this, you normally do not use single disks as vdevs, but redundant sets: either mirrored disks (2, 3, or more disks which are completely mirrored/identical) or parity-based disk sets (RAIDZ1 with one parity disk equal to RAID5, RAIDZ2 with 2 parity disks equal to RAID6, or RAIDZ3 with 3 parity disks).

Some rules apply:

  • You cannot convert or modify parity vdevs, except grow the disk sizes (not the amount of disks!) by replacing all disks with bigger disks.
  • You can add and remove disks to or from mirrored vdevs and basic single disks (except the last disk of course) with zpool attach and zpool detach`.
  • You can add new vdevs to any pool, but old data is not rebalanced automatically (only newly written data uses all vdevs). You cannot remove any vdev from a pool.
  • You can mix and match different vdev types in a pool, although it is not recommended because your safety and performance is equal to the weakest/slowest vdev in the pool.

ZFS is not that flexible with parity RAID, therefore you should think about your data and growth and plan accordingly:

  • If you want to be as flexible as possible, use mirrors because of attach/detach. Mirrors also have good performance and fast rebuild times. The simple solution is often the best one.
  • If you want maximum storage space, you have to use RAIDZn: either populate all your enclosure slots with smaller disks and update them to bigger disks in the future, or buy the biggest disks now and use a subset of slots, for example RAIDZ2 with 6 or 8 disks and add another RAIDZ2 set of the same size later on.

For more in-depth information regarding the choice between RAID types and general pool layout, I suggest reading this blog post and also the ZFS best practices guide.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .