在一般的 Virtual Machine 都會在 /dev/disk/by-id 替 disk 產生一個 UUID link 到實際硬碟位置 (sda、sda1、sdb ... etc)
$ ls -l /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root 9 Jan 2 00:33 ata-u02-Ubuntu-0_SSD_H27AXNE0H76MV18T13AG -> ../../sda
lrwxrwxrwx 1 root root 10 Jan 2 00:33 ata-u02-Ubuntu-0_SSD_H27AXNE0H76MV18T13AG-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jan 2 00:33 ata-u02-Ubuntu-0_SSD_H27AXNE0H76MV18T13AG-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jan 2 00:33 ata-u02-Ubuntu-0_SSD_H27AXNE0H76MV18T13AG-part5 -> ../../sda5
..
..
etc
但是在 OpenStack 在新增 disk 的時候就會自動生成 UUID 了,所以不會在 /dev/disk/by-id 裡面產生 UUID link,這個在 Cinder bugs 有提到是 VMWare 的 default 設定
The work around given is to set disk.EnableUUID to True for the Linux VM. In case of Openstack volumes, as the uuid of virtual disk/VMDK disk is autogenerated, if user tries to enable this property the /dev/disk/by-id shows the autogenerated uuids for the VMDK disks. Due to this the user/application has no means to identify the Openstack volume. Instead if the uuid of VMDK disk is same as the Openstack volume ID, it helps in identifying the Openstack created volumes.
但是他也可以透過修改 vmx 啟動啦,不過通常沒有這個必要。
disk.EnableUUID = True
參考資料:
Cinder VMDK driver : uuid of VMDK disk file needs to be the same as of corresponding Cinder volume ID
Orignal From: 了解為何 OpenStack 為何沒有 disk by-id
沒有留言:
張貼留言