Linux版本:Redhat7
Oracle Rac:11.2.0.4.0
asm磁盘:仲裁盘3个(/dev/sdb1、/dev/sdc1、/dev/sdd1),数据盘2个(/dev/sde1、/dev/sdf1),如下图:
注:配置磁盘规则文件,需要获取的磁盘的UUID来指定唯一的标记,因为磁盘设备名称重启后可能会改变,如/dev/sdb,重启后可能会变成/dev/sde,但磁盘设备的UUID不会变,所以必须以UUID来配置规则文件,否则服务器重启后asm磁盘组会无法挂载。
/usr/lib/udev/scsi_id -g -u -d /dev/sdb1
/usr/lib/udev/scsi_id -g -u -d /dev/sdc1
/usr/lib/udev/scsi_id -g -u -d /dev/sdd1
/usr/lib/udev/scsi_id -g -u -d /dev/sde1
/usr/lib/udev/scsi_id -g -u -d /dev/sdf1
结果如下:
vi /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="3600140582c778e03dd6408d93a098165", SYMLINK+="asm-ocr1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36001405bba99f395244497cb2003d76e", SYMLINK+="asm-ocr2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="360014054729ae9d30df43948c23e4a1d", SYMLINK+="asm-ocr3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36001405f0ac1305addc4cf798a0099a8", SYMLINK+="asm-data1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="3600140506c4b4d7afd54ca3bb2ac0415", SYMLINK+="asm-data2", OWNER="grid", GROUP="asmadmin", MODE="0660"
/sbin/partprobe /dev/sdb1
/sbin/partprobe /dev/sdc1
/sbin/partprobe /dev/sdd1
/sbin/partprobe /dev/sde1
/sbin/partprobe /dev/sdf1
udevadm test /block/sdb/sdb1
udevadm test /block/sdc/sdc1
udevadm test /block/sdd/sdd1
udevadm test /block/sde/sde1
udevadm test /block/sde/sdf1
udevadm control --reload-rules
[root@rac01 ~]# ll /dev/asm*
lrwxrwxrwx 1 root root 4 Apr 15 10:00 /dev/asm-data1 -> sde1
lrwxrwxrwx 1 root root 4 Apr 15 10:01 /dev/asm-data2 -> sdf1
lrwxrwxrwx 1 root root 4 Apr 13 19:35 /dev/asm-ocr1 -> sdb1
lrwxrwxrwx 1 root root 4 Apr 13 19:29 /dev/asm-ocr2 -> sdc1
lrwxrwxrwx 1 root root 4 Apr 13 19:29 /dev/asm-ocr3 -> sdd1
[root@rac01 ~]# ll /dev/sd*
brw-rw---- 1 root disk 8, 0 Apr 13 19:27 /dev/sda
brw-rw---- 1 root disk 8, 1 Apr 13 19:27 /dev/sda1
brw-rw---- 1 root disk 8, 2 Apr 13 19:27 /dev/sda2
brw-rw---- 1 root disk 8, 16 Apr 13 19:28 /dev/sdb
brw-rw---- 1 grid asmadmin 8, 17 Apr 15 10:51 /dev/sdb1
brw-rw---- 1 root disk 8, 32 Apr 13 19:28 /dev/sdc
brw-rw---- 1 grid asmadmin 8, 33 Apr 15 10:51 /dev/sdc1
brw-rw---- 1 root disk 8, 48 Apr 13 19:28 /dev/sdd
brw-rw---- 1 grid asmadmin 8, 49 Apr 15 10:51 /dev/sdd1
brw-rw---- 1 root disk 8, 64 Apr 13 19:28 /dev/sde
brw-rw---- 1 grid asmadmin 8, 65 Apr 15 10:48 /dev/sde1
brw-rw---- 1 root disk 8, 80 Apr 13 19:28 /dev/sdf
brw-rw---- 1 grid asmadmin 8, 81 Apr 15 10:33 /dev/sdf1