Storage · Linux Storage
Linux Storage Troubleshooting
Cheat sheet · https://pcornel.dk/topic.php?topic=4008
Answer
Troubleshoot Linux storage with lsblk, dmesg and journalctl for I/O errors, df and df -i for space and inodes, mount and fstab, smartctl, iostat for latency, and fsck or xfs_repair on unmounted file systems.
Remember
- Check inodes as well as space.
- Read kernel logs for I/O errors.
- Repair only unmounted file systems.
First checks
dmesg -T | grep -i -e 'I/O error' -e 'remount' -e 'EXT4-fs error' -e XFS— kernel errorslsblk; findmnt— missing devices/mountsjournalctl -b -u '*.mount'— mount failures
Commands
lsblksmartctl -amultipath -llfindmntjournalctl -b -u '*.mount'df -hdf -ismartctl
Verify in this order
kernel → device → dm → filesystem → mount
Where it usually breaks
First mismatch in provider/pool → virtual/logical disk → host/guest mapping → partition/filesystem → mount/drive → workload; preserve identity/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4008