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 2111137 - multipath_component_detection = 0 in lvm.conf does not have any effect
Summary: multipath_component_detection = 0 in lvm.conf does not have any effect
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.7
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 2109351
Blocks: 2111136
TreeView+ depends on / blocked
 
Reported: 2022-07-26 14:47 UTC by Marian Csontos
Modified: 2022-11-08 12:52 UTC (History)
14 users (show)

Fixed In Version: lvm2-2.03.14-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2109351
Environment:
Last Closed: 2022-11-08 10:55:29 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-129125 0 None None None 2022-07-26 14:50:48 UTC
Red Hat Product Errata RHBA-2022:7792 0 None None None 2022-11-08 10:55:45 UTC

Description Marian Csontos 2022-07-26 14:47:22 UTC
+++ This bug was initially created as a clone of Bug #2109351 +++

Description of problem:

Disabling multipath component detection in lvm.conf does not have any effect.  It always ignores PVs on native devices irrespective of whether multipath component detection is enabled or not.

We have a specific requirement for lvm to NOT ignore PVs on multiple native devices when dm-multipath is NOT enabled.

This is needed to support Dell EMC PowerPath multipathing software with RHEL9 on BFS (Boot from SAN) hosts.  When a BFS host is booted up, the root LV needs to be seen from one of the native devices to the boot lun.  Then after the kernel loads, PowerPath will start and do multipathing.

Because of the multipath_component_detection issue, lvm does not see the PVs on the native devices on bot (as it ignores them) and hence the host does not boot up when there are multiple paths to the boot lun.


Version-Release number of selected component (if applicable):

lvm2-libs-2.03.14-4.el9.x86_64
lvm2-2.03.14-4.el9.x86_64

How reproducible:

Every time.

Steps to Reproduce:


1.  Disable both the use of devices file and multipath component detection in /etc/lvm/lvm.conf by setting the following.

use_devicesfile = 0
multipath_component_detection = 0

2.  Create a PV on one path of a native device to an array LUN.

[root@ncpp227046 ~]# pvcreate /dev/sdci
  Physical volume "/dev/sdci" successfully created.

3.  Run pvscan to see the just created PV.

[root@ncpp227046 ~]# pvscan
  PV /dev/sdh3   VG rhel_ncpp227046   lvm2 [53.41 GiB / 0    free]
  Total: 1 [53.41 GiB] / in use: 1 [53.41 GiB] / in no VG: 0 [0   ]

The PV shown above is a different PV on the local hard disk.  It does not show the PV on the just created device. 

Actual results:

pvscan does not show the PV on a native device.  Here, /dev/sdci, /dev/sddc and /dev/sdbk are all paths to the same array LUN.

As seen below from the snippet of 'pvscan -vvv' output, lvm ignores all the native devices as it sees duplicate PVIDs on them.  It does this because it believes there will be a dm-multipath device also available - but in our case there will not be any dm-multipath device as dm-multipath is not enabled (and cannot be enabled also).

  Resolving duplicate devices
  Checking for multipath components for duplicate PVID fNvc7okgiFdvF1ociAUMMGwhic5rfHxL
  Same wwids for duplicate PVs /dev/sdci /dev/sddc
  Same wwids for duplicate PVs /dev/sdci /dev/sdbk
  Ignoring multipath component /dev/sdci with PVID fNvc7okgiFdvF1ociAUMMGwhic5rfHxL (dropping info)
  Ignoring multipath component /dev/sddc with PVID fNvc7okgiFdvF1ociAUMMGwhic5rfHxL (dropping duplicate)
  Ignoring multipath component /dev/sdbk with PVID fNvc7okgiFdvF1ociAUMMGwhic5rfHxL (dropping duplicate)


Expected results:

pvscan should have shown /dev/sdci and duplicate PVs on /dev/sddc and /dev/sdbk.  Essentially we require a similar behavior as in older LVM versions (such as in RHEL 8).

Additional info:

We cannot use devices file also in our scenario as there is a need to support SRDF (remote replication) scenarios where the wwids of the devices can be different depending on whether the paths are coming from the local or remote array.

--- Additional comment from David Teigland on 2022-07-25 16:24:42 UTC ---

I will look into applying the multipath_component_detection setting to the newly expanded detection features also.

--- Additional comment from Gopinath Marappan on 2022-07-25 16:30:42 UTC ---

Thanks David!

Btw, I have a patch that fixes this issue.  But I couldn't raise a pull request at https://github.com/lvmteam/lvm2 as I dont have access.

If you can add me as a contributor, I can do a pull request.

I have also filed an issue for this in the github repo - https://github.com/lvmteam/lvm2/issues/86 .

Please advise.  Thanks.

--- Additional comment from David Teigland on 2022-07-25 19:26:04 UTC ---

fix in main branch:
https://sourceware.org/git/?p=lvm2.git;a=commit;h=99ce09ae778c2cc4aa2611e425bba5287b8b9513

