Bug 2084365

Summary: [RFE] enable device configuration selection to include the transport protocol.
Product: Red Hat Enterprise Linux 9 Reporter: Ben Marzinski <bmarzins>
Component: device-mapper-multipathAssignee: Ben Marzinski <bmarzins>
Status: CLOSED ERRATA QA Contact: Lin Li <lilin>
Severity: medium Docs Contact: Kristina Slaveykova <kslaveyk>
Priority: medium    
Version: 9.0CC: agk, bmarzins, heinzm, jmagrini, kslaveyk, ldigby, lilin, msnitzer, nyewale, prajnoha, rmadhuso, zkabelac
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 9.1Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: device-mapper-multipath-0.8.7-9.el9 Doc Type: Enhancement
Doc Text:
.Enabled protocol specific configuration of multipath device paths Previously due to different optimal configurations for the different protocols, it was impossible to set the configuration correctly without setting an option for each individual protocol. With this enhancement, users can now configure multipath device paths based on their path transport protocol. Use the `protocol` subsection of the `overrides` section in the `/etc/multipath.conf` file to correctly configure multipath device paths, based on their protocol.
Story Points: ---
Clone Of: 2065477 Environment:
Last Closed: 2022-11-15 11:16:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2065477    
Bug Blocks:    

Comment 1 Ben Marzinski 2022-05-17 17:30:43 UTC
The final solution to to is to add a protocol subsection to the overrides section of multipath.conf, which can contain multiple protocol subsections. Path devices are matched against the protocol subsection using the mandatory "type" attribute.  Attributes in a matching protocol subsection take precedence over attributes in the rest
of the overrides section, which like always take precedence of attributes in the devices and defaults sections. If there are multiple matching protocol subsections, later entries take precedence. The "type" attribute can be one of 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:

multipathd show paths format "%d %P"

The only attributes that can be set in the protocol subsection are "type", "dev_loss_tmo", "fast_io_fail_tmo", and "eh_deadline". Here is an example of a overrides sections with protocol subsections:

overrides {
        protocol {
                type "scsi:fcp"
                dev_loss_tmo 70
                fast_io_fail_tmo 10
                eh_deadline 360
        }
        protocol {
                type "scsi:iscsi"
                fast_io_fail 120
        }
}

Comment 4 Lin Li 2022-06-01 10:23:36 UTC
[root@storageqe-05 ~]# rpm -qa | grep multipath
device-mapper-multipath-libs-0.8.7-9.el9.x86_64
device-mapper-multipath-0.8.7-9.el9.x86_64

[root@storageqe-05 ~]# man multipath.conf
       protocol subsection
              The protocol subsection recognizes the following mandatory attribute:

              type   The protocol string of the  path  device.  The  possible  values  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. This is not a regular expression. the
                     path device protcol string must match exactly. The protocol that a path is using can be viewed by  running  multipathd  show
                     paths format "%d %P"

              The following attributes are optional; if not set, the default values are taken from the overrides, devices, or defaults section:

                     fast_io_fail_tmo
                     dev_loss_tmo
                     eh_deadline


[root@storageqe-05 ~]# multipathd show paths format "%d %P"
dev protocol   
sda scsi:unspec
sdj scsi:fcp   
sdk scsi:fcp   
sdl scsi:fcp   
sdm scsi:fcp   
sdn scsi:fcp   
sdo scsi:fcp   
sdp scsi:fcp   
sdq scsi:fcp   
sdb scsi:fcp   
sdc scsi:fcp   
sdd scsi:fcp   
sde scsi:fcp   
sdf scsi:fcp   
sdg scsi:fcp   
sdh scsi:fcp   
sdi scsi:fcp

Comment 10 errata-xmlrpc 2022-11-15 11:16:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (device-mapper-multipath bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8313