3.3. Ignoring local disks when generating multipath devices


To prevent DM Multipath from using local SCSI disks, you can configure it to ignore these devices during multipath device generation. Setting find_multipaths to on simplifies this process; otherwise, manual exclusion is required in the configuration file.

Procedure

  1. Identify the internal disk using any known parameters such as the device’s model, path or vendor, and determine its WWID by using any one of the following options:

    • Display existing multipath devices:

      # multipath -v2 -l
      
      mpatha (WDC_WD800JD-75MSA3_WD-WMAM9FU71040) dm-2 ATA,WDC WD800JD-75MS
      size=33 GB features="0" hwhandler="0" wp=rw
      `-+- policy='round-robin 0' prio=0 status=active
        |- 0:0:0:0 sda 8:0 active undef running
    • Display additional multipath devices that DM Multipath could create:

      # multipath -v2 -d
      
      : mpatha (WDC_WD800JD-75MSA3_WD-WMAM9FU71040) dm-2 ATA,WDC WD800JD-75MS
      size=33 GB features="0" hwhandler="0" wp=undef
      `-+- policy='round-robin 0' prio=1 status=undef
        |- 0:0:0:0 sda 8:0  undef ready running
    • Display device information:

      # multipathd show paths raw format "%d %w" | grep sda
      sda WDC_WD800JD-75MSA3_WD-WMAM9FU71040

      In this example, /dev/sda is the internal disk and its WWID is WDC_WD800JD-75MSA3_WD-WMAM9FU71040.

  2. Edit the blacklist section of the /etc/multipath.conf file to ignore this device, using its WWID attribute:

    blacklist {
          wwid WDC_WD800JD-75MSA3_WD-WMAM9FU71040
    }
    警告

    Although you could identify the device using its devnode parameter, such as sda, it would not be a safe procedure, because /dev/sda is not guaranteed to refer to the same device on reboot.

  3. Check for any configuration errors in the /etc/multipath.conf file:

    # multipath -t > /dev/null

    To see the full report, do not discard the command output:

    # multipath -t
  4. Remake the initramfs if the disk is included in initramfs. For more information, see Configuring multipathing in initramfs.
  5. Reload the /etc/multipath.conf file by reconfiguring the multipathd daemon:

    # systemctl reload multipathd
    注意

    Multipath devices on top of local disks cannot be removed when in use. To ignore such device, stop all users of the device. For example, by unmounting any filesystem on top of it and deactivating any logical volumes using it. If this is not possible, you can reboot the system to remove the multipath device.

Verification

  1. Verify that the internal disk is ignored and it is not displayed in the multipath output:

    • List the multipathed devices:

      # multipath -v2 -l
    • List the additional devices that DM Multipath could create:

      # multipath -v2 -d
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

Theme

© 2026 Red Hat
返回顶部