[openstack-dev] [cinder] Missing feature in create_server_volume (parameter device) with KVM

Steven Dake sdake at redhat.com
Thu Sep 6 17:25:06 UTC 2012


In KVM, the device parameter for the create_server_volume API has no
impact on the device seen in the operating system.  Speaking to the KVM
devs, they don't see a future where the OS will ever be able to assign a
device name as specified in this API.  The OpenStack compute docs
describe this limitation:

The reason this functionality is important is for many apps that use the
volume server (heat in my case - http://www.heat-api.org), there must be
a way to map an external device into a "known" location inside the VM.

Consider the example where a user attaches 5 volumes to a server at
about the same time - the internal VM will have no reasonable way of
determining which attached disk maps to the internal /dev/vdx.

A fairly simple solution to this problem is to specify the serial number
during KVM volume attachment.  Then the volume would be available in the
VM via:

mount /dev/disk/by_id/my_disk_a

and could be attached to the instance by:

create_server_volume(x, y, 'my_disk_a')

Another approach would be to add another parameter that defines the
serial number (ie: create_server_volume(x, y, z, 'my_disk_a')

If there is a preference to approaches, I'll work up the appropriate


More information about the OpenStack-dev mailing list