virtio_blk unique device ID
All,
I was recently testing the workings of virtio to provision SAN block devices to a domain, which worked great! However, i could not find a way to find the UID of a virto_blk device. The scenario I had created was the following. a LUN provisioned to my KVM (kvm-83) hypervisor over two paths, both paths mapped to my domain using virtio_blk. When configuring multipath-tools in the domain I could not find a way to find the UID of the LUN in order to create the multipath config. On a SCSI device, I would use the /lib/udev/scsi_id tools to discover this ID. I am using libvir/qemu 0.5.1 in Ubuntu Jaunty Alpha-3 as hypervisor and virtual machine.
Does the virtio_blk driver provide a UID to its devices, and is there a way to get this ID in userspace?
kind regards,
Quoted 4 lines · Jule Slootbeek
All,
I was recently testing the workings of virtio to provision SAN block devices to a domain, which worked great! However, i could not find a way to find the UID of avirto_blkdevice. The scenario I had created was the following. a
Quoted 8 lines
LUN provisioned to my KVM (kvm-83) hypervisor over two paths, both paths mapped to my domain using
virtio_blk. When configuring multipath-tools in the domain I could not find a way to find the UID of the LUN in order to create the multipath config. On a SCSI device, I would use the/lib/udev/scsi_idtools to discover this ID. I am using libvir/qemu 0.5.1 in Ubuntu Jaunty Alpha-3 as hypervisor and virtual machine.
Does thevirtio_blkdriver provide a UID to its devices, and is there a way to get this ID in userspace?
use uuid? Some distros (Ubuntu for example) mount via UUID
% blkid/dev/vda1: UUID="6331275f-f10d-4684-8aa8-e8aca1582b9d" TYPE="swap" /dev/vda2: UUID="cf121062-fd27-4151-8a68-6cb940e449fe" TYPE="ext3"
# ls -al /dev/disk/by-uuid/ total 0 lrwxrwxrwx 1 root root 10 Jan 29 17:10 6331275f-f10d-4684-8aa8-e8aca1582b9d -> ../../vda1 lrwxrwxrwx 1 root root 10 Jan 29 17:10 cf121062-fd27-4151-8a68-6cb940e449fe -> ../../vda2
Signature · 4 lines
Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx [email protected]
correct, however that would assume there is a file system on that block device
the device ID should be able to be used without the existance of a FS.
ubuntu@kvm:~$ sudo /lib/udev/scsi_id -g -u --page=0x83 /dev/sdf 360060480000190300570533030313044 ubuntu@kvm:~$ blkid /dev/sdf1 /dev/sdf1: UUID="e149b893-2970-46d8-9ee4-322d6a589828" SEC_TYPE="ext2" TYPE="ext3"
Quoted 38 lines · Ryan Harper
Quoted 2 lines · Jule Slootbeek
All,
I was recently testing the workings of virtio to provision SAN blockdevices
Quoted 1 line
to a domain, which worked great! However, i could not find a way to find
the
Quoted 1 line
UID of a
virto_blkdevice. The scenario I had created was the following.a
Quoted 5 lines
LUN provisioned to my KVM (kvm-83) hypervisor over two paths, both paths mapped to my domain using
virtio_blk. When configuring multipath-tools in the domain I could not find a way to find the UID of the LUN in order to create the multipath config. On a SCSI device, I would use the/lib/udev/scsi_idtools to discover this ID. I am using libvir/qemu 0.5.1in
Quoted 2 lines
Ubuntu Jaunty Alpha-3 as hypervisor and virtual machine. Does the
virtio_blkdriver provide a UID to its devices, and is there away
Quoted 1 line
to get this ID in userspace?
use uuid? Some distros (Ubuntu for example) mount via UUID
% blkid
/dev/vda1: UUID="6331275f-f10d-4684-8aa8-e8aca1582b9d" TYPE="swap"/dev/vda2: UUID="cf121062-fd27-4151-8a68-6cb940e449fe" TYPE="ext3"# ls -al /dev/disk/by-uuid/ total 0 lrwxrwxrwx 1 root root 10 Jan 29 17:10 6331275f-f10d-4684-8aa8-e8aca1582b9d -> ../../vda1 lrwxrwxrwx 1 root root 10 Jan 29 17:10 cf121062-fd27-4151-8a68-6cb940e449fe -> ../../vda2--
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
[email protected]