Problem to retrieve a disk UUID for RHEV 3.2 guests

Latest response

Hi,

I have few  disks attached to my RHEV 3.2 guest  and want  to configure a custom udev rules to manage these  disks  names .In order to proceed with this a  UUID disk's  is required . scsi_id doesn't provide any output .

# cat  /etc/scsi_id.config

options=-g

 

# scsi_id --whitelisted --replace-whitespace --device=/dev/vd*

Regards,

/Vlad.

Responses

May confirm the following solution  . At present I found that the only way to get a device UUID is to take the /dev/disk/by-id/ :

# ls -lR /dev/disk/by-id/ | grep vdb

lrwxrwxrwx 1 root root  9 Jun 25 16:39 virtio-5c0e76af-7681-46b2-b -> ../../vdb

And use   this output ( via simple script ) to write  udev rule like below  :

# cat  /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="vd*", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="5c0e76af-7681-46b2-b", NAME+="oracleasm/CRS1", OWNER="oracle", GROUP="dba", MODE="0660"

#/sbin/udevadm control --reload-rules

#/sbin/udevadm trigger --type=devices

As a result we have a new device :

# ls -l /dev/oracleasm/CRS1
brw-rw---- 1  252, 32 Jun 25 16:39 /dev/oracleasm/CRS1

 

/Vlad

Hi Vlad,

Thanks for following up. Just to confirm - you've resolved this issue now?

Hi .

Yes , after the steps above we succeeded to installe Oracle RAC . Original /dev/vdb,c,d disk were converted into a custom ones like :

[root@RH6RAC2 ~]# ls -lR /dev/disk/by-id/
/dev/disk/by-id/:
total 0
....
lrwxrwxrwx 1 root root 18 Jul 11 15:26 virtio-40d50da3-e2e2-4f16-9 -> ../../asm/ORABACK1
lrwxrwxrwx 1 root root 14 Jul 11 15:26 virtio-5c0e76af-7681-46b2-b -> ../../asm/CRS1
lrwxrwxrwx 1 root root 18 Jul 16 10:38 virtio-63a5887e-5b49-4f87-b -> ../../asm/ORADATA1

/Vlad.

Great! Thanks.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.