我們知道在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 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磁盤組
對於如問題我們可以處理的思路如下:
1.采用powerpath軟件的管理命令可以將其偽設備名稱修改為一致,具體可以參照DBTEST1的名稱,在DBTEST2上做如下修改:
#emcpadm renamepseudo –s emcpowera –t emcpowerd
#emcpadm renamepseudo –s emcpowerb –t emcpowera
#emcpadm renamepseudo –s emcpowerd –t 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設備名稱就可以了。