[root@testrac1 scsi_host]# multipath -l
data5 (3600a098038303742695d4933306e7a51) dm-11 NETAPP,LUN C-Mode
size=500G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=0 status=active
| |- 3:0:2:9 sdcb 68:240 active undef running
| |- 3:0:3:9 sdcc 69:0 active undef running
| |- 1:0:2:9 sdbx 68:176 active undef running
| `- 1:0:3:9 sdby 68:192 active undef running
`-+- policy='round-robin 0' prio=0 status=enabled
|- 3:0:1:9 sdca 68:224 active undef running
|- 1:0:0:9 sdbv 68:144 active undef running
|- 1:0:1:9 sdbw 68:160 active undef running
`- 3:0:0:9 sdbz 68:208 active undef running
data4 (3600a098038303742665d49316b783333) dm-8 NETAPP,LUN C-Mode
size=500G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=0 status=active
| |- 3:0:0:6 sdn 8:208 active undef running
| |- 1:0:0:6 sdo 8:224 active undef running
| |- 3:0:1:6 sdaf 65:240 active undef running
| `- 1:0:1:6 sdag 66:0 active undef running
`-+- policy='round-robin 0' prio=0 status=enabled
|- 1:0:3:6 sdba 67:64 active undef running
|- 1:0:2:6 sdar 66:176 active undef running
|- 3:0:2:6 sdbj 67:208 active undef running
`- 3:0:3:6 sdbs 68:96 active undef running
可以查看到刚才添加的data5正常状态
--编辑udev
[root@testrac1 rules.d]# pwd
/etc/udev/rules.d
[root@testrac1 rules.d]# ls -a
. 60-pcmcia.rules 90-hal.rules 99-fuse.rules
.. 60-raw.rules 97-bluetooth-serial.rules
60-fprint-autosuspend.rules 70-persistent-cd.rules 98-kexec.rules
60-openct.rules 90-alsa.rules 99-asm-multipath.rules
我们使用的是99-asm-multipath.rules
[root@testrac1 rules.d]# vi 99-asm-multipath.rules
.........................
ENV{DM_NAME}=="data5", OWNER:="grid", GROUP:="oinstall", MODE:="660", SYMLINK+="iscsi/oraasm-$env{DM_NAME}"
ENV{DM_NAME}=="data4", OWNER:="grid", GROUP:="oinstall", MODE:="660", SYMLINK+="iscsi/oraasm-$env{DM_NAME}"
把data5添加进去,如上图所示,以上步骤两个节点均要执行
重启udev
[root@testrac1 etc]# start_udev
Starting udev: [ OK ]
两个节点均要执行
--检查磁盘权限
[root@testrac1 mapper]# pwd
/dev/mapper
[root@testrac1 mapper]# ls -lrt
total 0
crw-rw---- 1 root root 10, 236 Jan 11 17:34 control
lrwxrwxrwx 1 root root 8 Jan 11 17:34 reco1 -> ../dm-10
lrwxrwxrwx 1 root root 7 Jan 11 17:34 redo1 -> ../dm-9
lrwxrwxrwx 1 root root 7 Jan 11 17:34 ocrdisk3 -> ../dm-2
lrwxrwxrwx 1 root root 7 Jan 11 17:34 ocrdisk1 -> ../dm-4
lrwxrwxrwx 1 root root 7 Jan 11 17:34 data1 -> ../dm-5
lrwxrwxrwx 1 root root 7 Jan 11 17:34 VolGroup-lv_swap -> ../dm-1
lrwxrwxrwx 1 root root 7 Jan 11 17:34 VolGroup-lv_root -> ../dm-0
lrwxrwxrwx 1 root root 7 Jan 11 17:34 ocrdisk2 -> ../dm-3
lrwxrwxrwx 1 root root 7 Jan 11 17:34 data2 -> ../dm-6
lrwxrwxrwx 1 root root 7 Jan 11 17:35 data3 -> ../dm-7
lrwxrwxrwx 1 root root 8 Jan 11 17:35 data5 -> ../dm-11
lrwxrwxrwx 1 root root 7 Jan 11 17:35 data4 -> ../dm-8
data5对应的是/dm-11,检查权限
[root@testrac1 dev]# ls -lrt | grep dm
brw-rw---- 1 root disk 8, 192 Jan 11 17:34 sdm
crw-rw---- 1 root root 1, 12 Jan 11 17:34 oldmem
crw-rw---- 1 root root 10, 62 Jan 11 17:34 cpu_dma_latency
brw-rw---- 1 root disk 252, 1 Jan 11 17:34 dm-1
lrwxrwxrwx 1 root root 4 Jan 11 17:34 root -> dm-0
brw-rw---- 1 root disk 252, 0 Jan 11 17:34 dm-0
brw-rw---- 1 grid oinstall 252, 5 Jan 11 17:36 dm-5
brw-rw---- 1 grid oinstall 252, 11 Jan 11 17:36 dm-11
brw-rw---- 1 grid oinstall 252, 4 Jan 11 17:36 dm-4
brw-rw---- 1 grid oinstall 252, 3 Jan 11 17:36 dm-3
brw-rw---- 1 grid oinstall 252, 2 Jan 11 17:36 dm-2
brw-rw---- 1 grid oinstall 252, 10 Jan 11 17:36 dm-10
brw-rw---- 1 grid oinstall 252, 8 Jan 11 17:36 dm-8
brw-rw---- 1 grid oinstall 252, 7 Jan 11 17:36 dm-7
brw-rw---- 1 grid oinstall 252, 6 Jan 11 17:36 dm-6
brw-rw---- 1 grid oinstall 252, 9 Jan 11 17:36 dm-9
可以看到dm-11的权限已经授予了grid:oinstall
注意,两个节点都要进行检查,确保权限是正确的,否则添加磁盘会报错
--扩充dg
SQL> select name,path from v$asm_disk;