master - config: Introduce lvmconfig.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3f0434057b8b77efd63fe0c502a962bc9dd13223 Commit: 3f0434057b8b77efd63fe0c502a962bc9dd13223 Parent: beb229e1e8e8b95de09920195c2bc4171e89dc19 Author: Alasdair G Kergon <[email protected]> AuthorDate: Tue Apr 28 17:00:37 2015 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Tue Apr 28 17:00:37 2015 +0100
config: Introduce lvmconfig.
'lvm dumpconfig' now does a lot more than just dumping configuration information and is no longer only a support tool. Users now need to run it to find out about configuration information that has been removed from the lvm.conf man page so we need to promote this to full command line status as 'lvmconfig'. Also accept 'lvm config' and mention it in the usage information of lvmconf (which should also get merged in eventually).
--- WHATS_NEW | 1 + man/Makefile.in | 6 +- man/clvmd.8.in | 2 +- man/lvm-config.8.in | 1 + man/lvm-dumpconfig.8.in | 163 +--------------------------------------------- man/lvm.8.in | 14 +++-- man/lvm.conf.5.in | 22 +++--- man/lvmconfig.8.in | 166 +++++++++++++++++++++++++++++++++++++++++++++++ man/lvmetad.8.in | 2 +- scripts/lvmconf.sh | 3 +- tools/Makefile.in | 2 +- tools/commands.h | 52 ++++++++++++++- tools/dumpconfig.c | 10 +++ tools/lvmcmdline.c | 4 +- 14 files changed, 261 insertions(+), 187 deletions(-)
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.119 - ================================== + Introduce lvmconfig as the preferred form of 'lvm dumpconfig'. Add lv_ancestors and lv_descendants reporting fields. Add --ignorelocal option to dumpconfig to ignore the local section. Close connection to lvmetad after fork.
man/Makefile.in +3 -3
@@ -42,9 +42,9 @@ endif MAN5=lvm.conf.5 MAN7=lvmsystemid.7 -MAN8=lvm-dumpconfig.8 \ - lvchange.8 lvconvert.8 lvcreate.8 lvdisplay.8 lvextend.8 lvm.8 \ - lvmchange.8 lvmconf.8 lvmdiskscan.8 lvmdump.8 lvmsadc.8 lvmsar.8 \ +MAN8=lvm-config.8 lvm-dumpconfig.8 \ + lvchange.8 lvmconfig.8 lvconvert.8 lvcreate.8 lvdisplay.8 lvextend.8 \ + lvm.8 lvmchange.8 lvmconf.8 lvmdiskscan.8 lvmdump.8 lvmsadc.8 lvmsar.8 \ lvreduce.8 lvremove.8 lvrename.8 lvresize.8 lvs.8 \ lvscan.8 pvchange.8 pvck.8 pvcreate.8 pvdisplay.8 pvmove.8 pvremove.8 \ pvresize.8 pvs.8 pvscan.8 vgcfgbackup.8 vgcfgrestore.8 vgchange.8 \
man/clvmd.8.in +1 -1
@@ -118,7 +118,7 @@ Display the version of the cluster LVM daemon. .SH ENVIRONMENT VARIABLES .TP .B LVM_CLVMD_BINARY -The CLVMD binary to use when \fBclmvd\fP restart is requested. +The CLVMD binary to use when \fBclvmd\fP restart is requested. Defaults to #CLVMD_PATH#. .TP .B LVM_BINARY
man/lvm-config.8.in new file +1 -0
@@ -0,0 +1 @@ +.so man8/lvm-config.8
man/lvm-dumpconfig.8.in +1 -162
163 lines not on this page · raw message
man/lvm.8.in +9 -5
@@ -43,11 +43,12 @@ path of \fBlvm\fP. The following commands are built into lvm without links normally being created in the filesystem for them. .TP -\fBdumpconfig\fP \(em Display the configuration information after -loading \fBlvm.conf\fP(5) and any other configuration files. +\fBconfig\fP \(em The same as \fBlvmconfig\fP(8) below. .TP \fBdevtypes\fP \(em Display the recognised built-in block device types. .TP +\fBdumpconfig\fP \(em The same as \fBlvmconfig\fP(8) below. +.TP \fBformats\fP \(em Display recognised metadata formats. .TP \fBhelp\fP \(em Display the help text.
@@ -136,6 +137,9 @@ Volumes. .TP \fBlvmchange\fP \(em Change attributes of the Logical Volume Manager. .TP +\fBlvmconfig\fP \(em Display the configuration information after +loading \fBlvm.conf\fP(5) and any other configuration files. +.TP \fBlvmdiskscan\fP \(em Scan for all devices visible to LVM2. .TP \fBlvmdump\fP \(em Create lvm2 information dumps for diagnostic purposes.
@@ -316,8 +320,8 @@ way it fits with other LVM configuration methods. .IR \fB\-\-profile " " \fIProfileName A short form of \fB\-\-metadataprofile\fP for \fBvgcreate\fP, \fBlvcreate\fP, \fBvgchange\fP and \fBlvchange\fP command and a short form of \fB\-\-commandprofile\fP -for any other command (with the exception of \fBdumpconfig\fP command where the -\-\-profile has special meaning, see \fBlvm dumpconfig\fP(8) for more information). +for any other command (with the exception of \fBlvmconfig\fP command where the +\-\-profile has special meaning, see \fBlvm lvmconfig\fP(8) for more information). .TP .IR \fB\-\-config " " \fIConfigurationString Uses the ConfigurationString as direct string representation of the configuration
@@ -529,7 +533,6 @@ Path for the lvmetad socket file. .BR lvm.conf (5), .BR lvmcache (7), .BR lvmthin (7), -.BR lvm\ dumpconfig (8), .BR clvmd (8), .BR dmsetup (8), .BR lvchange (8),
@@ -537,6 +540,7 @@ Path for the lvmetad socket file. .BR lvdisplay (8), .BR lvextend (8), .BR lvmchange (8), +.BR lvmconfig (8), .BR lvmdiskscan (8), .BR lvreduce (8), .BR lvremove (8),
man/lvm.conf.5.in +11 -11
@@ -65,8 +65,8 @@ For this purpose, there's the \fBcommand_profile_template.profile\fP (for metadata profiles) which contain all settings that are customizable by profiles of certain type. Users are encouraged to copy these template profiles and edit them as needed. Alternatively, the -\fBlvm dumpconfig \-\-file <ProfileName.profile> \-\-type profilable-command <section>\fP -or \fBlvm dumpconfig \-\-file <ProfileName.profile> \-\-type profilable-metadata <section>\fP +\fBlvm lvmconfig \-\-file <ProfileName.profile> \-\-type profilable-command <section>\fP +or \fBlvm lvmconfig \-\-file <ProfileName.profile> \-\-type profilable-metadata <section>\fP can be used to generate a configuration with profilable settings in either of the type for given section and save it to new ProfileName.profile (if the section is not specified, all profilable settings are reported).
@@ -91,7 +91,7 @@ this \fBconfig cascade\fP from left to right: No part of this cascade is compulsory. If there's no setting value found at the end of the cascade, a default value is used for that setting. -Use \fBlvm dumpconfig\fP to check what settings are in use and what +Use \fBlvmconfig\fP to check what settings are in use and what the default values are. .SH SYNTAX .LP
@@ -158,38 +158,38 @@ with a letter can be left unquoted. .SH SETTINGS The -.B lvm dumpconfig +.B lvmconfig command prints the LVM configuration settings in various ways. See the man page -.BR lvm-dumpconfig (8). +.BR lvmconfig (8). Command to print a list of all possible config settings, with their default values: .br -.B lvm dumpconfig \-\-type default +.B lvmconfig \-\-type default Command to print a list of all possible config settings, with their default values, and a full description of each as a comment: .br -.B lvm dumpconfig \-\-type default --withfullcomments +.B lvmconfig \-\-type default --withfullcomments Command to print a list of all possible config settings, with their current values (configured, non-default values are shown): .br -.B lvm dumpconfig \-\-type current +.B lvmconfig \-\-type current Command to print all config settings that have been configured with a different value than the default (configured, non-default values are shown): .br -.B lvm dumpconfig \-\-type diff +.B lvmconfig \-\-type diff Command to print a single config setting, with its default value, and a full description, where "Section" refers to the config section, e.g. global, and "Setting" refers to the name of the specific setting, e.g. umask: .br -.B lvm dumpconfig \-\-type default --withfullcomments Section/Setting +.B lvmconfig \-\-type default --withfullcomments Section/Setting .SH FILES
@@ -209,5 +209,5 @@ e.g. umask: .SH SEE ALSO .BR lvm (8) -.BR lvm-dumpconfig (8) +.BR lvmconfig (8)
man/lvmconfig.8.in new file +166 -0
166 lines not on this page · raw message
man/lvmetad.8.in +1 -1
@@ -22,7 +22,7 @@ consistent image of the volume groups available in the system. lvmetad is used by LVM only if it is enabled in \fBlvm.conf\fP(5) by specifying the \fBglobal/use_lvmetad\fP setting. If this is not defined in the LVM configuration explicitly then default setting is used instead (see the output of -\fBlvm dumpconfig \-\-type default global/use_lvmetad\fP command). +\fBlvmconfig \-\-type default global/use_lvmetad\fP command). .SH OPTIONS To run the daemon in a test environment both the pidfile_path and the
scripts/lvmconf.sh +2 -1
@@ -33,7 +33,7 @@ START_STOP_SERVICES=0 function usage { - echo "usage: $0 <command>" + echo "Usage: $0 <command>" echo "" echo "Commands:" echo "Enable clvm: --enable-cluster [--lockinglibdir <dir>] [--lockinglib <lib>]"
@@ -46,6 +46,7 @@ function usage echo "Config file location: --file <configfile>" echo "Set services: --services [--mirrorservice] [--startstopservices]" echo "" + echo "Use the separate command 'lvmconfig' to display configuration information" } function set_default_use_lvmetad_var
tools/Makefile.in +1 -1
@@ -168,7 +168,7 @@ liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION): liblvm2cmd.$(LIB_SUFFIX) .commands: $(srcdir)/commands.h $(srcdir)/cmdnames.h Makefile $(CC) -E -P $(srcdir)/cmdnames.h 2> /dev/null | \ - egrep -v '^ *(|#.*|devtypes|dumpconfig|formats|help|pvdata|segtypes|systemid|tags|version) *$$' > .commands + egrep -v '^ *(|#.*|config|devtypes|dumpconfig|formats|help|pvdata|segtypes|systemid|tags|version) *$$' > .commands ifneq ("$(CFLOW_CMD)", "") CFLOW_SOURCES = $(addprefix $(srcdir)/, $(SOURCES))
tools/commands.h +51 -1
70 lines not on this page · raw message
tools/dumpconfig.c +10 -0
@@ -257,3 +257,13 @@ out:return r; } + +int config (struct cmd_context *cmd,int argc,char **argv) +{ +return dumpconfig (cmd, argc, argv); +} + +int lvmconfig (struct cmd_context *cmd,int argc,char **argv) +{ +return dumpconfig (cmd, argc, argv); +}
tools/lvmcmdline.c +3 -1
@@ -1286,7 +1286,9 @@ static int _prepare_profiles(struct cmd_context *cmd)* If --profile is used with dumpconfig, it's used * to dump the profile without the profile being applied. */ -if (!strcmp (cmd->command->name,"dumpconfig" )) +if (!strcmp (cmd->command->name,"dumpconfig" ) || + !strcmp (cmd->command->name,"lvmconfig" ) || + !strcmp (cmd->command->name,"config" ))return 1 ;/*