RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1510834 - multipath does not distribute the unpriv-SGIO setting to its child devices [rhel-7.4.z]
Summary: multipath does not distribute the unpriv-SGIO setting to its child devices [r...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: device-mapper-multipath
Version: 7.3
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Ben Marzinski
QA Contact: Lin Li
URL:
Whiteboard:
Depends On: 1452210
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-08 10:13 UTC by Oneata Mircea Teodor
Modified: 2021-09-03 12:05 UTC (History)
23 users (show)

Fixed In Version: device-mapper-multipath-0.4.9-111.el7.2
Doc Type: Enhancement
Doc Text:
DM Multipath now recognizes the prkeys_file option, which configures the reservation key for the paths of a multipath device. With this option, you can now use the mpathpersist utility without knowing ahead of time what reservation keys will be used and without adding them to the multipath.conf configuration file. As a result, it is now easier to use the mpathpersist utility to manage multipath persistent reservations in multiple setups.
Clone Of: 1452210
Environment:
Last Closed: 2018-01-25 11:39:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0142 0 normal SHIPPED_LIVE device-mapper-multipath bug fix and enhancement update 2018-01-25 16:16:37 UTC

Description Oneata Mircea Teodor 2017-11-08 10:13:39 UTC
This bug has been copied from bug #1452210 and has been proposed to be backported to 7.4 z-stream (EUS).

Comment 2 Ben Marzinski 2017-11-08 23:27:59 UTC
unpriv_sgio and prkey file code backported

Comment 8 Lin Li 2017-11-21 03:15:28 UTC
Verified on device-mapper-multipath-0.4.9-111.el7_4.2
1, # rpm -qa |grep multipath
device-mapper-multipath-libs-0.4.9-111.el7_4.2.x86_64
device-mapper-multipath-devel-0.4.9-111.el7_4.2.x86_64
device-mapper-multipath-debuginfo-0.4.9-111.el7_4.2.x86_64
device-mapper-multipath-0.4.9-111.el7_4.2.x86_64
device-mapper-multipath-sysvinit-0.4.9-111.el7_4.2.x86_64

2,  #man multipath.conf
       unpriv_sgio      If set to yes, multipath will set  upriv_sgio  on  the
                        multipath device and all its paths, when it is created
                        or reloaded. The default is no

       prkeys_file      The full pathname of the prkeys file, which is used by
                        multipathd  to  keep track of the reservation key used
                        for a specific WWID, when reservation_key  is  set  to
                        file.  Defaults to /etc/multipath/prkeys

       reservation_key  This  is the service action reservation key used      by  mpathpersist.  It must be set for all multipath devices using persistent reservations, and it must be the same as the RESERVATION KEY field of  the
 PERSISTENT  RESERVE  OUT  parameter list which contains an 8-byte value provided by the application client to the device server to identify the I_T nexus.

                        Alternatively, this can be set to file, which will store the RESERVATION KEY registered  by  mpath‐persist  in the prkeys_file. multipathd will then use this key to register additional paths as they
appear.  When the registration is removed, the RESERVATION KEY is removed from the prkeys_file.  It is unset by default.

3, multipathd show config |grep unpriv_sgio
defaults {
	unpriv_sgio no      <----------- The default is no
}

4, edit /etc/multipath.conf
# cat /etc/multipath.conf 
defaults {
    polling_interval            5
    no_path_retry               4
    user_friendly_names         no
    flush_on_last_del           yes
    fast_io_fail_tmo            5
    dev_loss_tmo                30
    max_fds                     4096
    unpriv_sgio                 yes    <-------------------set yes
    reservation_key             file   <-------------------set file
}


5, # service multipathd reload
Reloading multipathd configuration (via systemctl):  [  OK  ]

6,# multipath -ll 360a98000324669436c2b45666c567871
360a98000324669436c2b45666c567871 dm-6 NETAPP  ,LUN             
size=2.0G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 1:0:1:2 sdi 8:128 active ready running
| `- 4:0:0:2 sdn 8:208 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
  |- 1:0:0:2 sdd 8:48  active ready running
  `- 4:0:1:2 sds 65:32 active ready running

7,# mpathpersist -oGS 1a2c3a4a5d /dev/mapper/360a98000324669436c2b45666c567871

8,# cat /etc/multipath/prkeys
# Multipath persistent reservation keys, Version : 1.0
# NOTE: this file is automatically maintained by the multipathd program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# prkey wwid
#
0x000000000000000f 360a98000324669436c2b45666c56786f
0x0000001a2c3a4a5d 360a98000324669436c2b45666c567871   <----------prkey is 1a2c3a4a5d 

9,# mpathpersist -oGK 1a2c3a4a5d /dev/mapper/360a98000324669436c2b45666c567871
Nov 20 21:33:58 | 360a98000324669436c2b45666c567871: reservation_key = 0x1a2c3a4a5d (config file default) (from prkeys file)

10,# cat /etc/multipath/prkeys
# Multipath persistent reservation keys, Version : 1.0
# NOTE: this file is automatically maintained by the multipathd program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# prkey wwid
#
0x000000000000000f 360a98000324669436c2b45666c56786f
#x0000001a2c3a4a5d 360a98000324669436c2b45666c567871  <-----the line is commented with '#'


=================================================================
11,# multipath -ll 360a98000324669436c2b45666c567875
360a98000324669436c2b45666c567875 dm-8 NETAPP  ,LUN             
size=2.0G features='4 queue_if_no_path pg_init_retries 50 retain_attached_hw_handle' hwhandler='1 alua' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 1:0:1:4 sdk 8:160 active ready running
| `- 4:0:0:4 sdp 8:240 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
  |- 1:0:0:4 sdf 8:80  active ready running
  `- 4:0:1:4 sdu 65:64 active ready running

12,# mpathpersist -oGS ffffffffffff /dev/mapper/360a98000324669436c2b45666c567875

13,# cat /etc/multipath/prkeys
# Multipath persistent reservation keys, Version : 1.0
# NOTE: this file is automatically maintained by the multipathd program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# prkey wwid
#
0x000000000000000f 360a98000324669436c2b45666c56786f
#x0000001a2c3a4a5d 360a98000324669436c2b45666c567871
0x0999999999999fff 360a98000324669436c2b45666c567873
0x0000ffffffffffff 360a98000324669436c2b45666c567875   <------the prkey is ffffffffffff 

14,# mpathpersist -oGK ffffffffffff /dev/mapper/360a98000324669436c2b45666c567875
Nov 20 21:42:42 | 360a98000324669436c2b45666c567875: reservation_key = 0xffffffffffff (config file default) (from prkeys file)

15,# cat /etc/multipath/prkeys# Multipath persistent reservation keys, Version : 1.0
# NOTE: this file is automatically maintained by the multipathd program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# prkey wwid
#
0x000000000000000f 360a98000324669436c2b45666c56786f
#x0000001a2c3a4a5d 360a98000324669436c2b45666c567871
0x0999999999999fff 360a98000324669436c2b45666c567873
#x0000ffffffffffff 360a98000324669436c2b45666c567875  <-----the line is commented with '#'


Exception testing
======================================================================
16, # mpathpersist -oGS foo /dev/mapper/360a98000324669436c2b45666c567875
bad argument to '--param-sark'

17, # mpathpersist -oGS dfgftjhyfjfh /dev/mapper/360a98000324669436c2b45666c567875
bad argument to '--param-sark'

18, # mpathpersist -oGS 888888888888888888888888888 /dev/mapper/360a98000324669436c2b45666c567875
bad argument to '--param-sark'

19,# cat /etc/multipath/prkeys
# Multipath persistent reservation keys, Version : 1.0
# NOTE: this file is automatically maintained by the multipathd program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# prkey wwid
#
0x000000000000000f 360a98000324669436c2b45666c56786f
#x0000001a2c3a4a5d 360a98000324669436c2b45666c567871
0x0999999999999fff 360a98000324669436c2b45666c567873
#x0000ffffffffffff 360a98000324669436c2b45666c567875

20, # mpathpersist -oGK hdgdhjygk /dev/mapper/360a98000324669436c2b45666c567875
bad argument to '--param-rk'

21, # mpathpersist -oGK foo /dev/mapper/360a98000324669436c2b45666c567875
bad argument to '--param-rk'

22,# mpathpersist -oGS 8987788664544345 /dev/mapper/360a98000324669436c2b45666c567875

23,# cat /etc/multipath/prkeys
# Multipath persistent reservation keys, Version : 1.0
# NOTE: this file is automatically maintained by the multipathd program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# prkey wwid
#
0x000000000000000f 360a98000324669436c2b45666c56786f
#x0000001a2c3a4a5d 360a98000324669436c2b45666c567871
0x0999999999999fff 360a98000324669436c2b45666c567873
0x8987788664544345 360a98000324669436c2b45666c567875

24,#mpathpersist -oGK 8 /dev/mapper/360a98000324669436c2b45666c567875
Nov 20 21:52:12 | 360a98000324669436c2b45666c567875: reservation_key = 0x8987788664544345 (config file default) (from prkeys file)
Nov 20 21:52:12 | 360a98000324669436c2b45666c567875: configured reservation key doesn't match: 0x8987788664544345
PR out: command failed

25,# mpathpersist -oGK 8987788664544345 /dev/mapper/360a98000324669436c2b45666c567875
Nov 20 21:53:58 | 360a98000324669436c2b45666c567875: reservation_key = 0x8987788664544345 (config file default) (from prkeys file)

26, # cat /etc/multipath/prkeys# Multipath persistent reservation keys, Version : 1.0
# NOTE: this file is automatically maintained by the multipathd program.
# You should not need to edit this file in normal circumstances.
#
# Format:
# prkey wwid
#
0x000000000000000f 360a98000324669436c2b45666c56786f
#x0000001a2c3a4a5d 360a98000324669436c2b45666c567871
0x0999999999999fff 360a98000324669436c2b45666c567873
#x8987788664544345 360a98000324669436c2b45666c567875

Comment 11 errata-xmlrpc 2018-01-25 11:39:30 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, 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/RHEA-2018:0142


Note You need to log in before you can comment on or make changes to this bug.