Bug 857064

Summary: vgdisplay -A shows VolumeGroups which are not active
Product: Red Hat Enterprise Linux 6 Reporter: Nobin <nkuriako>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
lvm2 sub component: Displaying and Reporting (RHEL6) QA Contact: Cluster QE <mspqa-list>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: adeshmuk, agk, dgeevarg, dwysocha, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, pyaduvan, thornber, zkabelac
Version: 6.3   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.107-1.el6 Doc Type: Bug Fix
Doc Text:
Cause: Missing proper handling of -A/--activevolumegroups option for vgdisplay. Consequence: vgdisplay also displayed inactive VGs even though -A/--activevolumegroups option was used which should have caused the vgdisplay command to display only active VGs. Fix: Proper handling of -A/--activevolumegroups option for vgdisplay has been added. Result: When using vgdisplay -A/--activevolumegroups, only active VGs are displayed - active VGs defined here as a VG that contains at least one active LV.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 08:23:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nobin 2012-09-13 13:43:46 UTC
Description of problem: vgdisplay -A shows VolumeGroups which are not active


Version-Release number of selected component (if applicable): Red Hat Enterprise Linux 6.3


How reproducible: 100%


Steps to Reproduce:
1. vgchange -an testvg
2. vgdisplay -A
3.
  
Actual results: It is displaying innactive Volume Group information as well.


Expected results: It should not display innacitive Volume Group information.


Additional info: NA

Comment 3 Alasdair Kergon 2012-09-14 14:43:04 UTC
I propose defining 'active volume group' as meaning a VG in which at least one LV is active.

Comment 4 Peter Rajnoha 2012-10-19 12:38:12 UTC
I think this is something we could incorporate within bug #867376 which is a request for "criteria-based reporting" in general. In this case, the criteria would be "active VG". The existing (but not yet implemented) "-A, --activevolumegroups" option would become a synonym for the new option that will define general criteria.

Comment 5 Peter Rajnoha 2012-11-28 10:25:00 UTC
Let's have this solved generally as part of above-mentioned bug #867376 to avoid doubling the work. Moving to 6.5 for consideration.

Comment 7 Alasdair Kergon 2013-03-25 13:32:42 UTC
*** Bug 927224 has been marked as a duplicate of this bug. ***

Comment 8 Peter Rajnoha 2013-05-17 10:08:15 UTC
This is dependent on a more general solution to bug #867376 (but if we have a quick and simple patch for vgdisplay -A, we might probably add it till the bug #867376 gets resolved).

Comment 11 Peter Rajnoha 2013-12-03 13:45:33 UTC
(In reply to Peter Rajnoha from comment #8)
> This is dependent on a more general solution to bug #867376 (but if we have
> a quick and simple patch for vgdisplay -A, we might probably add it till the
> bug #867376 gets resolved).

Let's got with the simple patch first so the functionality is there (later, this may end up mapped to new code internally already as mentioned in comment #4).

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=6232cac86cea332efb1e538fc8cd1922dc35bd01

Comment 16 Nenad Peric 2014-07-03 13:16:10 UTC
Checked that -A displays only VGs which have at least one LV active, as proposed in Comment #3

[root@virt-015 ~]# vgdisplay -A | grep VG\ Name
  VG Name               vg_two
  VG Name               vg_virt015

[root@virt-015 ~]# lvchange -ay vg_one/lv1
[root@virt-015 ~]# vgdisplay -A | grep VG\ Name
  VG Name               vg_two
  VG Name               vg_virt015
  VG Name               vg_one


Both VGs have two LVs defined, as soon as one is active, the vgdisplay command will show the VG as active. 


Marking the specified functionality VERIFIED with:

lvm2-2.02.107-1.el6    BUILT: Mon Jun 23 16:44:45 CEST 2014
lvm2-libs-2.02.107-1.el6    BUILT: Mon Jun 23 16:44:45 CEST 2014
lvm2-cluster-2.02.107-1.el6    BUILT: Mon Jun 23 16:44:45 CEST 2014
udev-147-2.55.el6    BUILT: Wed Jun 18 13:30:21 CEST 2014
device-mapper-1.02.86-1.el6    BUILT: Mon Jun 23 16:44:45 CEST 2014
device-mapper-libs-1.02.86-1.el6    BUILT: Mon Jun 23 16:44:45 CEST 2014
device-mapper-event-1.02.86-1.el6    BUILT: Mon Jun 23 16:44:45 CEST 2014
device-mapper-event-libs-1.02.86-1.el6    BUILT: Mon Jun 23 16:44:45 CEST 2014
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 15:43:06 CEST 2014
cmirror-2.02.107-1.el6    BUILT: Mon Jun 23 16:44:45 CEST 2014

Comment 17 errata-xmlrpc 2014-10-14 08:23:32 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-2014-1387.html