Scenario
You inherit a host with mixed storage: a SATA disk for the OS, an NVMe device for high-performance data, and occasional USB storage for transfers. Before you tune performance or troubleshoot I/O issues, you need to confidently identify what each device is, how it is connected, whether it is rotational, what scheduler is in use, and how to trace devices back to their underlying bus paths.
Treat storage identification as evidence gathering. You
correlate the same device using multiple sources of truth:
lsblk (inventory view), /sys
(kernel state), and udev (device metadata).
Objective
-
List block devices with transport/model hints using
lsblk. - Determine rotational vs SSD status from sysfs.
- Verify transport signals via udev properties.
- Confirm vendor/model using sysfs device attributes.
- Inspect the active I/O scheduler for a disk.
- Map a partition back to its parent disk via sysfs.
- Read USB vendor/product IDs from sysfs.
- Resolve an NVMe device’s physical path (PCI association).
-
Cross-check transport and filesystem/mount data with
lsblk.
Concepts
-
lsblkis a fast inventory view. Verify key facts using the kernel (/sys) and udev metadata. -
Rotation is a kernel-reported characteristic:
1for rotational,0for non-rotational. - Transport hints help you reason about performance and failure domains (SATA vs NVMe vs USB).
- Partitions are children of disks. sysfs gives you reliable parent-child relationships.
- The active I/O scheduler affects latency and throughput and is often tuned differently for HDDs vs SSD/NVMe.
- Physical paths (USB bus ports, PCI addresses) are useful when matching devices to hardware inventory and troubleshooting hardware-specific issues.
Walkthrough
lsblk -o NAME,TYPE,ROTA,TRAN,SIZE,MODEL | grep -E '^sd|^nvme|^vd|^sr'
This is the quick inventory view. TRAN provides
transport hints (for example, sata or
nvme) and ROTA helps separate
rotational disks from SSD-backed devices.
NAME TYPE ROTA TRAN SIZE MODEL
sda disk 1 sata 40G Generic_Disk
├─sda1 part 1 sata 512M
└─sda2 part 1 sata 39.5G
nvme0n1 disk 0 nvme 512G NVMe_SSD_512
sr0 rom 1 sata 1G QEMU_DVD-ROM
sda is rotational via sysfs.
cat /sys/block/sda/queue/rotational
sysfs provides the kernel’s view of device characteristics.
1 indicates a rotational device and
0 indicates non-rotational.
1
nvme0n1 is rotational.
cat /sys/block/nvme0n1/queue/rotational
NVMe devices are typically non-rotational and should report
0 here. If you see 1
unexpectedly, double-check device naming and paths.
0
sda via udev properties.
udevadm info --query=property --name=/dev/sda | egrep '^(ID_BUS|ID_ATA|ID_SCSI)'
udev properties help you confirm how the device was
classified by the system. This is useful when
lsblk differs from expectation or when you need
additional evidence for an audit.
ID_BUS=ata
ID_ATA=1
ID_SCSI=1
sda via sysfs.
cat /sys/block/sda/device/vendor
cat /sys/block/sda/device/model
These attributes come from the kernel device model and are helpful for identifying disks consistently across systems.
# vendor
ATA
# model
Generic_Disk
sda.
cat /sys/block/sda/queue/scheduler
The selected scheduler appears in brackets. Scheduler choice affects latency and throughput and may be tuned differently for HDDs vs SSD/NVMe devices.
mq-deadline kyber [bfq] none
The scheduler list and selected scheduler vary by distro, kernel, and device type. Focus on identifying the selected value and being able to justify it for the device class.
sda2’s parent disk using sysfs.
readlink -f /sys/class/block/sda2/.. | xargs basename
Partitions are represented as child devices beneath their parent disk. This is useful when you start with a partition and need to identify the underlying disk.
sda
cat /sys/bus/usb/devices/1-1/idVendor
cat /sys/bus/usb/devices/1-1/idProduct
USB mass storage often appears as /dev/sdX, so
vendor/product IDs help confirm you are targeting the correct
removable device.
# idVendor
058f
# idProduct
6387
The USB sysfs path (1-1) varies by machine.
Use lsusb or browse /sys/bus/usb/devices
if the example path does not exist in your environment.
nvme0n1.
readlink -f /sys/block/nvme0n1/device
This ties the NVMe namespace to the underlying controller path. It is a practical way to link an NVMe block device back to a PCI address for inventory or bus-level troubleshooting.
/sys/devices/pci0000:00/0000:00:04.0/0000:01:00.0/nvme/nvme0
lsblk -o NAME,TYPE,TRAN,FSTYPE,MOUNTPOINTS
Final sanity check: which devices exist, how they are connected, what filesystems they host, and where they are mounted. This helps prevent mistakes before changes like formatting, partitioning, or performance tuning.
NAME TYPE TRAN FSTYPE MOUNTPOINTS
sda disk sata
├─sda1 part sata ext4 /boot
└─sda2 part sata ext4 /
nvme0n1 disk nvme
└─nvme0n1p1 part nvme ext4 /data
Common breakpoints
That can happen for virtual disks or certain controllers.
Treat TRAN as a hint and confirm device identity
using sysfs and udev properties.
USB bus-port identifiers differ by machine. Locate the
correct device under /sys/bus/usb/devices or
correlate using lsusb first, then read the IDs.
Scheduler availability depends on kernel and device type. Your job here is to identify the selected scheduler (in brackets) and explain what it implies for the device class.
NVMe naming is predictable, but the index can vary
(nvme0n1, nvme1n1). Start from
lsblk, then follow sysfs paths for the specific
device you find.
Cleanup checklist
This lab is read-only. Your cleanup is making sure you did not accidentally target the wrong device name in later work.
lsblk -o NAME,TYPE,ROTA,TRAN,SIZE,MODEL
lsblk -o NAME,TYPE,TRAN,FSTYPE,MOUNTPOINTS
You can point to a disk and explain its transport, whether it is rotational, how to prove vendor/model, how to show the scheduler, and how to trace it to its physical path.
Reference
-
lsblk: Inventory view for block devices, transport hints, and mount mapping.-
-o NAME,TYPE,ROTA,TRAN,SIZE,MODEL: Useful columns for device identity. -
-o NAME,TYPE,TRAN,FSTYPE,MOUNTPOINTS: Correlates transport with filesystem and mounts.
-
-
/sys/block/<dev>/queue/rotational: Rotational flag from the kernel (1rotational,0non-rotational). -
udevadm info: Device metadata and classification from udev.-
--query=property: Prints key/value properties. -
--name=/dev/<dev>: Targets a specific device node.
-
-
/sys/block/<dev>/device/vendor: Vendor string for the block device. -
/sys/block/<dev>/device/model: Model string for the block device. -
/sys/block/<dev>/queue/scheduler: Available schedulers and the selected scheduler (in brackets). -
/sys/class/block/<partition>/..: Parent disk path for a partition. -
/sys/bus/usb/devices/<bus-port>/idVendor: USB vendor ID for a device. -
/sys/bus/usb/devices/<bus-port>/idProduct: USB product ID for a device. -
readlink -f /sys/block/<dev>/device: Resolves physical device path (useful for NVMe and PCI correlation).