在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不会发生变化