Identify driver details of your cloud VM’s block devices

While preparing a presentation for POUG 2025 I had a need to find out more about the block device driver in use on my system. I was particularly interested in the SCSI mid-layer and low-layer drivers. Unsure about these terms? I am referring to the Linux Storage Stack Diagram. It’s a great resource for anyone interested in the Linux block layer.

Naturally it all depends, but the simplest way I found of identifying the driver for a given block device is lsblk. On my test VM, running Oracle Linux 9.6/x86-64, this is what’s reported.

$ lsblk -o name,maj:min,rm,size,ro,type,mountpoints,subsystems
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS SUBSYSTEMS
vda 251:0 0 20G 0 disk block:virtio:pci
├─vda1 251:1 0 1G 0 part /boot block:virtio:pci
└─vda2 251:2 0 19G 0 part block:virtio:pci
├─ol_ol9packer-root 252:0 0 17G 0 lvm / block
└─ol_ol9packer-swap 252:1 0 2G 0 lvm [SWAP] block
vdb 251:16 0 100G 0 disk block:virtio:pci
└─vdb1 251:17 0 100G 0 part block:virtio:pci
└─oracle_vg-oracle_lv 252:2 0 100G 0 lvm /u01 block
vdc 251:32 0 25G 0 disk block:virtio:pci
└─vdc1 251:33 0 25G 0 part block:virtio:pci
vdd 251:48 0 10G 0 disk block:virtio:pci
└─vdd1 251:49 0 10G 0 part block:virtio:pci

If you’ve been working with KVM/qemu before this looks quite familiar. The VM in question uses block devices attached to the virtio bus. By definition they are known as vdX devices.

By the way, if you see this …

$ lsblk -o name,maj:min,rm,size,ro,type,mountpoints,subsystems
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS SUBSYSTEMS
sda 8:0 0 20G 0 disk block:scsi:virtio:pci
├─sda1 8:1 0 1G 0 part /boot block:scsi:virtio:pci
└─sda2 8:2 0 19G 0 part block:scsi:virtio:pci
├─ol_ol9base-root 252:0 0 17G 0 lvm / block
└─ol_ol9base-swap 252:1 0 2G 0 lvm [SWAP] block

… your block devices are attached to a SCSI controller using the virtio-scsi model. This is common for compute VMs in Oracle Cloud Infrastructure if you opt for a paravirtualised volume attachment.

I hope this saved you a minute or two.