Pcornel
Storage · Storage Troubleshooting

Filesystem Corruption

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

Back to the Topic

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 — errors
  • fsck -n / xfs_repair -n — dry-run check
  • zpool 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 boundaryWhat to verifyProof limit
Scope / identityExact workload, object/device identity, affected hosts and incident windowSymptom naming alone is not root-cause proof
Dependency pathApplication symptom → filesystem metadata/data structures → block device/volume → path/controller → media/backend → read-only check → repair → read-backHealthy adjacent layers do not prove end-to-end health
Failure boundaryA 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
AcceptanceHealthy 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

Confirmation

Confirm action

Continue?