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 836663 - vgname missing from pvs output when PV contains ignored mda
Summary: vgname missing from pvs output when PV contains ignored mda
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.4
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: 6.4
Assignee: Alasdair Kergon
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 773665 798635 836720 843808 896505
TreeView+ depends on / blocked
 
Reported: 2012-06-29 20:54 UTC by Alasdair Kergon
Modified: 2018-11-28 20:37 UTC (History)
16 users (show)

Fixed In Version: lvm2-2.02.97-2.el6
Doc Type: Bug Fix
Doc Text:
When processing a PV that appears to be an orphan but contains an ignored mda, a scan needed to be triggered before the VG name field can be relied upon. The field is now displayed correctly first time.
Clone Of:
Environment:
Last Closed: 2013-02-21 08:11:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:0501 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2013-02-20 21:30:45 UTC

Description Alasdair Kergon 2012-06-29 20:54:39 UTC
When processing a PV that appears to be an orphan but contains an ignored mda,
a scan needs to be triggered before the VG name field can be relied upon.

   > pvs -o +mda_count,vg_mda_count /dev/loop[0123]
      PV         VG   Fmt  Attr PSize  PFree  #PMda #VMda
      /dev/loop0 vg3  lvm2 a-   96.00m 96.00m     0     1
      /dev/loop1 vg3  lvm2 a-   96.00m 96.00m     1     1
      /dev/loop2 vg2  lvm2 a-   96.00m 96.00m     1     2
      /dev/loop3 vg2  lvm2 a-   28.00m 28.00m     1     2
    
    > pvs /dev/loop2 /dev/loop3 /dev/loop0 /dev/loop1 --unbuffered
      PV         VG   Fmt  Attr PSize   PFree
      /dev/loop2      lvm2 a--  100.00m 100.00m
      /dev/loop3 vg2  lvm2 a--   28.00m  28.00m
      /dev/loop0      lvm2 a--  100.00m 100.00m
      /dev/loop1 vg3  lvm2 a--   96.00m  96.00m
    
The blank VG entries should contain vg2 and vg3.

Comment 1 Alasdair Kergon 2012-06-29 20:56:32 UTC
Proposed fix:

https://lists.fedorahosted.org/pipermail/lvm2-commits/2012-June/000053.html

In process_each_pv() if we haven't yet scanned and the PV appears
to be an orphan, we must scan the other PVs looking for mdas that
reference it to find out what VG it is in.

1. If the PV has no mdas, we must scan.
2. If the PV has an mda that is not ignored we do not need to scan.
3. If the PV has an mda that is ignored, we do need to scan.

Comment 3 Alasdair Kergon 2012-06-29 21:02:40 UTC
Bug dates back to the introduction of ignored mdas in 2.02.69 in June 2010.

Comment 5 Corey Marthaler 2012-07-26 19:24:38 UTC
Adding QA ack for 6.4.

Devel will need to provide unit testing results however before this bug can be
ultimately verified by QA.

Comment 7 Alasdair Kergon 2012-08-08 12:18:23 UTC
See the linked commit message - testing involves creating PVs with/without mdas, putting them into VGs, then running 'pvs' with the PVs listed in various orders and seeing that the output in the VG column is always correct and doesn't depend on the order of the PVs on the command line.

Comment 12 Nenad Peric 2012-12-12 10:50:44 UTC
Tested and marking verified with 

lvm2-2.02.98-4.el6

The order of PVs in pvs did not change the output when there was a mix of MDA-containing and MDA-ignored devices.

Comment 13 errata-xmlrpc 2013-02-21 08:11:06 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.

http://rhn.redhat.com/errata/RHBA-2013-0501.html


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