Benefits and features in volume while attaching data volume (attributes Device Name)
Issue
- Disk attachment its completely depends on OS feature, so if we assign any name (Device Name) what is benefit of this feature because as we checked, if we assign any name but its not reflecting instance.
I've verified and attempted to add a volume to the instance using the --device option, and I've noticed that libvirt is ignoring the provided device name and adding the naming as per the driver's default device name. This is standard OS behavior. You can see the below messages in the nova-compute for the same.
- We see the following INFO logs when specifying a device name:
2022-07-13 10:25:05.830 7 INFO nova.virt.libvirt.driver [req-c9d7aad4-fa0f-4a29-b72b-2f47019d0d54 8b40943faf304b278f802d283b55ff4d 05282fc80341493aa722fc3af7a31cbf - default default] [instance: 2eb802b9-77a4-4f3a-a96d-d43638875e4d] Ignoring supplied device name: /dev/vdk
- We attached the volume using this command:
#openstack server add volume --device /dev/vdd 2eb802b9-77a4-4f3a-a96d-d43638875e4d 65d64921-17a3-4614-9f4c-02cf9678ea92
- Here is the
dumpxml
:
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
<auth username='openstack'>
<secret type='ceph' uuid='ee239339-a170-402c-ae31-5cd8271b1663'/>
</auth>
<source protocol='rbd' name='vms/2eb802b9-77a4-4f3a-a96d-d43638875e4d_disk' index='1'>
<host name='192.168.125.35' port='6789'/>
<host name='192.168.125.38' port='6789'/>
<host name='192.168.125.191' port='6789'/>
</source>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
<auth username='openstack'>
<secret type='ceph' uuid='ee239339-a170-402c-ae31-5cd8271b1663'/>
</auth>
<source protocol='rbd' name='volumes/volume-65d64921-17a3-4614-9f4c-02cf9678ea92' index='2'>
<host name='192.168.125.35' port='6789'/>
<host name='192.168.125.38' port='6789'/>
<host name='192.168.125.191' port='6789'/>
</source>
<target dev='vdb' bus='virtio'/>
<serial>65d64921-17a3-4614-9f4c-02cf9678ea92</serial>
<alias name='virtio-disk1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
<disk type='network' device='disk'>
<driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
<auth username='openstack'>
<secret type='ceph' uuid='ee239339-a170-402c-ae31-5cd8271b1663'/>
</auth>
<source protocol='rbd' name='volumes/volume-4b98f650-2c4b-495f-9f89-f546152240ea' index='3'>
<host name='192.168.125.35' port='6789'/>
<host name='192.168.125.38' port='6789'/>
<host name='192.168.125.191' port='6789'/>
</source>
<target dev='vdc' bus='virtio'/>
<serial>4b98f650-2c4b-495f-9f89-f546152240ea</serial>
<alias name='virtio-disk2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
</disk>
- Even though we specify the --device option, the guest OS is identifying the disks in order.
Environment
- Red Hat OpenStack Platform 16.1 (RHOSP)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.