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 1271001 - duplicate pvs can be missed by pvscan --cache
Summary: duplicate pvs can be missed by pvscan --cache
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-12 21:21 UTC by David Teigland
Modified: 2021-09-03 12:41 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-10 20:47:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description David Teigland 2015-10-12 21:21:46 UTC
Description of problem:

There are still problems with duplicate PVs not being reported with lvmetad.
The example I'm seeing now is:

# lvmetad

# pvscan --cache
  Found duplicate PV 6H5srHtbk2igv1OqBjJbg3r9vDlSZzlj: using /dev/sdd not /dev/sdc
  Using duplicate PV /dev/sdd which is last seen, replacing /dev/sdc
  Found duplicate PV maevmciDh8i0Sr6oQktfx9eCBYgvTwcY: using /dev/sdb not /dev/sde
  Using duplicate PV /dev/sdb without holders, ignoring /dev/sde

# pvs
  Found duplicate PV 6H5srHtbk2igv1OqBjJbg3r9vDlSZzlj: using /dev/sdc not /dev/sdd
  Using duplicate PV /dev/sdc which is last seen, replacing /dev/sdd
  /dev/sdb                lvm2 ---  931.01g 931.01g
  /dev/sdc                lvm2 ---  931.01g 931.01g


The sdd/sdc duplicates are handled like we want, but the sdb/sde duplicates are not recorded as duplicates in lvmetad, and subsequently not reported as duplicates from 'pvs'.  This is because in the sdb/sde case, the first device is preferred over the second within the pvscan --cache command, so the second is never sent to lvmetad.  The "preferred" selection between duplicates within lvmcache_add() is the correct behavior when it's used by a reporting command like pvs, but in the special case of 'pvscan --cache' where lvmetad is being populated, we want a different behavior that will just send all the info to lvmetad.  When the command is just populating lvmetad, it doesn't really make sense to be using the lvmcache layer at all.  If there's no alternative to using lvmcache here, a workaround might be to trick lvmcache_add() to always prefer the new duplicate device when called for pvscan --cache.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 David Teigland 2016-01-19 16:03:08 UTC
It's unlikely that I'll have a the lvmetad duplicate PV handling reworked in time for 7.3.

Comment 3 David Teigland 2016-06-10 20:47:21 UTC
New duplicate handling is done, and lvmetad is disabled while duplicates exist.


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