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 1468355 - pvscan fails "No matching physical volumes found" when lock operations are on going on other node
Summary: pvscan fails "No matching physical volumes found" when lock operations are on...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-06 19:41 UTC by Corey Marthaler
Modified: 2021-09-03 12:39 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-01-15 07:39:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Corey Marthaler 2017-07-06 19:41:16 UTC
Description of problem:

[root@host-113 ~]# pvscan
  PV /dev/sdg1   VG global          lvm2 [<21.00 GiB / <20.75 GiB free]
  PV /dev/vda2   VG rhel_host-113   lvm2 [<7.00 GiB / 0    free]
  Total: 2 [27.99 GiB] / in use: 2 [27.99 GiB] / in no VG: 0 [0   ]

# Different window, same machine
host-113: vgcreate  --shared black_bird /dev/sdb1 /dev/sda1 /dev/sdf1 /dev/sdd1 /dev/sdh1 /dev/sdc1 /dev/sde1
host-113: vgchange --lock-start black_bird

# During above vgcreate/vgchange
[root@host-113 ~]# pvscan
  PV /dev/sdg1   VG global          lvm2 [<21.00 GiB / <20.75 GiB free]
  PV /dev/vda2   VG rhel_host-113   lvm2 [<7.00 GiB / 0    free]
  PV /dev/sdf1                      lvm2 [<21.00 GiB]
  PV /dev/sda1                      lvm2 [<21.00 GiB]
  PV /dev/sdc1                      lvm2 [<21.00 GiB]
  PV /dev/sdd1                      lvm2 [<21.00 GiB]
  PV /dev/sdh1                      lvm2 [<21.00 GiB]
  PV /dev/sdb1                      lvm2 [<21.00 GiB]
  PV /dev/sde1                      lvm2 [<21.00 GiB]
  Total: 9 [174.97 GiB] / in use: 2 [27.99 GiB] / in no VG: 7 [<146.98 GiB]

# After above vgcreate/vgchange
[root@host-113 ~]# pvscan
  PV /dev/sdb1   VG black_bird      lvm2 [<21.00 GiB / <20.75 GiB free]
  PV /dev/sda1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sdf1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sdd1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sdh1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sdc1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sde1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sdg1   VG global          lvm2 [<21.00 GiB / <20.75 GiB free]
  PV /dev/vda2   VG rhel_host-113   lvm2 [<7.00 GiB / 0    free]
  Total: 9 [174.96 GiB] / in use: 9 [174.96 GiB] / in no VG: 0 [0   ]




# Different node in the cluster
[root@host-114 ~]# pvscan
  PV /dev/sdg1   VG global          lvm2 [<21.00 GiB / <20.75 GiB free]
  PV /dev/vda2   VG rhel_host-114   lvm2 [<7.00 GiB / 0    free]
  Total: 2 [27.99 GiB] / in use: 2 [27.99 GiB] / in no VG: 0 [0   ]

# During vgcreate/vgchange occurring on host-113
[root@host-114 ~]# pvscan
  Retrying sh global lock
  Retrying sh global lock
  Retrying sh global lock
  Global lock failed: held by other host.
  No matching physical volumes found

# After vgcreate/vgchange occurring on host-113
[root@host-114 ~]# pvscan
  VG black_bird lock skipped: lock start in progress
  Reading VG black_bird without a lock.
  PV /dev/sdb1   VG black_bird      lvm2 [<21.00 GiB / <20.75 GiB free]
  PV /dev/sda1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sde1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sdd1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sdh1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sdc1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sdf1   VG black_bird      lvm2 [<21.00 GiB / <21.00 GiB free]
  PV /dev/sdg1   VG global          lvm2 [<21.00 GiB / <20.75 GiB free]
  PV /dev/vda2   VG rhel_host-114   lvm2 [<7.00 GiB / 0    free]
  Total: 9 [174.96 GiB] / in use: 9 [174.96 GiB] / in no VG: 0 [0   ]


Version-Release number of selected component (if applicable):
3.10.0-689.el7.x86_64

lvm2-2.02.171-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
lvm2-libs-2.02.171-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
lvm2-cluster-2.02.171-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
device-mapper-1.02.140-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
device-mapper-libs-1.02.140-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
device-mapper-event-1.02.140-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
device-mapper-event-libs-1.02.140-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
device-mapper-persistent-data-0.7.0-0.1.rc6.el7    BUILT: Mon Mar 27 10:15:46 CDT 2017
cmirror-2.02.171-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017
sanlock-3.5.0-1.el7    BUILT: Wed Apr 26 09:37:30 CDT 2017
sanlock-lib-3.5.0-1.el7    BUILT: Wed Apr 26 09:37:30 CDT 2017
lvm2-lockd-2.02.171-8.el7    BUILT: Wed Jun 28 13:28:58 CDT 2017

Comment 2 David Teigland 2017-07-06 20:10:29 UTC
The issue here is that the global lock is held for the duration of vgcreate, and vgcreate can take longer (with sanlock) than the default lock retry timeout used by other nodes:

# lvmconfig --type default  --withcomments global/lvmlockd_lock_retries
# Configuration option global/lvmlockd_lock_retries.
# Retry lvmlockd lock requests this many times.
# Applicable only if LVM is compiled with lockd support
# This configuration option has an automatic default value.
# lvmlockd_lock_retries=3

Three retries is usually enough to hide incidental lock conflicts when nodes happen to be running concurrent commands requesting conflicting locks, because most locks are held for short periods.  vgcreate is the main exception where a lock is held for a longer time.  I've been intending to split up the sanlock operations in vgcreate so that the long part is done outside of the global lock.

One way to confirm that this is really what's happening is to increase the retries for the given command, e.g. pvscan --config global/lvmlockd_lock_retries=10

Comment 4 RHEL Program Management 2021-01-15 07:39:33 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.


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