Pcornel
Storage · Filesystems

Filesystem Troubleshooting

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

Back to the Topic

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 errors
  • df -h; df -i — space/inodes
  • findmnt -o TARGET,OPTIONS | grep ro, — read-only remounts

Commands

df -h
df -i
journalctl -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 boundaryWhat to verifyProof limit
Identity / attachmentFilesystem type, source/backing object, mount/attachment target and effective optionsPresence or mount state alone does not prove consistency or lower-layer health
Capacity / metadataData space, metadata/inodes, quotas/reservations and filesystem stateFree bytes at one layer do not prove allocation can succeed end to end
Failure boundaryThe 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
AcceptanceHealthy 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

Confirmation

Confirm action

Continue?