master - commands: --withspaces also for config and lvmconfig cmd aliases
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cf189a572ae6fa...
Commit: cf189a572ae6fa6f7e00047925ebc965e57c6a8b
Parent: 7559d871fb9b8001a22493f2d18bcc2a9205656d
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jun 24 13:28:40 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jun 24 13:28:40 2015 +0200
commands: --withspaces also for config and lvmconfig cmd aliases
---
tools/commands.h | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/commands.h b/tools/commands.h
index 9403951..d89b214 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -49,13 +49,14 @@ xx(config,
"\t[--validate]\n"
"\t[--withsummary]\n"
"\t[--withcomments]\n"
+ "\t[--withspaces]\n"
"\t[--unconfigured]\n"
"\t[--withversions]\n"
"\t[ConfigurationNode...]\n",
atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG,
ignoreunsupported_ARG, ignorelocal_ARG, list_ARG, mergedconfig_ARG, metadataprofile_ARG,
showdeprecated_ARG, showunsupported_ARG, validate_ARG, withsummary_ARG, withcomments_ARG,
- unconfigured_ARG, withversions_ARG)
+ withspaces_ARG, unconfigured_ARG, withversions_ARG)
xx(devtypes,
"Display recognised built-in block device types",
@@ -509,13 +510,14 @@ xx(lvmconfig,
"\t[--validate]\n"
"\t[--withsummary]\n"
"\t[--withcomments]\n"
+ "\t[--withspaces]\n"
"\t[--unconfigured]\n"
"\t[--withversions]\n"
"\t[ConfigurationNode...]\n",
atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG,
ignoreunsupported_ARG, ignorelocal_ARG, list_ARG, mergedconfig_ARG, metadataprofile_ARG,
showdeprecated_ARG, showunsupported_ARG, validate_ARG, withsummary_ARG, withcomments_ARG,
- unconfigured_ARG, withversions_ARG)
+ withspaces_ARG, unconfigured_ARG, withversions_ARG)
xx(lvmdiskscan,
"List devices that may be used as physical volumes",
8 years, 10 months
master - make: use lvmconfig ... --withspaces when generating lvm.conf and lvmlocal.conf
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7559d871fb9b80...
Commit: 7559d871fb9b8001a22493f2d18bcc2a9205656d
Parent: a4724350e4909dd1b74231f22c41434dbe02c14d
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jun 24 13:18:50 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jun 24 13:20:38 2015 +0200
make: use lvmconfig ... --withspaces when generating lvm.conf and lvmlocal.conf
---
conf/Makefile.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/conf/Makefile.in b/conf/Makefile.in
index c98be88..43d5f75 100644
--- a/conf/Makefile.in
+++ b/conf/Makefile.in
@@ -27,8 +27,8 @@ include $(top_builddir)/make.tmpl
.PHONY: install_conf install_localconf install_profiles
generate:
- (cat $(top_srcdir)/conf/example.conf.base && LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withcomments --ignorelocal) > example.conf.in
- (cat $(top_srcdir)/conf/lvmlocal.conf.base && LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withcomments local) > lvmlocal.conf.in
+ (cat $(top_srcdir)/conf/example.conf.base && LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withcomments --ignorelocal --withspaces) > example.conf.in
+ (cat $(top_srcdir)/conf/lvmlocal.conf.base && LD_LIBRARY_PATH=$(top_builddir)/libdm:$(LD_LIBRARY_PATH) $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withcomments --withspaces local) > lvmlocal.conf.in
install_conf: $(CONFSRC)
@if [ ! -e $(confdir)/$(CONFDEST) ]; then \
8 years, 10 months
master - lvmconfig: add --withspaces option
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a4724350e4909d...
Commit: a4724350e4909dd1b74231f22c41434dbe02c14d
Parent: a25d92c88b034996667da3764ac5b1de15448174
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jun 24 13:14:30 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jun 24 13:19:23 2015 +0200
lvmconfig: add --withspaces option
We shouldn't be adding spaces by default in output as that
may be be used already in scripts and especially for the eval
in shell scripts where spaces are not allowed between key
and value!
Add --withspaces option to lvmconfig for pretty output with
more space in for readability.
---
WHATS_NEW | 1 +
lib/config/config.c | 8 +++++---
lib/config/config.h | 1 +
man/lvmconfig.8.in | 5 +++++
tools/args.h | 1 +
tools/commands.h | 3 ++-
tools/dumpconfig.c | 3 +++
7 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 7da2b51..94766af 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.123 -
=================================
+ Add --withspaces to lvmconfig to add spaces in output for better readability.
Version 2.02.122 - 20th June 2015
=================================
diff --git a/lib/config/config.c b/lib/config/config.c
index 6f9d413..22b8f09 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -1756,7 +1756,8 @@ static struct dm_config_node *_add_def_node(struct dm_config_tree *cft,
log_error("Failed to create default config setting node value.");
return NULL;
}
- format_flags |= DM_CONFIG_VALUE_FMT_COMMON_EXTRA_SPACES;
+ if (spec->withspaces)
+ format_flags |= DM_CONFIG_VALUE_FMT_COMMON_EXTRA_SPACES;
}
cn->id = def->id;
@@ -1799,8 +1800,9 @@ static struct dm_config_node *_add_def_node(struct dm_config_tree *cft,
}
dm_config_value_set_format_flags(cn->v, format_flags);
} else {
- format_flags |= (DM_CONFIG_VALUE_FMT_COMMON_ARRAY |
- DM_CONFIG_VALUE_FMT_COMMON_EXTRA_SPACES);
+ if (spec->withspaces)
+ format_flags |= DM_CONFIG_VALUE_FMT_COMMON_EXTRA_SPACES;
+ format_flags |= DM_CONFIG_VALUE_FMT_COMMON_ARRAY;
cn->v = _get_def_array_values(cft, def, format_flags);
}
diff --git a/lib/config/config.h b/lib/config/config.h
index b03ad6b..9601dc1 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -163,6 +163,7 @@ struct config_def_tree_spec {
unsigned withsummary:1; /* include first line of comments - a summary */
unsigned withcomments:1; /* include all comment lines */
unsigned withversions:1; /* include versions */
+ unsigned withspaces:1; /* add more spaces in output for better readability */
unsigned unconfigured:1; /* use unconfigured path strings */
uint8_t *check_status; /* status of last tree check (currently needed for CFG_DEF_TREE_MISSING only) */
};
diff --git a/man/lvmconfig.8.in b/man/lvmconfig.8.in
index 4e61280..761b1e9 100644
--- a/man/lvmconfig.8.in
+++ b/man/lvmconfig.8.in
@@ -27,6 +27,7 @@ lvmconfig, lvm dumpconfig, lvm config \(em Display LVM configuration
.RB [ \-\-validate ]
.RB [ \-\-withsummary ]
.RB [ \-\-withcomments ]
+.RB [ \-\-withspaces ]
.RB [ \-\-withversions ]
.RB [ ConfigurationNode... ]
@@ -186,6 +187,10 @@ Display a full comment for each configuration node. For deprecated
settings, also display comments about deprecation in addition.
.TP
+.B \-\-withspaces
+Where appropriate, add more spaces in output for better readability.
+
+.TP
.B \-\-withversions
Also display a comment containing the version of introduction for
each configuration node. If the setting is deprecated, also display
diff --git a/tools/args.h b/tools/args.h
index b5c4243..7f7667d 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -124,6 +124,7 @@ arg(vgmetadatacopies_ARG, '\0', "vgmetadatacopies", metadatacopies_arg, 0)
arg(virtualoriginsize_ARG, '\0', "virtualoriginsize", size_mb_arg, 0)
arg(withsummary_ARG, '\0', "withsummary", NULL, 0)
arg(withcomments_ARG, '\0', "withcomments", NULL, 0)
+arg(withspaces_ARG, '\0', "withspaces", NULL, 0)
arg(withversions_ARG, '\0', "withversions", NULL, 0)
arg(writebehind_ARG, '\0', "writebehind", int_arg, 0)
arg(writemostly_ARG, '\0', "writemostly", string_arg, ARG_GROUPABLE)
diff --git a/tools/commands.h b/tools/commands.h
index 8e87681..9403951 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -104,13 +104,14 @@ xx(dumpconfig,
"\t[--validate]\n"
"\t[--withsummary]\n"
"\t[--withcomments]\n"
+ "\t[--withspaces]\n"
"\t[--unconfigured]\n"
"\t[--withversions]\n"
"\t[ConfigurationNode...]\n",
atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG,
ignoreunsupported_ARG, ignorelocal_ARG, list_ARG, mergedconfig_ARG, metadataprofile_ARG,
showdeprecated_ARG, showunsupported_ARG, validate_ARG, withsummary_ARG, withcomments_ARG,
- unconfigured_ARG, withversions_ARG)
+ withspaces_ARG, unconfigured_ARG, withversions_ARG)
xx(formats,
"List available metadata formats",
diff --git a/tools/dumpconfig.c b/tools/dumpconfig.c
index 97de57a..f6a6217 100644
--- a/tools/dumpconfig.c
+++ b/tools/dumpconfig.c
@@ -277,6 +277,9 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
if (arg_count(cmd, withversions_ARG))
tree_spec.withversions = 1;
+ if (arg_count(cmd, withspaces_ARG))
+ tree_spec.withspaces = 1;
+
if (cft_check_handle)
tree_spec.check_status = cft_check_handle->status;
8 years, 10 months
master - WHATS_NEW: recent commits - config value format flags
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a25d92c88b0349...
Commit: a25d92c88b034996667da3764ac5b1de15448174
Parent: 982cf44ff0740c95c4125af1607cf2ed8a2aab69
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jun 24 11:33:34 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jun 24 11:34:02 2015 +0200
WHATS_NEW: recent commits - config value format flags
---
WHATS_NEW_DM | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index d4b1639..ce10238 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,8 @@
Version 1.02.100 -
================================
+ Add DM_CONFIG_VALUE_FMT_{INT_OCTAL,STRING_NO_QUOTES} config value format flag.
+ Add DM_CONFIG_VALUE_FMT_COMMON_{ARRAY,EXTRA_SPACE} config value format flag.
+ Add dm_config_value_{get,set}_format_flags to get and set config value format.
Version 1.02.99 - 20th June 2015
================================
8 years, 10 months
master - config: regenerate configure.in to accomodate all recent changes
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=982cf44ff0740c...
Commit: 982cf44ff0740c95c4125af1607cf2ed8a2aab69
Parent: 63c5aaaaf22716f8a04df43b7f7ac4611445b677
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jun 23 15:21:18 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jun 24 11:24:10 2015 +0200
config: regenerate configure.in to accomodate all recent changes
Hopefully closer to the ideal.
---
conf/example.conf.in | 78 +++++++++++++++++++++++++++----------------------
conf/lvmlocal.conf.in | 5 +--
2 files changed, 45 insertions(+), 38 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index e809488..41d219a 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -4,6 +4,17 @@
#
# Refer to 'man lvm.conf' for further information including the file layout.
#
+# Refer to 'man lvm.conf' for information about how settings configured in
+# this file are combined with built-in values and command line options to
+# arrive at the final values used by LVM.
+#
+# Refer to 'man lvmconfig' for information about displaying the built-in
+# and configured values used by LVM.
+#
+# If a default value is set in this file (not commented out), then a
+# new version of LVM using this file will continue using that value,
+# even if the new version of LVM changes the built-in default value.
+#
# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set
# the environment variable LVM_SYSTEM_DIR before running the tools.
#
@@ -92,7 +103,7 @@ devices {
# Example:
# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
# This configuration option does not have a default value defined.
- # preferred_names=[]
+ # preferred_names = [ ]
# Configuration option devices/filter.
# Limit the block devices that are used by LVM commands.
@@ -128,8 +139,7 @@ devices {
# Example:
# Use anchors to be very specific.
# filter = [ "a|^/dev/hda8$|", "r|.*/|" ]
- # This configuration option does not have a default value defined.
- # filter = []
+ # filter = [ "a|.*/|" ]
# Configuration option devices/global_filter.
# Limit the block devices that are used by LVM system components.
@@ -138,8 +148,7 @@ devices {
# and lvmetad. Use global_filter to hide devices from these LVM
# system components. The syntax is the same as devices/filter.
# Devices rejected by global_filter are not opened by LVM.
- # This configuration option does not have a default value defined.
- # global_filter = []
+ # global_filter = [ "a|.*/|" ]
# Configuration option devices/cache_dir.
# Directory in which to store the device cache file.
@@ -167,7 +176,7 @@ devices {
# types = [ "fd", 16 ]
# This configuration option is advanced.
# This configuration option does not have a default value defined.
- # types = []
+ # types = [ ]
# Configuration option devices/sysfs_scan.
# Restrict device scanning to block devices appearing in sysfs.
@@ -316,7 +325,7 @@ allocation {
# they are situated.
# cling_tag_list = [ "@site1", "@site2" ]
# This configuration option does not have a default value defined.
- # cling_tag_list = []
+ # cling_tag_list = [ ]
# Configuration option allocation/maximise_cling.
# Use a previous allocation algorithm.
@@ -336,7 +345,7 @@ allocation {
# MD device signatures, swap signature, and LUKS signatures.
# To see the list of signatures recognized by blkid, check the
# output of the 'blkid -k' command.
- use_blkid_wiping = 1
+ use_blkid_wiping = @DEFAULT_USE_BLKID_WIPING@
# Configuration option allocation/wipe_signatures_when_zeroing_new_lvs.
# Look for and erase any signatures while zeroing a new LV.
@@ -492,7 +501,7 @@ log {
# Configuration option log/activation.
# Log messages during activation.
# Don't use this in low memory situations (can deadlock).
- # activation = 0
+ activation = 0
# Configuration option log/debug_classes.
# Select log messages by class.
@@ -502,8 +511,7 @@ log {
# memory, devices, activation, allocation,
# lvmetad, metadata, cache, locking, lvmpolld.
# Use "all" to see everything.
- debug_classes = ["memory", "devices", "activation", "allocation",
- "lvmetad", "metadata", "cache", "locking", "lvmpolld"]
+ debug_classes = [ "memory", "devices", "activation", "allocation", "lvmetad", "metadata", "cache", "locking", "lvmpolld" ]
}
# Configuration section backup.
@@ -600,7 +608,7 @@ global {
# The LVM1 tools need to be installed with .lvm1 suffices,
# e.g. vgscan.lvm1. They will stop working once the lvm2
# on-disk metadata format is used.
- # fallback_to_lvm1 = 0
+ # fallback_to_lvm1 = 1
# Configuration option global/format.
# The default metadata format that commands should use.
@@ -613,11 +621,11 @@ global {
# If support for LVM1 metadata was compiled as a shared library use
# format_libraries = "liblvm2format1.so"
# This configuration option does not have a default value defined.
- # format_libraries = []
+ # format_libraries = [ ]
# Configuration option global/segment_libraries.
# This configuration option does not have a default value defined.
- # segment_libraries = []
+ # segment_libraries = [ ]
# Configuration option global/proc.
# Location of proc filesystem.
@@ -856,12 +864,12 @@ global {
# ignorable errors and fix them later.
# With thin_check version 3.2 or newer you should add
# --clear-needs-check-flag.
- # thin_check_options = ["-q", "--clear-needs-check-flag"]
+ # thin_check_options = [ "-q" ]
# Configuration option global/thin_repair_options.
# List of options passed to the thin_repair command.
# This configuration option does not have a default value defined.
- # thin_repair_options = ""
+ # thin_repair_options = [ ]
# Configuration option global/thin_disabled_features.
# Features to not use in the thin driver.
@@ -873,7 +881,7 @@ global {
# Example:
# thin_disabled_features = [ "discards", "block_size" ]
# This configuration option does not have a default value defined.
- # thin_disabled_features = []
+ # thin_disabled_features = [ ]
# Configuration option global/cache_check_executable.
# The full path to the cache_check command.
@@ -904,12 +912,12 @@ global {
# Configuration option global/cache_check_options.
# List of options passed to the cache_check command.
- # cache_check_options = "-q"
+ # cache_check_options = [ "-q" ]
# Configuration option global/cache_repair_options.
# List of options passed to the cache_repair command.
# This configuration option does not have a default value defined.
- # cache_repair_options = ""
+ # cache_repair_options = [ ]
# Configuration option global/system_id_source.
# The method LVM uses to set the local system ID.
@@ -925,12 +933,12 @@ global {
# 'local' section of an lvm configuration file, e.g. lvmlocal.conf.
# uname - Set the system ID from the hostname (uname) of the system.
# System IDs beginning localhost are not permitted.
- # machineid - Use the contents of the file @CONFDIR@/machine-id to set the
+ # machineid - Use the contents of the machine-id file to set the
# system ID. Some systems create this file at installation time.
- # See 'man machine-id'.
+ # See 'man machine-id' and global/etc.
# file - Use the contents of another file (system_id_file) to set
# the system ID.
- # system_id_source = "none"
+ system_id_source = "none"
# Configuration option global/system_id_file.
# The full path to the file containing a system ID.
@@ -939,15 +947,16 @@ global {
# This configuration option does not have a default value defined.
# system_id_file = ""
+ # Configuration option global/use_lvmpolld.
# Use lvmpolld to supervise long running LVM commands.
# When enabled, control of long running LVM commands is transferred
- # from the original LVM command to the lvmpolld daemon. This allows
+ # from the original LVM command to the lvmpolld daemon. This allows
# the operation to continue independent of the original LVM command.
# After lvmpolld takes over, the LVM command displays the progress
- # of the ongoing operation. lvmpolld itself runs LVM commands to manage
- # the progress of ongoing operations. lvmpolld can be used as a native
+ # of the ongoing operation. lvmpolld itself runs LVM commands to manage
+ # the progress of ongoing operations. lvmpolld can be used as a native
# systemd service, which allows it to be started on demand, and to use
- # its own control group. When this option is disabled, LVM commands will
+ # its own control group. When this option is disabled, LVM commands will
# supervise long running operations by forking themselves.
use_lvmpolld = @DEFAULT_USE_LVMPOLLD@
}
@@ -1048,7 +1057,7 @@ activation {
# Example:
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
# This configuration option does not have a default value defined.
- # volume_list = []
+ # volume_list = [ ]
# Configuration option activation/auto_activation_volume_list.
# Only LVs selected by this list are auto-activated.
@@ -1080,7 +1089,7 @@ activation {
# Possible options are: vgname, vgname/lvname, @tag, @*
# See volume_list for how these options are matched to LVs.
# This configuration option does not have a default value defined.
- # auto_activation_volume_list = []
+ # auto_activation_volume_list = [ ]
# Configuration option activation/read_only_volume_list.
# LVs in this list are activated in read-only mode.
@@ -1092,7 +1101,7 @@ activation {
# Possible options are: vgname, vgname/lvname, @tag, @*
# See volume_list for how these options are matched to LVs.
# This configuration option does not have a default value defined.
- # read_only_volume_list = []
+ # read_only_volume_list = [ ]
# Configuration option activation/raid_region_size.
# Size in KiB of each raid or mirror synchronization region.
@@ -1221,7 +1230,7 @@ activation {
# Auto-extending a thin pool adds this percent extra space.
# The amount of additional space added to a thin pool is this
# percent of its current size.
- thin_pool_autoextend_percent=20
+ thin_pool_autoextend_percent = 20
# Configuration option activation/mlock_filter.
# Do not mlock these memory areas.
@@ -1240,7 +1249,7 @@ activation {
# mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
# This configuration option is advanced.
# This configuration option does not have a default value defined.
- # mlock_filter = []
+ # mlock_filter = [ ]
# Configuration option activation/use_mlockall.
# Use the old behavior of mlockall to pin all memory.
@@ -1361,7 +1370,7 @@ activation {
# dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
# This configuration option is advanced.
# This configuration option does not have a default value defined.
- # dirs = []
+ # dirs = [ ]
# }
# Configuration section report.
@@ -1410,7 +1419,7 @@ activation {
# Configuration option report/colums_as_rows.
# Output each column as a row.
- # If set, this also implies report/prefixes = 1.
+ # If set, this also implies report/prefixes=1.
# colums_as_rows = 0
# Configuration option report/binary_values_as_numeric.
@@ -1572,7 +1581,6 @@ dmeventd {
# bar is given to the hosts named machine1 and machine2.
# tags { foo { } bar { host_list = [ "machine1", "machine2" ] } }
# This configuration section has variable name.
- # This configuration section does not have a default value defined.
# tag {
# Configuration option tags/<tag>/host_list.
@@ -1582,6 +1590,6 @@ dmeventd {
# matches an entry in this list, the name of the
# subsection is applied to the machine as a 'host tag'.
# This configuration option does not have a default value defined.
- # host_list = ""
+ # host_list = [ ]
# }
# }
diff --git a/conf/lvmlocal.conf.in b/conf/lvmlocal.conf.in
index e151b50..ec3b081 100644
--- a/conf/lvmlocal.conf.in
+++ b/conf/lvmlocal.conf.in
@@ -36,8 +36,7 @@ local {
# Example:
# Set the system_id to the string 'host1'.
# system_id = "host1"
- # This configuration option does not have a default value defined.
- # system_id=""
+ # system_id = ""
# Configuration option local/extra_system_ids.
# A list of extra VG system IDs the local host can access.
@@ -49,5 +48,5 @@ local {
# Use this only after consulting 'man lvmsystemid'
# to be certain of correct usage and possible dangers.
# This configuration option does not have a default value defined.
- # extra_system_ids=[]
+ # extra_system_ids = [ ]
}
8 years, 10 months
master - config: devices/filter and devices/global_filter setting have 'a/.*/' as default value
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=63c5aaaaf22716...
Commit: 63c5aaaaf22716f8a04df43b7f7ac4611445b677
Parent: c725648f6c3c5709c0a6823900c716d67a31818d
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Jun 24 11:21:12 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jun 24 11:23:54 2015 +0200
config: devices/filter and devices/global_filter setting have 'a/.*/' as default value
---
lib/config/config_settings.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index e5edf6d..2c5e2f8 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -220,7 +220,7 @@ cfg_array(devices_preferred_names_CFG, "preferred_names", devices_CFG_SECTION, C
"Example:\n"
"preferred_names = [ \"^/dev/mpath/\", \"^/dev/mapper/mpath\", \"^/dev/[hs]d\" ]\n")
-cfg_array(devices_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL,
+cfg_array(devices_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, "#Sa|.*/|", vsn(1, 0, 0), NULL, 0, NULL,
"Limit the block devices that are used by LVM commands.\n"
"This is a list of regular expressions used to accept or\n"
"reject block device path names. Each regex is delimited\n"
@@ -255,7 +255,7 @@ cfg_array(devices_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_UNDEFIN
"Use anchors to be very specific.\n"
"filter = [ \"a|^/dev/hda8$|\", \"r|.*/|\" ]\n")
-cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 98), NULL, 0, NULL,
+cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, "#Sa|.*/|", vsn(2, 2, 98), NULL, 0, NULL,
"Limit the block devices that are used by LVM system components.\n"
"Because devices/filter may be overridden from the command line,\n"
"it is not suitable for system-wide device filtering, e.g. udev\n"
8 years, 10 months
master - config: allow empty values for {thin, cache}_{check, repair}_options
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c725648f6c3c57...
Commit: c725648f6c3c5709c0a6823900c716d67a31818d
Parent: 20e336f21c242e7a98d11d9dc03941512c0ab69a
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jun 23 15:35:24 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jun 24 11:13:38 2015 +0200
config: allow empty values for {thin,cache}_{check,repair}_options
It's not an error to define empty values for
{thin,cache}_{check,repair}_options - such empty value means no
options are passed when these external commands are called.
---
lib/config/config_settings.h | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 092e86d..e5edf6d 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -855,7 +855,7 @@ cfg(global_thin_repair_executable_CFG, "thin_repair_executable", global_CFG_SECT
"Also see thin_repair_options.\n"
"(For thin tools, see thin_check_executable.)\n")
-cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTION, DEFAULT_THIN_CHECK_OPTIONS_CONFIG ? CFG_DEFAULT_COMMENTED : CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, DEFAULT_THIN_CHECK_OPTIONS_CONFIG, vsn(2, 2, 96), NULL, 0, NULL,
+cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTION, CFG_ALLOW_EMPTY | (DEFAULT_THIN_CHECK_OPTIONS_CONFIG ? CFG_DEFAULT_COMMENTED : CFG_DEFAULT_UNDEFINED), CFG_TYPE_STRING, DEFAULT_THIN_CHECK_OPTIONS_CONFIG, vsn(2, 2, 96), NULL, 0, NULL,
"List of options passed to the thin_check command.\n"
"With thin_check version 2.1 or newer you can add\n"
"--ignore-non-fatal-errors to let it pass through\n"
@@ -863,7 +863,7 @@ cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTIO
"With thin_check version 3.2 or newer you should add\n"
"--clear-needs-check-flag.\n")
-cfg_array(global_thin_repair_options_CFG, "thin_repair_options", global_CFG_SECTION, DEFAULT_THIN_REPAIR_OPTIONS_CONFIG ? CFG_DEFAULT_COMMENTED : CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, DEFAULT_THIN_REPAIR_OPTIONS_CONFIG, vsn(2, 2, 100), NULL, 0, NULL,
+cfg_array(global_thin_repair_options_CFG, "thin_repair_options", global_CFG_SECTION, CFG_ALLOW_EMPTY | (DEFAULT_THIN_REPAIR_OPTIONS_CONFIG ? CFG_DEFAULT_COMMENTED : CFG_DEFAULT_UNDEFINED), CFG_TYPE_STRING, DEFAULT_THIN_REPAIR_OPTIONS_CONFIG, vsn(2, 2, 100), NULL, 0, NULL,
"List of options passed to the thin_repair command.\n")
cfg_array(global_thin_disabled_features_CFG, "thin_disabled_features", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 99), NULL, 0, NULL,
@@ -900,10 +900,10 @@ cfg(global_cache_repair_executable_CFG, "cache_repair_executable", global_CFG_SE
"Also see cache_repair_options.\n"
"(For cache tools, see cache_check_executable.)\n")
-cfg_array(global_cache_check_options_CFG, "cache_check_options", global_CFG_SECTION, DEFAULT_CACHE_CHECK_OPTIONS_CONFIG ? CFG_DEFAULT_COMMENTED : CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, DEFAULT_CACHE_CHECK_OPTIONS_CONFIG, vsn(2, 2, 108), NULL, 0, NULL,
+cfg_array(global_cache_check_options_CFG, "cache_check_options", global_CFG_SECTION, CFG_ALLOW_EMPTY | (DEFAULT_CACHE_CHECK_OPTIONS_CONFIG ? CFG_DEFAULT_COMMENTED : CFG_DEFAULT_UNDEFINED), CFG_TYPE_STRING, DEFAULT_CACHE_CHECK_OPTIONS_CONFIG, vsn(2, 2, 108), NULL, 0, NULL,
"List of options passed to the cache_check command.\n")
-cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, DEFAULT_CACHE_REPAIR_OPTIONS_CONFIG ? CFG_DEFAULT_COMMENTED : CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, DEFAULT_CACHE_REPAIR_OPTIONS_CONFIG, vsn(2, 2, 108), NULL, 0, NULL,
+cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, CFG_ALLOW_EMPTY | (DEFAULT_CACHE_REPAIR_OPTIONS_CONFIG ? CFG_DEFAULT_COMMENTED : CFG_DEFAULT_UNDEFINED), CFG_TYPE_STRING, DEFAULT_CACHE_REPAIR_OPTIONS_CONFIG, vsn(2, 2, 108), NULL, 0, NULL,
"List of options passed to the cache_repair command.\n")
cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_SYSTEM_ID_SOURCE, vsn(2, 2, 117), NULL, 0, NULL,
8 years, 10 months
master - configure: add DEFAULT_USE_BLKID_WIPING
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=20e336f21c242e...
Commit: 20e336f21c242e7a98d11d9dc03941512c0ab69a
Parent: 6575122c63de3d400ee46ea0f400ab44b8520978
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jun 23 15:20:51 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jun 24 11:13:38 2015 +0200
configure: add DEFAULT_USE_BLKID_WIPING
If blkid wiping is possible, than set use_blkid_wiping=1 and
use_blkid_wiping=0 otherwise for its default value. If blkid wiping
is disabled during configure and use_blkid_wiping=1 is set by chance,
it's simply ignored - this patch is just a cleanup that makes it more
obvious for the user (we use similar logic for use_lvmetad and
use_lvmpolld settings).
---
configure | 12 +++++++++++-
configure.in | 9 ++++++++-
lib/config/config_settings.h | 2 +-
lib/misc/configure.h.in | 3 +++
4 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 534948f..13d10c4 100755
--- a/configure
+++ b/configure
@@ -695,6 +695,7 @@ DL_LIBS
DEVMAPPER
DEFAULT_USE_LVMPOLLD
DEFAULT_USE_LVMETAD
+DEFAULT_USE_BLKID_WIPING
DEFAULT_SYS_DIR
DEFAULT_SPARSE_SEGTYPE
DEFAULT_RUN_DIR
@@ -724,7 +725,6 @@ BUILD_LVMPOLLD
BUILD_LVMETAD
BUILD_DMEVENTD
BUILD_CMIRRORD
-BLKID_WIPING
BLKID_PC
APPLIB
MODPROBE_CMD
@@ -11052,12 +11052,22 @@ $as_echo "yes" >&6; }
fi
if test "$BLKID_WIPING" = yes; then
BLKID_PC="blkid"
+ DEFAULT_USE_BLKID_WIPING=1
$as_echo "#define BLKID_WIPING_SUPPORT 1" >>confdefs.h
+ else
+ DEFAULT_USE_BLKID_WIPING=1
fi
+else
+ DEFAULT_USE_BLKID_WIPING=0
fi
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_USE_BLKID_WIPING $DEFAULT_USE_BLKID_WIPING
+_ACEOF
+
+
################################################################################
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use udev-systemd protocol for jobs in background" >&5
$as_echo_n "checking whether to use udev-systemd protocol for jobs in background... " >&6; }
diff --git a/configure.in b/configure.in
index 86ab98a..d330bd2 100644
--- a/configure.in
+++ b/configure.in
@@ -1152,9 +1152,16 @@ if test "$BLKID_WIPING" != no; then
fi])
if test "$BLKID_WIPING" = yes; then
BLKID_PC="blkid"
+ DEFAULT_USE_BLKID_WIPING=1
AC_DEFINE([BLKID_WIPING_SUPPORT], 1, [Define to 1 to use libblkid detection of signatures when wiping.])
+ else
+ DEFAULT_USE_BLKID_WIPING=1
fi
+else
+ DEFAULT_USE_BLKID_WIPING=0
fi
+AC_DEFINE_UNQUOTED(DEFAULT_USE_BLKID_WIPING, [$DEFAULT_USE_BLKID_WIPING],
+ [Use blkid wiping by default.])
################################################################################
dnl -- Enable udev-systemd protocol to instantiate a service for background jobs
@@ -1742,7 +1749,6 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
AC_SUBST(APPLIB)
AC_SUBST(AWK)
AC_SUBST(BLKID_PC)
-AC_SUBST(BLKID_WIPING)
AC_SUBST(BUILD_CMIRRORD)
AC_SUBST(BUILD_DMEVENTD)
AC_SUBST(BUILD_LVMETAD)
@@ -1783,6 +1789,7 @@ AC_SUBST(DEFAULT_RAID10_SEGTYPE)
AC_SUBST(DEFAULT_RUN_DIR)
AC_SUBST(DEFAULT_SPARSE_SEGTYPE)
AC_SUBST(DEFAULT_SYS_DIR)
+AC_SUBST(DEFAULT_USE_BLKID_WIPING)
AC_SUBST(DEFAULT_USE_LVMETAD)
AC_SUBST(DEFAULT_USE_LVMPOLLD)
AC_SUBST(DEVMAPPER)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 461bacc..092e86d 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -423,7 +423,7 @@ cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0,
"the same disks. This setting can be used to disable the changes\n"
"and revert to the previous algorithm.\n")
-cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL, 0, NULL,
+cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), "@DEFAULT_USE_BLKID_WIPING@", 0, NULL,
"Use blkid to detect existing signatures on new PVs and LVs.\n"
"The blkid library can detect more signatures than the\n"
"native LVM detection code, but may take longer.\n"
diff --git a/lib/misc/configure.h.in b/lib/misc/configure.h.in
index 3af8ec0..9ec997f 100644
--- a/lib/misc/configure.h.in
+++ b/lib/misc/configure.h.in
@@ -95,6 +95,9 @@
/* Path to LVM system directory. */
#undef DEFAULT_SYS_DIR
+/* Use blkid wiping by default. */
+#undef DEFAULT_USE_BLKID_WIPING
+
/* Use lvmetad by default. */
#undef DEFAULT_USE_LVMETAD
8 years, 10 months
master - config: display global/umask in octal form
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6575122c63de3d...
Commit: 6575122c63de3d400ee46ea0f400ab44b8520978
Parent: 74bf75a2f5f7b918e1fe7531766aa377de23191c
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jun 23 13:24:15 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jun 24 11:13:38 2015 +0200
config: display global/umask in octal form
---
lib/config/config_settings.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 1b67488..461bacc 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -597,7 +597,7 @@ cfg(backup_retain_days_CFG, "retain_days", backup_CFG_SECTION, 0, CFG_TYPE_INT,
cfg(shell_history_size_CFG, "history_size", shell_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_MAX_HISTORY, vsn(1, 0, 0), NULL, 0, NULL,
"Number of lines of history to store in ~/.lvm_history.\n")
-cfg(global_umask_CFG, "umask", global_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_UMASK, vsn(1, 0, 0), NULL, 0, NULL,
+cfg(global_umask_CFG, "umask", global_CFG_SECTION, CFG_FORMAT_INT_OCTAL, CFG_TYPE_INT, DEFAULT_UMASK, vsn(1, 0, 0), NULL, 0, NULL,
"The file creation mask for any files and directories created.\n"
"Interpreted as octal if the first digit is zero.\n")
8 years, 10 months
master - config: use proper unconfigured default values for use_lvmetad and use_lvmpolld settings
by Peter Rajnoha
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=74bf75a2f5f7b9...
Commit: 74bf75a2f5f7b918e1fe7531766aa377de23191c
Parent: 1545ebf938d3eab5df5ab48b8258afc4f62b896b
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Jun 23 14:13:12 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Jun 24 11:13:38 2015 +0200
config: use proper unconfigured default values for use_lvmetad and use_lvmpolld settings
Default value for lvmetad and lvmpolld has hooks in configure script,
the "lvmconfig --type default --unconfigured" should display:
use_lvmetad = @DEFAULT_USE_LVMETAD@
use_lvmpolld = @DEFAULT_USE_LVMPOLLD@
Note that these settings are not of string type. Recent change (the
DM_CONFIG_VALUE_FMT_STRING_NO_QUOTES formatting flag) makes it
possible to recognize that the setting is not of string type and if
there's unconfigured value defined for it, the enclosing " " is
automatically removed on output.
---
lib/config/config_settings.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 9335a7a..1b67488 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -797,7 +797,7 @@ cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_pa
"was never a valid path in the /dev filesystem.\n"
"Enable this option to reinstate the previous format.\n")
-cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LVMETAD, vsn(2, 2, 93), NULL, 0, NULL,
+cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LVMETAD, vsn(2, 2, 93), "@DEFAULT_USE_LVMETAD@", 0, NULL,
"Use lvmetad to cache metadata and reduce disk scanning.\n"
"When enabled (and running), lvmetad provides LVM commands\n"
"with VG metadata and PV state. LVM commands then avoid\n"
@@ -937,7 +937,7 @@ cfg(activation_checks_CFG, "checks", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, D
"Some of the checks may be expensive, so it's best to use\n"
"this only when there seems to be a problem.\n")
-cfg(global_use_lvmpolld_CFG, "use_lvmpolld", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LVMPOLLD, vsn(2, 2, 120), NULL, 0, NULL,
+cfg(global_use_lvmpolld_CFG, "use_lvmpolld", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LVMPOLLD, vsn(2, 2, 120), "@DEFAULT_USE_LVMPOLLD@", 0, NULL,
"Use lvmpolld to supervise long running LVM commands.\n"
"When enabled, control of long running LVM commands is transferred\n"
"from the original LVM command to the lvmpolld daemon. This allows\n"
8 years, 10 months