Identify Block Device of Volume Attached to Instance

Problem

The block device of an attached/mounted volume for a particular instance needs to be identified.

Environment

  • Platform9 Managed OpenStack - All Versions

  • Nova

  • Cinder

  • Libvirt

Procedure

  1. Login to the KVM host.

  2. Identify the disk ID within the instance's XML file.

# ls -l/opt/pf9/data/instances/[INSTANCE_UUID]/cfg-[INSTANCE_UUID].xml

Example:

/opt/pf9/data/instances/8f9dadb1-1bfa-45b9-8fed-cd53c38de547/cfg-8f9dadb1-1bfa-45b9-8fed-cd53c38de547.xml[disk type='block' device='disk'] [driver name='qemu' type='raw' cache='none' io='native'/] [source dev='/dev/disk/by-id/dm-uuid-mpath-3624a9370ebcccad586e4418c0002d81b'/]   [target dev='vda' bus='virtio'/] [serial]8837dded-d387-4b3c-a8f9-9b91f0142240[/serial] [address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/][/disk]
  1. Look for the 'source dev line' for the disk id. In the above example, it is ' 3624a9370ebcccad586e4418c0002d81b.'

  2. Run**lsblk** command to get all the disks and partitions.

Last updated