Bug 2143125

Summary: path selector "io-affinity" does not work on RHEL9.2
Product: Red Hat Enterprise Linux 9 Reporter: Lin Li <lilin>
Component: device-mapper-multipathAssignee: Ben Marzinski <bmarzins>
Status: CLOSED ERRATA QA Contact: Lin Li <lilin>
Severity: medium Docs Contact:
Priority: low    
Version: 9.2CC: agk, bmarzins, heinzm, msnitzer, prajnoha, zkabelac
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: device-mapper-multipath-0.8.7-16.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 08:14:07 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:

Description Lin Li 2022-11-16 05:56:17 UTC
Description of problem:
path selector "io-affinity" does not work on RHEL9.2

Version-Release number of selected component (if applicable):
5.14.0-186.kpq1.el9.x86_64
device-mapper-multipath-0.8.7-13.el9.x86_64

How reproducible:
always

Steps to Reproduce:
1.#man multipath.conf
       path_selector    The  default path selector algorithm to use; they are offered by the kernel multi‐
                        path target:

                        round-robin 0
                                    Loop through every path in the path group, sending the same amount  of
                                    I/O  to  each. Some aspects of behavior can be controlled with the at‐
                                    tributes: rr_min_io, rr_min_io_rq and rr_weight.

                        queue-length 0
                                    (Since 2.6.31 kernel) Choose the path for the next bunch of I/O  based
                                    on the amount of outstanding I/O to the path.

                        service-time 0
                                    (Since  2.6.31 kernel) Choose the path for the next bunch of I/O based
                                    on the amount of outstanding I/O to the path and its relative through‐
                                    put.

                        historical-service-time 0
                                    (Since  5.8 kernel) Choose the path for the next bunch of I/O based on
                                    the estimation of future service time based on the history of previous
                                    I/O submitted to each path.

                        io-affinity 0
                                    (Since 5.11 kernel) Choose the path for the next bunch of I/O based on
                                    a CPU to path mapping the user passes in and what CPU we are executing
                                    on.

                        The default is: service-time 0

2.Edit /etc/multipath.conf
 defaults {
        user_friendly_names yes
        find_multipaths yes
        path_selector "io-affinity 0"
}

blacklist {
}

3.# service multipathd reload
Redirecting to /bin/systemctl reload multipathd.service
4.# multipath -l

Actual results:
The output is empty from " multipath -l"



Expected results:


