UDEV management of RAC shared storage
Background:
Operation system: centos 6.7 Oracle version:11.2.0.1
Operating steps:
1. Ensure that all nodes of RAC cluster has install udev.
[root@11gnode1 ~]# rpm -qa|grep udev
udev-147-2.63.el6.x86_64
2. Obtain UUID of each block device through scsi_id command. Assume that the LUN sdb-sde
already exists on the system.
[root@11gnode1 rules.d]# for i in b c d e ;
> do
> echo “sd$i” “`scsi_id -g -u /dev/sd$i` “;
> done
sdb 36000c2934ddf461ceb40ca28aad861b0
sdc 36000c291d9327fded9572349b484867f
sdd 36000c29b6ed0200b4066a9ecfa4704f4
sde 36000c297890e12b9d2e37430a2fb09f3
3. Create and condfigure UDEV Rules
[root@11gnode1 ~]# cd /etc/udev/rules.d
create 99-oracle-asmdevices.rules
[root@11gnode1 rules.d]# touch /etc/udev/rules.d/99-oracle-asmdevices.rules
[root@11gnode1 rules.d]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL==”sd*”, BUS==”scsi”, PROGRAM==”/sbin/scsi_id –whitelisted –replace-whitespace
–device=/dev/$name”,RESULT==”36000c2934ddf461ceb40ca28aad861b0″, NAME=”vol1″, OWNER=”grid”,
GROUP=”asmadmin”,
MODE=”0660″
KERNEL==”sd*”, BUS==”scsi”, PROGRAM==”/sbin/scsi_id –whitelisted –replace-whitespace
–device=/dev/$name”,RESULT==”36000c291d9327fded9572349b484867f”, NAME=”vol2″, OWNER=”grid”,
GROUP=”asmadmin”,
MODE=”0660″
KERNEL==”sd*”, BUS==”scsi”, PROGRAM==”/sbin/scsi_id –whitelisted –replace-whitespace
–device=/dev/$name”,RESULT==”36000c29b6ed0200b4066a9ecfa4704f4″, NAME=”vol3″, OWNER=”grid”,
GROUP=”asmadmin”,
MODE=”0660″
KERNEL==”sd*”, BUS==”scsi”, PROGRAM==”/sbin/scsi_id –whitelisted –replace-whitespace
–device=/dev/$name”,RESULT==”36000c297890e12b9d2e37430a2fb09f3″, NAME=”vol4″, OWNER=”grid”,
GROUP=”asmadmin”,
MODE=”0660″
4. Duplicate this rules file to other node.
[root@11gnode1 rules.d]# scp 99-oracle-asmdevices.rules 10.100.25.9:/etc/udev/rules.d
[email protected]’s password:
99-oracle-asmdevices.rules 100% 851 0.8KB/s 00:00
5. restart udev service on all ondes
[root@11gnode1 ~]# start_udev
Starting udev: [ OK ]
6. Check permission of all shared devices.
node1:
[root@11gnode1 ~]# ls -l /dev/vol*
brw-rw—-. 1 grid asmadmin 8, 16 Feb 22 00:43 /dev/vol1
brw-rw—-. 1 grid asmadmin 8, 32 Feb 22 00:43 /dev/vol2
brw-rw—-. 1 grid asmadmin 8, 48 Feb 22 00:43 /dev/vol3
brw-rw—-. 1 grid asmadmin 8, 64 Feb 22 00:43 /dev/vol4
node2:
[root@11gnode2 ~]# ls -l /dev/vol*
brw-rw—-. 1 grid asmadmin 8, 16 Feb 22 01:02 /dev/vol1
brw-rw—-. 1 grid asmadmin 8, 32 Feb 22 01:02 /dev/vol2
brw-rw—-. 1 grid asmadmin 8, 48 Feb 22 01:02 /dev/vol3
brw-rw—-. 1 grid asmadmin 8, 64 Feb 22 01:02 /dev/vol4