3.2. 在生成多路径设备时忽略逻辑磁盘


Some machines have local SCSI cards for their internal disks. DM Multipath is not recommended for these devices. If you set the find_multipaths configuration parameter to yes, you should not have to blacklist these devices. For information on the find_multipaths configuration parameter, see 第 4.3 节 “配置文件默认设置”.
If you do not set the find_multipaths configuration parameter to yes, can use the following procedure to modify the multipath configuration file to ignore the local disks when configuring multipath.
  1. 确定哪些磁盘是内部磁盘并将其列入黑名单。
    In this example, /dev/sda is the internal disk. Note that as originally configured in the default multipath configuration file, executing the multipath -v2 command shows the local disk, /dev/sda, in the multipath map.
    This examples specifies the -d option of the multipath command to indicate that this is a dry run that will not create the multipath devices. For further information on the multipath command output, see 第 5.7 节 “Multipath Command Output”.
    # multipath -v2 -d
    : SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1 undef WINSYS,SF2372
    size=33 GB features="0" hwhandler="0" wp=undef
    `-+- policy='round-robin 0' prio=1 status=undef
      |- 0:0:0:0 sda 8:0  [--------- 
    
    : 3600a0b80001327d80000006d43621677 undef WINSYS,SF2372
    size=12G features='0' hwhandler='0' wp=undef
    `-+- policy='round-robin 0' prio=1 status=undef
      |- 2:0:0:0 sdb 8:16  undef ready  running
      `- 3:0:0:0 sdf 8:80 undef ready  running
    
    : 3600a0b80001327510000009a436215ec undef WINSYS,SF2372
    size=12G features='0' hwhandler='0' wp=undef
    `-+- policy='round-robin 0' prio=1 status=undef
      |- 2:0:0:1 sdc 8:32 undef ready  running
      `- 3:0:0:1 sdg 8:96 undef ready  running
    
    : 3600a0b80001327d800000070436216b3 undef WINSYS,SF2372
    size=12G features='0' hwhandler='0' wp=undef
    `-+- policy='round-robin 0' prio=1 status=undef
      |- 2:0:0:2 sdd 8:48 undef ready  running
      `- 3:0:0:2 sdg 8:112 undef ready  running
    
    : 3600a0b80001327510000009b4362163e undef WINSYS,SF2372
    size=12G features='0' hwhandler='0' wp=undef
    `-+- policy='round-robin 0' prio=1 status=undef
      |- 2:0:0:3 sdd 8:64 undef ready  running
      `- 3:0:0:3 sdg 8:128 undef ready  running
    
  2. In order to prevent the device mapper from mapping /dev/sda in its multipath maps, edit the blacklist section of the /etc/multipath.conf file to include this device. Although you could blacklist the sda device using a devnode type, that would not be a safe procedure since /dev/sda is not guaranteed to be the same on reboot. To blacklist individual devices, you can blacklist using the WWID of that device.
    请注意:在 multipath -v2 命令的输出中,/dev/sda 设备的 WWID 是 SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1。要将这个设备列入黑名单,请在 /etc/multipath.conf 文件中添加以下内容。
    blacklist {
          wwid SIBM-ESXSST336732LC____F3ET0EP0Q000072428BX1
    }
    
  3. 在您更新 /etc/multipath.conf 文件后,您必须手动让 multipathd 守护进程重新载入该文件。以下命令可重新载入更新的 /etc/multipath.conf 文件。
    # systemctl reload multipathd.service
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.