Additional info:
# dmesg
[57807.722676] systemd-rc-local-generator[42262]: /etc/rc.d/rc.local is not marked executable, skipping.
[57849.474114] device-mapper: multipath service-time: version 0.3.0 loaded
[60444.773240] device-mapper: multipath historical-service-time: version 0.1.1 loaded
[60894.617618] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.618141] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.619074] device-mapper: ioctl: error adding target to table
[60894.622534] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.623017] device-mapper: table: 253:4: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.623950] device-mapper: ioctl: error adding target to table
[60894.627413] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.627889] device-mapper: table: 253:5: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.628800] device-mapper: ioctl: error adding target to table
[60894.631814] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.632245] device-mapper: table: 253:6: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.633157] device-mapper: ioctl: error adding target to table
[60894.638618] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.639069] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.640336] device-mapper: ioctl: error adding target to table
[60894.645736] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.646512] device-mapper: table: 253:4: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.647492] device-mapper: ioctl: error adding target to table
[60894.652837] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.653297] device-mapper: table: 253:5: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.654198] device-mapper: ioctl: error adding target to table
[60894.659463] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.659950] device-mapper: table: 253:6: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.660881] device-mapper: ioctl: error adding target to table
[60894.666244] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.666914] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.668086] device-mapper: ioctl: error adding target to table
[60894.673496] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.674384] device-mapper: table: 253:4: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.675325] device-mapper: ioctl: error adding target to table
[60894.680621] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.681098] device-mapper: table: 253:5: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.682011] device-mapper: ioctl: error adding target to table
[60894.687402] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.687884] device-mapper: table: 253:6: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.688906] device-mapper: ioctl: error adding target to table
[60894.694595] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.695029] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.695951] device-mapper: ioctl: error adding target to table
[60894.701268] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.701696] device-mapper: table: 253:4: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.702571] device-mapper: ioctl: error adding target to table
[60894.707861] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60894.736873] device-mapper: table: 253:5: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60894.988801] device-mapper: ioctl: error adding target to table
[60895.154562] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60895.208852] device-mapper: table: 253:6: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60895.209735] device-mapper: ioctl: error adding target to table
[60919.398757] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.399319] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.400216] device-mapper: ioctl: error adding target to table
[60919.452845] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.453296] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.454192] device-mapper: ioctl: error adding target to table
[60919.526957] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.527404] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.528309] device-mapper: ioctl: error adding target to table
[60919.579491] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.579934] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.580871] device-mapper: ioctl: error adding target to table
[60919.635308] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.635749] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.636819] device-mapper: ioctl: error adding target to table
[60919.642398] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.642857] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.643810] device-mapper: ioctl: error adding target to table
[60919.650546] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.651062] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.651967] device-mapper: ioctl: error adding target to table
[60919.657712] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.658452] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.659363] device-mapper: ioctl: error adding target to table
[60919.664988] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.665484] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.666439] device-mapper: ioctl: error adding target to table
[60919.672239] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.672909] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.673951] device-mapper: ioctl: error adding target to table
[60919.679626] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.680109] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.681026] device-mapper: ioctl: error adding target to table
[60919.686922] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.687547] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.688440] device-mapper: ioctl: error adding target to table
[60919.693770] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.694270] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.695179] device-mapper: ioctl: error adding target to table
[60919.700439] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.701015] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.701967] device-mapper: ioctl: error adding target to table
[60919.707364] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.707939] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.708910] device-mapper: ioctl: error adding target to table
[60919.714414] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[60919.714972] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[60919.716031] device-mapper: ioctl: error adding target to table
[61195.532003] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.532526] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.533488] device-mapper: ioctl: error adding target to table
[61195.537941] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.538414] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.539444] device-mapper: ioctl: error adding target to table
[61195.543482] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.544049] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.545337] device-mapper: ioctl: error adding target to table
[61195.549020] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.549758] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.550666] device-mapper: ioctl: error adding target to table
[61195.556635] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.557068] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.557991] device-mapper: ioctl: error adding target to table
[61195.563780] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.564298] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.565361] device-mapper: ioctl: error adding target to table
[61195.571203] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.571897] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.572815] device-mapper: ioctl: error adding target to table
[61195.578928] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.579395] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.580353] device-mapper: ioctl: error adding target to table
[61195.586167] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.586701] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.587678] device-mapper: ioctl: error adding target to table
[61195.593638] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.594173] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.595120] device-mapper: ioctl: error adding target to table
[61195.601034] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.601532] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.602470] device-mapper: ioctl: error adding target to table
[61195.608335] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.608879] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.609781] device-mapper: ioctl: error adding target to table
[61195.615633] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61195.645058] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61195.895693] device-mapper: ioctl: error adding target to table
[61196.061394] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61196.116675] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61196.117540] device-mapper: ioctl: error adding target to table
[61196.122165] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61196.122643] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61196.123495] device-mapper: ioctl: error adding target to table
[61196.128217] device-mapper: multipath io-affinity: CPU mapping for 0 exists. Ignoring.
[61196.128662] device-mapper: table: 253:3: multipath: io-affinity ps: No new/valid CPU mapping found (-EINVAL)
[61196.129522] device-mapper: ioctl: error adding target to table

Comment 1 Ben Marzinski 2022-11-17 01:23:23 UTC
This path selector isn't supported by device-mapper-multipath. It wasn't designed to work with the multipath userspace tools. It requires assigning each path to a specific group of CPUs in a way that doesn't work well with how the multipath tools autodetect paths and autoassemble
devices. People who use it create and manage the multipath devices without using the device-mapper-multipath tools. It's inclusion in the man page is an error, and I'll be using this bug to fix that.

Comment 8 Lin Li 2022-12-19 13:23:08 UTC
[root@storageqe-25 ~]# rpm -qa | grep multipath
device-mapper-multipath-libs-0.8.7-16.el9.x86_64
device-mapper-multipath-0.8.7-16.el9.x86_64

[root@storageqe-25 ~]# man multipath.conf
       path_selector    The  default path selector algorithm to use; they are offered by the kernel multi‐
                        path target:

                        round-robin 0
                                    Loop through every path in the path group, sending the same amount  of
                                    I/O  to  each. Some aspects of behavior can be controlled with the at‐
                                    tributes: rr_min_io, rr_min_io_rq and rr_weight.

                        queue-length 0
                                    (Since 2.6.31 kernel) Choose the path for the next bunch of I/O  based
                                    on the amount of outstanding I/O to the path.

                        service-time 0
                                    (Since  2.6.31 kernel) Choose the path for the next bunch of I/O based
                                    on the amount of outstanding I/O to the path and its relative through‐
                                    put.

                        historical-service-time 0
                                    (Since  5.8 kernel) Choose the path for the next bunch of I/O based on
                                    the estimation of future service time based on the history of previous
                                    I/O submitted to each path.

                        The default is: service-time 0


Test result: there is no io-affinity in the man page

Comment 10 errata-xmlrpc 2023-05-09 08:14:07 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 (Moderate: device-mapper-multipath security and bug fix 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/RHSA-2023:2459