Wednesday, July 31, 2019

Udev rules - SYMLINK - Device Persistence - Oracle ASM - Linux

Note : This is just an example for one of the disk


1) Present Raw disks

2) How to get scsi id

/lib/udev/scsi_id -g -u -d /dev/sda

3600224800cbc991b76c2a957f833fc66

3) Update /etc/udev/rules.d/99-asm.rules

KERNEL=="sd*",SUBSYSTEM=="block",ENV{DEVTYPE}=="disk",ENV{ID_SERIAL}=="3600224800cbc991b76c2a957f833fc66",SYMLINK+="asmdatadisk1",OWNER="grid",GROUP="asmadmin",MODE="0660"

###Below might not work for cloud DB's

#ACTION=="add|change", ENV{ID_SCSI_SERIAL}=="3600224800cbc991b76c2a957f833fc66", SYMLINK+="asmdatadisk1",  OWNER="grid", GROUP="asmadmin", MODE="0660"

4) Reload udev rules without reboot

udevadm control --reload-rules && udevadm trigger