Is a degraded RAIDZ2 the same as a RAIDZ

zfszfsonlinux

Background on this question: I have a litte server with five HDDs pooled together in a RAIDZ. Last week one of my HDDs died. So I bought a new HDD and replaced the dead HDD. During the resilvering the inevitable happend – another HDD died but thanks to ZFS I could recover most of my data (Thanks to all my friends for supplying external disks).

Now as I'm replacing the second HDD and need to destroy my old pool I'm thinking about creating a degraded RAIDZ2 with my five HDDs for adding a sixth HDD later. Why could this be a bad idea.

Best Answer

It is not the same as a RaidZ1 vdev, because the parity is calculated for two spare drives. This causes performance decreases in case one drive is missing and will perform worse than a RaidZ1 vdev.

However, for uncritical data and if you are planning to attach the missing drive in the near future, a procedure similar to this

https://forums.freenas.org/index.php?threads/quick-and-dirty-creating-a-degraded-raidz-3-of-4-drives-i-e-to-allow-migration.7748/

is applicable and currently the only solution to expand a zfs vdev with an additional disk.

Another possible solution is to create a RaidZ1 vdev now and add another vdev to the pool later, like a mirror of two disks.

Related Topic