master - lvmconf: add --enable-halvm, --disable-halvm, --services, --mirrorservice, --startstopservices options and use proper global/use_lvmetad default value
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f814d763c60f795dd7616b57fbcd55f1761fcc3c Commit: f814d763c60f795dd7616b57fbcd55f1761fcc3c Parent: cc26085b62d8cad265fca86426c65c88491a7473 Author: Peter Rajnoha <[email protected]> AuthorDate: Mon Apr 13 15:27:17 2015 +0200 Committer: Peter Rajnoha <[email protected]> CommitterDate: Mon Apr 13 15:27:17 2015 +0200
lvmconf: add --enable-halvm, --disable-halvm, --services, --mirrorservice, --startstopservices options and use proper global/use_lvmetad default value
This patch adds new options to lvmconf:
--enable-halvm (just like --enable-cluster, but configure LVM
for use in HA LVM - meaning disabling lvmetad and making sure we have locking_type=1)
--disable-halvm (just like --disable-cluster, but configure LVM
back from HA LVM - meaning enabling lvmetad if it's enabled by default and making sure we have default locking type set)
--services (causes clvmd and lvmetad services to be enabled or
disabled appropriately and conforming to the changes in lvm configuration we've just made with lvmconf)
--mirrorservice (in addition to clvmd and lvmetad services, also
enable or disable cmirrord service appropriately; this is a separate option because cmirrord is optional and it doesn't need to be always enabled when clvmd is enabled)
--startstopservices (in addition to enabling or disabling services,
start and stop these services immediately)
These options are supposed to help users to make their system ready for cluster with clvmd (active-active) or HA LVM (active-passive) use while lvmconf script can handle services as well so users don't need to bother about setting them manually.
Also, before this patch, we hardcoded global/use_lvmetad=0 as default value in lvmconf script. Howeverm this default may change by just flipping the value in config_settings.h and we may forget to edit the lvmconf. It's better to use lvm dumpconfig --type default global/use_lvmetad to get the actual default value and use this one instead of hardcoded one.
--- WHATS_NEW | 2 + man/lvmconf.8.in | 24 +++++++ scripts/lvmconf.sh | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 198 insertions(+), 2 deletions(-)
WHATS_NEW +2 -0
@@ -1,5 +1,7 @@ Version 2.02.119 - ================================== + Add --services, --mirrorservice and --startstopservices option to lvmconf. + Use proper default value of global/use_lvmetad when processing lvmconf script. Respect allocation/cling_tag_list during intial contiguous allocation. Add A_PARTITION_BY_TAGS set when allocated areas should not share tags. Set correct vgid when updating cache when writing PV metadata.
man/lvmconf.8.in +24 -0
@@ -6,12 +6,17 @@ lvmconf \(em LVM configuration modifier .B lvmconf .RB [ \-\-disable-cluster ] .RB [ \-\-enable-cluster ] +.RB [ \-\---enable-halvm ] +.RB [ \-\---disable-halvm ] .RB [ \-\-file .RI < configfile >] .RB [ \-\-lockinglib .RI < lib >] .RB [ \-\-lockinglibdir .RI < dir >] +.RB [ \-\-services ] +.RB [ \-\-mirrorservice ] +.RB [ \-\-startstopservices ] .SH "DESCRIPTION" lvmconf is a script that modifies the locking configuration in
@@ -27,6 +32,14 @@ lvmetad use to its default. 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-halvm +Set \fBlocking_type\fR to the default non-clustered type. Also reset +lvmetad use to its default. +.TP +.BR \-\-enable-halvm +Set \fBlocking_type\fR suitable for HA LVM use. +Also disable lvmetad use as it is not yet supported in HA LVM environment. +.TP .BR \-\-file " <" \fIconfigfile > Apply the changes to \fIconfigfile\fP instead of the default \fI#DEFAULT_SYS_DIR#/lvm.conf\fP.
@@ -35,6 +48,17 @@ Apply the changes to \fIconfigfile\fP instead of the default Set external \fBlocking_library\fR locking library to load if an external locking type is used. .TP .BR \-\-lockinglibdir " <" \fIdir > +.TP +.BR \-\-services +In addition to setting the lvm configuration, also enable or disable related Systemd or SysV +clvmd and lvmetad services. +.TP +.BR \-\-mirrorservice +Also enable or disable optional cmirrord service when handling services (applicable only with \-\-services). +.TP +.BR \-\-startstopservices +In addition to enabling or disabling related services, start or stop them immediately +(applicable only with \-\-services). .SH FILES .I #DEFAULT_SYS_DIR#/lvm.conf
scripts/lvmconf.sh +172 -2
232 lines not on this page · raw message