HP-UX 識別儲存碟符不一致解決辦法(轉)

db_wjw發表於2012-06-10
在HP-UX上安裝RAC或者配置雙機時經常會遇到碟符不一致的情況,下面是從網上搜到的帖子,根據其修改可以修改碟符及instance number。
1.可以在2臺主機上通過scsimgr -p get_attr all_lun -a hw_path -a device_file -a wwid來檢視wwn,wwn一致的為同一個盤,也可以通過它與儲存劃得每個lun對應起來
2.通過ioinit來修改,具體過程如下:

備份先:備份ioconfig及ioscan的輸出

更改過程
# ioscan –funNCdisk

Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE HP 300 GMBA3300NC
/dev/disk/disk3 /dev/disk/disk3_p2 /dev/rdisk/disk3 /dev/rdisk/disk3_p2
/dev/disk/disk3_p1 /dev/disk/disk3_p3 /dev/rdisk/disk3_p1 /dev/rdisk/disk3_p3
disk 4 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HL-DT-STDVD-RAM GH40L
/dev/disk/disk4 /dev/rdisk/disk4
disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE HP 300 GMBA3300NC
/dev/disk/disk5 /dev/rdisk/disk5
disk 12 64000/0xfa00/0x6 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk12 /dev/rdisk/disk12
disk 13 64000/0xfa00/0x7 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk13 /dev/rdisk/disk13
disk 14 64000/0xfa00/0x8 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk14 /dev/rdisk/disk14
disk 15 64000/0xfa00/0x9 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk15 /dev/rdisk/disk15
disk 16 64000/0xfa00/0xa esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk16 /dev/rdisk/disk16
disk 17 64000/0xfa00/0xb esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk17 /dev/rdisk/disk17
現在要將disk17改為disk28,因為我僅僅是要修改一個disk,所以就直接vi一個infile檔案,如果disk比較多,ioscan加awk來做
#cat infile
64000/0xfa00/0xb disk 28
這裡的64000/0xfa00/0xb是ioscan裡面的disk17的H/W Path
# ioinit -f infile
# ioscan -funNCdisk
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE HP 300 GMBA3300NC
/dev/disk/disk3 /dev/disk/disk3_p2 /dev/rdisk/disk3 /dev/rdisk/disk3_p2
/dev/disk/disk3_p1 /dev/disk/disk3_p3 /dev/rdisk/disk3_p1 /dev/rdisk/disk3_p3
disk 4 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HL-DT-STDVD-RAM GH40L
/dev/disk/disk4 /dev/rdisk/disk4
disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE HP 300 GMBA3300NC
/dev/disk/disk5 /dev/rdisk/disk5
disk 12 64000/0xfa00/0x6 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk12 /dev/rdisk/disk12
disk 13 64000/0xfa00/0x7 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk13 /dev/rdisk/disk13
disk 14 64000/0xfa00/0x8 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk14 /dev/rdisk/disk14
disk 15 64000/0xfa00/0x9 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk15 /dev/rdisk/disk15
disk 16 64000/0xfa00/0xa esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk16 /dev/rdisk/disk16
disk 28 64000/0xfa00/0xb esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk17 /dev/disk/disk28 /dev/rdisk/disk17 /dev/rdisk/disk28
# rmsf /dev/disk/disk17
# rmsf /dev/rdisk/disk17

# ioscan -funNCdisk
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 3 64000/0xfa00/0x0 esdisk CLAIMED DEVICE HP 300 GMBA3300NC
/dev/disk/disk3 /dev/disk/disk3_p2 /dev/rdisk/disk3 /dev/rdisk/disk3_p2
/dev/disk/disk3_p1 /dev/disk/disk3_p3 /dev/rdisk/disk3_p1 /dev/rdisk/disk3_p3
disk 4 64000/0xfa00/0x1 esdisk CLAIMED DEVICE HL-DT-STDVD-RAM GH40L
/dev/disk/disk4 /dev/rdisk/disk4
disk 5 64000/0xfa00/0x2 esdisk CLAIMED DEVICE HP 300 GMBA3300NC
/dev/disk/disk5 /dev/rdisk/disk5
disk 12 64000/0xfa00/0x6 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk12 /dev/rdisk/disk12
disk 13 64000/0xfa00/0x7 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk13 /dev/rdisk/disk13
disk 14 64000/0xfa00/0x8 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk14 /dev/rdisk/disk14
disk 15 64000/0xfa00/0x9 esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk15 /dev/rdisk/disk15
disk 16 64000/0xfa00/0xa esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk16 /dev/rdisk/disk16
disk 28 64000/0xfa00/0xb esdisk CLAIMED DEVICE HP EF0300FATFD
/dev/disk/disk28 /dev/rdisk/disk28

主機重啟後disk instance number不會發生變化

原文地址:http://bbs.chinaunix.net/thread-1754361-1-1.html

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26194851/viewspace-732384/,如需轉載,請註明出處,否則將追究法律責任。

相關文章