# rm /run/lvm/hints 
# pvs
  PV         VG           Fmt  Attr PSize    PFree
  /dev/sda2  rhel_null-04 lvm2 a--  <464.76g    0 
# rm /run/lvm/hints 
# pvs --config devices/multipath_component_detection=0
  WARNING: Not using device /dev/sdj for PV CqOFo8-ozdc-4yiu-SFjd-jcH2-qFqs-V2KneR.
  WARNING: PV CqOFo8-ozdc-4yiu-SFjd-jcH2-qFqs-V2KneR prefers device /dev/sdi because device was seen first.
  PV         VG           Fmt  Attr PSize    PFree  
  /dev/sda2  rhel_null-04 lvm2 a--  <464.76g      0 
  /dev/sdi                lvm2 ---   100.00m 100.00m

--- Additional comment from David Teigland on 2022-07-25 19:29:31 UTC ---

(In reply to Gopinath Marappan from comment #2)
> Thanks David!
> 
> Btw, I have a patch that fixes this issue.  But I couldn't raise a pull
> request at https://github.com/lvmteam/lvm2 as I dont have access.
> 
> If you can add me as a contributor, I can do a pull request.

Sorry, I'm afraid we largely ignore the github repo and primarily use sourceware.

> I have also filed an issue for this in the github repo -
> https://github.com/lvmteam/lvm2/issues/86 .

OK, we also need a bz for the issue in order to get it released in RHEL.

--- Additional comment from Gopinath Marappan on 2022-07-26 03:25:48 UTC ---

Thanks for the quick fix David.

Will it be possible to backport the fix to RHEL9.0 and RHEL9.1?

Comment 2 David Teigland 2022-07-26 14:52:15 UTC
This bug provides the ability to disable the 8.7 feature in bug 2095534.

Comment 4 Corey Marthaler 2022-08-10 02:53:28 UTC
Marking Verified:Tested with the latest rpms.

kernel-4.18.0-414.el8    BUILT: Mon Aug  1 20:27:19 CDT 2022
lvm2-2.03.14-6.el8    BUILT: Fri Jul 29 05:40:53 CDT 2022
lvm2-libs-2.03.14-6.el8    BUILT: Fri Jul 29 05:40:53 CDT 2022



SCENARIO - lvm_usage_w_multipath_component_detection_disabled:  Test that lvm doesn't ignore multipath component_detection with devicesfile disabled (bug 2111137/2095534)
adding entry to the devices file for /dev/sde1
removing entry from the devices file for /dev/sde1
Setting use_devicesfile to disable
Setting multipath_component_detection to enable
WARNING: This scenario will end up repartitioning your device for use w/ mpath!
multipath /dev/sde
create: mpatha (36d094660650d1e0022bd29f91ebe756c) undef DELL,PERC H330 Adp
size=1.8T features='0' hwhandler='0' wp=undef
`-+- policy='service-time 0' prio=1 status=undef
  `- 0:2:4:0  sde 8:64  undef ready running

adding entry to the devices file for /dev/mapper/mpatha1
** use_devicesfile is NOT currently enabled **
creating PV on hayes-02 using device /dev/mapper/mpatha1
pvcreate --yes -ff   /dev/mapper/mpatha1
  Physical volume "/dev/mapper/mpatha1" successfully created.
creating VG on hayes-02 using PV(s) /dev/mapper/mpatha1
vgcreate    df /dev/mapper/mpatha1
  Volume group "df" successfully created
lvcreate --yes --type linear -n dflv  -L 500M df  
Logical volume "dflv" created.

Re-scanning lvm PVs (pvscan --cache)
  pvscan[28415] PV /dev/mapper/mpatha1 online.
Setting multipath_component_detection to disable
Re-scanning lvm PVs (pvscan --cache)
  pvscan[28425] PV /dev/mapper/mpatha1 online.
verify pvs multipath path /dev/mapper/mpatha1
  PV                  VG Fmt  Attr PSize  PFree 
  /dev/mapper/mpatha1 df lvm2 a--  <1.82t <1.82t
pvs -vvvv 2>&1| grep 'duplicate device'
vgchange -ay -vvvv test 2>&1 | grep 'duplicate device'
lvremove  -f df/dflv
  Logical volume "dflv" successfully removed.
removing vg df from hayes-02
  Volume group "df" successfully removed
removing pv /dev/mapper/mpatha1 on hayes-02
  Labels on physical volume "/dev/mapper/mpatha1" successfully wiped.
removing entry from the devices file for /dev/mapper/mpatha1
** use_devicesfile is NOT currently enabled **
multipath -f mpatha
multipath -W
successfully reset wwids
Device /dev/sde already has 1 partitions
Setting use_devicesfile to enable
Setting multipath_component_detection to enable

Comment 9 errata-xmlrpc 2022-11-08 10:55:29 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 (lvm2 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:7792


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