Filesystem Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=3965
Answer
Filesystem troubleshooting starts from the exact error and path, identifies which filesystem and disk hold that path, then checks mount state, permissions, free space and inodes, consistency and the underlying volume or disk in turn.
Remember
- Symptom ≠ root cause.
- Read-only filesystem ≠ automatically filesystem corruption.
- No space left ≠ always byte-capacity exhaustion.
- Repair tool success ≠ workload recovery proven.
First checks
dmesg | grep -i -e ext4 -e xfs -e btrfs -e 'I/O error'— filesystem/kernel errorsdf -h; df -i— space/inodesfindmnt -o TARGET,OPTIONS | grep ro,— read-only remounts
Commands
df -hdf -ijournalctl -b -u <mount unit>
Verify in this order
symptom → kernel log → device → filesystem
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.
Filesystems → Filesystem Troubleshooting filesystem map
| Filesystem boundary | What to verify | Proof limit |
|---|---|---|
| Identity / attachment | Filesystem type, source/backing object, mount/attachment target and effective options | Presence or mount state alone does not prove consistency or lower-layer health |
| Capacity / metadata | Data space, metadata/inodes, quotas/reservations and filesystem state | Free bytes at one layer do not prove allocation can succeed end to end |
| Failure boundary | The first failed filesystem boundary narrows ownership; evidence at one layer does not prove adjacent dependencies or application health. Destructive repair is deferred until lower layers and recovery options are understood. | Correlate filesystem evidence with the backing volume/path/backend before repair |
| Acceptance | Healthy evidence: the intended filesystem is mounted/attached, access and capacity are correct, no correlated metadata/backend errors remain and the original workload plus read-back succeeds. | Close only after the original path/workload and read-back check succeeds |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3965