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 995157 - [RHEL 6.4] LVM allows setting of clustered attribute on VG even though clvmd or cluster configured or running.
Summary: [RHEL 6.4] LVM allows setting of clustered attribute on VG even though clvmd ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.4
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: 6.6
Assignee: Jonathan Earl Brassow
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 1056252 BrassowRHEL6Bugs
TreeView+ depends on / blocked
 
Reported: 2013-08-08 16:38 UTC by Kevin Toyama
Modified: 2018-12-03 19:33 UTC (History)
12 users (show)

Fixed In Version: lvm2-2.02.107-1.el6
Doc Type: Bug Fix
Doc Text:
If a user attempts to assign the clustered attribute to a volume group (i.e. 'vgchange -cy VG') and the system is not yet properly configured for it, they will be prompted to confirm the change. The prompt can be overriden by supplying the '--yes' argument.
Clone Of:
Environment:
Last Closed: 2014-10-14 08:24:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3618 0 None None None Never
Red Hat Product Errata RHBA-2014:1387 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2014-10-14 01:39:47 UTC

Comment 6 Zdenek Kabelac 2013-08-08 23:06:17 UTC
(In reply to Kevin Toyama from comment #0)
> Description of problem:
> Customer is not running clvmd nor has cluster confgured to be running. 
> vgchange -cy <VGNAME> allows the clustered attribute to be set and skips the
> VG in future LVM commands due to clustered being set.
> 
> Version-Release number of selected component (if applicable):
> lvm2-2.02.98-9.el6.x86_64
> 
> How reproducible:
> always
> 
> Steps to Reproduce:
> 1. verify clvmd and clustering is not running (ps -ef|grep clvmd; clustat)
> 2. vgchange -an testvg
> 3. vgchange -cy testvg
> 4. vgchange -ay
> 
> Actual results:
> "Skipping clustered volume group vg_vdb"
> 
> Expected results:
> LVM command should prompt and warn about enabling clustered attribute on VG
> if clvmd or cluster is not running.  Or should prompt regardless to be sure
> that end user *REALLY* wants this enabled.


-cy  is not an option a user should just play with without thinking (just like user should not play with 'rm' command).

lvm is not enforcing the order in which way the user setups his cluster - so there is not requirement to enable clvmd first and just the make a VG clustered - it's upto the admin to switch the VG first or just after clvmd is enabled.
(And if would cause a regression to those users, if we would have enforced
availability of clvmd first)

The only necessary thing is to have all LVs inactive in such VG.

The remove of clustered flag is not trivial without clustered locking available, since there is missing knowledge about active locks for this case.
(We don't know if just dlm got broken, network is not working....)

That's why the only supported way for now is to disable locking with the assumption, the admin is fully aware of consequences of this step.

Comment 8 Alasdair Kergon 2013-08-08 23:17:35 UTC
For users who do rely on the code to work as it is, we will provide a release note saying they need to add --yes to the command in their scripts.

Comment 10 Jonathan Earl Brassow 2014-06-06 03:34:00 UTC
Fix checked-in upstream:
commit 9399b74356f9d0c2fbbac824908b15d63c3935cd
Author: Jonathan Brassow <jbrassow>
Date:   Thu Jun 5 22:27:40 2014 -0500

    vgchange: Prompt when setting VG cluster attr if cluster is not setup
    
    If clvmd is not running or the locking type is not clustered and someone
    attempts to set the cluster attribute on a volume group, prompt them to
    see if they are sure.  (Only prompt for one though.  If neither are true,
    simply ask them once.)

Comment 11 Jonathan Earl Brassow 2014-06-06 03:39:08 UTC
TO TEST, DO THE FOLLOWING:

vgchange should prompt if clvmd is not running or the locking_type is not a clustered locking type.  (Before the patch, vgchange would simply change the attribute regardless.)

[root@bp-01 lvm2]# vgchange -cy vg
LVM cluster daemon (clvmd) is not running.
Make volume group "vg" clustered anyway? [y/n]: n
  Command failed with status code 5.

[root@bp-01 lvm2]# clvmd
[root@bp-01 lvm2]# vgchange -cy vg
LVM locking type is not clustered.
Make volume group "vg" clustered anyway? [y/n]: n
  Command failed with status code 5.

[root@bp-01 lvm2]# nano /etc/lvm/lvm.conf 
[root@bp-01 lvm2]# vgchange -cy vg
  Volume group "vg" successfully changed

[root@bp-01 lvm2]# vgchange -cn vg
  Volume group "vg" successfully changed

Comment 12 Jonathan Earl Brassow 2014-06-06 03:51:25 UTC
Additional commit upstream:

commit c0f9c79ae8e1df16d23f3eb608fb4bf5455ec841
Author: Jonathan Brassow <jbrassow>
Date:   Thu Jun 5 22:45:19 2014 -0500

    vgchange:  With '--yes', don't prompt the user
    
    If the user supplies a '--yes' argument, then don't bother them with
    a question to confirm whether to change the cluster attribute (even
    if clvmd isn't running).

Comment 14 Nenad Peric 2014-06-30 12:08:05 UTC
LVM is prompting for confirmation regarding the marking of a VG as a member of cluster.
It adds a human-readable error message as well.

[root@virt-015 ~]# vgchange -cy my_vg
LVM cluster daemon (clvmd) is not running.
Make volume group "my_vg" clustered anyway? [y/n]: n
  No volume groups changed.


[root@virt-015 ~]# vgchange -cy my_vg
  connect() failed on local socket: No such file or directory
  Internal cluster locking initialisation failed.
  WARNING: Falling back to local file-based locking.
  Volume Groups with the clustered attribute will be inaccessible.
LVM cluster daemon (clvmd) is not running.
Make volume group "my_vg" clustered anyway? [y/n]: 
LVM cluster daemon (clvmd) is not running.
Make volume group "my_vg" clustered anyway? [y/n]: n
  No volume groups changed.


Providing the --yes argument, the command proceeds without the checks mentioned above:

[root@virt-015 ~]# vgchange -cy --yes two
  Volume group "two" successfully changed


All tests were done on a single server (no HA/clusering set up)



Marking 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 16 errata-xmlrpc 2014-10-14 08:24:37 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


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