Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1211507

Summary: Extend lvmconf script to configure lvm.conf for HA LVM use and add possibility to also set Systemd services accordingly
Product: Red Hat Enterprise Linux 7 Reporter: Peter Rajnoha <prajnoha>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
lvm2 sub component: Scripts / lvmdump / vgimportclone QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: medium CC: agk, fdanapfe, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, rbednar, zkabelac
Version: 7.2Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.125-1.el7 Doc Type: Bug Fix
Doc Text:
The lvmconf script has been extended to support new --enable-halvm and --disable-halvm options as well as new --startstopservices and --mirrorservice options. The --enable/--disable-halvm options cause the lvm.conf to be edited automatically in way for lvm2 to be configured for HA LVM setup. Using he --startstopservices and --mirrorservice options, lvmconf script will automatically set state of services so it's prepared for either clustered LVM with clvmd or HA LVM setup. See lvmconf man page for more information about these new options.
Story Points: ---
Clone Of:
: 1211645 1223090 (view as bug list) Environment:
Last Closed: 2015-11-19 12:46:29 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:
Bug Depends On:    
Bug Blocks: 1211645, 1223090, 1223093    
Attachments:
Description Flags
test results none

Description Peter Rajnoha 2015-04-14 08:04:58 UTC
(Opening report to track this change properly for RHEL7.2 update, started originally in bug #1208523.)

Just like we have lvmconf --enable-cluster which makes sure that locking_type=3 and use_lvmetad=0 is set in lvm.conf, add --enable-halvm to make sure that locking_type=1 and use_lvmetad=0 is set in lvm.conf.

Also, to remove burden from users, make it easier for them so they can also set proper state for services when switching to/from cluster/halvm.

The lvmconf script is now patched upstream and it provides these changes:

  --> new "--enable-halvm" (sets locking_type=1 and use_lvmetad=0)
  --> new "--disable-halvm" option (go backward - sets default locking type, which is locking_type=1 and default use_lvmetad which in case of RHEL7 is 1)
  --> new "--services" option to handle Systemd/SysV services according to changes done in LVM configuration (in case of RHEL7, this just encompasses lvm2-lvmetad systemd service since clvmd is managed as cluster resource by resource-agents), this option causes the services to be enabled or disabled accordingly
  --> new "--mirrorservice" option to handle cmirrord service in addition (not applicable to RHEL7 since cmirrord service is also run as cluster resource)
  --> new "--startstopservices" option to also start or stop services according to lvm.conf changes immediately

Patches:

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

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=695237f2ae2f2c34f8abc30b6c03467a06c28945

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

Comment 9 Roman Bednář 2015-10-08 09:17:25 UTC
Tested on:

3.10.0-321.el7.x86_64

lvm2-2.02.130-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
lvm2-libs-2.02.130-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
lvm2-cluster-2.02.130-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
device-mapper-1.02.107-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
device-mapper-libs-1.02.107-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
device-mapper-event-1.02.107-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
device-mapper-event-libs-1.02.107-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
device-mapper-persistent-data-0.5.5-1.el7    BUILT: Thu Aug 13 16:58:10 CEST 2015
cmirror-2.02.130-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015


Marking as verified.

Details in attachment.

Comment 10 Roman Bednář 2015-10-08 09:18:41 UTC
Created attachment 1080934 [details]
test results

Comment 11 errata-xmlrpc 2015-11-19 12:46:29 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.

https://rhn.redhat.com/errata/RHBA-2015-2147.html