Pcornel
Storage · ZFS

Checksumming

Cheat sheet · https://pcornel.dk/topic.php?topic=4028

Back to the Topic

Answer

ZFS stores checksums separately from the data blocks they protect through its block-pointer tree. On read, data is verified against the expected checksum. If redundancy provides another valid replica or parity reconstruction, ZFS can return correct data and repair a bad copy. Without a valid alternate copy, detection still works but repair may be impossible.

Remember

  • Checksum detection ≠ guaranteed repair.
  • Checksums ≠ backup or historical recovery.
  • No checksum errors observed ≠ every block was recently read.
  • Device SMART health ≠ ZFS end-to-end data integrity.

First checks

  • zpool status -v — checksum errors per device
  • zfs get checksum <ds> — algorithm
  • zpool events -v | tail — error events

Commands

zpool status

Verify in this order

read → checksum verify → repair from redundancy

Where it usually breaks

First mismatch in member media → metadata/layout → allocation/placement → redundancy/recovery → logical object → consumer; preserve identity/pre-state before mutation.

ZFS → Checksumming ZFS map

ZFS boundaryWhat to verifyProof limit
Identity / topologyPool GUID/name, dataset/zvol, top-level vdev class, leaf-device identity and effective propertiesObject presence alone does not prove integrity, performance or recovery
Capacity / protectionPool free space, quotas/reservations, snapshot retention, redundancy and active scrub/resilver stateFree space or ONLINE state at one layer does not prove end-to-end health
Failure boundaryA checksum mismatch proves returned block data did not match ZFS expected integrity metadata; it does not by itself identify whether the cause was media, cable/controller, RAM, software or another path component.Correlate ZFS evidence with both workload and lower device/path evidence
AcceptanceHealthy evidence: representative reads and recent scrub complete without unexplained checksum errors, redundancy is intact, and repaired blocks no longer reproduce errors.Close only after original workload plus checksum/read-back/recovery verification succeeds

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4028

Confirmation

Confirm action

Continue?