Skip to content

Data integrity

ZFS checksums, scrub, and mirror/RAIDZ redundancy.

ZFS checksums

Every block is checksummed on write and verified on read. Silent corruption is detected and corrected automatically from mirror/raidz redundancy.

# Weekly scrub via cron
0 2 * * 0 zpool scrub tank

Erasure coding

Approach Efficiency Tolerance
ZFS mirror 50% 1 disk per vdev
RAIDZ1 ~75% 1 disk per vdev
RAIDZ2 ~67% 2 disks per vdev
RAIDZ3 ~57% 3 disks per vdev
mdadm RAID 5/6 ~75-67% 1-2 disks

For small-file random reads, mirrored vdevs outperform RAIDZ.

Without ZFS

  • mdadm – Linux software RAID. RAID 1/5/6/10. No checksums, no self-healing, but solid redundancy.
  • btrfs – checksums and scrub like ZFS, but less mature for production storage. RAID 1/5/6 support.
  • dm-integrity + mdadm – adds per-sector checksums on top of mdadm RAID. Catches silent corruption without ZFS.

Further reading