Use it to understand what a /dev entry is and how storage layers stack.
Block Devices
A block device is a device the kernel reads and writes in blocks: whole disks, partitions, RAID arrays (md), LVM logical volumes (dm), loop devices and encrypted volumes.
1. lsblk — tree of the device.
2. findmnt -S /dev/<dev> — mounted?
3. pvs, cat /proc/mdstat, cryptsetup status — used by LVM/RAID/LUKS?
4. Size: blockdev --getsize64 /dev/<dev>.
5. Act only on unused devices.
physical disk → partition → optional md/dm layers → block device used by a filesystem or LVM
For Disks & Block Devices → Block Devices, continue with the first unproven Topic check: Match /dev name to major/minor, sysfs device path, model/serial where available and size. If that boundary is healthy, advance to the adjacent check: Confirm whether the node is whole disk, partition or stacked device before acting. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
lsblkVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
device discovery → major/minor identity → /sys block object → /dev node → queue/I/O path → partition or device-mapper consumer → workload
Healthy evidence: major/minor, sysfs path, capacity and expected hardware/virtual identity agree, I/O errors are absent and all consumers map to the intended device.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Match /dev name to major/minor, sysfs device path, model/serial where available and size.
- Confirm whether the node is whole disk, partition or stacked device before acting.
- Review kernel I/O errors, resets, timeouts and read-only transitions around the incident.
- Trace consumers such as PVs, filesystems, mounts or swap before any write operation.
Verification chain. device discovery → major/minor identity → /sys block object → /dev node → queue/I/O path → partition or device-mapper consumer → workload
Step 3 Commands Verify boundary
lsblk
cat /sys/block/sda/queue/rotational
blockdev --getsize64 /dev/sda
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: the /dev name points to a different major/minor or device path than expected, the device repeatedly resets, becomes read-only or has unexpected consumers.
Step 5 Common mistakes Narrow the fault
- Writing to a device that is in use.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
lsblk shows the tree of layers (disk → part → lvm/crypt/raid). A busy device cannot be repartitioned or removed — find what uses it with lsblk, findmnt and pvs.
lsblk -f— disks, partitions, filesystems, UUIDs and mount pointsblkid— UUIDs, labels and typesfdisk -l / parted -l— partition tablesudevadm info /dev/<dev>— device properties
ReferenceWhat it is1 section · depth on demand
Core model
Identify the exact kernel block device by major/minor, sysfs path, size and parent hierarchy rather than relying only on a mutable /dev name. Distinguish whole-disk devices from partitions and stacked devices such as device-mapper. Confirm read/write capability, queue state and kernel errors before assuming filesystem corruption.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
Block-device identity shows the kernel object being addressed, but it does not show persistent naming, partition correctness, filesystem integrity or workload safety.
udev owns userspace naming/events; partitions, LVM and filesystems own their respective metadata.
In depth
Block devices: identification and properties
A block device is storage that the kernel reads and writes in fixed-size blocks: disks, partitions, RAID arrays, logical volumes and loop devices. The lsblk(8) manual page describes how to see their properties:
- Topology columns (
-t) show alignment, minimum and optimal I/O size, and physical and logical sector sizes. --discardshows whether TRIM or UNMAP is supported.-drestricts output to the top-level devices, and-Sto SCSI devices.
Kernel device names
| Name | Device |
|---|---|
sda, sdb | SCSI, SATA, SAS and USB disks |
nvme0n1, nvme0n1p1 | NVMe namespace and its partitions |
vda, xvda | Virtio (KVM) and Xen virtual disks |
md0, md127 | Software RAID |
dm-0 | device-mapper (LVM, LUKS, multipath) |
loop0 | A file used as a block device |
Properties that matter
| Property | Where | Why |
|---|---|---|
| Rotational | lsblk -d -o NAME,ROTA; /sys/block/<dev>/queue/rotational | SSD or HDD; scheduler and tuning |
| Logical and physical sector size | lsblk -t; blockdev --getss --getpbsz | 512e versus 4Kn; alignment |
| Discard support | lsblk --discard | TRIM via fstrim |
| Read-only | lsblk -o NAME,RO; blockdev --getro | Write-protected or failed devices |
| Size in bytes | blockdev --getsize64 | Exact capacity |
After adding or resizing a virtual disk
When a hypervisor grows a disk or adds a new one, the kernel may not notice straight away. A SCSI rescan, or echo 1 > /sys/class/block/<dev>/device/rescan, makes it reread the size.
host$ lsblk -d -t -o NAME,ROTA,LOG-SEC,PHY-SEC,MIN-IO,OPT-IO,DISC-GRAN
NAME ROTA LOG-SEC PHY-SEC MIN-IO OPT-IO DISC-GRAN
nvme0n1 0 512 512 512 0 512B
sda 1 512 4096 4096 0 0B
host$ sudo blockdev --getsize64 /dev/sdb
2000398934016
host$ echo 1 | sudo tee /sys/class/block/sdc/device/rescan
host$ for h in /sys/class/scsi_host/host*/scan; do echo "- - -" | sudo tee "$h" >/dev/null; done
host$ dmesg | tail -3
sd 2:0:0:2: [sdc] 209715200 512-byte logical blocks: (107 GB/100 GiB)
sdc: detected capacity change from 104857600 to 209715200
Reading the topology
sda reports 512-byte logical sectors but 4096-byte physical sectors: a "512e" disk. Partitions and file systems on it must start on 4 KiB boundaries. Otherwise every write turns into a slower read-modify-write. Modern partitioning tools align to 1 MiB, which covers this.
Documented example, not captured output.
How it works at runtime
Block Devices is part of Disks & Block Devices → Block Devices. Block Devices are kernel-managed random-access storage endpoints represented by major/minor device numbers and commonly exposed through /dev, including disks, virtual disks, multipath mappings and partition devices.
Topic-specific state model. Block Devices are kernel-managed random-access storage endpoints represented by major/minor device numbers and commonly exposed through /dev, including disks, virtual disks, multipath mappings and partition devices.
Interpretation rule. - Device name such as /dev/sdb ≠ stable hardware identity across every boot.
- Block device open succeeds ≠ media and transport are error-free.
- Correct capacity ≠ correct device selected for destructive work.
- Partition child present ≠ whole-disk metadata and upper mappings are coherent.
Quick reference
Block devices are accessed in fixed-size blocks through the kernel block layer (multi-queue, I/O schedulers).
lsblk -t # logical/physical sector sizes, alignment, scheduler
cat /sys/block/sda/queue/scheduler
cat /sys/block/nvme0n1/queue/rotational
blockdev --getsize64 /dev/sda; blockdev --getss --getpbsz /dev/sda
iostat -xz 1
Schedulers: none for NVMe and fast SSD arrays, mq-deadline for SATA SSD/HDD servers, bfq for desktops. Change persistently with a udev rule (ACTION=="add|change", KERNEL=="sd*", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="mq-deadline").
Limits and how it fails
Primary failure point. Block-device identity shows the kernel object being addressed, but it does not show persistent naming, partition correctness, filesystem integrity or workload safety.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. Block Devices owns the kernel block abstraction and device identity. udev owns userspace naming/events; partitions, LVM and filesystems own their respective metadata.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Disks & Block Devices → Block Devices. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/filesystems/index.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Block Devices operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for Block Devices.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | Block Devices are kernel-managed random-access storage endpoints represented by major/minor device numbers and commonly exposed through /dev, including disks, virtual disks, multipath mappings and partition devices. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin host + incident/change time → capture block topology and stable identities → validate partition/device metadata → validate filesystem identity/integrity and effective mount namespace/options → validate PV/VG/LV/device-mapper state where used → make one controlled change at the first failed boundary → re-read effective storage state → repeat original workload I/O/acceptance test. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | device discovery → major/minor identity → /sys block object → /dev node → queue/I/O path → partition or device-mapper consumer → workload | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | Block-device identity proves the kernel object being addressed; it does not prove persistent naming, partition correctness, filesystem integrity or workload safety. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated Linux storage evidence can establish this proof path: device discovery → major/minor identity → /sys block object → /dev node → queue/I/O path → partition or device-mapper consumer → workload | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured device, metadata, mapping, mount or workload scope. Block-device identity proves the kernel object being addressed; it does not prove persistent naming, partition correctness, filesystem integrity or workload safety. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: prove backing identity, then on-device metadata, then filesystem/LVM mapping and effective mount/device state, and finally repeat the original workload I/O before any additional storage change. | Continue to the next unresolved boundary while preserving the original test condition. |
Block Devices · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | Block Devices |
|---|---|
| Topic path | Disks & Block Devices → Block Devices |
| Runtime state | Block Devices are kernel-managed random-access storage endpoints represented by major/minor device numbers and commonly exposed through /dev, including disks, virtual disks, multipath mappings and partition devices. |
| Fast checks | - Match /dev name to major/minor, sysfs device path, model/serial where available and size. - Confirm whether the node is whole disk, partition or stacked device before acting. - Review kernel I/O errors, resets, timeouts and read-only transitions around the incident. - Trace consumers such as PVs, filesystems, mounts or swap before any write operation. |
| Verification chain | device discovery → major/minor identity → /sys block object → /dev node → queue/I/O path → partition or device-mapper consumer → workload Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | Block-device identity proves the kernel object being addressed; it does not prove persistent naming, partition correctness, filesystem integrity or workload safety. Boundary chain: process/context → userspace configuration → kernel subsystem/resource → device/network/filesystem dependency → effective state → original workload. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |