[root@oradb27 ~]# ls -lh /dev/sd*
brw-r----- 1 root disk 8, 0 Jan 2 22:40 /dev/sda
brw-r----- 1 root disk 8, 16 Jan 2 22:40 /dev/sdb
brw-r----- 1 root disk 8, 32 Jan 2 22:40 /dev/sdc
brw-r----- 1 root disk 8, 48 Jan 2 22:40 /dev/sdd
brw-r----- 1 root disk 8, 64 Jan 2 22:40 /dev/sde
brw-r----- 1 root disk 8, 80 Jan 2 22:40 /dev/sdf
brw-r----- 1 root disk 8, 96 Jan 2 22:40 /dev/sdg
brw-r----- 1 root disk 8, 112 Jan 2 22:40 /dev/sdh
brw-r----- 1 root disk 8, 128 Jan 2 22:40 /dev/sdi
brw-r----- 1 root disk 8, 144 Jan 2 22:40 /dev/sdj
[root@oradb28 ~]# ls -lh /dev/sd*
brw-r----- 1 root disk 8, 0 Jan 2 22:41 /dev/sda
brw-r----- 1 root disk 8, 16 Jan 2 22:41 /dev/sdb
brw-r----- 1 root disk 8, 32 Jan 2 22:41 /dev/sdc
brw-r----- 1 root disk 8, 48 Jan 2 22:41 /dev/sdd
brw-r----- 1 root disk 8, 64 Jan 2 22:41 /dev/sde
brw-r----- 1 root disk 8, 80 Jan 2 22:41 /dev/sdf
brw-r----- 1 root disk 8, 96 Jan 2 22:41 /dev/sdg
brw-r----- 1 root disk 8, 112 Jan 2 22:41 /dev/sdh
brw-r----- 1 root disk 8, 128 Jan 2 22:41 /dev/sdi
brw-r----- 1 root disk 8, 144 Jan 2 22:41 /dev/sdj
其中sda,sdb,sdc,sdd,sde是100M大小的LUN,我们分别将这5个LUN各分成一个区(我实验中发现如果不分区直接绑成裸设备,在安装clusterware后执行root.sh时会报错:“Failed to upgrade Oracle Cluster Registry configuration”,分区后绑定分区成裸设备,发现可以正常执行通过)
[root@oradb27 ~]# ls -lh /dev/sd*
brw-r----- 1 root disk 8, 0 Jan 3 09:36 /dev/sda
brw-r----- 1 root disk 8, 1 Jan 3 09:36 /dev/sda1
brw-r----- 1 root disk 8, 16 Jan 3 09:36 /dev/sdb
brw-r----- 1 root disk 8, 17 Jan 3 09:36 /dev/sdb1
brw-r----- 1 root disk 8, 32 Jan 3 09:36 /dev/sdc
brw-r----- 1 root disk 8, 33 Jan 3 09:36 /dev/sdc1
brw-r----- 1 root disk 8, 48 Jan 3 09:36 /dev/sdd
brw-r----- 1 root disk 8, 49 Jan 3 09:36 /dev/sdd1
brw-r----- 1 root disk 8, 64 Jan 3 09:36 /dev/sde
brw-r----- 1 root disk 8, 65 Jan 3 09:36 /dev/sde1
[root@oradb28 crshome_1]# ls -lh /dev/sd*
brw-r----- 1 root disk 8, 0 Jan 3 09:36 /dev/sda
brw-r----- 1 root disk 8, 1 Jan 3 09:36 /dev/sda1
brw-r----- 1 root disk 8, 16 Jan 3 09:36 /dev/sdb
brw-r----- 1 root disk 8, 17 Jan 3 09:36 /dev/sdb1
brw-r----- 1 root disk 8, 32 Jan 3 09:36 /dev/sdc
brw-r----- 1 root disk 8, 33 Jan 3 09:36 /dev/sdc1
brw-r----- 1 root disk 8, 48 Jan 3 09:36 /dev/sdd
brw-r----- 1 root disk 8, 49 Jan 3 09:36 /dev/sdd1
brw-r----- 1 root disk 8, 64 Jan 3 09:36 /dev/sde
brw-r----- 1 root disk 8, 65 Jan 3 09:36 /dev/sde1
for i in f g h i j;
do
echo "KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="`scsi_id -g -u -s /block/sd$i`", NAME="asm-disk$i", OWNER="oracle", GROUP="oinstall", MODE="0660""
done
操作过程如下:
[root@oradb27 rules.d]# for i in f g h i j;
> do
> echo "KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="`scsi_id -g -u -s /block/sd$i`", NAME="asm-disk$i", OWNER="oracle", GROUP="oinstall", MODE="0660""
> done
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="14f504e46494c455279366c36366a2d5a4243752d58394a33", NAME="asm-diskf", OWNER="oracle", GROUP="oinstall", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="14f504e46494c45525453586652542d67786f682d594c4a66", NAME="asm-diskg", OWNER="oracle", GROUP="oinstall", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="14f504e46494c455232586c3151572d62504e412d3343547a", NAME="asm-diskh", OWNER="oracle", GROUP="oinstall", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="14f504e46494c45527061334151682d4666656d2d5a6a4c67", NAME="asm-diski", OWNER="oracle", GROUP="oinstall", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="14f504e46494c4552495649757a352d675251532d47744353", NAME="asm-diskj", OWNER="oracle", GROUP="oinstall", MODE="0660"
[root@oradb27 rules.d]#
vi
[root@oradb27 rules.d]# vi 99-oracle-asmdevices.rules
[root@oradb27 rules.d]# start_udev
Starting udev: [ OK ]
[root@oradb27 rules.d]# ls -lh /dev/asm*
brw-rw---- 1 oracle oinstall 8, 80 Jan 2 23:18 /dev/asm-diskf
brw-rw---- 1 oracle oinstall 8, 96 Jan 2 23:18 /dev/asm-diskg
brw-rw---- 1 oracle oinstall 8, 112 Jan 2 23:18 /dev/asm-diskh
brw-rw---- 1 oracle oinstall 8, 128 Jan 2 23:18 /dev/asm-diski
brw-rw---- 1 oracle oinstall 8, 144 Jan 2 23:18 /dev/asm-diskj
#拷贝配置文件99-oracle-asmdevices.rules到节点2,启动start_udev
[root@oradb27 rules.d]# scp 99-oracle-asmdevices.rules oradb28:/etc/udev/rules.d/99-oracle-asmdevices.rules
[root@oradb28 ~]# start_udev
Starting udev: [ OK ]
[root@oradb28 ~]# ls -l /dev/asm*
brw-rw---- 1 oracle oinstall 8, 80 Jan 2 23:20 /dev/asm-diskf
brw-rw---- 1 oracle oinstall 8, 96 Jan 2 23:20 /dev/asm-diskg
brw-rw---- 1 oracle oinstall 8, 112 Jan 2 23:20 /dev/asm-diskh
brw-rw---- 1 oracle oinstall 8, 128 Jan 2 23:20 /dev/asm-diski
brw-rw---- 1 oracle oinstall 8, 144 Jan 2 23:20 /dev/asm-diskj
2.3 配置/etc/hosts
按照规划配置节点1的/etc/hosts内容
#public ip
192.168.1.27 oradb27
192.168.1.28 oradb28
#private ip
10.10.10.27 oradb27-priv
10.10.10.28 oradb28-priv
#virtual ip
192.168.1.57 oradb27-vip
192.168.1.58 oradb28-vip