ZFS Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=4035
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 errorszpool events -v | tail -50— recent eventsdmesg | grep -i -e zfs -e 'I/O error'— kernel errors
Commands
zpool status -v- Display ZFS pool/vdev health and errors.
zpool status -xzpool clearzpool iostat -vzpool importzpool list -o name,cap,fragzfs list -o spacezpool statuszpool eventszpool onlinezpool 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 boundary | What to verify | Proof limit |
|---|---|---|
| Identity / topology | Pool GUID/name, dataset/zvol, top-level vdev class, leaf-device identity and effective properties | Object presence alone does not prove integrity, performance or recovery |
| Capacity / protection | Pool free space, quotas/reservations, snapshot retention, redundancy and active scrub/resilver state | Free space or ONLINE state at one layer does not prove end-to-end health |
| Failure boundary | A 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 |
| Acceptance | Healthy 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