Pcornel
Storage · ZFS

ZFS Troubleshooting

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

Back to the Topic

Answer

ZFS troubleshooting starts with zpool status -v and the pool's events, then checks capacity, running scrubs or resilvers, dataset properties and the health of the underlying disks. Preserve the pool layout and error details before importing, replacing disks or changing properties.

Remember

  • Symptom ≠ root cause.
  • Pool DEGRADED ≠ automatically data loss.
  • Pool ONLINE ≠ every block verified.
  • Cleared counters or temporary recovery ≠ durable fix.

First checks

  • zpool status -v — state and errors
  • zpool events -v | tail -50 — recent events
  • dmesg | grep -i -e zfs -e 'I/O error' — kernel errors

Commands

zpool status -v
Display ZFS pool/vdev health and errors.
zpool status -x
zpool clear
zpool iostat -v
zpool import
zpool list -o name,cap,frag
zfs list -o space
zpool status
zpool events
zpool online
zpool import -d /dev/disk/by-id tank

Verify in this order

symptom → zpool status → device/pool → fix

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 → ZFS Troubleshooting 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 ZFS status/error observation identifies current state at one layer, not root cause. Root cause requires correlation to the first failed boundary and successful original-test verification after correction.Correlate ZFS evidence with both workload and lower device/path evidence
AcceptanceHealthy evidence: topology and device identity match design, no unexplained persistent errors grow, capacity and scan state are controlled, and the original workload plus checksum/read-back succeeds after correction.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=4035

Confirmation

Confirm action

Continue?