我们知道在SAN网络中,由于光纤交换机会有多条链路接入主机,所以会存在设备多名称现象,也就是一台存储被识别多次,具体根据连接的链路情况,并且对于连接到的LUN在主机上的LINUX系统上会发生/dev/sd*每次重启动设备名变化的问题,所以对于此问题,我们可以采取两种方式,一是高版本的linux可以通过udev来配置,将LUN设备号固定下来,二是采用第三方的动态多路径软件配置多路径聚合,从而固定盘符名称,在此主要是对powerpath动态多路径软件配置存在的问题做以说明。
在powerpath配置安装成功可能会存在这个问题,也就是两台主机识别到的伪设备名称对应的LUN不一致,例如如下所示:
在主机DBTEST1上获取的信息如下:
DBTest1:/home/oracle # powermt display dev=all
Pseudo name=emcpowerb
CLARiiON ID=FCNCX093300010 [Storage Group 2]
Logical device ID=600601601EA02500326149A0207AE111 [LUN 10]
state=alive; policy=BasicFailover; priority=0; queued-IOs=0;
Owner: default=SP A, current=SP A Array failover mode: 1
==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 qla2xxx sde SP B1 unlic alive 0 0
0 qla2xxx sdj SP A1 unlic alive 0 0
1 qla2xxx sdk SP B0 active alive 0 0
1 qla2xxx sdo SP A0 active alive 0 0
Pseudo name=emcpowera
CLARiiON ID=FCNCX093300010 [Storage Group 2]
Logical device ID=600601601EA02500F22E8FC2207AE111 [LUN 11]
state=alive; policy=BasicFailover; priority=0; queued-IOs=0;
Owner: default=SP A, current=SP A Array failover mode: 1
==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 qla2xxx sdg SP B1 unlic alive 0 0
0 qla2xxx sdl SP A1 unlic alive 0 0
1 qla2xxx sdm SP B0 active alive 0 0
1 qla2xxx sdp SP A0 active alive 0 0
Pseudo name=emcpowerc
CLARiiON ID=FCNCX093300010 [Storage Group 2]
Logical device ID=600601601EA02500FA322E81207AE111 [LUN 1]
state=alive; policy=BasicFailover; priority=0; queued-IOs=0;
Owner: default=SP A, current=SP A Array failover mode: 1
==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 qla2xxx sdc SP B1 unlic alive 0 0
0 qla2xxx sdh SP A1 unlic alive 0 0
1 qla2xxx sdi SP B0 active alive 0 0
1 qla2xxx sdn SP A0 active alive 0 0
而在主机DBTEST2上识别的信息如下:
DBTest2:~ # powermt display dev=all
Pseudo name=emcpowera
CLARiiON ID=FCNCX093300010 [Storage Group 2]
Logical device ID=600601601EA02500326149A0207AE111 [LUN 10]
state=alive; policy=BasicFailover; priority=0; queued-IOs=0;
Owner: default=SP A, current=SP A Array failover mode: 1
==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 qla2xxx sde SP B1 active alive 0 0
0 qla2xxx sdk SP A1 active alive 0 0
Pseudo name=emcpowerb
CLARiiON ID=FCNCX093300010 [Storage Group 2]
Logical device ID=600601601EA02500F22E8FC2207AE111 [LUN 11]
state=alive; policy=BasicFailover; priority=0; queued-IOs=0;
Owner: default=SP A, current=SP A Array failover mode: 1
==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 qla2xxx www.2cto.com sdg SP B1 active alive 0 0
0 qla2xxx sdl SP A1 active alive 0 0
Pseudo name=emcpowerc
CLARiiON ID=FCNCX093300010 [Storage Group 2]
Logical device ID=600601601EA02500FA322E81207AE111 [LUN 1]
state=alive; policy=BasicFailover; priority=0; queued-IOs=0;
Owner: default=SP A, current=SP A Array failover mode: 1
==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 qla2xxx sdc SP B1 active alive 0 0
0 qla2xxx sdi SP A1 active alive 0 0
如上红色字体显示的,我们可以清楚的看到对于两台主机LUN对应的情况如下:
DBTEST1 DBTEST2
/dev/emcpowera /dev/emcpowerb
/dev/emcpowerb /dev/emcpowera
/dev/emcpowerc /dev/emcpowerc
本次由于安装RAC,根据规划,emcpowerb和emcpowerc分别为OCR disk和voting disk, 而emcpowera为datadg磁盘组 www.2cto.com
对于如问题我们可以处理的思路如下:
1.采用powerpath软件的管理命令可以将其伪设备名称修改为一致,具体可以参照DBTEST1的名称,在DBTEST2上做如下修改:
#emcpadm renamepseudo �Cs emcpowera �Ct emcpowerd
#emcpadm renamepseudo �Cs emcpowerb �Ct emcpowera
#emcpadm renamepseudo �Cs emcpowerd �Ct emcpowerb
更新配置后,重启下主机看看两端是否还能保持一致。
2.另外我们还可以采用如下方法,也就是保持伪设备名称不变,采用块设备,只需要绑定的raw设备一致即可
DBTEST1 DBTEST2
/dev/raw/raw3 /dev/emcpowera /dev/emcpowerb
/dev/raw/raw2 /dev/emcpowerb /dev/emcpowera
/dev/raw/raw1 /dev/emcpowerc /dev/emcpowerc
这样在RAC安装过程中只需要在各主机对应raw设备名称就可以了。