Lesson 5 of 9 · 26m
Checksums, Scrubs, and Repair: ZFS Integrity in Practice
Learn how end-to-end checksums detect corruption, what scrubs actually repair, how to read errors, and where integrity verification still stops.
The reason storage people become emotionally attached to ZFS is end-to-end checksumming. Every data and metadata block is checksummed by the filesystem, and every read verifies the checksum. Traditional RAID can often return the wrong bytes with perfect confidence because it has no independent way to know which copy is correct. ZFS knows which block failed its checksum and can repair it from redundancy.
What end-to-end really means
The integrity chain starts when the application writes and ends when the filesystem hands data back:
application write -> ZFS block -> checksum stored in parent metadata
-> vdev mirror/parity copy -> disk firmware -> platter/NAND
application read <- checksum verified after reconstructionThis catches silent corruption introduced by disks, cables, controllers, memory after handoff boundaries, and firmware bugs. It does not make application-level corruption impossible. If the database writes the wrong bytes consistently, ZFS will faithfully preserve the wrong bytes.
Scrubbing is preventive maintenance
A scrub reads all live data and verifies checksums. Schedule it because latent corruption is worst when discovered during a rebuild:
zpool scrub tank
zpool status -v tankA typical status excerpt:
pool: tank
state: ONLINE
scan: scrub in progress since Mon Nov 30 09:12:44 2026
2.41T scanned at 312M/s, 1.10T issued at 142M/s
0 repaired, 45.68% done
errors: No known data errorsScrubs are I/O-heavy. Run them during low-demand windows, but do not postpone them forever on large pools. Monthly is common for general workloads; adjust by pool size, observed duration, and disk quality.
Read error counters correctly
zpool status -vYou care about three columns: CKSUM, read, and write errors per device, plus permanent file or metadata errors. Checksum errors with successful repair are exactly the system working as designed. Rising checksum errors concentrated on one disk or path are a hardware investigation. Permanent errors may list affected files under older behavior or datasets in newer versions.
errors: Permanent errors have been detected in the following files:
tank/backup/mysql/binlog.000482:<0x19a42>When redundancy cannot repair a block, restore the affected file from backup or replica. Deleting a corrupt file is sometimes necessary to clear the error state, but deletion is not evidence that the underlying cause disappeared.
Memory still matters
ZFS is not magic against bad RAM before data reaches the filesystem. ECC memory reduces the chance that corrupted memory becomes checksummed "valid" corruption. Non-ECC systems run ZFS successfully every day, but be honest about the boundary: end-to-end means from ZFS downward, not from the application author's intent downward.
Field notes
- A scrub is not a backup; it verifies current copies, not historical deleted versions.
- Frequent checksum errors after a scrub deserve hardware triage even when
repairedremains low. zpool clearclears counters, not the reason those counters increased.
Was this lesson helpful?