Skip to content

Did you know?

lsblk shows whether a disk is an SSD or a spinning hard disk.

In the ROTA column, 1 means a rotating hard disk and 0 means an SSD or flash drive. VMs report what the hypervisor says.

Explained

Run lsblk -d -o NAME,ROTA,SIZE,MODEL. The ROTA column means “rotational”: 1 is a spinning hard disk (or an optical drive), and 0 is an SSD, NVMe drive or other flash storage. The -d option lists whole disks only, without their partitions.

$ lsblk -d -o NAME,ROTA,SIZE,MODEL
NAME ROTA  SIZE MODEL
sda     0  100G QEMU HARDDISK
sr0     1    4M QEMU DVD-ROM

The value comes from the kernel (/sys/block/<disk>/queue/rotational), so you don’t need root or extra tools. One catch: inside a virtual machine it shows what the hypervisor reports, not the real hardware. In the example above, a VM disk named “HARDDISK” reports 0. On real hardware it’s a quick way to check before you tune a system for SSDs or pick a drive for a database.

Learn more

← All tech tips · Suggest a fix

Back to top