Pcornel
Storage · Linux Storage

Block Devices

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

Back to the Topic

Answer

Linux block devices are disks and disk-like devices such as /dev/sda, /dev/nvme0n1 and /dev/mapper/*. List them with lsblk, inspect with blkid and udevadm, and they hold partitions, LVM or file systems.

Remember

  • Names like sdb can change between boots.
  • /dev/disk/by-id and by-uuid give stable names.
  • Devices stack: disk → partition → LVM/dm → file system.

First checks

  • lsblk -d -o NAME,SIZE,ROTA,TRAN,MODEL,SERIAL — disks
  • ls -l /dev/disk/by-id/ — stable names
  • cat /sys/block/<dev>/queue/scheduler — I/O scheduler

Commands

lsblk -f
Block topology plus filesystem metadata.

Verify in this order

hardware → driver → /dev/<dev>

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=3999

Confirmation

Confirm action

Continue?