Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

nova volume-attach with device option not honoring given device name

I am trying to attach a cinder volume to a VM using device option as shown below.

nova volume-attach vm-id device-name

Eg: nova volume-attach vm-id /dev/vdd

Currently there is no device named /dev/vdc listed in VM. But I want the volume to be attached as device name vdd which falls out of alphabetical order.

volume-attach command shows me that the volume is mounted as vdd, but when I do lsblk after logging in to VM and check the device name it is listed as vdc.

nova volume-attach <vm-id> <vol-id> /dev/vdd 10
+----------+--------------------------------------+
| Property | Value                                |
+----------+--------------------------------------+
| device   | **/dev/vdd**                           |

lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0     11:0    1  410K  0 rom
vda    253:0    0   10G  0 disk
└─vda1 253:1    0   10G  0 part /
vdb    253:16   0   20G  0 disk /mnt
***vdc***    253:32   0   10G  0 disk

It is following the alphabetical order and as devices /dev/vda and /dev/vdb are present, /dev/vdc is being created in VM.

If this is the case what is the use of <device> option in nova volume-attach command? Is this a bug in nova or expected behavior, please throw some light on this.

Thank you.

nova volume-attach with device option not honoring given device name

I am trying to attach a cinder volume to a VM using device option as shown below.

nova volume-attach vm-id device-name

Eg: nova volume-attach vm-id /dev/vdd

Currently there is no device named /dev/vdc listed in VM. But I want the volume to be attached as device name vdd which falls out of alphabetical order.

volume-attach command shows me that the volume is mounted as vdd, but when I do lsblk after logging in to VM and check the device name it is listed as vdc.

nova volume-attach <vm-id> <vol-id> /dev/vdd 10
+----------+--------------------------------------+
| Property | Value                                |
+----------+--------------------------------------+
| device   | **/dev/vdd**   /dev/vdd                          |

lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sr0     11:0    1  410K  0 rom
vda    253:0    0   10G  0 disk
└─vda1 253:1    0   10G  0 part /
vdb    253:16   0   20G  0 disk /mnt
***vdc*** vdc    253:32   0   10G  0 disk

It is following the alphabetical order and as devices /dev/vda and /dev/vdb are present, /dev/vdc is being created in VM.

If this is the case what is the use of <device> option in nova volume-attach command? Is this a bug in nova or expected behavior, please throw some light on this.

Thank you.