加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – / dev / disk / by-id / scsi- *指向sdX而不是多路径设

发布时间:2020-12-13 16:47:30 所属栏目:Linux 来源:网络整理
导读:我们有两个类似的SLES10SP2服务器,它们在同一设备上都使用多路径 来自同一存储阵列. 在一台服务器上,/ dev / disk / by-id / scsi- *设备正确指向 多路径设备: server1:/dev/disk/by-id # ls -l scsi-* | awk '{print $9,$10,$11;}'scsi-3600a0b80005047d80
我们有两个类似的SLES10SP2服务器,它们在同一设备上都使用多路径
来自同一存储阵列.

在一台服务器上,/ dev / disk / by-id / scsi- *设备正确指向
多路径设备:

server1:/dev/disk/by-id # ls -l scsi-* | awk '{print $9,$10,$11;}'
scsi-3600a0b80005047d80000050c4933f22c -> ../../dm-1
scsi-3600a0b80005047d80000050c4933f22c-part1 -> ../../dm-2
scsi-3600a0b80005047d80000050c4933f22c-part2 -> ../../dm-3
scsi-3600a0b80005047d80000b0a14dbb20e4 -> ../../dm-0

另一方面,/ dev / disk / by-id / scsi- *磁盘设备指向其中一个
路径而不是multipath dm设备:

server2:/dev/disk/by-id # ls -l scsi-* | awk '{print $9,$11;}'
scsi-3600a0b80005047d80000a3464a07f6ee -> ../../dm-1
scsi-3600a0b8000505008000004f84933e183 -> ../../sda
scsi-3600a0b8000505008000004f84933e183-part1 -> ../../dm-4
scsi-3600a0b8000505008000004f84933e183-part2 -> ../../dm-5
scsi-3600a0b80005050080000057749352a81 -> ../../sdd
scsi-3600a0b80005050080000057749352a81-part1 -> ../../dm-6
scsi-3600a0b80005050080000a7cd4dbb2498 -> ../../sdg

这会导致问题,因为某些磁盘配置为使用整个磁盘
磁盘作为光伏.

我们需要在server2上更改什么才能让系统设置所有scsi- *链接
指向多路径设备而不是单个路径?

解决方法

从 documentation:

In SUSE Linux Enterprise Server 10,
the kpartx software is used in the
/etc/init.d/boot.multipath to add
symlinks to the /dev/dm-* line in the
multipath.conf configuration file for
any newly created partitions without
requiring a reboot. This triggers
udevd to fill in the /dev/disk/by-*
symlinks.

所以,我愿意

>检查是否在第二台服务器上运行了boot.multipath
>检查两台服务器上的udev配置是否相同
>检查第二台服务器上是否正在运行udevd

如果所有这些都成立,您可以尝试在多路径设备上运行kpartx -a,以查看/ dev / disk / by-id /中的条目是否已更新.

在你理顺之后,你仍然需要编辑lvm.conf.再次,从documentation:

By default,LVM2 does not recognize multipathed devices. To make LVM2 recognize the multipathed devices as possible physical volumes,you must modify /etc/lvm/lvm.conf. It is important to modify it so that it does not scan and use the physical paths,but only accesses the multipath I/O storage through the multipath I/O layer. If you are using user-friendly names,make sure to specify the path so that it scans only the device mapper names for the device (/dev/disk/by-id/dm-uuid-.-mpath-.) after multipathing is configured.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读