Filesystem Corruption
Cheat sheet · https://pcornel.dk/topic.php?topic=4387
Answer
Filesystem integrity depends on successful block I/O plus coherent filesystem metadata. Diagnose read-only and non-destructive checks first, then prove the backing device/path is stable before repair.
Remember
- Filesystem error message ≠ failed disk automatically.
- Journal replay ≠ full integrity verification.
- Repair success ≠ user-file contents are correct.
- Running destructive repair on an unstable device can worsen recoverability.
First checks
dmesg | grep -i -e error -e corrupt— errorsfsck -n / xfs_repair -n— dry-run checkzpool status -v— ZFS damaged files
Commands
fsck -n /dev/<device>- Run a read-only filesystem check. Focus fields: filesystem check phases, superblock/metadata findings and reported inco…
Verify in this order
corruption → device check → repair/restore
Where it usually breaks
First mismatch in media/provider → controller/pool → logical object → path/protocol → filesystem/share/object namespace → consumer workload; preserve identity/pre-state before mutation.
Storage Troubleshooting → Filesystem Corruption proof map
| Troubleshooting boundary | What to verify | Proof limit |
|---|---|---|
| Scope / identity | Exact workload, object/device identity, affected hosts and incident window | Symptom naming alone is not root-cause proof |
| Dependency path | Application symptom → filesystem metadata/data structures → block device/volume → path/controller → media/backend → read-only check → repair → read-back | Healthy adjacent layers do not prove end-to-end health |
| Failure boundary | A filesystem consistency error proves a filesystem structure is inconsistent; it does not by itself identify whether the cause was power loss, software, memory, media or transport. | Correlate evidence for the same operation and timestamps |
| Acceptance | Healthy evidence shows clean filesystem-specific verification, stable backing I/O and successful application/file read-back after recovery. | Close only after the original workload/recovery test and regression check |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4387