Storage
Linux Storage
Cheat sheet · https://pcornel.dk/topic.php?topic=3998
Answer
Linux storage covers block devices, partitions, LVM and device-mapper, file systems such as ext4, XFS and Btrfs, multipath, udev naming and fstab mounting — the layers between a disk and a mounted directory.
Remember
- Device names like /dev/sdb can change; use UUIDs or /dev/disk/by-id.
- df shows space; df -i shows inodes, which can run out first.
- A wrong fstab entry can stop boot unless nofail is set.
First checks
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT,UUID— devicesfindmnt— mountsdmesg | grep -i -e 'I/O error' -e sd -e nvme— kernel storage messages
Commands
lsblk- Display block-device topology, sizes, types, mount relationships and selected device attributes.
mdadm- Inspect, assemble, create and manage Linux MD software RAID arrays.
blkid- Read block-device signatures such as filesystem type, UUID and label.
mount- Attach a filesystem to the namespace or display currently mounted filesystems.
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS- Display block-device topology.
multipath -llfindmnt
Verify in this order
device → udev → 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=3998