ADVERTISEMENT

ZFS protection against bit rot and silent corruption without RAIDZ

Solution 1:

I don't think this is a good use case for ZFS. It's like you have a desired solution and are trying to make this fit.

Yes, there's the ZFS copies= parameter, which will endeavor to store multiple copies of files on different sectors of the disks, but it's not a substitute for true redundancy.

Please see: https://jrs-s.net/2016/05/02/zfs-copies-equals-n/

When you post a question and say such firm things like "RAID is off the table", it may be helpful to explain why you have those constraints so that we can help answer the real question.

Solution 2:

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.