11.31下更改instance号
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不会发生变化
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
不是很明白,不过还是谢谢分享
学习一下
先学习了,等遇到动手机会的时候,先有思路了,才可以动手。
不错,谢谢分享!
学习了,感谢分享。
有用。
如果双机两边的LUN对应hdisk不一致时,可以这样作。
更改这个有什么用途吗?