Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fc65269d682cb7bc…
Commit: fc65269d682cb7bcaf14c94ec4541e7af4c27165
Parent: 5a0197121b07b8a2318000872d4b6916c2176ef9
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Apr 30 17:40:24 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Apr 30 17:55:04 2015 +0200
lvmconfig: add supporting code for handling deprecated settings
This patch adds supporting code for handling deprecated settings.
Deprecated settings are not displayed by default in lvmconfig output
(except for --type current and --type diff). There's a new
"--showdeprecated" lvmconfig option to display them if needed.
Also, when using lvmconfig --withcomments, the comments with info
about deprecation are displayed for deprecated settings and with
lvmconfig --withversions, the version in which the setting was
deprecated is displayed in addition to the version of introduction.
If using --atversion with a version that is lower than the one
in which the setting was deprecated, the setting is then considered
as not deprecated (simply because at that version it was not
deprecated).
For example:
$ lvmconfig --type default activation
activation {
...
raid_region_size=512
...
}
$ lvmconfig --type default activation --showdeprecated
activation {
...
mirror_region_size=512
raid_region_size=512
...
}
$ lvmconfig --type default activation --showdeprecated --withversions
activation {
...
# Available since version 1.0.0.
# Deprecated since version 2.2.99.
mirror_region_size=512
# Available since version 2.2.99.
raid_region_size=512
...
}
$ lvmconfig --type default activation --showdeprecated --withcomments
activation {
...
# Configuration option activation/mirror_region_size.
# This has been replaced by the activation/raid_region_size
# setting.
# Size (in KB) of each copy operation when mirroring.
# This configuration option is deprecated.
mirror_region_size=512
# Configuration option activation/raid_region_size.
# Size in KiB of each raid or mirror synchronization region.
# For raid or mirror segment types, this is the amount of
# data that is copied at once when initializing, or moved
# at once by pvmove.
raid_region_size=512
...
}
$ lvmconfig --type default activation --withcomments --atversion 2.2.98
activation {
...
# Configuration option activation/mirror_region_size.
# Size (in KB) of each copy operation when mirroring.
mirror_region_size=512
...
}
---
WHATS_NEW | 4 ++++
lib/config/config.c | 50 +++++++++++++++++++++++++++++++++++++++-----------
lib/config/config.h | 1 +
man/lvmconfig.8.in | 16 ++++++++++++++--
tools/args.h | 1 +
tools/commands.h | 15 +++++++++------
tools/dumpconfig.c | 15 +++++++++++++++
7 files changed, 83 insertions(+), 19 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 49b2bad..79ef842 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,9 @@
Version 2.02.119 -
==================================
+ Also display deprecation info for deprecated config in lvmconfig --withcomments.
+ Display version since which config is deprecated in lvmconfig --withversions.
+ Add --showdeprecated to lvmconfig to also display deprecated settings.
+ Hide deprecated settings in lvmconfig output for all types except current,diff.
Introduce support for exit on idle feature in libdaemon
Add --showunsupported to lvmconfig to also display unsupported settings.
Display unsupported settings for lvmconfig --type current,diff only by default.
diff --git a/lib/config/config.c b/lib/config/config.c
index 41f13a0..084f3f2 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -1525,12 +1525,12 @@ static int _copy_one_line(const char *comment, char *line, int *pos, int len)
return i;
}
-static int _get_config_node_version(char *version, struct cfg_def_item *cfg_def)
+static int _get_config_node_version(uint16_t version_enc, char *version)
{
if (dm_snprintf(version, 9, "%u.%u.%u",
- (cfg_def->since_version & 0xE000) >> 13,
- (cfg_def->since_version & 0x1E00) >> 9,
- (cfg_def->since_version & 0x1FF)) == -1) {
+ (version_enc & 0xE000) >> 13,
+ (version_enc & 0x1E00) >> 9,
+ (version_enc & 0x1FF)) == -1) {
log_error("_get_config_node_version: couldn't create version string");
return 0;
}
@@ -1538,6 +1538,12 @@ static int _get_config_node_version(char *version, struct cfg_def_item *cfg_def)
return 1;
}
+static int _def_node_is_deprecated(cfg_def_item_t *def, struct config_def_tree_spec *spec)
+{
+ return def->deprecated_since_version &&
+ (spec->version >= def->deprecated_since_version);
+}
+
static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, void *baton)
{
struct out_baton *out = baton;
@@ -1569,6 +1575,10 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi
fprintf(out->fp, "\n");
fprintf(out->fp, "%s# Configuration %s %s.\n", line, node_type_name, path);
+ if (out->tree_spec->withcomments &&
+ _def_node_is_deprecated(cfg_def, out->tree_spec))
+ fprintf(out->fp, "%s# %s", line, cfg_def->deprecation_comment);
+
if (cfg_def->comment) {
int pos = 0;
while (_copy_one_line(cfg_def->comment, commentline, &pos, strlen(cfg_def->comment))) {
@@ -1579,6 +1589,9 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi
}
}
+ if (_def_node_is_deprecated(cfg_def, out->tree_spec))
+ fprintf(out->fp, "%s# This configuration %s is deprecated.\n", line, node_type_name);
+
if (cfg_def->flags & CFG_ADVANCED)
fprintf(out->fp, "%s# This configuration %s is advanced.\n", line, node_type_name);
@@ -1593,9 +1606,15 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi
}
if (out->tree_spec->withversions) {
- if (!_get_config_node_version(version, cfg_def))
+ if (!_get_config_node_version(cfg_def->since_version, version))
return_0;
- fprintf(out->fp, "%s# Since version %s.\n", line, version);
+ fprintf(out->fp, "%s# Available since version %s.\n", line, version);
+
+ if (_def_node_is_deprecated(cfg_def, out->tree_spec)) {
+ if (!_get_config_node_version(cfg_def->deprecated_since_version, version))
+ return_0;
+ fprintf(out->fp, "%s# Deprecated since version %s.\n", line, version);
+ }
}
return 1;
@@ -1624,7 +1643,7 @@ static int _out_line_fn(const struct dm_config_node *cn, const char *line, void
return 1;
if (!_cfg_def_make_path(config_path, CFG_PATH_MAX_LEN, cfg_def->id, cfg_def, 1))
return_0;
- if (out->tree_spec->withversions && !_get_config_node_version(version, cfg_def))
+ if (out->tree_spec->withversions && !_get_config_node_version(cfg_def->since_version, version))
return_0;
summary[0] = '\0';
@@ -1781,6 +1800,11 @@ static struct dm_config_node *_add_def_node(struct dm_config_tree *cft,
return cn;
}
+static int _should_skip_deprecated_def_node(cfg_def_item_t *def, struct config_def_tree_spec *spec)
+{
+ return spec->ignoredeprecated && _def_node_is_deprecated(def, spec);
+}
+
static int _should_skip_def_node(struct config_def_tree_spec *spec, int section_id, int id)
{
cfg_def_item_t *def = cfg_def_get_item_p(id);
@@ -1800,18 +1824,21 @@ static int _should_skip_def_node(struct config_def_tree_spec *spec, int section_
}
if ((spec->check_status[id] & CFG_USED) ||
(def->flags & CFG_NAME_VARIABLE) ||
- (def->since_version > spec->version))
+ (def->since_version > spec->version) ||
+ _should_skip_deprecated_def_node(def, spec))
return 1;
break;
case CFG_DEF_TREE_NEW:
- if (def->since_version != spec->version)
+ if ((def->since_version != spec->version) ||
+ _should_skip_deprecated_def_node(def, spec))
return 1;
break;
case CFG_DEF_TREE_PROFILABLE:
case CFG_DEF_TREE_PROFILABLE_CMD:
case CFG_DEF_TREE_PROFILABLE_MDA:
if (!(def->flags & CFG_PROFILABLE) ||
- (def->since_version > spec->version))
+ (def->since_version > spec->version) ||
+ _should_skip_deprecated_def_node(def, spec))
return 1;
flags = def->flags & ~CFG_PROFILABLE;
if (spec->type == CFG_DEF_TREE_PROFILABLE_CMD) {
@@ -1823,7 +1850,8 @@ static int _should_skip_def_node(struct config_def_tree_spec *spec, int section_
}
break;
default:
- if (def->since_version > spec->version)
+ if ((def->since_version > spec->version) ||
+ _should_skip_deprecated_def_node(def, spec))
return 1;
break;
}
diff --git a/lib/config/config.h b/lib/config/config.h
index c21a61b..ce31e50 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -154,6 +154,7 @@ struct config_def_tree_spec {
uint16_t version; /* tree at this LVM2 version */
unsigned ignoreadvanced:1; /* do not include advanced configs */
unsigned ignoreunsupported:1; /* do not include unsupported configs */
+ unsigned ignoredeprecated:1; /* do not include deprecated configs */
unsigned ignorelocal:1; /* do not include the local section */
unsigned withsummary:1; /* include first line of comments - a summary */
unsigned withcomments:1; /* include all comment lines */
diff --git a/man/lvmconfig.8.in b/man/lvmconfig.8.in
index ff7c63b..1f70c86 100644
--- a/man/lvmconfig.8.in
+++ b/man/lvmconfig.8.in
@@ -22,6 +22,7 @@ lvmconfig, lvm dumpconfig, lvm config \(em Display LVM configuration
.RB [ \-\-metadataprofile
.IR ProfileName ]
.RB [ \-\-mergedconfig ]
+.RB [ \-\-showdeprecated ]
.RB [ \-\-showunsupported ]
.RB [ \-\-validate ]
.RB [ \-\-withsummary ]
@@ -150,6 +151,15 @@ the front of the cascade is displayed. See also \fBlvm.conf\fP(5) for more
info about \fBconfig cascade\fP.
.TP
+.B \-\-showdeprecated
+Include deprecated configuration settings in the output. These settings
+are always deprecated since certain version. If concrete version is specified
+with \fB--atversion\fP option, deprecated settings are automatically included
+if specified version is lower that the version in which the settings were
+deprecated. The \fBcurrent\fP and \fBdiff\fP types include deprecated settings
+int their output by default, all the other types ignore deprecated settings.
+
+.TP
.B \-\-showunsupported
Include unsupported configuration settings in the output. These settings
are either used for debugging or development purposes only or their support
@@ -172,12 +182,14 @@ Display a one line comment for each configuration node.
.TP
.B \-\-withcomments
-Display a full comment for each configuration node.
+Display a full comment for each configuration node. For deprecated
+settings, also display comments about deprecation in addition.
.TP
.B \-\-withversions
Also display a comment containing the version of introduction for
-each configuration node.
+each configuration node. If the setting is deprecated, also display
+the version since which it is deprecated.
.SH SEE ALSO
.BR lvm (8)
diff --git a/tools/args.h b/tools/args.h
index 2745699..791aa4e 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -98,6 +98,7 @@ arg(split_ARG, '\0', "split", NULL, 0)
arg(splitcache_ARG, '\0', "splitcache", NULL, 0)
arg(splitmirrors_ARG, '\0', "splitmirrors", int_arg, 0)
arg(splitsnapshot_ARG, '\0', "splitsnapshot", NULL, 0)
+arg(showdeprecated_ARG, '\0', "showdeprecated", NULL, 0)
arg(showunsupported_ARG, '\0', "showunsupported", NULL, 0)
arg(stripes_long_ARG, '\0', "stripes", int_arg, 0)
arg(syncaction_ARG, '\0', "syncaction", string_arg, 0) /* FIXME Use custom validation fn */
diff --git a/tools/commands.h b/tools/commands.h
index b7f9844..f2878ab 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -44,6 +44,7 @@ xx(config,
"\t[--profile ProfileName]\n"
"\t[--metadataprofile ProfileName]\n"
"\t[--mergedconfig]\n"
+ "\t[--showdeprecated]\n"
"\t[--showunsupported]\n"
"\t[--validate]\n"
"\t[--withsummary]\n"
@@ -53,8 +54,8 @@ xx(config,
"\t[ConfigurationNode...]\n",
atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG,
ignoreunsupported_ARG, ignorelocal_ARG, list_ARG, mergedconfig_ARG, metadataprofile_ARG,
- showunsupported_ARG, validate_ARG, withsummary_ARG, withcomments_ARG, unconfigured_ARG,
- withversions_ARG)
+ showdeprecated_ARG, showunsupported_ARG, validate_ARG, withsummary_ARG, withcomments_ARG,
+ unconfigured_ARG, withversions_ARG)
xx(devtypes,
"Display recognised built-in block device types",
@@ -98,6 +99,7 @@ xx(dumpconfig,
"\t[--profile ProfileName]\n"
"\t[--metadataprofile ProfileName]\n"
"\t[--mergedconfig]\n"
+ "\t[--showdeprecated]\n"
"\t[--showunsupported]\n"
"\t[--validate]\n"
"\t[--withsummary]\n"
@@ -107,8 +109,8 @@ xx(dumpconfig,
"\t[ConfigurationNode...]\n",
atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG,
ignoreunsupported_ARG, ignorelocal_ARG, list_ARG, mergedconfig_ARG, metadataprofile_ARG,
- showunsupported_ARG, validate_ARG, withsummary_ARG, withcomments_ARG, unconfigured_ARG,
- withversions_ARG)
+ showdeprecated_ARG, showunsupported_ARG, validate_ARG, withsummary_ARG, withcomments_ARG,
+ unconfigured_ARG, withversions_ARG)
xx(formats,
"List available metadata formats",
@@ -501,6 +503,7 @@ xx(lvmconfig,
"\t[--profile ProfileName]\n"
"\t[--metadataprofile ProfileName]\n"
"\t[--mergedconfig]\n"
+ "\t[--showdeprecated]\n"
"\t[--showunsupported]\n"
"\t[--validate]\n"
"\t[--withsummary]\n"
@@ -510,8 +513,8 @@ xx(lvmconfig,
"\t[ConfigurationNode...]\n",
atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG,
ignoreunsupported_ARG, ignorelocal_ARG, list_ARG, mergedconfig_ARG, metadataprofile_ARG,
- showunsupported_ARG, validate_ARG, withsummary_ARG, withcomments_ARG, unconfigured_ARG,
- withversions_ARG)
+ showdeprecated_ARG, showunsupported_ARG, validate_ARG, withsummary_ARG, withcomments_ARG,
+ unconfigured_ARG, withversions_ARG)
xx(lvmdiskscan,
"List devices that may be used as physical volumes",
diff --git a/tools/dumpconfig.c b/tools/dumpconfig.c
index 6b8f7b0..97de57a 100644
--- a/tools/dumpconfig.c
+++ b/tools/dumpconfig.c
@@ -136,6 +136,21 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
tree_spec.ignoreunsupported = 1;
}
+ if (strcmp(type, "current") && strcmp(type, "diff")) {
+ /*
+ * By default hide deprecated settings
+ * for all display types except "current"
+ * and "diff" unless --showdeprecated is set.
+ *
+ * N.B. Deprecated settings are visible if
+ * --atversion is used with a version that
+ * is lower than the version in which the
+ * setting was deprecated.
+ */
+ if (!arg_count(cmd, showdeprecated_ARG))
+ tree_spec.ignoredeprecated = 1;
+ }
+
if (arg_count(cmd, ignorelocal_ARG))
tree_spec.ignorelocal = 1;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5a0197121b07b8a2…
Commit: 5a0197121b07b8a2318000872d4b6916c2176ef9
Parent: b769183a98ca942c8252c8571241ac62d7476a26
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Apr 30 17:39:59 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Apr 30 17:39:59 2015 +0200
config_settings: devices/cache, activation/mirror_region_size and activation/mirror_device_fault_policy are deprecated
---
lib/config/config_settings.h | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index bece635..9fd9be6 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -245,8 +245,9 @@ cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_D
"system components. The syntax is the same as devices/filter.\n"
"Devices rejected by global_filter are not opened by LVM.\n")
-cfg_runtime(devices_cache_CFG, "cache", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0), 0, NULL,
- "The path can be set using the devices/cache_dir setting.\n")
+cfg_runtime(devices_cache_CFG, "cache", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0), vsn(1, 2, 19),
+ "This has been replaced by the devices/cache_dir setting.\n",
+ "Cache file path.\n")
cfg_runtime(devices_cache_dir_CFG, "cache_dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 2, 19), 0, NULL,
"Directory in which to store the device cache file.\n"
@@ -1034,8 +1035,9 @@ cfg_array(activation_read_only_volume_list_CFG, "read_only_volume_list", activat
"Possible options are: vgname, vgname/lvname, @tag, @*\n"
"See volume_list for how these options are matched to LVs.\n")
-cfg(activation_mirror_region_size_CFG, "mirror_region_size", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RAID_REGION_SIZE, vsn(1, 0, 0), NULL, 0, NULL,
- "This has been replaced by the activation/raid_region_size setting.\n")
+cfg(activation_mirror_region_size_CFG, "mirror_region_size", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RAID_REGION_SIZE, vsn(1, 0, 0), NULL, vsn(2, 2, 99),
+ "This has been replaced by the activation/raid_region_size setting.\n",
+ "Size (in KB) of each copy operation when mirroring.\n")
cfg(activation_raid_region_size_CFG, "raid_region_size", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RAID_REGION_SIZE, vsn(2, 2, 99), NULL, 0, NULL,
"Size in KiB of each raid or mirror synchronization region.\n"
@@ -1117,8 +1119,9 @@ cfg(activation_mirror_log_fault_policy_CFG, "mirror_log_fault_policy", activatio
"The mirror_image_fault_policy description for mirrored LVs\n"
"also applies to mirrored log LVs.\n")
-cfg(activation_mirror_device_fault_policy_CFG, "mirror_device_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_MIRROR_DEVICE_FAULT_POLICY, vsn(1, 2, 10), NULL, 0, NULL,
- "This has been replaced by the mirror_image_fault_policy setting.\n")
+cfg(activation_mirror_device_fault_policy_CFG, "mirror_device_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_MIRROR_DEVICE_FAULT_POLICY, vsn(1, 2, 10), NULL, vsn(2, 2, 57),
+ "This has been replaced by the activation/mirror_image_fault_policy setting.\n",
+ "Define how a device failure affecting a mirror is handled.\n")
cfg(activation_snapshot_autoextend_threshold_CFG, "snapshot_autoextend_threshold", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_SNAPSHOT_AUTOEXTEND_THRESHOLD, vsn(2, 2, 75), NULL, 0, NULL,
"Auto-extend a snapshot when its usage exceeds this percent.\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b769183a98ca942c…
Commit: b769183a98ca942c8252c8571241ac62d7476a26
Parent: 9c39d635b62aa4f27e3f9ff31f171e501bb8a874
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Apr 30 15:34:07 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Apr 30 15:39:34 2015 +0200
config: preparation for marking configuration nodes as deprecated
A preparatory code for marking configuration nodes as deprecated:
- struct cfg_def_item gains 2 new fields ("deprecated_since_version" and "deprecation_comment"
- cfg* macros to handle new fields
- related config_settings.h edits to add new fields for each item (null for all at the moment)
Patch with implementation will follow...
---
lib/config/config.c | 10 +-
lib/config/config.h | 12 +-
lib/config/config_settings.h | 412 +++++++++++++++++++++---------------------
3 files changed, 221 insertions(+), 213 deletions(-)
diff --git a/lib/config/config.c b/lib/config/config.c
index bab7f8b..41f13a0 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -65,11 +65,11 @@ struct config_source {
* Map each ID to respective definition of the configuration item.
*/
static struct cfg_def_item _cfg_def_items[CFG_COUNT + 1] = {
-#define cfg_section(id, name, parent, flags, since_version, comment) {id, parent, name, CFG_TYPE_SECTION, {0}, flags, since_version, {0}, comment},
-#define cfg(id, name, parent, flags, type, default_value, since_version, unconfigured_value, comment) {id, parent, name, type, {.v_##type = default_value}, flags, since_version, {.v_UNCONFIGURED = unconfigured_value}, comment},
-#define cfg_runtime(id, name, parent, flags, type, since_version, comment) {id, parent, name, type, {.fn_##type = get_default_##id}, flags | CFG_DEFAULT_RUN_TIME, since_version, {.fn_UNCONFIGURED = get_default_unconfigured_##id}, comment},
-#define cfg_array(id, name, parent, flags, types, default_value, since_version, unconfigured_value, comment) {id, parent, name, CFG_TYPE_ARRAY | types, {.v_CFG_TYPE_STRING = default_value}, flags, since_version, {.v_UNCONFIGURED = unconfigured_value}, comment},
-#define cfg_array_runtime(id, name, parent, flags, types, since_version, comment) {id, parent, name, CFG_TYPE_ARRAY | types, {.fn_CFG_TYPE_STRING = get_default_##id}, flags | CFG_DEFAULT_RUN_TIME, since_version, {.fn_UNCONFIGURED = get_default_unconfigured_##id}, comment},
+#define cfg_section(id, name, parent, flags, since_version, deprecated_since_version, deprecation_comment, comment) {id, parent, name, CFG_TYPE_SECTION, {0}, flags, since_version, {0}, deprecated_since_version, deprecation_comment, comment},
+#define cfg(id, name, parent, flags, type, default_value, since_version, unconfigured_value, deprecated_since_version, deprecation_comment, comment) {id, parent, name, type, {.v_##type = default_value}, flags, since_version, {.v_UNCONFIGURED = unconfigured_value}, deprecated_since_version, deprecation_comment, comment},
+#define cfg_runtime(id, name, parent, flags, type, since_version, deprecated_since_version, deprecation_comment, comment) {id, parent, name, type, {.fn_##type = get_default_##id}, flags | CFG_DEFAULT_RUN_TIME, since_version, {.fn_UNCONFIGURED = get_default_unconfigured_##id}, deprecated_since_version, deprecation_comment, comment},
+#define cfg_array(id, name, parent, flags, types, default_value, since_version, unconfigured_value, deprecated_since_version, deprecation_comment, comment) {id, parent, name, CFG_TYPE_ARRAY | types, {.v_CFG_TYPE_STRING = default_value}, flags, since_version, {.v_UNCONFIGURED = unconfigured_value}, deprecated_since_version, deprecation_comment, comment},
+#define cfg_array_runtime(id, name, parent, flags, types, since_version, deprecated_since_version, deprecation_comment, comment) {id, parent, name, CFG_TYPE_ARRAY | types, {.fn_CFG_TYPE_STRING = get_default_##id}, flags | CFG_DEFAULT_RUN_TIME, since_version, {.fn_UNCONFIGURED = get_default_unconfigured_##id}, deprecated_since_version, deprecation_comment, comment},
#include "config_settings.h"
#undef cfg_section
#undef cfg
diff --git a/lib/config/config.h b/lib/config/config.h
index 892529d..c21a61b 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -128,6 +128,8 @@ typedef struct cfg_def_item {
uint16_t flags; /* configuration item definition flags */
uint16_t since_version; /* version this item appeared in */
cfg_def_unconfigured_value_t default_unconfigured_value; /* default value in terms of @FOO@, pre-configured (only for settings) */
+ uint16_t deprecated_since_version; /* version since this item is deprecated */
+ const char *deprecation_comment; /* comment about reasons for deprecation and settings that supersede this one */
const char *comment; /* comment */
} cfg_def_item_t;
@@ -172,11 +174,11 @@ struct config_def_tree_spec {
* Register ID for each possible item in the configuration tree.
*/
enum {
-#define cfg_section(id, name, parent, flags, since_version, comment) id,
-#define cfg(id, name, parent, flags, type, default_value, since_version, unconfigured_value, comment) id,
-#define cfg_runtime(id, name, parent, flags, type, since_version, comment) id,
-#define cfg_array(id, name, parent, flags, types, default_value, since_version, unconfigured_value, comment) id,
-#define cfg_array_runtime(id, name, parent, flags, types, since_version, comment) id,
+#define cfg_section(id, name, parent, flags, since_version, deprecated_since_version, deprecation_comment, comment) id,
+#define cfg(id, name, parent, flags, type, default_value, since_version, unconfigured_value, deprecated_since_version, deprecation_comment, comment) id,
+#define cfg_runtime(id, name, parent, flags, type, since_version, deprecated_since_version, deprecation_comment, comment) id,
+#define cfg_array(id, name, parent, flags, types, default_value, since_version, unconfigured_value, deprecated_since_version, deprecation_comment, comment) id,
+#define cfg_array_runtime(id, name, parent, flags, types, since_version, deprecated_since_version, deprecation_comment, comment) id,
#include "config_settings.h"
#undef cfg_section
#undef cfg
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index b496071..bece635 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -15,13 +15,13 @@
/*
* MACROS:
* - define a configuration section:
- * cfg_section(id, name, parent, flags, since_version, comment)
+ * cfg_section(id, name, parent, flags, since_version, deprecated_since_version, deprecation_comment, comment)
*
* - define a configuration setting of simple type:
- * cfg(id, name, parent, flags, type, default_value, since_version, unconfigured_default_value, comment)
+ * cfg(id, name, parent, flags, type, default_value, since_version, unconfigured_default_value, deprecated_since_version, deprecation_comment, comment)
*
* - define a configuration array of one or more types:
- * cfg_array(id, name, parent, flags, types, default_value, since_version, unconfigured_default_value, comment)
+ * cfg_array(id, name, parent, flags, types, default_value, since_version, unconfigured_default_value, deprecated_since_version, deprecation_comment, comment)
*
*
* If default value can't be assigned statically because it depends on some
@@ -83,55 +83,61 @@
* while running configure.
* (see also 'lvmconfig --type default --unconfigured')
*
+ * deprecated_since_version: The version since this configuration node is deprecated.
+ *
+ * deprecation_comment: Comment about deprecation reason and related info (e.g. which
+ * configuration is used now instead).
+ *
* comment: Comment used in configuration dumps. The very first line is the
* summarizing comment.
* (see also lvmconfig ... --withcomments and --withsummary)
*/
#include "defaults.h"
-cfg_section(root_CFG_SECTION, "(root)", root_CFG_SECTION, 0, vsn(0, 0, 0), NULL)
+cfg_section(root_CFG_SECTION, "(root)", root_CFG_SECTION, 0, vsn(0, 0, 0), 0, NULL, NULL)
-cfg_section(config_CFG_SECTION, "config", root_CFG_SECTION, 0, vsn(2, 2, 99),
+cfg_section(config_CFG_SECTION, "config", root_CFG_SECTION, 0, vsn(2, 2, 99), 0, NULL,
"How LVM configuration settings are handled.\n")
-cfg_section(devices_CFG_SECTION, "devices", root_CFG_SECTION, 0, vsn(1, 0, 0),
+cfg_section(devices_CFG_SECTION, "devices", root_CFG_SECTION, 0, vsn(1, 0, 0), 0, NULL,
"How LVM uses block devices.\n")
-cfg_section(allocation_CFG_SECTION, "allocation", root_CFG_SECTION, CFG_PROFILABLE, vsn(2, 2, 77),
+cfg_section(allocation_CFG_SECTION, "allocation", root_CFG_SECTION, CFG_PROFILABLE, vsn(2, 2, 77), 0, NULL,
"How LVM selects free space for Logical Volumes.\n")
-cfg_section(log_CFG_SECTION, "log", root_CFG_SECTION, 0, vsn(1, 0, 0),
+cfg_section(log_CFG_SECTION, "log", root_CFG_SECTION, 0, vsn(1, 0, 0), 0, NULL,
"How LVM log information is reported.\n")
-cfg_section(backup_CFG_SECTION, "backup", root_CFG_SECTION, 0, vsn(1, 0, 0),
+cfg_section(backup_CFG_SECTION, "backup", root_CFG_SECTION, 0, vsn(1, 0, 0), 0, NULL,
"How LVM metadata is backed up and archived.\n"
"In LVM, a 'backup' is a copy of the metadata for the\n"
"current system, and an 'archive' contains old metadata\n"
"configurations. They are stored in a human readable\n"
"text format.\n")
-cfg_section(shell_CFG_SECTION, "shell", root_CFG_SECTION, 0, vsn(1, 0, 0),
+cfg_section(shell_CFG_SECTION, "shell", root_CFG_SECTION, 0, vsn(1, 0, 0), 0, NULL,
"Settings for running LVM in shell (readline) mode.\n")
-cfg_section(global_CFG_SECTION, "global", root_CFG_SECTION, CFG_PROFILABLE, vsn(1, 0, 0),
+cfg_section(global_CFG_SECTION, "global", root_CFG_SECTION, CFG_PROFILABLE, vsn(1, 0, 0), 0, NULL,
"Miscellaneous global LVM settings.\n")
-cfg_section(activation_CFG_SECTION, "activation", root_CFG_SECTION, CFG_PROFILABLE, vsn(1, 0, 0), NULL)
-cfg_section(metadata_CFG_SECTION, "metadata", root_CFG_SECTION, 0, vsn(1, 0, 0), NULL)
+cfg_section(activation_CFG_SECTION, "activation", root_CFG_SECTION, CFG_PROFILABLE, vsn(1, 0, 0), 0, NULL, NULL)
+
+cfg_section(metadata_CFG_SECTION, "metadata", root_CFG_SECTION, 0, vsn(1, 0, 0), 0, NULL, NULL)
-cfg_section(report_CFG_SECTION, "report", root_CFG_SECTION, CFG_PROFILABLE, vsn(1, 0, 0),
+cfg_section(report_CFG_SECTION, "report", root_CFG_SECTION, CFG_PROFILABLE, vsn(1, 0, 0), 0, NULL,
"LVM report command output formatting.\n")
-cfg_section(dmeventd_CFG_SECTION, "dmeventd", root_CFG_SECTION, 0, vsn(1, 2, 3),
+cfg_section(dmeventd_CFG_SECTION, "dmeventd", root_CFG_SECTION, 0, vsn(1, 2, 3), 0, NULL,
"Settings for the LVM event daemon.\n")
-cfg_section(tags_CFG_SECTION, "tags", root_CFG_SECTION, 0, vsn(1, 0, 18),
+cfg_section(tags_CFG_SECTION, "tags", root_CFG_SECTION, 0, vsn(1, 0, 18), 0, NULL,
"Host tag settings.\n")
-cfg_section(local_CFG_SECTION, "local", root_CFG_SECTION, 0, vsn(2, 2, 117),
+cfg_section(local_CFG_SECTION, "local", root_CFG_SECTION, 0, vsn(2, 2, 117), 0, NULL,
"LVM settings that are specific to the local host.\n")
-cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 99), NULL,
+cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 99), NULL, 0, NULL,
"If enabled, any LVM configuration mismatch is reported.\n"
"This implies checking that the configuration key is understood\n"
"by LVM and that the value of the key is the proper type.\n"
@@ -139,22 +145,22 @@ cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2,
"value is used without any warning (a message about the\n"
"configuration key not being found is issued in verbose mode only).\n")
-cfg(config_abort_on_errors_CFG, "abort_on_errors", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2,2,99), NULL,
+cfg(config_abort_on_errors_CFG, "abort_on_errors", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2,2,99), NULL, 0, NULL,
"Abort the LVM process if a configuration mismatch is found.\n")
-cfg_runtime(config_profile_dir_CFG, "profile_dir", config_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(2, 2, 99),
+cfg_runtime(config_profile_dir_CFG, "profile_dir", config_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(2, 2, 99), 0, NULL,
"Directory where LVM looks for configuration profiles.\n")
-cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING, DEFAULT_DEV_DIR, vsn(1, 0, 0), NULL,
+cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING, DEFAULT_DEV_DIR, vsn(1, 0, 0), NULL, 0, NULL,
"Directory in which to create volume group device nodes.\n"
"Commands also accept this as a prefix on volume group names.\n")
-cfg_array(devices_scan_CFG, "scan", devices_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING, "#S/dev", vsn(1, 0, 0), NULL,
+cfg_array(devices_scan_CFG, "scan", devices_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING, "#S/dev", vsn(1, 0, 0), NULL, 0, NULL,
"Directories containing device nodes to use with LVM.\n")
-cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_UNSUPPORTED, CFG_TYPE_STRING, NULL, vsn(1, 2, 0), NULL, NULL)
+cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_UNSUPPORTED, CFG_TYPE_STRING, NULL, vsn(1, 2, 0), NULL, 0, NULL, NULL)
-cfg(devices_obtain_device_list_from_udev_CFG, "obtain_device_list_from_udev", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV, vsn(2, 2, 85), NULL,
+cfg(devices_obtain_device_list_from_udev_CFG, "obtain_device_list_from_udev", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV, vsn(2, 2, 85), NULL, 0, NULL,
"Obtain the list of available devices from udev.\n"
"This avoids opening or using any inapplicable non-block\n"
"devices or subdirectories found in the udev directory.\n"
@@ -164,7 +170,7 @@ cfg(devices_obtain_device_list_from_udev_CFG, "obtain_device_list_from_udev", de
"scanned fully. LVM needs to be compiled with udev support\n"
"for this setting to apply.\n")
-cfg(devices_external_device_info_source_CFG, "external_device_info_source", devices_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_EXTERNAL_DEVICE_INFO_SOURCE, vsn(2, 2, 116), NULL,
+cfg(devices_external_device_info_source_CFG, "external_device_info_source", devices_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_EXTERNAL_DEVICE_INFO_SOURCE, vsn(2, 2, 116), NULL, 0, NULL,
"Select an external device information source.\n"
"Some information may already be available in the system and\n"
"LVM can use this information to determine the exact type\n"
@@ -179,7 +185,7 @@ cfg(devices_external_device_info_source_CFG, "external_device_info_source", devi
"udev - Reuse existing udev database records. Applicable\n"
"only if LVM is compiled with udev support.\n")
-cfg_array(devices_preferred_names_CFG, "preferred_names", devices_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 2, 19), NULL,
+cfg_array(devices_preferred_names_CFG, "preferred_names", devices_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 2, 19), NULL, 0, NULL,
"Select which path name to display for a block device.\n"
"If multiple path names exist for a block device,\n"
"and LVM needs to display a name for the device,\n"
@@ -196,7 +202,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,
+cfg_array(devices_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, 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"
@@ -231,7 +237,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,
+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,
"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"
@@ -239,10 +245,10 @@ cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_D
"system components. The syntax is the same as devices/filter.\n"
"Devices rejected by global_filter are not opened by LVM.\n")
-cfg_runtime(devices_cache_CFG, "cache", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0),
+cfg_runtime(devices_cache_CFG, "cache", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0), 0, NULL,
"The path can be set using the devices/cache_dir setting.\n")
-cfg_runtime(devices_cache_dir_CFG, "cache_dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 2, 19),
+cfg_runtime(devices_cache_dir_CFG, "cache_dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 2, 19), 0, NULL,
"Directory in which to store the device cache file.\n"
"The results of filtering are cached on disk to avoid\n"
"rescanning dud devices (which can take a very long time).\n"
@@ -251,46 +257,46 @@ cfg_runtime(devices_cache_dir_CFG, "cache_dir", devices_CFG_SECTION, 0, CFG_TYPE
"If obtain_device_list_from_udev is enabled, the list of devices\n"
"is obtained from udev and any existing .cache file is removed.\n")
-cfg(devices_cache_file_prefix_CFG, "cache_file_prefix", devices_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_CACHE_FILE_PREFIX, vsn(1, 2, 19), NULL,
+cfg(devices_cache_file_prefix_CFG, "cache_file_prefix", devices_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_CACHE_FILE_PREFIX, vsn(1, 2, 19), NULL, 0, NULL,
"A prefix used before the .cache file name. See devices/cache_dir.\n")
-cfg(devices_write_cache_state_CFG, "write_cache_state", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(1, 0, 0), NULL,
+cfg(devices_write_cache_state_CFG, "write_cache_state", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(1, 0, 0), NULL, 0, NULL,
"Enable/disable writing the cache file. See devices/cache_dir.\n")
-cfg_array(devices_types_CFG, "types", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_ADVANCED, CFG_TYPE_INT | CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL,
+cfg_array(devices_types_CFG, "types", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_ADVANCED, CFG_TYPE_INT | CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL,
"List of additional acceptable block device types.\n"
"These are of device type names from /proc/devices,\n"
"followed by the maximum number of partitions.\n"
"Example:\n"
"types = [ \"fd\", 16 ]\n")
-cfg(devices_sysfs_scan_CFG, "sysfs_scan", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSFS_SCAN, vsn(1, 0, 8), NULL,
+cfg(devices_sysfs_scan_CFG, "sysfs_scan", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSFS_SCAN, vsn(1, 0, 8), NULL, 0, NULL,
"Restrict device scanning to block devices appearing in sysfs.\n"
"This is a quick way of filtering out block devices that are\n"
"not present on the system. sysfs must be part of the kernel\n"
"and mounted.)\n")
-cfg(devices_multipath_component_detection_CFG, "multipath_component_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MULTIPATH_COMPONENT_DETECTION, vsn(2, 2, 89), NULL,
+cfg(devices_multipath_component_detection_CFG, "multipath_component_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MULTIPATH_COMPONENT_DETECTION, vsn(2, 2, 89), NULL, 0, NULL,
"Ignore devices that are components of DM multipath devices.\n")
-cfg(devices_md_component_detection_CFG, "md_component_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MD_COMPONENT_DETECTION, vsn(1, 0, 18), NULL,
+cfg(devices_md_component_detection_CFG, "md_component_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MD_COMPONENT_DETECTION, vsn(1, 0, 18), NULL, 0, NULL,
"Ignore devices that are components of software RAID (md) devices.\n")
-cfg(devices_fw_raid_component_detection_CFG, "fw_raid_component_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FW_RAID_COMPONENT_DETECTION, vsn(2, 2, 112), NULL,
+cfg(devices_fw_raid_component_detection_CFG, "fw_raid_component_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FW_RAID_COMPONENT_DETECTION, vsn(2, 2, 112), NULL, 0, NULL,
"Ignore devices that are components of firmware RAID devices.\n"
"LVM must use an external_device_info_source other than none\n"
"for this detection to execute.\n")
-cfg(devices_md_chunk_alignment_CFG, "md_chunk_alignment", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MD_CHUNK_ALIGNMENT, vsn(2, 2, 48), NULL,
+cfg(devices_md_chunk_alignment_CFG, "md_chunk_alignment", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MD_CHUNK_ALIGNMENT, vsn(2, 2, 48), NULL, 0, NULL,
"Align PV data blocks with md device's stripe-width.\n"
"This applies if a PV is placed directly on an md device.\n")
-cfg(devices_default_data_alignment_CFG, "default_data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_DATA_ALIGNMENT, vsn(2, 2, 75), NULL,
+cfg(devices_default_data_alignment_CFG, "default_data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_DATA_ALIGNMENT, vsn(2, 2, 75), NULL, 0, NULL,
"Default alignment of the start of a PV data area in MB.\n"
"If set to 0, a value of 64KB will be used.\n"
"Set to 1 for 1MiB, 2 for 2MiB, etc.\n")
-cfg(devices_data_alignment_detection_CFG, "data_alignment_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DATA_ALIGNMENT_DETECTION, vsn(2, 2, 51), NULL,
+cfg(devices_data_alignment_detection_CFG, "data_alignment_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DATA_ALIGNMENT_DETECTION, vsn(2, 2, 51), NULL, 0, NULL,
"Detect PV data alignment based on sysfs device information.\n"
"The start of a PV data area will be a multiple of\n"
"minimum_io_size or optimal_io_size exposed in sysfs.\n"
@@ -302,7 +308,7 @@ cfg(devices_data_alignment_detection_CFG, "data_alignment_detection", devices_CF
"If md_chunk_alignment is enabled, that detects the optimal_io_size.\n"
"This setting takes precedence over md_chunk_alignment.\n")
-cfg(devices_data_alignment_CFG, "data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(2, 2, 45), NULL,
+cfg(devices_data_alignment_CFG, "data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(2, 2, 45), NULL, 0, NULL,
"Alignment of the start of a PV data area in KB.\n"
"If a PV is placed directly on an md device and\n"
"md_chunk_alignment or data_alignment_detection are enabled,\n"
@@ -310,7 +316,7 @@ cfg(devices_data_alignment_CFG, "data_alignment", devices_CFG_SECTION, 0, CFG_TY
"and data_alignment_detection are disabled if this is set.\n"
"Set to 0 to use the default alignment or the page size, if larger.\n")
-cfg(devices_data_alignment_offset_detection_CFG, "data_alignment_offset_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DATA_ALIGNMENT_OFFSET_DETECTION, vsn(2, 2, 50), NULL,
+cfg(devices_data_alignment_offset_detection_CFG, "data_alignment_offset_detection", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DATA_ALIGNMENT_OFFSET_DETECTION, vsn(2, 2, 50), NULL, 0, NULL,
"Detect PV data alignment offset based on sysfs device information.\n"
"The start of a PV aligned data area will be shifted by the\n"
"alignment_offset exposed in sysfs. This offset is often 0, but\n"
@@ -320,12 +326,12 @@ cfg(devices_data_alignment_offset_detection_CFG, "data_alignment_offset_detectio
"at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).\n"
"pvcreate --dataalignmentoffset will skip this detection.\n")
-cfg(devices_ignore_suspended_devices_CFG, "ignore_suspended_devices", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_IGNORE_SUSPENDED_DEVICES, vsn(1, 2, 19), NULL,
+cfg(devices_ignore_suspended_devices_CFG, "ignore_suspended_devices", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_IGNORE_SUSPENDED_DEVICES, vsn(1, 2, 19), NULL, 0, NULL,
"Ignore DM devices that have I/O suspended while scanning devices.\n"
"Otherwise, LVM waits for a suspended device to become accessible.\n"
"This should only be needed in recovery situations.\n")
-cfg(devices_ignore_lvm_mirrors_CFG, "ignore_lvm_mirrors", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_IGNORE_LVM_MIRRORS, vsn(2, 2, 104), NULL,
+cfg(devices_ignore_lvm_mirrors_CFG, "ignore_lvm_mirrors", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_IGNORE_LVM_MIRRORS, vsn(2, 2, 104), NULL, 0, NULL,
"Do not scan 'mirror' LVs to avoid possible deadlocks.\n"
"This avoids possible deadlocks when using the 'mirror'\n"
"segment type. This setting determines whether logical volumes\n"
@@ -345,7 +351,7 @@ cfg(devices_ignore_lvm_mirrors_CFG, "ignore_lvm_mirrors", devices_CFG_SECTION, 0
"'raid1' which handle failures in a different way, making them a\n"
"better choice for VG stacking.\n")
-cfg(devices_disable_after_error_count_CFG, "disable_after_error_count", devices_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_DISABLE_AFTER_ERROR_COUNT, vsn(2, 2, 75), NULL,
+cfg(devices_disable_after_error_count_CFG, "disable_after_error_count", devices_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_DISABLE_AFTER_ERROR_COUNT, vsn(2, 2, 75), NULL, 0, NULL,
"Number of I/O errors after which a device is skipped.\n"
"During each LVM operation, errors received from each device\n"
"are counted. If the counter of a device exceeds the limit set\n"
@@ -353,16 +359,16 @@ cfg(devices_disable_after_error_count_CFG, "disable_after_error_count", devices_
"of the operation.\n"
"Setting this to 0 disables the counters altogether.\n")
-cfg(devices_require_restorefile_with_uuid_CFG, "require_restorefile_with_uuid", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_REQUIRE_RESTOREFILE_WITH_UUID, vsn(2, 2, 73), NULL,
+cfg(devices_require_restorefile_with_uuid_CFG, "require_restorefile_with_uuid", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_REQUIRE_RESTOREFILE_WITH_UUID, vsn(2, 2, 73), NULL, 0, NULL,
"Allow use of pvcreate --uuid without requiring --restorefile.\n")
-cfg(devices_pv_min_size_CFG, "pv_min_size", devices_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_PV_MIN_SIZE_KB, vsn(2, 2, 85), NULL,
+cfg(devices_pv_min_size_CFG, "pv_min_size", devices_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_PV_MIN_SIZE_KB, vsn(2, 2, 85), NULL, 0, NULL,
"Minimum size (in KB) of block devices which can be used as PVs.\n"
"In a clustered environment all nodes must use the same value.\n"
"Any value smaller than 512KB is ignored. The previous built-in\n"
"value was 512.\n")
-cfg(devices_issue_discards_CFG, "issue_discards", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ISSUE_DISCARDS, vsn(2, 2, 85), NULL,
+cfg(devices_issue_discards_CFG, "issue_discards", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ISSUE_DISCARDS, vsn(2, 2, 85), NULL, 0, NULL,
"Issue discards to PVs that are no longer used by an LV.\n"
"Discards are sent to an LV's underlying physical volumes when\n"
"the LV is no longer using the physical volumes' space, e.g.\n"
@@ -374,7 +380,7 @@ cfg(devices_issue_discards_CFG, "issue_discards", devices_CFG_SECTION, 0, CFG_TY
"and thinly provisioned LUNs generally do. If enabled, discards\n"
"will only be issued if both the storage and kernel provide support.\n")
-cfg_array(allocation_cling_tag_list_CFG, "cling_tag_list", allocation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 77), NULL,
+cfg_array(allocation_cling_tag_list_CFG, "cling_tag_list", allocation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 77), NULL, 0, NULL,
"Advise LVM which PVs to use when searching for new space.\n"
"When searching for free space to extend an LV, the 'cling'\n"
"allocation policy will choose space on the same PVs as the last\n"
@@ -391,14 +397,14 @@ cfg_array(allocation_cling_tag_list_CFG, "cling_tag_list", allocation_CFG_SECTIO
"they are situated.\n"
"cling_tag_list = [ \"@site1\", \"@site2\" ]\n")
-cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MAXIMISE_CLING, vsn(2, 2, 85), NULL,
+cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MAXIMISE_CLING, vsn(2, 2, 85), NULL, 0, NULL,
"Use a previous allocation algorithm.\n"
"Changes made in version 2.02.85 extended the reach of the 'cling'\n"
"policies to detect more situations where data can be grouped onto\n"
"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,
+cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL, 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"
@@ -409,7 +415,7 @@ cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION,
"To see the list of signatures recognized by blkid, check the\n"
"output of the 'blkid -k' command.\n")
-cfg(allocation_wipe_signatures_when_zeroing_new_lvs_CFG, "wipe_signatures_when_zeroing_new_lvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL,
+cfg(allocation_wipe_signatures_when_zeroing_new_lvs_CFG, "wipe_signatures_when_zeroing_new_lvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL, 0, NULL,
"Look for and erase any signatures while zeroing a new LV.\n"
"Zeroing is controlled by the -Z/--zero option, and if not\n"
"specified, zeroing is used by default if possible.\n"
@@ -429,14 +435,14 @@ cfg(allocation_wipe_signatures_when_zeroing_new_lvs_CFG, "wipe_signatures_when_z
"not detected or erased unless the -W/--wipesignatures y\n"
"option is used directly.\n")
-cfg(allocation_mirror_logs_require_separate_pvs_CFG, "mirror_logs_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS, vsn(2, 2, 85), NULL,
+cfg(allocation_mirror_logs_require_separate_pvs_CFG, "mirror_logs_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS, vsn(2, 2, 85), NULL, 0, NULL,
"Mirror logs and images will always use different PVs.\n"
"The default setting changed in version 2.02.85.\n")
-cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL,
+cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL, 0, NULL,
"Cache pool metadata and data will always use different PVs.\n")
-cfg(allocation_cache_pool_cachemode_CFG, "cache_pool_cachemode", allocation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_CACHE_POOL_CACHEMODE, vsn(2, 2, 113), NULL,
+cfg(allocation_cache_pool_cachemode_CFG, "cache_pool_cachemode", allocation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_CACHE_POOL_CACHEMODE, vsn(2, 2, 113), NULL, 0, NULL,
"The default cache mode used for new cache pools.\n"
"Possible options are: writethrough, writeback.\n"
"writethrough - Data blocks are immediately written from\n"
@@ -444,7 +450,7 @@ cfg(allocation_cache_pool_cachemode_CFG, "cache_pool_cachemode", allocation_CFG_
"writeback - Data blocks are written from the cache back\n"
"to disk after some delay to improve performance.\n")
-cfg_runtime(allocation_cache_pool_chunk_size_CFG, "cache_pool_chunk_size", allocation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, vsn(2, 2, 106),
+cfg_runtime(allocation_cache_pool_chunk_size_CFG, "cache_pool_chunk_size", allocation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, vsn(2, 2, 106), 0, NULL,
"The minimal chunk size (in kiB) for cache pool volumes.\n"
"Using a chunk_size that is too large can result in wasteful\n"
"use of the cache, where small reads and writes can cause\n"
@@ -456,18 +462,18 @@ cfg_runtime(allocation_cache_pool_chunk_size_CFG, "cache_pool_chunk_size", alloc
"end of the spectrum. Supported values range from 32(kiB) to\n"
"1048576 in multiples of 32.\n")
-cfg(allocation_thin_pool_metadata_require_separate_pvs_CFG, "thin_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 89), NULL,
+cfg(allocation_thin_pool_metadata_require_separate_pvs_CFG, "thin_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 89), NULL, 0, NULL,
"Thin pool metdata and data will always use different PVs.\n")
-cfg(allocation_thin_pool_zero_CFG, "thin_pool_zero", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_ZERO, vsn(2, 2, 99), NULL,
+cfg(allocation_thin_pool_zero_CFG, "thin_pool_zero", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_BOOL, DEFAULT_THIN_POOL_ZERO, vsn(2, 2, 99), NULL, 0, NULL,
"Thin pool data chunks are zeroed before they are first used.\n"
"Zeroing with a larger thin pool chunk size reduces performance.\n")
-cfg(allocation_thin_pool_discards_CFG, "thin_pool_discards", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_STRING, DEFAULT_THIN_POOL_DISCARDS, vsn(2, 2, 99), NULL,
+cfg(allocation_thin_pool_discards_CFG, "thin_pool_discards", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_STRING, DEFAULT_THIN_POOL_DISCARDS, vsn(2, 2, 99), NULL, 0, NULL,
"The discards behaviour of thin pool volumes.\n"
"Possible options are: ignore, nopassdown, passdown.\n")
-cfg(allocation_thin_pool_chunk_size_policy_CFG, "thin_pool_chunk_size_policy", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_STRING, DEFAULT_THIN_POOL_CHUNK_SIZE_POLICY, vsn(2, 2, 101), NULL,
+cfg(allocation_thin_pool_chunk_size_policy_CFG, "thin_pool_chunk_size_policy", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_STRING, DEFAULT_THIN_POOL_CHUNK_SIZE_POLICY, vsn(2, 2, 101), NULL, 0, NULL,
"The chunk size calculation policy for thin pool volumes.\n"
"Possible options are: generic, performance.\n"
"generic - If thin_pool_chunk_size is defined, use it.\n"
@@ -479,7 +485,7 @@ cfg(allocation_thin_pool_chunk_size_policy_CFG, "thin_pool_chunk_size_policy", a
"device hints exposed in sysfs - the optimal_io_size.\n"
"The chunk size is always at least 512KiB.\n")
-cfg_runtime(allocation_thin_pool_chunk_size_CFG, "thin_pool_chunk_size", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, vsn(2, 2, 99),
+cfg_runtime(allocation_thin_pool_chunk_size_CFG, "thin_pool_chunk_size", allocation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, vsn(2, 2, 99), 0, NULL,
"The minimal chunk size (in KB) for thin pool volumes.\n"
"Larger chunk sizes may improve performance for plain\n"
"thin volumes, however using them for snapshot volumes\n"
@@ -488,13 +494,13 @@ cfg_runtime(allocation_thin_pool_chunk_size_CFG, "thin_pool_chunk_size", allocat
"chunk size starting from 64KB. Supported values are in\n"
"the range 64 to 1048576.\n")
-cfg(allocation_physical_extent_size_CFG, "physical_extent_size", allocation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_EXTENT_SIZE, vsn(2, 2, 112), NULL,
+cfg(allocation_physical_extent_size_CFG, "physical_extent_size", allocation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_EXTENT_SIZE, vsn(2, 2, 112), NULL, 0, NULL,
"Default physical extent size to use for new VGs (in KB).\n")
-cfg(log_verbose_CFG, "verbose", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_VERBOSE, vsn(1, 0, 0), NULL,
+cfg(log_verbose_CFG, "verbose", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_VERBOSE, vsn(1, 0, 0), NULL, 0, NULL,
"Controls the messages sent to stdout or stderr.\n")
-cfg(log_silent_CFG, "silent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SILENT, vsn(2, 2, 98), NULL,
+cfg(log_silent_CFG, "silent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SILENT, vsn(2, 2, 98), NULL, 0, NULL,
"Suppress all non-essential messages from stdout.\n"
"This has the same effect as -qq.\n"
"When enabled, the following commands still produce output:\n"
@@ -505,40 +511,40 @@ cfg(log_silent_CFG, "silent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SILENT,
"Any 'yes' or 'no' questions not overridden by other arguments\n"
"are suppressed and default to 'no'.\n")
-cfg(log_syslog_CFG, "syslog", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSLOG, vsn(1, 0, 0), NULL,
+cfg(log_syslog_CFG, "syslog", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSLOG, vsn(1, 0, 0), NULL, 0, NULL,
"Send log messages through syslog.\n")
-cfg(log_file_CFG, "file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL,
+cfg(log_file_CFG, "file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL,
"Write error and debug log messages to a file specified here.\n")
-cfg(log_overwrite_CFG, "overwrite", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_OVERWRITE, vsn(1, 0, 0), NULL,
+cfg(log_overwrite_CFG, "overwrite", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_OVERWRITE, vsn(1, 0, 0), NULL, 0, NULL,
"Overwrite the log file each time the program is run.\n")
-cfg(log_level_CFG, "level", log_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_LOGLEVEL, vsn(1, 0, 0), NULL,
+cfg(log_level_CFG, "level", log_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_LOGLEVEL, vsn(1, 0, 0), NULL, 0, NULL,
"The level of log messages that are sent to the log file or syslog.\n"
"There are 6 syslog-like log levels currently in use: 2 to 7 inclusive.\n"
"7 is the most verbose (LOG_DEBUG).\n")
-cfg(log_indent_CFG, "indent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_INDENT, vsn(1, 0, 0), NULL,
+cfg(log_indent_CFG, "indent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_INDENT, vsn(1, 0, 0), NULL, 0, NULL,
"Indent messages according to their severity.\n")
-cfg(log_command_names_CFG, "command_names", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CMD_NAME, vsn(1, 0, 0), NULL,
+cfg(log_command_names_CFG, "command_names", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CMD_NAME, vsn(1, 0, 0), NULL, 0, NULL,
"Display the command name on each line of output.\n")
-cfg(log_prefix_CFG, "prefix", log_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_MSG_PREFIX, vsn(1, 0, 0), NULL,
+cfg(log_prefix_CFG, "prefix", log_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_MSG_PREFIX, vsn(1, 0, 0), NULL, 0, NULL,
"A prefix to use before the log message text.\n"
"(After the command name, if selected).\n"
"Two spaces allows you to see/grep the severity of each message.\n"
"To make the messages look similar to the original LVM tools use:\n"
"indent = 0, command_names = 1, prefix = \" -- \"\n")
-cfg(log_activation_CFG, "activation", log_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(1, 0, 0), NULL,
+cfg(log_activation_CFG, "activation", log_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(1, 0, 0), NULL, 0, NULL,
"Log messages during activation.\n"
"Don't use this in low memory situations (can deadlock).\n")
-cfg(log_activate_file_CFG, "activate_file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_UNSUPPORTED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, NULL)
+cfg(log_activate_file_CFG, "activate_file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_UNSUPPORTED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL, NULL)
-cfg_array(log_debug_classes_CFG, "debug_classes", log_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, "#Smemory#Sdevices#Sactivation#Sallocation#Slvmetad#Smetadata#Scache#Slocking", vsn(2, 2, 99), NULL,
+cfg_array(log_debug_classes_CFG, "debug_classes", log_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, "#Smemory#Sdevices#Sactivation#Sallocation#Slvmetad#Smetadata#Scache#Slocking", vsn(2, 2, 99), NULL, 0, NULL,
"Select log messages by class.\n"
"Some debugging messages are assigned to a class\n"
"and only appear in debug output if the class is\n"
@@ -547,63 +553,63 @@ cfg_array(log_debug_classes_CFG, "debug_classes", log_CFG_SECTION, CFG_ALLOW_EMP
"lvmetad, metadata, cache, locking.\n"
"Use \"all\" to see everything.\n")
-cfg(backup_backup_CFG, "backup", backup_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_BACKUP_ENABLED, vsn(1, 0, 0), NULL,
+cfg(backup_backup_CFG, "backup", backup_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_BACKUP_ENABLED, vsn(1, 0, 0), NULL, 0, NULL,
"Maintain a backup of the current metadata configuration.\n"
"Think very hard before turning this off!\n")
-cfg_runtime(backup_backup_dir_CFG, "backup_dir", backup_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0),
+cfg_runtime(backup_backup_dir_CFG, "backup_dir", backup_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0), 0, NULL,
"Location of the metadata backup files.\n"
"Remember to back up this directory regularly!\n")
-cfg(backup_archive_CFG, "archive", backup_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ARCHIVE_ENABLED, vsn(1, 0, 0), NULL,
+cfg(backup_archive_CFG, "archive", backup_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ARCHIVE_ENABLED, vsn(1, 0, 0), NULL, 0, NULL,
"Maintain an archive of old metadata configurations.\n"
"Think very hard before turning this off.\n")
-cfg_runtime(backup_archive_dir_CFG, "archive_dir", backup_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0),
+cfg_runtime(backup_archive_dir_CFG, "archive_dir", backup_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0), 0, NULL,
"Location of the metdata archive files.\n"
"Remember to back up this directory regularly!\n")
-cfg(backup_retain_min_CFG, "retain_min", backup_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_ARCHIVE_NUMBER, vsn(1, 0, 0), NULL,
+cfg(backup_retain_min_CFG, "retain_min", backup_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_ARCHIVE_NUMBER, vsn(1, 0, 0), NULL, 0, NULL,
"Minimum number of archives to keep.\n")
-cfg(backup_retain_days_CFG, "retain_days", backup_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_ARCHIVE_DAYS, vsn(1, 0, 0), NULL,
+cfg(backup_retain_days_CFG, "retain_days", backup_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_ARCHIVE_DAYS, vsn(1, 0, 0), NULL, 0, NULL,
"Minimum number of days to keep archive files.\n")
-cfg(shell_history_size_CFG, "history_size", shell_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_MAX_HISTORY, vsn(1, 0, 0), NULL,
+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,
+cfg(global_umask_CFG, "umask", global_CFG_SECTION, 0, 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")
-cfg(global_test_CFG, "test", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(1, 0, 0), NULL,
+cfg(global_test_CFG, "test", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(1, 0, 0), NULL, 0, NULL,
"No on-disk metadata changes will be made in test mode.\n"
"Equivalent to having the -t option on every command.\n")
-cfg(global_units_CFG, "units", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_UNITS, vsn(1, 0, 0), NULL,
+cfg(global_units_CFG, "units", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_UNITS, vsn(1, 0, 0), NULL, 0, NULL,
"Default value for --units argument.\n")
-cfg(global_si_unit_consistency_CFG, "si_unit_consistency", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_SI_UNIT_CONSISTENCY, vsn(2, 2, 54), NULL,
+cfg(global_si_unit_consistency_CFG, "si_unit_consistency", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_SI_UNIT_CONSISTENCY, vsn(2, 2, 54), NULL, 0, NULL,
"Distinguish between powers of 1024 and 1000 bytes.\n"
"The LVM commands distinguish between powers of 1024 bytes,\n"
"e.g. KiB, MiB, GiB, and powers of 1000 bytes, e.g. KB, MB, GB.\n"
"If scripts depend on the old behaviour, disable\n"
"this setting temporarily until they are updated.\n")
-cfg(global_suffix_CFG, "suffix", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_SUFFIX, vsn(1, 0, 0), NULL,
+cfg(global_suffix_CFG, "suffix", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_SUFFIX, vsn(1, 0, 0), NULL, 0, NULL,
"Display unit suffix for sizes.\n"
"This setting has no effect if the units are in human-readable\n"
"form (global/units=\"h\") in which case the suffix is always\n"
"displayed.\n")
-cfg(global_activation_CFG, "activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION, vsn(1, 0, 0), NULL,
+cfg(global_activation_CFG, "activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION, vsn(1, 0, 0), NULL, 0, NULL,
"Enable/disable communication with the kernel device-mapper.\n"
"Disable to use the tools to manipulate LVM metadata without\n"
"activating any logical volumes. If the device-mapper driver\n"
"is not present in the kernel, disabling this should suppress\n"
"the error messages.\n")
-cfg(global_fallback_to_lvm1_CFG, "fallback_to_lvm1", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FALLBACK_TO_LVM1, vsn(1, 0, 18), NULL,
+cfg(global_fallback_to_lvm1_CFG, "fallback_to_lvm1", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FALLBACK_TO_LVM1, vsn(1, 0, 18), NULL, 0, NULL,
"Try running LVM1 tools if LVM cannot communicate with DM.\n"
"This option only applies to 2.4 kernels and is provided to\n"
"help switch between device-mapper kernels and LVM1 kernels.\n"
@@ -611,25 +617,25 @@ cfg(global_fallback_to_lvm1_CFG, "fallback_to_lvm1", global_CFG_SECTION, 0, CFG_
"e.g. vgscan.lvm1. They will stop working once the lvm2\n"
"on-disk metadata format is used.\n")
-cfg(global_format_CFG, "format", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_FORMAT, vsn(1, 0, 0), NULL,
+cfg(global_format_CFG, "format", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_FORMAT, vsn(1, 0, 0), NULL, 0, NULL,
"The default metadata format that commands should use.\n"
"\"lvm1\" or \"lvm2\".\n"
"The command line override is -M1 or -M2.\n")
-cfg_array(global_format_libraries_CFG, "format_libraries", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL,
+cfg_array(global_format_libraries_CFG, "format_libraries", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL,
"Shared libraries that process different metadata formats.\n"
"If support for LVM1 metadata was compiled as a shared library use\n"
"format_libraries = \"liblvm2format1.so\"\n")
-cfg_array(global_segment_libraries_CFG, "segment_libraries", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 18), NULL, NULL)
+cfg_array(global_segment_libraries_CFG, "segment_libraries", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 18), NULL, 0, NULL, NULL)
-cfg(global_proc_CFG, "proc", global_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING, DEFAULT_PROC_DIR, vsn(1, 0, 0), NULL,
+cfg(global_proc_CFG, "proc", global_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING, DEFAULT_PROC_DIR, vsn(1, 0, 0), NULL, 0, NULL,
"Location of proc filesystem.\n")
-cfg(global_etc_CFG, "etc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ETC_DIR, vsn(2, 2, 117), "@CONFDIR@",
+cfg(global_etc_CFG, "etc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ETC_DIR, vsn(2, 2, 117), "@CONFDIR@", 0, NULL,
"Location of /etc system configuration directory.\n")
-cfg(global_locking_type_CFG, "locking_type", global_CFG_SECTION, 0, CFG_TYPE_INT, 1, vsn(1, 0, 0), NULL,
+cfg(global_locking_type_CFG, "locking_type", global_CFG_SECTION, 0, CFG_TYPE_INT, 1, vsn(1, 0, 0), NULL, 0, NULL,
"Type of locking to use.\n"
"Type 0: turns off locking. Warning: this risks metadata\n"
"corruption if commands run concurrently.\n"
@@ -650,17 +656,17 @@ cfg(global_locking_type_CFG, "locking_type", global_CFG_SECTION, 0, CFG_TYPE_INT
"in use, for example a virtual machine image or a disk that is\n"
"shared by a clustered machine.\n")
-cfg(global_wait_for_locks_CFG, "wait_for_locks", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_WAIT_FOR_LOCKS, vsn(2, 2, 50), NULL,
+cfg(global_wait_for_locks_CFG, "wait_for_locks", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_WAIT_FOR_LOCKS, vsn(2, 2, 50), NULL, 0, NULL,
"When disabled, fail if a lock request would block.\n")
-cfg(global_fallback_to_clustered_locking_CFG, "fallback_to_clustered_locking", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FALLBACK_TO_CLUSTERED_LOCKING, vsn(2, 2, 42), NULL,
+cfg(global_fallback_to_clustered_locking_CFG, "fallback_to_clustered_locking", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FALLBACK_TO_CLUSTERED_LOCKING, vsn(2, 2, 42), NULL, 0, NULL,
"Attempt to use built-in cluster locking if locking_type 2 fails.\n"
"If using external locking (type 2) and initialisation fails,\n"
"with this enabled, an attempt will be made to use the built-in\n"
"clustered locking.\n"
"If you are using a customised locking_library you should disable this.\n")
-cfg(global_fallback_to_local_locking_CFG, "fallback_to_local_locking", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FALLBACK_TO_LOCAL_LOCKING, vsn(2, 2, 42), NULL,
+cfg(global_fallback_to_local_locking_CFG, "fallback_to_local_locking", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_FALLBACK_TO_LOCAL_LOCKING, vsn(2, 2, 42), NULL, 0, NULL,
"Use locking_type 1 (local) if locking_type 2 or 3 fail.\n"
"If an attempt to initialise type 2 or type 3 locking failed,\n"
"perhaps because cluster components such as clvmd are not\n"
@@ -669,13 +675,13 @@ cfg(global_fallback_to_local_locking_CFG, "fallback_to_local_locking", global_CF
"commands against local volume groups will proceed.\n"
"Volume Groups marked as clustered will be ignored.\n")
-cfg(global_locking_dir_CFG, "locking_dir", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_LOCK_DIR, vsn(1, 0, 0), "@DEFAULT_LOCK_DIR@",
+cfg(global_locking_dir_CFG, "locking_dir", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_LOCK_DIR, vsn(1, 0, 0), "@DEFAULT_LOCK_DIR@", 0, NULL,
"Directory to use for LVM command file locks.\n"
"Local non-LV directory that holds file-based locks\n"
"while commands are in progress. A directory like\n"
"/tmp that may get wiped on reboot is OK.\n")
-cfg(global_prioritise_write_locks_CFG, "prioritise_write_locks", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_PRIORITISE_WRITE_LOCKS, vsn(2, 2, 52), NULL,
+cfg(global_prioritise_write_locks_CFG, "prioritise_write_locks", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_PRIORITISE_WRITE_LOCKS, vsn(2, 2, 52), NULL, 0, NULL,
"Allow quicker VG write access during high volume read access.\n"
"When there are competing read-only and read-write access\n"
"requests for a volume group's metadata, instead of always\n"
@@ -686,26 +692,26 @@ cfg(global_prioritise_write_locks_CFG, "prioritise_write_locks", global_CFG_SECT
"This option only affects locking_type 1 viz.\n"
"local file-based locking.\n")
-cfg(global_library_dir_CFG, "library_dir", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL,
+cfg(global_library_dir_CFG, "library_dir", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL,
"Search this directory first for shared libraries.\n")
-cfg(global_locking_library_CFG, "locking_library", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_LOCKING_LIB, vsn(1, 0, 0), NULL,
+cfg(global_locking_library_CFG, "locking_library", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_LOCKING_LIB, vsn(1, 0, 0), NULL, 0, NULL,
"The external locking library to use for locking_type 2.\n")
-cfg(global_abort_on_internal_errors_CFG, "abort_on_internal_errors", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ABORT_ON_INTERNAL_ERRORS, vsn(2, 2, 57), NULL,
+cfg(global_abort_on_internal_errors_CFG, "abort_on_internal_errors", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ABORT_ON_INTERNAL_ERRORS, vsn(2, 2, 57), NULL, 0, NULL,
"Abort a command that encounters an internal error.\n"
"Treat any internal errors as fatal errors, aborting\n"
"the process that encountered the internal error.\n"
"Please only enable for debugging.\n")
-cfg(global_detect_internal_vg_cache_corruption_CFG, "detect_internal_vg_cache_corruption", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DETECT_INTERNAL_VG_CACHE_CORRUPTION, vsn(2, 2, 96), NULL,
+cfg(global_detect_internal_vg_cache_corruption_CFG, "detect_internal_vg_cache_corruption", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DETECT_INTERNAL_VG_CACHE_CORRUPTION, vsn(2, 2, 96), NULL, 0, NULL,
"Internal verification of VG structures.\n"
"Check if CRC matches when a parsed VG is\n"
"used multiple times. This is useful to catch\n"
"unexpected changes to cached VG structures.\n"
"Please only enable for debugging.\n")
-cfg(global_metadata_read_only_CFG, "metadata_read_only", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_METADATA_READ_ONLY, vsn(2, 2, 75), NULL,
+cfg(global_metadata_read_only_CFG, "metadata_read_only", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_METADATA_READ_ONLY, vsn(2, 2, 75), NULL, 0, NULL,
"No operations that change on-disk metadata are permitted.\n"
"Additionally, read-only commands that encounter metadata\n"
"in need of repair will still be allowed to proceed exactly\n"
@@ -713,7 +719,7 @@ cfg(global_metadata_read_only_CFG, "metadata_read_only", global_CFG_SECTION, 0,
"vg_seqno). Inappropriate use could mess up your system,\n"
"so seek advice first!\n")
-cfg(global_mirror_segtype_default_CFG, "mirror_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_MIRROR_SEGTYPE, vsn(2, 2, 87), "@DEFAULT_MIRROR_SEGTYPE@",
+cfg(global_mirror_segtype_default_CFG, "mirror_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_MIRROR_SEGTYPE, vsn(2, 2, 87), "@DEFAULT_MIRROR_SEGTYPE@", 0, NULL,
"The segment type used by the short mirroring option -m.\n"
"Possible options are: mirror, raid1.\n"
"mirror - the original RAID1 implementation from LVM/DM.\n"
@@ -735,7 +741,7 @@ cfg(global_mirror_segtype_default_CFG, "mirror_segtype_default", global_CFG_SECT
"fashion in a cluster.\n"
"The '--type mirror|raid1' option overrides this setting.\n")
-cfg(global_raid10_segtype_default_CFG, "raid10_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_RAID10_SEGTYPE, vsn(2, 2, 99), "@DEFAULT_RAID10_SEGTYPE@",
+cfg(global_raid10_segtype_default_CFG, "raid10_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_RAID10_SEGTYPE, vsn(2, 2, 99), "@DEFAULT_RAID10_SEGTYPE@", 0, NULL,
"The segment type used by the -i -m combination.\n"
"The --stripes/-i and --mirrors/-m options can both\n"
"be specified during the creation of a logical volume\n"
@@ -750,7 +756,7 @@ cfg(global_raid10_segtype_default_CFG, "raid10_segtype_default", global_CFG_SECT
"and performance. The 'raid10' option is perferred.\n"
"The '--type raid10|mirror' option overrides this setting.\n")
-cfg(global_sparse_segtype_default_CFG, "sparse_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_SPARSE_SEGTYPE, vsn(2, 2, 112), "@DEFAULT_SPARSE_SEGTYPE@",
+cfg(global_sparse_segtype_default_CFG, "sparse_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_SPARSE_SEGTYPE, vsn(2, 2, 112), "@DEFAULT_SPARSE_SEGTYPE@", 0, NULL,
"The segment type used by the -V -L combination.\n"
"The combination of -V and -L options creates a\n"
"sparse LV. There are two different implementations.\n"
@@ -765,14 +771,14 @@ cfg(global_sparse_segtype_default_CFG, "sparse_segtype_default", global_CFG_SECT
"when more data is used. It also supports full snapshots.\n"
"The '--type snapshot|thin' option overrides this setting.\n")
-cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_path", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_LVDISPLAY_SHOWS_FULL_DEVICE_PATH, vsn(2, 2, 89), NULL,
+cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_path", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_LVDISPLAY_SHOWS_FULL_DEVICE_PATH, vsn(2, 2, 89), NULL, 0, NULL,
"The default format for displaying LV names in lvdisplay was changed\n"
"in version 2.02.89 to show the LV name and path separately.\n"
"Previously this was always shown as /dev/vgname/lvname even when that\n"
"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, 0, vsn(2, 2, 93), NULL,
+cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 93), NULL, 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"
@@ -806,7 +812,7 @@ cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL,
"LVM prints warnings and ignores lvmetad if this combination\n"
"is seen.\n")
-cfg(global_thin_check_executable_CFG, "thin_check_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, THIN_CHECK_CMD, vsn(2, 2, 94), "@THIN_CHECK_CMD@",
+cfg(global_thin_check_executable_CFG, "thin_check_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, THIN_CHECK_CMD, vsn(2, 2, 94), "@THIN_CHECK_CMD@", 0, NULL,
"The full path to the thin_check command.\n"
"LVM uses this command to check that a thin metadata\n"
"device is in a usable state.\n"
@@ -818,19 +824,19 @@ cfg(global_thin_check_executable_CFG, "thin_check_executable", global_CFG_SECTIO
"The thin tools are available from the package\n"
"device-mapper-persistent-data.\n")
-cfg(global_thin_dump_executable_CFG, "thin_dump_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, THIN_DUMP_CMD, vsn(2, 2, 100), "@THIN_DUMP_CMD@",
+cfg(global_thin_dump_executable_CFG, "thin_dump_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, THIN_DUMP_CMD, vsn(2, 2, 100), "@THIN_DUMP_CMD@", 0, NULL,
"The full path to the thin_dump command.\n"
"LVM uses this command to dump thin pool metadata.\n"
"(For thin tools, see thin_check_executable.)\n")
-cfg(global_thin_repair_executable_CFG, "thin_repair_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, THIN_REPAIR_CMD, vsn(2, 2, 100), "@THIN_REPAIR_CMD@",
+cfg(global_thin_repair_executable_CFG, "thin_repair_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, THIN_REPAIR_CMD, vsn(2, 2, 100), "@THIN_REPAIR_CMD@", 0, NULL,
"The full path to the thin_repair command.\n"
"LVM uses this command to repair a thin metadata device\n"
"if it is in an unusable state.\n"
"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, 0, CFG_TYPE_STRING, "#S" DEFAULT_THIN_CHECK_OPTION1 "#S" DEFAULT_THIN_CHECK_OPTION2, vsn(2, 2, 96), NULL,
+cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_THIN_CHECK_OPTION1 "#S" DEFAULT_THIN_CHECK_OPTION2, 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"
@@ -838,10 +844,10 @@ 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, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, "#S" DEFAULT_THIN_REPAIR_OPTIONS, vsn(2, 2, 100), NULL,
+cfg_array(global_thin_repair_options_CFG, "thin_repair_options", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, "#S" DEFAULT_THIN_REPAIR_OPTIONS, 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_DEFAULT_UNDEFINED | CFG_ALLOW_EMPTY, CFG_TYPE_STRING, NULL, vsn(2, 2, 99), NULL,
+cfg_array(global_thin_disabled_features_CFG, "thin_disabled_features", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_ALLOW_EMPTY, CFG_TYPE_STRING, NULL, vsn(2, 2, 99), NULL, 0, NULL,
"Features to not use in the thin driver.\n"
"This can be helpful for testing, or to avoid\n"
"using a feature that is causing problems.\n"
@@ -851,7 +857,7 @@ cfg_array(global_thin_disabled_features_CFG, "thin_disabled_features", global_CF
"Example:\n"
"thin_disabled_features = [ \"discards\", \"block_size\" ]\n")
-cfg(global_cache_check_executable_CFG, "cache_check_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_CHECK_CMD, vsn(2, 2, 108), "@CACHE_CHECK_CMD@",
+cfg(global_cache_check_executable_CFG, "cache_check_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_CHECK_CMD, vsn(2, 2, 108), "@CACHE_CHECK_CMD@", 0, NULL,
"The full path to the cache_check command.\n"
"LVM uses this command to check that a cache metadata\n"
"device is in a usable state.\n"
@@ -863,25 +869,25 @@ cfg(global_cache_check_executable_CFG, "cache_check_executable", global_CFG_SECT
"The cache tools are available from the package\n"
"device-mapper-persistent-data.\n")
-cfg(global_cache_dump_executable_CFG, "cache_dump_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_DUMP_CMD, vsn(2, 2, 108), "@CACHE_DUMP_CMD@",
+cfg(global_cache_dump_executable_CFG, "cache_dump_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_DUMP_CMD, vsn(2, 2, 108), "@CACHE_DUMP_CMD@", 0, NULL,
"The full path to the cache_dump command.\n"
"LVM uses this command to dump cache pool metadata.\n"
"(For cache tools, see cache_check_executable.)\n")
-cfg(global_cache_repair_executable_CFG, "cache_repair_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_REPAIR_CMD, vsn(2, 2, 108), "@CACHE_REPAIR_CMD@",
+cfg(global_cache_repair_executable_CFG, "cache_repair_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_REPAIR_CMD, vsn(2, 2, 108), "@CACHE_REPAIR_CMD@", 0, NULL,
"The full path to the cache_repair command.\n"
"LVM uses this command to repair a cache metadata device\n"
"if it is in an unusable state.\n"
"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, 0, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_CHECK_OPTION1, vsn(2, 2, 108), NULL,
+cfg_array(global_cache_check_options_CFG, "cache_check_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_CHECK_OPTION1, 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, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_REPAIR_OPTIONS, vsn(2, 2, 108), NULL,
+cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_REPAIR_OPTIONS, 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,
+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,
"The method LVM uses to set the local system ID.\n"
"Volume Groups can also be given a system ID (by\n"
"vgcreate, vgchange, or vgimport.)\n"
@@ -901,18 +907,18 @@ cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, 0, CFG_
"file - Use the contents of another file (system_id_file) to set\n"
"the system ID.\n")
-cfg(global_system_id_file_CFG, "system_id_file", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117), NULL,
+cfg(global_system_id_file_CFG, "system_id_file", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117), NULL, 0, NULL,
"The full path to the file containing a system ID.\n"
"This is used when system_id_source is set to 'file'.\n"
"Comments starting with the character # are ignored.\n")
-cfg(activation_checks_CFG, "checks", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION_CHECKS, vsn(2, 2, 86), NULL,
+cfg(activation_checks_CFG, "checks", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION_CHECKS, vsn(2, 2, 86), NULL, 0, NULL,
"Perform internal checks of libdevmapper operations.\n"
"Useful for debugging problems with activation.\n"
"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(activation_udev_sync_CFG, "udev_sync", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_UDEV_SYNC, vsn(2, 2, 51), NULL,
+cfg(activation_udev_sync_CFG, "udev_sync", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_UDEV_SYNC, vsn(2, 2, 51), NULL, 0, NULL,
"Use udev notifications to synchronize udev and LVM.\n"
"When disabled, LVM commands will not wait for notifications\n"
"from udev, but continue irrespective of any possible udev\n"
@@ -923,28 +929,28 @@ cfg(activation_udev_sync_CFG, "udev_sync", activation_CFG_SECTION, 0, CFG_TYPE_B
"wake them up.\n"
"The '--nodevsync' option overrides this setting.\n")
-cfg(activation_udev_rules_CFG, "udev_rules", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_UDEV_RULES, vsn(2, 2, 57), NULL,
+cfg(activation_udev_rules_CFG, "udev_rules", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_UDEV_RULES, vsn(2, 2, 57), NULL, 0, NULL,
"Use udev rules to manage LV device nodes and symlinks.\n"
"When disabled, LVM will manage the device nodes and\n"
"symlinks for active LVs itself.\n"
"Manual intervention may be required if this setting is\n"
"changed while LVs are active.\n")
-cfg(activation_verify_udev_operations_CFG, "verify_udev_operations", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_VERIFY_UDEV_OPERATIONS, vsn(2, 2, 86), NULL,
+cfg(activation_verify_udev_operations_CFG, "verify_udev_operations", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_VERIFY_UDEV_OPERATIONS, vsn(2, 2, 86), NULL, 0, NULL,
"Use extra checks in LVM to verify udev operations.\n"
"This enables additional checks (and if necessary,\n"
"repairs) on entries in the device directory after\n"
"udev has completed processing its events.\n"
"Useful for diagnosing problems with LVM/udev interactions.\n")
-cfg(activation_retry_deactivation_CFG, "retry_deactivation", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_RETRY_DEACTIVATION, vsn(2, 2, 89), NULL,
+cfg(activation_retry_deactivation_CFG, "retry_deactivation", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_RETRY_DEACTIVATION, vsn(2, 2, 89), NULL, 0, NULL,
"Retry failed LV deactivation.\n"
"If LV deactivation fails, LVM will retry for a few\n"
"seconds before failing. This may happen because a\n"
"process run from a quick udev rule temporarily opened\n"
"the device.\n")
-cfg(activation_missing_stripe_filler_CFG, "missing_stripe_filler", activation_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING, DEFAULT_STRIPE_FILLER, vsn(1, 0, 0), NULL,
+cfg(activation_missing_stripe_filler_CFG, "missing_stripe_filler", activation_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_STRING, DEFAULT_STRIPE_FILLER, vsn(1, 0, 0), NULL, 0, NULL,
"Method to fill missing stripes when activating an incomplete LV.\n"
"Using 'error' will make inaccessible parts of the device return\n"
"I/O errors on access. You can instead use a device path, in which\n"
@@ -952,26 +958,26 @@ cfg(activation_missing_stripe_filler_CFG, "missing_stripe_filler", activation_CF
"Using anything other than 'error' with mirrored or snapshotted\n"
"volumes is likely to result in data corruption.\n")
-cfg(activation_use_linear_target_CFG, "use_linear_target", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LINEAR_TARGET, vsn(2, 2, 89), NULL,
+cfg(activation_use_linear_target_CFG, "use_linear_target", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_LINEAR_TARGET, vsn(2, 2, 89), NULL, 0, NULL,
"Use the linear target to optimize single stripe LVs.\n"
"When disabled, the striped target is used. The linear\n"
"target is an optimised version of the striped target\n"
"that only handles a single stripe.\n")
-cfg(activation_reserved_stack_CFG, "reserved_stack", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_STACK, vsn(1, 0, 0), NULL,
+cfg(activation_reserved_stack_CFG, "reserved_stack", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_STACK, vsn(1, 0, 0), NULL, 0, NULL,
"Stack size in KB to reserve for use while devices are suspended.\n"
"Insufficent reserve risks I/O deadlock during device suspension.\n")
-cfg(activation_reserved_memory_CFG, "reserved_memory", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_MEMORY, vsn(1, 0, 0), NULL,
+cfg(activation_reserved_memory_CFG, "reserved_memory", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_MEMORY, vsn(1, 0, 0), NULL, 0, NULL,
"Memory size in KB to reserve for use while devices are suspended.\n"
"Insufficent reserve risks I/O deadlock during device suspension.\n")
-cfg(activation_process_priority_CFG, "process_priority", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_PROCESS_PRIORITY, vsn(1, 0, 0), NULL,
+cfg(activation_process_priority_CFG, "process_priority", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_PROCESS_PRIORITY, vsn(1, 0, 0), NULL, 0, NULL,
"Nice value used while devices are suspended.\n"
"Use a high priority so that LVs are suspended\n"
"for the shortest possible time.\n")
-cfg_array(activation_volume_list_CFG, "volume_list", activation_CFG_SECTION, CFG_ALLOW_EMPTY|CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 18), NULL,
+cfg_array(activation_volume_list_CFG, "volume_list", activation_CFG_SECTION, CFG_ALLOW_EMPTY|CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 18), NULL, 0, NULL,
"Only LVs selected by this list are activated.\n"
"If this list is defined, an LV is only activated\n"
"if it matches an entry in this list.\n"
@@ -988,7 +994,7 @@ cfg_array(activation_volume_list_CFG, "volume_list", activation_CFG_SECTION, CFG
"Example:\n"
"volume_list = [ \"vg1\", \"vg2/lvol1\", \"@tag1\", \"@*\" ]\n")
-cfg_array(activation_auto_activation_volume_list_CFG, "auto_activation_volume_list", activation_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 97), NULL,
+cfg_array(activation_auto_activation_volume_list_CFG, "auto_activation_volume_list", activation_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 97), NULL, 0, NULL,
"Only LVs selected by this list are auto-activated.\n"
"This list works like volume_list, but it is used\n"
"only by auto-activation commands. It does not apply\n"
@@ -1018,7 +1024,7 @@ cfg_array(activation_auto_activation_volume_list_CFG, "auto_activation_volume_li
"Possible options are: vgname, vgname/lvname, @tag, @*\n"
"See volume_list for how these options are matched to LVs.\n")
-cfg_array(activation_read_only_volume_list_CFG, "read_only_volume_list", activation_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 89), NULL,
+cfg_array(activation_read_only_volume_list_CFG, "read_only_volume_list", activation_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 89), NULL, 0, NULL,
"LVs in this list are activated in read-only mode.\n"
"If this list is defined, each LV that is to be activated\n"
"is checked against this list, and if it matches, it is\n"
@@ -1028,16 +1034,16 @@ cfg_array(activation_read_only_volume_list_CFG, "read_only_volume_list", activat
"Possible options are: vgname, vgname/lvname, @tag, @*\n"
"See volume_list for how these options are matched to LVs.\n")
-cfg(activation_mirror_region_size_CFG, "mirror_region_size", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RAID_REGION_SIZE, vsn(1, 0, 0), NULL,
+cfg(activation_mirror_region_size_CFG, "mirror_region_size", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RAID_REGION_SIZE, vsn(1, 0, 0), NULL, 0, NULL,
"This has been replaced by the activation/raid_region_size setting.\n")
-cfg(activation_raid_region_size_CFG, "raid_region_size", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RAID_REGION_SIZE, vsn(2, 2, 99), NULL,
+cfg(activation_raid_region_size_CFG, "raid_region_size", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RAID_REGION_SIZE, vsn(2, 2, 99), NULL, 0, NULL,
"Size in KiB of each raid or mirror synchronization region.\n"
"For raid or mirror segment types, this is the amount of\n"
"data that is copied at once when initializing, or moved\n"
"at once by pvmove.\n")
-cfg(activation_error_when_full_CFG, "error_when_full", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ERROR_WHEN_FULL, vsn(2, 2, 115), NULL,
+cfg(activation_error_when_full_CFG, "error_when_full", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ERROR_WHEN_FULL, vsn(2, 2, 115), NULL, 0, NULL,
"Return errors if a thin pool runs out of space.\n"
"When enabled, writes to thin LVs immediately return\n"
"an error if the thin pool is out of data space.\n"
@@ -1047,13 +1053,13 @@ cfg(activation_error_when_full_CFG, "error_when_full", activation_CFG_SECTION, 0
"New thin pools are assigned the behavior defined here.\n"
"The '--errorwhenfull y|n' option overrides this setting.\n")
-cfg(activation_readahead_CFG, "readahead", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_READ_AHEAD, vsn(1, 0, 23), NULL,
+cfg(activation_readahead_CFG, "readahead", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_READ_AHEAD, vsn(1, 0, 23), NULL, 0, NULL,
"Setting to use when there is no readahead setting in metadata.\n"
"Possible options are: none, auto.\n"
"none - Disable readahead.\n"
"auto - Use default value chosen by kernel.\n")
-cfg(activation_raid_fault_policy_CFG, "raid_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_RAID_FAULT_POLICY, vsn(2, 2, 89), NULL,
+cfg(activation_raid_fault_policy_CFG, "raid_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_RAID_FAULT_POLICY, vsn(2, 2, 89), NULL, 0, NULL,
"Defines how a device failure in a RAID LV is handled.\n"
"This includes LVs that have the following segment types:\n"
"raid1, raid4, raid5*, and raid6*.\n"
@@ -1071,7 +1077,7 @@ cfg(activation_raid_fault_policy_CFG, "raid_fault_policy", activation_CFG_SECTIO
"allocate - Attempt to use any extra physical volumes in the\n"
"volume group as spares and replace faulty devices.\n")
-cfg_runtime(activation_mirror_image_fault_policy_CFG, "mirror_image_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(2, 2, 57),
+cfg_runtime(activation_mirror_image_fault_policy_CFG, "mirror_image_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(2, 2, 57), 0, NULL,
"Defines how a device failure in a 'mirror' LV is handled.\n"
"An LV with the 'mirror' segment type is composed of mirror\n"
"images (copies) and a mirror log.\n"
@@ -1106,15 +1112,15 @@ cfg_runtime(activation_mirror_image_fault_policy_CFG, "mirror_image_fault_policy
"of the mirror. This policy acts like 'remove' if no suitable\n"
"device and space can be allocated for the replacement.\n")
-cfg(activation_mirror_log_fault_policy_CFG, "mirror_log_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_MIRROR_LOG_FAULT_POLICY, vsn(1, 2, 18), NULL,
+cfg(activation_mirror_log_fault_policy_CFG, "mirror_log_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_MIRROR_LOG_FAULT_POLICY, vsn(1, 2, 18), NULL, 0, NULL,
"Defines how a device failure in a 'mirror' log LV is handled.\n"
"The mirror_image_fault_policy description for mirrored LVs\n"
"also applies to mirrored log LVs.\n")
-cfg(activation_mirror_device_fault_policy_CFG, "mirror_device_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_MIRROR_DEVICE_FAULT_POLICY, vsn(1, 2, 10), NULL,
+cfg(activation_mirror_device_fault_policy_CFG, "mirror_device_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_MIRROR_DEVICE_FAULT_POLICY, vsn(1, 2, 10), NULL, 0, NULL,
"This has been replaced by the mirror_image_fault_policy setting.\n")
-cfg(activation_snapshot_autoextend_threshold_CFG, "snapshot_autoextend_threshold", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_SNAPSHOT_AUTOEXTEND_THRESHOLD, vsn(2, 2, 75), NULL,
+cfg(activation_snapshot_autoextend_threshold_CFG, "snapshot_autoextend_threshold", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_SNAPSHOT_AUTOEXTEND_THRESHOLD, vsn(2, 2, 75), NULL, 0, NULL,
"Auto-extend a snapshot when its usage exceeds this percent.\n"
"Setting this to 100 disables automatic extension.\n"
"The minimum value is 50 (a smaller value is treated as 50.)\n"
@@ -1128,13 +1134,13 @@ cfg(activation_snapshot_autoextend_threshold_CFG, "snapshot_autoextend_threshold
"When the usage exceeds 840M, the snapshot will be extended\n"
"to 1.44G, and so on.\n")
-cfg(activation_snapshot_autoextend_percent_CFG, "snapshot_autoextend_percent", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_SNAPSHOT_AUTOEXTEND_PERCENT, vsn(2, 2, 75), NULL,
+cfg(activation_snapshot_autoextend_percent_CFG, "snapshot_autoextend_percent", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_SNAPSHOT_AUTOEXTEND_PERCENT, vsn(2, 2, 75), NULL, 0, NULL,
"Auto-extending a snapshot adds this percent extra space.\n"
"The amount of additional space added to a snapshot is this\n"
"percent of its current size.\n"
"Also see snapshot_autoextend_threshold.\n")
-cfg(activation_thin_pool_autoextend_threshold_CFG, "thin_pool_autoextend_threshold", activation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_INT, DEFAULT_THIN_POOL_AUTOEXTEND_THRESHOLD, vsn(2, 2, 89), NULL,
+cfg(activation_thin_pool_autoextend_threshold_CFG, "thin_pool_autoextend_threshold", activation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_INT, DEFAULT_THIN_POOL_AUTOEXTEND_THRESHOLD, vsn(2, 2, 89), NULL, 0, NULL,
"Auto-extend a thin pool when its usage exceeds this percent.\n"
"Setting this to 100 disables automatic extension.\n"
"The minimum value is 50 (a smaller value is treated as 50.)\n"
@@ -1148,12 +1154,12 @@ cfg(activation_thin_pool_autoextend_threshold_CFG, "thin_pool_autoextend_thresho
"When the usage exceeds 840M, the thin pool will be extended\n"
"to 1.44G, and so on.\n")
-cfg(activation_thin_pool_autoextend_percent_CFG, "thin_pool_autoextend_percent", activation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_INT, DEFAULT_THIN_POOL_AUTOEXTEND_PERCENT, vsn(2, 2, 89), NULL,
+cfg(activation_thin_pool_autoextend_percent_CFG, "thin_pool_autoextend_percent", activation_CFG_SECTION, CFG_PROFILABLE | CFG_PROFILABLE_METADATA, CFG_TYPE_INT, DEFAULT_THIN_POOL_AUTOEXTEND_PERCENT, vsn(2, 2, 89), NULL, 0, NULL,
"Auto-extending a thin pool adds this percent extra space.\n"
"The amount of additional space added to a thin pool is this\n"
"percent of its current size.\n")
-cfg_array(activation_mlock_filter_CFG, "mlock_filter", activation_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_ADVANCED, CFG_TYPE_STRING, NULL, vsn(2, 2, 62), NULL,
+cfg_array(activation_mlock_filter_CFG, "mlock_filter", activation_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_ADVANCED, CFG_TYPE_STRING, NULL, vsn(2, 2, 62), NULL, 0, NULL,
"Do not mlock these memory areas.\n"
"While activating devices, I/O to devices being\n"
"(re)configured is suspended. As a precaution against\n"
@@ -1169,18 +1175,18 @@ cfg_array(activation_mlock_filter_CFG, "mlock_filter", activation_CFG_SECTION, C
"Example:\n"
"mlock_filter = [ \"locale/locale-archive\", \"gconv/gconv-modules.cache\" ]\n")
-cfg(activation_use_mlockall_CFG, "use_mlockall", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_MLOCKALL, vsn(2, 2, 62), NULL,
+cfg(activation_use_mlockall_CFG, "use_mlockall", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_MLOCKALL, vsn(2, 2, 62), NULL, 0, NULL,
"Use the old behavior of mlockall to pin all memory.\n"
"Prior to version 2.02.62, LVM used mlockall() to pin\n"
"the whole process's memory while activating devices.\n")
-cfg(activation_monitoring_CFG, "monitoring", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DMEVENTD_MONITOR, vsn(2, 2, 63), NULL,
+cfg(activation_monitoring_CFG, "monitoring", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DMEVENTD_MONITOR, vsn(2, 2, 63), NULL, 0, NULL,
"Monitor LVs that are activated.\n"
"When enabled, LVM will ask dmeventd to monitor LVs\n"
"that are activated.\n"
"The '--ignoremonitoring' option overrides this setting.\n")
-cfg(activation_polling_interval_CFG, "polling_interval", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_INTERVAL, vsn(2, 2, 63), NULL,
+cfg(activation_polling_interval_CFG, "polling_interval", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_INTERVAL, vsn(2, 2, 63), NULL, 0, NULL,
"Check pvmove or lvconvert progress at this interval (seconds)\n"
"When pvmove or lvconvert must wait for the kernel to finish\n"
"synchronising or merging data, they check and report progress\n"
@@ -1189,7 +1195,7 @@ cfg(activation_polling_interval_CFG, "polling_interval", activation_CFG_SECTION,
"there are no progress reports, but the process is awoken\n"
"immediately once the operation is complete.\n")
-cfg(activation_auto_set_activation_skip_CFG, "auto_set_activation_skip", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_AUTO_SET_ACTIVATION_SKIP, vsn(2,2,99), NULL,
+cfg(activation_auto_set_activation_skip_CFG, "auto_set_activation_skip", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_AUTO_SET_ACTIVATION_SKIP, vsn(2,2,99), NULL, 0, NULL,
"Set the activation skip flag on new thin snapshot LVs.\n"
"An LV can have a persistent 'activation skip' flag.\n"
"The flag causes the LV to be skipped during normal activation.\n"
@@ -1199,7 +1205,7 @@ cfg(activation_auto_set_activation_skip_CFG, "auto_set_activation_skip", activat
"set on new thin snapshot LVs.\n"
"The '--setactivationskip y|n' option overrides this setting.\n")
-cfg(activation_mode_CFG, "activation_mode", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ACTIVATION_MODE, vsn(2,2,108), NULL,
+cfg(activation_mode_CFG, "activation_mode", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ACTIVATION_MODE, vsn(2,2,108), NULL, 0, NULL,
"How LVs with missing devices are activated.\n"
"Possible options are: complete, degraded, partial.\n"
"complete - Only allow activation of an LV if all of\n"
@@ -1217,7 +1223,7 @@ cfg(activation_mode_CFG, "activation_mode", activation_CFG_SECTION, 0, CFG_TYPE_
"sometimes assist with data recovery.\n"
"The '--activationmode' option overrides this setting.\n")
-cfg(metadata_pvmetadatacopies_CFG, "pvmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATACOPIES, vsn(1, 0, 0), NULL,
+cfg(metadata_pvmetadatacopies_CFG, "pvmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATACOPIES, vsn(1, 0, 0), NULL, 0, NULL,
"Number of copies of metadata to store on each PV.\n"
"Possible options are: 0, 1, 2.\n"
"If set to 2, two copies of the VG metadata are stored on\n"
@@ -1227,7 +1233,7 @@ cfg(metadata_pvmetadatacopies_CFG, "pvmetadatacopies", metadata_CFG_SECTION, CFG
"be useful with VGs containing large numbers of PVs.\n"
"The '--pvmetadatacopies' option overrides this setting.\n")
-cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_VGMETADATACOPIES, vsn(2, 2, 69), NULL,
+cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_VGMETADATACOPIES, vsn(2, 2, 69), NULL, 0, NULL,
"Number of copies of metadata to maintain for each VG.\n"
"If set to a non-zero value, LVM automatically chooses which of\n"
"the available metadata areas to use to achieve the requested\n"
@@ -1239,7 +1245,7 @@ cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, 0,
"the individual PV level using 'pvchange --metadataignore y|n'.\n"
"The '--vgmetadatacopies' option overrides this setting.\n")
-cfg(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_PVMETADATASIZE, vsn(1, 0, 0), NULL,
+cfg(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_PVMETADATASIZE, vsn(1, 0, 0), NULL, 0, NULL,
"Approximate number of sectors to use for each metadata copy.\n"
"VGs with large numbers of PVs or LVs, or VGs containing\n"
"complex LV structures, may need additional space for VG\n"
@@ -1247,15 +1253,15 @@ cfg(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, 0, CFG_
"so unused space becomes filled with an archive of the most\n"
"recent previous versions of the metadata.\n")
-cfg(metadata_pvmetadataignore_CFG, "pvmetadataignore", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_BOOL, DEFAULT_PVMETADATAIGNORE, vsn(2, 2, 69), NULL,
+cfg(metadata_pvmetadataignore_CFG, "pvmetadataignore", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_BOOL, DEFAULT_PVMETADATAIGNORE, vsn(2, 2, 69), NULL, 0, NULL,
"Ignore metadata areas on a new PV.\n"
"If metadata areas on a PV are ignored, LVM will not store\n"
"metadata in them.\n"
"The '--metadataignore' option overrides this setting.\n")
-cfg(metadata_stripesize_CFG, "stripesize", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_STRIPESIZE, vsn(1, 0, 0), NULL, NULL)
+cfg(metadata_stripesize_CFG, "stripesize", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_STRIPESIZE, vsn(1, 0, 0), NULL, 0, NULL, NULL)
-cfg_array(metadata_dirs_CFG, "dirs", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL,
+cfg_array(metadata_dirs_CFG, "dirs", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL,
"Directories holding live copies of text format metadata.\n"
"These directories must not be on logical volumes!\n"
"It's possible to use LVM with a couple of directories here,\n"
@@ -1270,22 +1276,22 @@ cfg_array(metadata_dirs_CFG, "dirs", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DE
"Example:\n"
"dirs = [ \"/etc/lvm/metadata\", \"/mnt/disk2/lvm/metadata2\" ]\n")
-cfg_section(metadata_disk_areas_CFG_SUBSECTION, "disk_areas", metadata_CFG_SECTION, CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, vsn(1, 0, 0), NULL)
-cfg_section(disk_area_CFG_SUBSECTION, "disk_area", metadata_disk_areas_CFG_SUBSECTION, CFG_NAME_VARIABLE | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, vsn(1, 0, 0), NULL)
-cfg(disk_area_start_sector_CFG, "start_sector", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL, NULL)
-cfg(disk_area_size_CFG, "size", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL, NULL)
-cfg(disk_area_id_CFG, "id", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, NULL)
+cfg_section(metadata_disk_areas_CFG_SUBSECTION, "disk_areas", metadata_CFG_SECTION, CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, vsn(1, 0, 0), 0, NULL, NULL)
+cfg_section(disk_area_CFG_SUBSECTION, "disk_area", metadata_disk_areas_CFG_SUBSECTION, CFG_NAME_VARIABLE | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, vsn(1, 0, 0), 0, NULL, NULL)
+cfg(disk_area_start_sector_CFG, "start_sector", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL, 0, NULL, NULL)
+cfg(disk_area_size_CFG, "size", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL, 0, NULL, NULL)
+cfg(disk_area_id_CFG, "id", disk_area_CFG_SUBSECTION, CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL, NULL)
-cfg(report_compact_output_CFG, "compact_output", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_COMPACT_OUTPUT, vsn(2, 2, 115), NULL,
+cfg(report_compact_output_CFG, "compact_output", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_COMPACT_OUTPUT, vsn(2, 2, 115), NULL, 0, NULL,
"Do not print empty report fields.\n"
"Fields that don't have a value set for any of the rows\n"
"reported are skipped and not printed. Compact output is\n"
"applicable only if report/buffered is enabled.\n")
-cfg(report_aligned_CFG, "aligned", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_ALIGNED, vsn(1, 0, 0), NULL,
+cfg(report_aligned_CFG, "aligned", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_ALIGNED, vsn(1, 0, 0), NULL, 0, NULL,
"Align columns in report output.\n")
-cfg(report_buffered_CFG, "buffered", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_BUFFERED, vsn(1, 0, 0), NULL,
+cfg(report_buffered_CFG, "buffered", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_BUFFERED, vsn(1, 0, 0), NULL, 0, NULL,
"Buffer report output.\n"
"When buffered reporting is used, the report's content is appended\n"
"incrementally to include each object being reported until the report\n"
@@ -1293,134 +1299,134 @@ cfg(report_buffered_CFG, "buffered", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYP
"execution. Otherwise, if buffering is not used, each object is\n"
"reported as soon as its processing is finished.\n")
-cfg(report_headings_CFG, "headings", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_HEADINGS, vsn(1, 0, 0), NULL,
+cfg(report_headings_CFG, "headings", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_HEADINGS, vsn(1, 0, 0), NULL, 0, NULL,
"Show headings for columns on report.\n")
-cfg(report_separator_CFG, "separator", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_REP_SEPARATOR, vsn(1, 0, 0), NULL,
+cfg(report_separator_CFG, "separator", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_REP_SEPARATOR, vsn(1, 0, 0), NULL, 0, NULL,
"A separator to use on report after each field.\n")
-cfg(report_list_item_separator_CFG, "list_item_separator", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_REP_LIST_ITEM_SEPARATOR, vsn(2, 2, 108), NULL,
+cfg(report_list_item_separator_CFG, "list_item_separator", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_REP_LIST_ITEM_SEPARATOR, vsn(2, 2, 108), NULL, 0, NULL,
"A separator to use for list items when reported.\n")
-cfg(report_prefixes_CFG, "prefixes", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_PREFIXES, vsn(2, 2, 36), NULL,
+cfg(report_prefixes_CFG, "prefixes", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_PREFIXES, vsn(2, 2, 36), NULL, 0, NULL,
"Use a field name prefix for each field reported.\n")
-cfg(report_quoted_CFG, "quoted", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_QUOTED, vsn(2, 2, 39), NULL,
+cfg(report_quoted_CFG, "quoted", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_QUOTED, vsn(2, 2, 39), NULL, 0, NULL,
"Quote field values when using field name prefixes.\n")
-cfg(report_colums_as_rows_CFG, "colums_as_rows", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_COLUMNS_AS_ROWS, vsn(1, 0, 0), NULL,
+cfg(report_colums_as_rows_CFG, "colums_as_rows", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_COLUMNS_AS_ROWS, vsn(1, 0, 0), NULL, 0, NULL,
"Output each column as a row.\n"
"If set, this also implies report/prefixes=1.\n")
-cfg(report_binary_values_as_numeric_CFG, "binary_values_as_numeric", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, 0, vsn(2, 2, 108), NULL,
+cfg(report_binary_values_as_numeric_CFG, "binary_values_as_numeric", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, 0, vsn(2, 2, 108), NULL, 0, NULL,
"Use binary values 0 or 1 instead of descriptive literal values.\n"
"For columns that have exactly two valid values to report\n"
"(not counting the 'unknown' value which denotes that the\n"
"value could not be determined).\n")
-cfg(report_devtypes_sort_CFG, "devtypes_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_DEVTYPES_SORT, vsn(2, 2, 101), NULL,
+cfg(report_devtypes_sort_CFG, "devtypes_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_DEVTYPES_SORT, vsn(2, 2, 101), NULL, 0, NULL,
"List of columns to sort by when reporting 'lvm devtypes' command.\n"
"See 'lvm devtypes -o help' for the list of possible fields.\n")
-cfg(report_devtypes_cols_CFG, "devtypes_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_DEVTYPES_COLS, vsn(2, 2, 101), NULL,
+cfg(report_devtypes_cols_CFG, "devtypes_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_DEVTYPES_COLS, vsn(2, 2, 101), NULL, 0, NULL,
"List of columns to report for 'lvm devtypes' command.\n"
"See 'lvm devtypes -o help' for the list of possible fields.\n")
-cfg(report_devtypes_cols_verbose_CFG, "devtypes_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_DEVTYPES_COLS_VERB, vsn(2, 2, 101), NULL,
+cfg(report_devtypes_cols_verbose_CFG, "devtypes_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_DEVTYPES_COLS_VERB, vsn(2, 2, 101), NULL, 0, NULL,
"List of columns to report for 'lvm devtypes' command in verbose mode.\n"
"See 'lvm devtypes -o help' for the list of possible fields.\n")
-cfg(report_lvs_sort_CFG, "lvs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_LVS_SORT, vsn(1, 0, 0), NULL,
+cfg(report_lvs_sort_CFG, "lvs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_LVS_SORT, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to sort by when reporting 'lvs' command.\n"
"See 'lvs -o help' for the list of possible fields.\n")
-cfg(report_lvs_cols_CFG, "lvs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_LVS_COLS, vsn(1, 0, 0), NULL,
+cfg(report_lvs_cols_CFG, "lvs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_LVS_COLS, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to report for 'lvs' command.\n"
"See 'lvs -o help' for the list of possible fields.\n")
-cfg(report_lvs_cols_verbose_CFG, "lvs_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_LVS_COLS_VERB, vsn(1, 0, 0), NULL,
+cfg(report_lvs_cols_verbose_CFG, "lvs_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_LVS_COLS_VERB, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to report for 'lvs' command in verbose mode.\n"
"See 'lvs -o help' for the list of possible fields.\n")
-cfg(report_vgs_sort_CFG, "vgs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_VGS_SORT, vsn(1, 0, 0), NULL,
+cfg(report_vgs_sort_CFG, "vgs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_VGS_SORT, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to sort by when reporting 'vgs' command.\n"
"See 'vgs -o help' for the list of possible fields.\n")
-cfg(report_vgs_cols_CFG, "vgs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_VGS_COLS, vsn(1, 0, 0), NULL,
+cfg(report_vgs_cols_CFG, "vgs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_VGS_COLS, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to report for 'vgs' command.\n"
"See 'vgs -o help' for the list of possible fields.\n")
-cfg(report_vgs_cols_verbose_CFG, "vgs_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_VGS_COLS_VERB, vsn(1, 0, 0), NULL,
+cfg(report_vgs_cols_verbose_CFG, "vgs_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_VGS_COLS_VERB, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to report for 'vgs' command in verbose mode.\n"
"See 'vgs -o help' for the list of possible fields.\n")
-cfg(report_pvs_sort_CFG, "pvs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVS_SORT, vsn(1, 0, 0), NULL,
+cfg(report_pvs_sort_CFG, "pvs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVS_SORT, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to sort by when reporting 'pvs' command.\n"
"See 'pvs -o help' for the list of possible fields.\n")
-cfg(report_pvs_cols_CFG, "pvs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVS_COLS, vsn(1, 0, 0), NULL,
+cfg(report_pvs_cols_CFG, "pvs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVS_COLS, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to report for 'pvs' command.\n"
"See 'pvs -o help' for the list of possible fields.\n")
-cfg(report_pvs_cols_verbose_CFG, "pvs_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVS_COLS_VERB, vsn(1, 0, 0), NULL,
+cfg(report_pvs_cols_verbose_CFG, "pvs_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVS_COLS_VERB, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to report for 'pvs' command in verbose mode.\n"
"See 'pvs -o help' for the list of possible fields.\n")
-cfg(report_segs_sort_CFG, "segs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_SEGS_SORT, vsn(1, 0, 0), NULL,
+cfg(report_segs_sort_CFG, "segs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_SEGS_SORT, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to sort by when reporting 'lvs --segments' command.\n"
"See 'lvs --segments -o help' for the list of possible fields.\n")
-cfg(report_segs_cols_CFG, "segs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_SEGS_COLS, vsn(1, 0, 0), NULL,
+cfg(report_segs_cols_CFG, "segs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_SEGS_COLS, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to report for 'lvs --segments' command.\n"
"See 'lvs --segments -o help' for the list of possible fields.\n")
-cfg(report_segs_cols_verbose_CFG, "segs_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_SEGS_COLS_VERB, vsn(1, 0, 0), NULL,
+cfg(report_segs_cols_verbose_CFG, "segs_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_SEGS_COLS_VERB, vsn(1, 0, 0), NULL, 0, NULL,
"List of columns to report for 'lvs --segments' command in verbose mode.\n"
"See 'lvs --segments -o help' for the list of possible fields.\n")
-cfg(report_pvsegs_sort_CFG, "pvsegs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVSEGS_SORT, vsn(1, 1, 3), NULL,
+cfg(report_pvsegs_sort_CFG, "pvsegs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVSEGS_SORT, vsn(1, 1, 3), NULL, 0, NULL,
"List of columns to sort by when reporting 'pvs --segments' command.\n"
"See 'pvs --segments -o help' for the list of possible fields.\n")
-cfg(report_pvsegs_cols_CFG, "pvsegs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVSEGS_COLS, vsn(1, 1, 3), NULL,
+cfg(report_pvsegs_cols_CFG, "pvsegs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVSEGS_COLS, vsn(1, 1, 3), NULL, 0, NULL,
"List of columns to sort by when reporting 'pvs --segments' command.\n"
"See 'pvs --segments -o help' for the list of possible fields.\n")
-cfg(report_pvsegs_cols_verbose_CFG, "pvsegs_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVSEGS_COLS_VERB, vsn(1, 1, 3), NULL,
+cfg(report_pvsegs_cols_verbose_CFG, "pvsegs_cols_verbose", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVSEGS_COLS_VERB, vsn(1, 1, 3), NULL, 0, NULL,
"List of columns to sort by when reporting 'pvs --segments' command in verbose mode.\n"
"See 'pvs --segments -o help' for the list of possible fields.\n")
-cfg(dmeventd_mirror_library_CFG, "mirror_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_MIRROR_LIB, vsn(1, 2, 3), NULL,
+cfg(dmeventd_mirror_library_CFG, "mirror_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_MIRROR_LIB, vsn(1, 2, 3), NULL, 0, NULL,
"The library dmeventd uses when monitoring a mirror device.\n"
"libdevmapper-event-lvm2mirror.so attempts to recover from\n"
"failures. It removes failed devices from a volume group and\n"
"reconfigures a mirror as necessary. If no mirror library is\n"
"provided, mirrors are not monitored through dmeventd.\n")
-cfg(dmeventd_raid_library_CFG, "raid_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_RAID_LIB, vsn(2, 2, 87), NULL, NULL)
+cfg(dmeventd_raid_library_CFG, "raid_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_RAID_LIB, vsn(2, 2, 87), NULL, 0, NULL, NULL)
-cfg(dmeventd_snapshot_library_CFG, "snapshot_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_SNAPSHOT_LIB, vsn(1, 2, 26), NULL,
+cfg(dmeventd_snapshot_library_CFG, "snapshot_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_SNAPSHOT_LIB, vsn(1, 2, 26), NULL, 0, NULL,
"The library dmeventd uses when monitoring a snapshot device.\n"
"libdevmapper-event-lvm2snapshot.so monitors the filling of\n"
"snapshots and emits a warning through syslog when the usage\n"
"exceeds 80%. The warning is repeated when 85%, 90% and\n"
"95% of the snapshot is filled.\n")
-cfg(dmeventd_thin_library_CFG, "thin_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_THIN_LIB, vsn(2, 2, 89), NULL,
+cfg(dmeventd_thin_library_CFG, "thin_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_THIN_LIB, vsn(2, 2, 89), NULL, 0, NULL,
"The library dmeventd uses when monitoring a thin device.\n"
"libdevmapper-event-lvm2thin.so monitors the filling of\n"
"a pool and emits a warning through syslog when the usage\n"
"exceeds 80%. The warning is repeated when 85%, 90% and\n"
"95% of the pool is filled.\n")
-cfg(dmeventd_executable_CFG, "executable", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_PATH, vsn(2, 2, 73), "@DMEVENTD_PATH@",
+cfg(dmeventd_executable_CFG, "executable", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_PATH, vsn(2, 2, 73), "@DMEVENTD_PATH@", 0, NULL,
"The full path to the dmeventd binary.\n")
-cfg(tags_hosttags_CFG, "hosttags", tags_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_HOSTTAGS, vsn(1, 0, 18), NULL,
+cfg(tags_hosttags_CFG, "hosttags", tags_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_HOSTTAGS, vsn(1, 0, 18), NULL, 0, NULL,
"Create a host tag using the machine name.\n"
"The machine name is nodename returned by uname(2).\n")
-cfg_section(tag_CFG_SUBSECTION, "tag", tags_CFG_SECTION, CFG_NAME_VARIABLE | CFG_DEFAULT_UNDEFINED, vsn(1, 0, 18),
+cfg_section(tag_CFG_SUBSECTION, "tag", tags_CFG_SECTION, CFG_NAME_VARIABLE | CFG_DEFAULT_UNDEFINED, vsn(1, 0, 18), 0, NULL,
"Replace this subsection name with a custom tag name.\n"
"Multiple subsections like this can be created.\n"
"The '@' prefix for tags is optional.\n"
@@ -1436,14 +1442,14 @@ cfg_section(tag_CFG_SUBSECTION, "tag", tags_CFG_SECTION, CFG_NAME_VARIABLE | CFG
"bar is given to the hosts named machine1 and machine2.\n"
"tags { foo { } bar { host_list = [ \"machine1\", \"machine2\" ] } }\n")
-cfg(tag_host_list_CFG, "host_list", tag_CFG_SUBSECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 18), NULL,
+cfg(tag_host_list_CFG, "host_list", tag_CFG_SUBSECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 18), NULL, 0, NULL,
"A list of machine names.\n"
"These machine names are compared to the nodename\n"
"returned by uname(2). If the local machine name\n"
"matches an entry in this list, the name of the\n"
"subsection is applied to the machine as a 'host tag'.\n")
-cfg(local_system_id_CFG, "system_id", local_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117), NULL,
+cfg(local_system_id_CFG, "system_id", local_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117), NULL, 0, NULL,
"Defines the local system ID for lvmlocal mode.\n"
"This is used when global/system_id_source is set\n"
"to 'lvmlocal' in the main configuration file,\n"
@@ -1458,7 +1464,7 @@ cfg(local_system_id_CFG, "system_id", local_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_D
"Set the system_id to the string 'host1'.\n"
"system_id = \"host1\"\n")
-cfg_array(local_extra_system_ids_CFG, "extra_system_ids", local_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117), NULL,
+cfg_array(local_extra_system_ids_CFG, "extra_system_ids", local_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117), NULL, 0, NULL,
"A list of extra VG system IDs the local host can access.\n"
"VGs with the system IDs listed here (in addition\n"
"to the host's own system ID) can be fully accessed\n"
@@ -1468,4 +1474,4 @@ cfg_array(local_extra_system_ids_CFG, "extra_system_ids", local_CFG_SECTION, CFG
"Use this only after consulting 'man lvmsystemid'\n"
"to be certain of correct usage and possible dangers.\n")
-cfg(CFG_COUNT, NULL, root_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(0, 0, 0), NULL, NULL)
+cfg(CFG_COUNT, NULL, root_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(0, 0, 0), NULL, 0, NULL, NULL)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9c39d635b62aa4f2…
Commit: 9c39d635b62aa4f27e3f9ff31f171e501bb8a874
Parent: 25e7178e5955231295cf96de06ef9717fa029013
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Apr 30 14:43:08 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Apr 30 14:43:08 2015 +0200
cleanup: config_settings.h: comments
---
lib/config/config_settings.h | 94 ++++++++++++++++++++++++------------------
1 files changed, 54 insertions(+), 40 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index f03ec09..b496071 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -23,10 +23,7 @@
* - define a configuration array of one or more types:
* cfg_array(id, name, parent, flags, types, default_value, since_version, unconfigured_default_value, comment)
*
- * The unconfigured_default_value is used as a default value which is
- * in "@...@" form and which is then substitued with concrete value while
- * running configure (see also 'lvmconfig --type default --unconfigured').
- *
+*
* If default value can't be assigned statically because it depends on some
* run-time checks or if it depends on other settings already defined,
* the configuration setting or array can be defined with the
@@ -36,42 +33,59 @@
*
*
* VARIABLES:
- * id: unique identifier
- * name: configuration node name
- * parent: id of parent configuration node
- * flags: configuration item flags:
- * CFG_NAME_VARIABLE - configuration node name is variable
- * CFG_ALLOW_EMPTY - node value can be emtpy
- * CFG_ADVANCED - this node belongs to advanced config set
- * CFG_UNSUPPORTED - this node is not officially supported and it's used primarily by developers
- * CFG_PROFILABLE - this node is customizable by a profile
- * CFG_PROFILABLE_METADATA - profilable and attachable to VG/LV metadata
- * CFG_DEFAULT_UNDEFINED - node's default value is undefined
- * CFG_DISABLED - configuration is disabled (defaults always used)
- * type: allowed type for the value of simple configuation setting, one of:
- * CFG_TYPE_BOOL
- * CFG_TYPE_INT
- * CFG_TYPE_FLOAT
- * CFG_TYPE_STRING
- * types: allowed types for the values of array configuration setting
- * (use logical "OR" to define more than one allowed type,
- * e.g. CFG_TYPE_STRING | CFG_TYPE_INT)
- * default_value: default value of type 'type' for the configuration node,
- * if this is an array with several 'types' defined then
- * default value is a string where each string representation
- * of each value is prefixed by '#X' where X is one of:
- * 'B' for boolean value
- * 'I' for integer value
- * 'F' for float value
- * 'S' for string value
- * '#' for the '#' character itself
- * For example, "#Sfd#I16" means default value [ "fd", 16 ].
- * comment: brief comment used in configuration dumps
- * since_version: the version this configuration node first appeared in (be sure
- * that parent nodes are consistent with versioning, no check done
- * if parent node is older or the same age as any child node!)
- * Use "vsn" macro to translate the "major.minor.release" version
- * into a single number that is being stored internally in memory.
+ *
+ * id: Unique identifier.
+ *
+ * name: Configuration node name.
+ *
+ * parent: Id of parent configuration node.
+ *
+ * flags: Configuration item flags:
+ * CFG_NAME_VARIABLE - configuration node name is variable
+ * CFG_ALLOW_EMPTY - node value can be emtpy
+ * CFG_ADVANCED - this node belongs to advanced config set
+ * CFG_UNSUPPORTED - this node is not officially supported and it's used primarily by developers
+ * CFG_PROFILABLE - this node is customizable by a profile
+ * CFG_PROFILABLE_METADATA - profilable and attachable to VG/LV metadata
+ * CFG_DEFAULT_UNDEFINED - node's default value is undefined
+ * CFG_DISABLED - configuration is disabled (defaults always used)
+ *
+ * type: Allowed type for the value of simple configuation setting, one of:
+ * CFG_TYPE_BOOL
+ * CFG_TYPE_INT
+ * CFG_TYPE_FLOAT
+ * CFG_TYPE_STRING
+ *
+ * types: Allowed types for the values of array configuration setting
+ * (use logical "OR" to define more than one allowed type,
+ * e.g. CFG_TYPE_STRING | CFG_TYPE_INT).
+ *
+ * default_value: Default value of type 'type' for the configuration node,
+ * if this is an array with several 'types' defined then
+ * default value is a string where each string representation
+ * of each value is prefixed by '#X' where X is one of:
+ * 'B' for boolean value
+ * 'I' for integer value
+ * 'F' for float value
+ * 'S' for string value
+ * '#' for the '#' character itself
+ * For example, "#Sfd#I16" means default value [ "fd", 16 ].
+ *
+ * since_version: The version this configuration node first appeared in (be sure
+ * that parent nodes are consistent with versioning, no check done
+ * if parent node is older or the same age as any child node!)
+ * Use "vsn" macro to translate the "major.minor.release" version
+ * into a single number that is being stored internally in memory.
+ * (see also lvmconfig ... --withversions)
+ *
+ * unconfigured_default_value: Unconfigured default value used as a default value which is
+ * in "@...@" form and which is then substitued with concrete value
+ * while running configure.
+ * (see also 'lvmconfig --type default --unconfigured')
+ *
+ * comment: Comment used in configuration dumps. The very first line is the
+ * summarizing comment.
+ * (see also lvmconfig ... --withcomments and --withsummary)
*/
#include "defaults.h"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=25e7178e59552312…
Commit: 25e7178e5955231295cf96de06ef9717fa029013
Parent: d2c2718c11dc834a79a76acf34d76902daac5752
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Thu Apr 30 14:28:26 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Thu Apr 30 14:28:26 2015 +0200
cleanup: config_settings.h: add some comments
---
lib/config/config_settings.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index aaaa3a3..f03ec09 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -18,10 +18,14 @@
* cfg_section(id, name, parent, flags, since_version, comment)
*
* - define a configuration setting of simple type:
- * cfg(id, name, parent, flags, type, default_value, since_version, comment)
+ * cfg(id, name, parent, flags, type, default_value, since_version, unconfigured_default_value, comment)
*
* - define a configuration array of one or more types:
- * cfg_array(id, name, parent, flags, types, default_value, since_version, comment)
+ * cfg_array(id, name, parent, flags, types, default_value, since_version, unconfigured_default_value, comment)
+ *
+ * The unconfigured_default_value is used as a default value which is
+ * in "@...@" form and which is then substitued with concrete value while
+ * running configure (see also 'lvmconfig --type default --unconfigured').
*
* If default value can't be assigned statically because it depends on some
* run-time checks or if it depends on other settings already defined,
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3706abde5e770356…
Commit: 3706abde5e7703562bad3072cca13faf31b6b8b6
Parent: 13fea879606c4dfdeb8d7686ca2ab606a70a5cd4
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Apr 30 11:12:19 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Apr 30 11:16:14 2015 +0200
tests: lvmconf update
New lvmconf function is using bash associative arrays - however
older systems like RHEL5 doesn't provide this feature. In this case
stay with older variant.
Restore support for use case like this:
aux lvmconf 'tags/@foo {}'
---
test/lib/aux.sh | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 373909a..67df0f5 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -786,14 +786,28 @@ EOF
echo "$v"
done >> "$config_values"
- declare -A CONF
+ declare -A CONF || {
+ # Associative arrays is not available
+ local s
+ for s in $(cut -f1 -d/ "$config_values" | sort | uniq); do
+ echo "$s {"
+ local k
+ for k in $(grep ^"$s"/ "$config_values" | cut -f1 -d= | sed -e 's, *$,,' | sort | uniq); do
+ grep "^$k" "$config_values" | tail -n 1 | sed -e "s,^$s/, ,"
+ done
+ echo "}"
+ echo
+ done | tee "$config" | sed -e "s,^,## LVMCONF: ,"
+ return 0
+ }
+
local sec
local last_sec
# read sequential list and put into associative array
while IFS=$IFS_NL read -r v; do
# trim white-space-chars via echo when inserting
- CONF[$(echo ${v%%=*})]=${v##*=}
+ CONF[$(echo ${v%%[={]*})]=${v#*/}
done < "$config_values"
# sort by section and iterate through them
@@ -804,7 +818,7 @@ EOF
echo "$sec {"
last_sec=$sec
}
- echo " ${v#*/} =${CONF[$v]}"
+ echo " ${CONF[$v]}"
done > "$config"
echo "}" >> "$config"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d6b624686478c0f1…
Commit: d6b624686478c0f162ac4f7f4af7d35d5539d151
Parent: 299a3be0d3d02e96794bb2c36217955c2b03f049
Author: Petr Rockai <prockai(a)redhat.com>
AuthorDate: Wed Apr 22 19:38:40 2015 +0200
Committer: Petr Rockai <prockai(a)redhat.com>
CommitterDate: Thu Apr 30 06:35:05 2015 +0200
man: Fix references to lvmcache(7) that mentioned section 8 by mistake.
---
man/lvconvert.8.in | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in
index 7dd1051..576859b 100644
--- a/man/lvconvert.8.in
+++ b/man/lvconvert.8.in
@@ -220,11 +220,11 @@ Run the daemon in the background.
.BR \-H ", " \-\-cache ", " \-\-type\ \fIcache
Converts logical volume to a cached LV with the use of cache pool
specified with \fB\-\-cachepool\fP.
-For more information on cache pool LVs and cache LVs, see \fBlvmcache\fP(8).
+For more information on cache pool LVs and cache LVs, see \fBlvmcache\fP(7).
.TP
.BR \-\-cachepool " " \fICachePoolLV
This argument is necessary when converting a logical volume to a cache LV.
-For more information on cache pool LVs and cache LVs, see \fBlvmcache\fP(8).
+For more information on cache pool LVs and cache LVs, see \fBlvmcache\fP(7).
.TP
.BR \-m ", " \-\-mirrors " " \fIMirrors
Specifies the degree of the mirror you wish to create.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=299a3be0d3d02e96…
Commit: 299a3be0d3d02e96794bb2c36217955c2b03f049
Parent: bf73ccb8483219c72cb7e80daf2e40f0a14db4e1
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Apr 29 10:00:38 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Apr 29 16:27:40 2015 -0500
man: lvmthin section about use-policies
---
man/lvmthin.7.in | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 116 insertions(+), 2 deletions(-)
diff --git a/man/lvmthin.7.in b/man/lvmthin.7.in
index dab2d7e..79ca40a 100644
--- a/man/lvmthin.7.in
+++ b/man/lvmthin.7.in
@@ -254,6 +254,8 @@ or vgchange to activate thin snapshots with the "k" attribute.
.br
.B Metadata space exhaustion
.br
+.B Automatic extend settings
+.br
.B Zeroing
.br
.B Discard
@@ -834,7 +836,8 @@ extended. (Disabling dmeventd is not recommended.)
.IP \[bu]
Automatic extension of the thin pool is too slow given the rate of writes
to thin LVs in the pool. (This can be addressed by tuning the
-thin_pool_autoextend_threshold and thin_pool_autoextend_percent.)
+thin_pool_autoextend_threshold and thin_pool_autoextend_percent.
+See "Automatic extend settings".)
.IP \[bu]
The VG does not have enough free blocks to extend the thin pool.
@@ -877,6 +880,117 @@ repair.
4. Check and repair file system with fsck.
+.SS Automatic extend settings
+
+\&
+
+Thin pool LVs can be extended according to preset values. The presets
+determine if the LV should be extended based on how full it is, and if so
+by how much. When dmeventd monitors thin pool LVs, it uses lvextend with
+these presets. (See "Automatically extend thin pool LV".)
+
+Command to extend a thin pool data LV using presets:
+.br
+.B lvextend \-\-use\-policies VG/ThinPoolLV
+
+The command uses these settings:
+
+.BR lvm.conf (5)
+.B thin_pool_autoextend_threshold
+.br
+autoextend the LV when its usage exceeds this percent.
+
+.BR lvm.conf (5)
+.B thin_pool_autoextend_percent
+.br
+autoextend the LV by this much additional space.
+
+To see the default values of these settings, run:
+
+.B lvmconfig --type default --withcomment
+.RS
+.B activation/thin_pool_autoextend_threshold
+.RE
+
+.B lvmconfig --type default --withcomment
+.RS
+.B activation/thin_pool_autoextend_percent
+.RE
+
+To change these values globally, edit
+.BR lvm.conf (5).
+
+To change these values on a per-VG or per-LV basis, attach a "profile" to
+the VG or LV. A profile is a collection of config settings, saved in a
+local text file (using the lvm.conf format). lvm looks for profiles in
+the profile_dir directory, e.g. /etc/lvm/profile/. Once attached to a VG
+or LV, lvm will process the VG or LV using the settings from the attached
+profile. A profile is named and referenced by its file name.
+
+To use a profile to customize the lvextend settings for an LV:
+
+.IP \[bu] 2
+Create a file containing settings, saved in profile_dir.
+For the profile_dir location, run:
+.br
+.B lvmconfig config/profile_dir
+
+.IP \[bu] 2
+Attach the profile to an LV, using the command:
+.br
+.B lvchange \-\-metadataprofile ProfileName VG/ThinPoolLV
+
+.IP \[bu] 2
+Extend the LV using the profile settings:
+.br
+.B lvextend \-\-use\-policies VG/ThinPoolLV
+
+.P
+
+.I Example
+.br
+.nf
+# lvmconfig config/profile_dir
+profile_dir="/etc/lvm/profile"
+
+# cat /etc/lvm/profile/pool0extend.profile
+activation {
+ thin_pool_autoextend_threshold=50
+ thin_pool_autoextend_percent=10
+}
+
+# lvchange --metadataprofile pool0extend vg/pool0
+
+# lvextend --use-policies vg/pool0
+.fi
+
+.I Notes
+.IP \[bu] 2
+A profile is attached to a VG or LV by name, where the name references a
+local file in profile_dir. If the VG is moved to another machine, the
+file with the profile also needs to be moved.
+
+.IP \[bu] 2
+Only certain settings can be used in a VG or LV profile, see:
+.br
+.B lvmconfig --type profilable-metadata.
+
+.IP \[bu] 2
+An LV without a profile of its own will inherit the VG profile.
+
+.IP \[bu] 2
+Remove a profile from an LV using the command:
+.br
+.B lvchange --detachprofile VG/ThinPoolLV.
+
+.IP \[bu] 2
+Commands can also have profiles applied to them. The settings that can be
+applied to a command are different than the settings that can be applied
+to a VG or LV. See lvmconfig --type profilable-command. To apply a
+profile to a command, write a profile, save it in the profile directory,
+and run the command using the option: --commandprofile ProfileName.
+
+
.SS Zeroing
\&
@@ -1242,10 +1356,10 @@ skipped while mounting readonly:
mount /dev/VG/SnapLV /mnt \-o ro,nouuid,norecovery
-
.SH SEE ALSO
.BR lvm (8),
.BR lvm.conf (5),
+.BR lvmconfig (8),
.BR lvcreate (8),
.BR lvconvert (8),
.BR lvchange (8),
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bf73ccb8483219c7…
Commit: bf73ccb8483219c72cb7e80daf2e40f0a14db4e1
Parent: 08a82aa940ad3c2841c52544543a08919c0ed110
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Apr 29 10:13:13 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Apr 29 10:14:23 2015 -0500
man: 'lvmconfig' is preferred over 'lvm config'
---
man/lvm.8.in | 2 +-
man/lvm.conf.5.in | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/man/lvm.8.in b/man/lvm.8.in
index 7ed35c8..298d05b 100644
--- a/man/lvm.8.in
+++ b/man/lvm.8.in
@@ -321,7 +321,7 @@ way it fits with other LVM configuration methods.
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 \fBlvmconfig\fP command where the
-\-\-profile has special meaning, see \fBlvm config\fP(8) for more information).
+\-\-profile has special meaning, see \fBlvmconfig\fP(8) for more information).
.TP
.IR \fB\-\-config " " \fIConfigurationString
Uses the ConfigurationString as direct string representation of the configuration
diff --git a/man/lvm.conf.5.in b/man/lvm.conf.5.in
index 88694a1..6ff8674 100644
--- a/man/lvm.conf.5.in
+++ b/man/lvm.conf.5.in
@@ -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 config \-\-file <ProfileName.profile> \-\-type profilable-command <section>\fP
-or \fBlvm config \-\-file <ProfileName.profile> \-\-type profilable-metadata <section>\fP
+\fBlvmconfig \-\-file <ProfileName.profile> \-\-type profilable-command <section>\fP
+or \fBlvmconfig \-\-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).
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f0ff3e9982f18124…
Commit: f0ff3e9982f1812435bf294d18f743762c944eb1
Parent: 79ec8eb93ca9620d69cdf8ca294f76a53e652cfe
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Apr 29 10:04:28 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Apr 29 10:04:28 2015 -0500
man: 'lvm config' is preferred over 'lvm lvmconfig'
---
man/lvm.8.in | 2 +-
man/lvm.conf.5.in | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/man/lvm.8.in b/man/lvm.8.in
index 3d408fb..7ed35c8 100644
--- a/man/lvm.8.in
+++ b/man/lvm.8.in
@@ -321,7 +321,7 @@ way it fits with other LVM configuration methods.
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 \fBlvmconfig\fP command where the
-\-\-profile has special meaning, see \fBlvm lvmconfig\fP(8) for more information).
+\-\-profile has special meaning, see \fBlvm config\fP(8) for more information).
.TP
.IR \fB\-\-config " " \fIConfigurationString
Uses the ConfigurationString as direct string representation of the configuration
diff --git a/man/lvm.conf.5.in b/man/lvm.conf.5.in
index 517c0f9..88694a1 100644
--- a/man/lvm.conf.5.in
+++ b/man/lvm.conf.5.in
@@ -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 lvmconfig \-\-file <ProfileName.profile> \-\-type profilable-command <section>\fP
-or \fBlvm lvmconfig \-\-file <ProfileName.profile> \-\-type profilable-metadata <section>\fP
+\fBlvm config \-\-file <ProfileName.profile> \-\-type profilable-command <section>\fP
+or \fBlvm config \-\-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).
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=79ec8eb93ca9620d…
Commit: 79ec8eb93ca9620d69cdf8ca294f76a53e652cfe
Parent: 8b6b90b0730658c12169a0a8fffcf043be6c7eb6
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Apr 29 16:35:49 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Apr 29 16:35:49 2015 +0200
cleanup: lvmconfig man page typo
---
man/lvmconfig.8.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/man/lvmconfig.8.in b/man/lvmconfig.8.in
index b855a6e..ff7c63b 100644
--- a/man/lvmconfig.8.in
+++ b/man/lvmconfig.8.in
@@ -151,7 +151,7 @@ info about \fBconfig cascade\fP.
.TP
.B \-\-showunsupported
-Include unsupported configuration settings to the output. These settings
+Include unsupported configuration settings in the output. These settings
are either used for debugging or development purposes only or their support
is not yet complete and they are not meant to be used in production. The
\fBcurrent\fP and \fBdiff\fP types include unsupported settings in their
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a1474b98f90de0ed…
Commit: a1474b98f90de0ed272935debc6773f08cdfbace
Parent: 90cbc5576fa8511c7045700fa7de0bc3b01e2225
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Thu Apr 16 17:31:07 2015 +0200
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Tue Apr 28 22:45:19 2015 +0200
update copyright info in various files
basically transfer former date ranges from files where
the code originated from (pvmove.c and lvconvert.c)
---
tools/lvconvert_poll.c | 2 +-
tools/pvmove_poll.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/lvconvert_poll.c b/tools/lvconvert_poll.c
index 012911e..4745d06 100644
--- a/tools/lvconvert_poll.c
+++ b/tools/lvconvert_poll.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2005-2015 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
diff --git a/tools/pvmove_poll.c b/tools/pvmove_poll.c
index 0e9d639..cd32476 100644
--- a/tools/pvmove_poll.c
+++ b/tools/pvmove_poll.c
@@ -1,5 +1,6 @@
/*
- * Copyright (C) 2015 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2003-2004 Sistina Software, Inc. All rights reserved.
+ * Copyright (C) 2004-2015 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8c9ab2a4dd827b57…
Commit: 8c9ab2a4dd827b575a7a8b501c5ca3474508f964
Parent: 3f0434057b8b77efd63fe0c502a962bc9dd13223
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Mon Apr 27 10:33:45 2015 +0200
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Tue Apr 28 22:31:40 2015 +0200
tests: simplify removal of dangling bg procs
some tests left dangling bg processes originating in
lvm2 commands being able to spawn any bg polling process
(lvchange, vgchange, pvmove, lvconvert...)
Initial fn 'add_to_kill_list' should collect processes with
specific parameters (proc's command line and parent processes ID).
After testing finishes the fn kill_listed_processes should remove these
listed by 'add_to_kill_list'.
Unfortunately it proved to be prone to an error especially in scenarios
where cmd line of initiating command contained characters required to
be espaced before passing to shell script to make it work correctly.
(Or if cmd spawned more than one bg process with same cmd line. i.e.:
vgchange or lvchange).
The new implementation is much simpler. It uses env. variable (LVM_TEST_TAG)
for marking a process desired to be killed later or during test env. teardown.
(i.e.: LVM_TEST_TAG=kill_me_$PREFIX to kill only processes related to
current test environment)
---
test/lib/aux.sh | 26 +++++++++-----------------
test/shell/pvmove-abort-all.sh | 9 +++------
test/shell/pvmove-abort.sh | 6 ++----
test/shell/pvmove-basic.sh | 4 +---
test/shell/pvmove-restart.sh | 3 ++-
5 files changed, 17 insertions(+), 31 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 0e59d6e..24be323 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -233,26 +233,18 @@ kill_sleep_kill_() {
fi
}
-# $1 cmd line
-# $2 optional parms for pgrep
-add_to_kill_list() {
- local p=$(pgrep ${@:2} -f "$1" 2>/dev/null)
- test -z "$p" || echo "$p:$1" >> kill_list
+print_procs_by_tag_() {
+ ps -o pid=,args= ehax 2>/dev/null | grep -weLVM_TEST_TAG=${1:-kill_me_$PREFIX} 2>/dev/null || true
+}
+
+count_processes_with_tag() {
+ print_procs_by_tag_ | wc -l
}
kill_listed_processes() {
- local tmp
- local pid
- local cmd
- test -f kill_list || return 0
- while read tmp; do
- pid=${tmp%%:*}
- cmd=${tmp##*:}
- for tmp in $(pgrep -f "$cmd" -d ' '); do
- test "$tmp" = "$pid" && kill -9 "$tmp"
- done
- done < kill_list
- rm -f kill_list
+ while read pid b; do
+ test -z "$pid" || kill -9 $pid
+ done <<< $(print_procs_by_tag_ $@)
}
teardown() {
diff --git a/test/shell/pvmove-abort-all.sh b/test/shell/pvmove-abort-all.sh
index de6d8c9..5bca8a2 100644
--- a/test/shell/pvmove-abort-all.sh
+++ b/test/shell/pvmove-abort-all.sh
@@ -50,12 +50,9 @@ if test -z "$backgroundarg" ; then
aux wait_pvmove_lv_ready "$vg1-pvmove0"
lvs -a $vg $vg1
else
- "${cmd1[@]}"
- aux add_to_kill_list "${cmd1[*]}" -P 1
- "${cmd2[@]}"
- aux add_to_kill_list "${cmd2[*]}" -P 1
- "${cmd3[@]}"
- aux add_to_kill_list "${cmd3[*]}" -P 1
+ LVM_TEST_TAG="kill_me_$PREFIX" "${cmd1[@]}"
+ LVM_TEST_TAG="kill_me_$PREFIX" "${cmd2[@]}"
+ LVM_TEST_TAG="kill_me_$PREFIX" "${cmd3[@]}"
fi
# test removal of all pvmove LVs
diff --git a/test/shell/pvmove-abort.sh b/test/shell/pvmove-abort.sh
index 3165c6f..2332521 100644
--- a/test/shell/pvmove-abort.sh
+++ b/test/shell/pvmove-abort.sh
@@ -40,10 +40,8 @@ if test -z "$backgroundarg" ; then
"${cmd2[@]}" &
aux wait_pvmove_lv_ready "$vg-pvmove1"
else
- "${cmd1[@]}"
- aux add_to_kill_list "${cmd1[*]}" -P 1
- "${cmd2[@]}"
- aux add_to_kill_list "${cmd2[*]}" -P 1
+ LVM_TEST_TAG="kill_me_$PREFIX" "${cmd1[@]}"
+ LVM_TEST_TAG="kill_me_$PREFIX" "${cmd2[@]}"
fi
# remove specific device
diff --git a/test/shell/pvmove-basic.sh b/test/shell/pvmove-basic.sh
index d5b7845..f7830da 100644
--- a/test/shell/pvmove-basic.sh
+++ b/test/shell/pvmove-basic.sh
@@ -334,9 +334,7 @@ check_and_cleanup_lvs_
#COMM "pvmove abort"
restore_lvs_
-cmd=(pvmove $mode -i100 -b "$dev1" "$dev3")
-"${cmd[@]}"
-aux add_to_kill_list "${cmd[*]}" -P 1
+LVM_TEST_TAG="kill_me_$PREFIX" pvmove $mode -i100 -b "$dev1" "$dev3"
pvmove --abort
check_and_cleanup_lvs_
diff --git a/test/shell/pvmove-restart.sh b/test/shell/pvmove-restart.sh
index 88dfebe..b91f624 100644
--- a/test/shell/pvmove-restart.sh
+++ b/test/shell/pvmove-restart.sh
@@ -79,7 +79,7 @@ dmsetup table
# Restart pvmove
# use exclusive activation to have usable pvmove without cmirrord
-vgchange -aey $vg
+LVM_TEST_TAG="kill_me_$PREFIX" vgchange --config 'activation{polling_interval=10}' -aey $vg
aux wait_pvmove_lv_ready "$vg-pvmove0"
dmsetup table
@@ -90,6 +90,7 @@ pvmove --abort
lvs -a -o+devices $vg
lvremove -ff $vg
+aux kill_listed_processes
done
# Restore delayed device back
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3f0434057b8b77ef…
Commit: 3f0434057b8b77efd63fe0c502a962bc9dd13223
Parent: beb229e1e8e8b95de09920195c2bc4171e89dc19
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Apr 28 17:00:37 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
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(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index ca5ee0f..f0c248c 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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.
diff --git a/man/Makefile.in b/man/Makefile.in
index a2e19fc..b93c5cb 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -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 \
diff --git a/man/clvmd.8.in b/man/clvmd.8.in
index 9b2bd4e..2c7330b 100644
--- a/man/clvmd.8.in
+++ b/man/clvmd.8.in
@@ -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
diff --git a/man/lvm-config.8.in b/man/lvm-config.8.in
new file mode 100644
index 0000000..3d1bec9
--- /dev/null
+++ b/man/lvm-config.8.in
@@ -0,0 +1 @@
+.so man8/lvm-config.8
diff --git a/man/lvm-dumpconfig.8.in b/man/lvm-dumpconfig.8.in
index b16afb4..5050d77 100644
--- a/man/lvm-dumpconfig.8.in
+++ b/man/lvm-dumpconfig.8.in
@@ -1,162 +1 @@
-.TH "LVM-DUMPCONFIG" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
-.SH "NAME"
-lvm-dumpconfig \(em dump LVM configuration
-.SH SYNOPSIS
-.B lvm dumpconfig
-.RB [ \-f | \-\-file
-.IR filename ]
-.RB [ \-\-type
-.RI { current | default | diff | missing | new | profilable | profilable-command | profilable-metadata }
-.RB [ \-\-atversion
-.IR version ]
-.RB [ \-\-ignoreadvanced ]
-.RB [ \-\-ignoreunsupported ]
-.RB [ \-\-ignorelocal ]
-.RB [ \-\-config
-.IR ConfigurationString ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-\-profile
-.IR ProfileName ]
-.RB [ \-\-metadataprofile
-.IR ProfileName ]
-.RB [ \-\-mergedconfig ]
-.RB [ \-\-validate ]
-.RB [ \-\-withcomments ]
-.RB [ \-\-withfullcomments ]
-.RB [ \-\-withversions ]
-.RB [ ConfigurationNode... ]
-
-.SH DESCRIPTION
-lvm dumpconfig produces formatted output with LVM configuration tree.
-
-.SH OPTIONS
-.TP
-.BR \-f ", " \-\-file " \fIfilename"
-Dump configuration to a file named 'filename'.
-
-.TP
-.IR \fB\-\-type " {" current | default | diff | missing | new | profilable }
-Select the type of configuration to dump. The configuration settings dumped
-have either default values or currently used values assigned based on the
-type selected (if no type is selected, \fB\-\-type current\fP is used
-by default). Whenever a configuration setting with a default value is
-commented out, it means the setting does not have any concrete default
-value defined. All output can be saved and reused as proper \fBlvm.conf\fP(5)
-file.
-.RS
-.IP current 3
-Dump current \fBlvm.conf\fP configuration merged with any \fBtag config\fP
-if used. See also \fBlvm.conf\fP(5) for more info about LVM configuration methods.
-.IP default 3
-Dump all possible configuration settings with default values assigned.
-.IP diff 3
-Dump all configuration settings for which the values used differ from defaults.
-The value assigned for each configuration setting is the value currently used.
-This is actually minimal LVM configuration which can be used without
-a change to current configured behaviour.
-.IP missing 3
-Dump all configuration settings with default values assigned which are
-missing in the configuration currently used and for which LVM automatically
-fallbacks to using these default values.
-.IP new 3
-Dump all new configuration settings introduced in current LVM version
-or specific version as defined by \fB\-\-atversion\fP option.
-.IP profilable 3
-Dump all profilable configuration settings with default values assigned.
-See \fBlvm.conf\fP(5) for more info about \fBprofile config\fP method.
-.IP profilable-command 3
-Dump all profilable configuration settings with default values assigned
-that can be used in command profile. This is a subset of settings dumped
-by \fB\-\-type \-\-profilable\fP.
-.IP profilable-metadata 3
-Dump all profilable configuration settings with default values assigned
-that can be used in metadata profile. This is a subset of settings dumped
-by \fB\-\-type \-\-profilable\fP.
-.RE
-
-.TP
-.BI \-\-atversion " version"
-Specify an LVM version in x.y.z format where x is the major version,
-the y is the minor version and z is the patchlevel (e.g. 2.2.106).
-When configuration is dumped, the configuration settings recognized
-at this LVM version will be considered only. This can be used
-to dump a configuration that certain LVM version understands and
-which does not contain any newer settings for which LVM would
-issue a warning message when checking the configuration.
-
-.TP
-.B \-\-ignoreadvanced
-Ignore advanced configuration settings on dump.
-
-.TP
-.B \-\-ignoreunsupported
-Ignore unsupported configuration settings on dump. These settings are
-either used for debugging purposes only or their support is not yet
-complete and they are not meant to be used in production.
-
-.TP
-.B \-\-ignorelocal
-Ignore local section.
-
-.TP
-.BI \-\-config " ConfigurationString"
-Use \fBConfigurationString\fP to override existing configuration.
-This configuration is then applied for dumpconfig command itself.
-See also \fBlvm.conf\fP(5) for more info about \fBconfig cascade\fP.
-
-.TP
-.BI \-\-commandprofile " ProfileName"
-Use \fBProfileName\fP to override existing configuration.
-This configuration is then applied for dumpconfig command itself.
-See also \fB\-\-mergedconfig\fP option and \fBlvm.conf\fP(5) for
-more info about \fBconfig cascade\fP.
-
-.TP
-.BI \-\-profile " ProfileName"
-The same as using \fB\-\-commandprofile\fP but the configuration is not
-applied for dumpconfig command itself.
-
-.TP
-.BI \-\-metadataprofile " ProfileName"
-Use \fBProfileName\fP to override existing configuration.
-The configuration defined in metadata profile has no effect for
-dumpconfig command itself, the dumpconfig dumps the configuration only.
-See also \fB\-\-mergedconfig\fP option and \fBlvm.conf\fP(5) for more
-info about \fBconfig cascade\fP.
-
-.TP
-.B \-\-mergedconfig
-When the dumpconfig command is run with the \fB\-\-config\fP option
-and/or \fB\-\-commandprofile\fP (or using \fBLVM_COMMAND_PROFILE\fP
-environment variable), \fB\-\-profile\fP, \fB\-\-metadataprofile\fP
-option, merge all the contents of the \fBconfig cascade\fP before dumping it.
-Without the \fB\-\-mergeconfig\fP option used, only the configuration at
-the front of the cascade is dumped. See also \fBlvm.conf\fP(5) for more
-info about \fBconfig cascade\fP.
-
-.TP
-.B \-\-validate
-Validate current configuration used and exit with appropriate
-return code. The validation is done only for the configuration
-at the front of the \fBconfig cascade\fP. To validate the whole
-merged configuration tree, use also the \fB\-\-mergedconfig\fP option.
-The validation is done even if \fBconfig/checks\fP \fBlvm.conf\fP(5)
-option is disabled.
-
-.TP
-.B \-\-withcomments
-Dump a one line comment for each configuration node.
-
-.TP
-.B \-\-withfullcomments
-Dump a full comment for each configuration node.
-
-.TP
-.B \-\-withversions
-Also dump a comment containing the version of introduction for
-each configuration node.
-
-.SH SEE ALSO
-.BR lvm (8)
-.BR lvm.conf (5)
+.so man8/lvmconfig.8
diff --git a/man/lvm.8.in b/man/lvm.8.in
index 26d94ee..3d408fb 100644
--- a/man/lvm.8.in
+++ b/man/lvm.8.in
@@ -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),
diff --git a/man/lvm.conf.5.in b/man/lvm.conf.5.in
index 074e2e9..2c4effc 100644
--- a/man/lvm.conf.5.in
+++ b/man/lvm.conf.5.in
@@ -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)
diff --git a/man/lvmconfig.8.in b/man/lvmconfig.8.in
new file mode 100644
index 0000000..76f8ffe
--- /dev/null
+++ b/man/lvmconfig.8.in
@@ -0,0 +1,166 @@
+.TH "LVMCONFIG" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.SH "NAME"
+lvmconfig, lvm dumpconfig, lvm config \(em Display LVM configuration
+.SH SYNOPSIS
+.B lvmconfig
+.RB [ \-f | \-\-file
+.IR filename ]
+.RB [ \-\-type
+.RI { current | default | diff | missing | new | profilable | profilable-command | profilable-metadata }
+.RB [ \-\-atversion
+.IR version ]
+.RB [ \-\-ignoreadvanced ]
+.RB [ \-\-ignoreunsupported ]
+.RB [ \-\-ignorelocal ]
+.RB [ \-\-config
+.IR ConfigurationString ]
+.RB [ \-\-commandprofile
+.IR ProfileName ]
+.RB [ \-\-profile
+.IR ProfileName ]
+.RB [ \-\-metadataprofile
+.IR ProfileName ]
+.RB [ \-\-mergedconfig ]
+.RB [ \-\-validate ]
+.RB [ \-\-withcomments ]
+.RB [ \-\-withfullcomments ]
+.RB [ \-\-withversions ]
+.RB [ ConfigurationNode... ]
+
+.SH DESCRIPTION
+lvmconfig produces formatted output from the LVM configuration tree.
+The command was added in release 2.02.119 and has an identical longer form
+\fBlvm dumpconfig\fP.
+
+.SH OPTIONS
+.TP
+.BR \-f ", " \-\-file " \fIfilename"
+Send output to a file named 'filename'.
+
+.TP
+.IR \fB\-\-type " {" current | default | diff | missing | new | profilable }
+Select the type of configuration to display. The configuration settings
+displayed have either default values or currently-used values assigned based on
+the type selected. If no type is selected, \fB\-\-type current\fP is used
+by default. Whenever a configuration setting with a default value is
+commented out, it means the setting does not have any concrete default
+value defined. Output can be saved and used as a proper \fBlvm.conf\fP(5)
+file.
+.RS
+.IP current 3
+Display the current \fBlvm.conf\fP configuration merged with any \fBtag
+config\fP if used. See also \fBlvm.conf\fP(5) for more info about LVM
+configuration methods.
+.IP default 3
+Display all possible configuration settings with default values assigned.
+.IP diff 3
+Display all configuration settings for which the values used differ from defaults.
+The value assigned for each configuration setting is the value currently used.
+This is actually minimal LVM configuration which can be used without
+a change to current configured behaviour.
+.IP missing 3
+Display all configuration settings with default values assigned which are
+missing in the configuration currently used and for which LVM automatically
+fallbacks to using these default values.
+.IP new 3
+Display all new configuration settings introduced in current LVM version
+or specific version as defined by \fB\-\-atversion\fP option.
+.IP profilable 3
+Display all profilable configuration settings with default values assigned.
+See \fBlvm.conf\fP(5) for more info about \fBprofile config\fP method.
+.IP profilable-command 3
+Display all profilable configuration settings with default values assigned
+that can be used in command profile. This is a subset of settings displayed
+by \fB\-\-type \-\-profilable\fP.
+.IP profilable-metadata 3
+Display all profilable configuration settings with default values assigned
+that can be used in metadata profile. This is a subset of settings displayed
+by \fB\-\-type \-\-profilable\fP.
+.RE
+
+.TP
+.BI \-\-atversion " version"
+Specify an LVM version in x.y.z format where x is the major version,
+the y is the minor version and z is the patchlevel (e.g. 2.2.106).
+When configuration is displayed, the configuration settings recognized
+at this LVM version will be considered only. This can be used
+to display a configuration that a certain LVM version understands and
+which does not contain any newer settings for which LVM would
+issue a warning message when checking the configuration.
+
+.TP
+.B \-\-ignoreadvanced
+Exclude advanced configuration settings from the output.
+
+.TP
+.B \-\-ignoreunsupported
+Exclude unsupported configuration settings from the output. These settings are
+either used for debugging purposes only or their support is not yet
+complete and they are not meant to be used in production.
+
+.TP
+.B \-\-ignorelocal
+Ignore local section.
+
+.TP
+.BI \-\-config " ConfigurationString"
+Use \fBConfigurationString\fP to override existing configuration.
+This configuration is then applied for the lvmconfig command itself.
+See also \fBlvm.conf\fP(5) for more info about \fBconfig cascade\fP.
+
+.TP
+.BI \-\-commandprofile " ProfileName"
+Use \fBProfileName\fP to override existing configuration.
+This configuration is then applied for the lvmconfig command itself.
+See also \fB\-\-mergedconfig\fP option and \fBlvm.conf\fP(5) for
+more info about \fBconfig cascade\fP.
+
+.TP
+.BI \-\-profile " ProfileName"
+The same as using \fB\-\-commandprofile\fP but the configuration is not
+applied for the lvmconfig command itself.
+
+.TP
+.BI \-\-metadataprofile " ProfileName"
+Use \fBProfileName\fP to override existing configuration.
+The configuration defined in metadata profile has no effect for
+the lvmconfig command itself. lvmconfig displays the configuration only.
+See also \fB\-\-mergedconfig\fP option and \fBlvm.conf\fP(5) for more
+info about \fBconfig cascade\fP.
+
+.TP
+.B \-\-mergedconfig
+When the lvmconfig command is run with the \fB\-\-config\fP option
+and/or \fB\-\-commandprofile\fP (or using \fBLVM_COMMAND_PROFILE\fP
+environment variable), \fB\-\-profile\fP, \fB\-\-metadataprofile\fP
+option, merge all the contents of the \fBconfig cascade\fP before displaying it.
+Without the \fB\-\-mergeconfig\fP option used, only the configuration at
+the front of the cascade is displayed. See also \fBlvm.conf\fP(5) for more
+info about \fBconfig cascade\fP.
+
+.TP
+.B \-\-validate
+Validate current configuration used and exit with appropriate
+return code. The validation is done only for the configuration
+at the front of the \fBconfig cascade\fP. To validate the whole
+merged configuration tree, use also the \fB\-\-mergedconfig\fP option.
+The validation is done even if \fBconfig/checks\fP \fBlvm.conf\fP(5)
+option is disabled.
+
+.TP
+.B \-\-withcomments
+Display a one line comment for each configuration node.
+
+.TP
+.B \-\-withfullcomments
+Display a full comment for each configuration node.
+
+.TP
+.B \-\-withversions
+Also display a comment containing the version of introduction for
+each configuration node.
+
+.SH SEE ALSO
+.BR lvm (8)
+.BR lvmconf (8)
+.BR lvm.conf (5)
diff --git a/man/lvmetad.8.in b/man/lvmetad.8.in
index 4f60249..3ea80c9 100644
--- a/man/lvmetad.8.in
+++ b/man/lvmetad.8.in
@@ -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
diff --git a/scripts/lvmconf.sh b/scripts/lvmconf.sh
index 6c2a167..396f7a1 100644
--- a/scripts/lvmconf.sh
+++ b/scripts/lvmconf.sh
@@ -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
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 1d294dd..861ae82 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -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))
diff --git a/tools/commands.h b/tools/commands.h
index 64c8bf2..df69c2a 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -28,6 +28,31 @@ xx(e2fsadm,
extents_ARG, size_ARG, nofsck_ARG, test_ARG)
*********/
+xx(config,
+ "Display and manipulate configuration information",
+ PERMITTED_READ_ONLY,
+ "config\n"
+ "\t[-f|--file filename]\n"
+ "\t[--type {current|default|diff|missing|new|profilable|profilable-command|profilable-metadata}\n"
+ "\t[--atversion version]]\n"
+ "\t[--ignoreadvanced]\n"
+ "\t[--ignoreunsupported]\n"
+ "\t[--ignorelocal]\n"
+ "\t[--config ConfigurationString]\n"
+ "\t[--commandprofile ProfileName]\n"
+ "\t[--profile ProfileName]\n"
+ "\t[--metadataprofile ProfileName]\n"
+ "\t[--mergedconfig]\n"
+ "\t[--validate]\n"
+ "\t[--withcomments]\n"
+ "\t[--withfullcomments]\n"
+ "\t[--unconfigured]\n"
+ "\t[--withversions]\n"
+ "\t[ConfigurationNode...]\n",
+ atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG,
+ ignoreunsupported_ARG, ignorelocal_ARG, mergedconfig_ARG, metadataprofile_ARG,
+ validate_ARG, withcomments_ARG, withfullcomments_ARG, unconfigured_ARG, withversions_ARG)
+
xx(devtypes,
"Display recognised built-in block device types",
PERMITTED_READ_ONLY,
@@ -55,7 +80,7 @@ xx(devtypes,
unbuffered_ARG, unquoted_ARG)
xx(dumpconfig,
- "Dump configuration",
+ "Display and manipulate configuration information",
PERMITTED_READ_ONLY,
"dumpconfig\n"
"\t[-f|--file filename]\n"
@@ -454,6 +479,31 @@ xx(lvmchange,
reset_ARG)
+xx(lvmconfig,
+ "Display and manipulate configuration information",
+ PERMITTED_READ_ONLY,
+ "lvmconfig\n"
+ "\t[-f|--file filename]\n"
+ "\t[--type {current|default|diff|missing|new|profilable|profilable-command|profilable-metadata}\n"
+ "\t[--atversion version]]\n"
+ "\t[--ignoreadvanced]\n"
+ "\t[--ignoreunsupported]\n"
+ "\t[--ignorelocal]\n"
+ "\t[--config ConfigurationString]\n"
+ "\t[--commandprofile ProfileName]\n"
+ "\t[--profile ProfileName]\n"
+ "\t[--metadataprofile ProfileName]\n"
+ "\t[--mergedconfig]\n"
+ "\t[--validate]\n"
+ "\t[--withcomments]\n"
+ "\t[--withfullcomments]\n"
+ "\t[--unconfigured]\n"
+ "\t[--withversions]\n"
+ "\t[ConfigurationNode...]\n",
+ atversion_ARG, configtype_ARG, file_ARG, ignoreadvanced_ARG,
+ ignoreunsupported_ARG, ignorelocal_ARG, mergedconfig_ARG, metadataprofile_ARG,
+ validate_ARG, withcomments_ARG, withfullcomments_ARG, unconfigured_ARG, withversions_ARG)
+
xx(lvmdiskscan,
"List devices that may be used as physical volumes",
PERMITTED_READ_ONLY | ENABLE_ALL_DEVS,
diff --git a/tools/dumpconfig.c b/tools/dumpconfig.c
index d1b4acc..341bffa 100644
--- a/tools/dumpconfig.c
+++ b/tools/dumpconfig.c
@@ -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);
+}
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 26c48f9..78974df 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -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;
/*
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=beb229e1e8e8b95d…
Commit: beb229e1e8e8b95de09920195c2bc4171e89dc19
Parent: 6cc37275cebdc590f58bbd4e91110fe4d38801ce
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Apr 24 14:58:58 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 28 10:41:32 2015 -0500
devices: improve handling of duplicate PVs
Example:
/dev/loop0 and /dev/loop1 are duplicates,
created by copying one backing file to the
other.
'identity /dev/loopX' creates an identity
mapping for loopX named idmloopX, which
adds a duplicate for the named device.
The duplicate selection code for lvmetad is
incomplete, and lvmetad is disabled for this
example.
[~]# losetup -f loopfile0
[~]# pvs
PV VG Fmt Attr PSize PFree
/dev/loop0 foo lvm2 a-- 308.00m 296.00m
[~]# losetup -f loopfile1
[~]# pvs
Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/loop1 not /dev/loop0
Using duplicate PV /dev/loop1 which is more recent, replacing /dev/loop0
PV VG Fmt Attr PSize PFree
/dev/loop1 foo lvm2 a-- 308.00m 308.00m
[~]# ./identity /dev/loop0
[~]# pvs
Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/loop1 not /dev/loop0
Using duplicate PV /dev/loop1 without holders, replacing /dev/loop0
Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/mapper/idmloop0 not /dev/loop1
Using duplicate PV /dev/mapper/idmloop0 from subsystem DM, replacing /dev/loop1
PV VG Fmt Attr PSize PFree
/dev/mapper/idmloop0 foo lvm2 a-- 308.00m 296.00m
[~]# ./identity /dev/loop1
[~]# pvs
WARNING: duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV is being used from both devices /dev/loop0 and /dev/loop1
Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/loop1 not /dev/loop0
Using duplicate PV /dev/loop1 which is more recent, replacing /dev/loop0
Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/mapper/idmloop0 not /dev/loop1
Using duplicate PV /dev/mapper/idmloop0 from subsystem DM, replacing /dev/loop1
Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/mapper/idmloop1 not /dev/mapper/idmloop0
Using duplicate PV /dev/mapper/idmloop1 which is more recent, replacing /dev/mapper/idmloop0
PV VG Fmt Attr PSize PFree
/dev/mapper/idmloop1 foo lvm2 a-- 308.00m 308.00m
---
lib/cache/lvmcache.c | 248 ++++++++++++++++++++++++++++++++++++++++---------
lib/cache/lvmetad.c | 17 +++-
lib/device/dev-type.c | 3 +
3 files changed, 220 insertions(+), 48 deletions(-)
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index c5f78c8..90e7b28 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1529,6 +1529,64 @@ void lvmcache_replace_dev(struct cmd_context *cmd, struct physical_volume *pv,
pv->dev = dev;
}
+/*
+ * We can see multiple different devices with the
+ * same pvid, i.e. duplicates.
+ *
+ * There may be different reasons for seeing two
+ * devices with the same pvid:
+ * - multipath showing two paths to the same thing
+ * - one device copied to another, e.g. with dd,
+ * also referred to as cloned devices.
+ * - a "subsystem" taking a device and creating
+ * another device of its own that represents the
+ * underlying device it is using, e.g. using dm
+ * to create an identity mapping of a PV.
+ *
+ * Given duplicate devices, we have to choose one
+ * of them to be the "preferred" dev, i.e. the one
+ * that will be referenced in lvmcache, by pv->dev.
+ * We can keep the existing dev, that's currently
+ * used in lvmcache, or we can replace the existing
+ * dev with the new duplicate.
+ *
+ * Regardless of which device is preferred, we need
+ * to print messages explaining which devices were
+ * found so that a user can sort out for themselves
+ * what has happened if the preferred device is not
+ * the one they are interested in.
+ *
+ * If a user wants to use the non-preferred device,
+ * they will need to filter out the device that
+ * lvm is preferring.
+ *
+ * The dev_subsystem calls check if the major number
+ * of the dev is part of a subsystem like DM/MD/DRBD.
+ * A dev that's part of a subsystem is preferred over a
+ * duplicate of that dev that is not part of a
+ * subsystem.
+ *
+ * The has_holders calls check if the device is being
+ * used by another, and prefers one that's being used.
+ *
+ * FIXME: why do we prefer a device without holders
+ * over a device with holders? We should understand
+ * the reason for that choice.
+ *
+ * FIXME: there may be other reasons to prefer one
+ * device over another:
+ *
+ * . are there other use/open counts we could check
+ * beyond the holders?
+ *
+ * . check if either is bad/usable and prefer
+ * the good one?
+ *
+ * . prefer the one with smaller minor number?
+ * Might avoid disturbing things due to a new
+ * transient duplicate?
+ */
+
struct lvmcache_info *lvmcache_add(struct labeller *labeller, const char *pvid,
struct device *dev,
const char *vgname, const char *vgid,
@@ -1576,54 +1634,156 @@ struct lvmcache_info *lvmcache_add(struct labeller *labeller, const char *pvid,
lvmcache_del_bas(info);
} else {
if (existing->dev != dev) {
- /* Is the existing entry a duplicate pvid e.g. md ? */
- if (dev_subsystem_part_major(dt, existing->dev) &&
- !dev_subsystem_part_major(dt, dev)) {
- log_very_verbose("Ignoring duplicate PV %s on "
- "%s - using %s %s",
- pvid, dev_name(dev),
- dev_subsystem_name(dt, existing->dev),
- dev_name(existing->dev));
- return NULL;
- } else if (dm_is_dm_major(MAJOR(existing->dev->dev)) &&
- !dm_is_dm_major(MAJOR(dev->dev))) {
- log_very_verbose("Ignoring duplicate PV %s on "
- "%s - using dm %s",
- pvid, dev_name(dev),
- dev_name(existing->dev));
+ int old_in_subsystem = 0;
+ int new_in_subsystem = 0;
+ int old_is_dm = 0;
+ int new_is_dm = 0;
+ int old_has_holders = 0;
+ int new_has_holders = 0;
+
+ /*
+ * Here are different devices with the same pvid:
+ * duplicates. See comment above.
+ */
+
+ /*
+ * This flag tells the process_each_pv code to search
+ * the devices list for duplicates, so that devices
+ * can be processed together with their duplicates
+ * (while processing the VG, rather than reporting
+ * pv->dev under the VG, and its duplicate outside
+ * the VG context.)
+ */
+ _found_duplicate_pvs = 1;
+
+ /*
+ * The new dev may not have pvid set.
+ * The process_each_pv code needs to have the pvid
+ * set in each device to detect that the devices
+ * are duplicates.
+ */
+ strncpy(dev->pvid, pvid_s, sizeof(dev->pvid));
+
+ /*
+ * Now decide if we are going to ignore the new
+ * device, or replace the existing/old device in
+ * lvmcache with the new one.
+ */
+ old_in_subsystem = dev_subsystem_part_major(dt, existing->dev);
+ new_in_subsystem = dev_subsystem_part_major(dt, dev);
+
+ old_is_dm = dm_is_dm_major(MAJOR(existing->dev->dev));
+ new_is_dm = dm_is_dm_major(MAJOR(dev->dev));
+
+ old_has_holders = dm_device_has_holders(MAJOR(existing->dev->dev), MINOR(existing->dev->dev));
+ new_has_holders = dm_device_has_holders(MAJOR(dev->dev), MINOR(dev->dev));
+
+ if (old_has_holders && new_has_holders) {
+ /*
+ * This is not a selection of old or new, but
+ * just a warning to be aware of.
+ */
+ log_warn("WARNING: duplicate PV %s is being used from both devices %s and %s",
+ pvid_s,
+ dev_name(existing->dev),
+ dev_name(dev));
+ }
+
+ if (old_in_subsystem && !new_in_subsystem) {
+ /* Use old, ignore new. */
+ log_warn("Found duplicate PV %s: using %s not %s",
+ pvid_s,
+ dev_name(existing->dev),
+ dev_name(dev));
+ log_warn("Using duplicate PV %s from subsystem %s, ignoring %s",
+ dev_name(existing->dev),
+ dev_subsystem_name(dt, existing->dev),
+ dev_name(dev));
return NULL;
- } else if (!dev_subsystem_part_major(dt, existing->dev) &&
- dev_subsystem_part_major(dt, dev))
- log_very_verbose("Duplicate PV %s on %s - "
- "using %s %s", pvid,
- dev_name(existing->dev),
- dev_subsystem_name(dt, existing->dev),
- dev_name(dev));
- else if (!dm_is_dm_major(MAJOR(existing->dev->dev)) &&
- dm_is_dm_major(MAJOR(dev->dev)))
- log_very_verbose("Duplicate PV %s on %s - "
- "using dm %s", pvid,
- dev_name(existing->dev),
- dev_name(dev));
- /* FIXME If both dm, check dependencies */
- //else if (dm_is_dm_major(MAJOR(existing->dev->dev)) &&
- //dm_is_dm_major(MAJOR(dev->dev)))
- //
- else if (!strcmp(pvid_s, existing->dev->pvid)) {
- log_error("Found duplicate PV %s: using %s not %s",
- pvid_s,
- dev_name(existing->dev),
- dev_name(dev));
- strncpy(dev->pvid, pvid_s, sizeof(dev->pvid));
- _found_duplicate_pvs = 1;
+
+ } else if (!old_in_subsystem && new_in_subsystem) {
+ /* Use new, replace old. */
+ log_warn("Found duplicate PV %s: using %s not %s",
+ pvid_s,
+ dev_name(dev),
+ dev_name(existing->dev));
+ log_warn("Using duplicate PV %s from subsystem %s, replacing %s",
+ dev_name(dev),
+ dev_subsystem_name(dt, dev),
+ dev_name(existing->dev));
+
+ } else if (old_has_holders && !new_has_holders) {
+ /* Use new, replace old. */
+ /* FIXME: why choose the one without olders? */
+ log_warn("Found duplicate PV %s: using %s not %s",
+ pvid_s,
+ dev_name(dev),
+ dev_name(existing->dev));
+ log_warn("Using duplicate PV %s without holders, replacing %s",
+ dev_name(dev),
+ dev_name(existing->dev));
+
+ } else if (!old_has_holders && new_has_holders) {
+ /* Use old, ignore new. */
+ log_warn("Found duplicate PV %s: using %s not %s",
+ pvid_s,
+ dev_name(existing->dev),
+ dev_name(dev));
+ log_warn("Using duplicate PV %s without holders, ignoring %s",
+ dev_name(existing->dev),
+ dev_name(dev));
return NULL;
+
+ } else if (old_is_dm && new_is_dm) {
+ /* Use new, replace old. */
+ /* FIXME: why choose the new instead of the old? */
+ log_warn("Found duplicate PV %s: using %s not %s",
+ pvid_s,
+ dev_name(dev),
+ dev_name(existing->dev));
+ log_warn("Using duplicate PV %s which is more recent, replacing %s",
+ dev_name(dev),
+ dev_name(existing->dev));
+
+ } else if (!strcmp(pvid_s, existing->dev->pvid)) {
+ /* No criteria to use for preferring old or new. */
+ /* FIXME: why choose the new instead of the old? */
+ /* FIXME: a transient duplicate would be a reason
+ * to select the old instead of the new. */
+ log_warn("Found duplicate PV %s: using %s not %s",
+ pvid_s,
+ dev_name(dev),
+ dev_name(existing->dev));
+ log_warn("Using duplicate PV %s which is more recent, replacing %s",
+ dev_name(dev),
+ dev_name(existing->dev));
}
+ } else {
+ /*
+ * The new dev is the same as the existing dev.
+ *
+ * FIXME: Why can't we just return NULL here if the
+ * device already exists? Things don't seem to work
+ * if we do that for some reason.
+ */
+ log_verbose("Found same device %s with same pvid %s",
+ dev_name(existing->dev), pvid_s);
}
- if (strcmp(pvid_s, existing->dev->pvid))
- log_debug_cache("Updating pvid cache to %s (%s) from %s (%s)",
- pvid_s, dev_name(dev),
- existing->dev->pvid, dev_name(existing->dev));
- /* Switch over to new preferred device */
+
+ /*
+ * FIXME: when could this ever happen?
+ * If this does happen, identify when/why here, and
+ * if not, remove this code.
+ */
+ if (strcmp(pvid_s, existing->dev->pvid)) {
+ log_warn("Replacing dev %s pvid %s with dev %s pvid %s",
+ dev_name(existing->dev), existing->dev->pvid,
+ dev_name(dev), pvid_s);
+ }
+
+ /*
+ * Switch over to new preferred device.
+ */
existing->dev = dev;
info = existing;
/* Has labeller changed? */
diff --git a/lib/cache/lvmetad.c b/lib/cache/lvmetad.c
index 600a6cb..470a7b3 100644
--- a/lib/cache/lvmetad.c
+++ b/lib/cache/lvmetad.c
@@ -366,10 +366,19 @@ static struct lvmcache_info *_pv_populate_lvmcache(struct cmd_context *cmd,
while (alt_device) {
dev_alternate = dev_cache_get_by_devt(alt_device->v.i, cmd->filter);
- if (dev_alternate)
- lvmcache_add(fmt->labeller, (const char *)&pvid, dev_alternate,
- vgname, (const char *)&vgid, 0);
- else
+ if (dev_alternate) {
+ if ((info = lvmcache_add(fmt->labeller, (const char *)&pvid, dev_alternate,
+ vgname, (const char *)&vgid, 0))) {
+ /*
+ * FIXME: when lvmcache_add returns non-NULL,
+ * it means that it has made dev_alternate
+ * the preferred device in lvmcache.
+ * I think that means it should be followed
+ * by the same steps done above?
+ */
+ log_warn("lvmcache only partially updated for alternate device %s", dev_name(dev));
+ }
+ } else
log_warn("Duplicate of PV %s dev %s exists on unknown device %"PRId64 ":%" PRId64,
pvid_txt, dev_name(dev), MAJOR(alt_device->v.i), MINOR(alt_device->v.i));
alt_device = alt_device->next;
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index d3407d1..5a4c658 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -225,6 +225,9 @@ int dev_subsystem_part_major(struct dev_types *dt, struct device *dev)
const char *dev_subsystem_name(struct dev_types *dt, struct device *dev)
{
+ if (MAJOR(dev->dev) == dt->device_mapper_major)
+ return "DM";
+
if (MAJOR(dev->dev) == dt->md_major)
return "MD";
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6cc37275cebdc590…
Commit: 6cc37275cebdc590f58bbd4e91110fe4d38801ce
Parent: ae0014e2dfd84b2348c7c8dd57f83159c79fda85
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Apr 28 10:06:23 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 28 10:06:23 2015 -0500
config: improve the description of options lists
Describe
thin_check_options, thin_repair_options,
cache_check_option, scache_repair_options
as a "list of options", rather than a "string of options"
because a single string, e.g. "-q --clear-needs-check-flag"
does not work, and needs to be entered as a list,
e.g. ["-q", "--clear-needs-check-flag"]
---
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 76b040b..e97ada5 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -813,7 +813,7 @@ cfg(global_thin_repair_executable_CFG, "thin_repair_executable", global_CFG_SECT
"(For thin tools, see thin_check_executable.)\n")
cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_THIN_CHECK_OPTION1 "#S" DEFAULT_THIN_CHECK_OPTION2, vsn(2, 2, 96), NULL,
- "String of options passed to the thin_check command.\n"
+ "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"
"ignorable errors and fix them later.\n"
@@ -821,7 +821,7 @@ cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTIO
"--clear-needs-check-flag.\n")
cfg_array(global_thin_repair_options_CFG, "thin_repair_options", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, "#S" DEFAULT_THIN_REPAIR_OPTIONS, vsn(2, 2, 100), NULL,
- "String of options passed to the thin_repair command.\n")
+ "List of options passed to the thin_repair command.\n")
cfg_array(global_thin_disabled_features_CFG, "thin_disabled_features", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_ALLOW_EMPTY, CFG_TYPE_STRING, NULL, vsn(2, 2, 99), NULL,
"Features to not use in the thin driver.\n"
@@ -858,10 +858,10 @@ cfg(global_cache_repair_executable_CFG, "cache_repair_executable", global_CFG_SE
"(For cache tools, see cache_check_executable.)\n")
cfg_array(global_cache_check_options_CFG, "cache_check_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_CHECK_OPTION1, vsn(2, 2, 108), NULL,
- "String of options passed to the cache_check command.\n")
+ "List of options passed to the cache_check command.\n")
cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_REPAIR_OPTIONS, vsn(2, 2, 108), NULL,
- "String of options passed to the cache_repair command.\n")
+ "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,
"The method LVM uses to set the local system ID.\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0c1bda9b53d1935a…
Commit: 0c1bda9b53d1935a6eadea579061c323366c8e61
Parent: cfb0174fed25cb6a27a5ff3554b5c442d2defcc9
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Apr 27 14:15:24 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Apr 27 14:15:24 2015 -0500
example.conf.in: regenerate
>From recent config_settings.h changes.
---
conf/example.conf.in | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index eedefb5..5354779 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -144,7 +144,7 @@ devices {
# global_filter=[]
# Configuration option devices/cache.
- # This has been replaced by the devices/cache_dir setting.
+ # The path can be set using the devices/cache_dir setting.
cache="/etc/lvm/cache/.cache"
# Configuration option devices/cache_dir.
@@ -540,7 +540,7 @@ backup {
# Configuration option backup/archive_dir.
# Location of the metdata archive files.
# Remember to back up this directory regularly!
- archive_dir="/etc/lvm/archive"
+ archive_dir="@DEFAULT_SYS_DIR@/@DEFAULT_ARCHIVE_SUBDIR@"
# Configuration option backup/retain_min.
# Minimum number of archives to keep.
@@ -863,7 +863,7 @@ 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", "--clear-needs-check-flag"]
# Configuration option global/thin_repair_options.
# String of options passed to the thin_repair command.
@@ -879,7 +879,8 @@ global {
# error_if_no_space.
# Example:
# thin_disabled_features = [ "discards", "block_size" ]
- thin_disabled_features=[]
+ # This configuration option does not have a default value defined.
+# thin_disabled_features=[]
# Configuration option global/cache_check_executable.
# The full path to the cache_check command.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cfb0174fed25cb6a…
Commit: cfb0174fed25cb6a27a5ff3554b5c442d2defcc9
Parent: a7d28639eb4a2cd5adbf5b14b07702ba4d84593c
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Apr 27 13:17:15 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Apr 27 13:54:45 2015 -0500
config: fix a couple mistakes with defaults
for archive, archive_dir, and cache
---
lib/config/config_settings.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 742fa19..dcbc332 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -222,7 +222,7 @@ cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_D
"Devices rejected by global_filter are not opened by LVM.\n")
cfg_runtime(devices_cache_CFG, "cache", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0), NULL,
- "This has been replaced by the devices/cache_dir setting.\n")
+ "The path can be set using the devices/cache_dir setting.\n")
cfg_runtime(devices_cache_dir_CFG, "cache_dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 2, 19), "@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@",
"Directory in which to store the device cache file.\n"
@@ -537,11 +537,11 @@ cfg_runtime(backup_backup_dir_CFG, "backup_dir", backup_CFG_SECTION, 0, CFG_TYPE
"Location of the metadata backup files.\n"
"Remember to back up this directory regularly!\n")
-cfg(backup_archive_CFG, "archive", backup_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ARCHIVE_ENABLED, vsn(1, 0, 0), "@DEFAULT_SYS_DIR@/@DEFAULT_ARCHIVE_SUBDIR@",
+cfg(backup_archive_CFG, "archive", backup_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ARCHIVE_ENABLED, vsn(1, 0, 0), NULL,
"Maintain an archive of old metadata configurations.\n"
"Think very hard before turning this off.\n")
-cfg_runtime(backup_archive_dir_CFG, "archive_dir", backup_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0), NULL,
+cfg_runtime(backup_archive_dir_CFG, "archive_dir", backup_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0), "@DEFAULT_SYS_DIR@/@DEFAULT_ARCHIVE_SUBDIR@",
"Location of the metdata archive files.\n"
"Remember to back up this directory regularly!\n")
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d7888e83169ac1a7…
Commit: d7888e83169ac1a7a962ffd66502995792879244
Parent: 066d0a4e1949afac055a7dc92bedd0f45f519124
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Apr 24 11:12:55 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Apr 25 00:39:43 2015 +0200
tests: try more advanced clean
When test is executed on real device - lets try a more complete
cleanup - discard whole device first and try to wipe any
headers it might be left from previous test.
---
test/lib/aux.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 4e6961a..cc3718c 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -431,7 +431,8 @@ prepare_devs() {
# non-ephemeral devices need to be cleared between tests
test -f LOOP || for d in ${DEVICES[@]}; do
- dd if=/dev/zero of=$d bs=64K count=1
+ blkdiscard "$d" 2>/dev/null || true
+ wipefs -a "$d" 2>/dev/null || dd if=/dev/zero of="$d" bs=64K count=1
done
#for i in `seq 1 $n`; do
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=81d03b46b01de3f0…
Commit: 81d03b46b01de3f082e4dcd0eb9993c64be0686e
Parent: 2fea7208810ace2b4ab08408d12ab5e728f498b0
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Wed Apr 22 15:34:25 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Wed Apr 22 15:34:25 2015 +0100
doc: Update dm kernel files.
v4.0-9804-gdb4fd9c
---
doc/kernel/cache-policies.txt | 38 ++++++--
doc/kernel/cache.txt | 129 +++++++++++++++++++--------
doc/kernel/crypt.txt | 28 +++++-
doc/kernel/era.txt | 108 ++++++++++++++++++++++
doc/kernel/log-writes.txt | 140 ++++++++++++++++++++++++++++
doc/kernel/raid.txt | 2 +
doc/kernel/statistics.txt | 186 ++++++++++++++++++++++++++++++++++++++
doc/kernel/switch.txt | 138 ++++++++++++++++++++++++++++
doc/kernel/thin-provisioning.txt | 62 ++++++++++---
doc/kernel/verity.txt | 21 ++++-
10 files changed, 787 insertions(+), 65 deletions(-)
diff --git a/doc/kernel/cache-policies.txt b/doc/kernel/cache-policies.txt
index d7c440b..0d124a9 100644
--- a/doc/kernel/cache-policies.txt
+++ b/doc/kernel/cache-policies.txt
@@ -30,28 +30,48 @@ multiqueue
This policy is the default.
-The multiqueue policy has two sets of 16 queues: one set for entries
-waiting for the cache and another one for those in the cache.
+The multiqueue policy has three sets of 16 queues: one set for entries
+waiting for the cache and another two for those in the cache (a set for
+clean entries and a set for dirty entries).
+
Cache entries in the queues are aged based on logical time. Entry into
the cache is based on variable thresholds and queue selection is based
on hit count on entry. The policy aims to take different cache miss
costs into account and to adjust to varying load patterns automatically.
Message and constructor argument pairs are:
- 'sequential_threshold <#nr_sequential_ios>' and
- 'random_threshold <#nr_random_ios>'.
+ 'sequential_threshold <#nr_sequential_ios>'
+ 'random_threshold <#nr_random_ios>'
+ 'read_promote_adjustment <value>'
+ 'write_promote_adjustment <value>'
+ 'discard_promote_adjustment <value>'
The sequential threshold indicates the number of contiguous I/Os
-required before a stream is treated as sequential. The random threshold
+required before a stream is treated as sequential. Once a stream is
+considered sequential it will bypass the cache. The random threshold
is the number of intervening non-contiguous I/Os that must be seen
before the stream is treated as random again.
The sequential and random thresholds default to 512 and 4 respectively.
-Large, sequential ios are probably better left on the origin device
-since spindles tend to have good bandwidth. The io_tracker counts
-contiguous I/Os to try to spot when the io is in one of these sequential
-modes.
+Large, sequential I/Os are probably better left on the origin device
+since spindles tend to have good sequential I/O bandwidth. The
+io_tracker counts contiguous I/Os to try to spot when the I/O is in one
+of these sequential modes. But there are use-cases for wanting to
+promote sequential blocks to the cache (e.g. fast application startup).
+If sequential threshold is set to 0 the sequential I/O detection is
+disabled and sequential I/O will no longer implicitly bypass the cache.
+Setting the random threshold to 0 does _not_ disable the random I/O
+stream detection.
+
+Internally the mq policy determines a promotion threshold. If the hit
+count of a block not in the cache goes above this threshold it gets
+promoted to the cache. The read, write and discard promote adjustment
+tunables allow you to tweak the promotion threshold by adding a small
+value based on the io type. They default to 4, 8 and 1 respectively.
+If you're trying to quickly warm a new cache device you may wish to
+reduce these to encourage promotion. Remember to switch them back to
+their defaults after the cache fills though.
cleaner
-------
diff --git a/doc/kernel/cache.txt b/doc/kernel/cache.txt
index f50470a..68c0f51 100644
--- a/doc/kernel/cache.txt
+++ b/doc/kernel/cache.txt
@@ -50,14 +50,16 @@ other parameters detailed later):
which are dirty, and extra hints for use by the policy object.
This information could be put on the cache device, but having it
separate allows the volume manager to configure it differently,
- e.g. as a mirror for extra robustness.
+ e.g. as a mirror for extra robustness. This metadata device may only
+ be used by a single cache device.
Fixed block size
----------------
The origin is divided up into blocks of a fixed size. This block size
is configurable when you first create the cache. Typically we've been
-using block sizes of 256k - 1024k.
+using block sizes of 256KB - 1024KB. The block size must be between 64
+(32KB) and 2097152 (1GB) and a multiple of 64 (32KB).
Having a fixed block size simplifies the target a lot. But it is
something of a compromise. For instance, a small part of a block may be
@@ -66,10 +68,11 @@ So large block sizes are bad because they waste cache space. And small
block sizes are bad because they increase the amount of metadata (both
in core and on disk).
-Writeback/writethrough
-----------------------
+Cache operating modes
+---------------------
-The cache has two modes, writeback and writethrough.
+The cache has three operating modes: writeback, writethrough and
+passthrough.
If writeback, the default, is selected then a write to a block that is
cached will go only to the cache and the block will be marked dirty in
@@ -79,15 +82,38 @@ If writethrough is selected then a write to a cached block will not
complete until it has hit both the origin and cache devices. Clean
blocks should remain clean.
+If passthrough is selected, useful when the cache contents are not known
+to be coherent with the origin device, then all reads are served from
+the origin device (all reads miss the cache) and all writes are
+forwarded to the origin device; additionally, write hits cause cache
+block invalidates. To enable passthrough mode the cache must be clean.
+Passthrough mode allows a cache device to be activated without having to
+worry about coherency. Coherency that exists is maintained, although
+the cache will gradually cool as writes take place. If the coherency of
+the cache can later be verified, or established through use of the
+"invalidate_cblocks" message, the cache device can be transitioned to
+writethrough or writeback mode while still warm. Otherwise, the cache
+contents can be discarded prior to transitioning to the desired
+operating mode.
+
A simple cleaner policy is provided, which will clean (write back) all
-dirty blocks in a cache. Useful for decommissioning a cache.
+dirty blocks in a cache. Useful for decommissioning a cache or when
+shrinking a cache. Shrinking the cache's fast device requires all cache
+blocks, in the area of the cache being removed, to be clean. If the
+area being removed from the cache still contains dirty blocks the resize
+will fail. Care must be taken to never reduce the volume used for the
+cache's fast device until the cache is clean. This is of particular
+importance if writeback mode is used. Writethrough and passthrough
+modes already maintain a clean cache. Future support to partially clean
+the cache, above a specified threshold, will allow for keeping the cache
+warm and in writeback mode during resize.
Migration throttling
--------------------
Migrating data between the origin and cache device uses bandwidth.
The user can set a throttle to prevent more than a certain amount of
-migration occuring at any one time. Currently we're not taking any
+migration occurring at any one time. Currently we're not taking any
account of normal io traffic going to the devices. More work needs
doing here to avoid migrating during those peak io moments.
@@ -98,12 +124,11 @@ the default being 204800 sectors (or 100MB).
Updating on-disk metadata
-------------------------
-On-disk metadata is committed every time a REQ_SYNC or REQ_FUA bio is
-written. If no such requests are made then commits will occur every
-second. This means the cache behaves like a physical disk that has a
-write cache (the same is true of the thin-provisioning target). If
-power is lost you may lose some recent writes. The metadata should
-always be consistent in spite of any crash.
+On-disk metadata is committed every time a FLUSH or FUA bio is written.
+If no such requests are made then commits will occur every second. This
+means the cache behaves like a physical disk that has a volatile write
+cache. If power is lost you may lose some recent writes. The metadata
+should always be consistent in spite of any crash.
The 'dirty' state for a cache block changes far too frequently for us
to keep updating it on the fly. So we treat it as a hint. In normal
@@ -159,7 +184,7 @@ Constructor
block size : cache unit size in sectors
#feature args : number of feature arguments passed
- feature args : writethrough. (The default is writeback.)
+ feature args : writethrough or passthrough (The default is writeback.)
policy : the replacement policy to use
#policy args : an even number of arguments corresponding to
@@ -175,6 +200,13 @@ Optional feature arguments are:
back cache block contents later for performance reasons,
so they may differ from the corresponding origin blocks.
+ passthrough : a degraded mode useful for various cache coherency
+ situations (e.g., rolling back snapshots of
+ underlying storage). Reads and writes always go to
+ the origin. If a write goes to a cached origin
+ block, then the cache block is invalidated.
+ To enable passthrough mode the cache must be clean.
+
A policy called 'default' is always registered. This is an alias for
the policy we currently think is giving best all round performance.
@@ -184,36 +216,43 @@ the characteristics of a specific policy, always request it by name.
Status
------
-<#used metadata blocks>/<#total metadata blocks> <#read hits> <#read misses>
-<#write hits> <#write misses> <#demotions> <#promotions> <#blocks in cache>
-<#dirty> <#features> <features>* <#core args> <core args>* <#policy args>
-<policy args>*
-
-#used metadata blocks : Number of metadata blocks used
-#total metadata blocks : Total number of metadata blocks
-#read hits : Number of times a READ bio has been mapped
+<metadata block size> <#used metadata blocks>/<#total metadata blocks>
+<cache block size> <#used cache blocks>/<#total cache blocks>
+<#read hits> <#read misses> <#write hits> <#write misses>
+<#demotions> <#promotions> <#dirty> <#features> <features>*
+<#core args> <core args>* <policy name> <#policy args> <policy args>*
+
+metadata block size : Fixed block size for each metadata block in
+ sectors
+#used metadata blocks : Number of metadata blocks used
+#total metadata blocks : Total number of metadata blocks
+cache block size : Configurable block size for the cache device
+ in sectors
+#used cache blocks : Number of blocks resident in the cache
+#total cache blocks : Total number of cache blocks
+#read hits : Number of times a READ bio has been mapped
to the cache
-#read misses : Number of times a READ bio has been mapped
+#read misses : Number of times a READ bio has been mapped
to the origin
-#write hits : Number of times a WRITE bio has been mapped
+#write hits : Number of times a WRITE bio has been mapped
to the cache
-#write misses : Number of times a WRITE bio has been
+#write misses : Number of times a WRITE bio has been
mapped to the origin
-#demotions : Number of times a block has been removed
+#demotions : Number of times a block has been removed
from the cache
-#promotions : Number of times a block has been moved to
+#promotions : Number of times a block has been moved to
the cache
-#blocks in cache : Number of blocks resident in the cache
-#dirty : Number of blocks in the cache that differ
+#dirty : Number of blocks in the cache that differ
from the origin
-#feature args : Number of feature args to follow
-feature args : 'writethrough' (optional)
-#core args : Number of core arguments (must be even)
-core args : Key/value pairs for tuning the core
+#feature args : Number of feature args to follow
+feature args : 'writethrough' (optional)
+#core args : Number of core arguments (must be even)
+core args : Key/value pairs for tuning the core
e.g. migration_threshold
-#policy args : Number of policy arguments to follow (must be even)
-policy args : Key/value pairs
- e.g. 'sequential_threshold 1024
+policy name : Name of the policy
+#policy args : Number of policy arguments to follow (must be even)
+policy args : Key/value pairs
+ e.g. sequential_threshold
Messages
--------
@@ -229,12 +268,28 @@ The message format is:
E.g.
dmsetup message my_cache 0 sequential_threshold 1024
+
+Invalidation is removing an entry from the cache without writing it
+back. Cache blocks can be invalidated via the invalidate_cblocks
+message, which takes an arbitrary number of cblock ranges. Each cblock
+range's end value is "one past the end", meaning 5-10 expresses a range
+of values from 5 to 9. Each cblock must be expressed as a decimal
+value, in the future a variant message that takes cblock ranges
+expressed in hexidecimal may be needed to better support efficient
+invalidation of larger caches. The cache must be in passthrough mode
+when invalidate_cblocks is used.
+
+ invalidate_cblocks [<cblock>|<cblock begin>-<cblock end>]*
+
+E.g.
+ dmsetup message my_cache 0 invalidate_cblocks 2345 3456-4567 5678-6789
+
Examples
========
The test suite can be found here:
-https://github.com/jthornber/thinp-test-suite
+https://github.com/jthornber/device-mapper-test-suite
dmsetup create my_cache --table '0 41943040 cache /dev/mapper/metadata \
/dev/mapper/ssd /dev/mapper/origin 512 1 writeback default 0'
diff --git a/doc/kernel/crypt.txt b/doc/kernel/crypt.txt
index 2c656ae..692171f 100644
--- a/doc/kernel/crypt.txt
+++ b/doc/kernel/crypt.txt
@@ -4,12 +4,15 @@ dm-crypt
Device-Mapper's "crypt" target provides transparent encryption of block devices
using the kernel crypto API.
+For a more detailed description of supported parameters see:
+https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt
+
Parameters: <cipher> <key> <iv_offset> <device path> \
<offset> [<#opt_params> <opt_params>]
<cipher>
Encryption cipher and an optional IV generation mode.
- (In format cipher[:keycount]-chainmode-ivopts:ivmode).
+ (In format cipher[:keycount]-chainmode-ivmode[:ivopts]).
Examples:
des
aes-cbc-essiv:sha256
@@ -19,7 +22,11 @@ Parameters: <cipher> <key> <iv_offset> <device path> \
<key>
Key used for encryption. It is encoded as a hexadecimal number.
- You can only use key sizes that are valid for the selected cipher.
+ You can only use key sizes that are valid for the selected cipher
+ in combination with the selected iv mode.
+ Note that for some iv modes the key string can contain additional
+ keys (for example IV seed) so the key contains more parts concatenated
+ into a single string.
<keycount>
Multi-key compatibility mode. You can define <keycount> keys and
@@ -44,7 +51,7 @@ Parameters: <cipher> <key> <iv_offset> <device path> \
Otherwise #opt_params is the number of following arguments.
Example of optional parameters section:
- 1 allow_discards
+ 3 allow_discards same_cpu_crypt submit_from_crypt_cpus
allow_discards
Block discard requests (a.k.a. TRIM) are passed through the crypt device.
@@ -56,11 +63,24 @@ allow_discards
used space etc.) if the discarded blocks can be located easily on the
device later.
+same_cpu_crypt
+ Perform encryption using the same cpu that IO was submitted on.
+ The default is to use an unbound workqueue so that encryption work
+ is automatically balanced between available CPUs.
+
+submit_from_crypt_cpus
+ Disable offloading writes to a separate thread after encryption.
+ There are some situations where offloading write bios from the
+ encryption threads to a single thread degrades performance
+ significantly. The default is to offload write bios to the same
+ thread because it benefits CFQ to have writes submitted using the
+ same context.
+
Example scripts
===============
LUKS (Linux Unified Key Setup) is now the preferred way to set up disk
encryption with dm-crypt using the 'cryptsetup' utility, see
-http://code.google.com/p/cryptsetup/
+https://gitlab.com/cryptsetup/cryptsetup
[[
#!/bin/sh
diff --git a/doc/kernel/era.txt b/doc/kernel/era.txt
new file mode 100644
index 0000000..3c6d01b
--- /dev/null
+++ b/doc/kernel/era.txt
@@ -0,0 +1,108 @@
+Introduction
+============
+
+dm-era is a target that behaves similar to the linear target. In
+addition it keeps track of which blocks were written within a user
+defined period of time called an 'era'. Each era target instance
+maintains the current era as a monotonically increasing 32-bit
+counter.
+
+Use cases include tracking changed blocks for backup software, and
+partially invalidating the contents of a cache to restore cache
+coherency after rolling back a vendor snapshot.
+
+Constructor
+===========
+
+ era <metadata dev> <origin dev> <block size>
+
+ metadata dev : fast device holding the persistent metadata
+ origin dev : device holding data blocks that may change
+ block size : block size of origin data device, granularity that is
+ tracked by the target
+
+Messages
+========
+
+None of the dm messages take any arguments.
+
+checkpoint
+----------
+
+Possibly move to a new era. You shouldn't assume the era has
+incremented. After sending this message, you should check the
+current era via the status line.
+
+take_metadata_snap
+------------------
+
+Create a clone of the metadata, to allow a userland process to read it.
+
+drop_metadata_snap
+------------------
+
+Drop the metadata snapshot.
+
+Status
+======
+
+<metadata block size> <#used metadata blocks>/<#total metadata blocks>
+<current era> <held metadata root | '-'>
+
+metadata block size : Fixed block size for each metadata block in
+ sectors
+#used metadata blocks : Number of metadata blocks used
+#total metadata blocks : Total number of metadata blocks
+current era : The current era
+held metadata root : The location, in blocks, of the metadata root
+ that has been 'held' for userspace read
+ access. '-' indicates there is no held root
+
+Detailed use case
+=================
+
+The scenario of invalidating a cache when rolling back a vendor
+snapshot was the primary use case when developing this target:
+
+Taking a vendor snapshot
+------------------------
+
+- Send a checkpoint message to the era target
+- Make a note of the current era in its status line
+- Take vendor snapshot (the era and snapshot should be forever
+ associated now).
+
+Rolling back to an vendor snapshot
+----------------------------------
+
+- Cache enters passthrough mode (see: dm-cache's docs in cache.txt)
+- Rollback vendor storage
+- Take metadata snapshot
+- Ascertain which blocks have been written since the snapshot was taken
+ by checking each block's era
+- Invalidate those blocks in the caching software
+- Cache returns to writeback/writethrough mode
+
+Memory usage
+============
+
+The target uses a bitset to record writes in the current era. It also
+has a spare bitset ready for switching over to a new era. Other than
+that it uses a few 4k blocks for updating metadata.
+
+ (4 * nr_blocks) bytes + buffers
+
+Resilience
+==========
+
+Metadata is updated on disk before a write to a previously unwritten
+block is performed. As such dm-era should not be effected by a hard
+crash such as power failure.
+
+Userland tools
+==============
+
+Userland tools are found in the increasingly poorly named
+thin-provisioning-tools project:
+
+ https://github.com/jthornber/thin-provisioning-tools
diff --git a/doc/kernel/log-writes.txt b/doc/kernel/log-writes.txt
new file mode 100644
index 0000000..c10f30c
--- /dev/null
+++ b/doc/kernel/log-writes.txt
@@ -0,0 +1,140 @@
+dm-log-writes
+=============
+
+This target takes 2 devices, one to pass all IO to normally, and one to log all
+of the write operations to. This is intended for file system developers wishing
+to verify the integrity of metadata or data as the file system is written to.
+There is a log_write_entry written for every WRITE request and the target is
+able to take arbitrary data from userspace to insert into the log. The data
+that is in the WRITE requests is copied into the log to make the replay happen
+exactly as it happened originally.
+
+Log Ordering
+============
+
+We log things in order of completion once we are sure the write is no longer in
+cache. This means that normal WRITE requests are not actually logged until the
+next REQ_FLUSH request. This is to make it easier for userspace to replay the
+log in a way that correlates to what is on disk and not what is in cache, to
+make it easier to detect improper waiting/flushing.
+
+This works by attaching all WRITE requests to a list once the write completes.
+Once we see a REQ_FLUSH request we splice this list onto the request and once
+the FLUSH request completes we log all of the WRITEs and then the FLUSH. Only
+completed WRITEs, at the time the REQ_FLUSH is issued, are added in order to
+simulate the worst case scenario with regard to power failures. Consider the
+following example (W means write, C means complete):
+
+W1,W2,W3,C3,C2,Wflush,C1,Cflush
+
+The log would show the following
+
+W3,W2,flush,W1....
+
+Again this is to simulate what is actually on disk, this allows us to detect
+cases where a power failure at a particular point in time would create an
+inconsistent file system.
+
+Any REQ_FUA requests bypass this flushing mechanism and are logged as soon as
+they complete as those requests will obviously bypass the device cache.
+
+Any REQ_DISCARD requests are treated like WRITE requests. Otherwise we would
+have all the DISCARD requests, and then the WRITE requests and then the FLUSH
+request. Consider the following example:
+
+WRITE block 1, DISCARD block 1, FLUSH
+
+If we logged DISCARD when it completed, the replay would look like this
+
+DISCARD 1, WRITE 1, FLUSH
+
+which isn't quite what happened and wouldn't be caught during the log replay.
+
+Target interface
+================
+
+i) Constructor
+
+ log-writes <dev_path> <log_dev_path>
+
+ dev_path : Device that all of the IO will go to normally.
+ log_dev_path : Device where the log entries are written to.
+
+ii) Status
+
+ <#logged entries> <highest allocated sector>
+
+ #logged entries : Number of logged entries
+ highest allocated sector : Highest allocated sector
+
+iii) Messages
+
+ mark <description>
+
+ You can use a dmsetup message to set an arbitrary mark in a log.
+ For example say you want to fsck a file system after every
+ write, but first you need to replay up to the mkfs to make sure
+ we're fsck'ing something reasonable, you would do something like
+ this:
+
+ mkfs.btrfs -f /dev/mapper/log
+ dmsetup message log 0 mark mkfs
+ <run test>
+
+ This would allow you to replay the log up to the mkfs mark and
+ then replay from that point on doing the fsck check in the
+ interval that you want.
+
+ Every log has a mark at the end labeled "dm-log-writes-end".
+
+Userspace component
+===================
+
+There is a userspace tool that will replay the log for you in various ways.
+It can be found here: https://github.com/josefbacik/log-writes
+
+Example usage
+=============
+
+Say you want to test fsync on your file system. You would do something like
+this:
+
+TABLE="0 $(blockdev --getsz /dev/sdb) log-writes /dev/sdb /dev/sdc"
+dmsetup create log --table "$TABLE"
+mkfs.btrfs -f /dev/mapper/log
+dmsetup message log 0 mark mkfs
+
+mount /dev/mapper/log /mnt/btrfs-test
+<some test that does fsync at the end>
+dmsetup message log 0 mark fsync
+md5sum /mnt/btrfs-test/foo
+umount /mnt/btrfs-test
+
+dmsetup remove log
+replay-log --log /dev/sdc --replay /dev/sdb --end-mark fsync
+mount /dev/sdb /mnt/btrfs-test
+md5sum /mnt/btrfs-test/foo
+<verify md5sum's are correct>
+
+Another option is to do a complicated file system operation and verify the file
+system is consistent during the entire operation. You could do this with:
+
+TABLE="0 $(blockdev --getsz /dev/sdb) log-writes /dev/sdb /dev/sdc"
+dmsetup create log --table "$TABLE"
+mkfs.btrfs -f /dev/mapper/log
+dmsetup message log 0 mark mkfs
+
+mount /dev/mapper/log /mnt/btrfs-test
+<fsstress to dirty the fs>
+btrfs filesystem balance /mnt/btrfs-test
+umount /mnt/btrfs-test
+dmsetup remove log
+
+replay-log --log /dev/sdc --replay /dev/sdb --end-mark mkfs
+btrfsck /dev/sdb
+replay-log --log /dev/sdc --replay /dev/sdb --start-mark mkfs \
+ --fsck "btrfsck /dev/sdb" --check fua
+
+And that will replay the log until it sees a FUA request, run the fsck command
+and if the fsck passes it will replay to the next FUA, until it is completed or
+the fsck command exists abnormally.
diff --git a/doc/kernel/raid.txt b/doc/kernel/raid.txt
index e919228..ef8ba9f 100644
--- a/doc/kernel/raid.txt
+++ b/doc/kernel/raid.txt
@@ -222,3 +222,5 @@ Version History
1.4.2 Add RAID10 "far" and "offset" algorithm support.
1.5.0 Add message interface to allow manipulation of the sync_action.
New status (STATUSTYPE_INFO) fields: sync_action and mismatch_cnt.
+1.5.1 Add ability to restore transiently failed devices on resume.
+1.5.2 'mismatch_cnt' is zero unless [last_]sync_action is "check".
diff --git a/doc/kernel/statistics.txt b/doc/kernel/statistics.txt
new file mode 100644
index 0000000..2a1673a
--- /dev/null
+++ b/doc/kernel/statistics.txt
@@ -0,0 +1,186 @@
+DM statistics
+=============
+
+Device Mapper supports the collection of I/O statistics on user-defined
+regions of a DM device. If no regions are defined no statistics are
+collected so there isn't any performance impact. Only bio-based DM
+devices are currently supported.
+
+Each user-defined region specifies a starting sector, length and step.
+Individual statistics will be collected for each step-sized area within
+the range specified.
+
+The I/O statistics counters for each step-sized area of a region are
+in the same format as /sys/block/*/stat or /proc/diskstats (see:
+Documentation/iostats.txt). But two extra counters (12 and 13) are
+provided: total time spent reading and writing in milliseconds. All
+these counters may be accessed by sending the @stats_print message to
+the appropriate DM device via dmsetup.
+
+Each region has a corresponding unique identifier, which we call a
+region_id, that is assigned when the region is created. The region_id
+must be supplied when querying statistics about the region, deleting the
+region, etc. Unique region_ids enable multiple userspace programs to
+request and process statistics for the same DM device without stepping
+on each other's data.
+
+The creation of DM statistics will allocate memory via kmalloc or
+fallback to using vmalloc space. At most, 1/4 of the overall system
+memory may be allocated by DM statistics. The admin can see how much
+memory is used by reading
+/sys/module/dm_mod/parameters/stats_current_allocated_bytes
+
+Messages
+========
+
+ @stats_create <range> <step> [<program_id> [<aux_data>]]
+
+ Create a new region and return the region_id.
+
+ <range>
+ "-" - whole device
+ "<start_sector>+<length>" - a range of <length> 512-byte sectors
+ starting with <start_sector>.
+
+ <step>
+ "<area_size>" - the range is subdivided into areas each containing
+ <area_size> sectors.
+ "/<number_of_areas>" - the range is subdivided into the specified
+ number of areas.
+
+ <program_id>
+ An optional parameter. A name that uniquely identifies
+ the userspace owner of the range. This groups ranges together
+ so that userspace programs can identify the ranges they
+ created and ignore those created by others.
+ The kernel returns this string back in the output of
+ @stats_list message, but it doesn't use it for anything else.
+
+ <aux_data>
+ An optional parameter. A word that provides auxiliary data
+ that is useful to the client program that created the range.
+ The kernel returns this string back in the output of
+ @stats_list message, but it doesn't use this value for anything.
+
+ @stats_delete <region_id>
+
+ Delete the region with the specified id.
+
+ <region_id>
+ region_id returned from @stats_create
+
+ @stats_clear <region_id>
+
+ Clear all the counters except the in-flight i/o counters.
+
+ <region_id>
+ region_id returned from @stats_create
+
+ @stats_list [<program_id>]
+
+ List all regions registered with @stats_create.
+
+ <program_id>
+ An optional parameter.
+ If this parameter is specified, only matching regions
+ are returned.
+ If it is not specified, all regions are returned.
+
+ Output format:
+ <region_id>: <start_sector>+<length> <step> <program_id> <aux_data>
+
+ @stats_print <region_id> [<starting_line> <number_of_lines>]
+
+ Print counters for each step-sized area of a region.
+
+ <region_id>
+ region_id returned from @stats_create
+
+ <starting_line>
+ The index of the starting line in the output.
+ If omitted, all lines are returned.
+
+ <number_of_lines>
+ The number of lines to include in the output.
+ If omitted, all lines are returned.
+
+ Output format for each step-sized area of a region:
+
+ <start_sector>+<length> counters
+
+ The first 11 counters have the same meaning as
+ /sys/block/*/stat or /proc/diskstats.
+
+ Please refer to Documentation/iostats.txt for details.
+
+ 1. the number of reads completed
+ 2. the number of reads merged
+ 3. the number of sectors read
+ 4. the number of milliseconds spent reading
+ 5. the number of writes completed
+ 6. the number of writes merged
+ 7. the number of sectors written
+ 8. the number of milliseconds spent writing
+ 9. the number of I/Os currently in progress
+ 10. the number of milliseconds spent doing I/Os
+ 11. the weighted number of milliseconds spent doing I/Os
+
+ Additional counters:
+ 12. the total time spent reading in milliseconds
+ 13. the total time spent writing in milliseconds
+
+ @stats_print_clear <region_id> [<starting_line> <number_of_lines>]
+
+ Atomically print and then clear all the counters except the
+ in-flight i/o counters. Useful when the client consuming the
+ statistics does not want to lose any statistics (those updated
+ between printing and clearing).
+
+ <region_id>
+ region_id returned from @stats_create
+
+ <starting_line>
+ The index of the starting line in the output.
+ If omitted, all lines are printed and then cleared.
+
+ <number_of_lines>
+ The number of lines to process.
+ If omitted, all lines are printed and then cleared.
+
+ @stats_set_aux <region_id> <aux_data>
+
+ Store auxiliary data aux_data for the specified region.
+
+ <region_id>
+ region_id returned from @stats_create
+
+ <aux_data>
+ The string that identifies data which is useful to the client
+ program that created the range. The kernel returns this
+ string back in the output of @stats_list message, but it
+ doesn't use this value for anything.
+
+Examples
+========
+
+Subdivide the DM device 'vol' into 100 pieces and start collecting
+statistics on them:
+
+ dmsetup message vol 0 @stats_create - /100
+
+Set the auxillary data string to "foo bar baz" (the escape for each
+space must also be escaped, otherwise the shell will consume them):
+
+ dmsetup message vol 0 @stats_set_aux 0 foo\\ bar\\ baz
+
+List the statistics:
+
+ dmsetup message vol 0 @stats_list
+
+Print the statistics:
+
+ dmsetup message vol 0 @stats_print 0
+
+Delete the statistics:
+
+ dmsetup message vol 0 @stats_delete 0
diff --git a/doc/kernel/switch.txt b/doc/kernel/switch.txt
new file mode 100644
index 0000000..424835e
--- /dev/null
+++ b/doc/kernel/switch.txt
@@ -0,0 +1,138 @@
+dm-switch
+=========
+
+The device-mapper switch target creates a device that supports an
+arbitrary mapping of fixed-size regions of I/O across a fixed set of
+paths. The path used for any specific region can be switched
+dynamically by sending the target a message.
+
+It maps I/O to underlying block devices efficiently when there is a large
+number of fixed-sized address regions but there is no simple pattern
+that would allow for a compact representation of the mapping such as
+dm-stripe.
+
+Background
+----------
+
+Dell EqualLogic and some other iSCSI storage arrays use a distributed
+frameless architecture. In this architecture, the storage group
+consists of a number of distinct storage arrays ("members") each having
+independent controllers, disk storage and network adapters. When a LUN
+is created it is spread across multiple members. The details of the
+spreading are hidden from initiators connected to this storage system.
+The storage group exposes a single target discovery portal, no matter
+how many members are being used. When iSCSI sessions are created, each
+session is connected to an eth port on a single member. Data to a LUN
+can be sent on any iSCSI session, and if the blocks being accessed are
+stored on another member the I/O will be forwarded as required. This
+forwarding is invisible to the initiator. The storage layout is also
+dynamic, and the blocks stored on disk may be moved from member to
+member as needed to balance the load.
+
+This architecture simplifies the management and configuration of both
+the storage group and initiators. In a multipathing configuration, it
+is possible to set up multiple iSCSI sessions to use multiple network
+interfaces on both the host and target to take advantage of the
+increased network bandwidth. An initiator could use a simple round
+robin algorithm to send I/O across all paths and let the storage array
+members forward it as necessary, but there is a performance advantage to
+sending data directly to the correct member.
+
+A device-mapper table already lets you map different regions of a
+device onto different targets. However in this architecture the LUN is
+spread with an address region size on the order of 10s of MBs, which
+means the resulting table could have more than a million entries and
+consume far too much memory.
+
+Using this device-mapper switch target we can now build a two-layer
+device hierarchy:
+
+ Upper Tier - Determine which array member the I/O should be sent to.
+ Lower Tier - Load balance amongst paths to a particular member.
+
+The lower tier consists of a single dm multipath device for each member.
+Each of these multipath devices contains the set of paths directly to
+the array member in one priority group, and leverages existing path
+selectors to load balance amongst these paths. We also build a
+non-preferred priority group containing paths to other array members for
+failover reasons.
+
+The upper tier consists of a single dm-switch device. This device uses
+a bitmap to look up the location of the I/O and choose the appropriate
+lower tier device to route the I/O. By using a bitmap we are able to
+use 4 bits for each address range in a 16 member group (which is very
+large for us). This is a much denser representation than the dm table
+b-tree can achieve.
+
+Construction Parameters
+=======================
+
+ <num_paths> <region_size> <num_optional_args> [<optional_args>...]
+ [<dev_path> <offset>]+
+
+<num_paths>
+ The number of paths across which to distribute the I/O.
+
+<region_size>
+ The number of 512-byte sectors in a region. Each region can be redirected
+ to any of the available paths.
+
+<num_optional_args>
+ The number of optional arguments. Currently, no optional arguments
+ are supported and so this must be zero.
+
+<dev_path>
+ The block device that represents a specific path to the device.
+
+<offset>
+ The offset of the start of data on the specific <dev_path> (in units
+ of 512-byte sectors). This number is added to the sector number when
+ forwarding the request to the specific path. Typically it is zero.
+
+Messages
+========
+
+set_region_mappings <index>:<path_nr> [<index>]:<path_nr> [<index>]:<path_nr>...
+
+Modify the region table by specifying which regions are redirected to
+which paths.
+
+<index>
+ The region number (region size was specified in constructor parameters).
+ If index is omitted, the next region (previous index + 1) is used.
+ Expressed in hexadecimal (WITHOUT any prefix like 0x).
+
+<path_nr>
+ The path number in the range 0 ... (<num_paths> - 1).
+ Expressed in hexadecimal (WITHOUT any prefix like 0x).
+
+R<n>,<m>
+ This parameter allows repetitive patterns to be loaded quickly. <n> and <m>
+ are hexadecimal numbers. The last <n> mappings are repeated in the next <m>
+ slots.
+
+Status
+======
+
+No status line is reported.
+
+Example
+=======
+
+Assume that you have volumes vg1/switch0 vg1/switch1 vg1/switch2 with
+the same size.
+
+Create a switch device with 64kB region size:
+ dmsetup create switch --table "0 `blockdev --getsize /dev/vg1/switch0`
+ switch 3 128 0 /dev/vg1/switch0 0 /dev/vg1/switch1 0 /dev/vg1/switch2 0"
+
+Set mappings for the first 7 entries to point to devices switch0, switch1,
+switch2, switch0, switch1, switch2, switch1:
+ dmsetup message switch 0 set_region_mappings 0:0 :1 :2 :0 :1 :2 :1
+
+Set repetitive mapping. This command:
+ dmsetup message switch 0 set_region_mappings 1000:1 :2 R2,10
+is equivalent to:
+ dmsetup message switch 0 set_region_mappings 1000:1 :2 :1 :2 :1 :2 :1 :2 \
+ :1 :2 :1 :2 :1 :2 :1 :2 :1 :2
+
diff --git a/doc/kernel/thin-provisioning.txt b/doc/kernel/thin-provisioning.txt
index 30b8b83..4f67578 100644
--- a/doc/kernel/thin-provisioning.txt
+++ b/doc/kernel/thin-provisioning.txt
@@ -99,13 +99,14 @@ Using an existing pool device
$data_block_size $low_water_mark"
$data_block_size gives the smallest unit of disk space that can be
-allocated at a time expressed in units of 512-byte sectors. People
-primarily interested in thin provisioning may want to use a value such
-as 1024 (512KB). People doing lots of snapshotting may want a smaller value
-such as 128 (64KB). If you are not zeroing newly-allocated data,
-a larger $data_block_size in the region of 256000 (128MB) is suggested.
-$data_block_size must be the same for the lifetime of the
-metadata device.
+allocated at a time expressed in units of 512-byte sectors.
+$data_block_size must be between 128 (64KB) and 2097152 (1GB) and a
+multiple of 128 (64KB). $data_block_size cannot be changed after the
+thin-pool is created. People primarily interested in thin provisioning
+may want to use a value such as 1024 (512KB). People doing lots of
+snapshotting may want a smaller value such as 128 (64KB). If you are
+not zeroing newly-allocated data, a larger $data_block_size in the
+region of 256000 (128MB) is suggested.
$low_water_mark is expressed in blocks of size $data_block_size. If
free space on the data device drops below this level then a dm event
@@ -115,6 +116,35 @@ Resuming a device with a new table itself triggers an event so the
userspace daemon can use this to detect a situation where a new table
already exceeds the threshold.
+A low water mark for the metadata device is maintained in the kernel and
+will trigger a dm event if free space on the metadata device drops below
+it.
+
+Updating on-disk metadata
+-------------------------
+
+On-disk metadata is committed every time a FLUSH or FUA bio is written.
+If no such requests are made then commits will occur every second. This
+means the thin-provisioning target behaves like a physical disk that has
+a volatile write cache. If power is lost you may lose some recent
+writes. The metadata should always be consistent in spite of any crash.
+
+If data space is exhausted the pool will either error or queue IO
+according to the configuration (see: error_if_no_space). If metadata
+space is exhausted or a metadata operation fails: the pool will error IO
+until the pool is taken offline and repair is performed to 1) fix any
+potential inconsistencies and 2) clear the flag that imposes repair.
+Once the pool's metadata device is repaired it may be resized, which
+will allow the pool to return to normal operation. Note that if a pool
+is flagged as needing repair, the pool's data and metadata devices
+cannot be resized until repair is performed. It should also be noted
+that when the pool's metadata space is exhausted the current metadata
+transaction is aborted. Given that the pool will cache IO whose
+completion may have already been acknowledged to upper IO layers
+(e.g. filesystem) it is strongly suggested that consistency checks
+(e.g. fsck) be performed on those layers when repair of the pool is
+required.
+
Thin provisioning
-----------------
@@ -234,6 +264,8 @@ i) Constructor
read_only: Don't allow any changes to be made to the pool
metadata.
+ error_if_no_space: Error IOs, instead of queueing, if no space.
+
Data block size must be between 64KB (128 sectors) and 1GB
(2097152 sectors) inclusive.
@@ -255,10 +287,9 @@ ii) Status
should register for the event and then check the target's status.
held metadata root:
- The location, in sectors, of the metadata root that has been
+ The location, in blocks, of the metadata root that has been
'held' for userspace read access. '-' indicates there is no
- held root. This feature is not yet implemented so '-' is
- always returned.
+ held root.
discard_passdown|no_discard_passdown
Whether or not discards are actually being passed down to the
@@ -275,6 +306,14 @@ ii) Status
contain the string 'Fail'. The userspace recovery tools
should then be used.
+ error_if_no_space|queue_if_no_space
+ If the pool runs out of data or metadata space, the pool will
+ either queue or error the IO destined to the data device. The
+ default is to queue the IO until more space is added or the
+ 'no_space_timeout' expires. The 'no_space_timeout' dm-thin-pool
+ module parameter can be used to change this timeout -- it
+ defaults to 60 seconds but may be disabled using a value of 0.
+
iii) Messages
create_thin <dev id>
@@ -341,9 +380,6 @@ then you'll have no access to blocks mapped beyond the end. If you
load a target that is bigger than before, then extra blocks will be
provisioned as and when needed.
-If you wish to reduce the size of your thin device and potentially
-regain some space then send the 'trim' message to the pool.
-
ii) Status
<nr mapped sectors> <highest mapped sector>
diff --git a/doc/kernel/verity.txt b/doc/kernel/verity.txt
index 9884681..e15bc1a 100644
--- a/doc/kernel/verity.txt
+++ b/doc/kernel/verity.txt
@@ -11,6 +11,7 @@ Construction Parameters
<data_block_size> <hash_block_size>
<num_data_blocks> <hash_start_block>
<algorithm> <digest> <salt>
+ [<#opt_params> <opt_params>]
<version>
This is the type of the on-disk hash format.
@@ -62,6 +63,22 @@ Construction Parameters
<salt>
The hexadecimal encoding of the salt value.
+<#opt_params>
+ Number of optional parameters. If there are no optional parameters,
+ the optional paramaters section can be skipped or #opt_params can be zero.
+ Otherwise #opt_params is the number of following arguments.
+
+ Example of optional parameters section:
+ 1 ignore_corruption
+
+ignore_corruption
+ Log corrupted blocks, but allow read operations to proceed normally.
+
+restart_on_corruption
+ Restart the system when a corrupted block is discovered. This option is
+ not compatible with ignore_corruption and requires user space support to
+ avoid restart loops.
+
Theory of operation
===================
@@ -125,7 +142,7 @@ block boundary) are the hash blocks which are stored a depth at a time
The full specification of kernel parameters and on-disk metadata format
is available at the cryptsetup project's wiki page
- http://code.google.com/p/cryptsetup/wiki/DMVerity
+ https://gitlab.com/cryptsetup/cryptsetup/wikis/DMVerity
Status
======
@@ -142,7 +159,7 @@ Set up a device:
A command line tool veritysetup is available to compute or verify
the hash tree or activate the kernel device. This is available from
-the cryptsetup upstream repository http://code.google.com/p/cryptsetup/
+the cryptsetup upstream repository https://gitlab.com/cryptsetup/cryptsetup/
(as a libcryptsetup extension).
Create hash on the device:
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2e035162a13d9ed6…
Commit: 2e035162a13d9ed6036b1bd8cdacbfa7ba1fd748
Parent: 3b15f79bf02d5276fa352cdb87fa0a80a34c1465
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Apr 21 16:01:15 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 21 16:03:54 2015 -0500
config: thin_repair_options and cache_repair_options are undefined
By default these are empty strings, so the config settings
should be flagged as undefined, so they will be commented
out of the generated config. Otherwise, the lines:
thin_repair_options=""
cache_repair_options=""
in the dump output cause a warning when processed since
lvm doesn't want an empty string.
Also regenerate lvm.conf.in.
---
conf/example.conf.in | 6 ++++--
lib/config/config_settings.h | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 48090cf..eedefb5 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -867,7 +867,8 @@ global {
# Configuration option global/thin_repair_options.
# String of options passed to the thin_repair command.
- thin_repair_options=""
+ # This configuration option does not have a default value defined.
+# thin_repair_options=""
# Configuration option global/thin_disabled_features.
# Features to not use in the thin driver.
@@ -913,7 +914,8 @@ global {
# Configuration option global/cache_repair_options.
# String of options passed to the cache_repair command.
- cache_repair_options=""
+ # This configuration option does not have a default value defined.
+# cache_repair_options=""
# Configuration option global/system_id_source.
# The method LVM uses to set the local system ID.
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 78304ed..1a0ebf7 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -820,7 +820,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, 0, CFG_TYPE_STRING, "#S" DEFAULT_THIN_REPAIR_OPTIONS, vsn(2, 2, 100), NULL,
+cfg_array(global_thin_repair_options_CFG, "thin_repair_options", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, "#S" DEFAULT_THIN_REPAIR_OPTIONS, vsn(2, 2, 100), NULL,
"String 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_TYPE_STRING, NULL, vsn(2, 2, 99), NULL,
@@ -860,7 +860,7 @@ cfg(global_cache_repair_executable_CFG, "cache_repair_executable", global_CFG_SE
cfg_array(global_cache_check_options_CFG, "cache_check_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_CHECK_OPTIONS, vsn(2, 2, 108), NULL,
"String of options passed to the cache_check command.\n")
-cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_REPAIR_OPTIONS, vsn(2, 2, 108), NULL,
+cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_REPAIR_OPTIONS, vsn(2, 2, 108), NULL,
"String 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,
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3b15f79bf02d5276…
Commit: 3b15f79bf02d5276fa352cdb87fa0a80a34c1465
Parent: 47ed4cdc35d3ce6d0923ce05765f08fa7e85a6f9
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Apr 21 15:04:22 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 21 15:04:22 2015 -0500
generate example.conf.in, lvmlocal.conf.in
These were created by 'make generate'.
---
conf/example.conf.in | 1622 +++++++++++++++++++++++++++++++++++++++++++++++++
conf/lvmlocal.conf.in | 53 ++
2 files changed, 1675 insertions(+), 0 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index e69de29..48090cf 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -0,0 +1,1622 @@
+# This is an example configuration file for the LVM2 system.
+# It contains the default settings that would be used if there was no
+# @DEFAULT_SYS_DIR@/lvm.conf file.
+#
+# Refer to 'man lvm.conf' for further information including the file layout.
+#
+# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set
+# the environment variable LVM_SYSTEM_DIR before running the tools.
+#
+# N.B. Take care that each setting only appears once if uncommenting
+# example settings in this file.
+
+
+# Configuration section config.
+# How LVM configuration settings are handled.
+config {
+
+ # Configuration option config/checks.
+ # If enabled, any LVM configuration mismatch is reported.
+ # This implies checking that the configuration key is understood
+ # by LVM and that the value of the key is the proper type.
+ # If disabled, any configuration mismatch is ignored and the default
+ # value is used without any warning (a message about the
+ # configuration key not being found is issued in verbose mode only).
+ checks=1
+
+ # Configuration option config/abort_on_errors.
+ # Abort the LVM process if a configuration mismatch is found.
+ abort_on_errors=0
+
+ # Configuration option config/profile_dir.
+ # Directory where LVM looks for configuration profiles.
+ profile_dir="@DEFAULT_SYS_DIR@/@DEFAULT_PROFILE_SUBDIR@"
+}
+
+# Configuration section devices.
+# How LVM uses block devices.
+devices {
+
+ # Configuration option devices/dir.
+ # Directory in which to create volume group device nodes.
+ # Commands also accept this as a prefix on volume group names.
+ dir="/dev"
+
+ # Configuration option devices/scan.
+ # Directories containing device nodes to use with LVM.
+ scan="/dev"
+
+ # Configuration option devices/loopfiles.
+ # This configuration option does not have a default value defined.
+# loopfiles=[]
+
+ # Configuration option devices/obtain_device_list_from_udev.
+ # Obtain the list of available devices from udev.
+ # This avoids opening or using any inapplicable non-block
+ # devices or subdirectories found in the udev directory.
+ # Any device node or symlink not managed by udev in the udev
+ # directory is ignored. This setting applies only to the
+ # udev-managed device directory; other directories will be
+ # scanned fully. LVM needs to be compiled with udev support
+ # for this setting to apply.
+ obtain_device_list_from_udev=1
+
+ # Configuration option devices/external_device_info_source.
+ # Select an external device information source.
+ # Some information may already be available in the system and
+ # LVM can use this information to determine the exact type
+ # or use of devices it processes. Using an existing external
+ # device information source can speed up device processing
+ # as LVM does not need to run its own native routines to acquire
+ # this information. For example, this information is used to
+ # drive LVM filtering like MD component detection, multipath
+ # component detection, partition detection and others.
+ # Possible options are: none, udev.
+ # none - No external device information source is used.
+ # udev - Reuse existing udev database records. Applicable
+ # only if LVM is compiled with udev support.
+ external_device_info_source="none"
+
+ # Configuration option devices/preferred_names.
+ # Select which path name to display for a block device.
+ # If multiple path names exist for a block device,
+ # and LVM needs to display a name for the device,
+ # the path names are matched against each item in
+ # this list of regular expressions. The first match is used.
+ # Try to avoid using undescriptive /dev/dm-N names, if present.
+ # If no preferred name matches, or if preferred_names are not
+ # defined, built-in rules are used until one produces a preference.
+ # Rule 1 checks path prefixes and gives preference in this order:
+ # /dev/mapper, /dev/disk, /dev/dm-*, /dev/block (/dev from devices/dev)
+ # Rule 2 prefers the path with the least slashes.
+ # Rule 3 prefers a symlink.
+ # Rule 4 prefers the path with least value in lexicographical order.
+ # Example:
+ # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
+ # This configuration option does not have a default value defined.
+# preferred_names=[]
+
+ # Configuration option devices/filter.
+ # Limit the block devices that are used by LVM commands.
+ # This is a list of regular expressions used to accept or
+ # reject block device path names. Each regex is delimited
+ # by a vertical bar '|' (or any character) and is preceded
+ # by 'a' to accept the path, or by 'r' to reject the path.
+ # The first regex in the list to match the path is used,
+ # producing the 'a' or 'r' result for the device.
+ # When multiple path names exist for a block device, if any
+ # path name matches an 'a' pattern before an 'r' pattern,
+ # then the device is accepted. If all the path names match
+ # an 'r' pattern first, then the device is rejected.
+ # Unmatching path names do not affect the accept or reject
+ # decision. If no path names for a device match a pattern,
+ # then the device is accepted.
+ # Be careful mixing 'a' and 'r' patterns, as the combination
+ # might produce unexpected results (test any changes.)
+ # Run vgscan after changing the filter to regenerate the cache.
+ # See the use_lvmetad comment for a special case regarding filters.
+ # Example:
+ # Accept every block device.
+ # filter = [ "a|.*/|" ]
+ # Example:
+ # Reject the cdrom drive.
+ # filter = [ "r|/dev/cdrom|" ]
+ # Example:
+ # Work with just loopback devices, e.g. for testing.
+ # filter = [ "a|loop|", "r|.*|" ]
+ # Example:
+ # Accept all loop devices and ide drives except hdc.
+ # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
+ # Example:
+ # Use anchors to be very specific.
+ # filter = [ "a|^/dev/hda8$|", "r|.*/|" ]
+ # This configuration option does not have a default value defined.
+# filter=[]
+
+ # Configuration option devices/global_filter.
+ # Limit the block devices that are used by LVM system components.
+ # Because devices/filter may be overridden from the command line,
+ # it is not suitable for system-wide device filtering, e.g. udev
+ # 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=[]
+
+ # Configuration option devices/cache.
+ # This has been replaced by the devices/cache_dir setting.
+ cache="/etc/lvm/cache/.cache"
+
+ # Configuration option devices/cache_dir.
+ # Directory in which to store the device cache file.
+ # The results of filtering are cached on disk to avoid
+ # rescanning dud devices (which can take a very long time).
+ # By default this cache is stored in a file named .cache.
+ # It is safe to delete this file; the tools regenerate it.
+ # If obtain_device_list_from_udev is enabled, the list of devices
+ # is obtained from udev and any existing .cache file is removed.
+ cache_dir="@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@"
+
+ # Configuration option devices/cache_file_prefix.
+ # A prefix used before the .cache file name. See devices/cache_dir.
+ cache_file_prefix=""
+
+ # Configuration option devices/write_cache_state.
+ # Enable/disable writing the cache file. See devices/cache_dir.
+ write_cache_state=1
+
+ # Configuration option devices/types.
+ # List of additional acceptable block device types.
+ # These are of device type names from /proc/devices,
+ # followed by the maximum number of partitions.
+ # Example:
+ # types = [ "fd", 16 ]
+ # This configuration option does not have a default value defined.
+# types=[]
+
+ # Configuration option devices/sysfs_scan.
+ # Restrict device scanning to block devices appearing in sysfs.
+ # This is a quick way of filtering out block devices that are
+ # not present on the system. sysfs must be part of the kernel
+ # and mounted.)
+ sysfs_scan=1
+
+ # Configuration option devices/multipath_component_detection.
+ # Ignore devices that are components of DM multipath devices.
+ multipath_component_detection=1
+
+ # Configuration option devices/md_component_detection.
+ # Ignore devices that are components of software RAID (md) devices.
+ md_component_detection=1
+
+ # Configuration option devices/fw_raid_component_detection.
+ # Ignore devices that are components of firmware RAID devices.
+ # LVM must use an external_device_info_source other than none
+ # for this detection to execute.
+ fw_raid_component_detection=0
+
+ # Configuration option devices/md_chunk_alignment.
+ # Align PV data blocks with md device's stripe-width.
+ # This applies if a PV is placed directly on an md device.
+ md_chunk_alignment=1
+
+ # Configuration option devices/default_data_alignment.
+ # Default alignment of the start of a PV data area in MB.
+ # If set to 0, a value of 64KB will be used.
+ # Set to 1 for 1MiB, 2 for 2MiB, etc.
+ default_data_alignment=1
+
+ # Configuration option devices/data_alignment_detection.
+ # Detect PV data alignment based on sysfs device information.
+ # The start of a PV data area will be a multiple of
+ # minimum_io_size or optimal_io_size exposed in sysfs.
+ # minimum_io_size is the smallest request the device can perform
+ # without incurring a read-modify-write penalty, e.g. MD chunk size.
+ # optimal_io_size is the device's preferred unit of receiving I/O,
+ # e.g. MD stripe width.
+ # minimum_io_size is used if optimal_io_size is undefined (0).
+ # If md_chunk_alignment is enabled, that detects the optimal_io_size.
+ # This setting takes precedence over md_chunk_alignment.
+ data_alignment_detection=1
+
+ # Configuration option devices/data_alignment.
+ # Alignment of the start of a PV data area in KB.
+ # If a PV is placed directly on an md device and
+ # md_chunk_alignment or data_alignment_detection are enabled,
+ # then this setting is ignored. Otherwise, md_chunk_alignment
+ # and data_alignment_detection are disabled if this is set.
+ # Set to 0 to use the default alignment or the page size, if larger.
+ data_alignment=0
+
+ # Configuration option devices/data_alignment_offset_detection.
+ # Detect PV data alignment offset based on sysfs device information.
+ # The start of a PV aligned data area will be shifted by the
+ # alignment_offset exposed in sysfs. This offset is often 0, but
+ # may be non-zero. Certain 4KB sector drives that compensate for
+ # windows partitioning will have an alignment_offset of 3584 bytes
+ # (sector 7 is the lowest aligned logical block, the 4KB sectors start
+ # at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).
+ # pvcreate --dataalignmentoffset will skip this detection.
+ data_alignment_offset_detection=1
+
+ # Configuration option devices/ignore_suspended_devices.
+ # Ignore DM devices that have I/O suspended while scanning devices.
+ # Otherwise, LVM waits for a suspended device to become accessible.
+ # This should only be needed in recovery situations.
+ ignore_suspended_devices=0
+
+ # Configuration option devices/ignore_lvm_mirrors.
+ # Do not scan 'mirror' LVs to avoid possible deadlocks.
+ # This avoids possible deadlocks when using the 'mirror'
+ # segment type. This setting determines whether logical volumes
+ # using the 'mirror' segment type are scanned for LVM labels.
+ # This affects the ability of mirrors to be used as physical volumes.
+ # If this setting is enabled, it becomes impossible to create VGs
+ # on top of mirror LVs, i.e. to stack VGs on mirror LVs.
+ # If this setting is disabled, allowing mirror LVs to be scanned,
+ # it may cause LVM processes and I/O to the mirror to become blocked.
+ # This is due to the way that the mirror segment type handles failures.
+ # In order for the hang to occur, an LVM command must be run just after
+ # a failure and before the automatic LVM repair process takes place,
+ # or there must be failures in multiple mirrors in the same VG at the
+ # same time with write failures occurring moments before a scan of the
+ # mirror's labels.
+ # The 'mirror' scanning problems do not apply to LVM RAID types like
+ # 'raid1' which handle failures in a different way, making them a
+ # better choice for VG stacking.
+ ignore_lvm_mirrors=1
+
+ # Configuration option devices/disable_after_error_count.
+ # Number of I/O errors after which a device is skipped.
+ # During each LVM operation, errors received from each device
+ # are counted. If the counter of a device exceeds the limit set
+ # here, no further I/O is sent to that device for the remainder
+ # of the operation.
+ # Setting this to 0 disables the counters altogether.
+ disable_after_error_count=0
+
+ # Configuration option devices/require_restorefile_with_uuid.
+ # Allow use of pvcreate --uuid without requiring --restorefile.
+ require_restorefile_with_uuid=1
+
+ # Configuration option devices/pv_min_size.
+ # Minimum size (in KB) of block devices which can be used as PVs.
+ # In a clustered environment all nodes must use the same value.
+ # Any value smaller than 512KB is ignored. The previous built-in
+ # value was 512.
+ pv_min_size=2048
+
+ # Configuration option devices/issue_discards.
+ # Issue discards to PVs that are no longer used by an LV.
+ # Discards are sent to an LV's underlying physical volumes when
+ # the LV is no longer using the physical volumes' space, e.g.
+ # lvremove, lvreduce. Discards inform the storage that a region
+ # is no longer used. Storage that supports discards advertise
+ # the protocol-specific way discards should be issued by the
+ # kernel (TRIM, UNMAP, or WRITE SAME with UNMAP bit set).
+ # Not all storage will support or benefit from discards, but SSDs
+ # and thinly provisioned LUNs generally do. If enabled, discards
+ # will only be issued if both the storage and kernel provide support.
+ issue_discards=0
+}
+
+# Configuration section allocation.
+# How LVM selects free space for Logical Volumes.
+allocation {
+
+ # Configuration option allocation/cling_tag_list.
+ # Advise LVM which PVs to use when searching for new space.
+ # When searching for free space to extend an LV, the 'cling'
+ # allocation policy will choose space on the same PVs as the last
+ # segment of the existing LV. If there is insufficient space and a
+ # list of tags is defined here, it will check whether any of them are
+ # attached to the PVs concerned and then seek to match those PV tags
+ # between existing extents and new extents.
+ # Example:
+ # Use the special tag "@*" as a wildcard to match any PV tag.
+ # cling_tag_list = [ "@*" ]
+ # Example:
+ # LVs are mirrored between two sites within a single VG.
+ # PVs are tagged with either @site1 or @site2 to indicate where
+ # they are situated.
+ # cling_tag_list = [ "@site1", "@site2" ]
+ # This configuration option does not have a default value defined.
+# cling_tag_list=[]
+
+ # Configuration option allocation/maximise_cling.
+ # Use a previous allocation algorithm.
+ # Changes made in version 2.02.85 extended the reach of the 'cling'
+ # policies to detect more situations where data can be grouped onto
+ # the same disks. This setting can be used to disable the changes
+ # and revert to the previous algorithm.
+ maximise_cling=1
+
+ # Configuration option allocation/use_blkid_wiping.
+ # Use blkid to detect existing signatures on new PVs and LVs.
+ # The blkid library can detect more signatures than the
+ # native LVM detection code, but may take longer.
+ # LVM needs to be compiled with blkid wiping support for
+ # this setting to apply.
+ # LVM native detection code is currently able to recognize:
+ # 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
+
+ # Configuration option allocation/wipe_signatures_when_zeroing_new_lvs.
+ # Look for and erase any signatures while zeroing a new LV.
+ # Zeroing is controlled by the -Z/--zero option, and if not
+ # specified, zeroing is used by default if possible.
+ # Zeroing simply overwrites the first 4 KiB of a new LV
+ # with zeroes and does no signature detection or wiping.
+ # Signature wiping goes beyond zeroing and detects exact
+ # types and positions of signatures within the whole LV.
+ # It provides a cleaner LV after creation as all known
+ # signatures are wiped. The LV is not claimed incorrectly
+ # by other tools because of old signatures from previous use.
+ # The number of signatures that LVM can detect depends on the
+ # detection code that is selected (see use_blkid_wiping.)
+ # Wiping each detected signature must be confirmed.
+ # The command line option -W/--wipesignatures takes precedence
+ # over this setting.
+ # When this setting is disabled, signatures on new LVs are
+ # not detected or erased unless the -W/--wipesignatures y
+ # option is used directly.
+ wipe_signatures_when_zeroing_new_lvs=1
+
+ # Configuration option allocation/mirror_logs_require_separate_pvs.
+ # Mirror logs and images will always use different PVs.
+ # The default setting changed in version 2.02.85.
+ mirror_logs_require_separate_pvs=0
+
+ # Configuration option allocation/cache_pool_metadata_require_separate_pvs.
+ # Cache pool metadata and data will always use different PVs.
+ cache_pool_metadata_require_separate_pvs=0
+
+ # Configuration option allocation/cache_pool_cachemode.
+ # The default cache mode used for new cache pools.
+ # Possible options are: writethrough, writeback.
+ # writethrough - Data blocks are immediately written from
+ # the cache to disk.
+ # writeback - Data blocks are written from the cache back
+ # to disk after some delay to improve performance.
+ cache_pool_cachemode="writethrough"
+
+ # Configuration option allocation/cache_pool_chunk_size.
+ # The minimal chunk size (in kiB) for cache pool volumes.
+ # Using a chunk_size that is too large can result in wasteful
+ # use of the cache, where small reads and writes can cause
+ # large sections of an LV to be mapped into the cache. However,
+ # choosing a chunk_size that is too small can result in more
+ # overhead trying to manage the numerous chunks that become mapped
+ # into the cache. The former is more of a problem than the latter
+ # in most cases, so we default to a value that is on the smaller
+ # end of the spectrum. Supported values range from 32(kiB) to
+ # 1048576 in multiples of 32.
+ # This configuration option does not have a default value defined.
+# cache_pool_chunk_size=128
+
+ # Configuration option allocation/thin_pool_metadata_require_separate_pvs.
+ # Thin pool metdata and data will always use different PVs.
+ thin_pool_metadata_require_separate_pvs=0
+
+ # Configuration option allocation/thin_pool_zero.
+ # Thin pool data chunks are zeroed before they are first used.
+ # Zeroing with a larger thin pool chunk size reduces performance.
+ thin_pool_zero=1
+
+ # Configuration option allocation/thin_pool_discards.
+ # The discards behaviour of thin pool volumes.
+ # Possible options are: ignore, nopassdown, passdown.
+ thin_pool_discards="passdown"
+
+ # Configuration option allocation/thin_pool_chunk_size_policy.
+ # The chunk size calculation policy for thin pool volumes.
+ # Possible options are: generic, performance.
+ # generic - If thin_pool_chunk_size is defined, use it.
+ # Otherwise, calculate the chunk size based on estimation and
+ # device hints exposed in sysfs - the minimum_io_size.
+ # The chunk size is always at least 64KiB.
+ # performance - If thin_pool_chunk_size is defined, use it.
+ # Otherwise, calculate the chunk size for performance based on
+ # device hints exposed in sysfs - the optimal_io_size.
+ # The chunk size is always at least 512KiB.
+ thin_pool_chunk_size_policy="generic"
+
+ # Configuration option allocation/thin_pool_chunk_size.
+ # The minimal chunk size (in KB) for thin pool volumes.
+ # Larger chunk sizes may improve performance for plain
+ # thin volumes, however using them for snapshot volumes
+ # is less efficient, as it consumes more space and takes
+ # extra time for copying. When unset, lvm tries to estimate
+ # chunk size starting from 64KB. Supported values are in
+ # the range 64 to 1048576.
+ # This configuration option does not have a default value defined.
+# thin_pool_chunk_size=128
+
+ # Configuration option allocation/physical_extent_size.
+ # Default physical extent size to use for new VGs (in KB).
+ physical_extent_size=4096
+}
+
+# Configuration section log.
+# How LVM log information is reported.
+log {
+
+ # Configuration option log/verbose.
+ # Controls the messages sent to stdout or stderr.
+ verbose=0
+
+ # Configuration option log/silent.
+ # Suppress all non-essential messages from stdout.
+ # This has the same effect as -qq.
+ # When enabled, the following commands still produce output:
+ # dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay,
+ # pvs, version, vgcfgrestore -l, vgdisplay, vgs.
+ # Non-essential messages are shifted from log level 4 to log level 5
+ # for syslog and lvm2_log_fn purposes.
+ # Any 'yes' or 'no' questions not overridden by other arguments
+ # are suppressed and default to 'no'.
+ silent=0
+
+ # Configuration option log/syslog.
+ # Send log messages through syslog.
+ syslog=1
+
+ # Configuration option log/file.
+ # Write error and debug log messages to a file specified here.
+ # This configuration option does not have a default value defined.
+# file=""
+
+ # Configuration option log/overwrite.
+ # Overwrite the log file each time the program is run.
+ overwrite=0
+
+ # Configuration option log/level.
+ # The level of log messages that are sent to the log file or syslog.
+ # There are 6 syslog-like log levels currently in use: 2 to 7 inclusive.
+ # 7 is the most verbose (LOG_DEBUG).
+ level=0
+
+ # Configuration option log/indent.
+ # Indent messages according to their severity.
+ indent=1
+
+ # Configuration option log/command_names.
+ # Display the command name on each line of output.
+ command_names=0
+
+ # Configuration option log/prefix.
+ # A prefix to use before the log message text.
+ # (After the command name, if selected).
+ # Two spaces allows you to see/grep the severity of each message.
+ # To make the messages look similar to the original LVM tools use:
+ # indent = 0, command_names = 1, prefix = " -- "
+ prefix=" "
+
+ # Configuration option log/activation.
+ # Log messages during activation.
+ # Don't use this in low memory situations (can deadlock).
+ activation=0
+
+ # Configuration option log/activate_file.
+ # This configuration option does not have a default value defined.
+# activate_file=""
+
+ # Configuration option log/debug_classes.
+ # Select log messages by class.
+ # Some debugging messages are assigned to a class
+ # and only appear in debug output if the class is
+ # listed here. Classes currently available:
+ # memory, devices, activation, allocation,
+ # lvmetad, metadata, cache, locking.
+ # Use "all" to see everything.
+ debug_classes=["memory", "devices", "activation", "allocation", "lvmetad", "metadata", "cache", "locking"]
+}
+
+# Configuration section backup.
+# How LVM metadata is backed up and archived.
+# In LVM, a 'backup' is a copy of the metadata for the
+# current system, and an 'archive' contains old metadata
+# configurations. They are stored in a human readable
+# text format.
+backup {
+
+ # Configuration option backup/backup.
+ # Maintain a backup of the current metadata configuration.
+ # Think very hard before turning this off!
+ backup=1
+
+ # Configuration option backup/backup_dir.
+ # Location of the metadata backup files.
+ # Remember to back up this directory regularly!
+ backup_dir="@DEFAULT_SYS_DIR@/@DEFAULT_BACKUP_SUBDIR@"
+
+ # Configuration option backup/archive.
+ # Maintain an archive of old metadata configurations.
+ # Think very hard before turning this off.
+ archive=1
+
+ # Configuration option backup/archive_dir.
+ # Location of the metdata archive files.
+ # Remember to back up this directory regularly!
+ archive_dir="/etc/lvm/archive"
+
+ # Configuration option backup/retain_min.
+ # Minimum number of archives to keep.
+ retain_min=10
+
+ # Configuration option backup/retain_days.
+ # Minimum number of days to keep archive files.
+ retain_days=30
+}
+
+# Configuration section shell.
+# Settings for running LVM in shell (readline) mode.
+shell {
+
+ # Configuration option shell/history_size.
+ # Number of lines of history to store in ~/.lvm_history.
+ history_size=100
+}
+
+# Configuration section global.
+# Miscellaneous global LVM settings.
+global {
+
+ # Configuration option global/umask.
+ # The file creation mask for any files and directories created.
+ # Interpreted as octal if the first digit is zero.
+ umask=63
+
+ # Configuration option global/test.
+ # No on-disk metadata changes will be made in test mode.
+ # Equivalent to having the -t option on every command.
+ test=0
+
+ # Configuration option global/units.
+ # Default value for --units argument.
+ units="h"
+
+ # Configuration option global/si_unit_consistency.
+ # Distinguish between powers of 1024 and 1000 bytes.
+ # The LVM commands distinguish between powers of 1024 bytes,
+ # e.g. KiB, MiB, GiB, and powers of 1000 bytes, e.g. KB, MB, GB.
+ # If scripts depend on the old behaviour, disable
+ # this setting temporarily until they are updated.
+ si_unit_consistency=1
+
+ # Configuration option global/suffix.
+ # Display unit suffix for sizes.
+ # This setting has no effect if the units are in human-readable
+ # form (global/units="h") in which case the suffix is always
+ # displayed.
+ suffix=1
+
+ # Configuration option global/activation.
+ # Enable/disable communication with the kernel device-mapper.
+ # Disable to use the tools to manipulate LVM metadata without
+ # activating any logical volumes. If the device-mapper driver
+ # is not present in the kernel, disabling this should suppress
+ # the error messages.
+ activation=1
+
+ # Configuration option global/fallback_to_lvm1.
+ # Try running LVM1 tools if LVM cannot communicate with DM.
+ # This option only applies to 2.4 kernels and is provided to
+ # help switch between device-mapper kernels and LVM1 kernels.
+ # 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=1
+
+ # Configuration option global/format.
+ # The default metadata format that commands should use.
+ # "lvm1" or "lvm2".
+ # The command line override is -M1 or -M2.
+ format="lvm2"
+
+ # Configuration option global/format_libraries.
+ # Shared libraries that process different metadata formats.
+ # 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=[]
+
+ # Configuration option global/segment_libraries.
+ # This configuration option does not have a default value defined.
+# segment_libraries=[]
+
+ # Configuration option global/proc.
+ # Location of proc filesystem.
+ proc="/proc"
+
+ # Configuration option global/etc.
+ # Location of /etc system configuration directory.
+ etc="@CONFDIR@"
+
+ # Configuration option global/locking_type.
+ # Type of locking to use.
+ # Type 0: turns off locking. Warning: this risks metadata
+ # corruption if commands run concurrently.
+ # Type 1: uses local file-based locking, the standard mode.
+ # Type 2: uses the external shared library locking_library.
+ # Type 3: uses built-in clustered locking with clvmd.
+ # This is incompatible with lvmetad. If use_lvmetad is enabled,
+ # lvm prints a warning and disables lvmetad use.
+ # Type 4: uses read-only locking which forbids any operations
+ # that might change metadata.
+ # Type 5: offers dummy locking for tools that do not need any locks.
+ # You should not need to set this directly; the tools will select
+ # when to use it instead of the configured locking_type.
+ # Do not use lvmetad or the kernel device-mapper driver with this
+ # locking type. It is used by the --readonly option that offers
+ # read-only access to Volume Group metadata that cannot be locked
+ # safely because it belongs to an inaccessible domain and might be
+ # in use, for example a virtual machine image or a disk that is
+ # shared by a clustered machine.
+ locking_type=1
+
+ # Configuration option global/wait_for_locks.
+ # When disabled, fail if a lock request would block.
+ wait_for_locks=1
+
+ # Configuration option global/fallback_to_clustered_locking.
+ # Attempt to use built-in cluster locking if locking_type 2 fails.
+ # If using external locking (type 2) and initialisation fails,
+ # with this enabled, an attempt will be made to use the built-in
+ # clustered locking.
+ # If you are using a customised locking_library you should disable this.
+ fallback_to_clustered_locking=1
+
+ # Configuration option global/fallback_to_local_locking.
+ # Use locking_type 1 (local) if locking_type 2 or 3 fail.
+ # If an attempt to initialise type 2 or type 3 locking failed,
+ # perhaps because cluster components such as clvmd are not
+ # running, with this enabled, an attempt will be made to use
+ # local file-based locking (type 1). If this succeeds, only
+ # commands against local volume groups will proceed.
+ # Volume Groups marked as clustered will be ignored.
+ fallback_to_local_locking=1
+
+ # Configuration option global/locking_dir.
+ # Directory to use for LVM command file locks.
+ # Local non-LV directory that holds file-based locks
+ # while commands are in progress. A directory like
+ # /tmp that may get wiped on reboot is OK.
+ locking_dir="@DEFAULT_LOCK_DIR@"
+
+ # Configuration option global/prioritise_write_locks.
+ # Allow quicker VG write access during high volume read access.
+ # When there are competing read-only and read-write access
+ # requests for a volume group's metadata, instead of always
+ # granting the read-only requests immediately, delay them to
+ # allow the read-write requests to be serviced. Without this
+ # setting, write access may be stalled by a high volume of
+ # read-only requests.
+ # This option only affects locking_type 1 viz.
+ # local file-based locking.
+ prioritise_write_locks=1
+
+ # Configuration option global/library_dir.
+ # Search this directory first for shared libraries.
+ # This configuration option does not have a default value defined.
+# library_dir=""
+
+ # Configuration option global/locking_library.
+ # The external locking library to use for locking_type 2.
+ locking_library="liblvm2clusterlock.so"
+
+ # Configuration option global/abort_on_internal_errors.
+ # Abort a command that encounters an internal error.
+ # Treat any internal errors as fatal errors, aborting
+ # the process that encountered the internal error.
+ # Please only enable for debugging.
+ abort_on_internal_errors=0
+
+ # Configuration option global/detect_internal_vg_cache_corruption.
+ # Internal verification of VG structures.
+ # Check if CRC matches when a parsed VG is
+ # used multiple times. This is useful to catch
+ # unexpected changes to cached VG structures.
+ # Please only enable for debugging.
+ detect_internal_vg_cache_corruption=0
+
+ # Configuration option global/metadata_read_only.
+ # No operations that change on-disk metadata are permitted.
+ # Additionally, read-only commands that encounter metadata
+ # in need of repair will still be allowed to proceed exactly
+ # as if the repair had been performed (except for the unchanged
+ # vg_seqno). Inappropriate use could mess up your system,
+ # so seek advice first!
+ metadata_read_only=0
+
+ # Configuration option global/mirror_segtype_default.
+ # The segment type used by the short mirroring option -m.
+ # Possible options are: mirror, raid1.
+ # mirror - the original RAID1 implementation from LVM/DM.
+ # It is characterized by a flexible log solution (core,
+ # disk, mirrored), and by the necessity to block I/O while
+ # handling a failure.
+ # There is an inherent race in the dmeventd failure
+ # handling logic with snapshots of devices using this
+ # type of RAID1 that in the worst case could cause a
+ # deadlock. (Also see devices/ignore_lvm_mirrors.)
+ # raid1 - a newer RAID1 implementation using the MD RAID1
+ # personality through device-mapper. It is characterized
+ # by a lack of log options. (A log is always allocated for
+ # every device and they are placed on the same device as the
+ # image - no separate devices are required.) This mirror
+ # implementation does not require I/O to be blocked while
+ # handling a failure. This mirror implementation is not
+ # cluster-aware and cannot be used in a shared (active/active)
+ # fashion in a cluster.
+ # The '--type mirror|raid1' option overrides this setting.
+ mirror_segtype_default="@DEFAULT_MIRROR_SEGTYPE@"
+
+ # Configuration option global/raid10_segtype_default.
+ # The segment type used by the -i -m combination.
+ # The --stripes/-i and --mirrors/-m options can both
+ # be specified during the creation of a logical volume
+ # to use both striping and mirroring for the LV.
+ # There are two different implementations.
+ # Possible options are: raid10, mirror.
+ # raid10 - LVM uses MD's RAID10 personality through DM.
+ # mirror - LVM layers the 'mirror' and 'stripe' segment types.
+ # The layering is done by creating a mirror LV on top of
+ # striped sub-LVs, effectively creating a RAID 0+1 array.
+ # The layering is suboptimal in terms of providing redundancy
+ # and performance. The 'raid10' option is perferred.
+ # The '--type raid10|mirror' option overrides this setting.
+ raid10_segtype_default="@DEFAULT_RAID10_SEGTYPE@"
+
+ # Configuration option global/sparse_segtype_default.
+ # The segment type used by the -V -L combination.
+ # The combination of -V and -L options creates a
+ # sparse LV. There are two different implementations.
+ # Possible options are: snapshot, thin.
+ # snapshot - The original snapshot implementation from LVM/DM.
+ # It uses an old snapshot that mixes data and metadata within
+ # a single COW storage volume and performs poorly when the
+ # size of stored data passes hundreds of MB.
+ # thin - A newer implementation that uses thin provisioning.
+ # It has a bigger minimal chunk size (64KiB) and uses a separate
+ # volume for metadata. It has better performance, especially
+ # when more data is used. It also supports full snapshots.
+ # The '--type snapshot|thin' option overrides this setting.
+ sparse_segtype_default="@DEFAULT_SPARSE_SEGTYPE@"
+
+ # Configuration option global/lvdisplay_shows_full_device_path.
+ # The default format for displaying LV names in lvdisplay was changed
+ # in version 2.02.89 to show the LV name and path separately.
+ # Previously this was always shown as /dev/vgname/lvname even when that
+ # was never a valid path in the /dev filesystem.
+ # Enable this option to reinstate the previous format.
+ lvdisplay_shows_full_device_path=0
+
+ # Configuration option global/use_lvmetad.
+ # Use lvmetad to cache metadata and reduce disk scanning.
+ # When enabled (and running), lvmetad provides LVM commands
+ # with VG metadata and PV state. LVM commands then avoid
+ # reading this information from disks which can be slow.
+ # When disabled (or not running), LVM commands fall back to
+ # scanning disks to obtain VG metadata.
+ # lvmetad is kept updated via udev rules which must be set
+ # up for LVM to work correctly. (The udev rules should be
+ # installed by default.) Without a proper udev setup, changes
+ # in the system's block device configuration will be unknown
+ # to LVM, and ignored until a manual 'pvscan --cache' is run.
+ # If lvmetad was running while use_lvmetad was disabled,
+ # it must be stopped, use_lvmetad enabled, and then started.
+ # When using lvmetad, LV activation is switched to an automatic,
+ # event-based mode. In this mode, LVs are activated based on
+ # incoming udev events that inform lvmetad when PVs appear on
+ # the system. When a VG is complete (all PVs present), it is
+ # auto-activated. The auto_activation_volume_list setting
+ # controls which LVs are auto-activated (all by default.)
+ # When lvmetad is updated (automatically by udev events, or
+ # directly by pvscan --cache), devices/filter is ignored and
+ # all devices are scanned by default. lvmetad always keeps
+ # unfiltered information which is provided to LVM commands.
+ # Each LVM command then filters based on devices/filter.
+ # This does not apply to other, non-regexp, filtering settings:
+ # component filters such as multipath and MD are checked
+ # during pvscan --cache.
+ # To filter a device and prevent scanning from the LVM system
+ # entirely, including lvmetad, use devices/global_filter.
+ # lvmetad is not compatible with locking_type 3 (clustering).
+ # LVM prints warnings and ignores lvmetad if this combination
+ # is seen.
+ use_lvmetad=0
+
+ # Configuration option global/thin_check_executable.
+ # The full path to the thin_check command.
+ # LVM uses this command to check that a thin metadata
+ # device is in a usable state.
+ # When a thin pool is activated and after it is deactivated,
+ # this command is run. Activation will only proceed if the
+ # command has an exit status of 0.
+ # Set to "" to skip this check. (Not recommended.)
+ # Also see thin_check_options.
+ # The thin tools are available from the package
+ # device-mapper-persistent-data.
+ thin_check_executable="@THIN_CHECK_CMD@"
+
+ # Configuration option global/thin_dump_executable.
+ # The full path to the thin_dump command.
+ # LVM uses this command to dump thin pool metadata.
+ # (For thin tools, see thin_check_executable.)
+ thin_dump_executable="@THIN_DUMP_CMD@"
+
+ # Configuration option global/thin_repair_executable.
+ # The full path to the thin_repair command.
+ # LVM uses this command to repair a thin metadata device
+ # if it is in an unusable state.
+ # Also see thin_repair_options.
+ # (For thin tools, see thin_check_executable.)
+ thin_repair_executable="@THIN_REPAIR_CMD@"
+
+ # Configuration option global/thin_check_options.
+ # String of options passed to the thin_check command.
+ # With thin_check version 2.1 or newer you can add
+ # --ignore-non-fatal-errors to let it pass through
+ # 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"
+
+ # Configuration option global/thin_repair_options.
+ # String of options passed to the thin_repair command.
+ thin_repair_options=""
+
+ # Configuration option global/thin_disabled_features.
+ # Features to not use in the thin driver.
+ # This can be helpful for testing, or to avoid
+ # using a feature that is causing problems.
+ # Features: block_size, discards, discards_non_power_2,
+ # external_origin, metadata_resize, external_origin_extend,
+ # error_if_no_space.
+ # Example:
+ # thin_disabled_features = [ "discards", "block_size" ]
+ thin_disabled_features=[]
+
+ # Configuration option global/cache_check_executable.
+ # The full path to the cache_check command.
+ # LVM uses this command to check that a cache metadata
+ # device is in a usable state.
+ # When a cached LV is activated and after it is deactivated,
+ # this command is run. Activation will only proceed if the
+ # command has an exit status of 0.
+ # Set to "" to skip this check. (Not recommended.)
+ # Also see cache_check_options.
+ # The cache tools are available from the package
+ # device-mapper-persistent-data.
+ cache_check_executable="@CACHE_CHECK_CMD@"
+
+ # Configuration option global/cache_dump_executable.
+ # The full path to the cache_dump command.
+ # LVM uses this command to dump cache pool metadata.
+ # (For cache tools, see cache_check_executable.)
+ cache_dump_executable="@CACHE_DUMP_CMD@"
+
+ # Configuration option global/cache_repair_executable.
+ # The full path to the cache_repair command.
+ # LVM uses this command to repair a cache metadata device
+ # if it is in an unusable state.
+ # Also see cache_repair_options.
+ # (For cache tools, see cache_check_executable.)
+ cache_repair_executable="@CACHE_REPAIR_CMD@"
+
+ # Configuration option global/cache_check_options.
+ # String of options passed to the cache_check command.
+ cache_check_options="-q"
+
+ # Configuration option global/cache_repair_options.
+ # String of options passed to the cache_repair command.
+ cache_repair_options=""
+
+ # Configuration option global/system_id_source.
+ # The method LVM uses to set the local system ID.
+ # Volume Groups can also be given a system ID (by
+ # vgcreate, vgchange, or vgimport.)
+ # A VG on shared storage devices is accessible only
+ # to the host with a matching system ID.
+ # See 'man lvmsystemid' for information on limitations
+ # and correct usage.
+ # Possible options are: none, lvmlocal, uname, machineid, file.
+ # none - The host has no system ID.
+ # lvmlocal - Obtain the system ID from the system_id setting in the
+ # '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 /etc/machine-id to set the
+ # system ID. Some systems create this file at installation time.
+ # See 'man machine-id'.
+ # file - Use the contents of another file (system_id_file) to set
+ # the system ID.
+ system_id_source="none"
+
+ # Configuration option global/system_id_file.
+ # The full path to the file containing a system ID.
+ # This is used when system_id_source is set to 'file'.
+ # Comments starting with the character # are ignored.
+ # This configuration option does not have a default value defined.
+# system_id_file=""
+}
+
+# Configuration section activation.
+activation {
+
+ # Configuration option activation/checks.
+ # Perform internal checks of libdevmapper operations.
+ # Useful for debugging problems with activation.
+ # Some of the checks may be expensive, so it's best to use
+ # this only when there seems to be a problem.
+ checks=0
+
+ # Configuration option activation/udev_sync.
+ # Use udev notifications to synchronize udev and LVM.
+ # When disabled, LVM commands will not wait for notifications
+ # from udev, but continue irrespective of any possible udev
+ # processing in the background. Only use this if udev is not
+ # running or has rules that ignore the devices LVM creates.
+ # If enabled when udev is not running, and LVM processes
+ # are waiting for udev, run 'dmsetup udevcomplete_all' to
+ # wake them up.
+ # The '--nodevsync' option overrides this setting.
+ udev_sync=1
+
+ # Configuration option activation/udev_rules.
+ # Use udev rules to manage LV device nodes and symlinks.
+ # When disabled, LVM will manage the device nodes and
+ # symlinks for active LVs itself.
+ # Manual intervention may be required if this setting is
+ # changed while LVs are active.
+ udev_rules=1
+
+ # Configuration option activation/verify_udev_operations.
+ # Use extra checks in LVM to verify udev operations.
+ # This enables additional checks (and if necessary,
+ # repairs) on entries in the device directory after
+ # udev has completed processing its events.
+ # Useful for diagnosing problems with LVM/udev interactions.
+ verify_udev_operations=0
+
+ # Configuration option activation/retry_deactivation.
+ # Retry failed LV deactivation.
+ # If LV deactivation fails, LVM will retry for a few
+ # seconds before failing. This may happen because a
+ # process run from a quick udev rule temporarily opened
+ # the device.
+ retry_deactivation=1
+
+ # Configuration option activation/missing_stripe_filler.
+ # Method to fill missing stripes when activating an incomplete LV.
+ # Using 'error' will make inaccessible parts of the device return
+ # I/O errors on access. You can instead use a device path, in which
+ # case, that device will be used in place of missing stripes.
+ # Using anything other than 'error' with mirrored or snapshotted
+ # volumes is likely to result in data corruption.
+ missing_stripe_filler="error"
+
+ # Configuration option activation/use_linear_target.
+ # Use the linear target to optimize single stripe LVs.
+ # When disabled, the striped target is used. The linear
+ # target is an optimised version of the striped target
+ # that only handles a single stripe.
+ use_linear_target=1
+
+ # Configuration option activation/reserved_stack.
+ # Stack size in KB to reserve for use while devices are suspended.
+ # Insufficent reserve risks I/O deadlock during device suspension.
+ reserved_stack=64
+
+ # Configuration option activation/reserved_memory.
+ # Memory size in KB to reserve for use while devices are suspended.
+ # Insufficent reserve risks I/O deadlock during device suspension.
+ reserved_memory=8192
+
+ # Configuration option activation/process_priority.
+ # Nice value used while devices are suspended.
+ # Use a high priority so that LVs are suspended
+ # for the shortest possible time.
+ process_priority=-18
+
+ # Configuration option activation/volume_list.
+ # Only LVs selected by this list are activated.
+ # If this list is defined, an LV is only activated
+ # if it matches an entry in this list.
+ # If this list is undefined, it imposes no limits
+ # on LV activation (all are allowed).
+ # Possible options are: vgname, vgname/lvname, @tag, @*
+ # vgname is matched exactly and selects all LVs in the VG.
+ # vgname/lvname is matched exactly and selects the LV.
+ # @tag selects if tag matches a tag set on the LV or VG.
+ # @* selects if a tag defined on the host is also set on
+ # the LV or VG. See tags/hosttags.
+ # If any host tags exist but volume_list is not defined,
+ # a default single-entry list containing '@*' is assumed.
+ # Example:
+ # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
+ # This configuration option does not have a default value defined.
+# volume_list=[]
+
+ # Configuration option activation/auto_activation_volume_list.
+ # Only LVs selected by this list are auto-activated.
+ # This list works like volume_list, but it is used
+ # only by auto-activation commands. It does not apply
+ # to direct activation commands.
+ # If this list is defined, an LV is only auto-activated
+ # if it matches an entry in this list.
+ # If this list is undefined, it imposes no limits
+ # on LV auto-activation (all are allowed.)
+ # If this list is defined and empty, i.e. "[]",
+ # then no LVs are selected for auto-activation.
+ # An LV that is selected by this list for
+ # auto-activation, must also be selected by
+ # volume_list (if defined) before it is activated.
+ # Auto-activation is an activation command that
+ # includes the 'a' argument: --activate ay or -a ay,
+ # e.g. vgchange -a ay, or lvchange -a ay vgname/lvname.
+ # The 'a' (auto) argument for auto-activation is
+ # meant to be used by activation commands that are
+ # run automatically by the system, as opposed to
+ # LVM commands run directly by a user. A user may
+ # also use the 'a' flag directly to perform auto-
+ # activation.
+ # An example of a system-generated auto-activation
+ # command is 'pvscan --cache -aay' which is generated
+ # when udev and lvmetad detect a new VG has appeared
+ # on the system, and want LVs in it to be auto-activated.
+ # 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=[]
+
+ # Configuration option activation/read_only_volume_list.
+ # LVs in this list are activated in read-only mode.
+ # If this list is defined, each LV that is to be activated
+ # is checked against this list, and if it matches, it is
+ # activated in read-only mode.
+ # This overrides the permission setting stored in the
+ # metadata, e.g. from --permission rw.
+ # 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=[]
+
+ # Configuration option activation/mirror_region_size.
+ # This has been replaced by the activation/raid_region_size setting.
+ mirror_region_size=512
+
+ # Configuration option activation/raid_region_size.
+ # Size in KiB of each raid or mirror synchronization region.
+ # For raid or mirror segment types, this is the amount of
+ # data that is copied at once when initializing, or moved
+ # at once by pvmove.
+ raid_region_size=512
+
+ # Configuration option activation/error_when_full.
+ # Return errors if a thin pool runs out of space.
+ # When enabled, writes to thin LVs immediately return
+ # an error if the thin pool is out of data space.
+ # When disabled, writes to thin LVs are queued if the
+ # thin pool is out of space, and processed when the
+ # thin pool data space is extended.
+ # New thin pools are assigned the behavior defined here.
+ # The '--errorwhenfull y|n' option overrides this setting.
+ error_when_full=0
+
+ # Configuration option activation/readahead.
+ # Setting to use when there is no readahead setting in metadata.
+ # Possible options are: none, auto.
+ # none - Disable readahead.
+ # auto - Use default value chosen by kernel.
+ readahead="auto"
+
+ # Configuration option activation/raid_fault_policy.
+ # Defines how a device failure in a RAID LV is handled.
+ # This includes LVs that have the following segment types:
+ # raid1, raid4, raid5*, and raid6*.
+ # If a device in the LV fails, the policy determines the
+ # steps perfomed by dmeventd automatically, and the steps
+ # perfomed by 'lvconvert --repair --use-policies' run manually.
+ # Automatic handling requires dmeventd to be monitoring the LV.
+ # Possible options are: warn, allocate.
+ # warn - Use the system log to warn the user that a device
+ # in the RAID LV has failed. It is left to the user to run
+ # 'lvconvert --repair' manually to remove or replace the failed
+ # device. As long as the number of failed devices does not
+ # exceed the redundancy of the logical volume (1 device for
+ # raid4/5, 2 for raid6, etc) the LV will remain usable.
+ # allocate - Attempt to use any extra physical volumes in the
+ # volume group as spares and replace faulty devices.
+ raid_fault_policy="warn"
+
+ # Configuration option activation/mirror_image_fault_policy.
+ # Defines how a device failure in a 'mirror' LV is handled.
+ # An LV with the 'mirror' segment type is composed of mirror
+ # images (copies) and a mirror log.
+ # A disk log ensures that a mirror LV does not need to be
+ # re-synced (all copies made the same) every time a machine
+ # reboots or crashes.
+ # If a device in the LV fails, this policy determines the
+ # steps perfomed by dmeventd automatically, and the steps
+ # performed by 'lvconvert --repair --use-policies' run manually.
+ # Automatic handling requires dmeventd to be monitoring the LV.
+ # Possible options are: remove, allocate, allocate_anywhere.
+ # remove - Simply remove the faulty device and run without it.
+ # If the log device fails, the mirror would convert to using
+ # an in-memory log. This means the mirror will not
+ # remember its sync status across crashes/reboots and
+ # the entire mirror will be re-synced.
+ # If a mirror image fails, the mirror will convert to a
+ # non-mirrored device if there is only one remaining good copy.
+ # allocate - Remove the faulty device and try to allocate space
+ # on a new device to be a replacement for the failed device.
+ # Using this policy for the log is fast and maintains the
+ # ability to remember sync state through crashes/reboots.
+ # Using this policy for a mirror device is slow, as it
+ # requires the mirror to resynchronize the devices, but it
+ # will preserve the mirror characteristic of the device.
+ # This policy acts like 'remove' if no suitable device and
+ # space can be allocated for the replacement.
+ # allocate_anywhere - Not yet implemented. Useful to place
+ # the log device temporarily on the same physical volume as
+ # one of the mirror images. This policy is not recommended
+ # for mirror devices since it would break the redundant nature
+ # of the mirror. This policy acts like 'remove' if no suitable
+ # device and space can be allocated for the replacement.
+ mirror_image_fault_policy="remove"
+
+ # Configuration option activation/mirror_log_fault_policy.
+ # Defines how a device failure in a 'mirror' log LV is handled.
+ # The mirror_image_fault_policy description for mirrored LVs
+ # also applies to mirrored log LVs.
+ mirror_log_fault_policy="allocate"
+
+ # Configuration option activation/mirror_device_fault_policy.
+ # This has been replaced by the mirror_image_fault_policy setting.
+ mirror_device_fault_policy="remove"
+
+ # Configuration option activation/snapshot_autoextend_threshold.
+ # Auto-extend a snapshot when its usage exceeds this percent.
+ # Setting this to 100 disables automatic extension.
+ # The minimum value is 50 (a smaller value is treated as 50.)
+ # Also see snapshot_autoextend_percent.
+ # Automatic extension requires dmeventd to be monitoring the LV.
+ # Example:
+ # With snapshot_autoextend_threshold 70 and
+ # snapshot_autoextend_percent 20, whenever a snapshot
+ # exceeds 70% usage, it will be extended by another 20%.
+ # For a 1G snapshot, using 700M will trigger a resize to 1.2G.
+ # When the usage exceeds 840M, the snapshot will be extended
+ # to 1.44G, and so on.
+ snapshot_autoextend_threshold=100
+
+ # Configuration option activation/snapshot_autoextend_percent.
+ # Auto-extending a snapshot adds this percent extra space.
+ # The amount of additional space added to a snapshot is this
+ # percent of its current size.
+ # Also see snapshot_autoextend_threshold.
+ snapshot_autoextend_percent=20
+
+ # Configuration option activation/thin_pool_autoextend_threshold.
+ # Auto-extend a thin pool when its usage exceeds this percent.
+ # Setting this to 100 disables automatic extension.
+ # The minimum value is 50 (a smaller value is treated as 50.)
+ # Also see thin_pool_autoextend_percent.
+ # Automatic extension requires dmeventd to be monitoring the LV.
+ # Example:
+ # With thin_pool_autoextend_threshold 70 and
+ # thin_pool_autoextend_percent 20, whenever a thin pool
+ # exceeds 70% usage, it will be extended by another 20%.
+ # For a 1G thin pool, using up 700M will trigger a resize to 1.2G.
+ # When the usage exceeds 840M, the thin pool will be extended
+ # to 1.44G, and so on.
+ thin_pool_autoextend_threshold=100
+
+ # Configuration option activation/thin_pool_autoextend_percent.
+ # 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
+
+ # Configuration option activation/mlock_filter.
+ # Do not mlock these memory areas.
+ # While activating devices, I/O to devices being
+ # (re)configured is suspended. As a precaution against
+ # deadlocks, LVM pins memory it is using so it is not
+ # paged out, and will not require I/O to reread.
+ # Groups of pages that are known not to be accessed during
+ # activation do not need to be pinned into memory.
+ # Each string listed in this setting is compared against
+ # each line in /proc/self/maps, and the pages corresponding
+ # to lines that match are not pinned. On some systems,
+ # locale-archive was found to make up over 80% of the memory
+ # used by the process.
+ # Example:
+ # mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
+ # This configuration option does not have a default value defined.
+# mlock_filter=[]
+
+ # Configuration option activation/use_mlockall.
+ # Use the old behavior of mlockall to pin all memory.
+ # Prior to version 2.02.62, LVM used mlockall() to pin
+ # the whole process's memory while activating devices.
+ use_mlockall=0
+
+ # Configuration option activation/monitoring.
+ # Monitor LVs that are activated.
+ # When enabled, LVM will ask dmeventd to monitor LVs
+ # that are activated.
+ # The '--ignoremonitoring' option overrides this setting.
+ monitoring=1
+
+ # Configuration option activation/polling_interval.
+ # Check pvmove or lvconvert progress at this interval (seconds)
+ # When pvmove or lvconvert must wait for the kernel to finish
+ # synchronising or merging data, they check and report progress
+ # at intervals of this number of seconds.
+ # If this is set to 0 and there is only one thing to wait for,
+ # there are no progress reports, but the process is awoken
+ # immediately once the operation is complete.
+ polling_interval=15
+
+ # Configuration option activation/auto_set_activation_skip.
+ # Set the activation skip flag on new thin snapshot LVs.
+ # An LV can have a persistent 'activation skip' flag.
+ # The flag causes the LV to be skipped during normal activation.
+ # The lvchange/vgchange -K option is required to activate LVs
+ # that have the activation skip flag set.
+ # When this setting is enabled, the activation skip flag is
+ # set on new thin snapshot LVs.
+ # The '--setactivationskip y|n' option overrides this setting.
+ auto_set_activation_skip=1
+
+ # Configuration option activation/activation_mode.
+ # How LVs with missing devices are activated.
+ # Possible options are: complete, degraded, partial.
+ # complete - Only allow activation of an LV if all of
+ # the Physical Volumes it uses are present. Other PVs
+ # in the Volume Group may be missing.
+ # degraded - Like complete, but additionally RAID LVs of
+ # segment type raid1, raid4, raid5, radid6 and raid10 will
+ # be activated if there is no data loss, i.e. they have
+ # sufficient redundancy to present the entire addressable
+ # range of the Logical Volume.
+ # partial - Allows the activation of any LV even if a
+ # missing or failed PV could cause data loss with a
+ # portion of the Logical Volume inaccessible.
+ # This setting should not normally be used, but may
+ # sometimes assist with data recovery.
+ # The '--activationmode' option overrides this setting.
+ activation_mode="degraded"
+}
+
+# Configuration section metadata.
+# This configuration section is advanced.
+metadata {
+
+ # Configuration option metadata/pvmetadatacopies.
+ # Number of copies of metadata to store on each PV.
+ # Possible options are: 0, 1, 2.
+ # If set to 2, two copies of the VG metadata are stored on
+ # the PV, one at the front of the PV, and one at the end.
+ # If set to 1, one copy is stored at the front of the PV.
+ # If set to 0, no copies are stored on the PV. This may
+ # be useful with VGs containing large numbers of PVs.
+ # The '--pvmetadatacopies' option overrides this setting.
+ # This configuration option is advanced.
+ pvmetadatacopies=1
+
+ # Configuration option metadata/vgmetadatacopies.
+ # Number of copies of metadata to maintain for each VG.
+ # If set to a non-zero value, LVM automatically chooses which of
+ # the available metadata areas to use to achieve the requested
+ # number of copies of the VG metadata. If you set a value larger
+ # than the the total number of metadata areas available, then
+ # metadata is stored in them all.
+ # The value 0 (unmanaged) disables this automatic management
+ # and allows you to control which metadata areas are used at
+ # the individual PV level using 'pvchange --metadataignore y|n'.
+ # The '--vgmetadatacopies' option overrides this setting.
+ # This configuration option is advanced.
+ vgmetadatacopies=0
+
+ # Configuration option metadata/pvmetadatasize.
+ # Approximate number of sectors to use for each metadata copy.
+ # VGs with large numbers of PVs or LVs, or VGs containing
+ # complex LV structures, may need additional space for VG
+ # metadata. The metadata areas are treated as circular buffers,
+ # so unused space becomes filled with an archive of the most
+ # recent previous versions of the metadata.
+ # This configuration option is advanced.
+ pvmetadatasize=255
+
+ # Configuration option metadata/pvmetadataignore.
+ # Ignore metadata areas on a new PV.
+ # If metadata areas on a PV are ignored, LVM will not store
+ # metadata in them.
+ # The '--metadataignore' option overrides this setting.
+ # This configuration option is advanced.
+ pvmetadataignore=0
+
+ # Configuration option metadata/stripesize.
+ # This configuration option is advanced.
+ stripesize=64
+
+ # Configuration option metadata/dirs.
+ # Directories holding live copies of text format metadata.
+ # These directories must not be on logical volumes!
+ # It's possible to use LVM with a couple of directories here,
+ # preferably on different (non-LV) filesystems, and with no other
+ # on-disk metadata (pvmetadatacopies = 0). Or this can be in
+ # addition to on-disk metadata areas.
+ # The feature was originally added to simplify testing and is not
+ # supported under low memory situations - the machine could lock up.
+ # Never edit any files in these directories by hand unless you
+ # you are absolutely sure you know what you are doing! Use
+ # the supplied toolset to make changes (e.g. vgcfgrestore).
+ # Example:
+ # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
+ # This configuration option is advanced.
+ # This configuration option does not have a default value defined.
+# dirs=[]
+
+ # Configuration section metadata/disk_areas.
+ # This configuration section is advanced.
+ # This configuration section is not officially supported.
+ # This configuration section does not have a default value defined.
+# disk_areas {
+
+ # Configuration section metadata/disk_areas/<disk_area>.
+ # This configuration section is advanced.
+ # This configuration section is not officially supported.
+ # This configuration section has variable name.
+ # This configuration section does not have a default value defined.
+# disk_area {
+
+ # Configuration option metadata/disk_areas/<disk_area>/start_sector.
+ # This configuration option is advanced.
+ # This configuration option is not officially supported.
+ # This configuration option does not have a default value defined.
+# start_sector=0
+
+ # Configuration option metadata/disk_areas/<disk_area>/size.
+ # This configuration option is advanced.
+ # This configuration option is not officially supported.
+ # This configuration option does not have a default value defined.
+# size=0
+
+ # Configuration option metadata/disk_areas/<disk_area>/id.
+ # This configuration option is advanced.
+ # This configuration option is not officially supported.
+ # This configuration option does not have a default value defined.
+# id=""
+# }
+# }
+}
+
+# Configuration section report.
+# LVM report command output formatting.
+# This configuration section is advanced.
+report {
+
+ # Configuration option report/compact_output.
+ # Do not print empty report fields.
+ # Fields that don't have a value set for any of the rows
+ # reported are skipped and not printed. Compact output is
+ # applicable only if report/buffered is enabled.
+ compact_output=0
+
+ # Configuration option report/aligned.
+ # Align columns in report output.
+ aligned=1
+
+ # Configuration option report/buffered.
+ # Buffer report output.
+ # When buffered reporting is used, the report's content is appended
+ # incrementally to include each object being reported until the report
+ # is flushed to output which normally happens at the end of command
+ # execution. Otherwise, if buffering is not used, each object is
+ # reported as soon as its processing is finished.
+ buffered=1
+
+ # Configuration option report/headings.
+ # Show headings for columns on report.
+ headings=1
+
+ # Configuration option report/separator.
+ # A separator to use on report after each field.
+ separator=" "
+
+ # Configuration option report/list_item_separator.
+ # A separator to use for list items when reported.
+ list_item_separator=","
+
+ # Configuration option report/prefixes.
+ # Use a field name prefix for each field reported.
+ prefixes=0
+
+ # Configuration option report/quoted.
+ # Quote field values when using field name prefixes.
+ quoted=1
+
+ # Configuration option report/colums_as_rows.
+ # Output each column as a row.
+ # If set, this also implies report/prefixes=1.
+ colums_as_rows=0
+
+ # Configuration option report/binary_values_as_numeric.
+ # Use binary values 0 or 1 instead of descriptive literal values.
+ # For columns that have exactly two valid values to report
+ # (not counting the 'unknown' value which denotes that the
+ # value could not be determined).
+ binary_values_as_numeric=0
+
+ # Configuration option report/devtypes_sort.
+ # List of columns to sort by when reporting 'lvm devtypes' command.
+ # See 'lvm devtypes -o help' for the list of possible fields.
+ devtypes_sort="devtype_name"
+
+ # Configuration option report/devtypes_cols.
+ # List of columns to report for 'lvm devtypes' command.
+ # See 'lvm devtypes -o help' for the list of possible fields.
+ devtypes_cols="devtype_name,devtype_max_partitions,devtype_description"
+
+ # Configuration option report/devtypes_cols_verbose.
+ # List of columns to report for 'lvm devtypes' command in verbose mode.
+ # See 'lvm devtypes -o help' for the list of possible fields.
+ devtypes_cols_verbose="devtype_name,devtype_max_partitions,devtype_description"
+
+ # Configuration option report/lvs_sort.
+ # List of columns to sort by when reporting 'lvs' command.
+ # See 'lvs -o help' for the list of possible fields.
+ lvs_sort="vg_name,lv_name"
+
+ # Configuration option report/lvs_cols.
+ # List of columns to report for 'lvs' command.
+ # See 'lvs -o help' for the list of possible fields.
+ lvs_cols="lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv"
+
+ # Configuration option report/lvs_cols_verbose.
+ # List of columns to report for 'lvs' command in verbose mode.
+ # See 'lvs -o help' for the list of possible fields.
+ lvs_cols_verbose="lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert_lv,lv_uuid,lv_profile"
+
+ # Configuration option report/vgs_sort.
+ # List of columns to sort by when reporting 'vgs' command.
+ # See 'vgs -o help' for the list of possible fields.
+ vgs_sort="vg_name"
+
+ # Configuration option report/vgs_cols.
+ # List of columns to report for 'vgs' command.
+ # See 'vgs -o help' for the list of possible fields.
+ vgs_cols="vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
+
+ # Configuration option report/vgs_cols_verbose.
+ # List of columns to report for 'vgs' command in verbose mode.
+ # See 'vgs -o help' for the list of possible fields.
+ vgs_cols_verbose="vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
+
+ # Configuration option report/pvs_sort.
+ # List of columns to sort by when reporting 'pvs' command.
+ # See 'pvs -o help' for the list of possible fields.
+ pvs_sort="pv_name"
+
+ # Configuration option report/pvs_cols.
+ # List of columns to report for 'pvs' command.
+ # See 'pvs -o help' for the list of possible fields.
+ pvs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
+
+ # Configuration option report/pvs_cols_verbose.
+ # List of columns to report for 'pvs' command in verbose mode.
+ # See 'pvs -o help' for the list of possible fields.
+ pvs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
+
+ # Configuration option report/segs_sort.
+ # List of columns to sort by when reporting 'lvs --segments' command.
+ # See 'lvs --segments -o help' for the list of possible fields.
+ segs_sort="vg_name,lv_name,seg_start"
+
+ # Configuration option report/segs_cols.
+ # List of columns to report for 'lvs --segments' command.
+ # See 'lvs --segments -o help' for the list of possible fields.
+ segs_cols="lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
+
+ # Configuration option report/segs_cols_verbose.
+ # List of columns to report for 'lvs --segments' command in verbose mode.
+ # See 'lvs --segments -o help' for the list of possible fields.
+ segs_cols_verbose="lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
+
+ # Configuration option report/pvsegs_sort.
+ # List of columns to sort by when reporting 'pvs --segments' command.
+ # See 'pvs --segments -o help' for the list of possible fields.
+ pvsegs_sort="pv_name,pvseg_start"
+
+ # Configuration option report/pvsegs_cols.
+ # List of columns to sort by when reporting 'pvs --segments' command.
+ # See 'pvs --segments -o help' for the list of possible fields.
+ pvsegs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
+
+ # Configuration option report/pvsegs_cols_verbose.
+ # List of columns to sort by when reporting 'pvs --segments' command in verbose mode.
+ # See 'pvs --segments -o help' for the list of possible fields.
+ pvsegs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
+}
+
+# Configuration section dmeventd.
+# Settings for the LVM event daemon.
+dmeventd {
+
+ # Configuration option dmeventd/mirror_library.
+ # The library dmeventd uses when monitoring a mirror device.
+ # libdevmapper-event-lvm2mirror.so attempts to recover from
+ # failures. It removes failed devices from a volume group and
+ # reconfigures a mirror as necessary. If no mirror library is
+ # provided, mirrors are not monitored through dmeventd.
+ mirror_library="libdevmapper-event-lvm2mirror.so"
+
+ # Configuration option dmeventd/raid_library.
+ raid_library="libdevmapper-event-lvm2raid.so"
+
+ # Configuration option dmeventd/snapshot_library.
+ # The library dmeventd uses when monitoring a snapshot device.
+ # libdevmapper-event-lvm2snapshot.so monitors the filling of
+ # snapshots and emits a warning through syslog when the usage
+ # exceeds 80%. The warning is repeated when 85%, 90% and
+ # 95% of the snapshot is filled.
+ snapshot_library="libdevmapper-event-lvm2snapshot.so"
+
+ # Configuration option dmeventd/thin_library.
+ # The library dmeventd uses when monitoring a thin device.
+ # libdevmapper-event-lvm2thin.so monitors the filling of
+ # a pool and emits a warning through syslog when the usage
+ # exceeds 80%. The warning is repeated when 85%, 90% and
+ # 95% of the pool is filled.
+ thin_library="libdevmapper-event-lvm2thin.so"
+
+ # Configuration option dmeventd/executable.
+ # The full path to the dmeventd binary.
+ executable="@DMEVENTD_PATH@"
+}
+
+# Configuration section tags.
+# Host tag settings.
+tags {
+
+ # Configuration option tags/hosttags.
+ # Create a host tag using the machine name.
+ # The machine name is nodename returned by uname(2).
+ hosttags=0
+
+ # Configuration section tags/<tag>.
+ # Replace this subsection name with a custom tag name.
+ # Multiple subsections like this can be created.
+ # The '@' prefix for tags is optional.
+ # This subsection can contain host_list, which is a
+ # list of machine names. If the name of the local
+ # machine is found in host_list, then the name of
+ # this subsection is used as a tag and is applied
+ # to the local machine as a 'host tag'.
+ # If this subsection is empty (has no host_list), then
+ # the subsection name is always applied as a 'host tag'.
+ # Example:
+ # The host tag foo is given to all hosts, and the host tag
+ # 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.
+ # A list of machine names.
+ # These machine names are compared to the nodename
+ # returned by uname(2). If the local machine name
+ # 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=""
+# }
+}
diff --git a/conf/lvmlocal.conf.in b/conf/lvmlocal.conf.in
index e69de29..23689e8 100644
--- a/conf/lvmlocal.conf.in
+++ b/conf/lvmlocal.conf.in
@@ -0,0 +1,53 @@
+# This is a local configuration file template for the LVM2 system
+# which should be installed as @DEFAULT_SYS_DIR@/lvmlocal.conf .
+#
+# Refer to 'man lvm.conf' for information about the file layout.
+#
+# To put this file in a different directory and override
+# @DEFAULT_SYS_DIR@ set the environment variable LVM_SYSTEM_DIR before
+# running the tools.
+#
+# The lvmlocal.conf file is normally expected to contain only the
+# "local" section which contains settings that should not be shared or
+# repeated among different hosts. (But if other sections are present,
+# they *will* get processed. Settings in this file override equivalent
+# ones in lvm.conf and are in turn overridden by ones in any enabled
+# lvm_<tag>.conf files.)
+#
+# Please take care that each setting only appears once if uncommenting
+# example settings in this file and never copy this file between hosts.
+
+
+# Configuration section local.
+# LVM settings that are specific to the local host.
+local {
+
+ # Configuration option local/system_id.
+ # Defines the local system ID for lvmlocal mode.
+ # This is used when global/system_id_source is set
+ # to 'lvmlocal' in the main configuration file,
+ # e.g. lvm.conf.
+ # When used, it must be set to a unique value
+ # among all hosts sharing access to the storage,
+ # e.g. a host name.
+ # Example:
+ # Set no system ID.
+ # system_id = ""
+ # Example:
+ # Set the system_id to the string 'host1'.
+ # system_id = "host1"
+ # This configuration option does not have a default value defined.
+# system_id=""
+
+ # Configuration option local/extra_system_ids.
+ # A list of extra VG system IDs the local host can access.
+ # VGs with the system IDs listed here (in addition
+ # to the host's own system ID) can be fully accessed
+ # by the local host. (These are system IDs that the
+ # host sees in VGs, not system IDs that identify the
+ # local host, which is determined by system_id_source.)
+ # 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=[]
+}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=47ed4cdc35d3ce6d…
Commit: 47ed4cdc35d3ce6d0923ce05765f08fa7e85a6f9
Parent: 9b86e8e8f4a3c429f8e5632103fbef6eb1f8dc7d
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Apr 15 16:15:30 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 21 14:55:03 2015 -0500
config: remove duplication of settings
The specific config settings have been removed
from the lvm.conf(5) man page, and replaced with
a description of how to use lvm dumpconfig to
view the settings.
The sample lvm.conf and lvmlocal.conf files are now generated:
example.conf.base - initial ungenerated part of the file
example.conf.gen - generated portion from dumpconfig
example.conf.in - combination of .base and .gen files
example.conf - result of configure processing .in file
lvmlocal.conf.base - initial ungenerated part of the file
lvmlocal.conf.gen - generated portion from dumpconfig
lvmlocal.conf.in - combination of .base and .gen files
lvmlocal.conf - result of configure processing .in file
Do not edit the .in files, but edit config_settings.h
or the .base files, and then use 'make generate' to create
the new .in files.
- configure
with options
- make
creates tools/lvm
- make generate
uses tools/lvm to create example.conf.in and lvmlocal.conf.in
by combining .base files with dumpconfig output.
- configure
with same options as above
creates example.conf and lvmlocal.conf from .in files
---
Makefile.in | 5 +
conf/Makefile.in | 8 +
conf/example.conf.base | 12 +
conf/example.conf.in | 1384 -----------------------------------------------
conf/lvmlocal.conf.base | 19 +
conf/lvmlocal.conf.in | 54 --
make.tmpl.in | 4 +
man/lvm.conf.5.in | 538 ++-----------------
8 files changed, 90 insertions(+), 1934 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index a7bed8e..bce7bee 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -95,6 +95,11 @@ DISTCLEAN_TARGETS += cscope.out
check check_system check_cluster check_local check_lvmetad unit: all
$(MAKE) -C test $(@)
+conf.generate: tools
+
+generate: conf.generate
+ $(MAKE) -C conf generate
+
install_system_dirs:
$(INSTALL_DIR) $(DESTDIR)$(DEFAULT_SYS_DIR)
$(INSTALL_ROOT_DIR) $(DESTDIR)$(DEFAULT_ARCHIVE_DIR)
diff --git a/conf/Makefile.in b/conf/Makefile.in
index 2d48fb9..33f91c4 100644
--- a/conf/Makefile.in
+++ b/conf/Makefile.in
@@ -26,6 +26,14 @@ include $(top_builddir)/make.tmpl
.PHONY: install_conf install_localconf install_profiles
+generate:
+ $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withfullcomments --ignorelocal > example.conf.gen
+ cat example.conf.base example.conf.gen > example.conf.in
+ rm example.conf.gen
+ $(top_builddir)/tools/lvm dumpconfig --type default --unconfigured --withfullcomments local > lvmlocal.conf.gen
+ cat lvmlocal.conf.base lvmlocal.conf.gen > lvmlocal.conf.in
+ rm lvmlocal.conf.gen
+
install_conf: $(CONFSRC)
@if [ ! -e $(confdir)/$(CONFDEST) ]; then \
echo "$(INSTALL_WDATA) -D $< $(confdir)/$(CONFDEST)"; \
diff --git a/conf/example.conf.base b/conf/example.conf.base
new file mode 100644
index 0000000..e4f4761
--- /dev/null
+++ b/conf/example.conf.base
@@ -0,0 +1,12 @@
+# This is an example configuration file for the LVM2 system.
+# It contains the default settings that would be used if there was no
+# @DEFAULT_SYS_DIR@/lvm.conf file.
+#
+# Refer to 'man lvm.conf' for further information including the file layout.
+#
+# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set
+# the environment variable LVM_SYSTEM_DIR before running the tools.
+#
+# N.B. Take care that each setting only appears once if uncommenting
+# example settings in this file.
+
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 1863a89..e69de29 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -1,1384 +0,0 @@
-# This is an example configuration file for the LVM2 system.
-# It contains the default settings that would be used if there was no
-# @DEFAULT_SYS_DIR@/lvm.conf file.
-#
-# Refer to 'man lvm.conf' for further information including the file layout.
-#
-# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set
-# the environment variable LVM_SYSTEM_DIR before running the tools.
-#
-# N.B. Take care that each setting only appears once if uncommenting
-# example settings in this file.
-
-# This section allows you to set the way the configuration settings are handled.
-config {
-
- # If enabled, any LVM2 configuration mismatch is reported.
- # This implies checking that the configuration key is understood
- # by LVM2 and that the value of the key is of a proper type.
- # If disabled, any configuration mismatch is ignored and default
- # value is used instead without any warning (a message about the
- # configuration key not being found is issued in verbose mode only).
- checks = 1
-
- # If enabled, any configuration mismatch aborts the LVM2 process.
- abort_on_errors = 0
-
- # Directory where LVM looks for configuration profiles.
- profile_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_PROFILE_SUBDIR@"
-}
-
-# This section allows you to configure which block devices should
-# be used by the LVM system.
-devices {
-
- # Where do you want your volume groups to appear ?
- dir = "/dev"
-
- # An array of directories that contain the device nodes you wish
- # to use with LVM2.
- scan = [ "/dev" ]
-
- # Select external device information source to use for further and more
- # detailed device determination. Some information may already be available
- # in the system and LVM2 can use this information to determine the exact
- # type or use of the device it processes. Using existing external device
- # information source can speed up device processing as LVM2 does not need
- # to run its own native routines to acquire this information. For example,
- # such information is used to drive LVM2 filtering like MD component
- # detection, multipath component detection, partition detection and others.
- # Possible options are:
- # "none" - No external device information source is used.
- #
- # "udev" - Reuse existing udev database records. Applicable
- # only if LVM is compiled with udev support.
- #
- external_device_info_source = "none"
-
- # If set, the cache of block device nodes with all associated symlinks
- # will be constructed out of the existing udev database content.
- # This avoids using and opening any inapplicable non-block devices or
- # subdirectories found in the device directory. This setting is applied
- # to udev-managed device directory only, other directories will be scanned
- # fully. LVM2 needs to be compiled with udev support for this setting to
- # take effect. N.B. Any device node or symlink not managed by udev in
- # udev directory will be ignored with this setting on.
- obtain_device_list_from_udev = 1
-
- # If several entries in the scanned directories correspond to the
- # same block device and the tools need to display a name for device,
- # all the pathnames are matched against each item in the following
- # list of regular expressions in turn and the first match is used.
-
- # By default no preferred names are defined.
- # preferred_names = [ ]
-
- # Try to avoid using undescriptive /dev/dm-N names, if present.
- # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
-
- # In case no prefererred name matches or if preferred_names are not
- # defined at all, builtin rules are used to determine the preference.
- #
- # The first builtin rule checks path prefixes and it gives preference
- # based on this ordering (where "dev" depends on devices/dev setting):
- # /dev/mapper > /dev/disk > /dev/dm-* > /dev/block
- #
- # If the ordering above cannot be applied, the path with fewer slashes
- # gets preference then.
- #
- # If the number of slashes is the same, a symlink gets preference.
- #
- # Finally, if all the rules mentioned above are not applicable,
- # lexicographical order is used over paths and the smallest one
- # of all gets preference.
-
-
- # A filter that tells LVM2 to only use a restricted set of devices.
- # The filter consists of an array of regular expressions. These
- # expressions can be delimited by a character of your choice, and
- # prefixed with either an 'a' (for accept) or 'r' (for reject).
- # The first expression found to match a device name determines if
- # the device will be accepted or rejected (ignored). Devices that
- # don't match any patterns are accepted.
-
- # Be careful if there there are symbolic links or multiple filesystem
- # entries for the same device as each name is checked separately against
- # the list of patterns. The effect is that if the first pattern in the
- # list to match a name is an 'a' pattern for any of the names, the device
- # is accepted; otherwise if the first pattern in the list to match a name
- # is an 'r' pattern for any of the names it is rejected; otherwise it is
- # accepted.
-
- # Don't have more than one filter line active at once: only one gets used.
-
- # Run vgscan after you change this parameter to ensure that
- # the cache file gets regenerated (see below).
- # If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
-
- # If lvmetad is used, then see "A note about device filtering while
- # lvmetad is used" comment that is attached to global/use_lvmetad setting.
-
- # By default we accept every block device:
- # filter = [ "a/.*/" ]
-
- # Exclude the cdrom drive
- # filter = [ "r|/dev/cdrom|" ]
-
- # When testing I like to work with just loopback devices:
- # filter = [ "a/loop/", "r/.*/" ]
-
- # Or maybe all loops and ide drives except hdc:
- # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
-
- # Use anchors if you want to be really specific
- # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
-
- # Since "filter" is often overridden from command line, it is not suitable
- # for system-wide device filtering (udev rules, lvmetad). To hide devices
- # from LVM-specific udev processing and/or from lvmetad, you need to set
- # global_filter. The syntax is the same as for normal "filter"
- # above. Devices that fail the global_filter are not even opened by LVM.
-
- # global_filter = []
-
- # The results of the filtering are cached on disk to avoid
- # rescanning dud devices (which can take a very long time).
- # By default this cache is stored in the @DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@ directory
- # in a file called '.cache'.
- # It is safe to delete the contents: the tools regenerate it.
- # (The old setting 'cache' is still respected if neither of
- # these new ones is present.)
- # N.B. If obtain_device_list_from_udev is set to 1 the list of
- # devices is instead obtained from udev and any existing .cache
- # file is removed.
- cache_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@"
- cache_file_prefix = ""
-
- # You can turn off writing this cache file by setting this to 0.
- write_cache_state = 1
-
- # Advanced settings.
-
- # List of pairs of additional acceptable block device types found
- # in /proc/devices with maximum (non-zero) number of partitions.
- # types = [ "fd", 16 ]
-
- # If sysfs is mounted (2.6 kernels) restrict device scanning to
- # the block devices it believes are valid.
- # 1 enables; 0 disables.
- sysfs_scan = 1
-
- # By default, LVM2 will ignore devices used as component paths
- # of device-mapper multipath devices.
- # 1 enables; 0 disables.
- multipath_component_detection = 1
-
- # By default, LVM2 will ignore devices used as components of
- # software RAID (md) devices by looking for md superblocks.
- # 1 enables; 0 disables.
- md_component_detection = 1
-
- # By default, LVM2 will not ignore devices used as components of
- # firmware RAID devices. Set to 1 to enable this detection.
- # N.B. LVM2 itself is not detecting firmware RAID - an
- # external_device_info_source other than "none" must
- # be used for this detection to execute.
- # 1 enables; 0 disables
- fw_raid_component_detection = 0
-
- # By default, if a PV is placed directly upon an md device, LVM2
- # will align its data blocks with the md device's stripe-width.
- # 1 enables; 0 disables.
- md_chunk_alignment = 1
-
- # Default alignment of the start of a data area in MB. If set to 0,
- # a value of 64KB will be used. Set to 1 for 1MiB, 2 for 2MiB, etc.
- # default_data_alignment = @DEFAULT_DATA_ALIGNMENT@
-
- # By default, the start of a PV's data area will be a multiple of
- # the 'minimum_io_size' or 'optimal_io_size' exposed in sysfs.
- # - minimum_io_size - the smallest request the device can perform
- # w/o incurring a read-modify-write penalty (e.g. MD's chunk size)
- # - optimal_io_size - the device's preferred unit of receiving I/O
- # (e.g. MD's stripe width)
- # minimum_io_size is used if optimal_io_size is undefined (0).
- # If md_chunk_alignment is enabled, that detects the optimal_io_size.
- # This setting takes precedence over md_chunk_alignment.
- # 1 enables; 0 disables.
- data_alignment_detection = 1
-
- # Alignment (in KB) of start of data area when creating a new PV.
- # md_chunk_alignment and data_alignment_detection are disabled if set.
- # Set to 0 for the default alignment (see: data_alignment_default)
- # or page size, if larger.
- data_alignment = 0
-
- # By default, the start of the PV's aligned data area will be shifted by
- # the 'alignment_offset' exposed in sysfs. This offset is often 0 but
- # may be non-zero; e.g.: certain 4KB sector drives that compensate for
- # windows partitioning will have an alignment_offset of 3584 bytes
- # (sector 7 is the lowest aligned logical block, the 4KB sectors start
- # at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).
- # But note that pvcreate --dataalignmentoffset will skip this detection.
- # 1 enables; 0 disables.
- data_alignment_offset_detection = 1
-
- # If, while scanning the system for PVs, LVM2 encounters a device-mapper
- # device that has its I/O suspended, it waits for it to become accessible.
- # Set this to 1 to skip such devices. This should only be needed
- # in recovery situations.
- ignore_suspended_devices = 0
-
- # ignore_lvm_mirrors: Introduced in version 2.02.104
- # This setting determines whether logical volumes of "mirror" segment
- # type are scanned for LVM labels. This affects the ability of
- # mirrors to be used as physical volumes. If 'ignore_lvm_mirrors'
- # is set to '1', it becomes impossible to create volume groups on top
- # of mirror logical volumes - i.e. to stack volume groups on mirrors.
- #
- # Allowing mirror logical volumes to be scanned (setting the value to '0')
- # can potentially cause LVM processes and I/O to the mirror to become
- # blocked. This is due to the way that the "mirror" segment type handles
- # failures. In order for the hang to manifest itself, an LVM command must
- # be run just after a failure and before the automatic LVM repair process
- # takes place OR there must be failures in multiple mirrors in the same
- # volume group at the same time with write failures occurring moments
- # before a scan of the mirror's labels.
- #
- # Note that these scanning limitations do not apply to the LVM RAID
- # types, like "raid1". The RAID segment types handle failures in a
- # different way and are not subject to possible process or I/O blocking.
- #
- # It is encouraged that users set 'ignore_lvm_mirrors' to 1 if they
- # are using the "mirror" segment type. Users that require volume group
- # stacking on mirrored logical volumes should consider using the "raid1"
- # segment type. The "raid1" segment type is not available for
- # active/active clustered volume groups.
- #
- # Set to 1 to disallow stacking and thereby avoid a possible deadlock.
- ignore_lvm_mirrors = 1
-
- # During each LVM operation errors received from each device are counted.
- # If the counter of a particular device exceeds the limit set here, no
- # further I/O is sent to that device for the remainder of the respective
- # operation. Setting the parameter to 0 disables the counters altogether.
- disable_after_error_count = 0
-
- # Allow use of pvcreate --uuid without requiring --restorefile.
- require_restorefile_with_uuid = 1
-
- # Minimum size (in KB) of block devices which can be used as PVs.
- # In a clustered environment all nodes must use the same value.
- # Any value smaller than 512KB is ignored.
-
- # Ignore devices smaller than 2MB such as floppy drives.
- pv_min_size = 2048
-
- # The original built-in setting was 512 up to and including version 2.02.84.
- # pv_min_size = 512
-
- # Issue discards to a logical volumes's underlying physical volume(s) when
- # the logical volume is no longer using the physical volumes' space (e.g.
- # lvremove, lvreduce, etc). Discards inform the storage that a region is
- # no longer in use. Storage that supports discards advertise the protocol
- # specific way discards should be issued by the kernel (TRIM, UNMAP, or
- # WRITE SAME with UNMAP bit set). Not all storage will support or benefit
- # from discards but SSDs and thinly provisioned LUNs generally do. If set
- # to 1, discards will only be issued if both the storage and kernel provide
- # support.
- # 1 enables; 0 disables.
- issue_discards = 0
-}
-
-# This section allows you to configure the way in which LVM selects
-# free space for its Logical Volumes.
-allocation {
-
- # When searching for free space to extend an LV, the "cling"
- # allocation policy will choose space on the same PVs as the last
- # segment of the existing LV. If there is insufficient space and a
- # list of tags is defined here, it will check whether any of them are
- # attached to the PVs concerned and then seek to match those PV tags
- # between existing extents and new extents.
- # Use the special tag "@*" as a wildcard to match any PV tag.
-
- # Example: LVs are mirrored between two sites within a single VG.
- # PVs are tagged with either @site1 or @site2 to indicate where
- # they are situated.
-
- # cling_tag_list = [ "@site1", "@site2" ]
- # cling_tag_list = [ "@*" ]
-
- # Changes made in version 2.02.85 extended the reach of the 'cling'
- # policies to detect more situations where data can be grouped
- # onto the same disks. Set this to 0 to revert to the previous
- # algorithm.
- maximise_cling = 1
-
- # Whether to use blkid library instead of native LVM2 code to detect
- # any existing signatures while creating new Physical Volumes and
- # Logical Volumes. LVM2 needs to be compiled with blkid wiping support
- # for this setting to take effect.
- #
- # LVM2 native detection code is currently able to recognize these signatures:
- # - MD device signature
- # - swap signature
- # - LUKS signature
- # To see the list of signatures recognized by blkid, check the output
- # of 'blkid -k' command. The blkid can recognize more signatures than
- # LVM2 native detection code, but due to this higher number of signatures
- # to be recognized, it can take more time to complete the signature scan.
- use_blkid_wiping = 1
-
- # Set to 1 to detect any signatures found on newly-created Logical Volume
- # whenever zeroing of the LV is done (zeroing is controlled by -Z/--zero
- # option and if not specified, zeroing is used by default if possible).
- #
- # While zeroing simply overwrites first 4 KiB of the LV with zeroes without
- # doing any signature detection, signature wiping goes beyond that and it
- # can detect exact type and position of signature within the whole LV.
- # As such, it provides cleaner LV for use after creation as all known
- # signatures are wiped so that the LV is not claimed by other tools
- # incorrectly by the existence of old signature from any previous use.
- # The number of signatures that LVM can detect depends on detection
- # code that is selected - see also use_blkid_wiping option.
- #
- # Wiping of each detected signature must be confirmed.
- #
- # The default is to wipe signatures when zeroing. The command line
- # option -W/--wipesignatures takes precedence over this setting.
- #
- # Without this option set, signatures on newly-created Logical Volumes
- # are never detected and wiped and you always need to use
- # -W/--wipesignatures y option directly to enable this feature
- # no matter whether zeroing is used or not.
- wipe_signatures_when_zeroing_new_lvs = 1
-
- # Set to 1 to guarantee that mirror logs will always be placed on
- # different PVs from the mirror images. This was the default
- # until version 2.02.85.
- mirror_logs_require_separate_pvs = 0
-
- # Set to 1 to guarantee that cache_pool metadata will always be
- # placed on different PVs from the cache_pool data.
- cache_pool_metadata_require_separate_pvs = 0
-
- # Specify the minimal chunk size (in kiB) for cache pool volumes.
- # Using a chunk_size that is too large can result in wasteful use of
- # the cache, where small reads and writes can cause large sections of
- # an LV to be mapped into the cache. However, choosing a chunk_size
- # that is too small can result in more overhead trying to manage the
- # numerous chunks that become mapped into the cache. The former is
- # more of a problem than the latter in most cases, so we default to
- # a value that is on the smaller end of the spectrum. Supported values
- # range from 32(kiB) to 1048576 in multiples of 32.
- # cache_pool_chunk_size = 64
-
- # Specify the default cache mode used for new cache pools.
- # Possible options are:
- # "writethrough" - Data blocks are immediately written from
- # the cache to disk.
- # "writeback" - Data blocks are written from the cache
- # back to disk after some delay to improve
- # performance.
- # cache_pool_cachemode = "writethrough"
-
- # Set to 1 to guarantee that thin pool metadata will always
- # be placed on different PVs from the pool data.
- thin_pool_metadata_require_separate_pvs = 0
-
- # Specify chunk size calculation policy for thin pool volumes.
- # Possible options are:
- # "generic" - if thin_pool_chunk_size is defined, use it.
- # Otherwise, calculate the chunk size based on
- # estimation and device hints exposed in sysfs:
- # the minimum_io_size. The chunk size is always
- # at least 64KiB.
- #
- # "performance" - if thin_pool_chunk_size is defined, use it.
- # Otherwise, calculate the chunk size for
- # performance based on device hints exposed in
- # sysfs: the optimal_io_size. The chunk size is
- # always at least 512KiB.
- # thin_pool_chunk_size_policy = "generic"
-
- # Specify the minimal chunk size (in KB) for thin pool volumes.
- # Use of the larger chunk size may improve performance for plain
- # thin volumes, however using them for snapshot volumes is less efficient,
- # as it consumes more space and takes extra time for copying.
- # When unset, lvm tries to estimate chunk size starting from 64KB
- # Supported values are in range from 64 to 1048576.
- # thin_pool_chunk_size = 64
-
- # Specify discards behaviour of the thin pool volume.
- # Select one of "ignore", "nopassdown", "passdown"
- # thin_pool_discards = "passdown"
-
- # Set to 0, to disable zeroing of thin pool data chunks before their
- # first use.
- # N.B. zeroing larger thin pool chunk size degrades performance.
- # thin_pool_zero = 1
-
- # Default physical extent size to use for newly created VGs (in KB).
- # physical_extent_size = 4096
-}
-
-# This section that allows you to configure the nature of the
-# information that LVM2 reports.
-log {
-
- # Controls the messages sent to stdout or stderr.
- # There are three levels of verbosity, 3 being the most verbose.
- verbose = 0
-
- # Set to 1 to suppress all non-essential messages from stdout.
- # This has the same effect as -qq.
- # When this is set, the following commands still produce output:
- # dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay,
- # pvs, version, vgcfgrestore -l, vgdisplay, vgs.
- # Non-essential messages are shifted from log level 4 to log level 5
- # for syslog and lvm2_log_fn purposes.
- # Any 'yes' or 'no' questions not overridden by other arguments
- # are suppressed and default to 'no'.
- silent = 0
-
- # Should we send log messages through syslog?
- # 1 is yes; 0 is no.
- syslog = 1
-
- # Should we log error and debug messages to a file?
- # By default there is no log file.
- #file = "/var/log/lvm2.log"
-
- # Should we overwrite the log file each time the program is run?
- # By default we append.
- overwrite = 0
-
- # What level of log messages should we send to the log file and/or syslog?
- # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
- # 7 is the most verbose (LOG_DEBUG).
- level = 0
-
- # Format of output messages
- # Whether or not (1 or 0) to indent messages according to their severity
- indent = 1
-
- # Whether or not (1 or 0) to display the command name on each line output
- command_names = 0
-
- # A prefix to use before the message text (but after the command name,
- # if selected). Default is two spaces, so you can see/grep the severity
- # of each message.
- prefix = " "
-
- # To make the messages look similar to the original LVM tools use:
- # indent = 0
- # command_names = 1
- # prefix = " -- "
-
- # Set this if you want log messages during activation.
- # Don't use this in low memory situations (can deadlock).
- # activation = 0
-
- # Some debugging messages are assigned to a class and only appear
- # in debug output if the class is listed here.
- # Classes currently available:
- # memory, devices, activation, allocation, lvmetad, metadata, cache,
- # locking
- # Use "all" to see everything.
- debug_classes = [ "memory", "devices", "activation", "allocation",
- "lvmetad", "metadata", "cache", "locking" ]
-}
-
-# Configuration of metadata backups and archiving. In LVM2 when we
-# talk about a 'backup' we mean making a copy of the metadata for the
-# *current* system. The 'archive' contains old metadata configurations.
-# Backups are stored in a human readable text format.
-backup {
-
- # Should we maintain a backup of the current metadata configuration ?
- # Use 1 for Yes; 0 for No.
- # Think very hard before turning this off!
- backup = 1
-
- # Where shall we keep it ?
- # Remember to back up this directory regularly!
- backup_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_BACKUP_SUBDIR@"
-
- # Should we maintain an archive of old metadata configurations.
- # Use 1 for Yes; 0 for No.
- # On by default. Think very hard before turning this off.
- archive = 1
-
- # Where should archived files go ?
- # Remember to back up this directory regularly!
- archive_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_ARCHIVE_SUBDIR@"
-
- # What is the minimum number of archive files you wish to keep ?
- retain_min = 10
-
- # What is the minimum time you wish to keep an archive file for ?
- retain_days = 30
-}
-
-# Settings for the running LVM2 in shell (readline) mode.
-shell {
-
- # Number of lines of history to store in ~/.lvm_history
- history_size = 100
-}
-
-
-# Miscellaneous global LVM2 settings
-global {
- # The file creation mask for any files and directories created.
- # Interpreted as octal if the first digit is zero.
- umask = 077
-
- # Allow other users to read the files
- #umask = 022
-
- # Enabling test mode means that no changes to the on disk metadata
- # will be made. Equivalent to having the -t option on every
- # command. Defaults to off.
- test = 0
-
- # Default value for --units argument
- units = "h"
-
- # Since version 2.02.54, the tools distinguish between powers of
- # 1024 bytes (e.g. KiB, MiB, GiB) and powers of 1000 bytes (e.g.
- # KB, MB, GB).
- # If you have scripts that depend on the old behaviour, set this to 0
- # temporarily until you update them.
- si_unit_consistency = 1
-
- # Whether or not to display unit suffix for sizes. This setting has
- # no effect if the units are in human-readable form (global/units="h")
- # in which case the suffix is always displayed.
- suffix = 1
-
- # Whether or not to communicate with the kernel device-mapper.
- # Set to 0 if you want to use the tools to manipulate LVM metadata
- # without activating any logical volumes.
- # If the device-mapper kernel driver is not present in your kernel
- # setting this to 0 should suppress the error messages.
- activation = 1
-
- # If we can't communicate with device-mapper, should we try running
- # the LVM1 tools?
- # This option only applies to 2.4 kernels and is provided to help you
- # switch between device-mapper kernels and LVM1 kernels.
- # The LVM1 tools need to be installed with .lvm1 suffices
- # e.g. vgscan.lvm1 and they will stop working after you start using
- # the new lvm2 on-disk metadata format.
- # The default value is set when the tools are built.
- # fallback_to_lvm1 = 0
-
- # The default metadata format that commands should use - "lvm1" or "lvm2".
- # The command line override is -M1 or -M2.
- # Defaults to "lvm2".
- # format = "lvm2"
-
- # Location of /etc system configuration directory.
- etc = "@CONFDIR@"
-
- # Location of proc filesystem
- proc = "/proc"
-
- # Type of locking to use. Defaults to local file-based locking (1).
- # Turn locking off by setting to 0 (dangerous: risks metadata corruption
- # if LVM2 commands get run concurrently).
- # Type 2 uses the external shared library locking_library.
- # Type 3 uses built-in clustered locking.
- # Type 4 uses read-only locking which forbids any operations that might
- # change metadata.
- # Type 5 offers dummy locking for tools that do not need any locks.
- # You should not need to set this directly: the tools will select when
- # to use it instead of the configured locking_type. Do not use lvmetad or
- # the kernel device-mapper driver with this locking type.
- # It is used by the --readonly option that offers read-only access to
- # Volume Group metadata that cannot be locked safely because it belongs to
- # an inaccessible domain and might be in use, for example a virtual machine
- # image or a disk that is shared by a clustered machine.
- #
- # N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet
- # supported in clustered environment. If use_lvmetad=1 and locking_type=3
- # is set at the same time, LVM always issues a warning message about this
- # and then it automatically disables lvmetad use.
- locking_type = 1
-
- # Set to 0 to fail when a lock request cannot be satisfied immediately.
- wait_for_locks = 1
-
- # If using external locking (type 2) and initialisation fails,
- # with this set to 1 an attempt will be made to use the built-in
- # clustered locking.
- # If you are using a customised locking_library you should set this to 0.
- fallback_to_clustered_locking = 1
-
- # If an attempt to initialise type 2 or type 3 locking failed, perhaps
- # because cluster components such as clvmd are not running, with this set
- # to 1 an attempt will be made to use local file-based locking (type 1).
- # If this succeeds, only commands against local volume groups will proceed.
- # Volume Groups marked as clustered will be ignored.
- fallback_to_local_locking = 1
-
- # Local non-LV directory that holds file-based locks while commands are
- # in progress. A directory like /tmp that may get wiped on reboot is OK.
- locking_dir = "@DEFAULT_LOCK_DIR@"
-
- # Whenever there are competing read-only and read-write access requests for
- # a volume group's metadata, instead of always granting the read-only
- # requests immediately, delay them to allow the read-write requests to be
- # serviced. Without this setting, write access may be stalled by a high
- # volume of read-only requests.
- # NB. This option only affects locking_type = 1 viz. local file-based
- # locking.
- prioritise_write_locks = 1
-
- # Other entries can go here to allow you to load shared libraries
- # e.g. if support for LVM1 metadata was compiled as a shared library use
- # format_libraries = "liblvm2format1.so"
- # Full pathnames can be given.
-
- # Search this directory first for shared libraries.
- # library_dir = "/lib"
-
- # The external locking library to load if locking_type is set to 2.
- # locking_library = "liblvm2clusterlock.so"
-
- # Treat any internal errors as fatal errors, aborting the process that
- # encountered the internal error. Please only enable for debugging.
- abort_on_internal_errors = 0
-
- # Check whether CRC is matching when parsed VG is used multiple times.
- # This is useful to catch unexpected internal cached volume group
- # structure modification. Please only enable for debugging.
- detect_internal_vg_cache_corruption = 0
-
- # If set to 1, no operations that change on-disk metadata will be permitted.
- # Additionally, read-only commands that encounter metadata in need of repair
- # will still be allowed to proceed exactly as if the repair had been
- # performed (except for the unchanged vg_seqno).
- # Inappropriate use could mess up your system, so seek advice first!
- metadata_read_only = 0
-
- # 'mirror_segtype_default' defines which segtype will be used when the
- # shorthand '-m' option is used for mirroring. The possible options are:
- #
- # "mirror" - The original RAID1 implementation provided by LVM2/DM. It is
- # characterized by a flexible log solution (core, disk, mirrored)
- # and by the necessity to block I/O while reconfiguring in the
- # event of a failure.
- #
- # There is an inherent race in the dmeventd failure handling
- # logic with snapshots of devices using this type of RAID1 that
- # in the worst case could cause a deadlock.
- # Ref: https://bugzilla.redhat.com/show_bug.cgi?id=817130#c10
- #
- # "raid1" - This implementation leverages MD's RAID1 personality through
- # device-mapper. It is characterized by a lack of log options.
- # (A log is always allocated for every device and they are placed
- # on the same device as the image - no separate devices are
- # required.) This mirror implementation does not require I/O
- # to be blocked in the kernel in the event of a failure.
- # This mirror implementation is not cluster-aware and cannot be
- # used in a shared (active/active) fashion in a cluster.
- #
- # Specify the '--type <mirror|raid1>' option to override this default
- # setting.
- mirror_segtype_default = "@DEFAULT_MIRROR_SEGTYPE@"
-
- # 'raid10_segtype_default' determines the segment types used by default
- # when the '--stripes/-i' and '--mirrors/-m' arguments are both specified
- # during the creation of a logical volume.
- # Possible settings include:
- #
- # "raid10" - This implementation leverages MD's RAID10 personality through
- # device-mapper.
- #
- # "mirror" - LVM will layer the 'mirror' and 'stripe' segment types. It
- # will do this by creating a mirror on top of striped sub-LVs;
- # effectively creating a RAID 0+1 array. This is suboptimal
- # in terms of providing redundancy and performance. Changing to
- # this setting is not advised.
- # Specify the '--type <raid10|mirror>' option to override this default
- # setting.
- raid10_segtype_default = "@DEFAULT_RAID10_SEGTYPE@"
-
- # 'sparse_segtype_default' defines which segtype will be used when the
- # shorthand '-V and -L' option is used for sparse volume creation.
- #
- # "snapshot" - The original snapshot implementation provided by LVM2/DM.
- # It is using old snashot that mixes data and metadata within
- # a single COW storage volume and has poor performs when
- # the size of stored data passes hundereds of MB.
- #
- # "thin" - Newer implementation leverages thin provisioning target.
- # It has bigger minimal chunk size (64KiB) and uses separate volume
- # for metadata. It has better performance especially in case of
- # bigger data uses. This device type has also full snapshot support.
- #
- # Specify the '--type <snapshot|thin>' option to override this default
- # setting.
- sparse_segtype_default = "@DEFAULT_SPARSE_SEGTYPE@"
-
-
- # The default format for displaying LV names in lvdisplay was changed
- # in version 2.02.89 to show the LV name and path separately.
- # Previously this was always shown as /dev/vgname/lvname even when that
- # was never a valid path in the /dev filesystem.
- # Set to 1 to reinstate the previous format.
- #
- # lvdisplay_shows_full_device_path = 0
-
- # Whether to use (trust) a running instance of lvmetad. If this is set to
- # 0, all commands fall back to the usual scanning mechanisms. When set to 1
- # *and* when lvmetad is running (automatically instantiated by making use of
- # systemd's socket-based service activation or run as an initscripts service
- # or run manually), the volume group metadata and PV state flags are obtained
- # from the lvmetad instance and no scanning is done by the individual
- # commands. In a setup with lvmetad, lvmetad udev rules *must* be set up for
- # LVM to work correctly. Without proper udev rules, all changes in block
- # device configuration will be *ignored* until a manual 'pvscan --cache'
- # is performed. These rules are installed by default.
- #
- # If lvmetad has been running while use_lvmetad was 0, it MUST be stopped
- # before changing use_lvmetad to 1 and started again afterwards.
- #
- # If using lvmetad, volume activation is also switched to automatic
- # event-based mode. In this mode, the volumes are activated based on
- # incoming udev events that automatically inform lvmetad about new PVs that
- # appear in the system. Once a VG is complete (all the PVs are present), it
- # is auto-activated. The activation/auto_activation_volume_list setting
- # controls which volumes are auto-activated (all by default).
-
- # A note about device filtering while lvmetad is used:
-
- # When lvmetad is updated (either automatically based on udev events or
- # directly by a pvscan --cache <device> call), devices/filter is ignored and
- # all devices are scanned by default -- lvmetad always keeps unfiltered
- # information which is then provided to LVM commands and then each LVM
- # command does the filtering based on devices/filter setting itself. This
- # does not apply to non-regexp filters though: component filters such as
- # multipath and MD are checked at pvscan --cache time.
-
- # In order to completely prevent LVM from scanning a device, even when using
- # lvmetad, devices/global_filter must be used.
-
- # N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet
- # supported in clustered environment. If use_lvmetad=1 and locking_type=3
- # is set at the same time, LVM always issues a warning message about this
- # and then it automatically disables use_lvmetad.
-
- use_lvmetad = 0
-
- # Full path of the utility called to check that a thin metadata device
- # is in a state that allows it to be used.
- # Each time a thin pool needs to be activated or after it is deactivated
- # this utility is executed. The activation will only proceed if the utility
- # has an exit status of 0.
- # Set to "" to skip this check. (Not recommended.)
- # The thin tools are available as part of the device-mapper-persistent-data
- # package from https://github.com/jthornber/thin-provisioning-tools.
- #
- # thin_check_executable = "@THIN_CHECK_CMD@"
-
- # Array of string options passed with thin_check command. By default,
- # option "-q" is for quiet output.
- # With thin_check version 2.1 or newer you can add "--ignore-non-fatal-errors"
- # to let it pass through 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" ]
-
- # Full path of the utility called to repair a thin metadata device
- # is in a state that allows it to be used.
- # Each time a thin pool needs repair this utility is executed.
- # See thin_check_executable how to obtain binaries.
- #
- # thin_repair_executable = "@THIN_REPAIR_CMD@"
-
- # Array of extra string options passed with thin_repair command.
- # thin_repair_options = [ "" ]
-
- # Full path of the utility called to dump thin metadata content.
- # See thin_check_executable how to obtain binaries.
- #
- # thin_dump_executable = "@THIN_DUMP_CMD@"
-
- # If set, given features are not used by thin driver.
- # This can be helpful not just for testing, but i.e. allows to avoid
- # using problematic implementation of some thin feature.
- # Features:
- # block_size
- # discards
- # discards_non_power_2
- # external_origin
- # metadata_resize
- # external_origin_extend
- # error_if_no_space
- #
- # thin_disabled_features = [ "discards", "block_size" ]
-
- # Full path of the utility called to check that a cache metadata device
- # is in a state that allows it to be used.
- # Each time a cached LV needs to be used or after it is deactivated
- # this utility is executed. The activation will only proceed if the utility
- # has an exit status of 0.
- # Set to "" to skip this check. (Not recommended.)
- # The cache tools are available as part of the device-mapper-persistent-data
- # package from https://github.com/jthornber/thin-provisioning-tools.
- #
- # cache_check_executable = "@CACHE_CHECK_CMD@"
-
- # Array of string options passed with cache_check command. By default,
- # option "-q" is for quiet output.
- #
- # cache_check_options = [ "-q" ]
-
- # Full path of the utility called to repair a cache metadata device.
- # Each time a cache metadata needs repair this utility is executed.
- # See cache_check_executable how to obtain binaries.
- #
- # cache_repair_executable = "@CACHE_REPAIR_CMD@"
-
- # Array of extra string options passed with cache_repair command.
- # cache_repair_options = [ "" ]
-
- # Full path of the utility called to dump cache metadata content.
- # See cache_check_executable how to obtain binaries.
- #
- # cache_dump_executable = "@CACHE_DUMP_CMD@"
-
- # The method, if any, used to define a local system ID on this host.
- # By placing the same system ID on a Volume Group you can prevent
- # other co-operating hosts that see the same storage devices (each
- # with a different system ID) from accessing the same Volume Group.
- #
- # Set this to one of: none, machineid, uname, lvmlocal, or file.
- #
- # N.B. Do not use this feature without reading 'man lvmsystemid' to
- # understand the correct ways to use it and its limitations.
- #
- # system_id_source = "none"
- #
- # Obtain the system ID from the "system_id" setting in the "local"
- # section of a configuration file such as @DEFAULT_SYS_DIR@/lvmlocal.conf.
- #
- # system_id_source = "lvmlocal"
- #
- # Set the system ID from the hostname of the system.
- # System IDs beginning "localhost" are not permitted.
- #
- # system_id_source = "uname"
- #
- # Use the contents of the file @DEFAULT_SYS_DIR@/machine-id
- # to set the system ID. Some systems create this file at
- # installation time - see 'man machine-id'.
- #
- # system_id_source = "machineid"
- #
- # Use the contents of an alternative file to set the system ID.
- # Comments starting with the character # are ignored.
- #
- # system_id_source = "file"
- # system_id_file = "/etc/systemid"
-}
-
-activation {
- # Set to 1 to perform internal checks on the operations issued to
- # libdevmapper. Useful for debugging problems with activation.
- # Some of the checks may be expensive, so it's best to use this
- # only when there seems to be a problem.
- checks = 0
-
- # Set to 0 to disable udev synchronisation (if compiled into the binaries).
- # Processes will not wait for notification from udev.
- # They will continue irrespective of any possible udev processing
- # in the background. You should only use this if udev is not running
- # or has rules that ignore the devices LVM2 creates.
- # The command line argument --nodevsync takes precedence over this setting.
- # If set to 1 when udev is not running, and there are LVM2 processes
- # waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them up.
- udev_sync = 1
-
- # Set to 0 to disable the udev rules installed by LVM2 (if built with
- # --enable-udev_rules). LVM2 will then manage the /dev nodes and symlinks
- # for active logical volumes directly itself.
- # N.B. Manual intervention may be required if this setting is changed
- # while any logical volumes are active.
- udev_rules = 1
-
- # Set to 1 for LVM2 to verify operations performed by udev. This turns on
- # additional checks (and if necessary, repairs) on entries in the device
- # directory after udev has completed processing its events.
- # Useful for diagnosing problems with LVM2/udev interactions.
- verify_udev_operations = 0
-
- # If set to 1 and if deactivation of an LV fails, perhaps because
- # a process run from a quick udev rule temporarily opened the device,
- # retry the operation for a few seconds before failing.
- retry_deactivation = 1
-
- # How to fill in missing stripes if activating an incomplete volume.
- # Using "error" will make inaccessible parts of the device return
- # I/O errors on access. You can instead use a device path, in which
- # case, that device will be used to in place of missing stripes.
- # But note that using anything other than "error" with mirrored
- # or snapshotted volumes is likely to result in data corruption.
- missing_stripe_filler = "error"
-
- # The linear target is an optimised version of the striped target
- # that only handles a single stripe. Set this to 0 to disable this
- # optimisation and always use the striped target.
- use_linear_target = 1
-
- # How much stack (in KB) to reserve for use while devices suspended
- # Prior to version 2.02.89 this used to be set to 256KB
- reserved_stack = 64
-
- # How much memory (in KB) to reserve for use while devices suspended
- reserved_memory = 8192
-
- # Nice value used while devices suspended
- process_priority = -18
-
- # If volume_list is defined, each LV is only activated if there is a
- # match against the list.
- #
- # "vgname" and "vgname/lvname" are matched exactly.
- # "@tag" matches any tag set in the LV or VG.
- # "@*" matches if any tag defined on the host is also set in the LV or VG
- #
- # If any host tags exist but volume_list is not defined, a default
- # single-entry list containing "@*" is assumed.
- #
- # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
-
- # If auto_activation_volume_list is defined, each LV that is to be
- # activated with the autoactivation option (--activate ay/-a ay) is
- # first checked against the list. There are two scenarios in which
- # the autoactivation option is used:
- #
- # - automatic activation of volumes based on incoming PVs. If all the
- # PVs making up a VG are present in the system, the autoactivation
- # is triggered. This requires lvmetad (global/use_lvmetad=1) and udev
- # to be running. In this case, "pvscan --cache -aay" is called
- # automatically without any user intervention while processing
- # udev events. Please, make sure you define auto_activation_volume_list
- # properly so only the volumes you want and expect are autoactivated.
- #
- # - direct activation on command line with the autoactivation option.
- # In this case, the user calls "vgchange --activate ay/-a ay" or
- # "lvchange --activate ay/-a ay" directly.
- #
- # By default, the auto_activation_volume_list is not defined and all
- # volumes will be activated either automatically or by using --activate ay/-a ay.
- #
- # N.B. The "activation/volume_list" is still honoured in all cases so even
- # if the VG/LV passes the auto_activation_volume_list, it still needs to
- # pass the volume_list for it to be activated in the end.
-
- # If auto_activation_volume_list is defined but empty, no volumes will be
- # activated automatically and --activate ay/-a ay will do nothing.
- #
- # auto_activation_volume_list = []
-
- # If auto_activation_volume_list is defined and it's not empty, only matching
- # volumes will be activated either automatically or by using --activate ay/-a ay.
- #
- # "vgname" and "vgname/lvname" are matched exactly.
- # "@tag" matches any tag set in the LV or VG.
- # "@*" matches if any tag defined on the host is also set in the LV or VG
- #
- # auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
-
- # If read_only_volume_list is defined, each LV that is to be activated
- # is checked against the list, and if it matches, it is activated
- # in read-only mode. (This overrides '--permission rw' stored in the
- # metadata.)
- #
- # "vgname" and "vgname/lvname" are matched exactly.
- # "@tag" matches any tag set in the LV or VG.
- # "@*" matches if any tag defined on the host is also set in the LV or VG
- #
- # read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
-
- # Each LV can have an 'activation skip' flag stored persistently against it.
- # During activation, this flag is used to decide whether such an LV is skipped.
- # The 'activation skip' flag can be set during LV creation and by default it
- # is automatically set for thin snapshot LVs. The 'auto_set_activation_skip'
- # enables or disables this automatic setting of the flag while LVs are created.
- # auto_set_activation_skip = 1
-
- # Control error behavior when provisioned device becomes full. This
- # determines the default --errorwhenfull setting of new thin pools.
- # The command line option --errorwhenfull takes precedence over this
- # setting. error_when_full 0 means --errorwhenfull n.
- #
- # error_when_full = 0
-
- # For RAID or 'mirror' segment types, 'raid_region_size' is the
- # size (in KiB) of each:
- # - synchronization operation when initializing
- # - each copy operation when performing a 'pvmove' (using 'mirror' segtype)
- # This setting has replaced 'mirror_region_size' since version 2.02.99
- raid_region_size = 512
-
- # Setting to use when there is no readahead value stored in the metadata.
- #
- # "none" - Disable readahead.
- # "auto" - Use default value chosen by kernel.
- readahead = "auto"
-
- # 'raid_fault_policy' defines how a device failure in a RAID logical
- # volume is handled. This includes logical volumes that have the following
- # segment types: raid1, raid4, raid5*, and raid6*.
- #
- # In the event of a failure, the following policies will determine what
- # actions are performed during the automated response to failures (when
- # dmeventd is monitoring the RAID logical volume) and when 'lvconvert' is
- # called manually with the options '--repair' and '--use-policies'.
- #
- # "warn" - Use the system log to warn the user that a device in the RAID
- # logical volume has failed. It is left to the user to run
- # 'lvconvert --repair' manually to remove or replace the failed
- # device. As long as the number of failed devices does not
- # exceed the redundancy of the logical volume (1 device for
- # raid4/5, 2 for raid6, etc) the logical volume will remain
- # usable.
- #
- # "allocate" - Attempt to use any extra physical volumes in the volume
- # group as spares and replace faulty devices.
- #
- raid_fault_policy = "warn"
-
- # 'mirror_image_fault_policy' and 'mirror_log_fault_policy' define
- # how a device failure affecting a mirror (of "mirror" segment type) is
- # handled. A mirror is composed of mirror images (copies) and a log.
- # A disk log ensures that a mirror does not need to be re-synced
- # (all copies made the same) every time a machine reboots or crashes.
- #
- # In the event of a failure, the specified policy will be used to determine
- # what happens. This applies to automatic repairs (when the mirror is being
- # monitored by dmeventd) and to manual lvconvert --repair when
- # --use-policies is given.
- #
- # "remove" - Simply remove the faulty device and run without it. If
- # the log device fails, the mirror would convert to using
- # an in-memory log. This means the mirror will not
- # remember its sync status across crashes/reboots and
- # the entire mirror will be re-synced. If a
- # mirror image fails, the mirror will convert to a
- # non-mirrored device if there is only one remaining good
- # copy.
- #
- # "allocate" - Remove the faulty device and try to allocate space on
- # a new device to be a replacement for the failed device.
- # Using this policy for the log is fast and maintains the
- # ability to remember sync state through crashes/reboots.
- # Using this policy for a mirror device is slow, as it
- # requires the mirror to resynchronize the devices, but it
- # will preserve the mirror characteristic of the device.
- # This policy acts like "remove" if no suitable device and
- # space can be allocated for the replacement.
- #
- # "allocate_anywhere" - Not yet implemented. Useful to place the log device
- # temporarily on same physical volume as one of the mirror
- # images. This policy is not recommended for mirror devices
- # since it would break the redundant nature of the mirror. This
- # policy acts like "remove" if no suitable device and space can
- # be allocated for the replacement.
-
- mirror_log_fault_policy = "allocate"
- mirror_image_fault_policy = "remove"
-
- # 'snapshot_autoextend_threshold' and 'snapshot_autoextend_percent' define
- # how to handle automatic snapshot extension. The former defines when the
- # snapshot should be extended: when its space usage exceeds this many
- # percent. The latter defines how much extra space should be allocated for
- # the snapshot, in percent of its current size.
- #
- # For example, if you set snapshot_autoextend_threshold to 70 and
- # snapshot_autoextend_percent to 20, whenever a snapshot exceeds 70% usage,
- # it will be extended by another 20%. For a 1G snapshot, using up 700M will
- # trigger a resize to 1.2G. When the usage exceeds 840M, the snapshot will
- # be extended to 1.44G, and so on.
- #
- # Setting snapshot_autoextend_threshold to 100 disables automatic
- # extensions. The minimum value is 50 (A setting below 50 will be treated
- # as 50).
-
- snapshot_autoextend_threshold = 100
- snapshot_autoextend_percent = 20
-
- # 'thin_pool_autoextend_threshold' and 'thin_pool_autoextend_percent' define
- # how to handle automatic pool extension. The former defines when the
- # pool should be extended: when its space usage exceeds this many
- # percent. The latter defines how much extra space should be allocated for
- # the pool, in percent of its current size.
- #
- # For example, if you set thin_pool_autoextend_threshold to 70 and
- # thin_pool_autoextend_percent to 20, whenever a pool exceeds 70% usage,
- # it will be extended by another 20%. For a 1G pool, using up 700M will
- # trigger a resize to 1.2G. When the usage exceeds 840M, the pool will
- # be extended to 1.44G, and so on.
- #
- # Setting thin_pool_autoextend_threshold to 100 disables automatic
- # extensions. The minimum value is 50 (A setting below 50 will be treated
- # as 50).
-
- thin_pool_autoextend_threshold = 100
- thin_pool_autoextend_percent = 20
-
- # While activating devices, I/O to devices being (re)configured is
- # suspended, and as a precaution against deadlocks, LVM2 needs to pin
- # any memory it is using so it is not paged out. Groups of pages that
- # are known not to be accessed during activation need not be pinned
- # into memory. Each string listed in this setting is compared against
- # each line in /proc/self/maps, and the pages corresponding to any
- # lines that match are not pinned. On some systems locale-archive was
- # found to make up over 80% of the memory used by the process.
- # mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
-
- # Set to 1 to revert to the default behaviour prior to version 2.02.62
- # which used mlockall() to pin the whole process's memory while activating
- # devices.
- use_mlockall = 0
-
- # Monitoring is enabled by default when activating logical volumes.
- # Set to 0 to disable monitoring or use the --ignoremonitoring option.
- monitoring = 1
-
- # When pvmove or lvconvert must wait for the kernel to finish
- # synchronising or merging data, they check and report progress
- # at intervals of this number of seconds. The default is 15 seconds.
- # If this is set to 0 and there is only one thing to wait for, there
- # are no progress reports, but the process is awoken immediately the
- # operation is complete.
- polling_interval = 15
-
- # 'activation_mode' determines how Logical Volumes are activated if
- # any devices are missing. Possible settings are:
- #
- # "complete" - Only allow activation of an LV if all of the Physical
- # Volumes it uses are present. Other PVs in the Volume
- # Group may be missing.
- #
- # "degraded" - Like "complete", but additionally RAID Logical Volumes of
- # segment type raid1, raid4, raid5, radid6 and raid10 will
- # be activated if there is no data loss, i.e. they have
- # sufficient redundancy to present the entire addressable
- # range of the Logical Volume.
- #
- # "partial" - Allows the activation of any Logical Volume even if
- # a missing or failed PV could cause data loss with a
- # portion of the Logical Volume inaccessible.
- # This setting should not normally be used, but may
- # sometimes assist with data recovery.
- #
- # This setting was introduced in LVM version 2.02.108. It corresponds
- # with the '--activationmode' option for lvchange and vgchange.
- activation_mode = "degraded"
-}
-
-# Report settings.
-#
-# report {
- # If compact output is enabled, fields which don't have value
- # set for any of the rows reported are skipped on output. Compact
- # output is applicable only if report is buffered (report/buffered=1).
- # compact_output=0
-
- # Align columns on report output.
- # aligned=1
-
- # When buffered reporting is used, the report's content is appended
- # incrementally to include each object being reported until the report
- # is flushed to output which normally happens at the end of command
- # execution. Otherwise, if buffering is not used, each object is
- # reported as soon as its processing is finished.
- # buffered=1
-
- # Show headings for columns on report.
- # headings=1
-
- # A separator to use on report after each field.
- # separator=" "
-
- # A separator to use for list items when reported.
- # list_item_separator=","
-
- # Use a field name prefix for each field reported.
- # prefixes=0
-
- # Quote field values when using field name prefixes.
- # quoted=1
-
- # Output each column as a row. If set, this also implies report/prefixes=1.
- # colums_as_rows=0
-
- # Use binary values "0" or "1" instead of descriptive literal values for
- # columns that have exactly two valid values to report (not counting the
- # "unknown" value which denotes that the value could not be determined).
- #
- # binary_values_as_numeric = 0
-
- # Comma separated list of columns to sort by when reporting 'lvm devtypes' command.
- # See 'lvm devtypes -o help' for the list of possible fields.
- # devtypes_sort="devtype_name"
-
- # Comma separated list of columns to report for 'lvm devtypes' command.
- # See 'lvm devtypes -o help' for the list of possible fields.
- # devtypes_cols="devtype_name,devtype_max_partitions,devtype_description"
-
- # Comma separated list of columns to report for 'lvm devtypes' command in verbose mode.
- # See 'lvm devtypes -o help' for the list of possible fields.
- # devtypes_cols_verbose="devtype_name,devtype_max_partitions,devtype_description"
-
- # Comma separated list of columns to sort by when reporting 'lvs' command.
- # See 'lvs -o help' for the list of possible fields.
- # lvs_sort="vg_name,lv_name"
-
- # Comma separated list of columns to report for 'lvs' command.
- # See 'lvs -o help' for the list of possible fields.
- # lvs_cols="lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv"
-
- # Comma separated list of columns to report for 'lvs' command in verbose mode.
- # See 'lvs -o help' for the list of possible fields.
- # lvs_cols_verbose="lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert
-
- # Comma separated list of columns to sort by when reporting 'vgs' command.
- # See 'vgs -o help' for the list of possible fields.
- # vgs_sort="vg_name"
-
- # Comma separated list of columns to report for 'vgs' command.
- # See 'vgs -o help' for the list of possible fields.
- # vgs_cols="vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
-
- # Comma separated list of columns to report for 'vgs' command in verbose mode.
- # See 'vgs -o help' for the list of possible fields.
- # vgs_cols_verbose="vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
-
- # Comma separated list of columns to sort by when reporting 'pvs' command.
- # See 'pvs -o help' for the list of possible fields.
- # pvs_sort="pv_name"
-
- # Comma separated list of columns to report for 'pvs' command.
- # See 'pvs -o help' for the list of possible fields.
- # pvs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
-
- # Comma separated list of columns to report for 'pvs' command in verbose mode.
- # See 'pvs -o help' for the list of possible fields.
- # pvs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
-
- # Comma separated list of columns to sort by when reporting 'lvs --segments' command.
- # See 'lvs --segments -o help' for the list of possible fields.
- # segs_sort="vg_name,lv_name,seg_start"
-
- # Comma separated list of columns to report for 'lvs --segments' command.
- # See 'lvs --segments -o help' for the list of possible fields.
- # segs_cols="lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
-
- # Comma separated list of columns to report for 'lvs --segments' command in verbose mode.
- # See 'lvs --segments -o help' for the list of possible fields.
- # segs_cols_verbose="lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
-
- # Comma separated list of columns to sort by when reporting 'pvs --segments' command.
- # See 'pvs --segments -o help' for the list of possible fields.
- # pvsegs_sort="pv_name,pvseg_start"
-
- # Comma separated list of columns to sort by when reporting 'pvs --segments' command.
- # See 'pvs --segments -o help' for the list of possible fields.
- # pvsegs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
-
- # Comma separated list of columns to sort by when reporting 'pvs --segments' command in verbose mode.
- # See 'pvs --segments -o help' for the list of possible fields.
- # pvsegs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
-#}
-
-####################
-# Advanced section #
-####################
-
-# Metadata settings
-#
-# metadata {
- # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
- # You might want to override it from the command line with 0
- # when running pvcreate on new PVs which are to be added to large VGs.
-
- # pvmetadatacopies = 1
-
- # Default number of copies of metadata to maintain for each VG.
- # If set to a non-zero value, LVM automatically chooses which of
- # the available metadata areas to use to achieve the requested
- # number of copies of the VG metadata. If you set a value larger
- # than the the total number of metadata areas available then
- # metadata is stored in them all.
- # The default value of 0 ("unmanaged") disables this automatic
- # management and allows you to control which metadata areas
- # are used at the individual PV level using 'pvchange
- # --metadataignore y/n'.
-
- # vgmetadatacopies = 0
-
- # Approximate default size of on-disk metadata areas in sectors.
- # You should increase this if you have large volume groups or
- # you want to retain a large on-disk history of your metadata changes.
-
- # pvmetadatasize = 255
-
- # List of directories holding live copies of text format metadata.
- # These directories must not be on logical volumes!
- # It's possible to use LVM2 with a couple of directories here,
- # preferably on different (non-LV) filesystems, and with no other
- # on-disk metadata (pvmetadatacopies = 0). Or this can be in
- # addition to on-disk metadata areas.
- # The feature was originally added to simplify testing and is not
- # supported under low memory situations - the machine could lock up.
- #
- # Never edit any files in these directories by hand unless you
- # you are absolutely sure you know what you are doing! Use
- # the supplied toolset to make changes (e.g. vgcfgrestore).
-
- # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
-#}
-
-# Event daemon
-#
-dmeventd {
- # mirror_library is the library used when monitoring a mirror device.
- #
- # "libdevmapper-event-lvm2mirror.so" attempts to recover from
- # failures. It removes failed devices from a volume group and
- # reconfigures a mirror as necessary. If no mirror library is
- # provided, mirrors are not monitored through dmeventd.
-
- mirror_library = "libdevmapper-event-lvm2mirror.so"
-
- # snapshot_library is the library used when monitoring a snapshot device.
- #
- # "libdevmapper-event-lvm2snapshot.so" monitors the filling of
- # snapshots and emits a warning through syslog when the use of
- # the snapshot exceeds 80%. The warning is repeated when 85%, 90% and
- # 95% of the snapshot is filled.
-
- snapshot_library = "libdevmapper-event-lvm2snapshot.so"
-
- # thin_library is the library used when monitoring a thin device.
- #
- # "libdevmapper-event-lvm2thin.so" monitors the filling of
- # pool and emits a warning through syslog when the use of
- # the pool exceeds 80%. The warning is repeated when 85%, 90% and
- # 95% of the pool is filled.
-
- thin_library = "libdevmapper-event-lvm2thin.so"
-
- # Full path of the dmeventd binary.
- #
- # executable = "@DMEVENTD_PATH@"
-}
diff --git a/conf/lvmlocal.conf.base b/conf/lvmlocal.conf.base
new file mode 100644
index 0000000..e2a9e2f
--- /dev/null
+++ b/conf/lvmlocal.conf.base
@@ -0,0 +1,19 @@
+# This is a local configuration file template for the LVM2 system
+# which should be installed as @DEFAULT_SYS_DIR@/lvmlocal.conf .
+#
+# Refer to 'man lvm.conf' for information about the file layout.
+#
+# To put this file in a different directory and override
+# @DEFAULT_SYS_DIR@ set the environment variable LVM_SYSTEM_DIR before
+# running the tools.
+#
+# The lvmlocal.conf file is normally expected to contain only the
+# "local" section which contains settings that should not be shared or
+# repeated among different hosts. (But if other sections are present,
+# they *will* get processed. Settings in this file override equivalent
+# ones in lvm.conf and are in turn overridden by ones in any enabled
+# lvm_<tag>.conf files.)
+#
+# Please take care that each setting only appears once if uncommenting
+# example settings in this file and never copy this file between hosts.
+
diff --git a/conf/lvmlocal.conf.in b/conf/lvmlocal.conf.in
index 48965e4..e69de29 100644
--- a/conf/lvmlocal.conf.in
+++ b/conf/lvmlocal.conf.in
@@ -1,54 +0,0 @@
-# This is a local configuration file template for the LVM2 system
-# which should be installed as @DEFAULT_SYS_DIR@/lvmlocal.conf .
-#
-# This file allows you to assign a unique identity to a host running
-# LVM2 that is permitted to access storage devices visible to more than
-# one machine simultaneously.
-#
-# You must ensure that every such host uses a different system_id
-# identifier, otherwise LVM2 cannot protect you from simultaneous
-# access from multiple hosts and possible data corruption.
-#
-# Refer to 'man lvmsystemid' for information about the correct ways
-# to use this and its limitations.
-#
-# Refer to 'man lvm.conf' for information about the file layout.
-#
-# To put this file in a different directory and override
-# @DEFAULT_SYS_DIR@ set the environment variable LVM_SYSTEM_DIR before
-# running the tools.
-#
-# The lvmlocal.conf file is normally expected to contain only the
-# "local" section which contains settings that should not be shared or
-# repeated among different hosts. (But if other sections are present,
-# they *will* get processed. Settings in this file override equivalent
-# ones in lvm.conf and are in turn overridden by ones in any enabled
-# lvm_<tag>.conf files.)
-#
-# Please take care that each setting only appears once if uncommenting
-# example settings in this file and never copy this file between
-# hosts to avoid accidentally assigning the same system ID to
-# more than one host!
-
-local {
- # This defines the system ID o