Bug 820991 - Adding an option to silently skip the clustered volume groups
Adding an option to silently skip the clustered volume groups
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.3
Unspecified Unspecified
urgent Severity urgent
: rc
: ---
Assigned To: Alasdair Kergon
Cluster QE
: ZStream
: 1005415 (view as bug list)
Depends On:
Blocks: 820982 951600 986463 1024911 1034764 1116944
  Show dependency treegraph
 
Reported: 2012-05-11 09:53 EDT by Federico Simoncelli
Modified: 2014-07-07 12:38 EDT (History)
23 users (show)

See Also:
Fixed In Version: lvm2-2.02.100-5.el6
Doc Type: Bug Fix
Doc Text:
When there were visible clustered Volume Groups in the system, it was not possible to silently skip them with proper return error code while non-clustered locking type was used (the global/locking_type lvm.conf setting). To fix this bug, "--ignoreskippedcluster" option has been added for several LVM commands (pvs, vgs, lvs, pvdisplay, vgdisplay, lvdisplay, vgchange, and lvchange). With this option, the clustered Volume Groups are skipped correctly without any warning/error messages while the return error code also does not depend on these clustered Volume Groups.
Story Points: ---
Clone Of:
: 986463 1034764 (view as bug list)
Environment:
Last Closed: 2013-11-21 18:16:34 EST
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 169913 None None None Never

  None (edit)
Description Federico Simoncelli 2012-05-11 09:53:51 EDT
Description of problem:
When there are visible clustered vgs in the system it's not possible to silently skip them (no output and exit code 0) keeping locking_type=1.

Version-Release number of selected component (if applicable):
lvm2-2.02.95-7.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. create a clustered vg
2. set the locking_type=1
3. pvs
  
Actual results:
# pvs
  Skipping clustered volume group vg-share2
# echo $?
5

Expected results:
There should be a way to skip the clustered volume groups, eg:
# pvs --skip-clustered
# echo $?
0
Comment 2 RHEL Product and Program Management 2012-05-15 00:04:11 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 4 RHEL Product and Program Management 2012-12-14 03:10:21 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 14 Peter Rajnoha 2013-09-19 03:04:49 EDT
(bug #1005415)

Also, during boot and the vgchange -ay call in rc.sysinit script, we get a "FAILURE" initscript status because of non-zero return value - this might be confusing (clustered VGs are activated later by another vgchange -ay call that is a part of the clvmd init script once we have cluster properly set up). The option to silently skip clustered volume groups on activation should be also used in this rc.sysinit script - once we have this option in, let's update initscripts as well.
Comment 15 Peter Rajnoha 2013-09-19 03:05:20 EDT
*** Bug 1005415 has been marked as a duplicate of this bug. ***
Comment 16 Alasdair Kergon 2013-09-30 21:06:44 EDT
I have a prototype patch that adds a new --ignoreskippedcluster option to pvs.

This changes the 'Skipping' messages from stderr to verbose and means clustered VGs have no effect on the exit status if clustered locking is unavailable.
Comment 21 Nenad Peric 2013-10-21 10:52:38 EDT
[root@virt-008 ~]# pvs --config 'global {locking_type = 1}'
  Skipping clustered volume group cluster
  Skipping volume group cluster
  Skipping clustered volume group cluster
  Skipping volume group cluster
  Skipping clustered volume group cluster
  Skipping volume group cluster
  Skipping clustered volume group cluster
  Skipping volume group cluster
  Skipping clustered volume group cluster
  Skipping volume group cluster
  Skipping clustered volume group cluster
  Skipping volume group cluster
  PV         VG         Fmt  Attr PSize PFree
  /dev/vda2  vg_virt008 lvm2 a--  7.51g    0 
[root@virt-008 ~]# echo $?
5
[root@virt-008 ~]# pvs --ignoreskippedcluster --config 'global {locking_type = 1}'
  PV         VG         Fmt  Attr PSize PFree
  /dev/vda2  vg_virt008 lvm2 a--  7.51g    0 
[root@virt-008 ~]# echo $?
0
[root@virt-008 ~]# 


Verified with: lvm2-2.02.100-6.el6.x86_64
Comment 32 John Ruemker 2013-11-08 11:32:11 EST
Do we need another bug to pursue rc.sysinit changes?
Comment 33 Peter Rajnoha 2013-11-11 04:50:45 EST
(In reply to John Ruemker from comment #32)
> Do we need another bug to pursue rc.sysinit changes?

Yes that would be a separate change for the "initscripts" component.
Comment 34 errata-xmlrpc 2013-11-21 18:16:34 EST
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-1704.html
Comment 35 John Ruemker 2013-11-26 08:38:35 EST
Bug for rc.sysinit change: https://bugzilla.redhat.com/show_bug.cgi?id=1034764

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