vmware上的Linux获取uuid

在挂载asm硬盘时需要硬盘的UUID

虚拟机配置中需要增加对UUID的支持。

在配置文件vmx文件中增加如下内容

disk.locking="FALSE"
disk.EnableUUID = "TRUE"
diskLib.dataCacheMaxSize="0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.dataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"
usb:0.present = "TRUE"
usb:0.deviceType = "hid"
usb:0.port = "0"
usb:0.parent = "-1"

查看时使用block路径查看

[root@rhvm1 ~]# scsi_id -g -u -s /block/sdc

或者使用ls -al

[root@rhvm1 ~]# ls -la /dev/disk/by-id
total 0
drwxr-xr-x 2 root root 260 May 21 05:55 .
drwxr-xr-x 6 root root 120 May 21 05:55 ..
lrwxrwxrwx 1 root root 9 May 21 05:55 scsi-36000c293671f4e12f602fefe10858a1a -> ../../sda
lrwxrwxrwx 1 root root 10 May 21 05:55 scsi-36000c293671f4e12f602fefe10858a1a-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 May 21 05:55 scsi-36000c293671f4e12f602fefe10858a1a-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 May 21 05:55 scsi-36000c293671f4e12f602fefe10858a1a-part3 -> ../../sda3
lrwxrwxrwx 1 root root 9 May 21 05:55 scsi-36000c295584d9e9d7e1fe5173d94a186 -> ../../sdb
lrwxrwxrwx 1 root root 10 May 21 05:55 scsi-36000c295584d9e9d7e1fe5173d94a186-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 May 21 05:55 scsi-36000c2991011d35c11fcd81090556fa5 -> ../../sdc
lrwxrwxrwx 1 root root 10 May 21 05:55 scsi-36000c2991011d35c11fcd81090556fa5-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 9 May 21 05:55 scsi-36000c29a5c252e641da274f4ee3e25ea -> ../../sdf
lrwxrwxrwx 1 root root 9 May 21 05:55 scsi-36000c29b72dc0feff86270a348306102 -> ../../sdd
lrwxrwxrwx 1 root root 9 May 21 05:55 scsi-36000c29efb3a6d60d412b54592284454 -> ../../sde
上一篇:高斯消元模板!!!bzoj1013


下一篇:使用UML进行项目开发