The Goal
How to setup UDEV rules RAC OCR and Voting Devices on different partitions, rather than a raw disk. Let’s assume that the disk is sdb, which have 3 partitions:
sbd1 sbd2 sdb3
It also applies to partitions over different hard disk.
The Solution
1. Find the WWID of the disk:
# /sbin/scsi_id -g -u -s /block/sdb SATA_VBOX_HARDDISK_VBbb8af1a8-4d4db09b_
Here we got an WWID of ‘SATA_VBOX_HARDDISK_VBbb8af1a8-4d4db09b_‘.
2. Create an custom UDEV rule:
Create a new rule under /etc/udev/rules.d/, for example, /etc/udev/rules.d/99-oracle.rules. Ensure the file name lists after the default 50-xxx.rules file. The filename must end in “.rules” to be recognized.
KERNEL=="sd*1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/%P", RESULT=="SATA_VBOX_HARDDISK_VBbb8af1a8-4d4db09b_", RUN+="/bin/raw /dev/raw/raw1 %N" KERNEL=="sd*2", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/%P", RESULT=="SATA_VBOX_HARDDISK_VBbb8af1a8-4d4db09b_", RUN+="/bin/raw /dev/raw/raw2 %N" KERNEL=="sd*3", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/%P", RESULT=="SATA_VBOX_HARDDISK_VBbb8af1a8-4d4db09b_", RUN+="/bin/raw /dev/raw/raw3 %N" ACTION=="add", KERNEL=="raw*", OWNER="oracle", GROUP="oinstall", MODE="0664"
The RESULT filed was the WWID of your hard disk found in step 1. Please also subsititue the value of ‘OWNER‘, ‘GROUP‘, and ‘MODE‘ to your actual one.
3. Restart the UDEV service :
# /sbin/start_udev
And then, you are free to use /dev/raw/raw1, /dev/raw/raw2, and /dev/raw/raw3 as your RAC OCR and Voting Devices.