Linux – Whole block device named xvda1, xvda2 instead of xvda, xvdb

block-devicelinuxparavirtualizationxen

I am working on a VM that was set up for me in a public cloud. It's running under the Xen hypervisor in paravirtualized mode and has two virtual disks. So I expect the virtual disk block devices to be named xvda and xvdb. However, the way this machine has been set up, the block devices are named xvda1 and xvda2. Mind you, these aren't partition names. They are names of the whole block devices. Under /sys/block there are xvda1 and xvda2 directories. Normally, I'd expect to see xvda and xvdb under /sys/block, because as documented here that's how Xen virtual disk devices (whole disks) are supposed to be named.

Looking in /proc/partitions there are only two entries: xvda1 and xvda2. Under /dev there are also only /dev/xvda1 and /dev/xvda2 (no /dev/xvda or /dev/xvdb). I also looked at the udev rules to see if the devices had been intentionally renamed, but could find nothing under /etc/udev/rules.d that is responsible for this.

Are these legitimate names for these devices, or has the system administrator made some kind of misconfiguration? The names certainly seem to be at odds with the Linux kernel's device.txt documentation. Or is this normal for a Xen paravirtualized VM?

Best Answer

It's not a configuration issue as such. Xen allow for virtual disks to be mapped to partition names. I used to do it that way in the past but reverted to a more classic approach later on for several reasons. As far as I remember, you use the vdisks as partitions or even add partitions on top of it. You would end up with something like xvda1p1 iirc.

Related Topic