2

I am provisioning a Nova server and Cinder volumes using a Heat template.

In order to identify the Cinder volumes attached to my OpenStack server I would like to use the /dev/disk/by-id/... symlinks provided by udev. Unfortunately, these seem to be unreliable. I have the following devices attached to the system:

# find -H /sys/class/block/* -name serial | while read x; do dev=${x%/*}; echo "$dev: $(cat $x)"; done
/sys/class/block/vda: 
/sys/class/block/vdb: f78447c1-8da2-4a68-b
/sys/class/block/vdc: d85a0192-37cf-46f3-8

So there should be symlinks in /dev/disk/by-id for both vdb and vdc. However:

# ls -l /dev/disk/by-id
total 0
lrwxrwxrwx. 1 root root  9 Oct 11 16:44 virtio-d85a0192-37cf-46f3-8 -> ../../vdc

If I run udevadm trigger, the device appears:

# ls -l /dev/disk/by-id
total 0
lrwxrwxrwx. 1 root root  9 Oct 11 17:55 virtio-d85a0192-37cf-46f3-8 -> ../../vdc
lrwxrwxrwx. 1 root root  9 Oct 11 17:55 virtio-f78447c1-8da2-4a68-b -> ../../vdb

But I would like the device to appear reliably on boot. Has anyone seen this behavior before?

larsks
  • 47,453

0 Answers0