ZFS protection against bit rot and silent corruption without RAID

7E10FC9A asked:

I have never encountered a disk failure in my whole life but I had a dozen of bit rot and silent corruptions. ‘Normal’ file systems and hardware RAID can do absolutely nothing about it. I have been using application-level parity redundancy to protect my most important data, but it’s apparently not quite effective.

I know ZFS store checksum of the chunks in software RAID, which offers protection against bit rot and silent corruption. The problem is, I do not want RAID and that’s off the table.

So is it possible to use filesystem-level parity without RAID or multi-disk systems ? For example by allocation part of the disk space to store the parity of the “chunks” instead of storing the parity of equal sized disks on another disk as in RAID5.

My answer:


A checksum can only detect corruption. It cannot help you restore the data.

If you aren’t willing to mirror your data on two (or more) vdevs, then you can set the copies ZFS property, which will tell ZFS to keep n copies of the data (1, 2 or 3). In case one copy is corrupted, the other can be used to recover the data.

$ zfs get copies srv
NAME  PROPERTY  VALUE   SOURCE
srv   copies    1       default

$ zfs set copies=2 srv

Keep in mind that this does not protect you from an actual disk failure (which can happen even if you have never experienced it before). This is not a backup. Make appropriate backups of your data.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.