Change zfs pool layout

elorimer

Contributor
Joined
Aug 26, 2019
Messages
194
Continuing with the mirrors is the path I'm on. If I follow, zfs will distribute to each vdev more or less equally, so the 2TB drives will fill up and the 8TB drives will be mostly empty until they take over the load.

I'm not sure I follow why a 3 disk mirror is that much of an improvement over a 2 disk mirror (assuming one has backups), or for that matter why z2 is better than a mirror. Mostly because I don't know enough about zfs, and my math skills are deeply non-existent.

The scrub process in either event should take care of catching minor errors, cosmic rays and bitrot, I think, so it is more a question of catastrophic failure. If one assumes that there is a 2% chance that a drive will fail in the course of a year, then the chance that both of the drives will fail in a year should be around .04%, and three of three drives effectively non-existent. (Appreciating that the chance of a drive failing increase with age, so not quite.) Since you are likely to be able to replace the failed drive and resilver inside of two weeks, the chance that the second drive will fail in that period is fairly small, and the third disk doesn't seem to add much. I would be more inclined to have a single 8TB drive on the shelf available to plug in than have it spinning in a place where it might not be needed, and skip the 6TB entirely. (Yes: that 8TB being a USB drive I use for a cold backup, that I shuck if necessary to use in the pool.) If both the drives fail, then the pool fails, but it is unlikely the backup would fail too.

Similarly with a four drive z2, one has two data drives and two parity drives, or at least that is what all the explanations say. I follow if one parity drive fails, the vdev and pool can continue, but if two parity drives fail, then I guess you can read from the pool, but can you write? I guess you haven't lost data. But suppose a data drive fails? You can reconstruct the data with a replacement drive, but it seems until then both read and write are halted. Suppose the second data drive fails? Can it be reconstructed, and if not, isn't it no better than the mirror path?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
I'm not sure I follow why a 3 disk mirror is that much of an improvement over a 2 disk mirror
More redundancy, which translates to better availability of data. Two disks can fail at close to the same time, without your losing any data.
or for that matter why z2 is better than a mirror.
Same thing, and also that z2 can be more space-efficient depending on the number of disks in the vdev.
If one assumes that there is a 2% chance that a drive will fail in the course of a year, then the chance that both of the drives will fail in a year should be around .04%
Your math is correct as far as it goes, but I believe your assumption is faulty. If you annualize that, it would mean that you could expect a hard disk to last, on average, over 100 years (assuming that 2% chance is for one disk failure in a pool of more than one disk). A more accurate assumption would be at least an order of magnitude higher. Your math also doesn't account for common-cause failures, where something happens that causes the failure of more than one disk at close to the same time.

Now, the risk of complete disk failure can be mitigated by the kind of monitoring that we recommend here--regular SMART self-tests and scrubs will both exercise the disks and report many circumstances likely to lead to complete failure well in advance of such failure. As a result, I don't think I've had a hard failure of a spinner that was part of my pool in at least 10 years (I had one about five years ago, but that was while I was burning it in to be put into the pool), even though I've replaced several disks that were giving warning signs.

Similarly with a four drive z2, one has two data drives and two parity drives
More accurately, it has two disks' worth of parity. Dedicated parity disks are the stuff of RAID3 and/or RAID4, which nobody's used in a long time AFAIK. The parity is spread across the array. The rest of your questions in this paragraph seem to depend on your incorrect understanding that there are separate "data" and "parity" disks, so reconsider in light of this information and let me know what other questions remain.
 

elorimer

Contributor
Joined
Aug 26, 2019
Messages
194
More accurately, it has two disks' worth of parity. Dedicated parity disks are the stuff of RAID3 and/or RAID4, which nobody's used in a long time AFAIK. The parity is spread across the array. The rest of your questions in this paragraph seem to depend on your incorrect understanding that there are separate "data" and "parity" disks, so reconsider in light of this information and let me know what other questions remain.
Ah! Very helpful. So many descriptions of Raidz1 and Raidz2 have cute little pictures with separate data and parity disks, so yes that was my incorrect understanding.
 

joncy92

Explorer
Joined
Dec 5, 2019
Messages
69
More redundancy, which translates to better availability of data. Two disks can fail at close to the same time, without your losing any data.

Same thing, and also that z2 can be more space-efficient depending on the number of disks in the vdev.

Your math is correct as far as it goes, but I believe your assumption is faulty. If you annualize that, it would mean that you could expect a hard disk to last, on average, over 100 years (assuming that 2% chance is for one disk failure in a pool of more than one disk). A more accurate assumption would be at least an order of magnitude higher. Your math also doesn't account for common-cause failures, where something happens that causes the failure of more than one disk at close to the same time.

Now, the risk of complete disk failure can be mitigated by the kind of monitoring that we recommend here--regular SMART self-tests and scrubs will both exercise the disks and report many circumstances likely to lead to complete failure well in advance of such failure. As a result, I don't think I've had a hard failure of a spinner that was part of my pool in at least 10 years (I had one about five years ago, but that was while I was burning it in to be put into the pool), even though I've replaced several disks that were giving warning signs.


More accurately, it has two disks' worth of parity. Dedicated parity disks are the stuff of RAID3 and/or RAID4, which nobody's used in a long time AFAIK. The parity is spread across the array. The rest of your questions in this paragraph seem to depend on your incorrect understanding that there are separate "data" and "parity" disks, so reconsider in light of this information and let me know what other questions remain.

How do you burn in the disk? I didn't realise there was a stress test available.

Would you say a 3 disk mirror is worth doing as in my previous post?

Thanks
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Top