2

It seems that, since btrfs development began, various communities have touted both it and ZFS as inherently more advanced filesystems for preventing corruption, bit rot, etc.

What features of btrfs or ZFS make them so suitable for both the detection and repair of "bit rot"?

Can btrfs detect and repair bit rot with only a single physical HDD, or does it require multiple for redundancy? If the latter, why not use more stable and vanilla filesystems (like ext4 and friends) atop regular RAID configurations?

1 Answer 1

1

ZFS, in addition to storing the raw data, will store a hash of every block of that data. The data is then checked against the hash at every access. That means, if a bit is flipped by cosmic radiation, the filesystem will know that block's data is not intact.

Damaged data will be repaired from a known-good-copy of the data, like another physical RAIDZ disk like you suggest. ZFS datasets also have a copies property which can be configured to make ZFS keep multiple copies of the same data on a single disk. So in fact, ZFS has a mechanism to recover damaged data even in configurations only involving one physical disk.

btrfs is not as mature and fully-featured as ZFS, but follows much of the same principles as ZFS.

ext4 and RAID provide none of the above guarantees. RAID is designed only for graceful recovery from entire-disk failures, and does not have a mechanism to detect data corruption.

You must log in to answer this question.

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