11.31下更改instance号

发布于 2022-09-03 21:10:15 字数 4396 浏览 16 评论 8

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

孤星 2022-09-10 16:10:57

不是很明白,不过还是谢谢分享

镜花水月 2022-09-10 15:51:53

学习一下

沫雨熙 2022-09-10 15:23:59

余罪 2022-09-10 14:56:53

先学习了,等遇到动手机会的时候,先有思路了,才可以动手。

吃兔兔 2022-09-10 13:19:13

不错,谢谢分享!

2022-09-08 11:01:26

学习了,感谢分享。

歌枕肩 2022-09-06 07:20:15

有用。
如果双机两边的LUN对应hdisk不一致时,可以这样作。

江湖彼岸 2022-09-04 05:08:22

更改这个有什么用途吗?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文