Bug 857064 - vgdisplay -A shows VolumeGroups which are not active
vgdisplay -A shows VolumeGroups which are not active
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.3
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Peter Rajnoha
Cluster QE
:
: 927224 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-13 09:43 EDT by Nobin
Modified: 2014-10-14 04:23 EDT (History)
13 users (show)

See Also:
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 04:23:32 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nobin 2012-09-13 09:43:46 EDT
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 10:43:04 EDT
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 08:38:12 EDT
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 05:25:00 EST
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 09:32:42 EDT
*** Bug 927224 has been marked as a duplicate of this bug. ***
Comment 8 Peter Rajnoha 2013-05-17 06:08:15 EDT
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 08:45:33 EST
(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 09:16:10 EDT
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 04:23:32 EDT
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

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