Skip to contentSkip to conversation

lvmconf: add support for enabling/disabling lvmlockd

PATCH New [email protected] 1 participant 1 message Aug 5, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 lvmconf: add support for enabling/disabling lvmlockd

From: Eric Ren <[email protected]>

lvmconf is handy when you need to change lvm.conf in script, like resource agent in HA cluster. This patch add support for enabling/disabling lvmlockd, and also fix some trivial issues in the original.

Changes since v1:
"use_lvmlockd =" will appear in lvm.conf when other options are used, i.e. lvmconf --enable-cluster. Fix it by checking "USE_LVMLOCKD" to avoid unncessary change to use_lvmlockd.

---
 man/lvmconf.8_main |  18 +++++++--
 scripts/lvmconf.sh | 114 ++++++++++++++++++++++++++++++++++++++++-------------
 2 files changed, 101 insertions(+), 31 deletions(-)
man/lvmconf.8_main +14 -4
index ca66ae6..698c336 100644
@@ -4,8 +4,10 @@
 lvmconf \(em LVM configuration modifier
 .SH "SYNOPSIS"
 .B lvmconf
-.RB [ --disable-cluster ]
 .RB [ --enable-cluster ]
+.RB [ --disable-cluster ]
+.RB [ --enable-lvmlockd ]
+.RB [ --disable-lvmlockd ]
 .RB [ --enable-halvm ]
 .RB [ --disable-halvm ]
 .RB [ --file
@@ -26,13 +28,21 @@ changes in the lvm configuration if needed.
 
 .SH "OPTIONS"
 .TP
+.BR --enable-cluster
+Set \fBlocking_type\fR to the default clustered type on this system.
+Also disable lvmetad use as it is not yet supported in clustered environment.
+.TP
 .BR --disable-cluster
 Set \fBlocking_type\fR to the default non-clustered type. Also reset
 lvmetad use to its default.
 .TP
-.BR --enable-cluster
-Set \fBlocking_type\fR to the default clustered type on this system.
-Also disable lvmetad use as it is not yet supported in clustered environment.
+.BR --enable-lvmlockd
+Set \fBlocking_type=1\fR and \fBuse_lvmlockd=1\fR to use lvmlockd on this system.
+Also enable lvmetad since lvmlockd can work with it.
+.TP
+.BR --disable-lvmlockd
+Set \fBuse_lvmlockd=0\fR to disable lvmlockd, and set \fBlocking_type=1\fR.
+Also reset lvmetad use to its default.
 .TP
 .BR --disable-halvm
 Set \fBlocking_type\fR to the default non-clustered type. Also reset
scripts/lvmconf.sh +87 -27

178 lines not on this page · raw message

Signature · 1 line
2.10.2