검색

4.2. 설정 파일 블랙리스트

download PDF
멀티패스 설정 파일의 blacklist 부분에서는 시스템이 멀티패스 장치를 설정할 때 사용되지 않는 장치를 지정합니다. 블랙리스트된 장치는 멀티패스 장치 그룹에 포함되지 않게 됩니다.
In older releases of Red Hat Enterprise Linux, multipath always tried to create a multipath device for every path that was not explicitly blacklisted. As of Red Hat Enterprise Linux 6, however, if the find_multipaths configuration parameter is set to yes, then multipath will create a device only if one of three conditions are met:
  • There are at least two paths that are not blacklisted with the same WWID.
  • The user manually forces the creation of the device by specifying a device with the multipath command.
  • A path has the same WWID as a multipath device that was previously created (even if that multipath device does not currently exist). Whenever a multipath device is created, multipath remembers the WWID of the device so that it will automatically create the device again as soon as it sees a path with that WWID. This allows you to have multipath automatically choose the correct paths to make into multipath devices, without have to edit the multipath blacklist.
    If you have previously created a multipath device without using the find_multipaths parameter and then you later set the parameter to yes, you may need to remove the WWIDs of any device you do not want created as a multipath device from the /etc/multipath/wwids file. The following shows a sample /etc/multipath/wwids file. The WWIDs are enclosed by slashes (/):
    # Multipath wwids, Version : 1.0
    # NOTE: This file is automatically maintained by multipath and multipathd.
    # You should not need to edit this file in normal circumstances.
    #
    # Valid WWIDs:
    /3600d0230000000000e13955cc3757802/
    /3600d0230000000000e13955cc3757801/
    /3600d0230000000000e13955cc3757800/
    /3600d02300069c9ce09d41c31f29d4c00/
    /SWINSYS  SF2372         0E13955CC3757802/
    /3600d0230000000000e13955cc3757803/
    
With the find_multipaths parameter set to yes, you need to blacklist only the devices with multiple paths that you do not want to be multipathed. Because of this, it will generally not be necessary to blacklist devices.
If you do need to blacklist devices, you can do so according to the following criteria:
By default, a variety of device types are blacklisted, even after you comment out the initial blacklist section of the configuration file. For information, see 4.2.2절. “장치 이름에 따라 블랙리스트하기 ”.

4.2.1. WWID에 따라 블랙리스트하기

설정 파일의 blacklist 부분에 있는 wwid 항목으로 WWID (World-Wide IDentification)에 따라 블랙리스트하기 위해 개별 장치를 지정할 수 있습니다.
다음의 예에서는 WWID 26353900f02796769 로 장치를 블랙리스트하는 설정 파일 행을 보여주고 있습니다.
blacklist {
       wwid 26353900f02796769
}

4.2.2. 장치 이름에 따라 블랙리스트하기

You can blacklist device types by device name so that they will not be grouped into a multipath device by specifying a devnode entry in the blacklist section of the configuration file.
The following example shows the lines in the configuration file that would blacklist all SCSI devices, since it blacklists all sd* devices.
blacklist {
       devnode "^sd[a-z]"
}
You can use a devnode entry in the blacklist section of the configuration file to specify individual devices to blacklist rather than all devices of a specific type. This is not recommended, however, since unless it is statically mapped by udev rules, there is no guarantee that a specific device will have the same name on reboot. For example, a device name could change from /dev/sda to /dev/sdb on reboot.
By default, the following devnode entries are compiled in the default blacklist; the devices that these entries blacklist do not generally support DM Multipath. To enable multipathing on any of these devices, you would need to specify them in the blacklist_exceptions section of the configuration file, as described in 4.2.6절. “블랙리스트 예외 설정 ”.
blacklist {
       devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
       devnode "^(td|ha)d[a-z]"
}

4.2.3. 장치 유형에 따라 블랙리스트하기

You can specify specific device types in the blacklist section of the configuration file with a device section. The following example blacklists all IBM DS4200 and HP devices.
blacklist {
       device {
               vendor  "IBM"
               product "3S42"       #DS4200 Product 10
       }
       device {
               vendor  "HP"
               product "*"
       }
}

4.2.4. Blacklisting By udev Property (Red Hat Enterprise Linux 7.5 and Later)

The blacklist and blacklist_exceptions sections of the multipath.conf configuration file support the property parameter. This parameter allows users to blacklist certain types of devices. The property parameter takes a regular expression string that is matched against the udev environment variable name for the device.
The following example blacklists all devices with the udev property ID_ATA.
blacklist {
        property "ID_ATA"
}

4.2.5. Blacklisting By Device Protocol (Red Hat Enterprise Linux 7.6 and Later)

You can specify the protocol for a device to be excluded from multipathing in the blacklist section of the configuration file with a protocol section. The protocol strings that multipath recognizes are scsi:fcp, scsi:spi, scsi:ssa, scsi:sbp, scsi:srp, scsi:iscsi, scsi:sas, scsi:adt, scsi:ata, scsi:unspec, ccw, cciss, nvme, and undef. The protocol that a path is using can be viewed by running the command multipathd show paths format "%d %P".
The following example blacklists all devices with an undefined protocol or an unknown SCSI transport type.
blacklist {
        protocol "scsi:unspec"
        protocol "undef"
}

4.2.6. 블랙리스트 예외 설정

You can use the blacklist_exceptions section of the configuration file to enable multipathing on devices that have been blacklisted by default.
For example, if you have a large number of devices and want to multipath only one of them (with the WWID of 3600d0230000000000e13955cc3757803), instead of individually blacklisting each of the devices except the one you want, you could instead blacklist all of them, and then allow only the one you want by adding the following lines to the /etc/multipath.conf file.
blacklist {
        wwid "*"
}

blacklist_exceptions {
        wwid "3600d0230000000000e13955cc3757803"
}
설정 파일의 blacklist_exceptions 부분에서 장치를 지정할 때, 블랙리스트에 지정한 것과 동일한 방법으로 예외 설정을 해야 합니다. 예를 들어, 블랙리스트된 장치가 WWID와 관련되어 있을 지라도, WWID 예외 설정은 devnode 블랙리스트 항목으로 지정된 장치에는 적용되지 않게 됩니다. 이와 유사하게, devnode 예외 설정은 devnode 항목에만 적용되며 device 예외 설정은 장치 항목에만 적용됩니다.
The property parameter works differently than the other blacklist_exception parameters. If the parameter is set, the device must have a udev variable that matches. Otherwise, the device is blacklisted. This parameter allows users to blacklist SCSI devices that multipath should ignore, such as USB sticks and local hard drives. To allow only SCSI devices that could reasonably be multipathed, set this parameter to SCSI_IDENT_|ID_WWN) as in the following example.
blacklist_exceptions {
        property "(SCSI_IDENT_|ID_WWN)"
}
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.