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 of the local host. This is used
- # when global/system_id_source is set to "lvmlocal" in the main
- # configuration file, conventionally @DEFAULT_SYS_DIR@/lvm.conf.
- # When used, it must be set to a unique value - often a hostname -
- # across all the hosts sharing access to the storage.
- #
- # By default, no system_id is set.
- # system_id = ""
- #
- # Set the system_id to the string "host1".
- # system_id = "host1"
-
- # This defines a list of extra system_ids other than the local
- # system_id that the local host is allowed to access. These are
- # used for all values of global/system_id_source except "none".
- #
- # Only use this if you have read 'man lvmsystemid' and you are sure
- # you understand why you need to use it!
- #
- # extra_system_ids = []
-}
diff --git a/make.tmpl.in b/make.tmpl.in
index 322e33b..ed6b522 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -282,6 +282,7 @@ POTFILES = $(SOURCES:%.c=%.pot)
.PHONY: $(SUBDIRS) $(SUBDIRS.install) $(SUBDIRS.clean) $(SUBDIRS.distclean)
.PHONY: $(SUBDIRS.pofile) $(SUBDIRS.install_cluster) $(SUBDIRS.cflow)
.PHONY: $(SUBDIRS.device-mapper) $(SUBDIRS.install-device-mapper)
+.PHONY: $(SUBDIRS.generate) generate
SUBDIRS.device-mapper := $(SUBDIRS:=.device-mapper)
SUBDIRS.install := $(SUBDIRS:=.install)
@@ -342,6 +343,9 @@ $(SUBDIRS.pofile):
$(MAKE) -C $(@:.pofile=) pofile
endif
+$(SUBDIRS.generate):
+ $(MAKE) -C $(@:.generate=) generate
+
ifneq ("$(CFLOW_LIST_TARGET)", "")
CLEAN_CFLOW += $(CFLOW_LIST_TARGET)
$(CFLOW_LIST_TARGET): $(CFLOW_LIST)
diff --git a/man/lvm.conf.5.in b/man/lvm.conf.5.in
index 288bc42..074e2e9 100644
--- a/man/lvm.conf.5.in
+++ b/man/lvm.conf.5.in
@@ -155,502 +155,48 @@ An empty array is acceptable.
Strings with spaces must be enclosed in double quotes, single words that start
with a letter can be left unquoted.
-.SH SECTIONS
-.LP
-The sections that may be present in the file are:
-.TP
-\fBdevices\fP \(em Device settings
-.IP
-\fBdir\fP \(em Directory in which to create volume group device nodes.
-Defaults to "/dev". Commands also accept this as a prefix on volume
-group names.
-.IP
-\fBscan\fP \(em List of directories to scan recursively for
-LVM physical volumes.
-Devices in directories outside this hierarchy will be ignored.
-Defaults to "/dev".
-.IP
-\fBpreferred_names\fP \(em List of patterns compared in turn against
-all the pathnames referencing the same device in in the scanned directories.
-The pathname that matches the earliest pattern in the list is the
-one used in any output. As an example, if device-mapper multipathing
-is used, the following will select multipath device names:
+.SH SETTINGS
+
+The
+.B lvm dumpconfig
+command prints the LVM configuration settings in various ways.
+See the man page
+.BR lvm-dumpconfig (8).
+
+Command to print a list of all possible config settings, with their
+default values:
.br
-\fBdevices { preferred_names = [ "^/dev/mapper/mpath" ] }\fP
-.IP
-\fBfilter\fP \(em List of patterns to apply to devices found by a scan.
-Patterns are regular expressions delimited by any character and preceded
-by \fBa\fP (for accept) or \fBr\fP (for reject). The list is traversed
-in order, and the first regex that matches determines if the device
-will be accepted or rejected (ignored). Devices that don't match
-any patterns are accepted. If you want to reject patterns that
-don't match, end the list with "r/.*/".
-If there are several names for the same device (e.g. symbolic links
-in /dev), if the first matching pattern in the list for any of the names is an
-\fBa\fP pattern, the device is accepted; otherwise if the first matching
-pattern in the list for any of the names is an \fBr\fP pattern it is rejected;
-otherwise it is accepted. As an example, to ignore /dev/cdrom you could use:
+.B lvm dumpconfig \-\-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
-\fBdevices { filter=["r|cdrom|"] }\fP
-.IP
-\fBglobal_filter\fP \(em Since "filter" might get overridden from the 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.
-.IP
-\fBcache_dir\fP \(em Persistent filter cache file directory.
-Defaults to "#DEFAULT_CACHE_DIR#".
-.IP
-\fBwrite_cache_state\fP \(em Set to 0 to disable the writing out of the
-persistent filter cache file when \fBlvm\fP exits.
-Defaults to 1.
-.IP
-\fBtypes\fP \(em List of pairs of additional acceptable block device types
-found in /proc/devices together with maximum (non-zero) number of
-partitions (normally 16). By default, LVM2 supports ide, sd, md, loop,
-dasd, dac960, nbd, ida, cciss, ubd, ataraid, drbd, power2, i2o_block
-and iseries/vd. Block devices with major
-numbers of different types are ignored by LVM2.
-Example: \fBtypes = ["fd", 16]\fP.
-To create physical volumes on device-mapper volumes
-created outside LVM2, perhaps encrypted ones from \fBcryptsetup\fP,
-you'll need \fBtypes = ["device-mapper", 16]\fP. But if you do this,
-be careful to avoid recursion within LVM2. The figure for number
-of partitions is not currently used in LVM2 - and might never be.
-.IP
-\fBsysfs_scan\fP \(em If set to 1 and your kernel supports sysfs and
-it is mounted, sysfs will be used as a quick way of filtering out
-block devices that are not present.
-.IP
-\fBmd_component_detection\fP \(em If set to 1, LVM2 will ignore devices
-used as components of software RAID (md) devices by looking for md
-superblocks. This doesn't always work satisfactorily e.g. if a device
-has been reused without wiping the md superblocks first.
-.IP
-\fBmd_chunk_alignment\fP \(em If set to 1, and a Physical Volume is placed
-directly upon an md device, LVM2 will align its data blocks with the
-md device's stripe-width.
-.IP
-\fBdata_alignment_detection\fP \(em If set to 1, and your kernel provides
-topology information in sysfs for the Physical Volume, the start of data
-area will be aligned on a multiple of the ’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's chunk size). optimal_io_size is 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 both \fBmd_chunk_alignment\fP
-and \fBdata_alignment_detection\fP are enabled the result of
-\fBdata_alignment_detection\fP is used.
-.IP
-\fBdata_alignment\fP \(em Default alignment (in KB) of start of data area
-when creating a new Physical Volume using the \fBlvm2\fP format.
-If a Physical Volume is placed directly upon an md device and
-\fBmd_chunk_alignment\fP or \fBdata_alignment_detection\fP is enabled
-this parameter is ignored. Set to 0 to use the default alignment of
-64KB or the page size, if larger.
-.IP
-\fBdata_alignment_offset_detection\fP \(em If set to 1, and your kernel
-provides topology information in sysfs for the Physical Volume, the
-start of the aligned data area of the Physical Volume will be shifted
-by the alignment_offset exposed in sysfs.
-.sp
-To see the location of the first Physical Extent of an existing Physical Volume
-use \fBpvs \-o +pe_start\fP . It will be a multiple of the requested
-\fBdata_alignment\fP plus the alignment_offset from
-\fBdata_alignment_offset_detection\fP (if enabled) or the pvcreate
-commandline.
-.IP
-\fBdisable_after_error_count\fP \(em 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.
-.IP
-\fBpv_min_size\fP \(em
-Minimal size (in KB) of the block device which can be used as a PV.
-In clustered environment all nodes have to use the same value.
-Any value smaller than 512KB is ignored. Up to and include version 2.02.84
-the default was 512KB. From 2.02.85 onwards it was changed to 2MB to
-avoid floppy drives by default.
-.IP
-\fBissue_discards\fP \(em
-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.
-.IP
-.TP
-\fBallocation\fP \(em Space allocation policies
-.IP
-\fBcling_tag_list\fP \(em List of PV tags matched by the \fBcling\fP allocation policy.
-.IP
-When searching for free space to extend an LV, the \fBcling\fP
-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.
-.IP
-The @ prefix for tags is required.
-Use the special tag "@*" as a wildcard to match any PV tag and so use
-all PV tags for this purpose.
-.IP
-For 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 and these two PV tags are selected for use with this
-allocation policy:
-.IP
-cling_tag_list = [ "@site1", "@site2" ]
-.IP
-\fBcache_pool_cachemode\fP \(em Cache mode for new cache pools.
-.IP
-This is the default cache mode a new cache pool will be given.
-Valid cache modes are:
-\fBwritethrough\fP - Data blocks are immediately written from the
-cache to disk.
-\fBwriteback\fP - Data blocks are written from the cache
-back to disk after some delay to improve performance.
-.TP
-\fBlog\fP \(em Default log settings
-.IP
-\fBfile\fP \(em Location of log file. If this entry is not present, no
-log file is written.
-.IP
-\fBoverwrite\fP \(em Set to 1 to overwrite the log file each time a tool
-is invoked. By default tools append messages to the log file.
-.IP
-\fBlevel\fP \(em Log level (0-9) of messages to write to the file.
-9 is the most verbose; 0 should produce no output.
-.IP
-\fBverbose\fP \(em Default level (0-3) of messages sent to stdout or stderr.
-3 is the most verbose; 0 should produce the least output.
-.IP
-\fBsilent\fP \(em Set to 1 to suppress all non-essential tool output.
-When set, display and reporting tools will still write the requested
-device properties to standard output, but messages confirming that
-something was or wasn't changed will be reduced to the 'verbose' level
-and not appear unless \-v is supplied.
-.IP
-\fBsyslog\fP \(em Set to 1 (the default) to send log messages through syslog.
-Turn off by setting to 0. If you set to an integer greater than one,
-this is used - unvalidated - as the facility. The default is LOG_USER.
-See /usr/include/sys/syslog.h for safe facility values to use.
-For example, LOG_LOCAL0 might be 128.
-.IP
-\fBindent\fP \(em When set to 1 (the default) messages are indented
-according to their severity, two spaces per level.
-Set to 0 to turn off indentation.
-.IP
-\fBcommand_names\fP \(em When set to 1, the command name is used as a
-prefix for each message.
-Default is 0 (off).
-.IP
-\fBprefix\fP \(em Prefix used for all messages (after the command name).
-Default is two spaces.
-.IP
-\fBactivation\fP \(em Set to 1 to log messages while
-devices are suspended during activation.
-Only set this temporarily while debugging a problem because
-in low memory situations this setting can cause your machine to lock up.
-.TP
-\fBbackup\fP \(em Configuration for metadata backups.
-.IP
-\fBarchive_dir\fP \(em Directory used for automatic metadata archives.
-Backup copies of former metadata for each volume group are archived here.
-Defaults to "#DEFAULT_ARCHIVE_DIR#".
-.IP
-\fBbackup_dir\fP \(em Directory used for automatic metadata backups.
-A single backup copy of the current metadata for each volume group
-is stored here.
-Defaults to "#DEFAULT_BACKUP_DIR#".
-.IP
-\fBarchive\fP \(em Whether or not tools automatically archive existing
-metadata into \fBarchive_dir\fP before making changes to it.
-Default is 1 (automatic archives enabled).
-Set to 0 to disable.
-Disabling this might make metadata recovery difficult or impossible
-if something goes wrong.
-.IP
-\fBbackup\fP \(em Whether or not tools make an automatic backup
-into \fBbackup_dir\fP after changing metadata.
-Default is 1 (automatic backups enabled). Set to 0 to disable.
-Disabling this might make metadata recovery difficult or impossible
-if something goes wrong.
-.IP
-\fBretain_min\fP \(em Minimum number of archives to keep.
-Defaults to 10.
-.IP
-\fBretain_days\fP \(em Minimum number of days to keep archive files.
-Defaults to 30.
-.TP
-\fBshell\fP \(em LVM2 built-in readline shell settings
-.IP
-\fBhistory_size\fP \(em Maximum number of lines of shell history to retain (default 100) in $HOME/.lvm_history
-.TP
-\fBglobal\fP \(em Global settings
-.IP
-\fBtest\fP \(em If set to 1, run tools in test mode i.e. no changes to
-the on-disk metadata will get made. It's equivalent to having the
--t option on every command.
-.IP
-\fBactivation\fP \(em Set to 0 to turn off all communication with
-the device-mapper driver. Useful if you want to manipulate logical
-volumes while device-mapper is not present in your kernel.
-.IP
-\fBproc\fP \(em Mount point of proc filesystem.
-Defaults to /proc.
-.IP
-\fBumask\fP \(em File creation mask for any files and directories created.
-Interpreted as octal if the first digit is zero.
-Defaults to 077.
-Use 022 to allow other users to read the files by default.
-.IP
-\fBformat\fP \(em The default value of \fB\-\-metadatatype\fP used
-to determine which format of metadata to use when creating new
-physical volumes and volume groups. \fBlvm1\fP or \fBlvm2\fP.
-.IP
-\fBfallback_to_lvm1\fP \(em Set this to 1 if you need to
-be able to switch between 2.4 kernels using LVM1 and kernels
-including device-mapper.
-The LVM2 tools should be installed as normal and
-the LVM1 tools should be installed with a .lvm1 suffix e.g.
-vgscan.lvm1.
-If an LVM2 tool is then run but unable to communicate
-with device-mapper, it will automatically invoke the equivalent LVM1
-version of the tool. Note that for LVM1 tools to
-manipulate physical volumes and volume groups created by LVM2 you
-must use \fB\-\-metadataformat lvm1\fP when creating them.
-.IP
-\fBlibrary_dir\fP \(em A directory searched for LVM2's shared libraries
-ahead of the places \fBdlopen\fP (3) searches.
-.IP
-\fBformat_libraries\fP \(em A list of shared libraries to load that contain
-code to process different formats of metadata. For example, liblvm2formatpool.so
-is needed to read GFS pool metadata if LVM2 was configured \fB\-\-with-pool=shared\fP.
-.IP
-\fBlocking_type\fP \(em What type of locking to use.
-1 is the default, which use flocks on files in \fBlocking_dir\fP
-(see below) to
-avoid conflicting LVM2 commands running concurrently on a single
-machine. 0 disables locking and risks corrupting your metadata.
-If set to 2, the tools will load the external \fBlocking_library\fP
-(see below).
-If the tools were configured \fB\-\-with-cluster=internal\fP
-(the default) then 3 means to use built-in cluster-wide locking.
-Type 4 enforces read-only metadata and forbids any operations that
-might want to modify Volume Group metadata.
-All changes to logical volumes and their states are communicated
-using locks.
-.IP
-\fBwait_for_locks\fP \(em When set to 1, the default, the tools
-wait if a lock request cannot be satisfied immediately.
-When set to 0, the operation is aborted instead.
-.IP
-\fBlocking_dir\fP \(em The directory LVM2 places its file locks
-if \fBlocking_type\fP is set to 1. The default is \fB/var/lock/lvm\fP.
-.IP
-\fBlocking_library\fP \(em The name of the external locking
-library to load if \fBlocking_type\fP is set to 2.
-The default is \fBliblvm2clusterlock.so\fP. If you need to write
-such a library, look at the lib/locking source code directory.
-.IP
-\fBuse_lvmetad\fP \(em 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 \fBand\fP when lvmetad is running (it is not auto-started), 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 \fBmust\fP be set up for LVM to work correctly. Without proper udev
-rules, all changes in block device configuration will be \fBignored\fP until a
-manual 'pvscan \-\-cache' is performed.
+.B lvm dumpconfig \-\-type default --withfullcomments
+
+Command to print a list of all possible config settings, with their
+current values (configured, non-default values are shown):
.br
-If lvmetad has been running while use_lvmetad was 0, it \fBMUST\fP be stopped before
-changing use_lvmetad to 1 and started again afterwards.
-.TP
-\fBtags\fP \(em Host tag settings
-.IP
-\fBhosttags\fP \(em If set to 1, create a host tag with the machine name.
-Setting this to 0 does nothing, neither creating nor destroying any tag.
-The machine name used is the nodename as returned by \fBuname\fP (2).
-.IP
-Additional host tags to be set can be listed here as subsections.
-The @ prefix for tags is optional.
-Each of these host tag subsections can contain a \fBhost_list\fP
-array of host names. If any one of these entries matches the machine
-name exactly then the host tag gets defined on this particular host,
-otherwise it doesn't.
-.IP
-After lvm.conf has been processed, LVM2 works through each host
-tag that has been defined in turn, and if there is a configuration
-file called lvm_\fB<host_tag>\fP.conf it attempts to load it.
-The activation/volume_list, devices/filter and devices/types settings are merged
-(these all are lists), otherwise any settings read in override settings found in
-earlier files. Any additional host tags defined get appended to the search list,
-so in turn they can lead to further configuration files being processed.
-Use \fBlvm dumpconfig\fP to check the result of config
-file processing.
-.IP
-The following example always sets host tags \fBtag1\fP and
-sets \fBtag2\fP on machines fs1 and fs2:
-.IP
-tags { tag1 { } tag2 { host_list = [ "fs1", "fs2" ] } }
-.IP
-These options are useful if you are replicating configuration files
-around a cluster. Use of \fBhosttags = 1\fP means every machine
-can have static and identical local configuration files yet use
-different settings and activate different logical volumes by
-default. See also \fBvolume_list\fP below and \fB\-\-addtag\fP
-in \fBlvm\fP (8).
-.TP
-\fBactivation\fP \(em Settings affecting device-mapper activation
-.IP
-\fBmissing_stripe_filler\fP \(em When activating an incomplete logical
-volume in partial mode, this option dictates how the missing data is
-replaced. A value of "error" will cause activation to create error
-mappings for the missing data, meaning that read access to missing
-portions of the volume will result in I/O errors. You can instead also
-use a device path, and in that case this device will be used in place of
-missing stripes. However, note that using anything other than
-"error" with mirrored or snapshotted volumes is likely to result in data
-corruption. For instructions on how to create a device that always
-returns zeros, see \fBlvcreate\fP (8).
-.IP
-\fBmirror_region_size\fP \(em Unit size in KB for copy operations
-when mirroring.
-.IP
-\fBreadahead\fP \(em Used when there is no readahead value stored
-in the volume group metadata. Set to \fBnone\fP to disable
-readahead in these circumstances or \fBauto\fP to use the default
-value chosen by the kernel.
-.IP
-\fBreserved_memory\fP, \fBreserved_stack\fP \(em How many KB to reserve
-for LVM2 to use while logical volumes are suspended. If insufficient
-memory is reserved before suspension, there is a risk of machine deadlock.
-.IP
-\fBprocess_priority\fP \(em The nice value to use while devices are
-suspended. This is set to a high priority so that logical volumes
-are suspended (with I/O generated by other processes to those
-logical volumes getting queued) for the shortest possible time.
-.IP
-\fBvolume_list\fP \(em This acts as a filter through which
-all requests to activate a logical volume on this machine
-are passed. A logical volume is only activated if it matches
-an item in the list. Tags must be preceded by @ and are checked
-against all tags defined in the logical volume and volume group
-metadata for a match.
-@* is short-hand to check every tag set on the host machine (see
-\fBtags\fP above).
-Logical volume and volume groups can also be included in the list
-by name e.g. vg00, vg00/lvol1.
-If this setting is not present but at least one host tag is defined
-then a default single-entry list containing @* is assumed.
-.IP
-\fBauto_activation_volume_list\fP \(em This acts as a filter through
-which all requests to autoactivate a logical volume on this machine
-are passed. A logical volume is autoactivated if it matches
-an item in the list. Volumes must also pass the \fBvolume_list\fP
-filter, if present. Tags must be preceded by @ and are checked against
-all tags defined in the logical volume and volume group metadata for
-a match. @* is short-hand to check every tag set on the host machine
-(see \fBtags\fP above).
-Logical volume and volume groups can also be included in the list
-by name e.g. vg00, vg00/lvol1.
-.IP
-\fBread_only_volume_list\fP \(em This acts as a filter through
-which all requests to activate a logical volume on this machine
-are passed. A logical volume is activated in read-only mode (instead
-of read-write) if it matches an item in the list. Volumes must first
-pass the \fBvolume_list\fP filter, if present. Tags must be preceded
-by @ and are checked against all tags defined in the logical volume
-and volume group metadata for a match.
-@* is short-hand to check every tag set on the host machine (see
-\fBtags\fP above).
-Logical volume and volume groups can also be included in the list
-by name e.g. vg00, vg00/lvol1.
-.TP
-\fBmetadata\fP \(em Advanced metadata settings
-.IP
-\fBpvmetadatacopies\fP \(em When creating a physical volume using the
-LVM2 metadata format, this is the default number of copies of metadata
-to store on each physical volume.
-Currently it can be set to 0, 1 or 2. The default is 1.
-If set to 2, one copy is placed at the beginning of the disk
-and the other is placed at the end.
-It can be overridden on the command line with \fB\-\-pvmetadatacopies\fP
-(see \fBpvcreate\fP).
-If creating a volume group with just one physical volume, it's a
-good idea to have 2 copies. If creating a large volume group with
-many physical volumes, you may decide that 3 copies of the metadata
-is sufficient, i.e. setting it to 1 on three of the physical volumes,
-and 0 on the rest. Every volume group must contain at least one
-physical volume with at least 1 copy of the metadata (unless using
-the text files described below). The disadvantage of having lots
-of copies is that every time the tools access the volume group, every
-copy of the metadata has to be accessed, and this slows down the
-tools.
-.IP
-\fBpvmetadatasize\fP \(em Approximate number of sectors to set aside
-for each copy of the metadata. Volume groups with large numbers of
-physical or logical volumes, or volumes groups containing complex
-logical volume structures will need additional space for their 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.
-.IP
-\fBpvmetadataignore\fP When creating a physical volume using the LVM2
-metadata format, this states whether metadata areas should be ignored.
-The default is "n". If metadata areas on a physical volume are ignored,
-LVM will not not store metadata in the metadata areas present on newly
-created Physical Volumes. The option can be overridden on the command
-line with \fB\-\-metadataignore\fP (See \fBpvcreate\fP and \fBpvchange\fP).
-Metadata areas cannot be created or extended after Logical Volumes have
-been allocated on the device.
-If you do not want to store metadata on this device, it is still wise
-always to allocate a metadata area (use a non-zero value for
-\fB\-\-pvmetadatacopies\fP) in case you need it in the future and to use
-this option to instruct LVM2 to ignore it.
-.IP
-\fBvgmetadatacopies\fP \(em When creating a volume group using the
-LVM2 metadata format, this is the default number of copies of metadata
-desired across all the physical volumes in the volume group. If set to
-a non-zero value, LVM will automatically set or clear the metadataignore
-flag on the physical volumes (see \fBpvcreate\fP and \fBpvchange\fP
-\fB\-\-metadataignore\fP) in order to achieve the desired number of metadata
-copies. An LVM command that adds or removes physical volumes (for example,
-\fBvgextend\fP, \fBvgreduce\fP, \fBvgsplit\fP, or \fBvgmerge\fP), may cause
-LVM to automatically set or clear the metadataignore flags. Also, if
-physical volumes go missing or reappear, or a new number of copies is
-explicitly set (see \fBvgchange \-\-vgmetadatacopies\fP), LVM may adjust
-the metadataignore flags.
-Set \fBvgmetadatacopies\fP to 0 instructs LVM not to set or clear the
-metadataignore flags automatically. You may set a value larger than the
-sum of all metadata areas on all physical volumes. The value can
-be overridden on the command line with \fB\-\-vgmetadatacopies\fP for various
-commands (for example, \fBvgcreate\fP and \fBvgchange\fP), and can be
-queryied with the \fBvg_mda_copies\fP field of \fBvgs\fP. This option
-is useful for volume groups containing large numbers of physical volumes
-with metadata as it may be used to minimize metadata read and write overhead.
-.IP
-\fBdirs\fP \(em List of directories holding live copies of LVM2
-metadata as text files. These directories must not be on logical
-volumes. It is possible to use LVM2 with a couple of directories
-here, preferably on different (non-logical-volume) filesystems
-and with no other on-disk metadata, \fBpvmetadatacopies = 0\fP.
-Alternatively these directories can be in addition to the
-on-disk metadata areas. This feature was created during the
-development of the LVM2 metadata before the new on-disk metadata
-areas were designed and no longer gets tested.
-It is not supported under low-memory conditions, and it is
-important never to edit these metadata files unless you fully
-understand how things work: to make changes you should always use
-the tools as normal, or else vgcfgbackup, edit backup, vgcfgrestore.
+.B lvm dumpconfig \-\-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
+
+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
+
+
.SH FILES
.I #DEFAULT_SYS_DIR#/lvm.conf
.br
+.I #DEFAULT_SYS_DIR#/lvmlocal.conf
+.br
.I #DEFAULT_ARCHIVE_DIR#
.br
.I #DEFAULT_BACKUP_DIR#
@@ -658,10 +204,10 @@ the tools as normal, or else vgcfgbackup, edit backup, vgcfgrestore.
.I #DEFAULT_CACHE_DIR#/.cache
.br
.I #DEFAULT_LOCK_DIR#
+.br
+.I #DEFAULT_PROFILE_DIR#
+
.SH SEE ALSO
-.BR lvm (8),
-.BR umask (2),
-.BR uname (2),
-.BR dlopen (3),
-.BR syslog (3),
-.BR syslog.conf (5)
+.BR lvm (8)
+.BR lvm-dumpconfig (8)
+
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=0d0d50182d1bf6b1…
Commit: 0d0d50182d1bf6b11b80fe8fe701f654b953f2fa
Parent: caa9223c8549b4a937c2cc13eb7f306f55e4beee
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Apr 20 14:35:35 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Apr 20 17:07:58 2015 -0500
toollib: fix duplicate handling in process_each_pv
With use_lvmetad=0, duplicate PVs /dev/loop0 and /dev/loop1,
where in this example, /dev/loop1 is the cached device
referenced by pv->dev, the command 'pvs /dev/loop0' reports:
Failed to find physical volume "/dev/loop0".
This is because the duplicate PV detection by pvid is
not working because _get_all_devices() is not setting
any dev->pvid for any entries. This is because the
pvid information has not yet been saved in lvmcache.
This is fixed by calling _get_vgnameids_on_system()
before _get_all_devices(), which has the effect of
caching the necessary pvid information.
With this fix, running pvs /dev/loop0, or pvs /dev/loop1,
produces no error and one line of output for the PV (the
device printed is the one cached in pv->dev, in this
example /dev/loop1.)
Running 'pvs /dev/loop0 /dev/loop1' produces no error
and two lines of output, with each device displayed
on one of the lines.
Running 'pvs -a' shows two PVs, one with loop0 and one
with loop1, and both shown as a member of the same VG.
Running 'pvs' shows only one of the duplicate PVs,
and that shows the device cached in pv->dev (loop1).
The above output is what the duplicate handling code
was previously designed to output in commits:
b64da4d8b521 toollib: search for duplicate PVs only when needed
3a7c47af0e88 toollib: pvs -a should display VG name for each duplicate PV
57d74a45a05e toollib: override the PV device with duplicates
c1f246fedfc3 toollib: handle duplicate pvs in process_in_pv
As a further step after this, we may choose to change
some of those.
For all of these commands, a warning is printed about
the existence of the duplicate PVs:
Found duplicate PV ...: using /dev/loop1 not /dev/loop0
---
tools/toollib.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/tools/toollib.c b/tools/toollib.c
index 26810b2..2268b7e 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -2821,6 +2821,16 @@ int process_each_pv(struct cmd_context *cmd,
arg_count(cmd, all_ARG);
/*
+ * Read all the vgs here because this has the effect of initializing
+ * device/lvmcache info so that dev->pvid is available when creating
+ * a list of devices.
+ */
+ if ((ret = _get_vgnameids_on_system(cmd, &all_vgnameids, only_this_vgname, 1) != ECMD_PROCESSED)) {
+ stack;
+ return ret;
+ }
+
+ /*
* If the caller wants to process all devices (not just PVs), then all PVs
* from all VGs are processed first, removing them from all_devices. Then
* any devs remaining in all_devices are processed.
@@ -2834,15 +2844,6 @@ int process_each_pv(struct cmd_context *cmd,
/* get_arg_devices reports the error for any PV names not found. */
ret_max = ECMD_FAILED;
- /*
- * Read all the vgs first because this has the effect of initializing
- * other device/lvmcache info that is needed when creating device lists.
- */
- if ((ret = _get_vgnameids_on_system(cmd, &all_vgnameids, only_this_vgname, 1) != ECMD_PROCESSED)) {
- stack;
- return ret;
- }
-
ret = _process_pvs_in_vgs(cmd, flags, &all_vgnameids, &all_devices,
&arg_devices, &arg_tags,
process_all_pvs, process_all_devices,
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2b4f10ac668f01e6…
Commit: 2b4f10ac668f01e63528ccea71545c06120fa9aa
Parent: cf4df9e3496d60e7183952e44863250e64618748
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Apr 20 19:10:29 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Apr 20 19:18:56 2015 +0200
debug: change envvar
Rename envvar LVM_LOG_FILE_UNLINK_STATUS to LVM_EXPECTED_EXIT_STATUS
and change compare sign from '!' to '>'.
Validate LVM_LOG_FILE_EPOCH and support strictly only
up-to 32 alpha chars. If the content doesn't pass
epoch is simply ignored.
---
lib/log/log.c | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/lib/log/log.c b/lib/log/log.c
index 141d02d..d8d65ee 100644
--- a/lib/log/log.c
+++ b/lib/log/log.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <syslog.h>
+#include <ctype.h>
static FILE *_log_file;
static char _log_file_path[PATH_MAX];
@@ -56,11 +57,12 @@ void init_log_fn(lvm2_log_fn_t log_fn)
/*
* Support envvar LVM_LOG_FILE_EPOCH and allow to attach
- * extra keyword to openned log file. After this word pid
- * and starttime (in kernel units, read from /proc/self/stat
+ * extra keyword (consist of upto 32 alpha chars) to
+ * opened log file. After this 'epoch' word pid and starttime
+ * (in kernel units, read from /proc/self/stat)
* is automatically attached.
* If command/daemon forks multiple times, it could create multiple
- * log files ensure, there are no overwrites.
+ * log files ensuring, there are no overwrites.
*/
void init_log_file(const char *log_file, int append)
{
@@ -69,9 +71,18 @@ void init_log_file(const char *log_file, int append)
int pid;
long long starttime;
FILE *st;
+ int i = 0;
_log_file_path[0] = '\0';
if ((env = getenv("LVM_LOG_FILE_EPOCH"))) {
+ while (isalpha(env[i]) && i < 32) /* Up to 32 alphas */
+ i++;
+ if (env[i]) {
+ if (i)
+ log_warn("WARNING: Ignoring invalid LVM_LOG_FILE_EPOCH envvar \"%s\".", env);
+ goto no_epoch;
+ }
+
if (!(st = fopen(statfile, "r")))
log_sys_error("fopen", statfile);
else if (fscanf(st, "%d %*s %*c %*d %*d %*d %*d " /* tty_nr */
@@ -94,7 +105,7 @@ void init_log_file(const char *log_file, int append)
}
}
}
-
+no_epoch:
if (!(_log_file = fopen(log_file, append ? "a" : "w"))) {
log_sys_error("fopen", log_file);
return;
@@ -106,21 +117,21 @@ void init_log_file(const char *log_file, int append)
/*
* Unlink the log file depeding on command's return value
*
- * When envvar LVM_LOG_FILE_UNLINK_STATUS is set, compare
+ * When envvar LVM_EXPECTED_EXIT_STATUS is set, compare
* resulting status with this string.
*
* It's possible to specify 2 variants - having it equal to
* a single number or having it different from a single number.
*
- * i.e. LVM_LOG_FILE_UNLINK_STATUS="!1" # delete when ret != 1.
+ * i.e. LVM_EXPECTED_EXIT_STATUS=">1" # delete when ret > 1.
*/
void unlink_log_file(int ret)
{
const char *env;
if (_log_file_path[0] &&
- (env = getenv("LVM_LOG_FILE_UNLINK_STATUS")) &&
- ((env[0] == '!' && atoi(env + 1) != ret) ||
+ (env = getenv("LVM_EXPECTED_EXIT_STATUS")) &&
+ ((env[0] == '>' && ret > atoi(env + 1)) ||
(atoi(env) == ret))) {
if (unlink(_log_file_path))
log_sys_error("unlink", _log_file_path);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=de4791c052b1576b…
Commit: de4791c052b1576bb9de73b3fa8e51b771522f7e
Parent: 5cd6381717696ad1513a9f8ff1cbd8fa3098e4b1
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Mon Apr 20 10:31:43 2015 +0200
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Mon Apr 20 10:38:54 2015 +0200
WHATS_NEW: update for various commits
add info for various commits, most significant were:
- toollib: close connection to lvmetad after fork
(fe30658a4d5fe4e4e6bb346c9c9ee7142a98f49d)
- toollib: do not spawn polling in lv_change_activate
(c26d81d6e6939906729d91fae83cd8bbdd743bb7)
- pvmove: split pvmove_update_metadata function
(65623b63a20a221b48dfd87455dc77f5ac0c6bf4)
- lvconvert: move poll code in before refactoring
(5190f566055ab4584772b1288fd8cbf69565eb4a)
- pvmove: move poll code in before refactoring
(a098aa419f5be5d8f805ab6dc747770e58a4b7b1)
---
WHATS_NEW | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 9c306db..987a7c9 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,9 @@
Version 2.02.119 -
==================================
+ Close connection to lvmetad after fork.
+ Make lvchange able to resume background pvmove polling again.
+ Split pvmove update metadata fn in an initial one and a subsequent one.
+ Refactor shared pvmove and lvconvert code into new _poll files.
Add --unconfigured option to dumpconfig to print strings unconfigured.
Add --withfullcomments option to dumpconfig to print full comment.
Check for lvm binary in blkdeactivate and skip LVM processing if not present.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5cd6381717696ad1…
Commit: 5cd6381717696ad1513a9f8ff1cbd8fa3098e4b1
Parent: 061e371319676a914a65f07678d0d15f4000c468
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Apr 17 11:31:16 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Apr 17 11:35:34 2015 -0500
dumpconfig: add --unconfigured option
Using this option, default string values that are
configurable are printed as unconfigured values,
e.g. "@CONFDIR@" instead of "/etc".
---
WHATS_NEW | 1 +
lib/config/config.c | 13 +-
lib/config/config.h | 12 +-
lib/config/config_settings.h | 400 +++++++++++++++++++++---------------------
tools/args.h | 1 +
tools/commands.h | 3 +-
tools/dumpconfig.c | 2 +
7 files changed, 221 insertions(+), 211 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 29e461c..9c306db 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.119 -
==================================
+ Add --unconfigured option to dumpconfig to print strings unconfigured.
Add --withfullcomments option to dumpconfig to print full comment.
Check for lvm binary in blkdeactivate and skip LVM processing if not present.
Add --enable-halvm and --disable-halvm options to lvmconf script.
diff --git a/lib/config/config.c b/lib/config/config.c
index 8f116cd..57e7cb9 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, comment},
-#define cfg(id, name, parent, flags, type, default_value, since_version, comment) {id, parent, name, type, {.v_##type = default_value}, flags, since_version, 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, comment},
-#define cfg_array(id, name, parent, flags, types, default_value, since_version, comment) {id, parent, name, CFG_TYPE_ARRAY | types, {.v_CFG_TYPE_STRING = default_value}, flags, since_version, 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, comment},
+#define cfg_section(id, name, parent, flags, since_version, unconfigured_path, comment) {id, parent, name, CFG_TYPE_SECTION, {0}, flags, since_version, unconfigured_path, comment},
+#define cfg(id, name, parent, flags, type, default_value, since_version, unconfigured_path, comment) {id, parent, name, type, {.v_##type = default_value}, flags, since_version, unconfigured_path, comment},
+#define cfg_runtime(id, name, parent, flags, type, since_version, unconfigured_path, comment) {id, parent, name, type, {.fn_##type = get_default_##id}, flags | CFG_DEFAULT_RUN_TIME, since_version, unconfigured_path, comment},
+#define cfg_array(id, name, parent, flags, types, default_value, since_version, unconfigured_path, comment) {id, parent, name, CFG_TYPE_ARRAY | types, {.v_CFG_TYPE_STRING = default_value}, flags, since_version, unconfigured_path, comment},
+#define cfg_array_runtime(id, name, parent, flags, types, since_version, unconfigured_path, comment) {id, parent, name, CFG_TYPE_ARRAY | types, {.fn_CFG_TYPE_STRING = get_default_##id}, flags | CFG_DEFAULT_RUN_TIME, since_version, unconfigured_path, comment},
#include "config_settings.h"
#undef cfg_section
#undef cfg
@@ -1697,6 +1697,9 @@ static struct dm_config_node *_add_def_node(struct dm_config_tree *cft,
if (!(str = cfg_def_get_default_value_hint(spec->cmd, def, CFG_TYPE_STRING, NULL)))
str = "";
cn->v->v.str = str;
+
+ if (spec->unconfigured && def->unconfigured_path)
+ cn->v->v.str = def->unconfigured_path;
break;
default:
log_error(INTERNAL_ERROR "_add_def_node: unknown type");
diff --git a/lib/config/config.h b/lib/config/config.h
index 72c7606..54bd183 100644
--- a/lib/config/config.h
+++ b/lib/config/config.h
@@ -121,6 +121,7 @@ typedef struct cfg_def_item {
cfg_def_value_t default_value; /* default value (only for settings) */
uint16_t flags; /* configuration item definition flags */
uint16_t since_version; /* version this item appeared in */
+ const char *unconfigured_path; /* path in terms of @FOO@, pre-configured */
const char *comment; /* brief comment */
} cfg_def_item_t;
@@ -147,6 +148,7 @@ struct config_def_tree_spec {
unsigned withcomments:1; /* include first line of comment */
unsigned withfullcomments:1; /* include all comment lines */
unsigned withversions:1; /* include versions */
+ unsigned unconfigured:1; /* use unconfigured path strings */
uint8_t *check_status; /* status of last tree check (currently needed for CFG_DEF_TREE_MISSING only) */
};
@@ -162,11 +164,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, 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, comment) id,
-#define cfg_array_runtime(id, name, parent, flags, types, since_version, comment) id,
+#define cfg_section(id, name, parent, flags, since_version, unconfigured_path, comment) id,
+#define cfg(id, name, parent, flags, type, default_value, since_version, unconfigured_path, comment) id,
+#define cfg_runtime(id, name, parent, flags, type, since_version, unconfigured_path, comment) id,
+#define cfg_array(id, name, parent, flags, types, default_value, since_version, unconfigured_path, comment) id,
+#define cfg_array_runtime(id, name, parent, flags, types, since_version, unconfigured_path, 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 c0a732e..78304ed 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -71,49 +71,49 @@
*/
#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), 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), 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), 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), 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), 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), 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), 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), 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, CFG_ADVANCED, vsn(1, 0, 0), NULL)
+cfg_section(activation_CFG_SECTION, "activation", root_CFG_SECTION, CFG_PROFILABLE, vsn(1, 0, 0), NULL, NULL)
+cfg_section(metadata_CFG_SECTION, "metadata", root_CFG_SECTION, CFG_ADVANCED, vsn(1, 0, 0), NULL, NULL)
-cfg_section(report_CFG_SECTION, "report", root_CFG_SECTION, CFG_ADVANCED | CFG_PROFILABLE, vsn(1, 0, 0),
+cfg_section(report_CFG_SECTION, "report", root_CFG_SECTION, CFG_ADVANCED | CFG_PROFILABLE, vsn(1, 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), 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), 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), 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),
+cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 99), 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"
@@ -121,22 +121,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),
+cfg(config_abort_on_errors_CFG, "abort_on_errors", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2,2,99), 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), "@DEFAULT_SYS_DIR@/@DEFAULT_PROFILE_SUBDIR@",
"Directory where LVM looks for configuration profiles.\n")
-cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DEV_DIR, vsn(1, 0, 0),
+cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DEV_DIR, vsn(1, 0, 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, 0, CFG_TYPE_STRING, "#S/dev", vsn(1, 0, 0),
+cfg_array(devices_scan_CFG, "scan", devices_CFG_SECTION, 0, CFG_TYPE_STRING, "#S/dev", vsn(1, 0, 0), NULL,
"Directories containing device nodes to use with LVM.\n")
-cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 2, 0), NULL)
+cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 2, 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),
+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,
"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"
@@ -146,7 +146,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),
+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,
"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"
@@ -161,7 +161,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),
+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,
"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"
@@ -178,7 +178,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),
+cfg_array(devices_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 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"
@@ -213,7 +213,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),
+cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 98), 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"
@@ -221,10 +221,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), NULL,
"This has been replaced by 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), "@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@",
"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"
@@ -233,46 +233,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),
+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,
"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),
+cfg(devices_write_cache_state_CFG, "write_cache_state", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(1, 0, 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_TYPE_INT | CFG_TYPE_STRING, NULL, vsn(1, 0, 0),
+cfg_array(devices_types_CFG, "types", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT | CFG_TYPE_STRING, NULL, vsn(1, 0, 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),
+cfg(devices_sysfs_scan_CFG, "sysfs_scan", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSFS_SCAN, vsn(1, 0, 8), 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),
+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,
"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),
+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,
"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),
+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,
"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),
+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,
"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),
+cfg(devices_default_data_alignment_CFG, "default_data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_DATA_ALIGNMENT, vsn(2, 2, 75), 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),
+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,
"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"
@@ -284,7 +284,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),
+cfg(devices_data_alignment_CFG, "data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(2, 2, 45), 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"
@@ -292,7 +292,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),
+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,
"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"
@@ -302,12 +302,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),
+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,
"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),
+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,
"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"
@@ -327,7 +327,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),
+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,
"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"
@@ -335,16 +335,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),
+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,
"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),
+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,
"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),
+cfg(devices_issue_discards_CFG, "issue_discards", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ISSUE_DISCARDS, vsn(2, 2, 85), 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"
@@ -356,7 +356,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),
+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,
"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"
@@ -373,14 +373,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),
+cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MAXIMISE_CLING, vsn(2, 2, 85), 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),
+cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), 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"
@@ -391,7 +391,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),
+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,
"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"
@@ -411,14 +411,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),
+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,
"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),
+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,
"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),
+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,
"The default cache mode used for new cache pools.\n"
"Possible options are: writethrough, writeback.\n"
"writethrough - Data blocks are immediately written from\n"
@@ -426,7 +426,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), 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"
@@ -438,18 +438,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),
+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,
"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),
+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,
"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),
+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,
"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),
+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,
"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"
@@ -461,7 +461,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), 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"
@@ -470,13 +470,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),
+cfg(allocation_physical_extent_size_CFG, "physical_extent_size", allocation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_EXTENT_SIZE, vsn(2, 2, 112), 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),
+cfg(log_verbose_CFG, "verbose", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_VERBOSE, vsn(1, 0, 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),
+cfg(log_silent_CFG, "silent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SILENT, vsn(2, 2, 98), 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"
@@ -487,40 +487,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),
+cfg(log_syslog_CFG, "syslog", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSLOG, vsn(1, 0, 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),
+cfg(log_file_CFG, "file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 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),
+cfg(log_overwrite_CFG, "overwrite", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_OVERWRITE, vsn(1, 0, 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),
+cfg(log_level_CFG, "level", log_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_LOGLEVEL, vsn(1, 0, 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),
+cfg(log_indent_CFG, "indent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_INDENT, vsn(1, 0, 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),
+cfg(log_command_names_CFG, "command_names", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CMD_NAME, vsn(1, 0, 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),
+cfg(log_prefix_CFG, "prefix", log_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_MSG_PREFIX, vsn(1, 0, 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),
+cfg(log_activation_CFG, "activation", log_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(1, 0, 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_TYPE_STRING, NULL, vsn(1, 0, 0), NULL)
+cfg(log_activate_file_CFG, "activate_file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 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),
+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,
"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"
@@ -529,63 +529,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),
+cfg(backup_backup_CFG, "backup", backup_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_BACKUP_ENABLED, vsn(1, 0, 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), "@DEFAULT_SYS_DIR@/@DEFAULT_BACKUP_SUBDIR@",
"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),
+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@",
"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), 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),
+cfg(backup_retain_min_CFG, "retain_min", backup_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_ARCHIVE_NUMBER, vsn(1, 0, 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),
+cfg(backup_retain_days_CFG, "retain_days", backup_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_ARCHIVE_DAYS, vsn(1, 0, 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),
+cfg(shell_history_size_CFG, "history_size", shell_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_MAX_HISTORY, vsn(1, 0, 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),
+cfg(global_umask_CFG, "umask", global_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_UMASK, vsn(1, 0, 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),
+cfg(global_test_CFG, "test", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(1, 0, 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),
+cfg(global_units_CFG, "units", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_UNITS, vsn(1, 0, 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),
+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,
"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),
+cfg(global_suffix_CFG, "suffix", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_SUFFIX, vsn(1, 0, 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),
+cfg(global_activation_CFG, "activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION, vsn(1, 0, 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),
+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,
"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"
@@ -593,25 +593,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),
+cfg(global_format_CFG, "format", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_FORMAT, vsn(1, 0, 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),
+cfg_array(global_format_libraries_CFG, "format_libraries", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 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)
+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(global_proc_CFG, "proc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_PROC_DIR, vsn(1, 0, 0),
+cfg(global_proc_CFG, "proc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_PROC_DIR, vsn(1, 0, 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),
+cfg(global_etc_CFG, "etc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ETC_DIR, vsn(2, 2, 117), "@CONFDIR@",
"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),
+cfg(global_locking_type_CFG, "locking_type", global_CFG_SECTION, 0, CFG_TYPE_INT, 1, vsn(1, 0, 0), NULL,
"Type of locking to use.\n"
"Type 0: turns off locking. Warning: this risks metadata\n"
"corruption if commands run concurrently.\n"
@@ -632,17 +632,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),
+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,
"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),
+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,
"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),
+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,
"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"
@@ -651,13 +651,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),
+cfg(global_locking_dir_CFG, "locking_dir", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_LOCK_DIR, vsn(1, 0, 0), "@DEFAULT_LOCK_DIR@",
"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),
+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,
"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"
@@ -668,26 +668,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),
+cfg(global_library_dir_CFG, "library_dir", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 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),
+cfg(global_locking_library_CFG, "locking_library", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_LOCKING_LIB, vsn(1, 0, 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),
+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,
"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),
+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,
"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),
+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,
"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"
@@ -695,7 +695,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),
+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@",
"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"
@@ -717,7 +717,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),
+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@",
"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"
@@ -732,7 +732,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),
+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@",
"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"
@@ -747,14 +747,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),
+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,
"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),
+cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 93), 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"
@@ -788,7 +788,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),
+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@",
"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"
@@ -800,19 +800,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),
+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@",
"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),
+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@",
"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_OPTIONS, vsn(2, 2, 96),
+cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_THIN_CHECK_OPTIONS, vsn(2, 2, 96), NULL,
"String 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"
@@ -820,10 +820,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, 0, CFG_TYPE_STRING, "#S" DEFAULT_THIN_REPAIR_OPTIONS, vsn(2, 2, 100),
+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,
"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),
+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,
"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"
@@ -833,7 +833,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),
+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@",
"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"
@@ -845,25 +845,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),
+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@",
"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),
+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@",
"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_OPTIONS, vsn(2, 2, 108),
+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),
+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,
"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),
+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"
"Volume Groups can also be given a system ID (by\n"
"vgcreate, vgchange, or vgimport.)\n"
@@ -883,18 +883,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),
+cfg(global_system_id_file_CFG, "system_id_file", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117), 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),
+cfg(activation_checks_CFG, "checks", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION_CHECKS, vsn(2, 2, 86), 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),
+cfg(activation_udev_sync_CFG, "udev_sync", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_UDEV_SYNC, vsn(2, 2, 51), 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"
@@ -905,28 +905,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),
+cfg(activation_udev_rules_CFG, "udev_rules", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_UDEV_RULES, vsn(2, 2, 57), 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),
+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,
"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),
+cfg(activation_retry_deactivation_CFG, "retry_deactivation", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_RETRY_DEACTIVATION, vsn(2, 2, 89), 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, 0, CFG_TYPE_STRING, DEFAULT_STRIPE_FILLER, vsn(1, 0, 0),
+cfg(activation_missing_stripe_filler_CFG, "missing_stripe_filler", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_STRIPE_FILLER, vsn(1, 0, 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"
@@ -934,26 +934,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),
+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,
"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),
+cfg(activation_reserved_stack_CFG, "reserved_stack", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_STACK, vsn(1, 0, 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),
+cfg(activation_reserved_memory_CFG, "reserved_memory", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_MEMORY, vsn(1, 0, 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),
+cfg(activation_process_priority_CFG, "process_priority", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_PROCESS_PRIORITY, vsn(1, 0, 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),
+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,
"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"
@@ -970,7 +970,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),
+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,
"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"
@@ -1000,7 +1000,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),
+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,
"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"
@@ -1010,16 +1010,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),
+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,
"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),
+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,
"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),
+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,
"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"
@@ -1029,13 +1029,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),
+cfg(activation_readahead_CFG, "readahead", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_READ_AHEAD, vsn(1, 0, 23), 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),
+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,
"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"
@@ -1053,7 +1053,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), 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"
@@ -1088,15 +1088,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),
+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,
"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),
+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,
"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),
+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,
"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"
@@ -1110,13 +1110,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),
+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,
"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),
+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,
"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"
@@ -1130,12 +1130,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),
+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,
"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_TYPE_STRING, NULL, vsn(2, 2, 62),
+cfg_array(activation_mlock_filter_CFG, "mlock_filter", activation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 62), 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"
@@ -1151,18 +1151,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),
+cfg(activation_use_mlockall_CFG, "use_mlockall", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_USE_MLOCKALL, vsn(2, 2, 62), 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),
+cfg(activation_monitoring_CFG, "monitoring", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DMEVENTD_MONITOR, vsn(2, 2, 63), 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),
+cfg(activation_polling_interval_CFG, "polling_interval", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_INTERVAL, vsn(2, 2, 63), 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"
@@ -1171,7 +1171,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),
+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,
"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"
@@ -1181,7 +1181,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),
+cfg(activation_mode_CFG, "activation_mode", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ACTIVATION_MODE, vsn(2,2,108), 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"
@@ -1199,7 +1199,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),
+cfg(metadata_pvmetadatacopies_CFG, "pvmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATACOPIES, vsn(1, 0, 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"
@@ -1209,7 +1209,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, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_VGMETADATACOPIES, vsn(2, 2, 69),
+cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_VGMETADATACOPIES, vsn(2, 2, 69), 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"
@@ -1221,7 +1221,7 @@ cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, CFG
"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, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATASIZE, vsn(1, 0, 0),
+cfg(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATASIZE, vsn(1, 0, 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"
@@ -1229,15 +1229,15 @@ cfg(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, CFG_ADV
"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),
+cfg(metadata_pvmetadataignore_CFG, "pvmetadataignore", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_BOOL, DEFAULT_PVMETADATAIGNORE, vsn(2, 2, 69), 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)
+cfg(metadata_stripesize_CFG, "stripesize", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_STRIPESIZE, vsn(1, 0, 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),
+cfg_array(metadata_dirs_CFG, "dirs", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 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"
@@ -1252,22 +1252,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_ADVANCED | 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_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, vsn(1, 0, 0), NULL)
-cfg(disk_area_start_sector_CFG, "start_sector", disk_area_CFG_SUBSECTION, CFG_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL)
-cfg(disk_area_size_CFG, "size", disk_area_CFG_SUBSECTION, CFG_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL)
-cfg(disk_area_id_CFG, "id", disk_area_CFG_SUBSECTION, CFG_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL)
+cfg_section(metadata_disk_areas_CFG_SUBSECTION, "disk_areas", metadata_CFG_SECTION, CFG_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, vsn(1, 0, 0), NULL, NULL)
+cfg_section(disk_area_CFG_SUBSECTION, "disk_area", metadata_disk_areas_CFG_SUBSECTION, CFG_NAME_VARIABLE | CFG_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, vsn(1, 0, 0), NULL, NULL)
+cfg(disk_area_start_sector_CFG, "start_sector", disk_area_CFG_SUBSECTION, CFG_ADVANCED | 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_ADVANCED | 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_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 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),
+cfg(report_compact_output_CFG, "compact_output", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_COMPACT_OUTPUT, vsn(2, 2, 115), 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),
+cfg(report_aligned_CFG, "aligned", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_ALIGNED, vsn(1, 0, 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),
+cfg(report_buffered_CFG, "buffered", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_BUFFERED, vsn(1, 0, 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"
@@ -1275,134 +1275,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),
+cfg(report_headings_CFG, "headings", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_HEADINGS, vsn(1, 0, 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),
+cfg(report_separator_CFG, "separator", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_REP_SEPARATOR, vsn(1, 0, 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),
+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,
"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),
+cfg(report_prefixes_CFG, "prefixes", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_PREFIXES, vsn(2, 2, 36), 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),
+cfg(report_quoted_CFG, "quoted", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_QUOTED, vsn(2, 2, 39), 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),
+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,
"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),
+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,
"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),
+cfg(report_devtypes_sort_CFG, "devtypes_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_DEVTYPES_SORT, vsn(2, 2, 101), 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),
+cfg(report_devtypes_cols_CFG, "devtypes_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_DEVTYPES_COLS, vsn(2, 2, 101), 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),
+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,
"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),
+cfg(report_lvs_sort_CFG, "lvs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_LVS_SORT, vsn(1, 0, 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),
+cfg(report_lvs_cols_CFG, "lvs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_LVS_COLS, vsn(1, 0, 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),
+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,
"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),
+cfg(report_vgs_sort_CFG, "vgs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_VGS_SORT, vsn(1, 0, 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),
+cfg(report_vgs_cols_CFG, "vgs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_VGS_COLS, vsn(1, 0, 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),
+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,
"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),
+cfg(report_pvs_sort_CFG, "pvs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVS_SORT, vsn(1, 0, 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),
+cfg(report_pvs_cols_CFG, "pvs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVS_COLS, vsn(1, 0, 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),
+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,
"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),
+cfg(report_segs_sort_CFG, "segs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_SEGS_SORT, vsn(1, 0, 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),
+cfg(report_segs_cols_CFG, "segs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_SEGS_COLS, vsn(1, 0, 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),
+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,
"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),
+cfg(report_pvsegs_sort_CFG, "pvsegs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVSEGS_SORT, vsn(1, 1, 3), 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),
+cfg(report_pvsegs_cols_CFG, "pvsegs_cols", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVSEGS_COLS, vsn(1, 1, 3), 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),
+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,
"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),
+cfg(dmeventd_mirror_library_CFG, "mirror_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_MIRROR_LIB, vsn(1, 2, 3), 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)
+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_snapshot_library_CFG, "snapshot_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_SNAPSHOT_LIB, vsn(1, 2, 26),
+cfg(dmeventd_snapshot_library_CFG, "snapshot_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_SNAPSHOT_LIB, vsn(1, 2, 26), 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),
+cfg(dmeventd_thin_library_CFG, "thin_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_THIN_LIB, vsn(2, 2, 89), 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),
+cfg(dmeventd_executable_CFG, "executable", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_PATH, vsn(2, 2, 73), "@DMEVENTD_PATH@",
"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),
+cfg(tags_hosttags_CFG, "hosttags", tags_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_HOSTTAGS, vsn(1, 0, 18), 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), 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"
@@ -1418,14 +1418,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),
+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,
"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),
+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,
"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"
@@ -1440,7 +1440,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),
+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,
"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"
@@ -1450,4 +1450,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)
+cfg(CFG_COUNT, NULL, root_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(0, 0, 0), NULL, NULL)
diff --git a/tools/args.h b/tools/args.h
index 4a43457..201a2ef 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -109,6 +109,7 @@ arg(unbuffered_ARG, '\0', "unbuffered", NULL, 0)
arg(uncache_ARG, '\0', "uncache", NULL, 0)
arg(cachepolicy_ARG, '\0', "cachepolicy", string_arg, 0)
arg(cachesettings_ARG, '\0', "cachesettings", string_arg, ARG_GROUPABLE)
+arg(unconfigured_ARG, '\0', "unconfigured", NULL, 0)
arg(units_ARG, '\0', "units", string_arg, 0)
arg(unquoted_ARG, '\0', "unquoted", NULL, 0)
arg(use_policies_ARG, '\0', "use-policies", NULL, 0)
diff --git a/tools/commands.h b/tools/commands.h
index b9c7a8b..10916bf 100644
--- a/tools/commands.h
+++ b/tools/commands.h
@@ -71,11 +71,12 @@ xx(dumpconfig,
"\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, mergedconfig_ARG, metadataprofile_ARG,
- validate_ARG, withcomments_ARG, withfullcomments_ARG, withversions_ARG)
+ validate_ARG, withcomments_ARG, withfullcomments_ARG, unconfigured_ARG, withversions_ARG)
xx(formats,
"List available metadata formats",
diff --git a/tools/dumpconfig.c b/tools/dumpconfig.c
index 6d2108f..2d1cd9c 100644
--- a/tools/dumpconfig.c
+++ b/tools/dumpconfig.c
@@ -221,6 +221,8 @@ int dumpconfig(struct cmd_context *cmd, int argc, char **argv)
tree_spec.withcomments = 1;
if (arg_count(cmd, withfullcomments_ARG))
tree_spec.withfullcomments = 1;
+ if (arg_count(cmd, unconfigured_ARG))
+ tree_spec.unconfigured = 1;
if (arg_count(cmd, withversions_ARG))
tree_spec.withversions = 1;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=105c07d1b4d34191…
Commit: 105c07d1b4d34191ed939f53d98b253e620e449b
Parent: 5f6ac1c81274de2a3162764d7c4b14a80b3a5ae2
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Apr 15 14:21:20 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Apr 15 14:21:20 2015 -0500
config: edit descriptions
Take some new information and wording from lvm.conf.5.
---
lib/config/config_settings.h | 100 ++++++++++++++++++++++++++++++------------
1 files changed, 72 insertions(+), 28 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 4dcec95..c0a732e 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -107,16 +107,18 @@ cfg_section(report_CFG_SECTION, "report", root_CFG_SECTION, CFG_ADVANCED | CFG_P
cfg_section(dmeventd_CFG_SECTION, "dmeventd", root_CFG_SECTION, 0, vsn(1, 2, 3),
"Settings for the LVM event daemon.\n")
-cfg_section(tags_CFG_SECTION, "tags", root_CFG_SECTION, 0, vsn(1, 0, 18), NULL)
+cfg_section(tags_CFG_SECTION, "tags", root_CFG_SECTION, 0, vsn(1, 0, 18),
+ "Host tag settings.\n")
+
cfg_section(local_CFG_SECTION, "local", root_CFG_SECTION, 0, vsn(2, 2, 117),
"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),
"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 of a proper type.\n"
- "If disabled, any configuration mismatch is ignored and default\n"
- "value is used instead without any warning (a message about the\n"
+ "by LVM and that the value of the key is the proper type.\n"
+ "If disabled, any configuration mismatch is ignored and the default\n"
+ "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),
@@ -500,7 +502,7 @@ cfg(log_level_CFG, "level", log_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_LOGLEVEL,
"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),
- "indent messages according to their severity.\n")
+ "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),
"Display the command name on each line of output.\n")
@@ -544,10 +546,10 @@ cfg_runtime(backup_archive_dir_CFG, "archive_dir", backup_CFG_SECTION, 0, CFG_TY
"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),
- "The minimum number of archive files you wish to keep.\n")
+ "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),
- "The minimum time you wish to keep an archive file.\n")
+ "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),
"Number of lines of history to store in ~/.lvm_history.\n")
@@ -939,13 +941,17 @@ cfg(activation_use_linear_target_CFG, "use_linear_target", activation_CFG_SECTIO
"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),
- "Stack size in KB to reserve for use while devices are suspended.\n")
+ "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),
- "Memory size in KB to reserve for use while devices are suspended.\n")
+ "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),
- "Nice value used while devices are suspended.\n")
+ "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),
"Only LVs selected by this list are activated.\n"
@@ -1168,9 +1174,12 @@ cfg(activation_polling_interval_CFG, "polling_interval", activation_CFG_SECTION,
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),
"Set the activation skip flag on new thin snapshot LVs.\n"
"An LV can have a persistent 'activation skip' flag.\n"
- "The flag determines if the LV is skipped during activation.\n"
+ "The flag causes the LV to be skipped during normal activation.\n"
+ "The lvchange/vgchange -K option is required to activate LVs\n"
+ "that have the activation skip flag set.\n"
"When this setting is enabled, the activation skip flag is\n"
- "set on new thin snapshot LVs.\n")
+ "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),
"How LVs with missing devices are activated.\n"
@@ -1193,9 +1202,12 @@ cfg(activation_mode_CFG, "activation_mode", activation_CFG_SECTION, 0, CFG_TYPE_
cfg(metadata_pvmetadatacopies_CFG, "pvmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATACOPIES, vsn(1, 0, 0),
"Number of copies of metadata to store on each PV.\n"
"Possible options are: 0, 1, 2.\n"
- "You may want to override this from the command line\n"
- "with 0 when running pvcreate on new PVs which are to\n"
- "be added to large VGs.\n")
+ "If set to 2, two copies of the VG metadata are stored on\n"
+ "the PV, one at the front of the PV, and one at the end.\n"
+ "If set to 1, one copy is stored at the front of the PV.\n"
+ "If set to 0, no copies are stored on the PV. This may\n"
+ "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, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_VGMETADATACOPIES, vsn(2, 2, 69),
"Number of copies of metadata to maintain for each VG.\n"
@@ -1206,14 +1218,23 @@ cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, CFG
"metadata is stored in them all.\n"
"The value 0 (unmanaged) disables this automatic management\n"
"and allows you to control which metadata areas are used at\n"
- "the individual PV level using 'pvchange --metadataignore y|n'.\n")
+ "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, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATASIZE, vsn(1, 0, 0),
- "Approximate default size of on-disk metadata areas in sectors.\n"
- "Increase this if you have large volume groups or you want to\n"
- "retain a large on-disk history of your metadata changes.\n")
+ "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"
+ "metadata. The metadata areas are treated as circular buffers,\n"
+ "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),
+ "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_pvmetadataignore_CFG, "pvmetadataignore", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_BOOL, DEFAULT_PVMETADATAIGNORE, vsn(2, 2, 69), NULL)
cfg(metadata_stripesize_CFG, "stripesize", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_STRIPESIZE, 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),
@@ -1238,12 +1259,13 @@ cfg(disk_area_size_CFG, "size", disk_area_CFG_SUBSECTION, CFG_ADVANCED | CFG_UNS
cfg(disk_area_id_CFG, "id", disk_area_CFG_SUBSECTION, CFG_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL)
cfg(report_compact_output_CFG, "compact_output", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_COMPACT_OUTPUT, vsn(2, 2, 115),
- "If enabled, fields which don't have value set for any of the rows\n"
- "reported are skipped on output. Compact output is applicable only\n"
- "if report is buffered (report/buffered=1).\n")
+ "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),
- "Align columns on report output.\n")
+ "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),
"Buffer report output.\n"
@@ -1376,10 +1398,32 @@ cfg(dmeventd_thin_library_CFG, "thin_library", dmeventd_CFG_SECTION, 0, CFG_TYPE
cfg(dmeventd_executable_CFG, "executable", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_PATH, vsn(2, 2, 73),
"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_section(tag_CFG_SUBSECTION, "tag", tags_CFG_SECTION, CFG_NAME_VARIABLE | CFG_DEFAULT_UNDEFINED, 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)
+cfg(tags_hosttags_CFG, "hosttags", tags_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_HOSTTAGS, vsn(1, 0, 18),
+ "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),
+ "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"
+ "This subsection can contain host_list, which is a\n"
+ "list of machine names. If the name of the local\n"
+ "machine is found in host_list, then the name of\n"
+ "this subsection is used as a tag and is applied\n"
+ "to the local machine as a 'host tag'.\n"
+ "If this subsection is empty (has no host_list), then\n"
+ "the subsection name is always applied as a 'host tag'.\n"
+ "Example:\n"
+ "The host tag foo is given to all hosts, and the host tag\n"
+ "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),
+ "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),
"Defines the local system ID for lvmlocal mode.\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=22defdac64703945…
Commit: 22defdac64703945938483433a8d7cc7e3708ef9
Parent: 6cdab82cf360f2237fc55aabac60e7e1f8866250
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Apr 15 09:19:11 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Apr 15 09:19:11 2015 +0200
man: fix some formatting and also mention -vv
---
man/blkdeactivate.8.in | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/man/blkdeactivate.8.in b/man/blkdeactivate.8.in
index ebeaeaa..990be4a 100644
--- a/man/blkdeactivate.8.in
+++ b/man/blkdeactivate.8.in
@@ -9,9 +9,7 @@ blkdeactivate \(em utility to deactivate block devices
.RB [ \-l \ \fIlvm_options\fP ]
.RB [ \-u ]
.RB [ \-v ]
-.RS
.RI [ device ]
-.RE
.SH DESCRIPTION
blkdeactivate utility deactivates block devices. If a device
is mounted, the utility can unmount it automatically before
@@ -57,7 +55,7 @@ Unmount a mounted device before trying to deactivate it.
Without this option used, a device that is mounted is not deactivated.
.TP
.BR \-v ", " \-\-verbose
-Run in verbose mode.
+Run in verbose mode. Use \-\-vv for even more verbose mode.
.SH EXAMPLES
.sp
Deactivate all supported block devices found in the system. If a device
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6cdab82cf360f223…
Commit: 6cdab82cf360f2237fc55aabac60e7e1f8866250
Parent: 7e58ae7dac10345d5f461d3c349a0864f72796da
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Apr 13 16:55:58 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Apr 14 17:00:28 2015 -0500
config: edit descriptions
Rewording so the first line of the description
works as a single line summary of the option.
---
lib/config/config_settings.h | 1005 ++++++++++++++++++++++--------------------
1 files changed, 533 insertions(+), 472 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 1e53c7e..4dcec95 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -74,40 +74,43 @@
cfg_section(root_CFG_SECTION, "(root)", root_CFG_SECTION, 0, vsn(0, 0, 0), NULL)
cfg_section(config_CFG_SECTION, "config", root_CFG_SECTION, 0, vsn(2, 2, 99),
- "This section allows you to set the way the configuration settings are handled.\n")
+ "How LVM configuration settings are handled.\n")
cfg_section(devices_CFG_SECTION, "devices", root_CFG_SECTION, 0, vsn(1, 0, 0),
- "This section allows you to configure which block devices should\n"
- "be used by the LVM system.\n")
+ "How LVM uses block devices.\n")
cfg_section(allocation_CFG_SECTION, "allocation", root_CFG_SECTION, CFG_PROFILABLE, vsn(2, 2, 77),
- "This section allows you to configure the way in which LVM selects\n"
- "free space for its Logical Volumes.\n")
+ "How LVM selects free space for Logical Volumes.\n")
cfg_section(log_CFG_SECTION, "log", root_CFG_SECTION, 0, vsn(1, 0, 0),
- "This section that allows you to configure the nature of the\n"
- "information that LVM reports.\n")
+ "How LVM log information is reported.\n")
cfg_section(backup_CFG_SECTION, "backup", root_CFG_SECTION, 0, vsn(1, 0, 0),
- "Configuration of metadata backups and archiving. In LVM when we\n"
- "talk about a 'backup' we mean making a copy of the metadata for the\n"
- "*current* system. The 'archive' contains old metadata configurations.\n"
- "Backups are stored in a human readable text format.\n")
+ "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),
- "Settings for the running LVM in shell (readline) mode.\n")
+ "Settings for running LVM in shell (readline) mode.\n")
cfg_section(global_CFG_SECTION, "global", root_CFG_SECTION, CFG_PROFILABLE, vsn(1, 0, 0),
"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, CFG_ADVANCED, vsn(1, 0, 0), NULL)
-cfg_section(report_CFG_SECTION, "report", root_CFG_SECTION, CFG_ADVANCED | CFG_PROFILABLE, vsn(1, 0, 0), NULL)
-cfg_section(dmeventd_CFG_SECTION, "dmeventd", root_CFG_SECTION, 0, vsn(1, 2, 3), NULL)
+
+cfg_section(report_CFG_SECTION, "report", root_CFG_SECTION, CFG_ADVANCED | CFG_PROFILABLE, vsn(1, 0, 0),
+ "LVM report command output formatting.\n")
+
+cfg_section(dmeventd_CFG_SECTION, "dmeventd", root_CFG_SECTION, 0, vsn(1, 2, 3),
+ "Settings for the LVM event daemon.\n")
+
cfg_section(tags_CFG_SECTION, "tags", root_CFG_SECTION, 0, vsn(1, 0, 18), NULL)
-cfg_section(local_CFG_SECTION, "local", root_CFG_SECTION, 0, vsn(2, 2, 117), NULL)
+cfg_section(local_CFG_SECTION, "local", root_CFG_SECTION, 0, vsn(2, 2, 117),
+ "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),
"If enabled, any LVM configuration mismatch is reported.\n"
"This implies checking that the configuration key is understood\n"
@@ -117,7 +120,7 @@ cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2,
"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),
- "If enabled, any configuration mismatch aborts the LVM process.\n")
+ "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),
"Directory where LVM looks for configuration profiles.\n")
@@ -127,30 +130,28 @@ cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DEV
"Commands also accept this as a prefix on volume group names.\n")
cfg_array(devices_scan_CFG, "scan", devices_CFG_SECTION, 0, CFG_TYPE_STRING, "#S/dev", vsn(1, 0, 0),
- "An array of directories that contain the device nodes you wish\n"
- "to use with LVM.\n")
+ "Directories containing device nodes to use with LVM.\n")
cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 2, 0), 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),
- "If set, the cache of block device nodes with all associated symlinks\n"
- "will be constructed out of the existing udev database content.\n"
- "This avoids using and opening any inapplicable non-block devices or\n"
- "subdirectories found in the device directory. This setting is applied\n"
- "to udev-managed device directory only, other directories will be scanned\n"
- "fully. LVM needs to be compiled with udev support for this setting to\n"
- "take effect. Any device node or symlink not managed by udev in udev\n"
- "directory will be ignored with this setting on.\n")
+ "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"
+ "Any device node or symlink not managed by udev in the udev\n"
+ "directory is ignored. This setting applies only to the\n"
+ "udev-managed device directory; other directories will be\n"
+ "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),
- "Select external device information source to use for\n"
- "further and more detailed device determination. Some\n"
- "information may already be available in the system and\n"
+ "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"
- "or use of the device it processes. Using existing external\n"
+ "or use of devices it processes. Using an existing external\n"
"device information source can speed up device processing\n"
"as LVM does not need to run its own native routines to acquire\n"
- "this information. For example, such information is used to\n"
+ "this information. For example, this information is used to\n"
"drive LVM filtering like MD component detection, multipath\n"
"component detection, partition detection and others.\n"
"Possible options are: none, udev.\n"
@@ -176,7 +177,7 @@ cfg_array(devices_preferred_names_CFG, "preferred_names", devices_CFG_SECTION, C
"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),
- "Limit the block devices that are used by LVM.\n"
+ "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"
"by a vertical bar '|' (or any character) and is preceded\n"
@@ -211,21 +212,21 @@ cfg_array(devices_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_UNDEFIN
"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),
- "Since filter is often overridden from the command line,\n"
- "it is not suitable for system-wide device filtering,\n"
- "e.g. udev rules and lvmetad. To hide devices from LVM-specific\n"
- "udev processing and lvmetad, use global_filter.\n"
- "The syntax is the same as devices/filter above.\n"
+ "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"
+ "and lvmetad. Use global_filter to hide devices from these LVM\n"
+ "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),
- "This setting has been replaced by the devices/cache_dir setting.\n")
+ "This has been replaced by 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),
+ "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"
- "By default this cache is stored in a file named .cache\n"
- "in the directory specified by this setting.\n"
+ "By default this cache is stored in a file named .cache.\n"
"It is safe to delete this file; the tools regenerate it.\n"
"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")
@@ -237,41 +238,40 @@ cfg(devices_write_cache_state_CFG, "write_cache_state", devices_CFG_SECTION, 0,
"Enable/disable writing the cache file. See devices/cache_dir.\n")
cfg_array(devices_types_CFG, "types", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT | CFG_TYPE_STRING, NULL, vsn(1, 0, 0),
- "List of pairs of additional acceptable block device types found\n"
- "in /proc/devices with maximum (non-zero) number of partitions.\n"
+ "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),
- "Restrict device scanning to block devices that sysfs believes\n"
- "are valid. (sysfs must be part of the kernel and mounted.)\n"
+ "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.\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),
- "Ignore devices used as component paths of device-mapper\n"
- "multipath devices.\n")
+ "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),
- "Ignore devices used as components of software RAID (md) devices\n"
- "by looking for md superblocks.\n")
+ "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),
- "Ignore devices used as components of firmware RAID devices.\n"
- "N.B. LVM itself is not detecting firmware RAID - an\n"
- "external_device_info_source other than none must be used for\n"
- "this detection to execute.\n")
+ "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),
- "If a PV is placed directly upon an md device, align its data\n"
- "blocks with the md device's stripe-width.\n")
+ "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),
- "Default alignment of the start of a data area in MB.\n"
+ "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),
+ "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"
"minimum_io_size is the smallest request the device can perform\n"
@@ -283,16 +283,17 @@ cfg(devices_data_alignment_detection_CFG, "data_alignment_detection", devices_CF
"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),
- "Alignment (in KB) of start of data area when creating a new PV.\n"
- "If a PV is placed directly upon an md device and\n"
+ "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"
"then this setting is ignored. Otherwise, md_chunk_alignment\n"
"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),
- "The start of a PV aligned data area will be shifted by\n"
- "the alignment_offset exposed in sysfs. This offset is often 0, but\n"
+ "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"
"may be non-zero. Certain 4KB sector drives that compensate for\n"
"windows partitioning will have an alignment_offset of 3584 bytes\n"
"(sector 7 is the lowest aligned logical block, the 4KB sectors start\n"
@@ -300,13 +301,13 @@ cfg(devices_data_alignment_offset_detection_CFG, "data_alignment_offset_detectio
"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),
- "While scanning the system for PVs, skip a device-mapper\n"
- "device that has its I/O suspended. Otherwise, LVM waits\n"
- "for the device to become accessible. This should only be\n"
- "needed in recovery situations.\n")
+ "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),
- "Enable this to avoid possible deadlocks when using the 'mirror'\n"
+ "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"
"using the 'mirror' segment type are scanned for LVM labels.\n"
"This affects the ability of mirrors to be used as physical volumes.\n"
@@ -325,6 +326,7 @@ cfg(devices_ignore_lvm_mirrors_CFG, "ignore_lvm_mirrors", devices_CFG_SECTION, 0
"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),
+ "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"
"here, no further I/O is sent to that device for the remainder\n"
@@ -341,17 +343,19 @@ cfg(devices_pv_min_size_CFG, "pv_min_size", devices_CFG_SECTION, 0, CFG_TYPE_INT
"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),
- "Issue discards to a logical volume's underlying physical volumes\n"
- "when the logical volume is no longer using the physical volumes'\n"
- "space, e.g. lvremove, lvreduce. Discards inform the storage that\n"
- "a region is no longer in use. Storage that supports discards\n"
- "advertise the protocol specific way discards should be issued by\n"
- "the kernel (TRIM, UNMAP, or WRITE SAME with UNMAP bit set).\n"
+ "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"
+ "lvremove, lvreduce. Discards inform the storage that a region\n"
+ "is no longer used. Storage that supports discards advertise\n"
+ "the protocol-specific way discards should be issued by the\n"
+ "kernel (TRIM, UNMAP, or WRITE SAME with UNMAP bit set).\n"
"Not all storage will support or benefit from discards, but SSDs\n"
"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),
+ "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"
"segment of the existing LV. If there is insufficient space and a\n"
@@ -368,23 +372,22 @@ cfg_array(allocation_cling_tag_list_CFG, "cling_tag_list", allocation_CFG_SECTIO
"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),
+ "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),
- "Use the blkid library instead of native LVM code to detect\n"
- "any existing signatures while creating new PVs and LVs.\n"
- "LVM needs to be compiled with blkid wiping support for this\n"
- "setting to take effect.\n"
+ "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"
+ "LVM needs to be compiled with blkid wiping support for\n"
+ "this setting to apply.\n"
"LVM native detection code is currently able to recognize:\n"
"MD device signatures, swap signature, and LUKS signatures.\n"
"To see the list of signatures recognized by blkid, check the\n"
- "output of the 'blkid -k' command. blkid can recognize more\n"
- "signatures than LVM native detection code, but due to this\n"
- "higher number of signatures to be recognized, it can take more\n"
- "time to complete the signature scan.\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),
"Look for and erase any signatures while zeroing a new LV.\n"
@@ -407,13 +410,11 @@ cfg(allocation_wipe_signatures_when_zeroing_new_lvs_CFG, "wipe_signatures_when_z
"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),
- "Guarantees that mirror logs will always be placed on\n"
- "different PVs from the mirror images.\n"
+ "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),
- "Guarantees that cache_pool metadata will always be\n"
- "placed on different PVs from the cache_pool data.\n")
+ "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),
"The default cache mode used for new cache pools.\n"
@@ -436,13 +437,11 @@ cfg_runtime(allocation_cache_pool_chunk_size_CFG, "cache_pool_chunk_size", alloc
"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),
- "Guarantees that thin pool metadata will always\n"
- "be placed on different PVs from the pool data.\n")
+ "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),
- "Enable/disable zeroing of thin pool data chunks before\n"
- "their first use. Zeroing larger thin pool chunk size\n"
- "reduces performance.\n")
+ "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),
"The discards behaviour of thin pool volumes.\n"
@@ -496,22 +495,18 @@ cfg(log_overwrite_CFG, "overwrite", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_O
"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),
- "The level of log messages that are sent to the\n"
- "log file and/or syslog. There are 6 syslog-like\n"
- "log levels currently in use: 2 to 7 inclusive.\n"
+ "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),
- "Format of output messages:\n"
"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),
- "Format of output messages:\n"
- "display the command name on each line output.\n")
+ "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),
- "Format of output messages:\n"
- "a prefix to use before the message text.\n"
+ "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"
@@ -524,6 +519,7 @@ cfg(log_activation_CFG, "activation", log_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(
cfg(log_activate_file_CFG, "activate_file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), 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),
+ "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"
"listed here. Classes currently available:\n"
@@ -561,23 +557,24 @@ cfg(global_umask_CFG, "umask", global_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_UMAS
"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),
- "Enabling test mode means that no changes to the\n"
- "on-disk metadata will be made. Equivalent to having\n"
- "the -t option on every command.\n")
+ "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),
"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),
- "The tools distinguish between powers of 1024 bytes,\n"
+ "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),
- "Display unit suffix for sizes. This setting has no effect if the\n"
- "units are in human-readable form (global/units=\"h\") in which case\n"
- "the suffix is always displayed.\n")
+ "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),
"Enable/disable communication with the kernel device-mapper.\n"
@@ -587,22 +584,20 @@ cfg(global_activation_CFG, "activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, D
"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),
- "Try running the LVM1 tools if LVM cannot communicate with\n"
- "device-mapper. This option only applies to 2.4 kernels and\n"
- "is provided to help switch between device-mapper kernels and\n"
- "LVM1 kernels.\n"
+ "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"
"The LVM1 tools need to be installed with .lvm1 suffices,\n"
"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),
- "The default metadata format that commands should use:\n"
+ "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),
- "A list of shared libraries to load that contain\n"
- "code to process different formats of metadata.\n"
+ "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")
@@ -636,58 +631,70 @@ cfg(global_locking_type_CFG, "locking_type", global_CFG_SECTION, 0, CFG_TYPE_INT
"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),
- "When disabled, fail if a lock request cannot be satisfied immediately.\n")
+ "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),
+ "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),
- "If an attempt to initialise type 2 or type 3 locking failed, perhaps\n"
- "because cluster components such as clvmd are not running, with this\n"
- "enabled, an attempt will be made to use local file-based locking (type 1).\n"
- "If this succeeds, only commands against local volume groups will proceed.\n"
+ "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"
+ "running, with this enabled, an attempt will be made to use\n"
+ "local file-based locking (type 1). If this succeeds, only\n"
+ "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),
- "Local non-LV directory that holds file-based locks while commands are\n"
- "in progress. A directory like /tmp that may get wiped on reboot is OK.\n")
+ "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),
- "Whenever there are competing read-only and read-write access requests for\n"
- "a volume group's metadata, instead of always granting the read-only\n"
- "requests immediately, delay them to allow the read-write requests to be\n"
- "serviced. Without this setting, write access may be stalled by a high\n"
- "volume of read-only requests.\n"
- "NB. This option only affects locking_type = 1 viz. local file-based locking.\n")
+ "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"
+ "granting the read-only requests immediately, delay them to\n"
+ "allow the read-write requests to be serviced. Without this\n"
+ "setting, write access may be stalled by a high volume of\n"
+ "read-only requests.\n"
+ "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),
"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),
- "The external locking library to load if locking_type is set to 2.\n")
+ "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),
- "Treat any internal errors as fatal errors, aborting the process that\n"
- "encountered the internal error. Please only enable for debugging.\n")
+ "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),
- "Check whether CRC is matching when parsed VG is used multiple times.\n"
- "This is useful to catch unexpected internal cached volume group\n"
- "structure modification. Please only enable for debugging.\n")
+ "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),
- "If enabled, no operations that change on-disk metadata will be permitted.\n"
- "Additionally, read-only commands that encounter metadata in need of repair\n"
- "will still be allowed to proceed exactly as if the repair had been\n"
- "performed (except for the unchanged vg_seqno).\n"
- "Inappropriate use could mess up your system, so seek advice first!\n")
+ "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"
+ "as if the repair had been performed (except for the unchanged\n"
+ "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),
- "Defines which segtype is used when the short option -m\n"
- "is used for mirroring.\n"
+ "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"
"It is characterized by a flexible log solution (core,\n"
@@ -706,35 +713,37 @@ cfg(global_mirror_segtype_default_CFG, "mirror_segtype_default", global_CFG_SECT
"handling a failure. This mirror implementation is not\n"
"cluster-aware and cannot be used in a shared (active/active)\n"
"fashion in a cluster.\n"
- "Use '--type mirror|raid1' to override this default setting.\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),
- "Determines the segment types used by default when\n"
- "the '--stripes/-i' and '--mirrors/-m' arguments are both specified\n"
- "during the creation of a logical volume.\n"
+ "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"
+ "to use both striping and mirroring for the LV.\n"
+ "There are two different implementations.\n"
"Possible options are: raid10, mirror.\n"
- "raid10 - This implementation leverages MD's RAID10 personality through\n"
- "device-mapper.\n"
- "mirror - LVM will layer the 'mirror' and 'stripe' segment types. It\n"
- "will do this by creating a mirror on top of striped sub-LVs;\n"
- "effectively creating a RAID 0+1 array. This is suboptimal\n"
- "in terms of providing redundancy and performance. Changing to\n"
- "this setting is not advised.\n"
- "Use '--type <raid10|mirror>' to override this default setting.\n")
+ "raid10 - LVM uses MD's RAID10 personality through DM.\n"
+ "mirror - LVM layers the 'mirror' and 'stripe' segment types.\n"
+ "The layering is done by creating a mirror LV on top of\n"
+ "striped sub-LVs, effectively creating a RAID 0+1 array.\n"
+ "The layering is suboptimal in terms of providing redundancy\n"
+ "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),
- "Defines which segtype will be used when the shorthand '-V and -L' option\n"
- "is used for sparse volume creation.\n"
+ "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"
"Possible options are: snapshot, thin.\n"
- "snapshot - The original snapshot implementation provided by LVM/DM.\n"
- "It is using old snashot that mixes data and metadata within\n"
- "a single COW storage volume and has poor performs when\n"
- "the size of stored data passes hundereds of MB.\n"
- "thin - Newer implementation leverages thin provisioning target.\n"
- "It has bigger minimal chunk size (64KiB) and uses separate volume\n"
- "for metadata. It has better performance especially in case of\n"
- "bigger data uses. This device type has also full snapshot support.\n"
- "Use '--type <snapshot|thin>' to override this default setting.\n")
+ "snapshot - The original snapshot implementation from LVM/DM.\n"
+ "It uses an old snapshot that mixes data and metadata within\n"
+ "a single COW storage volume and performs poorly when the\n"
+ "size of stored data passes hundreds of MB.\n"
+ "thin - A newer implementation that uses thin provisioning.\n"
+ "It has a bigger minimal chunk size (64KiB) and uses a separate\n"
+ "volume for metadata. It has better performance, especially\n"
+ "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),
"The default format for displaying LV names in lvdisplay was changed\n"
@@ -744,109 +753,122 @@ cfg(global_lvdisplay_shows_full_device_path_CFG, "lvdisplay_shows_full_device_pa
"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),
- "Whether to use (trust) a running instance of lvmetad. If this is disabled,\n"
- "all commands fall back to the usual scanning mechanisms. When enabled,\n"
- "*and* when lvmetad is running (automatically instantiated by making use of\n"
- "systemd's socket-based service activation or run as an initscripts service\n"
- "or run manually), the volume group metadata and PV state flags are obtained\n"
- "from the lvmetad instance and no scanning is done by the individual\n"
- "commands. In a setup with lvmetad, lvmetad udev rules *must* be set up for\n"
- "LVM to work correctly. Without proper udev rules, all changes in block\n"
- "device configuration will be *ignored* until a manual 'pvscan --cache'\n"
- "is performed. These rules are installed by default.\n"
- "If lvmetad has been running while use_lvmetad was disabled, it MUST be\n"
- "stopped before enabled use_lvmetad and started again afterwards.\n"
- "If using lvmetad, volume activation is also switched to automatic\n"
- "event-based mode. In this mode, the volumes are activated based on\n"
- "incoming udev events that automatically inform lvmetad about new PVs that\n"
- "appear in the system. Once a VG is complete (all the PVs are present), it\n"
- "is auto-activated. The activation/auto_activation_volume_list setting\n"
- "controls which volumes are auto-activated (all by default).\n"
- "A note about device filtering while lvmetad is used:\n"
- "When lvmetad is updated (either automatically based on udev events or\n"
- "directly by a pvscan --cache <device> call), devices/filter is ignored and\n"
- "all devices are scanned by default -- lvmetad always keeps unfiltered\n"
- "information which is then provided to LVM commands and then each LVM\n"
- "command does the filtering based on devices/filter setting itself. This\n"
- "does not apply to non-regexp filters though: component filters such as\n"
- "multipath and MD are checked at pvscan --cache time.\n"
- "In order to completely prevent LVM from scanning a device, even when using\n"
- "lvmetad, devices/global_filter must be used.\n"
- "N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet\n"
- "supported in clustered environment. If use_lvmetad=1 and locking_type=3\n"
- "is set at the same time, LVM always issues a warning message about this\n"
- "and then it automatically disables use_lvmetad.\n")
+ "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"
+ "reading this information from disks which can be slow.\n"
+ "When disabled (or not running), LVM commands fall back to\n"
+ "scanning disks to obtain VG metadata.\n"
+ "lvmetad is kept updated via udev rules which must be set\n"
+ "up for LVM to work correctly. (The udev rules should be\n"
+ "installed by default.) Without a proper udev setup, changes\n"
+ "in the system's block device configuration will be unknown\n"
+ "to LVM, and ignored until a manual 'pvscan --cache' is run.\n"
+ "If lvmetad was running while use_lvmetad was disabled,\n"
+ "it must be stopped, use_lvmetad enabled, and then started.\n"
+ "When using lvmetad, LV activation is switched to an automatic,\n"
+ "event-based mode. In this mode, LVs are activated based on\n"
+ "incoming udev events that inform lvmetad when PVs appear on\n"
+ "the system. When a VG is complete (all PVs present), it is\n"
+ "auto-activated. The auto_activation_volume_list setting\n"
+ "controls which LVs are auto-activated (all by default.)\n"
+ "When lvmetad is updated (automatically by udev events, or\n"
+ "directly by pvscan --cache), devices/filter is ignored and\n"
+ "all devices are scanned by default. lvmetad always keeps\n"
+ "unfiltered information which is provided to LVM commands.\n"
+ "Each LVM command then filters based on devices/filter.\n"
+ "This does not apply to other, non-regexp, filtering settings:\n"
+ "component filters such as multipath and MD are checked\n"
+ "during pvscan --cache.\n"
+ "To filter a device and prevent scanning from the LVM system\n"
+ "entirely, including lvmetad, use devices/global_filter.\n"
+ "lvmetad is not compatible with locking_type 3 (clustering).\n"
+ "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),
- "Full path of the utility called to check that a thin metadata device\n"
- "is in a state that allows it to be used.\n"
- "Each time a thin pool needs to be activated or after it is deactivated\n"
- "this utility is executed. The activation will only proceed if the utility\n"
- "has an exit status of 0.\n"
+ "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"
+ "When a thin pool is activated and after it is deactivated,\n"
+ "this command is run. Activation will only proceed if the\n"
+ "command has an exit status of 0.\n"
"Set to \"\" to skip this check. (Not recommended.)\n"
- "The thin tools are available as part of the device-mapper-persistent-data\n"
- "package from https://github.com/jthornber/thin-provisioning-tools.\n")
-
-cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_THIN_CHECK_OPTIONS, vsn(2, 2, 96),
- "Array of string options passed with thin_check command. By default,\n"
- "option -q is for quiet output.\n"
- "With thin_check version 2.1 or newer you can add --ignore-non-fatal-errors\n"
- "to let it pass through ignorable errors and fix them later.\n"
- "With thin_check version 3.2 or newer you should add --clear-needs-check-flag.\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),
- "The specified features are not used by thin driver.\n"
- "This can be helpful not just for testing, but i.e. allows to avoid\n"
- "using problematic implementation of some thin feature.\n"
- "Features: block_size, discards, discards_non_power_2, external_origin,\n"
- "metadata_resize, external_origin_extend, error_if_no_space.\n"
- "Example:\n"
- "thin_disabled_features = [ \"discards\", \"block_size\" ]\n")
+ "Also see thin_check_options.\n"
+ "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),
- "Full path of the utility called to dump thin metadata content.\n"
- "See thin_check_executable how to obtain binaries.\n")
+ "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),
- "Full path of the utility called to repair a thin metadata device\n"
- "is in a state that allows it to be used.\n"
- "Each time a thin pool needs repair this utility is executed.\n"
- "See thin_check_executable how to obtain binaries.\n")
+ "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_OPTIONS, vsn(2, 2, 96),
+ "String 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"
+ "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),
- "Array of extra string options passed with thin_repair command.\n")
+ "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),
+ "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"
+ "Features: block_size, discards, discards_non_power_2,\n"
+ "external_origin, metadata_resize, external_origin_extend,\n"
+ "error_if_no_space.\n"
+ "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),
- "Full path of the utility called to check that a cache metadata device\n"
- "is in a state that allows it to be used.\n"
- "Each time a cached LV needs to be used or after it is deactivated\n"
- "this utility is executed. The activation will only proceed if the utility\n"
- "has an exit status of 0.\n"
+ "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"
+ "When a cached LV is activated and after it is deactivated,\n"
+ "this command is run. Activation will only proceed if the\n"
+ "command has an exit status of 0.\n"
"Set to \"\" to skip this check. (Not recommended.)\n"
- "The cache tools are available as part of the device-mapper-persistent-data\n"
- "package from https://github.com/jthornber/thin-provisioning-tools.\n")
-
-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),
- "Array of string options passed with cache_check command. By default,\n"
- "option -q is for quiet output.\n")
+ "Also see cache_check_options.\n"
+ "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),
- "Full path of the utility called to dump cache metadata content.\n"
- "See cache_check_executable how to obtain binaries.\n")
+ "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),
- "Full path of the utility called to repair a cache metadata device.\n"
- "Each time a cache metadata needs repair this utility is executed.\n"
- "See cache_check_executable how to obtain binaries.\n")
+ "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_OPTIONS, vsn(2, 2, 108),
+ "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),
- "Array of extra string options passed with cache_repair command.\n")
+ "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),
- "The method lvm will use to set the system ID of the local host.\n"
- "Volume Groups can also be given a system ID. A VG on shared storage\n"
- "devices will be accessible only to the host with a matching system ID.\n"
- "See 'man lvmsystemid' for information on limitations and correct usage.\n"
+ "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"
+ "A VG on shared storage devices is accessible only\n"
+ "to the host with a matching system ID.\n"
+ "See 'man lvmsystemid' for information on limitations\n"
+ "and correct usage.\n"
"Possible options are: none, lvmlocal, uname, machineid, file.\n"
"none - The host has no system ID.\n"
"lvmlocal - Obtain the system ID from the system_id setting in the\n"
@@ -856,174 +878,186 @@ cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, 0, CFG_
"machineid - Use the contents of the file /etc/machine-id to set the\n"
"system ID. Some systems create this file at installation time.\n"
"See 'man machine-id'.\n"
- "file - Use the contents of an alternative file (system_id_file) to\n"
- "set the system ID.\n")
+ "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),
- "Full path of a file containing a system ID.\n"
- "This is used when system_id_source is set to file.\n"
+ "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),
- "Perform internal checks on the operations issued to\n"
- "libdevmapper. Useful for debugging problems with activation.\n"
- "Some of the checks may be expensive, so it's best to use this\n"
- "only when there seems to be a problem.\n")
+ "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),
- "Enable/disable udev synchronisation (if compiled into the binaries).\n"
- "Processes will not wait for notification from udev.\n"
- "They will continue irrespective of any possible udev processing\n"
- "in the background. You should only use this if udev is not running\n"
- "or has rules that ignore the devices LVM creates.\n"
- "The command line argument --nodevsync takes precedence over this setting.\n"
- "If enabled when udev is not running, and there are LVM processes\n"
- "waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them up.\n")
+ "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"
+ "processing in the background. Only use this if udev is not\n"
+ "running or has rules that ignore the devices LVM creates.\n"
+ "If enabled when udev is not running, and LVM processes\n"
+ "are waiting for udev, run 'dmsetup udevcomplete_all' to\n"
+ "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),
- "Enable/disable the udev rules installed by LVM (if built with\n"
- "--enable-udev_rules). LVM will then manage the /dev nodes and symlinks\n"
- "for active logical volumes directly itself.\n"
- "N.B. Manual intervention may be required if this setting is changed\n"
- "while any logical volumes are active.\n")
+ "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),
- "Verify operations performed by udev. This turns on additional checks\n"
- "(and if necessary, repairs) on entries in the device directory after udev\n"
- "has completed processing its events.\n"
+ "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),
- "Retry deactivation operations for a few seconds before failing\n"
- "if deactivation of an LV fails, perhaps because a process run\n"
- "from a quick udev rule temporarily opened the device.\n")
+ "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, 0, CFG_TYPE_STRING, DEFAULT_STRIPE_FILLER, vsn(1, 0, 0),
- "How to fill in missing stripes if activating an incomplete volume.\n"
+ "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"
- "case, that device will be used to in place of missing stripes.\n"
- "But note that using anything other than 'error' with mirrored\n"
- "or snapshotted volumes is likely to result in data corruption.\n")
+ "case, that device will be used in place of missing stripes.\n"
+ "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),
- "Enable/disable the linear target optimization.\n"
- "When disabled, the striped target is used. The linear target is\n"
- "an optimised version of the striped target that only handles a\n"
- "single stripe.\n")
+ "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),
- "How much stack (in KB) to reserve for use while devices suspended.\n"
- "Prior to version 2.02.89 this used to be set to 256KB.\n")
+ "Stack size in KB to reserve for use while devices are suspended.\n")
cfg(activation_reserved_memory_CFG, "reserved_memory", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_MEMORY, vsn(1, 0, 0),
- "How much memory (in KB) to reserve for use while devices suspended.\n")
+ "Memory size in KB to reserve for use while devices are suspended.\n")
cfg(activation_process_priority_CFG, "process_priority", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_PROCESS_PRIORITY, vsn(1, 0, 0),
- "Nice value used while devices suspended.\n")
+ "Nice value used while devices are suspended.\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),
- "If volume_list is defined, each LV is only activated if there is a\n"
- "match against the list.\n"
- "vgname and vgname/lvname are matched exactly.\n"
- "@tag matches any tag set in the LV or VG.\n"
- "@* matches if any tag defined on the host is also set in the LV or VG.\n"
- "If any host tags exist but volume_list is not defined, a default\n"
- "single-entry list containing '@*' is assumed.\n"
+ "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"
+ "If this list is undefined, it imposes no limits\n"
+ "on LV activation (all are allowed).\n"
+ "Possible options are: vgname, vgname/lvname, @tag, @*\n"
+ "vgname is matched exactly and selects all LVs in the VG.\n"
+ "vgname/lvname is matched exactly and selects the LV.\n"
+ "@tag selects if tag matches a tag set on the LV or VG.\n"
+ "@* selects if a tag defined on the host is also set on\n"
+ "the LV or VG. See tags/hosttags.\n"
+ "If any host tags exist but volume_list is not defined,\n"
+ "a default single-entry list containing '@*' is assumed.\n"
"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),
- "If auto_activation_volume_list is defined, each LV that is to be\n"
- "activated with the autoactivation option (--activate ay/-a ay) is\n"
- "first checked against the list. There are two scenarios in which\n"
- "the autoactivation option is used:\n"
- "1. automatic activation of volumes based on incoming PVs. If all the\n"
- "PVs making up a VG are present in the system, the autoactivation\n"
- "is triggered. This requires lvmetad (global/use_lvmetad=1) and udev\n"
- "to be running. In this case, 'pvscan --cache -aay' is called\n"
- "automatically without any user intervention while processing\n"
- "udev events. Please, make sure you define auto_activation_volume_list\n"
- "properly so only the volumes you want and expect are autoactivated.\n"
- "2. direct activation on command line with the autoactivation option.\n"
- "In this case, the user calls 'vgchange --activate ay/-a ay' or\n"
- "'lvchange --activate ay/-a ay' directly.\n"
- "By default, the auto_activation_volume_list is not defined and all\n"
- "volumes will be activated either automatically or by using --activate ay/-a ay.\n"
- "N.B. The activation/volume_list is still honoured in all cases so even\n"
- "if the VG/LV passes the auto_activation_volume_list, it still needs to\n"
- "pass the volume_list for it to be activated in the end.\n"
- "If auto_activation_volume_list is defined but empty, no volumes will be\n"
- "activated automatically and --activate ay/-a ay will do nothing.\n"
- "Example:\n"
- "auto_activation_volume_list = []\n"
- "If auto_activation_volume_list is defined and it's not empty, only matching\n"
- "volumes will be activated either automatically or by using --activate ay/-a ay.\n"
- "vgname and vgname/lvname are matched exactly.\n"
- "@tag matches any tag set in the LV or VG.\n"
- "@* matches if any tag defined on the host is also set in the LV or VG.\n"
- "Example:\n"
- "auto_activation_volume_list = [ \"vg1\", \"vg2/lvol1\", \"@tag1\", \"@*\" ]\n")
+ "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"
+ "to direct activation commands.\n"
+ "If this list is defined, an LV is only auto-activated\n"
+ "if it matches an entry in this list.\n"
+ "If this list is undefined, it imposes no limits\n"
+ "on LV auto-activation (all are allowed.)\n"
+ "If this list is defined and empty, i.e. \"[]\",\n"
+ "then no LVs are selected for auto-activation.\n"
+ "An LV that is selected by this list for\n"
+ "auto-activation, must also be selected by\n"
+ "volume_list (if defined) before it is activated.\n"
+ "Auto-activation is an activation command that\n"
+ "includes the 'a' argument: --activate ay or -a ay,\n"
+ "e.g. vgchange -a ay, or lvchange -a ay vgname/lvname.\n"
+ "The 'a' (auto) argument for auto-activation is\n"
+ "meant to be used by activation commands that are\n"
+ "run automatically by the system, as opposed to\n"
+ "LVM commands run directly by a user. A user may\n"
+ "also use the 'a' flag directly to perform auto-\n"
+ "activation.\n"
+ "An example of a system-generated auto-activation\n"
+ "command is 'pvscan --cache -aay' which is generated\n"
+ "when udev and lvmetad detect a new VG has appeared\n"
+ "on the system, and want LVs in it to be auto-activated.\n"
+ "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),
- "If read_only_volume_list is defined, each LV that is to be activated\n"
- "is checked against the list, and if it matches, it is activated\n"
- "in read-only mode. (This overrides '--permission rw' stored in the\n"
- "metadata.)\n"
- "vgname and vgname/lvname are matched exactly.\n"
- "@tag matches any tag set in the LV or VG.\n"
- "@* matches if any tag defined on the host is also set in the LV or VG.\n"
- "Example:\n"
- "read_only_volume_list = [ \"vg1\", \"vg2/lvol1\", \"@tag1\", \"@*\" ]\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)
+ "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"
+ "activated in read-only mode.\n"
+ "This overrides the permission setting stored in the\n"
+ "metadata, e.g. from --permission rw.\n"
+ "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),
+ "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),
- "For RAID or 'mirror' segment types, raid_region_size is the\n"
- "size (in KiB) of:\n"
- "each synchronization operation when initializing, and\n"
- "each copy operation when performing a pvmove (using 'mirror' segtype).\n"
- "This setting has replaced mirror_region_size since version 2.02.99.\n")
+ "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),
- "Control error behavior when provisioned device becomes full. This\n"
- "determines the default --errorwhenfull setting of new thin pools.\n"
- "The command line option --errorwhenfull takes precedence over this\n"
- "setting. error_when_full disabled (0) means --errorwhenfull n.\n")
+ "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"
+ "When disabled, writes to thin LVs are queued if the\n"
+ "thin pool is out of space, and processed when the\n"
+ "thin pool data space is extended.\n"
+ "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),
- "Setting to use when there is no readahead value stored in the metadata.\n"
+ "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),
- "Defines how a device failure in a RAID logical volume is handled.\n"
- "This includes logical volumes that have the following segment types:\n"
+ "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"
- "In the event of a failure, the following policies will determine what\n"
- "actions are performed during the automated response to failures (when\n"
- "dmeventd is monitoring the RAID logical volume) and when 'lvconvert' is\n"
- "called manually with the options '--repair' and '--use-policies'.\n"
+ "If a device in the LV fails, the policy determines the\n"
+ "steps perfomed by dmeventd automatically, and the steps\n"
+ "perfomed by 'lvconvert --repair --use-policies' run manually.\n"
+ "Automatic handling requires dmeventd to be monitoring the LV.\n"
"Possible options are: warn, allocate.\n"
- "warn - Use the system log to warn the user that a device in the RAID\n"
- "logical volume has failed. It is left to the user to run\n"
+ "warn - Use the system log to warn the user that a device\n"
+ "in the RAID LV has failed. It is left to the user to run\n"
"'lvconvert --repair' manually to remove or replace the failed\n"
"device. As long as the number of failed devices does not\n"
"exceed the redundancy of the logical volume (1 device for\n"
- "raid4/5, 2 for raid6, etc) the logical volume will remain usable.\n"
- "allocate - Attempt to use any extra physical volumes in the volume\n"
- "group as spares and replace faulty devices.\n")
+ "raid4/5, 2 for raid6, etc) the LV will remain usable.\n"
+ "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),
- "Defines how a device failure affecting a mirror (of 'mirror' segment type) is\n"
- "handled. A mirror is composed of mirror images (copies) and a log.\n"
- "A disk log ensures that a mirror does not need to be re-synced\n"
- "(all copies made the same) every time a machine reboots or crashes.\n"
- "In the event of a failure, the specified policy will be used to determine\n"
- "what happens. This applies to automatic repairs (when the mirror is being\n"
- "monitored by dmeventd) and to manual lvconvert --repair when\n"
- "--use-policies is given.\n"
+ "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"
+ "A disk log ensures that a mirror LV does not need to be\n"
+ "re-synced (all copies made the same) every time a machine\n"
+ "reboots or crashes.\n"
+ "If a device in the LV fails, this policy determines the\n"
+ "steps perfomed by dmeventd automatically, and the steps\n"
+ "performed by 'lvconvert --repair --use-policies' run manually.\n"
+ "Automatic handling requires dmeventd to be monitoring the LV.\n"
"Possible options are: remove, allocate, allocate_anywhere.\n"
"remove - Simply remove the faulty device and run without it.\n"
"If the log device fails, the mirror would convert to using\n"
@@ -1032,8 +1066,8 @@ cfg_runtime(activation_mirror_image_fault_policy_CFG, "mirror_image_fault_policy
"the entire mirror will be re-synced.\n"
"If a mirror image fails, the mirror will convert to a\n"
"non-mirrored device if there is only one remaining good copy.\n"
- "allocate - Remove the faulty device and try to allocate space on\n"
- "a new device to be a replacement for the failed device.\n"
+ "allocate - Remove the faulty device and try to allocate space\n"
+ "on a new device to be a replacement for the failed device.\n"
"Using this policy for the log is fast and maintains the\n"
"ability to remember sync state through crashes/reboots.\n"
"Using this policy for a mirror device is slow, as it\n"
@@ -1041,130 +1075,149 @@ cfg_runtime(activation_mirror_image_fault_policy_CFG, "mirror_image_fault_policy
"will preserve the mirror characteristic of the device.\n"
"This policy acts like 'remove' if no suitable device and\n"
"space can be allocated for the replacement.\n"
- "allocate_anywhere - Not yet implemented. Useful to place the log device\n"
- "temporarily on same physical volume as one of the mirror\n"
- "images. This policy is not recommended for mirror devices\n"
- "since it would break the redundant nature of the mirror. This\n"
- "policy acts like 'remove' if no suitable device and space can\n"
- "be allocated for the replacement.\n")
+ "allocate_anywhere - Not yet implemented. Useful to place\n"
+ "the log device temporarily on the same physical volume as\n"
+ "one of the mirror images. This policy is not recommended\n"
+ "for mirror devices since it would break the redundant nature\n"
+ "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),
- "The description of mirror_image_fault_policy also applies to this setting.\n")
+ "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),
- "This setting has been replaced by the mirror_image_fault_policy setting.\n")
+ "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),
- "Defines when a snapshot should be automatically extended.\n"
- "When its space usage exceeds the percent set here, it is\n"
- "extended. Setting this to 100 disables automatic extension.\n"
- "The minimum value is 50 (a setting below 50 will be treated as 50.)\n")
+ "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"
+ "Also see snapshot_autoextend_percent.\n"
+ "Automatic extension requires dmeventd to be monitoring the LV.\n"
+ "Example:\n"
+ "With snapshot_autoextend_threshold 70 and\n"
+ "snapshot_autoextend_percent 20, whenever a snapshot\n"
+ "exceeds 70% usage, it will be extended by another 20%.\n"
+ "For a 1G snapshot, using 700M will trigger a resize to 1.2G.\n"
+ "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),
- "Defines how much extra space should be allocated for a snapshot\n"
- "when it is automatically extended, as a percent of its current size.\n"
- "Example:\n"
- "With snapshot_autoextend_threshold 70 and snapshot_autoextend_percent 20,\n"
- "whenever a snapshot exceeds 70% usage, it will be extended by another 20%.\n"
- "For a 1G snapshot, using up 700M will trigger a resize to 1.2G.\n"
- "When the usage exceeds 840M, the snapshot will be extended to 1.44G,\n"
- "and so on.\n")
+ "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),
- "Defines when a thin pool should be automatically extended.\n"
- "When its space usage exceeds the percent set here, it is\n"
- "extended. Setting this to 100 disables automatic extension.\n"
- "The minimum value is 50 (a setting below 50 will be treated as 50.)\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),
- "Defines how much extra space should be allocated for a thin pool\n"
- "when it is automatically extended, as a percent of its current size.\n"
+ "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"
+ "Also see thin_pool_autoextend_percent.\n"
+ "Automatic extension requires dmeventd to be monitoring the LV.\n"
"Example:\n"
- "With thin_pool_autoextend_threshold 70 and thin_pool_autoextend_percent 20,\n"
- "whenever a thin pool exceeds 70% usage, it will be extended by another 20%.\n"
+ "With thin_pool_autoextend_threshold 70 and\n"
+ "thin_pool_autoextend_percent 20, whenever a thin pool\n"
+ "exceeds 70% usage, it will be extended by another 20%.\n"
"For a 1G thin pool, using up 700M will trigger a resize to 1.2G.\n"
- "When the usage exceeds 840M, the thin pool will be extended to 1.44G,\n"
- "and so on.\n")
+ "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),
+ "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_TYPE_STRING, NULL, vsn(2, 2, 62),
- "While activating devices, I/O to devices being (re)configured is\n"
- "suspended, and as a precaution against deadlocks, LVM needs to pin\n"
- "any memory it is using so it is not paged out. Groups of pages that\n"
- "are known not to be accessed during activation need not be pinned\n"
- "into memory. Each string listed in this setting is compared against\n"
- "each line in /proc/self/maps, and the pages corresponding to any\n"
- "lines that match are not pinned. On some systems locale-archive was\n"
- "found to make up over 80% of the memory used by the process.\n"
+ "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"
+ "deadlocks, LVM pins memory it is using so it is not\n"
+ "paged out, and will not require I/O to reread.\n"
+ "Groups of pages that are known not to be accessed during\n"
+ "activation do not need to be pinned into memory.\n"
+ "Each string listed in this setting is compared against\n"
+ "each line in /proc/self/maps, and the pages corresponding\n"
+ "to lines that match are not pinned. On some systems,\n"
+ "locale-archive was found to make up over 80% of the memory\n"
+ "used by the process.\n"
"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),
- "Enable to revert to the default behaviour prior to version 2.02.62 which\n"
- "used mlockall() to pin the whole process's memory while activating devices.\n")
+ "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),
- "Enable/disable monitoring when activating logical volumes.\n"
- "Disabling can also be done with the --ignoremonitoring option.\n")
+ "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),
+ "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"
"at intervals of this number of seconds.\n"
- "If this is set to 0 and there is only one thing to wait for, there\n"
- "are no progress reports, but the process is awoken immediately the\n"
- "operation is complete.\n")
+ "If this is set to 0 and there is only one thing to wait for,\n"
+ "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),
- "Each LV can have an 'activation skip' flag stored persistently against it.\n"
- "During activation, this flag is used to decide whether such an LV is skipped.\n"
- "The 'activation skip' flag can be set during LV creation and by default it\n"
- "is automatically set for thin snapshot LVs. The auto_set_activation_skip\n"
- "enables or disables this automatic setting of the flag while LVs are created.\n")
+ "Set the activation skip flag on new thin snapshot LVs.\n"
+ "An LV can have a persistent 'activation skip' flag.\n"
+ "The flag determines if the LV is skipped during activation.\n"
+ "When this setting is enabled, the activation skip flag is\n"
+ "set on new thin snapshot LVs.\n")
cfg(activation_mode_CFG, "activation_mode", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ACTIVATION_MODE, vsn(2,2,108),
- "Determines how Logical Volumes are activated if any devices are missing.\n"
+ "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 the Physical Volumes\n"
- "it uses are present. Other PVs in the Volume Group may be missing.\n"
- "degraded - Like complete, but additionally RAID Logical Volumes of\n"
+ "complete - Only allow activation of an LV if all of\n"
+ "the Physical Volumes it uses are present. Other PVs\n"
+ "in the Volume Group may be missing.\n"
+ "degraded - Like complete, but additionally RAID LVs of\n"
"segment type raid1, raid4, raid5, radid6 and raid10 will\n"
"be activated if there is no data loss, i.e. they have\n"
"sufficient redundancy to present the entire addressable\n"
"range of the Logical Volume.\n"
- "partial - Allows the activation of any Logical Volume even if\n"
- "a missing or failed PV could cause data loss with a\n"
+ "partial - Allows the activation of any LV even if a\n"
+ "missing or failed PV could cause data loss with a\n"
"portion of the Logical Volume inaccessible.\n"
"This setting should not normally be used, but may\n"
"sometimes assist with data recovery.\n"
- "This setting corresponds with the --activationmode option for\n"
- "lvchange and vgchange.\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),
- "Default number of copies of metadata to hold on each PV. 0, 1 or 2.\n"
- "You might want to override it from the command line with 0\n"
- "when running pvcreate on new PVs which are to be added to large VGs.\n")
+ "Number of copies of metadata to store on each PV.\n"
+ "Possible options are: 0, 1, 2.\n"
+ "You may want to override this from the command line\n"
+ "with 0 when running pvcreate on new PVs which are to\n"
+ "be added to large VGs.\n")
cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_VGMETADATACOPIES, vsn(2, 2, 69),
- "Default number of copies of metadata to maintain for each VG.\n"
+ "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"
"number of copies of the VG metadata. If you set a value larger\n"
- "than the the total number of metadata areas available then\n"
+ "than the the total number of metadata areas available, then\n"
"metadata is stored in them all.\n"
- "The default value of 0 (unmanaged) disables this automatic\n"
- "management and allows you to control which metadata areas\n"
- "are used at the individual PV level using 'pvchange metadataignore y/n'.\n")
+ "The value 0 (unmanaged) disables this automatic management\n"
+ "and allows you to control which metadata areas are used at\n"
+ "the individual PV level using 'pvchange --metadataignore y|n'.\n")
cfg(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATASIZE, vsn(1, 0, 0),
"Approximate default size of on-disk metadata areas in sectors.\n"
- "You should increase this if you have large volume groups or\n"
- "you want to retain a large on-disk history of your metadata changes.\n")
+ "Increase this if you have large volume groups or you want to\n"
+ "retain a large on-disk history of your metadata changes.\n")
cfg(metadata_pvmetadataignore_CFG, "pvmetadataignore", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_BOOL, DEFAULT_PVMETADATAIGNORE, vsn(2, 2, 69), NULL)
cfg(metadata_stripesize_CFG, "stripesize", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_STRIPESIZE, 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),
- "List of directories holding live copies of text format metadata.\n"
+ "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"
"preferably on different (non-LV) filesystems, and with no other\n"
@@ -1193,6 +1246,7 @@ cfg(report_aligned_CFG, "aligned", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_
"Align columns on report output.\n")
cfg(report_buffered_CFG, "buffered", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_BUFFERED, vsn(1, 0, 0),
+ "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"
"is flushed to output which normally happens at the end of command\n"
@@ -1215,87 +1269,89 @@ cfg(report_quoted_CFG, "quoted", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BO
"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),
- "Output each column as a row. If set, this also implies report/prefixes=1.\n")
+ "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),
- "Use binary values 0 or 1 instead of descriptive literal values for\n"
- "columns that have exactly two valid values to report (not counting the\n"
- "'unknown' value which denotes that the value could not be determined).\n")
+ "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),
- "Comma separated list of columns to sort by when reporting 'lvm devtypes' command.\n"
+ "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),
- "Comma separated list of columns to report for 'lvm devtypes' command.\n"
+ "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),
- "Comma separated list of columns to report for 'lvm devtypes' command in verbose mode.\n"
+ "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),
- "Comma separated list of columns to sort by when reporting 'lvs' command.\n"
+ "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),
- "Comma separated list of columns to report for 'lvs' command.\n"
+ "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),
- "Comma separated list of columns to report for 'lvs' command in verbose mode.\n"
+ "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),
- "Comma separated list of columns to sort by when reporting 'vgs' command.\n"
+ "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),
- "Comma separated list of columns to report for 'vgs' command.\n"
+ "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),
- "Comma separated list of columns to report for 'vgs' command in verbose mode.\n"
+ "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),
- "Comma separated list of columns to sort by when reporting 'pvs' command.\n"
+ "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),
- "Comma separated list of columns to report for 'pvs' command.\n"
+ "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),
- "Comma separated list of columns to report for 'pvs' command in verbose mode.\n"
+ "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),
- "Comma separated list of columns to sort by when reporting 'lvs --segments' command.\n"
+ "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),
- "Comma separated list of columns to report for 'lvs --segments' command.\n"
+ "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),
- "Comma separated list of columns to report for 'lvs --segments' command in verbose mode.\n"
+ "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),
- "Comma separated list of columns to sort by when reporting 'pvs --segments' command.\n"
+ "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),
- "Comma separated list of columns to sort by when reporting 'pvs --segments' command.\n"
+ "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),
- "Comma separated list of columns to sort by when reporting 'pvs --segments' command in verbose mode.\n"
+ "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),
- "The library used when monitoring a mirror device.\n"
+ "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"
@@ -1304,21 +1360,21 @@ cfg(dmeventd_mirror_library_CFG, "mirror_library", dmeventd_CFG_SECTION, 0, CFG_
cfg(dmeventd_raid_library_CFG, "raid_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_RAID_LIB, vsn(2, 2, 87), NULL)
cfg(dmeventd_snapshot_library_CFG, "snapshot_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_SNAPSHOT_LIB, vsn(1, 2, 26),
- "The library used when monitoring a snapshot device.\n"
+ "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 use of\n"
- "the snapshot exceeds 80%. The warning is repeated when 85%, 90% and\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),
- "The library used when monitoring a thin device.\n"
+ "The library dmeventd uses when monitoring a thin device.\n"
"libdevmapper-event-lvm2thin.so monitors the filling of\n"
- "pool and emits a warning through syslog when the use of\n"
- "the pool exceeds 80%. The warning is repeated when 85%, 90% and\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),
- "Full path of the dmeventd binary.\n")
+ "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)
@@ -1326,11 +1382,13 @@ cfg_section(tag_CFG_SUBSECTION, "tag", tags_CFG_SECTION, CFG_NAME_VARIABLE | CFG
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(local_system_id_CFG, "system_id", local_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117),
- "Defines the system ID of the local host. This is used\n"
- "when global/system_id_source is set to 'lvmlocal' in the main\n"
- "configuration file, e.g. lvm.conf.\n"
- "When used, it must be set to a unique value - often a hostname -\n"
- "across all the hosts sharing access to the storage.\n"
+ "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"
+ "e.g. lvm.conf.\n"
+ "When used, it must be set to a unique value\n"
+ "among all hosts sharing access to the storage,\n"
+ "e.g. a host name.\n"
"Example:\n"
"Set no system ID.\n"
"system_id = \"\"\n"
@@ -1339,10 +1397,13 @@ cfg(local_system_id_CFG, "system_id", local_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_D
"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),
- "Defines a list of extra system_ids other than the local\n"
- "system_id that the local host is allowed to access. These are\n"
- "used for all values of global/system_id_source except 'none'.\n"
- "Only use this if you have read 'man lvmsystemid' and you are sure\n"
- "you understand why you need to use it!\n")
+ "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"
+ "by the local host. (These are system IDs that the\n"
+ "host sees in VGs, not system IDs that identify the\n"
+ "local host, which is determined by system_id_source.)\n"
+ "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)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=7a4e27eee51e89a5…
Commit: 7a4e27eee51e89a550bc55f78daea6d943293202
Parent: d1a770107d9525c24fc17522be450e28e1463e45
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Apr 14 13:35:11 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Apr 14 13:35:11 2015 +0200
blkdeactivate: check for lvm binary and skip LVM processing if not present
This removes dependency on lvm binary - if it's not present, all LVM
processing is skipped (shouldn't normally happen because if lvm binary
is missing then there's obviously nothing that would activate it, but
let's make sure).
Without this tight dependency on lvm, the blkdeactivate script can
be packaged with libdevmapper/dmsetup (in contrast to lvm as it was
before) and as such the script can still be used to handle other DM
devices.
---
WHATS_NEW | 1 +
scripts/blkdeactivate.sh.in | 24 +++++++++++++++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index e496fe4..9313ffb 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.119 -
==================================
+ Check for lvm binary in blkdeactivate and skip LVM processing if not present.
Add --enable-halvm and --disable-halvm options to lvmconf script.
Add --services, --mirrorservice and --startstopservices option to lvmconf.
Use proper default value of global/use_lvmetad when processing lvmconf script.
diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in
index f454154..993f151 100644
--- a/scripts/blkdeactivate.sh.in
+++ b/scripts/blkdeactivate.sh.in
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2015 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.
#
@@ -18,8 +18,10 @@
#
# Requires:
# bash >= 4.0 (associative array support)
-# lsblk >= 2.22 (lsblk -s support)
-# umount
+# util-linux {
+# lsblk >= 2.22 (lsblk -s support)
+# umount
+# }
# dmsetup >= 1.02.68 (--retry option support)
# lvm >= 2.2.89 (activation/retry_deactivation config support)
#
@@ -212,6 +214,11 @@ deactivate_lvm () {
test -z ${SKIP_VG_LIST["$DM_VG_NAME"]} || return 1
if test $LVM_DO_WHOLE_VG -eq 0; then
+ # Skip LVM device deactivation if LVM tools missing.
+ test $LVM_AVAILABLE -eq 0 && {
+ add_device_to_skip_list
+ return 1
+ }
# Deactivating only the LV specified
deactivate_holders "$DEV_DIR/$DM_VG_NAME/$DM_LV_NAME" || {
add_device_to_skip_list
@@ -227,6 +234,11 @@ deactivate_lvm () {
fi
else
+ # Skip LVM VG deactivation if LVM tools missing.
+ test $LVM_AVAILABLE -eq 0 && {
+ add_vg_to_skip_list
+ return 1
+ }
# Deactivating the whole VG the LV is part of
lv_list=$(eval $LVM vgs --config "$LVM_CONFIG" --noheadings --rows -o lv_name $DM_VG_NAME $ERR)
for lv in $lv_list; do
@@ -383,6 +395,12 @@ set_env() {
else
OUT="1>$DEV_DIR/null"
fi
+
+ if test -f $LVM; then
+ LVM_AVAILABLE=1
+ else
+ LVM_AVAILABLE=0
+ fi
}
while test $# -ne 0; do
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d5651f44e3056c0e…
Commit: d5651f44e3056c0e0e5f0c3d05c29c575782379e
Parent: 96124c6c0b866bc4d135074a7947e1a0911dd86f
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Apr 14 09:49:56 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Apr 14 09:49:56 2015 +0200
man: lvmconf: more notes on --services option
---
man/lvmconf.8.in | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/man/lvmconf.8.in b/man/lvmconf.8.in
index de86a2d..1ce7061 100644
--- a/man/lvmconf.8.in
+++ b/man/lvmconf.8.in
@@ -20,7 +20,9 @@ lvmconf \(em LVM configuration modifier
.SH "DESCRIPTION"
lvmconf is a script that modifies the locking configuration in
-an lvm configuration file. See \fBlvm.conf\fP(5).
+an lvm configuration file. See \fBlvm.conf\fP(5). In addition
+to that, it can also set Systemd or SysV services according to
+changes in the lvm configuration if needed.
.SH "OPTIONS"
.TP
@@ -51,7 +53,8 @@ Set external \fBlocking_library\fR locking library to load if an external lockin
.TP
.BR \-\-services
In addition to setting the lvm configuration, also enable or disable related Systemd or SysV
-clvmd and lvmetad services.
+clvmd and lvmetad services. This script does not configure services provided by cluster resource
+agents.
.TP
.BR \-\-mirrorservice
Also enable or disable optional cmirrord service when handling services (applicable only with \-\-services).
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=96124c6c0b866bc4…
Commit: 96124c6c0b866bc4d135074a7947e1a0911dd86f
Parent: fe30658a4d5fe4e4e6bb346c9c9ee7142a98f49d
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Fri Apr 3 10:41:33 2015 +0200
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Mon Apr 13 20:53:18 2015 +0200
tests: [new] check pvmove resume works as expected
various methods of resuming interrupted pvmove are tested:
- pvmove
- pvmove -b
- lvchange
- vgchange
tests for commits:
- c26d81d6e6939906729d91fae83cd8bbdd743bb7
- fe30658a4d5fe4e4e6bb346c9c9ee7142a98f49d
---
test/lib/aux.sh | 20 +++
test/shell/pvmove-abort-all.sh | 8 +-
test/shell/pvmove-abort.sh | 8 +-
test/shell/pvmove-basic.sh | 4 +-
test/shell/pvmove-resume-1.sh | 227 ++++++++++++++++++++++++++++++++++
test/shell/pvmove-resume-2.sh | 186 ++++++++++++++++++++++++++++
test/shell/pvmove-resume-multiseg.sh | 210 +++++++++++++++++++++++++++++++
7 files changed, 658 insertions(+), 5 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 1b97bdc..bccc30c 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -229,9 +229,29 @@ 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
+}
+
+kill_remaining_processes() {
+ local line
+ while read line; do
+ local pid=$(echo $line | awk -F':' '{ print $1 }')
+ local cmd=$(echo $line | awk -F':' '{ print $2 }')
+ for tmp in $(pgrep -f "$cmd" -d ' '); do
+ test $tmp = $pid && kill -9 $tmp
+ done
+ done
+}
+
teardown() {
echo -n "## teardown..."
+ test -f kill_list && kill_remaining_processes < kill_list
+
kill_sleep_kill_ LOCAL_LVMETAD ${LVM_VALGRIND_LVMETAD:-0}
dm_table | not egrep -q "$vg|$vg1|$vg2|$vg3|$vg4" || {
diff --git a/test/shell/pvmove-abort-all.sh b/test/shell/pvmove-abort-all.sh
index afdd3c8..0fd9659 100644
--- a/test/shell/pvmove-abort-all.sh
+++ b/test/shell/pvmove-abort-all.sh
@@ -37,9 +37,11 @@ lvcreate -an -Zn -l30 -n $lv2 $vg "$dev2"
lvcreate -an -Zn -l30 -n $lv1 $vg1 "$dev4"
lvextend -l+30 -n $vg1/$lv1 "$dev5"
-pvmove -i1 $backgroundarg "$dev1" "$dev3" $mode &
+cmd1=$(echo pvmove -i1 $backgroundarg "$dev1" "$dev3" $mode)
+$cmd1 &
aux wait_pvmove_lv_ready "$vg-pvmove0"
-pvmove -i1 $backgroundarg "$dev2" "$dev3" $mode &
+cmd2=$(echo pvmove -i1 $backgroundarg "$dev2" "$dev3" $mode)
+$cmd2 &
aux wait_pvmove_lv_ready "$vg-pvmove1"
pvmove -i1 $backgroundarg -n $vg1/$lv1 "$dev4" "$dev6" $mode &
@@ -57,6 +59,8 @@ not grep "^\[pvmove" out
lvremove -ff $vg $vg1
wait
+aux add_to_kill_list "$cmd1" "-P 1"
+aux add_to_kill_list "$cmd2" "-P 1"
done
done
diff --git a/test/shell/pvmove-abort.sh b/test/shell/pvmove-abort.sh
index 3664deb..da98a34 100644
--- a/test/shell/pvmove-abort.sh
+++ b/test/shell/pvmove-abort.sh
@@ -31,9 +31,11 @@ do
lvcreate -an -Zn -l30 -n $lv1 $vg "$dev1"
lvcreate -an -Zn -l30 -n $lv2 $vg "$dev2"
-pvmove -i1 $backgroundarg "$dev1" "$dev3" $mode &
+cmd1=$(echo pvmove -i1 $backgroundarg "$dev1" "$dev3" $mode)
+$cmd1 &
aux wait_pvmove_lv_ready "$vg-pvmove0"
-pvmove -i1 $backgroundarg "$dev2" "$dev3" $mode &
+cmd2=$(echo pvmove -i1 $backgroundarg "$dev2" "$dev3" $mode)
+$cmd2 &
aux wait_pvmove_lv_ready "$vg-pvmove1"
# remove specific device
@@ -50,6 +52,8 @@ pvmove --abort
lvremove -ff $vg
wait
+aux add_to_kill_list "$cmd1" "-P 1"
+aux add_to_kill_list "$cmd2" "-P 1"
done
done
diff --git a/test/shell/pvmove-basic.sh b/test/shell/pvmove-basic.sh
index 1b9b63f..e93a04e 100644
--- a/test/shell/pvmove-basic.sh
+++ b/test/shell/pvmove-basic.sh
@@ -334,7 +334,9 @@ check_and_cleanup_lvs_
#COMM "pvmove abort"
restore_lvs_
-pvmove $mode -i100 -b "$dev1" "$dev3"
+cmd=$(echo -n pvmove $mode -i100 -b "$dev1" "$dev3")
+$cmd
+aux add_to_kill_list "$cmd" "-P 1"
pvmove --abort
check_and_cleanup_lvs_
diff --git a/test/shell/pvmove-resume-1.sh b/test/shell/pvmove-resume-1.sh
new file mode 100644
index 0000000..0731c48
--- /dev/null
+++ b/test/shell/pvmove-resume-1.sh
@@ -0,0 +1,227 @@
+#!/bin/sh
+# Copyright (C) 2015 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Check whether all available pvmove resume methods works as expected.
+# lvchange is able to resume pvmoves in progress.
+
+# 2 pvmove LVs in 2 VGs (1 per VG)
+
+. lib/inittest
+
+aux prepare_pvs 4 30
+
+vgcreate -s 128k $vg "$dev1"
+vgcreate -s 128k $vg1 "$dev2"
+pvcreate --metadatacopies 0 "$dev3"
+pvcreate --metadatacopies 0 "$dev4"
+vgextend $vg "$dev3"
+vgextend $vg1 "$dev4"
+
+# $1 resume fn
+test_pvmove_resume() {
+ lvcreate -an -Zn -l30 -n $lv1 $vg
+ lvcreate -an -Zn -l30 -n $lv1 $vg1
+
+ aux delay_dev "$dev3" 0 1000 $(get first_extent_sector "$dev3"):
+ aux delay_dev "$dev4" 0 1000 $(get first_extent_sector "$dev4"):
+
+ pvmove -i5 "$dev1" &
+ PVMOVE=$!
+ aux wait_pvmove_lv_ready "$vg-pvmove0" 300
+ kill -9 $PVMOVE
+
+ pvmove -i5 "$dev2" &
+ PVMOVE=$!
+ aux wait_pvmove_lv_ready "$vg1-pvmove0" 300
+ kill -9 $PVMOVE
+
+ if test -e LOCAL_LVMPOLLD ; then
+ # inforestart lvmpolld
+ kill $(< LOCAL_LVMPOLLD)
+ for i in $(seq 1 100) ; do
+ test $i -eq 100 && die "Shutdown of lvmpolld is too slow."
+ test -e "$LVM_LVMPOLLD_PIDFILE" || break
+ sleep .1
+ done # wait for the pid removal
+ aux prepare_lvmpolld
+ fi
+
+ wait
+
+ while dmsetup status "$vg-$lv1"; do dmsetup remove "$vg-$lv1" || true; done
+ while dmsetup status "$vg1-$lv1"; do dmsetup remove "$vg1-$lv1" || true; done
+ while dmsetup status "$vg-pvmove0"; do dmsetup remove "$vg-pvmove0" || true; done
+ while dmsetup status "$vg1-pvmove0"; do dmsetup remove "$vg1-pvmove0" || true; done
+
+ check lv_attr_bit type $vg/pvmove0 "p"
+ check lv_attr_bit type $vg1/pvmove0 "p"
+
+ if test -e LOCAL_CLVMD ; then
+ # giveup all clvmd locks (faster then restarting clvmd)
+ # no deactivation happen, nodes are already removed
+ #vgchange -an $vg
+ # FIXME: However above solution has one big problem
+ # as clvmd starts to abort on internal errors on various
+ # errors, based on the fact pvmove is killed -9
+ # Restart clvmd
+ kill $(< LOCAL_CLVMD)
+ for i in $(seq 1 100) ; do
+ test $i -eq 100 && die "Shutdown of clvmd is too slow."
+ test -e "$CLVMD_PIDFILE" || break
+ sleep .1
+ done # wait for the pid removal
+ aux prepare_clvmd
+ fi
+
+ if test -e LOCAL_LVMETAD ; then
+ # Restart lvmetad
+ kill $(< LOCAL_LVMETAD)
+ aux prepare_lvmetad
+ fi
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # call resume function (see below)
+ # with expected number of spawned
+ # bg polling as parameter
+ $1 2
+
+ aux enable_dev "$dev3"
+ aux enable_dev "$dev4"
+
+ i=0
+ while get lv_field $vg name -a | grep "^\[pvmove"; do
+ # wait for 30 secs at max
+ test $i -ge 300 && die "Pvmove is too slow or does not progress."
+ sleep .1
+ i=$((i + 1))
+ done
+ while get lv_field $vg1 name -a | grep "^\[pvmove"; do
+ # wait for 30 secs at max
+ test $i -ge 300 && die "Pvmove is too slow or does not progress."
+ sleep .1
+ i=$((i + 1))
+ done
+
+ lvremove -ff $vg $vg1
+}
+
+lvchange_single() {
+ lvchange -aey $vg/$lv1
+ lvchange -aey $vg1/$lv1
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq $1
+}
+
+lvchange_all() {
+ lvchange -aey $vg/$lv1 $vg1/$lv1
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq $1
+}
+
+vgchange_single() {
+ vgchange -aey $vg
+ vgchange -aey $vg1
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq $1
+}
+
+vgchange_all() {
+ vgchange -aey $vg $vg1
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq $1
+}
+
+pvmove_fg() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg $vg1
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg1 name -a | grep "^\[pvmove0\]"
+
+ # disable delay device
+ # fg pvmove would take ages to complete otherwise
+ aux enable_dev "$dev3"
+ aux enable_dev "$dev4"
+
+ pvmove -i0
+}
+
+pvmove_bg() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg $vg1
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg1 name -a | grep "^\[pvmove0\]"
+
+ pvmove -b -i0
+}
+
+pvmove_fg_single() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg1 name -a | grep "^\[pvmove0\]"
+
+ # disable delay device
+ # fg pvmove would take ages to complete otherwise
+ aux enable_dev "$dev3"
+ aux enable_dev "$dev4"
+
+ pvmove -i0 "$dev1"
+ pvmove -i0 "$dev2"
+}
+
+pvmove_bg_single() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg1 name -a | grep "^\[pvmove0\]"
+
+ pvmove -i0 -b "$dev1"
+ pvmove -i0 -b "$dev2"
+}
+
+test -e LOCAL_CLVMD && skip
+
+test_pvmove_resume lvchange_single
+test_pvmove_resume lvchange_all
+test_pvmove_resume vgchange_single
+test_pvmove_resume vgchange_all
+test_pvmove_resume pvmove_fg
+test_pvmove_resume pvmove_fg_single
+test_pvmove_resume pvmove_bg
+test_pvmove_resume pvmove_bg_single
+
+vgremove -ff $vg $vg1
diff --git a/test/shell/pvmove-resume-2.sh b/test/shell/pvmove-resume-2.sh
new file mode 100644
index 0000000..0b938f8
--- /dev/null
+++ b/test/shell/pvmove-resume-2.sh
@@ -0,0 +1,186 @@
+#!/bin/sh
+# Copyright (C) 2015 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Check whether all available pvmove resume methods works as expected.
+# lvchange is able to resume pvmoves in progress.
+
+# Moving 2 LVs in VG variant
+
+. lib/inittest
+
+aux prepare_pvs 9 30
+
+vgcreate -s 128k $vg "$dev1"
+pvcreate --metadatacopies 0 "$dev2"
+vgextend $vg "$dev2"
+
+test_pvmove_resume() {
+ # 2 LVs on same device
+ lvcreate -an -Zn -l15 -n $lv1 $vg "$dev1"
+ lvcreate -an -Zn -l15 -n $lv2 $vg "$dev1"
+
+ aux delay_dev "$dev2" 0 1000 $(get first_extent_sector "$dev2"):
+
+ pvmove -i5 "$dev1" &
+ PVMOVE=$!
+ aux wait_pvmove_lv_ready "$vg-pvmove0" 300
+ kill -9 $PVMOVE
+
+ if test -e LOCAL_LVMPOLLD ; then
+ # inforestart lvmpolld
+ kill $(< LOCAL_LVMPOLLD)
+ for i in $(seq 1 100) ; do
+ test $i -eq 100 && die "Shutdown of lvmpolld is too slow."
+ test -e "$LVM_LVMPOLLD_PIDFILE" || break
+ sleep .1
+ done # wait for the pid removal
+ aux prepare_lvmpolld
+ fi
+
+ wait
+
+ while dmsetup status "$vg-$lv1"; do dmsetup remove "$vg-$lv1" || true; done
+ while dmsetup status "$vg-$lv2"; do dmsetup remove "$vg-$lv2" || true; done
+ while dmsetup status "$vg-pvmove0"; do dmsetup remove "$vg-pvmove0" || true; done
+
+ check lv_attr_bit type $vg/pvmove0 "p"
+
+ if test -e LOCAL_CLVMD ; then
+ # giveup all clvmd locks (faster then restarting clvmd)
+ # no deactivation happen, nodes are already removed
+ #vgchange -an $vg
+ # FIXME: However above solution has one big problem
+ # as clvmd starts to abort on internal errors on various
+ # errors, based on the fact pvmove is killed -9
+ # Restart clvmd
+ kill $(< LOCAL_CLVMD)
+ for i in $(seq 1 100) ; do
+ test $i -eq 100 && die "Shutdown of clvmd is too slow."
+ test -e "$CLVMD_PIDFILE" || break
+ sleep .1
+ done # wait for the pid removal
+ aux prepare_clvmd
+ fi
+
+ if test -e LOCAL_LVMETAD ; then
+ # Restart lvmetad
+ kill $(< LOCAL_LVMETAD)
+ aux prepare_lvmetad
+ fi
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # call resume function (see below)
+ # with expected number of spawned
+ # bg polling as parameter
+ $1 1
+
+ aux enable_dev "$dev2"
+
+ i=0
+ while get lv_field $vg name -a | grep "^\[pvmove"; do
+ # wait for 30 secs at max
+ test $i -ge 300 && die "Pvmove is too slow or does not progress."
+ sleep .1
+ i=$((i + 1))
+ done
+
+ lvremove -ff $vg
+}
+
+lvchange_single() {
+ lvchange -aey $vg/$lv1
+ lvchange -aey $vg/$lv2
+}
+
+lvchange_all() {
+ lvchange -aey $vg/$lv1 $vg/$lv2
+
+ # we don't want to spawn more than $1 background pollings
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq $1 || should false
+}
+
+vgchange_single() {
+ vgchange -aey $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq $1
+}
+
+pvmove_fg() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+
+ aux enable_dev "$dev2"
+
+ pvmove -i0
+}
+
+pvmove_bg() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+
+ pvmove -b -i0
+}
+
+pvmove_fg_single() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+
+ aux enable_dev "$dev2"
+
+ pvmove -i0 "$dev1"
+}
+
+pvmove_bg_single() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+
+ pvmove -i0 -b "$dev1"
+}
+
+test -e LOCAL_CLVMD && skip
+
+test_pvmove_resume lvchange_single
+test_pvmove_resume lvchange_all
+test_pvmove_resume vgchange_single
+test_pvmove_resume pvmove_fg
+test_pvmove_resume pvmove_fg_single
+test_pvmove_resume pvmove_bg
+test_pvmove_resume pvmove_bg_single
+
+vgremove -ff $vg
diff --git a/test/shell/pvmove-resume-multiseg.sh b/test/shell/pvmove-resume-multiseg.sh
new file mode 100644
index 0000000..829178c
--- /dev/null
+++ b/test/shell/pvmove-resume-multiseg.sh
@@ -0,0 +1,210 @@
+#!/bin/sh
+# Copyright (C) 2015 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+# Check whether all available pvmove resume methods works as expected.
+# lvchange is able to resume pvmoves in progress.
+
+# Multisegment variant w/ 2 pvmoves LVs per VG
+
+. lib/inittest
+
+aux prepare_pvs 5 30
+
+vgcreate -s 128k $vg "$dev1" "$dev2" "$dev3"
+pvcreate --metadatacopies 0 "$dev4" "$dev5"
+vgextend $vg "$dev4" "$dev5"
+
+# $1 resume fn
+test_pvmove_resume() {
+ # Create multisegment LV
+ lvcreate -an -Zn -l30 -n $lv1 $vg "$dev1"
+ lvextend -l+30 $vg/$lv1 "$dev2"
+ # next LV on same VG and differetnt PV (we want to test 2 pvmoves per VG)
+ lvcreate -an -Zn -l30 -n $lv2 $vg "$dev3"
+
+ aux delay_dev "$dev4" 0 250
+ aux delay_dev "$dev5" 0 250
+
+ pvmove -i5 "$dev1" "$dev4" &
+ PVMOVE=$!
+ aux wait_pvmove_lv_ready "$vg-pvmove0" 300
+ kill -9 $PVMOVE
+
+ pvmove -i5 -n $vg/$lv2 "$dev3" "$dev5" &
+ PVMOVE=$!
+ aux wait_pvmove_lv_ready "$vg-pvmove1" 300
+ kill -9 $PVMOVE
+
+ if test -e LOCAL_LVMPOLLD ; then
+ # inforestart lvmpolld
+ kill $(< LOCAL_LVMPOLLD)
+ for i in $(seq 1 100) ; do
+ test $i -eq 100 && die "Shutdown of lvmpolld is too slow."
+ test -e "$LVM_LVMPOLLD_PIDFILE" || break
+ sleep .1
+ done # wait for the pid removal
+ aux prepare_lvmpolld
+ fi
+
+ wait
+
+ while dmsetup status "$vg-$lv1"; do dmsetup remove "$vg-$lv1" || true; done
+ while dmsetup status "$vg-$lv2"; do dmsetup remove "$vg-$lv2" || true; done
+ while dmsetup status "$vg-pvmove0"; do dmsetup remove "$vg-pvmove0" || true; done
+ while dmsetup status "$vg-pvmove1"; do dmsetup remove "$vg-pvmove1" || true; done
+
+ check lv_attr_bit type $vg/pvmove0 "p"
+ check lv_attr_bit type $vg/pvmove1 "p"
+
+ if test -e LOCAL_CLVMD ; then
+ # giveup all clvmd locks (faster then restarting clvmd)
+ # no deactivation happen, nodes are already removed
+ #vgchange -an $vg
+ # FIXME: However above solution has one big problem
+ # as clvmd starts to abort on internal errors on various
+ # errors, based on the fact pvmove is killed -9
+ # Restart clvmd
+ kill $(< LOCAL_CLVMD)
+ for i in $(seq 1 100) ; do
+ test $i -eq 100 && die "Shutdown of clvmd is too slow."
+ test -e "$CLVMD_PIDFILE" || break
+ sleep .1
+ done # wait for the pid removal
+ aux prepare_clvmd
+ fi
+
+ if test -e LOCAL_LVMETAD ; then
+ # Restart lvmetad
+ kill $(< LOCAL_LVMETAD)
+ aux prepare_lvmetad
+ fi
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # call resume function (see below)
+ # with expected number of spawned
+ # bg polling as parameter
+ $1 2
+
+ aux enable_dev "$dev4"
+ aux enable_dev "$dev5"
+
+ i=0
+ while get lv_field $vg name -a | grep "^\[pvmove"; do
+ # wait for 30 secs at max
+ test $i -ge 300 && die "Pvmove is too slow or does not progress."
+ sleep .1
+ i=$((i + 1))
+ done
+
+ lvremove -ff $vg
+}
+
+lvchange_single() {
+ lvchange -aey $vg/$lv1
+ lvchange -aey $vg/$lv2
+}
+
+lvchange_all() {
+ lvchange -aey $vg/$lv1 $vg/$lv2
+
+ # we don't want to spawn more than $1 background pollings
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq $1 || should false
+}
+
+vgchange_single() {
+ vgchange -aey -vvvv $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq $1
+}
+
+pvmove_fg() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^\[pvmove1\]"
+
+ # disable delay device
+ # fg pvmove would take ages to complete otherwise
+ aux enable_dev "$dev4"
+ aux enable_dev "$dev5"
+
+ pvmove -i0
+}
+
+pvmove_bg() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^\[pvmove1\]"
+
+ pvmove -b -i0
+}
+
+pvmove_fg_single() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^\[pvmove1\]"
+
+ # disable delay device
+ # fg pvmove would take ages to complete otherwise
+ aux enable_dev "$dev4"
+ aux enable_dev "$dev5"
+
+ pvmove -i0 "$dev1"
+ pvmove -i0 "$dev3"
+}
+
+pvmove_bg_single() {
+ # pvmove resume requires LVs active
+ vgchange -aey --poll n $vg
+
+ ps h -C lvm | tee out || true
+ test $(wc -l < out) -eq 0
+
+ # vgchange must not spawn (thus finish) background polling
+ get lv_field $vg name -a | grep "^\[pvmove0\]"
+ get lv_field $vg name -a | grep "^\[pvmove1\]"
+
+ pvmove -i0 -b "$dev1"
+ pvmove -i0 -b "$dev3"
+}
+
+test -e LOCAL_CLVMD && skip
+
+test_pvmove_resume lvchange_single
+test_pvmove_resume lvchange_all
+test_pvmove_resume vgchange_single
+test_pvmove_resume pvmove_fg
+test_pvmove_resume pvmove_fg_single
+test_pvmove_resume pvmove_bg
+test_pvmove_resume pvmove_bg_single
+
+vgremove -ff $vg
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=fe30658a4d5fe4e4…
Commit: fe30658a4d5fe4e4e6bb346c9c9ee7142a98f49d
Parent: c26d81d6e6939906729d91fae83cd8bbdd743bb7
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Mon Apr 13 16:29:15 2015 +0200
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Mon Apr 13 20:52:32 2015 +0200
toollib: close connection to lvmetad after fork
sharing connection between parent command and background
processes spawned from parent could lead to occasional failures
due to unexpected corruption in daemon responses sent to either child
or a parent.
lvmetad issued warning about duplicate config values in request.
LVM commands occasionaly failed w/ internal error after receving
corrupted response.
lvmetad connection is renewed when needed after explicit disconnect
in child
---
tools/toollib.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/toollib.c b/tools/toollib.c
index 4856f02..26810b2 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -97,6 +97,8 @@ int become_daemon(struct cmd_context *cmd, int skip_lvm)
strncpy(*cmd->argv, "(lvm2)", strlen(*cmd->argv));
+ lvmetad_disconnect();
+
if (!skip_lvm) {
reset_locking();
lvmcache_destroy(cmd, 1, 1);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c26d81d6e6939906…
Commit: c26d81d6e6939906729d91fae83cd8bbdd743bb7
Parent: 59c417379e067f85cd962c2024f7a042f04a41fd
Author: Ondrej Kozina <okozina(a)redhat.com>
AuthorDate: Wed Apr 8 12:05:14 2015 +0200
Committer: Ondrej Kozina <okozina(a)redhat.com>
CommitterDate: Mon Apr 13 20:52:22 2015 +0200
toollib: do not spawn polling in lv_change_activate
spawning a background polling from within the lv_change_activate
fn went to two problems:
1) vgchange should not spawn any background polling until after
the whole activation process for a VG is finished. Otherwise
it could lead to a duplicite request for spawning background
polling. This statement was alredy true with one exception of
mirror up-conversion polling (fixed by this commit).
2) due to current conditions in lv_change_activate lvchange cmd
couldn't start background polling for pvmove LVs if such LV was
about to get activated by the command in the same time.
This commit however doesn't alter the lvchange cmd so that it works same as
vgchange with regard to not to spawn duplicate background pollings per
unique LV.
---
tools/lvchange.c | 13 +++++++++++++
tools/toollib.c | 5 -----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/tools/lvchange.c b/tools/lvchange.c
index 096aae4..e790ea0 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -212,6 +212,19 @@ static int _lvchange_activate(struct cmd_context *cmd, struct logical_volume *lv
if (!lv_change_activate(cmd, lv, activate))
return_0;
+ /*
+ * FIXME: lvchange should defer background polling in a similar
+ * way as vgchange does. First activate all relevant LVs
+ * initate background polling later (for all actually
+ * activated LVs). So we can avoid duplicate background
+ * polling for pvmove (2 or more locked LVs on single pvmove
+ * LV)
+ */
+ if (background_polling() && is_change_activating(activate) &&
+ (lv_is_pvmove(lv) || lv_is_locked(lv) || lv_is_converting(lv) ||
+ lv_is_merging(lv)))
+ lv_spawn_background_polling(cmd, lv);
+
return 1;
}
diff --git a/tools/toollib.c b/tools/toollib.c
index 142ff33..4856f02 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -843,11 +843,6 @@ int lv_change_activate(struct cmd_context *cmd, struct logical_volume *lv,
if (!lv_active_change(cmd, lv, activate, 0))
return_0;
- if (background_polling() &&
- is_change_activating(activate) &&
- (lv_is_pvmove(lv) || lv_is_converting(lv) || lv_is_merging(lv)))
- lv_spawn_background_polling(cmd, lv);
-
return r;
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=29220a181ac3ad0f…
Commit: 29220a181ac3ad0faf63681e465f0a9ba9e625dd
Parent: e4261ba03784f122759670cc2022a2dcb5f5a3ef
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Apr 13 13:39:30 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Apr 13 13:40:11 2015 -0500
config: update descriptions
- filter, preferred_names
---
lib/config/config_settings.h | 41 ++++++++++++++++++++++++-----------------
1 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index ecdf368..84c81c6 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -159,10 +159,11 @@ cfg(devices_external_device_info_source_CFG, "external_device_info_source", devi
"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),
- "If several entries in the scanned directories correspond to the\n"
- "same block device and the tools need to display a name for the device,\n"
- "all the path names are matched against each item in this list of\n"
- "regular expressions. The first match is used.\n"
+ "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"
+ "the path names are matched against each item in\n"
+ "this list of regular expressions. The first match is used.\n"
"Try to avoid using undescriptive /dev/dm-N names, if present.\n"
"If no preferred name matches, or if preferred_names are not\n"
"defined, built-in rules are used until one produces a preference.\n"
@@ -175,33 +176,39 @@ cfg_array(devices_preferred_names_CFG, "preferred_names", devices_CFG_SECTION, C
"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),
- "Patterns used to accept or reject devices found by a scan.\n"
- "Patterns are regular expressions delimited by any character\n"
- "and preceded by 'a' for accept or 'r' for reject.\n"
- "The list is traversed in order, and the first regex that matches\n"
- "determines if the device is accepted or rejected (ignored).\n"
- "Devices that don't match any patterns are accepted.\n"
- "If there are several names for the same device, e.g. from symlinks,\n"
- "the first pattern matching any of the names determines if the\n"
- "device is accepted or rejected (depending on whether the first\n"
- "matching pattern is 'a' or 'r'.)\n"
+ "Limit the block devices that are used by LVM.\n"
+ "This is a list of regular expressions used to accept or\n"
+ "reject block device path names. Each regex is delimited\n"
+ "by a vertical bar '|' (or any character) and is preceded\n"
+ "by 'a' to accept the path, or by 'r' to reject the path.\n"
+ "The first regex in the list to match the path is used,\n"
+ "producing the 'a' or 'r' result for the device.\n"
+ "When multiple path names exist for a block device, if any\n"
+ "path name matches an 'a' pattern before an 'r' pattern,\n"
+ "then the device is accepted. If all the path names match\n"
+ "an 'r' pattern first, then the device is rejected.\n"
+ "Unmatching path names do not affect the accept or reject\n"
+ "decision. If no path names for a device match a pattern,\n"
+ "then the device is accepted.\n"
+ "Be careful mixing 'a' and 'r' patterns, as the combination\n"
+ "might produce unexpected results (test any changes.)\n"
"Run vgscan after changing the filter to regenerate the cache.\n"
"See the use_lvmetad comment for a special case regarding filters.\n"
"Example:\n"
"Accept every block device.\n"
- "filter = [ \"a/.*/\" ]\n"
+ "filter = [ \"a|.*/|" ]\n"
"Example:\n"
"Reject the cdrom drive.\n"
"filter = [ \"r|/dev/cdrom|\" ]\n"
"Example:\n"
"Work with just loopback devices, e.g. for testing.\n"
- "filter = [ \"a/loop/\", \"r/.*/\" ]\n"
+ "filter = [ \"a|loop|\", \"r|.*|\" ]\n"
"Example:\n"
"Accept all loop devices and ide drives except hdc.\n"
"filter =[ \"a|loop|\", \"r|/dev/hdc|\", \"a|/dev/ide|\", \"r|.*|\" ]\n"
"Example:\n"
"Use anchors to be very specific.\n"
- "filter = [ \"a|^/dev/hda8$|\", \"r/.*/\" ]\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),
"Since filter is often overridden from the command line,\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f814d763c60f795d…
Commit: f814d763c60f795dd7616b57fbcd55f1761fcc3c
Parent: cc26085b62d8cad265fca86426c65c88491a7473
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Apr 13 15:27:17 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Apr 13 15:27:17 2015 +0200
lvmconf: add --enable-halvm, --disable-halvm, --services, --mirrorservice, --startstopservices options and use proper global/use_lvmetad default value
This patch adds new options to lvmconf:
--enable-halvm (just like --enable-cluster, but configure LVM
for use in HA LVM - meaning disabling lvmetad and
making sure we have locking_type=1)
--disable-halvm (just like --disable-cluster, but configure LVM
back from HA LVM - meaning enabling lvmetad if
it's enabled by default and making sure we have
default locking type set)
--services (causes clvmd and lvmetad services to be enabled or
disabled appropriately and conforming to the changes
in lvm configuration we've just made with lvmconf)
--mirrorservice (in addition to clvmd and lvmetad services, also
enable or disable cmirrord service appropriately;
this is a separate option because cmirrord is
optional and it doesn't need to be always enabled
when clvmd is enabled)
--startstopservices (in addition to enabling or disabling services,
start and stop these services immediately)
These options are supposed to help users to make their system ready
for cluster with clvmd (active-active) or HA LVM (active-passive) use
while lvmconf script can handle services as well so users don't need
to bother about setting them manually.
Also, before this patch, we hardcoded global/use_lvmetad=0 as default
value in lvmconf script. Howeverm this default may change by just
flipping the value in config_settings.h and we may forget to edit
the lvmconf. It's better to use lvm dumpconfig --type default global/use_lvmetad
to get the actual default value and use this one instead of hardcoded one.
---
WHATS_NEW | 2 +
man/lvmconf.8.in | 24 +++++++
scripts/lvmconf.sh | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++-
3 files changed, 198 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index b67635c..9928291 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
Version 2.02.119 -
==================================
+ Add --services, --mirrorservice and --startstopservices option to lvmconf.
+ Use proper default value of global/use_lvmetad when processing lvmconf script.
Respect allocation/cling_tag_list during intial contiguous allocation.
Add A_PARTITION_BY_TAGS set when allocated areas should not share tags.
Set correct vgid when updating cache when writing PV metadata.
diff --git a/man/lvmconf.8.in b/man/lvmconf.8.in
index bfd539a..de86a2d 100644
--- a/man/lvmconf.8.in
+++ b/man/lvmconf.8.in
@@ -6,12 +6,17 @@ lvmconf \(em LVM configuration modifier
.B lvmconf
.RB [ \-\-disable-cluster ]
.RB [ \-\-enable-cluster ]
+.RB [ \-\---enable-halvm ]
+.RB [ \-\---disable-halvm ]
.RB [ \-\-file
.RI < configfile >]
.RB [ \-\-lockinglib
.RI < lib >]
.RB [ \-\-lockinglibdir
.RI < dir >]
+.RB [ \-\-services ]
+.RB [ \-\-mirrorservice ]
+.RB [ \-\-startstopservices ]
.SH "DESCRIPTION"
lvmconf is a script that modifies the locking configuration in
@@ -27,6 +32,14 @@ lvmetad use to its default.
Set \fBlocking_type\fR to the default clustered type on this system.
Also disable lvmetad use as it is not yet supported in clustered environment.
.TP
+.BR \-\-disable-halvm
+Set \fBlocking_type\fR to the default non-clustered type. Also reset
+lvmetad use to its default.
+.TP
+.BR \-\-enable-halvm
+Set \fBlocking_type\fR suitable for HA LVM use.
+Also disable lvmetad use as it is not yet supported in HA LVM environment.
+.TP
.BR \-\-file " <" \fIconfigfile >
Apply the changes to \fIconfigfile\fP instead of the default
\fI#DEFAULT_SYS_DIR#/lvm.conf\fP.
@@ -35,6 +48,17 @@ Apply the changes to \fIconfigfile\fP instead of the default
Set external \fBlocking_library\fR locking library to load if an external locking type is used.
.TP
.BR \-\-lockinglibdir " <" \fIdir >
+.TP
+.BR \-\-services
+In addition to setting the lvm configuration, also enable or disable related Systemd or SysV
+clvmd and lvmetad services.
+.TP
+.BR \-\-mirrorservice
+Also enable or disable optional cmirrord service when handling services (applicable only with \-\-services).
+.TP
+.BR \-\-startstopservices
+In addition to enabling or disabling related services, start or stop them immediately
+(applicable only with \-\-services).
.SH FILES
.I #DEFAULT_SYS_DIR#/lvm.conf
diff --git a/scripts/lvmconf.sh b/scripts/lvmconf.sh
index bfe518e..6c2a167 100644
--- a/scripts/lvmconf.sh
+++ b/scripts/lvmconf.sh
@@ -16,7 +16,20 @@
# Edit an lvm.conf file to adjust various properties
#
-DEFAULT_USE_LVMETAD=0
+# cluster with clvmd and/or locking lib?
+HANDLE_CLUSTER=0
+
+# cluster without clvmd?
+HANDLE_HALVM=0
+
+# also enable services appropriately (lvmetad, clvmd)?
+HANDLE_SERVICES=0
+
+# also enable cmirrord service in addition?
+HANDLE_MIRROR_SERVICE=0
+
+# also start/start services in addition to enabling/disabling them?
+START_STOP_SERVICES=0
function usage
{
@@ -25,13 +38,25 @@ function usage
echo "Commands:"
echo "Enable clvm: --enable-cluster [--lockinglibdir <dir>] [--lockinglib <lib>]"
echo "Disable clvm: --disable-cluster"
+ echo "Enable halvm: --enable-halvm"
+ echo "Disable halvm: --disable-halvm"
echo "Set locking library: --lockinglibdir <dir> [--lockinglib <lib>]"
echo ""
echo "Global options:"
echo "Config file location: --file <configfile>"
+ echo "Set services: --services [--mirrorservice] [--startstopservices]"
echo ""
}
+function set_default_use_lvmetad_var
+{
+ eval $(lvm dumpconfig --type default global/use_lvmetad 2>/dev/null)
+ if [ "$?" != "0" ]; then
+ USE_LVMETAD=0
+ else
+ USE_LVMETAD=$use_lvmetad
+ fi
+}
function parse_args
{
@@ -40,13 +65,27 @@ function parse_args
--enable-cluster)
LOCKING_TYPE=3
USE_LVMETAD=0
+ HANDLE_CLUSTER=1
shift
;;
--disable-cluster)
LOCKING_TYPE=1
- USE_LVMETAD=$DEFAULT_USE_LVMETAD
+ set_default_use_lvmetad_var
+ HANDLE_CLUSTER=1
shift
;;
+ --enable-halvm)
+ LOCKING_TYPE=1
+ USE_LVMETAD=0
+ HANDLE_HALVM=1
+ shift
+ ;;
+ --disable-halvm)
+ LOCKING_TYPE=1
+ set_default_use_lvmetad_var
+ HANDLE_HALVM=1
+ shift
+ ;;
--lockinglibdir)
if [ -n "$2" ]; then
LOCKINGLIBDIR=$2
@@ -55,6 +94,7 @@ function parse_args
usage
exit 1
fi
+ HANDLE_CLUSTER=1
;;
--lockinglib)
if [ -n "$2" ]; then
@@ -64,6 +104,7 @@ function parse_args
usage
exit 1
fi
+ HANDLE_CLUSTER=1
;;
--file)
if [ -n "$2" ]; then
@@ -74,6 +115,18 @@ function parse_args
exit 1
fi
;;
+ --services)
+ HANDLE_SERVICES=1
+ shift
+ ;;
+ --mirrorservice)
+ HANDLE_MIRROR_SERVICE=1
+ shift
+ ;;
+ --startstopservices)
+ START_STOP_SERVICES=1
+ shift
+ ;;
*)
usage
exit 1
@@ -91,6 +144,22 @@ function validate_args
exit 10
fi
+ if [ "$HANDLE_CLUSTER" = "1" -a "$HANDLE_HALVM" = "1" ]; then
+ echo "Either HA LVM or cluster method may be used at one time"
+ exit 18
+ fi
+
+ if [ "$HANDLE_SERVICES" = "0" ]; then
+ if [ "$HANDLE_MIRROR_SERVICE" = "1" ]; then
+ echo "--mirrorservice may be used only with --services"
+ exit 19
+ fi
+ if [ "$START_STOP_SERVICES" = "1" ]; then
+ echo "--startstopservices may be used only with --services"
+ exit 19
+ fi
+ fi
+
if [ -z "$LOCKING_TYPE" ] && [ -z "$LOCKINGLIBDIR" ]; then
usage
exit 1
@@ -277,3 +346,104 @@ if [ $? != 0 ]
fi
rm -f $SCRIPTFILE $TMPFILE
+
+function set_service {
+ local type="$1"
+ local action="$2"
+ shift 2
+
+ if [ "$type" = "systemd" ]; then
+ if [ "$action" = "activate" ]; then
+ for i in $@; do
+ eval $($SYSTEMCTL_BIN show $i -p LoadState)
+ test "$LoadState" = "loaded" || continue
+ $SYSTEMCTL_BIN enable $i
+ if [ "$START_STOP_SERVICES" = "1" ]; then
+ $SYSTEMCTL_BIN start $i
+ fi
+ done
+ elif [ "$action" = "deactivate" ]; then
+ for i in $@; do
+ eval $($SYSTEMCTL_BIN show $i -p LoadState)
+ test "$LoadState" = "loaded" || continue
+ $SYSTEMCTL_BIN disable $i
+ if [ "$START_STOP_SERVICES" = "1" ]; then
+ $SYSTEMCTL_BIN stop $i
+ fi
+ done
+ fi
+ elif [ "$type" = "sysv" ]; then
+ if [ "$action" = "activate" ]; then
+ for i in $@; do
+ $CHKCONFIG_BIN --list $i > /dev/null || continue
+ $CHKCONFIG_BIN $i on
+ if [ "$START_STOP_SERVICES" = "1" ]; then
+ $SERVICE_BIN $i start
+ fi
+ done
+ elif [ "$action" = "deactivate" ]; then
+ for i in $@; do
+ $CHKCONFIG_BIN --list $i > /dev/null || continue
+ if [ "$START_STOP_SERVICES" = "1" ]; then
+ $SERVICE_BIN $i stop
+ fi
+ $CHKCONFIG_BIN $i off
+ done
+ fi
+ fi
+}
+
+# Start/stop and enable/disable services if needed.
+
+if [ "$HANDLE_SERVICES" == "1" ]; then
+
+ SYSTEMCTL_BIN=$(which systemctl 2>/dev/null)
+ CHKCONFIG_BIN=$(which chkconfig 2>/dev/null)
+ SERVICE_BIN=$(which service 2>/dev/null)
+
+ # Systemd services
+ if [ -n "$SYSTEMCTL_BIN" ]; then
+ if [ "$USE_LVMETAD" = "0" ]; then
+ set_service systemd deactivate lvm2-lvmetad.service lvm2-lvmetad.socket
+ else
+ set_service systemd activate lvm2-lvmetad.socket
+ fi
+
+ if [ "$LOCKING_TYPE" = "3" ]; then
+ set_service systemd activate lvm2-cluster-activation.service
+ if [ "$HANDLE_CMIRROR_SERVICE" ]; then
+ set_service activate lvm2-cmirrord.service
+ fi
+ else
+ set_service systemd deactivate lvm2-cluster-activation.service
+ if [ "$HANDLE_CMIRROR_SERVICE" ]; then
+ set_service systemd deactivate lvm2-cmirrord.service
+ fi
+ fi
+
+ # System V init scripts
+ elif [ -n "$SERVICE_BIN" -a -n "$CHKCONFIG_BIN" ]; then
+ if [ "$USE_LVMETAD" = "0" ]; then
+ set_service sysv deactivate lvm2-lvmetad
+ else
+ set_service sysv activate lvm2-lvmetad
+ fi
+
+ if [ "$LOCKING_TYPE" = "3" ]; then
+ set_service sysv activate clvmd
+ if [ "$HANDLE_MIRROR_SERVICE" = "1" ]; then
+ set_service sysv activate cmirrord
+ fi
+ else
+ set_service sysv deactivate clvmd
+ if [ "$HANDLE_MIRROR_SERVICE" = "1" ]; then
+ set_service sysv deactivate cmirrord
+ fi
+ fi
+
+ # None of the service tools found, error out
+ else
+ echo "Missing tools to handle services"
+ exit 20
+ fi
+fi
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=cc26085b62d8cad2…
Commit: cc26085b62d8cad265fca86426c65c88491a7473
Parent: b851b74cba6dd8d1c2c831d5e3d2662734f987e8
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Sat Apr 11 01:55:24 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Sat Apr 11 01:55:24 2015 +0100
alloc: Respect cling_tag_list in contig alloc.
When performing initial allocation (so there is nothing yet to
cling to), use the list of tags in allocation/cling_tag_list to
partition the PVs. We implement this by maintaining a list of
tags that have been "used up" as we proceed and ignoring further
devices that have a tag on the list.
https://bugzilla.redhat.com/983600
---
WHATS_NEW | 1 +
lib/format_text/format-text.c | 2 +-
lib/metadata/lv_manip.c | 80 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 82 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 164fe5a..b67635c 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.119 -
==================================
+ Respect allocation/cling_tag_list during intial contiguous allocation.
Add A_PARTITION_BY_TAGS set when allocated areas should not share tags.
Set correct vgid when updating cache when writing PV metadata.
More efficient clvmd singlenode locking emulation.
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index 8e5578c..759ad89 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -1333,7 +1333,7 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
/* Add a new cache entry with PV info or update existing one. */
if (!(info = lvmcache_add(fmt->labeller, (const char *) &pv->id,
pv->dev, pv->vg_name,
- is_orphan_vg(pv->vg_name) ? pv->vg_name : pv->vg ? &pv->vg->id : NULL, 0)))
+ is_orphan_vg(pv->vg_name) ? pv->vg_name : pv->vg ? (const char *) &pv->vg->id : NULL, 0)))
return_0;
label = lvmcache_get_label(info);
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index ef69e0e..85f727f 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -2125,6 +2125,17 @@ static const char *_tags_list_str(struct alloc_handle *ah, struct physical_volum
}
/*
+ * Does PV area have a tag listed in allocation/cling_tag_list that
+ * matches a tag in the pv_tags list?
+ */
+static int _pv_has_matching_tag(const struct dm_config_node *cling_tag_list_cn,
+ struct physical_volume *pv1, uint32_t pv1_start_pe, uint32_t area_num,
+ struct dm_list *pv_tags)
+{
+ return _match_pv_tags(cling_tag_list_cn, pv1, pv1_start_pe, area_num, NULL, pv_tags, 0, NULL, NULL);
+}
+
+/*
* Does PV area have a tag listed in allocation/cling_tag_list that
* matches a tag of the PV of the existing segment?
*/
@@ -2501,6 +2512,38 @@ static void _report_needed_allocation_space(struct alloc_handle *ah,
(metadata_count == 1) ? "" : "s",
metadata_size);
}
+
+/* Work through the array, removing any entries with tags already used by previous areas. */
+static int _limit_to_one_area_per_tag(struct alloc_handle *ah, struct alloc_state *alloc_state,
+ uint32_t ix_log_offset, unsigned *ix)
+{
+ uint32_t s = 0, u = 0;
+ DM_LIST_INIT(pv_tags);
+
+ while (s < alloc_state->areas_size && alloc_state->areas[s].pva) {
+ /* Start again with an empty tag list when we reach the log devices */
+ if (u == ix_log_offset)
+ dm_list_init(&pv_tags);
+ if (!_pv_has_matching_tag(ah->cling_tag_list_cn, alloc_state->areas[s].pva->map->pv, alloc_state->areas[s].pva->start, s, &pv_tags)) {
+ /* The comparison fn will ignore any non-cling tags so just add everything */
+ if (!str_list_add_list(ah->mem, &pv_tags, &alloc_state->areas[s].pva->map->pv->tags))
+ return_0;
+
+ if (s != u)
+ alloc_state->areas[u] = alloc_state->areas[s];
+
+ u++;
+ } else
+ (*ix)--; /* One area removed */
+
+ s++;
+ }
+
+ alloc_state->areas[u].pva = NULL;
+
+ return 1;
+}
+
/*
* Returns 1 regardless of whether any space was found, except on error.
*/
@@ -2722,6 +2765,43 @@ static int _find_some_parallel_space(struct alloc_handle *ah,
return 1;
/*
+ * FIXME We should change the code to do separate calls for the log allocation
+ * and the data allocation so that _limit_to_one_area_per_tag doesn't have to guess
+ * where the split is going to occur.
+ */
+
+ /*
+ * This code covers the initial allocation - after that there is something to 'cling' to
+ * and we shouldn't get this far.
+ * ix_offset is assumed to be 0 with A_PARTITION_BY_TAGS.
+ *
+ * FIXME Consider a second attempt with A_PARTITION_BY_TAGS if, for example, the largest area
+ * had all the tags set, but other areas don't.
+ */
+ if ((alloc_parms->flags & A_PARTITION_BY_TAGS) && !ix_offset) {
+ if (!_limit_to_one_area_per_tag(ah, alloc_state, ix_log_offset, &ix))
+ return_0;
+
+ /* Recalculate log position because we might have removed some areas from consideration */
+ if (alloc_state->log_area_count_still_needed) {
+ /* How many areas are too small for the log? */
+ too_small_for_log_count = 0;
+ while (too_small_for_log_count < ix &&
+ (*(alloc_state->areas + ix - 1 - too_small_for_log_count)).pva &&
+ (*(alloc_state->areas + ix - 1 - too_small_for_log_count)).used < ah->log_len)
+ too_small_for_log_count++;
+ if (ix < too_small_for_log_count + ah->log_area_count)
+ return 1;
+ ix_log_offset = ix - too_small_for_log_count - ah->log_area_count;
+ }
+
+ if (ix < devices_needed +
+ (alloc_state->log_area_count_still_needed ? alloc_state->log_area_count_still_needed +
+ too_small_for_log_count : 0))
+ return 1;
+ }
+
+ /*
* Finally add the space identified to the list of areas to be used.
*/
if (!_alloc_parallel_area(ah, max_to_allocate, alloc_state, ix_log_offset))
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b851b74cba6dd8d1…
Commit: b851b74cba6dd8d1c2c831d5e3d2662734f987e8
Parent: 2872e8c289a04e60e59494b41336ae9e9eb6021e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Apr 10 16:41:54 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Apr 10 16:43:38 2015 -0500
config: editing descriptions
Update wording and formatting.
---
lib/config/config_settings.h | 482 ++++++++++++++++++++++--------------------
1 files changed, 248 insertions(+), 234 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 63332d4..ecdf368 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -123,7 +123,8 @@ cfg_runtime(config_profile_dir_CFG, "profile_dir", config_CFG_SECTION, 0, CFG_TY
"Directory where LVM looks for configuration profiles.\n")
cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DEV_DIR, vsn(1, 0, 0),
- "Where do you want your volume groups to appear ?")
+ "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, 0, CFG_TYPE_STRING, "#S/dev", vsn(1, 0, 0),
"An array of directories that contain the device nodes you wish\n"
@@ -138,18 +139,20 @@ cfg(devices_obtain_device_list_from_udev_CFG, "obtain_device_list_from_udev", de
"subdirectories found in the device directory. This setting is applied\n"
"to udev-managed device directory only, other directories will be scanned\n"
"fully. LVM needs to be compiled with udev support for this setting to\n"
- "take effect. N.B. Any device node or symlink not managed by udev in\n"
- "udev directory will be ignored with this setting on.\n")
+ "take effect. Any device node or symlink not managed by udev in udev\n"
+ "directory will be ignored with this setting on.\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),
- "Select external device information source to use for further and more\n"
- "detailed device determination. Some information may already be available\n"
- "in the system and LVM can use this information to determine the exact\n"
- "type or use of the device it processes. Using existing external device\n"
- "information source can speed up device processing as LVM does not need\n"
- "to run its own native routines to acquire this information. For example,\n"
- "such information is used to drive LVM filtering like MD component\n"
- "detection, multipath component detection, partition detection and others.\n"
+ "Select external device information source to use for\n"
+ "further and more detailed device determination. Some\n"
+ "information may already be available in the system and\n"
+ "LVM can use this information to determine the exact type\n"
+ "or use of the device it processes. Using existing external\n"
+ "device information source can speed up device processing\n"
+ "as LVM does not need to run its own native routines to acquire\n"
+ "this information. For example, such information is used to\n"
+ "drive LVM filtering like MD component detection, multipath\n"
+ "component detection, partition detection and others.\n"
"Possible options are: none, udev.\n"
"none - No external device information source is used.\n"
"udev - Reuse existing udev database records. Applicable\n"
@@ -157,84 +160,74 @@ cfg(devices_external_device_info_source_CFG, "external_device_info_source", devi
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),
"If several entries in the scanned directories correspond to the\n"
- "same block device and the tools need to display a name for device,\n"
- "all the pathnames are matched against each item in the following\n"
- "list of regular expressions in turn and the first match is used.\n"
+ "same block device and the tools need to display a name for the device,\n"
+ "all the path names are matched against each item in this list of\n"
+ "regular expressions. The first match is used.\n"
"Try to avoid using undescriptive /dev/dm-N names, if present.\n"
- "In case no prefererred name matches or if preferred_names are not\n"
- "defined at all, builtin rules are used to determine the preference.\n"
- "The first builtin rule checks path prefixes and it gives preference\n"
- "based on this ordering (where /dev depends on devices/dev setting):\n"
- "/dev/mapper > /dev/disk > /dev/dm-* > /dev/block\n"
- "If the ordering above cannot be applied, the path with fewer slashes\n"
- "gets preference then.\n"
- "If the number of slashes is the same, a symlink gets preference.\n"
- "Finally, if all the rules mentioned above are not applicable,\n"
- "lexicographical order is used over paths and the smallest one\n"
- "of all gets preference.\n"
+ "If no preferred name matches, or if preferred_names are not\n"
+ "defined, built-in rules are used until one produces a preference.\n"
+ "Rule 1 checks path prefixes and gives preference in this order:\n"
+ "/dev/mapper, /dev/disk, /dev/dm-*, /dev/block (/dev from devices/dev)\n"
+ "Rule 2 prefers the path with the least slashes.\n"
+ "Rule 3 prefers a symlink.\n"
+ "Rule 4 prefers the path with least value in lexicographical order.\n"
"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),
- "A filter that tells LVM to only use a restricted set of devices.\n"
- "The filter consists of an array of regular expressions. These\n"
- "expressions can be delimited by a character of your choice, and\n"
- "prefixed with either an 'a' (for accept) or 'r' (for reject).\n"
- "The first expression found to match a device name determines if\n"
- "the device will be accepted or rejected (ignored). Devices that\n"
- "don't match any patterns are accepted.\n"
- "Be careful if there there are symbolic links or multiple filesystem\n"
- "entries for the same device as each name is checked separately against\n"
- "the list of patterns. The effect is that if the first pattern in the\n"
- "list to match a name is an 'a' pattern for any of the names, the device\n"
- "is accepted; otherwise if the first pattern in the list to match a name\n"
- "is an 'r' pattern for any of the names it is rejected; otherwise it is\n"
- "accepted.\n"
- "Don't have more than one filter line active at once: only one gets used.\n"
- "Run vgscan after you change this parameter to ensure that\n"
- "the cache file gets regenerated (see below).\n"
- "If it doesn't do what you expect, check the output of 'vgscan -vvvv'.\n"
- "If lvmetad is used, then see \"A note about device filtering while\n"
- "lvmetad is used\" comment that is attached to global/use_lvmetad setting.\n"
- "Examples:\n"
- "By default we accept every block device:\n"
+ "Patterns used to accept or reject devices found by a scan.\n"
+ "Patterns are regular expressions delimited by any character\n"
+ "and preceded by 'a' for accept or 'r' for reject.\n"
+ "The list is traversed in order, and the first regex that matches\n"
+ "determines if the device is accepted or rejected (ignored).\n"
+ "Devices that don't match any patterns are accepted.\n"
+ "If there are several names for the same device, e.g. from symlinks,\n"
+ "the first pattern matching any of the names determines if the\n"
+ "device is accepted or rejected (depending on whether the first\n"
+ "matching pattern is 'a' or 'r'.)\n"
+ "Run vgscan after changing the filter to regenerate the cache.\n"
+ "See the use_lvmetad comment for a special case regarding filters.\n"
+ "Example:\n"
+ "Accept every block device.\n"
"filter = [ \"a/.*/\" ]\n"
- "Exclude the cdrom drive:\n"
+ "Example:\n"
+ "Reject the cdrom drive.\n"
"filter = [ \"r|/dev/cdrom|\" ]\n"
- "When testing I like to work with just loopback devices:\n"
+ "Example:\n"
+ "Work with just loopback devices, e.g. for testing.\n"
"filter = [ \"a/loop/\", \"r/.*/\" ]\n"
- "Or maybe all loops and ide drives except hdc:\n"
+ "Example:\n"
+ "Accept all loop devices and ide drives except hdc.\n"
"filter =[ \"a|loop|\", \"r|/dev/hdc|\", \"a|/dev/ide|\", \"r|.*|\" ]\n"
- "Use anchors if you want to be really specific:\n"
+ "Example:\n"
+ "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),
- "Since filter is often overridden from command line, it is not suitable\n"
- "for system-wide device filtering (udev rules, lvmetad). To hide devices\n"
- "from LVM-specific udev processing and/or from lvmetad, you need to set\n"
- "global_filter. The syntax is the same as for normal filter\n"
- "above. Devices that fail the global_filter are not even opened by LVM.\n")
+ "Since filter is often overridden from the command line,\n"
+ "it is not suitable for system-wide device filtering,\n"
+ "e.g. udev rules and lvmetad. To hide devices from LVM-specific\n"
+ "udev processing and lvmetad, use global_filter.\n"
+ "The syntax is the same as devices/filter above.\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),
- "This setting has been replaced by the cache_dir setting.\n")
+ "This setting has been replaced by 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),
- "The results of the filtering are cached on disk to avoid\n"
+ "The results of filtering are cached on disk to avoid\n"
"rescanning dud devices (which can take a very long time).\n"
"By default this cache is stored in a file named .cache\n"
"in the directory specified by this setting.\n"
- "It is safe to delete the contents: the tools regenerate it.\n"
- "(The old setting 'cache' is still respected if neither of\n"
- "these new ones is present.)\n"
- "N.B. If obtain_device_list_from_udev is set to 1 the list of\n"
- "devices is instead obtained from udev and any existing .cache\n"
- "file is removed.\n")
+ "It is safe to delete this file; the tools regenerate it.\n"
+ "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),
- "A prefix used before the .cache file name.\n")
+ "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),
- "Enable/disable writing the cache file.\n")
+ "Enable/disable writing the cache file. See devices/cache_dir.\n")
cfg_array(devices_types_CFG, "types", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT | CFG_TYPE_STRING, NULL, vsn(1, 0, 0),
"List of pairs of additional acceptable block device types found\n"
@@ -243,15 +236,18 @@ cfg_array(devices_types_CFG, "types", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED
"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),
- "If sysfs is mounted (2.6 kernels) restrict device scanning to\n"
- "the block devices it believes are valid.\n")
+ "Restrict device scanning to block devices that sysfs believes\n"
+ "are valid. (sysfs must be part of the kernel and mounted.)\n"
+ "This is a quick way of filtering out block devices that are\n"
+ "not present.\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),
- "Ignore devices used as component paths of device-mapper multipath devices.\n")
+ "Ignore devices used as component paths of device-mapper\n"
+ "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),
- "Ignore devices used as components of software RAID (md) devices by looking\n"
- "for md superblocks.\n")
+ "Ignore devices used as components of software RAID (md) devices\n"
+ "by looking for md superblocks.\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),
"Ignore devices used as components of firmware RAID devices.\n"
@@ -260,73 +256,73 @@ cfg(devices_fw_raid_component_detection_CFG, "fw_raid_component_detection", devi
"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),
- "If a PV is placed directly upon an md device, align its data blocks\n"
- "with the md device's stripe-width.\n")
+ "If a PV is placed directly upon an md device, align its data\n"
+ "blocks with the md device's stripe-width.\n")
cfg(devices_default_data_alignment_CFG, "default_data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_DATA_ALIGNMENT, vsn(2, 2, 75),
- "Default alignment of the start of a data area in MB. If set to 0,\n"
- "a value of 64KB will be used. Set to 1 for 1MiB, 2 for 2MiB, etc.\n")
+ "Default alignment of the start of a 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),
- "The start of a PV's data area will be a multiple of the minimum_io_size\n"
- "or optimal_io_size exposed in sysfs.\n"
- "minimum_io_size - the smallest request the device can perform\n"
- "without incurring a read-modify-write penalty (e.g. MD's chunk size)\n"
- "optimal_io_size - the device's preferred unit of receiving I/O\n"
- "(e.g. MD's stripe width)\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"
+ "minimum_io_size is the smallest request the device can perform\n"
+ "without incurring a read-modify-write penalty, e.g. MD chunk size.\n"
+ "optimal_io_size is the device's preferred unit of receiving I/O,\n"
+ "e.g. MD stripe width.\n"
"minimum_io_size is used if optimal_io_size is undefined (0).\n"
"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),
"Alignment (in KB) of start of data area when creating a new PV.\n"
- "md_chunk_alignment and data_alignment_detection are disabled if set.\n"
- "Set to 0 for the default alignment (see: data_alignment_default)\n"
- "or page size, if larger.\n")
+ "If a PV is placed directly upon an md device and\n"
+ "md_chunk_alignment or data_alignment_detection are enabled,\n"
+ "then this setting is ignored. Otherwise, md_chunk_alignment\n"
+ "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),
- "The start of the PV's aligned data area will be shifted by\n"
- "the alignment_offset exposed in sysfs. This offset is often 0 but\n"
- "may be non-zero; e.g.: certain 4KB sector drives that compensate for\n"
+ "The start of a PV aligned data area will be shifted by\n"
+ "the alignment_offset exposed in sysfs. This offset is often 0, but\n"
+ "may be non-zero. Certain 4KB sector drives that compensate for\n"
"windows partitioning will have an alignment_offset of 3584 bytes\n"
"(sector 7 is the lowest aligned logical block, the 4KB sectors start\n"
"at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).\n"
- "But note that pvcreate --dataalignmentoffset will skip this detection.\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),
- "While scanning the system for PVs, skip a device-mapper device\n"
- "that has its I/O suspended. Otherwise, LVM waits for the device\n"
- "to become accessible. This should only be needed in recovery situations.\n")
+ "While scanning the system for PVs, skip a device-mapper\n"
+ "device that has its I/O suspended. Otherwise, LVM waits\n"
+ "for the device to become accessible. This should only be\n"
+ "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),
- "This setting determines whether logical volumes of 'mirror' segment\n"
- "type are scanned for LVM labels. This affects the ability of\n"
- "mirrors to be used as physical volumes. If ignore_lvm_mirrors\n"
- "is enabled, it becomes impossible to create volume groups on top\n"
- "of mirror logical volumes - i.e. to stack volume groups on mirrors.\n"
- "Allowing mirror logical volumes to be scanned (ignore_lvm_mirrors is\n"
- "disabled) can potentially cause LVM processes and I/O to the mirror to\n"
- "become blocked. This is due to the way that the 'mirror' segment type\n"
- "handles failures. In order for the hang to manifest itself, an LVM\n"
- "command must be run just after a failure and before the automatic LVM\n"
- "repair process takes place OR there must be failures in multiple mirrors\n"
- "in the same volume group at the same time with write failures occurring\n"
- "moments before a scan of the mirror's labels.\n"
- "Note that these scanning limitations do not apply to the LVM RAID\n"
- "types, like 'raid1'. The RAID segment types handle failures in a\n"
- "different way and are not subject to possible process or I/O blocking.\n"
- "It is encouraged that users enable ignore_lvm_mirrors if they are using\n"
- "the 'mirror' segment type. Users that require volume group stacking on\n"
- "mirrored logical volumes should consider using the 'raid1' segment type.\n"
- "The 'raid1' segment type is not available for active/active clustered\n"
- "volume groups. Enable ignore_lvm_mirrors to disallow stacking and\n"
- "thereby avoid a possible deadlock.\n")
+ "Enable this to avoid possible deadlocks when using the 'mirror'\n"
+ "segment type. This setting determines whether logical volumes\n"
+ "using the 'mirror' segment type are scanned for LVM labels.\n"
+ "This affects the ability of mirrors to be used as physical volumes.\n"
+ "If this setting is enabled, it becomes impossible to create VGs\n"
+ "on top of mirror LVs, i.e. to stack VGs on mirror LVs.\n"
+ "If this setting is disabled, allowing mirror LVs to be scanned,\n"
+ "it may cause LVM processes and I/O to the mirror to become blocked.\n"
+ "This is due to the way that the mirror segment type handles failures.\n"
+ "In order for the hang to occur, an LVM command must be run just after\n"
+ "a failure and before the automatic LVM repair process takes place,\n"
+ "or there must be failures in multiple mirrors in the same VG at the\n"
+ "same time with write failures occurring moments before a scan of the\n"
+ "mirror's labels.\n"
+ "The 'mirror' scanning problems do not apply to LVM RAID types like\n"
+ "'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),
- "During each LVM operation errors received from each device are counted.\n"
- "If the counter of a particular device exceeds the limit set here, no\n"
- "further I/O is sent to that device for the remainder of the respective\n"
- "operation. Setting the parameter to 0 disables the counters altogether.\n")
+ "During each LVM operation, errors received from each device\n"
+ "are counted. If the counter of a device exceeds the limit set\n"
+ "here, no further I/O is sent to that device for the remainder\n"
+ "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),
"Allow use of pvcreate --uuid without requiring --restorefile.\n")
@@ -334,18 +330,19 @@ cfg(devices_require_restorefile_with_uuid_CFG, "require_restorefile_with_uuid",
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),
"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.\n"
- "The original built-in setting was 512 up to and including version 2.02.84.\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),
- "Issue discards to a logical volumes's underlying physical volume(s) when\n"
- "the logical volume is no longer using the physical volumes' space (e.g.\n"
- "lvremove, lvreduce, etc). Discards inform the storage that a region is\n"
- "no longer in use. Storage that supports discards advertise the protocol\n"
- "specific way discards should be issued by the kernel (TRIM, UNMAP, or\n"
- "WRITE SAME with UNMAP bit set). Not all storage will support or benefit\n"
- "from discards but SSDs and thinly provisioned LUNs generally do. If enabled,\n"
- "discards will only be issued if both the storage and kernel provide support.\n")
+ "Issue discards to a logical volume's underlying physical volumes\n"
+ "when the logical volume is no longer using the physical volumes'\n"
+ "space, e.g. lvremove, lvreduce. Discards inform the storage that\n"
+ "a region is no longer in use. Storage that supports discards\n"
+ "advertise the protocol specific way discards should be issued by\n"
+ "the kernel (TRIM, UNMAP, or WRITE SAME with UNMAP bit set).\n"
+ "Not all storage will support or benefit from discards, but SSDs\n"
+ "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),
"When searching for free space to extend an LV, the 'cling'\n"
@@ -370,36 +367,37 @@ cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0,
"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),
- "Enable use of the blkid library instead of native LVM code to detect\n"
- "any existing signatures while creating new Physical Volumes and\n"
- "Logical Volumes. LVM needs to be compiled with blkid wiping support\n"
- "for this setting to take effect.\n"
+ "Use the blkid library instead of native LVM code to detect\n"
+ "any existing signatures while creating new PVs and LVs.\n"
+ "LVM needs to be compiled with blkid wiping support for this\n"
+ "setting to take effect.\n"
"LVM native detection code is currently able to recognize:\n"
"MD device signatures, swap signature, and LUKS signatures.\n"
- "To see the list of signatures recognized by blkid, check the output\n"
- "of 'blkid -k' command. The blkid can recognize more signatures than\n"
- "LVM native detection code, but due to this higher number of signatures\n"
- "to be recognized, it can take more time to complete the signature scan.\n")
+ "To see the list of signatures recognized by blkid, check the\n"
+ "output of the 'blkid -k' command. blkid can recognize more\n"
+ "signatures than LVM native detection code, but due to this\n"
+ "higher number of signatures to be recognized, it can take more\n"
+ "time to complete the signature scan.\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),
- "Look for any signatures on a newly-created Logical Volume\n"
- "whenever zeroing of the LV is done (zeroing is controlled by -Z/--zero\n"
- "option and if not specified, zeroing is used by default if possible).\n"
- "While zeroing simply overwrites first 4 KiB of the LV with zeroes without\n"
- "doing any signature detection, signature wiping goes beyond that and it\n"
- "can detect exact type and position of signature within the whole LV.\n"
- "As such, it provides cleaner LV for use after creation as all known\n"
- "signatures are wiped so that the LV is not claimed by other tools\n"
- "incorrectly by the existence of old signature from any previous use.\n"
- "The number of signatures that LVM can detect depends on detection\n"
- "code that is selected - see also use_blkid_wiping option.\n"
- "Wiping of each detected signature must be confirmed.\n"
+ "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"
+ "Zeroing simply overwrites the first 4 KiB of a new LV\n"
+ "with zeroes and does no signature detection or wiping.\n"
+ "Signature wiping goes beyond zeroing and detects exact\n"
+ "types and positions of signatures within the whole LV.\n"
+ "It provides a cleaner LV after creation as all known\n"
+ "signatures are wiped. The LV is not claimed incorrectly\n"
+ "by other tools because of old signatures from previous use.\n"
+ "The number of signatures that LVM can detect depends on the\n"
+ "detection code that is selected (see use_blkid_wiping.)\n"
+ "Wiping each detected signature must be confirmed.\n"
"The command line option -W/--wipesignatures takes precedence\n"
"over this setting.\n"
- "When disabled, signatures on newly-created Logical Volumes\n"
- "are never detected and wiped and you always need to use\n"
- "-W/--wipesignatures y option directly to enable this feature\n"
- "no matter whether zeroing is used or not.\n")
+ "When this setting is disabled, signatures on new LVs are\n"
+ "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),
"Guarantees that mirror logs will always be placed on\n"
@@ -413,28 +411,31 @@ cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadat
cfg(allocation_cache_pool_cachemode_CFG, "cache_pool_cachemode", allocation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_CACHE_POOL_CACHEMODE, vsn(2, 2, 113),
"The default cache mode used for new cache pools.\n"
"Possible options are: writethrough, writeback.\n"
- "writethrough - Data blocks are immediately written from the cache to disk.\n"
- "writeback - Data blocks are written from the cache back to disk after\n"
- "some delay to improve performance.\n")
+ "writethrough - Data blocks are immediately written from\n"
+ "the cache to disk.\n"
+ "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),
"The minimal chunk size (in kiB) for cache pool volumes.\n"
- "Using a chunk_size that is too large can result in wasteful use of\n"
- "the cache, where small reads and writes can cause large sections of\n"
- "an LV to be mapped into the cache. However, choosing a chunk_size\n"
- "that is too small can result in more overhead trying to manage the\n"
- "numerous chunks that become mapped into the cache. The former is\n"
- "more of a problem than the latter in most cases, so we default to\n"
- "a value that is on the smaller end of the spectrum. Supported values\n"
- "range from 32(kiB) to 1048576 in multiples of 32.\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"
+ "large sections of an LV to be mapped into the cache. However,\n"
+ "choosing a chunk_size that is too small can result in more\n"
+ "overhead trying to manage the numerous chunks that become mapped\n"
+ "into the cache. The former is more of a problem than the latter\n"
+ "in most cases, so we default to a value that is on the smaller\n"
+ "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),
"Guarantees that thin pool metadata will always\n"
"be placed on different PVs from the pool data.\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),
- "Enable/disable zeroing of thin pool data chunks before their first use.\n"
- "N.B. zeroing larger thin pool chunk size degrades performance.\n")
+ "Enable/disable zeroing of thin pool data chunks before\n"
+ "their first use. Zeroing larger thin pool chunk size\n"
+ "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),
"The discards behaviour of thin pool volumes.\n"
@@ -443,25 +444,26 @@ cfg(allocation_thin_pool_discards_CFG, "thin_pool_discards", allocation_CFG_SECT
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),
"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"
+ "generic - If thin_pool_chunk_size is defined, use it.\n"
"Otherwise, calculate the chunk size based on estimation and\n"
"device hints exposed in sysfs - the minimum_io_size.\n"
"The chunk size is always at least 64KiB.\n"
- "performance - if thin_pool_chunk_size is defined, use it.\n"
+ "performance - If thin_pool_chunk_size is defined, use it.\n"
"Otherwise, calculate the chunk size for performance based on\n"
"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),
"The minimal chunk size (in KB) for thin pool volumes.\n"
- "Use of the larger chunk size may improve performance for plain\n"
- "thin volumes, however using them for snapshot volumes is less efficient,\n"
- "as it consumes more space and takes extra time for copying.\n"
- "When unset, lvm tries to estimate chunk size starting from 64KB\n"
- "Supported values are in range from 64 to 1048576.\n")
+ "Larger chunk sizes may improve performance for plain\n"
+ "thin volumes, however using them for snapshot volumes\n"
+ "is less efficient, as it consumes more space and takes\n"
+ "extra time for copying. When unset, lvm tries to estimate\n"
+ "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),
- "Default physical extent size to use for newly created VGs (in KB).\n")
+ "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),
"Controls the messages sent to stdout or stderr.\n")
@@ -487,18 +489,22 @@ cfg(log_overwrite_CFG, "overwrite", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_O
"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),
- "The level of log messages that are sent to the log file and/or syslog.\n"
- "There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.\n"
+ "The level of log messages that are sent to the\n"
+ "log file and/or syslog. There are 6 syslog-like\n"
+ "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),
- "Format of output messages: indent messages according to their severity.\n")
+ "Format of output messages:\n"
+ "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),
- "Format of output messages: display the command name on each line output.\n")
+ "Format of output messages:\n"
+ "display the command name on each line output.\n")
cfg(log_prefix_CFG, "prefix", log_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_MSG_PREFIX, vsn(1, 0, 0),
- "Format of output messages: a prefix to use before the message text.\n"
+ "Format of output messages:\n"
+ "a prefix to use before the 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"
@@ -511,10 +517,11 @@ cfg(log_activation_CFG, "activation", log_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(
cfg(log_activate_file_CFG, "activate_file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), 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),
- "Some debugging messages are assigned to a class and only appear\n"
- "in debug output if the class is listed here.\n"
- "Classes currently available:\n"
- "memory, devices, activation, allocation, lvmetad, metadata, cache, locking.\n"
+ "Some debugging messages are assigned to a class\n"
+ "and only appear in debug output if the class is\n"
+ "listed here. Classes currently available:\n"
+ "memory, devices, activation, allocation,\n"
+ "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),
@@ -547,17 +554,18 @@ cfg(global_umask_CFG, "umask", global_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_UMAS
"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),
- "Enabling test mode means that no changes to the on disk metadata\n"
- "will be made. Equivalent to having the -t option on every command.\n")
+ "Enabling test mode means that no changes to the\n"
+ "on-disk metadata will be made. Equivalent to having\n"
+ "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),
"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),
- "The tools distinguish between powers of 1024 bytes\n"
- "(e.g. KiB, MiB, GiB) and powers of 1000 bytes (e.g. KB, MB, GB).\n"
- "If you have scripts that depend on the old behaviour, disable\n"
- "this setting temporarily until you update them.\n")
+ "The tools 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),
"Display unit suffix for sizes. This setting has no effect if the\n"
@@ -566,24 +574,28 @@ cfg(global_suffix_CFG, "suffix", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BO
cfg(global_activation_CFG, "activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION, vsn(1, 0, 0),
"Enable/disable communication with the kernel device-mapper.\n"
- "Disable if you want to use the tools to manipulate LVM metadata\n"
- "without activating any logical volumes.\n"
- "If the device-mapper kernel driver is not present in your kernel,\n"
- "disabling this should suppress the error messages.\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),
- "If we cannot communicate with device-mapper, try running the LVM1 tools.\n"
- "This option only applies to 2.4 kernels and is provided to help you\n"
- "switch between device-mapper kernels and LVM1 kernels.\n"
- "The LVM1 tools need to be installed with .lvm1 suffices\n"
- "e.g. vgscan.lvm1 and they will stop working after you start using\n"
- "the new lvm2 on-disk metadata format.\n")
+ "Try running the LVM1 tools if LVM cannot communicate with\n"
+ "device-mapper. This option only applies to 2.4 kernels and\n"
+ "is provided to help switch between device-mapper kernels and\n"
+ "LVM1 kernels.\n"
+ "The LVM1 tools need to be installed with .lvm1 suffices,\n"
+ "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),
- "The default metadata format that commands should use - \"lvm1\" or \"lvm2\".\n"
+ "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),
+ "A list of shared libraries to load that contain\n"
+ "code to process different formats of metadata.\n"
"If support for LVM1 metadata was compiled as a shared library use\n"
"format_libraries = \"liblvm2format1.so\"\n")
@@ -596,25 +608,25 @@ cfg(global_etc_CFG, "etc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ETC_D
"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),
- "Type of locking to use. Defaults to local file-based locking (1).\n"
- "Turn locking off by setting to 0 (dangerous: risks metadata corruption\n"
- "if LVM commands get run concurrently).\n"
- "Type 2 uses the external shared library locking_library.\n"
- "Type 3 uses built-in clustered locking.\n"
- "Type 4 uses read-only locking which forbids any operations that might\n"
- "change metadata.\n"
- "Type 5 offers dummy locking for tools that do not need any locks.\n"
- "You should not need to set this directly: the tools will select when\n"
- "to use it instead of the configured locking_type. Do not use lvmetad or\n"
- "the kernel device-mapper driver with this locking type.\n"
- "It is used by the --readonly option that offers read-only access to\n"
- "Volume Group metadata that cannot be locked safely because it belongs to\n"
- "an inaccessible domain and might be in use, for example a virtual machine\n"
- "image or a disk that is shared by a clustered machine.\n"
- "N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet\n"
- "supported in clustered environment. If use_lvmetad=1 and locking_type=3\n"
- "is set at the same time, LVM always issues a warning message about this\n"
- "and then it automatically disables lvmetad use.\n")
+ "Type of locking to use.\n"
+ "Type 0: turns off locking. Warning: this risks metadata\n"
+ "corruption if commands run concurrently.\n"
+ "Type 1: uses local file-based locking, the standard mode.\n"
+ "Type 2: uses the external shared library locking_library.\n"
+ "Type 3: uses built-in clustered locking with clvmd.\n"
+ "This is incompatible with lvmetad. If use_lvmetad is enabled,\n"
+ "lvm prints a warning and disables lvmetad use.\n"
+ "Type 4: uses read-only locking which forbids any operations\n"
+ "that might change metadata.\n"
+ "Type 5: offers dummy locking for tools that do not need any locks.\n"
+ "You should not need to set this directly; the tools will select\n"
+ "when to use it instead of the configured locking_type.\n"
+ "Do not use lvmetad or the kernel device-mapper driver with this\n"
+ "locking type. It is used by the --readonly option that offers\n"
+ "read-only access to Volume Group metadata that cannot be locked\n"
+ "safely because it belongs to an inaccessible domain and might be\n"
+ "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),
"When disabled, fail if a lock request cannot be satisfied immediately.\n")
@@ -667,25 +679,27 @@ cfg(global_metadata_read_only_CFG, "metadata_read_only", global_CFG_SECTION, 0,
"Inappropriate use could mess up your system, 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),
- "Defines which segtype will be used when the shorthand -m option\n"
+ "Defines which segtype is used when the short option -m\n"
"is used for mirroring.\n"
"Possible options are: mirror, raid1.\n"
- "mirror - The original RAID1 implementation provided by LVM/DM.\n"
- "It is characterized by a flexible log solution (core, disk, mirrored)\n"
- "and by the necessity to block I/O while reconfiguring in the\n"
- "event of a failure.\n"
- "There is an inherent race in the dmeventd failure handling\n"
- "logic with snapshots of devices using this type of RAID1 that\n"
- "in the worst case could cause a deadlock.\n"
- "raid1 - This implementation leverages MD's RAID1 personality through\n"
- "device-mapper. It is characterized by a lack of log options.\n"
- "(A log is always allocated for every device and they are placed\n"
- "on the same device as the image - no separate devices are\n"
- "required.) This mirror implementation does not require I/O\n"
- "to be blocked in the kernel in the event of a failure.\n"
- "This mirror implementation is not cluster-aware and cannot be\n"
- "used in a shared (active/active) fashion in a cluster.\n"
- "Use '--type <mirror|raid1>' to override this default setting.\n")
+ "mirror - the original RAID1 implementation from LVM/DM.\n"
+ "It is characterized by a flexible log solution (core,\n"
+ "disk, mirrored), and by the necessity to block I/O while\n"
+ "handling a failure.\n"
+ "There is an inherent race in the dmeventd failure\n"
+ "handling logic with snapshots of devices using this\n"
+ "type of RAID1 that in the worst case could cause a\n"
+ "deadlock. (Also see devices/ignore_lvm_mirrors.)\n"
+ "raid1 - a newer RAID1 implementation using the MD RAID1\n"
+ "personality through device-mapper. It is characterized\n"
+ "by a lack of log options. (A log is always allocated for\n"
+ "every device and they are placed on the same device as the\n"
+ "image - no separate devices are required.) This mirror\n"
+ "implementation does not require I/O to be blocked while\n"
+ "handling a failure. This mirror implementation is not\n"
+ "cluster-aware and cannot be used in a shared (active/active)\n"
+ "fashion in a cluster.\n"
+ "Use '--type mirror|raid1' to override this default 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),
"Determines the segment types used by default when\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2872e8c289a04e60…
Commit: 2872e8c289a04e60e59494b41336ae9e9eb6021e
Parent: 0523c718446a13472d9bec8bce61e7ec020d0179
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Apr 10 21:57:52 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Apr 10 21:57:52 2015 +0100
alloc: Add A_PARTITION_BY_TAGS to avoid sharing.
Add A_PARTITION_BY_TAGS set when allocated areas should not share tags
with each other and allow _match_pv_tags to accept an alternative list
of tags. (Not used yet.)
---
WHATS_NEW | 1 +
lib/metadata/lv_manip.c | 44 ++++++++++++++++++++++++++++++--------------
2 files changed, 31 insertions(+), 14 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 1870801..164fe5a 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.119 -
==================================
+ Add A_PARTITION_BY_TAGS set when allocated areas should not share tags.
Set correct vgid when updating cache when writing PV metadata.
More efficient clvmd singlenode locking emulation.
Don't skip invalidation of cached orphans if vg write lck is held (2.02.118).
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 11a46e1..ef69e0e 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -52,6 +52,7 @@ typedef enum {
#define A_AREA_COUNT_MATCHES 0x20 /* Existing lvseg has same number of areas as new segment */
#define A_POSITIONAL_FILL 0x40 /* Slots are positional and filled using PREFERRED */
+#define A_PARTITION_BY_TAGS 0x80 /* No allocated area may share any tag with any other */
/*
* Constant parameters during a single allocation attempt.
@@ -1629,6 +1630,11 @@ static void _init_alloc_parms(struct alloc_handle *ah,
if (alloc_parms->alloc == ALLOC_CLING_BY_TAGS)
alloc_parms->flags |= A_CLING_BY_TAGS;
+ if (!(alloc_parms->alloc & A_POSITIONAL_FILL) &&
+ (alloc_parms->alloc == ALLOC_CONTIGUOUS) &&
+ ah->cling_tag_list_cn)
+ alloc_parms->flags |= A_PARTITION_BY_TAGS;
+
/*
* For normal allocations, if any extents have already been found
* for allocation, prefer to place further extents on the same disks as
@@ -1975,18 +1981,18 @@ static int _is_same_pv(struct pv_match *pvmatch __attribute((unused)), struct pv
/*
* Does PV area have a tag listed in allocation/cling_tag_list that
- * matches a tag of the PV of the existing segment?
+ * matches EITHER a tag of the PV of the existing segment OR a tag in pv_tags?
* If tags_list_str is set, then instead we generate a list of matching tags for printing.
*/
static int _match_pv_tags(const struct dm_config_node *cling_tag_list_cn,
- struct physical_volume *pv1,
- struct physical_volume *pv2,
- unsigned validate_only,
+ struct physical_volume *pv1, uint32_t pv1_start_pe, uint32_t area_num,
+ struct physical_volume *pv2, struct dm_list *pv_tags, unsigned validate_only,
struct dm_pool *mem, const char **tags_list_str)
{
const struct dm_config_value *cv;
const char *str;
const char *tag_matched;
+ struct dm_list *tags_to_match = tags_list_str ? NULL : pv_tags ? : &pv2->tags;
struct dm_str_list *sl;
unsigned first_tag = 1;
@@ -2047,17 +2053,22 @@ static int _match_pv_tags(const struct dm_config_node *cling_tag_list_cn,
}
continue;
}
- if (!str_list_match_list(&pv1->tags, &pv2->tags, &tag_matched))
+ if (!str_list_match_list(&pv1->tags, tags_to_match, &tag_matched))
continue;
else {
- log_debug_alloc("Matched allocation PV tag %s on existing %s with free space on %s.",
- tag_matched, pv_dev_name(pv1), pv_dev_name(pv2));
+ if (!pv_tags)
+ log_debug_alloc("Matched allocation PV tag %s on existing %s with free space on %s.",
+ tag_matched, pv_dev_name(pv1), pv_dev_name(pv2));
+ else
+ log_debug_alloc("Eliminating allocation area %" PRIu32 " at PV %s start PE %" PRIu32
+ " from consideration: PV tag %s already used.",
+ area_num, pv_dev_name(pv1), pv1_start_pe, tag_matched);
return 1;
}
}
if (!str_list_match_item(&pv1->tags, str) ||
- (pv2 && !str_list_match_item(&pv2->tags, str)))
+ (tags_to_match && !str_list_match_item(tags_to_match, str)))
continue;
else {
if (tags_list_str) {
@@ -2074,8 +2085,13 @@ static int _match_pv_tags(const struct dm_config_node *cling_tag_list_cn,
}
continue;
}
- log_debug_alloc("Matched allocation PV tag %s on existing %s with free space on %s.",
- str, pv_dev_name(pv1), pv_dev_name(pv2));
+ if (!pv_tags)
+ log_debug_alloc("Matched allocation PV tag %s on existing %s with free space on %s.",
+ str, pv_dev_name(pv1), pv_dev_name(pv2));
+ else
+ log_debug_alloc("Eliminating allocation area %" PRIu32 " at PV %s start PE %" PRIu32
+ " from consideration: PV tag %s already used.",
+ area_num, pv_dev_name(pv1), pv1_start_pe, str);
return 1;
}
}
@@ -2095,14 +2111,14 @@ static int _match_pv_tags(const struct dm_config_node *cling_tag_list_cn,
static int _validate_tag_list(const struct dm_config_node *cling_tag_list_cn)
{
- return _match_pv_tags(cling_tag_list_cn, NULL, NULL, 1, NULL, NULL);
+ return _match_pv_tags(cling_tag_list_cn, NULL, 0, 0, NULL, NULL, 1, NULL, NULL);
}
static const char *_tags_list_str(struct alloc_handle *ah, struct physical_volume *pv1)
{
const char *tags_list_str;
- if (!_match_pv_tags(ah->cling_tag_list_cn, pv1, NULL, 0, ah->mem, &tags_list_str))
+ if (!_match_pv_tags(ah->cling_tag_list_cn, pv1, 0, 0, NULL, NULL, 0, ah->mem, &tags_list_str))
return_NULL;
return tags_list_str;
@@ -2115,7 +2131,7 @@ static const char *_tags_list_str(struct alloc_handle *ah, struct physical_volum
static int _pvs_have_matching_tag(const struct dm_config_node *cling_tag_list_cn,
struct physical_volume *pv1, struct physical_volume *pv2)
{
- return _match_pv_tags(cling_tag_list_cn, pv1, pv2, 0, NULL, NULL);
+ return _match_pv_tags(cling_tag_list_cn, pv1, 0, 0, pv2, NULL, 0, NULL, NULL);
}
static int _has_matching_pv_tag(struct pv_match *pvmatch, struct pv_segment *pvseg, struct pv_area *pva)
@@ -2673,7 +2689,7 @@ static int _find_some_parallel_space(struct alloc_handle *ah,
_comp_area);
}
- /* If there are gaps in our preferred areas, fill then from the sorted part of the array */
+ /* If there are gaps in our preferred areas, fill them from the sorted part of the array */
if (preferred_count && preferred_count != ix_offset) {
for (s = 0; s < devices_needed; s++)
if (!alloc_state->areas[s].pva) {
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=463fd954bb87a9a5…
Commit: 463fd954bb87a9a565169a134f2d36acb6c7adf3
Parent: 4eaa399b54fb3cd7d30fd919666723159d9a04b5
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Fri Apr 10 09:50:10 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Fri Apr 10 09:51:08 2015 +0200
config: add note about 'vsn' macro use in config_settings.h
---
lib/config/config_settings.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index b55b39b..63332d4 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -66,6 +66,8 @@
* 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.
*/
#include "defaults.h"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4eaa399b54fb3cd7…
Commit: 4eaa399b54fb3cd7d30fd919666723159d9a04b5
Parent: 303c5ba803cbfe81b1bc92cc2b2e9aa0970b21d2
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Apr 9 16:35:20 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Apr 9 16:35:20 2015 -0500
config: comments update
missing \n
---
lib/config/config_settings.h | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index d76ed0f..b55b39b 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -72,11 +72,11 @@
cfg_section(root_CFG_SECTION, "(root)", root_CFG_SECTION, 0, vsn(0, 0, 0), NULL)
cfg_section(config_CFG_SECTION, "config", root_CFG_SECTION, 0, vsn(2, 2, 99),
- "This section allows you to set the way the configuration settings are handled.")
+ "This section allows you to set the way the configuration settings are handled.\n")
cfg_section(devices_CFG_SECTION, "devices", root_CFG_SECTION, 0, vsn(1, 0, 0),
"This section allows you to configure which block devices should\n"
- "be used by the LVM system.")
+ "be used by the LVM system.\n")
cfg_section(allocation_CFG_SECTION, "allocation", root_CFG_SECTION, CFG_PROFILABLE, vsn(2, 2, 77),
"This section allows you to configure the way in which LVM selects\n"
@@ -115,17 +115,17 @@ cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2,
"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),
- "If enabled, any configuration mismatch aborts the LVM process.")
+ "If enabled, any configuration mismatch aborts the LVM process.\n")
cfg_runtime(config_profile_dir_CFG, "profile_dir", config_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(2, 2, 99),
- "Directory where LVM looks for configuration profiles.")
+ "Directory where LVM looks for configuration profiles.\n")
cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DEV_DIR, vsn(1, 0, 0),
"Where do you want your volume groups to appear ?")
cfg_array(devices_scan_CFG, "scan", devices_CFG_SECTION, 0, CFG_TYPE_STRING, "#S/dev", vsn(1, 0, 0),
"An array of directories that contain the device nodes you wish\n"
- "to use with LVM.")
+ "to use with LVM.\n")
cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 2, 0), NULL)
@@ -229,7 +229,7 @@ cfg_runtime(devices_cache_dir_CFG, "cache_dir", devices_CFG_SECTION, 0, CFG_TYPE
"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),
- "A prefix used before the .cache file name.")
+ "A prefix used before the .cache file name.\n")
cfg(devices_write_cache_state_CFG, "write_cache_state", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(1, 0, 0),
"Enable/disable writing the cache file.\n")
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=303c5ba803cbfe81…
Commit: 303c5ba803cbfe81b1bc92cc2b2e9aa0970b21d2
Parent: 6f3f421228754b1758f909eabcedfd30f4d9780a
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Apr 9 16:09:53 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Apr 9 16:09:53 2015 -0500
config: update description
Remove examples that simply replicate the default shown.
---
lib/config/config_settings.h | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 19ec279..d76ed0f 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -333,10 +333,7 @@ cfg(devices_pv_min_size_CFG, "pv_min_size", devices_CFG_SECTION, 0, CFG_TYPE_INT
"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.\n"
- "The original built-in setting was 512 up to and including version 2.02.84.\n"
- "Example:\n"
- "Ignore devices smaller than 2MB such as floppy drives:\n"
- "pv_min_size = 2048\n")
+ "The original built-in setting was 512 up to and including version 2.02.84.\n")
cfg(devices_issue_discards_CFG, "issue_discards", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ISSUE_DISCARDS, vsn(2, 2, 85),
"Issue discards to a logical volumes's underlying physical volume(s) when\n"
@@ -772,9 +769,7 @@ cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTIO
"option -q is for quiet output.\n"
"With thin_check version 2.1 or newer you can add --ignore-non-fatal-errors\n"
"to let it pass through ignorable errors and fix them later.\n"
- "With thin_check version 3.2 or newer you should add --clear-needs-check-flag.\n"
- "Example:\n"
- "thin_check_options = [ \"-q\", \"--clear-needs-check-flag\" ]\n")
+ "With thin_check version 3.2 or newer you should add --clear-needs-check-flag.\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),
"The specified features are not used by thin driver.\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6f3f421228754b17…
Commit: 6f3f421228754b1758f909eabcedfd30f4d9780a
Parent: a9d48bae2f942f29746f95ec35609e36ead6cea2
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Apr 9 15:26:21 2015 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Apr 9 15:35:28 2015 -0500
config: include full comments
Comments from the sample config files are copied into
the comment field of the config settings structure.
This includes only minimal changes to the text.
With this in place, the sample config files can
be generated from 'lvm dumpconfig', and content
for an lvm.conf man page can also be generated.
---
lib/config/config.c | 40 ++-
lib/config/config_settings.h | 1412 ++++++++++++++++++++++++++++++++++++------
2 files changed, 1264 insertions(+), 188 deletions(-)
diff --git a/lib/config/config.c b/lib/config/config.c
index 58eab51..b28472b 100644
--- a/lib/config/config.c
+++ b/lib/config/config.c
@@ -1488,6 +1488,36 @@ struct out_baton {
struct dm_pool *mem;
};
+#define MAX_COMMENT_LINE 512
+
+static int _copy_one_line(const char *comment, char *line, int *pos, int len)
+{
+ int p;
+ int i = 0;
+ char c;
+
+ if (*pos >= len)
+ return 0;
+
+ memset(line, 0, MAX_COMMENT_LINE+1);
+
+ for (p = *pos; ; p++) {
+ c = comment[p];
+
+ (*pos)++;
+
+ if (c == '\n' || c == '\0')
+ break;
+
+ line[i++] = c;
+
+ if (i == MAX_COMMENT_LINE)
+ break;
+ }
+
+ return i;
+}
+
static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, void *baton)
{
struct out_baton *out = baton;
@@ -1495,7 +1525,7 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi
char version[9]; /* 8+1 chars for max version of 7.15.511 */
const char *node_type_name = cn->v ? "option" : "section";
char path[CFG_PATH_MAX_LEN];
-
+ char commentline[MAX_COMMENT_LINE+1];
if (cn->id < 0)
return 1;
@@ -1513,10 +1543,14 @@ static int _out_prefix_fn(const struct dm_config_node *cn, const char *line, voi
if (out->tree_spec->withcomments) {
_cfg_def_make_path(path, sizeof(path), cfg_def->id, cfg_def, 1);
+ fprintf(out->fp, "\n");
fprintf(out->fp, "%s# Configuration %s %s.\n", line, node_type_name, path);
- if (cfg_def->comment)
- fprintf(out->fp, "%s# %s\n", line, cfg_def->comment);
+ if (cfg_def->comment) {
+ int pos = 0;
+ while (_copy_one_line(cfg_def->comment, commentline, &pos, strlen(cfg_def->comment)))
+ fprintf(out->fp, "%s# %s\n", line, commentline);
+ }
if (cfg_def->flags & CFG_ADVANCED)
fprintf(out->fp, "%s# This configuration %s is advanced.\n", line, node_type_name);
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index ef78182..19ec279 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -71,13 +71,33 @@
cfg_section(root_CFG_SECTION, "(root)", root_CFG_SECTION, 0, vsn(0, 0, 0), NULL)
-cfg_section(config_CFG_SECTION, "config", root_CFG_SECTION, 0, vsn(2, 2, 99), "Configuration handling.")
-cfg_section(devices_CFG_SECTION, "devices", root_CFG_SECTION, 0, vsn(1, 0, 0), NULL)
-cfg_section(allocation_CFG_SECTION, "allocation", root_CFG_SECTION, CFG_PROFILABLE, vsn(2, 2, 77), NULL)
-cfg_section(log_CFG_SECTION, "log", root_CFG_SECTION, 0, vsn(1, 0, 0), NULL)
-cfg_section(backup_CFG_SECTION, "backup", root_CFG_SECTION, 0, vsn(1, 0, 0), NULL)
-cfg_section(shell_CFG_SECTION, "shell", root_CFG_SECTION, 0, vsn(1, 0, 0), NULL)
-cfg_section(global_CFG_SECTION, "global", root_CFG_SECTION, CFG_PROFILABLE, vsn(1, 0, 0), NULL)
+cfg_section(config_CFG_SECTION, "config", root_CFG_SECTION, 0, vsn(2, 2, 99),
+ "This section allows you to set the way the configuration settings are handled.")
+
+cfg_section(devices_CFG_SECTION, "devices", root_CFG_SECTION, 0, vsn(1, 0, 0),
+ "This section allows you to configure which block devices should\n"
+ "be used by the LVM system.")
+
+cfg_section(allocation_CFG_SECTION, "allocation", root_CFG_SECTION, CFG_PROFILABLE, vsn(2, 2, 77),
+ "This section allows you to configure the way in which LVM selects\n"
+ "free space for its Logical Volumes.\n")
+
+cfg_section(log_CFG_SECTION, "log", root_CFG_SECTION, 0, vsn(1, 0, 0),
+ "This section that allows you to configure the nature of the\n"
+ "information that LVM reports.\n")
+
+cfg_section(backup_CFG_SECTION, "backup", root_CFG_SECTION, 0, vsn(1, 0, 0),
+ "Configuration of metadata backups and archiving. In LVM when we\n"
+ "talk about a 'backup' we mean making a copy of the metadata for the\n"
+ "*current* system. The 'archive' contains old metadata configurations.\n"
+ "Backups are stored in a human readable text format.\n")
+
+cfg_section(shell_CFG_SECTION, "shell", root_CFG_SECTION, 0, vsn(1, 0, 0),
+ "Settings for the running LVM in shell (readline) mode.\n")
+
+cfg_section(global_CFG_SECTION, "global", root_CFG_SECTION, CFG_PROFILABLE, vsn(1, 0, 0),
+ "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, CFG_ADVANCED, vsn(1, 0, 0), NULL)
cfg_section(report_CFG_SECTION, "report", root_CFG_SECTION, CFG_ADVANCED | CFG_PROFILABLE, vsn(1, 0, 0), NULL)
@@ -85,156 +105,1060 @@ cfg_section(dmeventd_CFG_SECTION, "dmeventd", root_CFG_SECTION, 0, vsn(1, 2, 3),
cfg_section(tags_CFG_SECTION, "tags", root_CFG_SECTION, 0, vsn(1, 0, 18), NULL)
cfg_section(local_CFG_SECTION, "local", root_CFG_SECTION, 0, vsn(2, 2, 117), NULL)
-cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 99), "Configuration tree check on each LVM command execution.")
-cfg(config_abort_on_errors_CFG, "abort_on_errors", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2,2,99), "Abort LVM command execution if configuration is invalid.")
-cfg_runtime(config_profile_dir_CFG, "profile_dir", config_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(2, 2, 99), "Directory with configuration profiles.")
+
+cfg(config_checks_CFG, "checks", config_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 99),
+ "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 of a proper type.\n"
+ "If disabled, any configuration mismatch is ignored and default\n"
+ "value is used instead 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),
+ "If enabled, any configuration mismatch aborts the LVM process.")
+
+cfg_runtime(config_profile_dir_CFG, "profile_dir", config_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(2, 2, 99),
+ "Directory where LVM looks for configuration profiles.")
+
+cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DEV_DIR, vsn(1, 0, 0),
+ "Where do you want your volume groups to appear ?")
+
+cfg_array(devices_scan_CFG, "scan", devices_CFG_SECTION, 0, CFG_TYPE_STRING, "#S/dev", vsn(1, 0, 0),
+ "An array of directories that contain the device nodes you wish\n"
+ "to use with LVM.")
-cfg(devices_dir_CFG, "dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DEV_DIR, vsn(1, 0, 0), NULL)
-cfg_array(devices_scan_CFG, "scan", devices_CFG_SECTION, 0, CFG_TYPE_STRING, "#S/dev", vsn(1, 0, 0), NULL)
cfg_array(devices_loopfiles_CFG, "loopfiles", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 2, 0), 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_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_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_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL)
-cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 98), NULL)
-cfg_runtime(devices_cache_CFG, "cache", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0), NULL)
-cfg_runtime(devices_cache_dir_CFG, "cache_dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, 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)
-cfg(devices_write_cache_state_CFG, "write_cache_state", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(1, 0, 0), NULL)
-cfg_array(devices_types_CFG, "types", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT | CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL)
-cfg(devices_sysfs_scan_CFG, "sysfs_scan", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSFS_SCAN, vsn(1, 0, 8), 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)
-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_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_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_default_data_alignment_CFG, "default_data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_DATA_ALIGNMENT, vsn(2, 2, 75), 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)
-cfg(devices_data_alignment_CFG, "data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(2, 2, 45), 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)
-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_lvm_mirrors_CFG, "ignore_lvm_mirrors", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_IGNORE_LVM_MIRRORS, vsn(2, 2, 104), 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)
-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_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_issue_discards_CFG, "issue_discards", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ISSUE_DISCARDS, vsn(2, 2, 85), 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)
-cfg(allocation_maximise_cling_CFG, "maximise_cling", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MAXIMISE_CLING, vsn(2, 2, 85), NULL)
-cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", 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)
-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_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_cachemode_CFG, "cache_pool_cachemode", allocation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_CACHE_POOL_CACHEMODE, vsn(2, 2, 113), NULL)
-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), 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)
-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_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_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_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), 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)
-
-cfg(log_verbose_CFG, "verbose", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_VERBOSE, vsn(1, 0, 0), NULL)
-cfg(log_silent_CFG, "silent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SILENT, vsn(2, 2, 98), NULL)
-cfg(log_syslog_CFG, "syslog", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SYSLOG, 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)
-cfg(log_overwrite_CFG, "overwrite", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_OVERWRITE, vsn(1, 0, 0), NULL)
-cfg(log_level_CFG, "level", log_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_LOGLEVEL, vsn(1, 0, 0), NULL)
-cfg(log_indent_CFG, "indent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_INDENT, 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)
-cfg(log_prefix_CFG, "prefix", log_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_MSG_PREFIX, vsn(1, 0, 0), NULL)
-cfg(log_activation_CFG, "activation", log_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(1, 0, 0), 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),
+ "If set, the cache of block device nodes with all associated symlinks\n"
+ "will be constructed out of the existing udev database content.\n"
+ "This avoids using and opening any inapplicable non-block devices or\n"
+ "subdirectories found in the device directory. This setting is applied\n"
+ "to udev-managed device directory only, other directories will be scanned\n"
+ "fully. LVM needs to be compiled with udev support for this setting to\n"
+ "take effect. N.B. Any device node or symlink not managed by udev in\n"
+ "udev directory will be ignored with this setting on.\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),
+ "Select external device information source to use for further and more\n"
+ "detailed device determination. Some information may already be available\n"
+ "in the system and LVM can use this information to determine the exact\n"
+ "type or use of the device it processes. Using existing external device\n"
+ "information source can speed up device processing as LVM does not need\n"
+ "to run its own native routines to acquire this information. For example,\n"
+ "such information is used to drive LVM filtering like MD component\n"
+ "detection, multipath component detection, partition detection and others.\n"
+ "Possible options are: none, udev.\n"
+ "none - No external device information source is used.\n"
+ "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),
+ "If several entries in the scanned directories correspond to the\n"
+ "same block device and the tools need to display a name for device,\n"
+ "all the pathnames are matched against each item in the following\n"
+ "list of regular expressions in turn and the first match is used.\n"
+ "Try to avoid using undescriptive /dev/dm-N names, if present.\n"
+ "In case no prefererred name matches or if preferred_names are not\n"
+ "defined at all, builtin rules are used to determine the preference.\n"
+ "The first builtin rule checks path prefixes and it gives preference\n"
+ "based on this ordering (where /dev depends on devices/dev setting):\n"
+ "/dev/mapper > /dev/disk > /dev/dm-* > /dev/block\n"
+ "If the ordering above cannot be applied, the path with fewer slashes\n"
+ "gets preference then.\n"
+ "If the number of slashes is the same, a symlink gets preference.\n"
+ "Finally, if all the rules mentioned above are not applicable,\n"
+ "lexicographical order is used over paths and the smallest one\n"
+ "of all gets preference.\n"
+ "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),
+ "A filter that tells LVM to only use a restricted set of devices.\n"
+ "The filter consists of an array of regular expressions. These\n"
+ "expressions can be delimited by a character of your choice, and\n"
+ "prefixed with either an 'a' (for accept) or 'r' (for reject).\n"
+ "The first expression found to match a device name determines if\n"
+ "the device will be accepted or rejected (ignored). Devices that\n"
+ "don't match any patterns are accepted.\n"
+ "Be careful if there there are symbolic links or multiple filesystem\n"
+ "entries for the same device as each name is checked separately against\n"
+ "the list of patterns. The effect is that if the first pattern in the\n"
+ "list to match a name is an 'a' pattern for any of the names, the device\n"
+ "is accepted; otherwise if the first pattern in the list to match a name\n"
+ "is an 'r' pattern for any of the names it is rejected; otherwise it is\n"
+ "accepted.\n"
+ "Don't have more than one filter line active at once: only one gets used.\n"
+ "Run vgscan after you change this parameter to ensure that\n"
+ "the cache file gets regenerated (see below).\n"
+ "If it doesn't do what you expect, check the output of 'vgscan -vvvv'.\n"
+ "If lvmetad is used, then see \"A note about device filtering while\n"
+ "lvmetad is used\" comment that is attached to global/use_lvmetad setting.\n"
+ "Examples:\n"
+ "By default we accept every block device:\n"
+ "filter = [ \"a/.*/\" ]\n"
+ "Exclude the cdrom drive:\n"
+ "filter = [ \"r|/dev/cdrom|\" ]\n"
+ "When testing I like to work with just loopback devices:\n"
+ "filter = [ \"a/loop/\", \"r/.*/\" ]\n"
+ "Or maybe all loops and ide drives except hdc:\n"
+ "filter =[ \"a|loop|\", \"r|/dev/hdc|\", \"a|/dev/ide|\", \"r|.*|\" ]\n"
+ "Use anchors if you want to be really 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),
+ "Since filter is often overridden from command line, it is not suitable\n"
+ "for system-wide device filtering (udev rules, lvmetad). To hide devices\n"
+ "from LVM-specific udev processing and/or from lvmetad, you need to set\n"
+ "global_filter. The syntax is the same as for normal filter\n"
+ "above. Devices that fail the global_filter are not even opened by LVM.\n")
+
+cfg_runtime(devices_cache_CFG, "cache", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 0, 0),
+ "This setting has been replaced by the cache_dir setting.\n")
+
+cfg_runtime(devices_cache_dir_CFG, "cache_dir", devices_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(1, 2, 19),
+ "The results of the filtering are cached on disk to avoid\n"
+ "rescanning dud devices (which can take a very long time).\n"
+ "By default this cache is stored in a file named .cache\n"
+ "in the directory specified by this setting.\n"
+ "It is safe to delete the contents: the tools regenerate it.\n"
+ "(The old setting 'cache' is still respected if neither of\n"
+ "these new ones is present.)\n"
+ "N.B. If obtain_device_list_from_udev is set to 1 the list of\n"
+ "devices is instead obtained from udev and any existing .cache\n"
+ "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),
+ "A prefix used before the .cache file name.")
+
+cfg(devices_write_cache_state_CFG, "write_cache_state", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(1, 0, 0),
+ "Enable/disable writing the cache file.\n")
+
+cfg_array(devices_types_CFG, "types", devices_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT | CFG_TYPE_STRING, NULL, vsn(1, 0, 0),
+ "List of pairs of additional acceptable block device types found\n"
+ "in /proc/devices with maximum (non-zero) 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),
+ "If sysfs is mounted (2.6 kernels) restrict device scanning to\n"
+ "the block devices it believes are valid.\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),
+ "Ignore devices used as component paths of device-mapper 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),
+ "Ignore devices used as components of software RAID (md) devices by looking\n"
+ "for md superblocks.\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),
+ "Ignore devices used as components of firmware RAID devices.\n"
+ "N.B. LVM itself is not detecting firmware RAID - an\n"
+ "external_device_info_source other than none must be used for\n"
+ "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),
+ "If a PV is placed directly upon an md device, align its data blocks\n"
+ "with the md device's stripe-width.\n")
+
+cfg(devices_default_data_alignment_CFG, "default_data_alignment", devices_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_DATA_ALIGNMENT, vsn(2, 2, 75),
+ "Default alignment of the start of a data area in MB. If set to 0,\n"
+ "a value of 64KB will be used. 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),
+ "The start of a PV's data area will be a multiple of the minimum_io_size\n"
+ "or optimal_io_size exposed in sysfs.\n"
+ "minimum_io_size - the smallest request the device can perform\n"
+ "without incurring a read-modify-write penalty (e.g. MD's chunk size)\n"
+ "optimal_io_size - the device's preferred unit of receiving I/O\n"
+ "(e.g. MD's stripe width)\n"
+ "minimum_io_size is used if optimal_io_size is undefined (0).\n"
+ "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),
+ "Alignment (in KB) of start of data area when creating a new PV.\n"
+ "md_chunk_alignment and data_alignment_detection are disabled if set.\n"
+ "Set to 0 for the default alignment (see: data_alignment_default)\n"
+ "or 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),
+ "The start of the PV's aligned data area will be shifted by\n"
+ "the alignment_offset exposed in sysfs. This offset is often 0 but\n"
+ "may be non-zero; e.g.: certain 4KB sector drives that compensate for\n"
+ "windows partitioning will have an alignment_offset of 3584 bytes\n"
+ "(sector 7 is the lowest aligned logical block, the 4KB sectors start\n"
+ "at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).\n"
+ "But note that 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),
+ "While scanning the system for PVs, skip a device-mapper device\n"
+ "that has its I/O suspended. Otherwise, LVM waits for the device\n"
+ "to become accessible. 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),
+ "This setting determines whether logical volumes of 'mirror' segment\n"
+ "type are scanned for LVM labels. This affects the ability of\n"
+ "mirrors to be used as physical volumes. If ignore_lvm_mirrors\n"
+ "is enabled, it becomes impossible to create volume groups on top\n"
+ "of mirror logical volumes - i.e. to stack volume groups on mirrors.\n"
+ "Allowing mirror logical volumes to be scanned (ignore_lvm_mirrors is\n"
+ "disabled) can potentially cause LVM processes and I/O to the mirror to\n"
+ "become blocked. This is due to the way that the 'mirror' segment type\n"
+ "handles failures. In order for the hang to manifest itself, an LVM\n"
+ "command must be run just after a failure and before the automatic LVM\n"
+ "repair process takes place OR there must be failures in multiple mirrors\n"
+ "in the same volume group at the same time with write failures occurring\n"
+ "moments before a scan of the mirror's labels.\n"
+ "Note that these scanning limitations do not apply to the LVM RAID\n"
+ "types, like 'raid1'. The RAID segment types handle failures in a\n"
+ "different way and are not subject to possible process or I/O blocking.\n"
+ "It is encouraged that users enable ignore_lvm_mirrors if they are using\n"
+ "the 'mirror' segment type. Users that require volume group stacking on\n"
+ "mirrored logical volumes should consider using the 'raid1' segment type.\n"
+ "The 'raid1' segment type is not available for active/active clustered\n"
+ "volume groups. Enable ignore_lvm_mirrors to disallow stacking and\n"
+ "thereby avoid a possible deadlock.\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),
+ "During each LVM operation errors received from each device are counted.\n"
+ "If the counter of a particular device exceeds the limit set here, no\n"
+ "further I/O is sent to that device for the remainder of the respective\n"
+ "operation. Setting the parameter 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),
+ "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),
+ "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.\n"
+ "The original built-in setting was 512 up to and including version 2.02.84.\n"
+ "Example:\n"
+ "Ignore devices smaller than 2MB such as floppy drives:\n"
+ "pv_min_size = 2048\n")
+
+cfg(devices_issue_discards_CFG, "issue_discards", devices_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ISSUE_DISCARDS, vsn(2, 2, 85),
+ "Issue discards to a logical volumes's underlying physical volume(s) when\n"
+ "the logical volume is no longer using the physical volumes' space (e.g.\n"
+ "lvremove, lvreduce, etc). Discards inform the storage that a region is\n"
+ "no longer in use. Storage that supports discards advertise the protocol\n"
+ "specific way discards should be issued by the kernel (TRIM, UNMAP, or\n"
+ "WRITE SAME with UNMAP bit set). Not all storage will support or benefit\n"
+ "from discards but SSDs and thinly provisioned LUNs generally do. If enabled,\n"
+ "discards 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),
+ "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"
+ "segment of the existing LV. If there is insufficient space and a\n"
+ "list of tags is defined here, it will check whether any of them are\n"
+ "attached to the PVs concerned and then seek to match those PV tags\n"
+ "between existing extents and new extents.\n"
+ "Example:\n"
+ "Use the special tag \"@*\" as a wildcard to match any PV tag.\n"
+ "cling_tag_list = [ \"@*\" ]\n"
+ "Example:\n"
+ "LVs are mirrored between two sites within a single VG.\n"
+ "PVs are tagged with either @site1 or @site2 to indicate where\n"
+ "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),
+ "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),
+ "Enable use of the blkid library instead of native LVM code to detect\n"
+ "any existing signatures while creating new Physical Volumes and\n"
+ "Logical Volumes. LVM needs to be compiled with blkid wiping support\n"
+ "for this setting to take effect.\n"
+ "LVM native detection code is currently able to recognize:\n"
+ "MD device signatures, swap signature, and LUKS signatures.\n"
+ "To see the list of signatures recognized by blkid, check the output\n"
+ "of 'blkid -k' command. The blkid can recognize more signatures than\n"
+ "LVM native detection code, but due to this higher number of signatures\n"
+ "to be recognized, it can take more time to complete the signature scan.\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),
+ "Look for any signatures on a newly-created Logical Volume\n"
+ "whenever zeroing of the LV is done (zeroing is controlled by -Z/--zero\n"
+ "option and if not specified, zeroing is used by default if possible).\n"
+ "While zeroing simply overwrites first 4 KiB of the LV with zeroes without\n"
+ "doing any signature detection, signature wiping goes beyond that and it\n"
+ "can detect exact type and position of signature within the whole LV.\n"
+ "As such, it provides cleaner LV for use after creation as all known\n"
+ "signatures are wiped so that the LV is not claimed by other tools\n"
+ "incorrectly by the existence of old signature from any previous use.\n"
+ "The number of signatures that LVM can detect depends on detection\n"
+ "code that is selected - see also use_blkid_wiping option.\n"
+ "Wiping of each detected signature must be confirmed.\n"
+ "The command line option -W/--wipesignatures takes precedence\n"
+ "over this setting.\n"
+ "When disabled, signatures on newly-created Logical Volumes\n"
+ "are never detected and wiped and you always need to use\n"
+ "-W/--wipesignatures y option directly to enable this feature\n"
+ "no matter whether zeroing is used or not.\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),
+ "Guarantees that mirror logs will always be placed on\n"
+ "different PVs from the mirror images.\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),
+ "Guarantees that cache_pool metadata will always be\n"
+ "placed on different PVs from the cache_pool data.\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),
+ "The default cache mode used for new cache pools.\n"
+ "Possible options are: writethrough, writeback.\n"
+ "writethrough - Data blocks are immediately written from the cache to disk.\n"
+ "writeback - Data blocks are written from the cache back to disk after\n"
+ "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),
+ "The minimal chunk size (in kiB) for cache pool volumes.\n"
+ "Using a chunk_size that is too large can result in wasteful use of\n"
+ "the cache, where small reads and writes can cause large sections of\n"
+ "an LV to be mapped into the cache. However, choosing a chunk_size\n"
+ "that is too small can result in more overhead trying to manage the\n"
+ "numerous chunks that become mapped into the cache. The former is\n"
+ "more of a problem than the latter in most cases, so we default to\n"
+ "a value that is on the smaller end of the spectrum. Supported values\n"
+ "range from 32(kiB) to 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),
+ "Guarantees that thin pool metadata will always\n"
+ "be placed on different PVs from the pool data.\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),
+ "Enable/disable zeroing of thin pool data chunks before their first use.\n"
+ "N.B. zeroing larger thin pool chunk size degrades 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),
+ "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),
+ "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"
+ "Otherwise, calculate the chunk size based on estimation and\n"
+ "device hints exposed in sysfs - the minimum_io_size.\n"
+ "The chunk size is always at least 64KiB.\n"
+ "performance - if thin_pool_chunk_size is defined, use it.\n"
+ "Otherwise, calculate the chunk size for performance based on\n"
+ "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),
+ "The minimal chunk size (in KB) for thin pool volumes.\n"
+ "Use of the larger chunk size may improve performance for plain\n"
+ "thin volumes, however using them for snapshot volumes is less efficient,\n"
+ "as it consumes more space and takes extra time for copying.\n"
+ "When unset, lvm tries to estimate chunk size starting from 64KB\n"
+ "Supported values are in range from 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),
+ "Default physical extent size to use for newly created VGs (in KB).\n")
+
+cfg(log_verbose_CFG, "verbose", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_VERBOSE, vsn(1, 0, 0),
+ "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),
+ "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"
+ "dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay,\n"
+ "pvs, version, vgcfgrestore -l, vgdisplay, vgs.\n"
+ "Non-essential messages are shifted from log level 4 to log level 5\n"
+ "for syslog and lvm2_log_fn purposes.\n"
+ "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),
+ "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),
+ "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),
+ "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),
+ "The level of log messages that are sent to the log file and/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),
+ "Format of output messages: 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),
+ "Format of output messages: display the command name on each line output.\n")
+
+cfg(log_prefix_CFG, "prefix", log_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, DEFAULT_MSG_PREFIX, vsn(1, 0, 0),
+ "Format of output messages: a prefix to use before the 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),
+ "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_TYPE_STRING, NULL, vsn(1, 0, 0), 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(backup_backup_CFG, "backup", backup_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_BACKUP_ENABLED, vsn(1, 0, 0), NULL)
-cfg_runtime(backup_backup_dir_CFG, "backup_dir", backup_CFG_SECTION, 0, CFG_TYPE_STRING, 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)
-cfg_runtime(backup_archive_dir_CFG, "archive_dir", backup_CFG_SECTION, 0, CFG_TYPE_STRING, 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)
-cfg(backup_retain_days_CFG, "retain_days", backup_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_ARCHIVE_DAYS, 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)
-
-cfg(global_umask_CFG, "umask", global_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_UMASK, vsn(1, 0, 0), NULL)
-cfg(global_test_CFG, "test", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, 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)
-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_activation_CFG, "activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION, 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)
-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_format_CFG, "format", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_FORMAT, 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)
+
+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),
+ "Some debugging messages are assigned to a class and only appear\n"
+ "in debug output if the class is listed here.\n"
+ "Classes currently available:\n"
+ "memory, devices, activation, allocation, 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),
+ "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),
+ "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),
+ "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),
+ "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),
+ "The minimum number of archive files you wish to keep.\n")
+
+cfg(backup_retain_days_CFG, "retain_days", backup_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_ARCHIVE_DAYS, vsn(1, 0, 0),
+ "The minimum time you wish to keep an archive file.\n")
+
+cfg(shell_history_size_CFG, "history_size", shell_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_MAX_HISTORY, vsn(1, 0, 0),
+ "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),
+ "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),
+ "Enabling test mode means that no changes to the on disk metadata\n"
+ "will be made. 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),
+ "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),
+ "The tools distinguish between powers of 1024 bytes\n"
+ "(e.g. KiB, MiB, GiB) and powers of 1000 bytes (e.g. KB, MB, GB).\n"
+ "If you have scripts that depend on the old behaviour, disable\n"
+ "this setting temporarily until you update them.\n")
+
+cfg(global_suffix_CFG, "suffix", global_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_SUFFIX, vsn(1, 0, 0),
+ "Display unit suffix for sizes. This setting has no effect if the\n"
+ "units are in human-readable form (global/units=\"h\") in which case\n"
+ "the suffix is always displayed.\n")
+
+cfg(global_activation_CFG, "activation", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION, vsn(1, 0, 0),
+ "Enable/disable communication with the kernel device-mapper.\n"
+ "Disable if you want to use the tools to manipulate LVM metadata\n"
+ "without activating any logical volumes.\n"
+ "If the device-mapper kernel driver is not present in your kernel,\n"
+ "disabling this should suppress 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),
+ "If we cannot communicate with device-mapper, try running the LVM1 tools.\n"
+ "This option only applies to 2.4 kernels and is provided to help you\n"
+ "switch between device-mapper kernels and LVM1 kernels.\n"
+ "The LVM1 tools need to be installed with .lvm1 suffices\n"
+ "e.g. vgscan.lvm1 and they will stop working after you start using\n"
+ "the new lvm2 on-disk metadata format.\n")
+
+cfg(global_format_CFG, "format", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_FORMAT, vsn(1, 0, 0),
+ "The default metadata format that commands should use - \"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),
+ "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)
-cfg(global_proc_CFG, "proc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_PROC_DIR, vsn(1, 0, 0), NULL)
-cfg(global_etc_CFG, "etc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ETC_DIR, vsn(2, 2, 117), NULL)
-cfg(global_locking_type_CFG, "locking_type", global_CFG_SECTION, 0, CFG_TYPE_INT, 1, vsn(1, 0, 0), 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)
-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_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_locking_dir_CFG, "locking_dir", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_LOCK_DIR, vsn(1, 0, 0), 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)
-cfg(global_library_dir_CFG, "library_dir", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, 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)
-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_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_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_mirror_segtype_default_CFG, "mirror_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_MIRROR_SEGTYPE, vsn(2, 2, 87), NULL)
-cfg(global_raid10_segtype_default_CFG, "raid10_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_RAID10_SEGTYPE, vsn(2, 2, 99), NULL)
-cfg(global_sparse_segtype_default_CFG, "sparse_segtype_default", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_SPARSE_SEGTYPE, vsn(2, 2, 112), 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)
-cfg(global_use_lvmetad_CFG, "use_lvmetad", global_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(2, 2, 93), NULL)
-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), NULL)
-cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_THIN_CHECK_OPTIONS, vsn(2, 2, 96), NULL)
-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)
-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), NULL)
-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), NULL)
-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(global_cache_check_executable_CFG, "cache_check_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_CHECK_CMD, 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_OPTIONS, vsn(2, 2, 108), NULL)
-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), NULL)
-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), NULL)
-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(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_file_CFG, "system_id_file", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117), NULL)
-
-cfg(activation_checks_CFG, "checks", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION_CHECKS, vsn(2, 2, 86), NULL)
-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_rules_CFG, "udev_rules", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_UDEV_RULES, vsn(2, 2, 57), 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)
-cfg(activation_retry_deactivation_CFG, "retry_deactivation", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_RETRY_DEACTIVATION, vsn(2, 2, 89), NULL)
-cfg(activation_missing_stripe_filler_CFG, "missing_stripe_filler", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_STRIPE_FILLER, vsn(1, 0, 0), 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)
-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_memory_CFG, "reserved_memory", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_MEMORY, 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)
-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_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_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(global_proc_CFG, "proc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_PROC_DIR, vsn(1, 0, 0),
+ "Location of proc filesystem.\n")
+
+cfg(global_etc_CFG, "etc", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ETC_DIR, vsn(2, 2, 117),
+ "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),
+ "Type of locking to use. Defaults to local file-based locking (1).\n"
+ "Turn locking off by setting to 0 (dangerous: risks metadata corruption\n"
+ "if LVM commands get run concurrently).\n"
+ "Type 2 uses the external shared library locking_library.\n"
+ "Type 3 uses built-in clustered locking.\n"
+ "Type 4 uses read-only locking which forbids any operations that might\n"
+ "change metadata.\n"
+ "Type 5 offers dummy locking for tools that do not need any locks.\n"
+ "You should not need to set this directly: the tools will select when\n"
+ "to use it instead of the configured locking_type. Do not use lvmetad or\n"
+ "the kernel device-mapper driver with this locking type.\n"
+ "It is used by the --readonly option that offers read-only access to\n"
+ "Volume Group metadata that cannot be locked safely because it belongs to\n"
+ "an inaccessible domain and might be in use, for example a virtual machine\n"
+ "image or a disk that is shared by a clustered machine.\n"
+ "N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet\n"
+ "supported in clustered environment. If use_lvmetad=1 and locking_type=3\n"
+ "is set at the same time, LVM always issues a warning message about this\n"
+ "and then it automatically disables lvmetad use.\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),
+ "When disabled, fail if a lock request cannot be satisfied immediately.\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),
+ "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),
+ "If an attempt to initialise type 2 or type 3 locking failed, perhaps\n"
+ "because cluster components such as clvmd are not running, with this\n"
+ "enabled, an attempt will be made to use local file-based locking (type 1).\n"
+ "If this succeeds, only 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),
+ "Local non-LV directory that holds file-based locks while commands are\n"
+ "in progress. A directory like /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),
+ "Whenever there are competing read-only and read-write access requests for\n"
+ "a volume group's metadata, instead of always granting the read-only\n"
+ "requests immediately, delay them to allow the read-write requests to be\n"
+ "serviced. Without this setting, write access may be stalled by a high\n"
+ "volume of read-only requests.\n"
+ "NB. This option only affects locking_type = 1 viz. 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),
+ "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),
+ "The external locking library to load if locking_type is set to 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),
+ "Treat any internal errors as fatal errors, aborting the process that\n"
+ "encountered the internal error. 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),
+ "Check whether CRC is matching when parsed VG is used multiple times.\n"
+ "This is useful to catch unexpected internal cached volume group\n"
+ "structure modification. 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),
+ "If enabled, no operations that change on-disk metadata will be permitted.\n"
+ "Additionally, read-only commands that encounter metadata in need of repair\n"
+ "will still be allowed to proceed exactly as if the repair had been\n"
+ "performed (except for the unchanged vg_seqno).\n"
+ "Inappropriate use could mess up your system, 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),
+ "Defines which segtype will be used when the shorthand -m option\n"
+ "is used for mirroring.\n"
+ "Possible options are: mirror, raid1.\n"
+ "mirror - The original RAID1 implementation provided by LVM/DM.\n"
+ "It is characterized by a flexible log solution (core, disk, mirrored)\n"
+ "and by the necessity to block I/O while reconfiguring in the\n"
+ "event of a failure.\n"
+ "There is an inherent race in the dmeventd failure handling\n"
+ "logic with snapshots of devices using this type of RAID1 that\n"
+ "in the worst case could cause a deadlock.\n"
+ "raid1 - This implementation leverages MD's RAID1 personality through\n"
+ "device-mapper. It is characterized by a lack of log options.\n"
+ "(A log is always allocated for every device and they are placed\n"
+ "on the same device as the image - no separate devices are\n"
+ "required.) This mirror implementation does not require I/O\n"
+ "to be blocked in the kernel in the event of a failure.\n"
+ "This mirror implementation is not cluster-aware and cannot be\n"
+ "used in a shared (active/active) fashion in a cluster.\n"
+ "Use '--type <mirror|raid1>' to override this default 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),
+ "Determines the segment types used by default when\n"
+ "the '--stripes/-i' and '--mirrors/-m' arguments are both specified\n"
+ "during the creation of a logical volume.\n"
+ "Possible options are: raid10, mirror.\n"
+ "raid10 - This implementation leverages MD's RAID10 personality through\n"
+ "device-mapper.\n"
+ "mirror - LVM will layer the 'mirror' and 'stripe' segment types. It\n"
+ "will do this by creating a mirror on top of striped sub-LVs;\n"
+ "effectively creating a RAID 0+1 array. This is suboptimal\n"
+ "in terms of providing redundancy and performance. Changing to\n"
+ "this setting is not advised.\n"
+ "Use '--type <raid10|mirror>' to override this default 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),
+ "Defines which segtype will be used when the shorthand '-V and -L' option\n"
+ "is used for sparse volume creation.\n"
+ "Possible options are: snapshot, thin.\n"
+ "snapshot - The original snapshot implementation provided by LVM/DM.\n"
+ "It is using old snashot that mixes data and metadata within\n"
+ "a single COW storage volume and has poor performs when\n"
+ "the size of stored data passes hundereds of MB.\n"
+ "thin - Newer implementation leverages thin provisioning target.\n"
+ "It has bigger minimal chunk size (64KiB) and uses separate volume\n"
+ "for metadata. It has better performance especially in case of\n"
+ "bigger data uses. This device type has also full snapshot support.\n"
+ "Use '--type <snapshot|thin>' to override this default 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),
+ "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),
+ "Whether to use (trust) a running instance of lvmetad. If this is disabled,\n"
+ "all commands fall back to the usual scanning mechanisms. When enabled,\n"
+ "*and* when lvmetad is running (automatically instantiated by making use of\n"
+ "systemd's socket-based service activation or run as an initscripts service\n"
+ "or run manually), the volume group metadata and PV state flags are obtained\n"
+ "from the lvmetad instance and no scanning is done by the individual\n"
+ "commands. In a setup with lvmetad, lvmetad udev rules *must* be set up for\n"
+ "LVM to work correctly. Without proper udev rules, all changes in block\n"
+ "device configuration will be *ignored* until a manual 'pvscan --cache'\n"
+ "is performed. These rules are installed by default.\n"
+ "If lvmetad has been running while use_lvmetad was disabled, it MUST be\n"
+ "stopped before enabled use_lvmetad and started again afterwards.\n"
+ "If using lvmetad, volume activation is also switched to automatic\n"
+ "event-based mode. In this mode, the volumes are activated based on\n"
+ "incoming udev events that automatically inform lvmetad about new PVs that\n"
+ "appear in the system. Once a VG is complete (all the PVs are present), it\n"
+ "is auto-activated. The activation/auto_activation_volume_list setting\n"
+ "controls which volumes are auto-activated (all by default).\n"
+ "A note about device filtering while lvmetad is used:\n"
+ "When lvmetad is updated (either automatically based on udev events or\n"
+ "directly by a pvscan --cache <device> call), devices/filter is ignored and\n"
+ "all devices are scanned by default -- lvmetad always keeps unfiltered\n"
+ "information which is then provided to LVM commands and then each LVM\n"
+ "command does the filtering based on devices/filter setting itself. This\n"
+ "does not apply to non-regexp filters though: component filters such as\n"
+ "multipath and MD are checked at pvscan --cache time.\n"
+ "In order to completely prevent LVM from scanning a device, even when using\n"
+ "lvmetad, devices/global_filter must be used.\n"
+ "N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet\n"
+ "supported in clustered environment. If use_lvmetad=1 and locking_type=3\n"
+ "is set at the same time, LVM always issues a warning message about this\n"
+ "and then it automatically disables use_lvmetad.\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),
+ "Full path of the utility called to check that a thin metadata device\n"
+ "is in a state that allows it to be used.\n"
+ "Each time a thin pool needs to be activated or after it is deactivated\n"
+ "this utility is executed. The activation will only proceed if the utility\n"
+ "has an exit status of 0.\n"
+ "Set to \"\" to skip this check. (Not recommended.)\n"
+ "The thin tools are available as part of the device-mapper-persistent-data\n"
+ "package from https://github.com/jthornber/thin-provisioning-tools.\n")
+
+cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_THIN_CHECK_OPTIONS, vsn(2, 2, 96),
+ "Array of string options passed with thin_check command. By default,\n"
+ "option -q is for quiet output.\n"
+ "With thin_check version 2.1 or newer you can add --ignore-non-fatal-errors\n"
+ "to let it pass through ignorable errors and fix them later.\n"
+ "With thin_check version 3.2 or newer you should add --clear-needs-check-flag.\n"
+ "Example:\n"
+ "thin_check_options = [ \"-q\", \"--clear-needs-check-flag\" ]\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),
+ "The specified features are not used by thin driver.\n"
+ "This can be helpful not just for testing, but i.e. allows to avoid\n"
+ "using problematic implementation of some thin feature.\n"
+ "Features: block_size, discards, discards_non_power_2, external_origin,\n"
+ "metadata_resize, external_origin_extend, error_if_no_space.\n"
+ "Example:\n"
+ "thin_disabled_features = [ \"discards\", \"block_size\" ]\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),
+ "Full path of the utility called to dump thin metadata content.\n"
+ "See thin_check_executable how to obtain binaries.\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),
+ "Full path of the utility called to repair a thin metadata device\n"
+ "is in a state that allows it to be used.\n"
+ "Each time a thin pool needs repair this utility is executed.\n"
+ "See thin_check_executable how to obtain binaries.\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),
+ "Array of extra string options passed with thin_repair command.\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),
+ "Full path of the utility called to check that a cache metadata device\n"
+ "is in a state that allows it to be used.\n"
+ "Each time a cached LV needs to be used or after it is deactivated\n"
+ "this utility is executed. The activation will only proceed if the utility\n"
+ "has an exit status of 0.\n"
+ "Set to \"\" to skip this check. (Not recommended.)\n"
+ "The cache tools are available as part of the device-mapper-persistent-data\n"
+ "package from https://github.com/jthornber/thin-provisioning-tools.\n")
+
+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),
+ "Array of string options passed with cache_check command. By default,\n"
+ "option -q is for quiet output.\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),
+ "Full path of the utility called to dump cache metadata content.\n"
+ "See cache_check_executable how to obtain binaries.\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),
+ "Full path of the utility called to repair a cache metadata device.\n"
+ "Each time a cache metadata needs repair this utility is executed.\n"
+ "See cache_check_executable how to obtain binaries.\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),
+ "Array of extra string options passed with 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),
+ "The method lvm will use to set the system ID of the local host.\n"
+ "Volume Groups can also be given a system ID. A VG on shared storage\n"
+ "devices will be accessible only to the host with a matching system ID.\n"
+ "See 'man lvmsystemid' for information on limitations and correct usage.\n"
+ "Possible options are: none, lvmlocal, uname, machineid, file.\n"
+ "none - The host has no system ID.\n"
+ "lvmlocal - Obtain the system ID from the system_id setting in the\n"
+ "'local' section of an lvm configuration file, e.g. lvmlocal.conf.\n"
+ "uname - Set the system ID from the hostname (uname) of the system.\n"
+ "System IDs beginning localhost are not permitted.\n"
+ "machineid - Use the contents of the file /etc/machine-id to set the\n"
+ "system ID. Some systems create this file at installation time.\n"
+ "See 'man machine-id'.\n"
+ "file - Use the contents of an alternative file (system_id_file) to\n"
+ "set 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),
+ "Full path of a 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),
+ "Perform internal checks on the operations issued to\n"
+ "libdevmapper. Useful for debugging problems with activation.\n"
+ "Some of the checks may be expensive, so it's best to use this\n"
+ "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),
+ "Enable/disable udev synchronisation (if compiled into the binaries).\n"
+ "Processes will not wait for notification from udev.\n"
+ "They will continue irrespective of any possible udev processing\n"
+ "in the background. You should only use this if udev is not running\n"
+ "or has rules that ignore the devices LVM creates.\n"
+ "The command line argument --nodevsync takes precedence over this setting.\n"
+ "If enabled when udev is not running, and there are LVM processes\n"
+ "waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them up.\n")
+
+cfg(activation_udev_rules_CFG, "udev_rules", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_UDEV_RULES, vsn(2, 2, 57),
+ "Enable/disable the udev rules installed by LVM (if built with\n"
+ "--enable-udev_rules). LVM will then manage the /dev nodes and symlinks\n"
+ "for active logical volumes directly itself.\n"
+ "N.B. Manual intervention may be required if this setting is changed\n"
+ "while any logical volumes 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),
+ "Verify operations performed by udev. This turns on additional checks\n"
+ "(and if necessary, repairs) on entries in the device directory after udev\n"
+ "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),
+ "Retry deactivation operations for a few seconds before failing\n"
+ "if deactivation of an LV fails, perhaps because a process run\n"
+ "from a quick udev rule temporarily opened the device.\n")
+
+cfg(activation_missing_stripe_filler_CFG, "missing_stripe_filler", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_STRIPE_FILLER, vsn(1, 0, 0),
+ "How to fill in missing stripes if activating an incomplete volume.\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"
+ "case, that device will be used to in place of missing stripes.\n"
+ "But note that using anything other than 'error' with mirrored\n"
+ "or snapshotted 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),
+ "Enable/disable the linear target optimization.\n"
+ "When disabled, the striped target is used. The linear target is\n"
+ "an optimised version of the striped target that only handles a\n"
+ "single stripe.\n")
+
+cfg(activation_reserved_stack_CFG, "reserved_stack", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_STACK, vsn(1, 0, 0),
+ "How much stack (in KB) to reserve for use while devices suspended.\n"
+ "Prior to version 2.02.89 this used to be set to 256KB.\n")
+
+cfg(activation_reserved_memory_CFG, "reserved_memory", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_RESERVED_MEMORY, vsn(1, 0, 0),
+ "How much memory (in KB) to reserve for use while devices suspended.\n")
+
+cfg(activation_process_priority_CFG, "process_priority", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_PROCESS_PRIORITY, vsn(1, 0, 0),
+ "Nice value used while devices suspended.\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),
+ "If volume_list is defined, each LV is only activated if there is a\n"
+ "match against the list.\n"
+ "vgname and vgname/lvname are matched exactly.\n"
+ "@tag matches any tag set in the LV or VG.\n"
+ "@* matches if any tag defined on the host is also set in the LV or VG.\n"
+ "If any host tags exist but volume_list is not defined, a default\n"
+ "single-entry list containing '@*' is assumed.\n"
+ "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),
+ "If auto_activation_volume_list is defined, each LV that is to be\n"
+ "activated with the autoactivation option (--activate ay/-a ay) is\n"
+ "first checked against the list. There are two scenarios in which\n"
+ "the autoactivation option is used:\n"
+ "1. automatic activation of volumes based on incoming PVs. If all the\n"
+ "PVs making up a VG are present in the system, the autoactivation\n"
+ "is triggered. This requires lvmetad (global/use_lvmetad=1) and udev\n"
+ "to be running. In this case, 'pvscan --cache -aay' is called\n"
+ "automatically without any user intervention while processing\n"
+ "udev events. Please, make sure you define auto_activation_volume_list\n"
+ "properly so only the volumes you want and expect are autoactivated.\n"
+ "2. direct activation on command line with the autoactivation option.\n"
+ "In this case, the user calls 'vgchange --activate ay/-a ay' or\n"
+ "'lvchange --activate ay/-a ay' directly.\n"
+ "By default, the auto_activation_volume_list is not defined and all\n"
+ "volumes will be activated either automatically or by using --activate ay/-a ay.\n"
+ "N.B. The activation/volume_list is still honoured in all cases so even\n"
+ "if the VG/LV passes the auto_activation_volume_list, it still needs to\n"
+ "pass the volume_list for it to be activated in the end.\n"
+ "If auto_activation_volume_list is defined but empty, no volumes will be\n"
+ "activated automatically and --activate ay/-a ay will do nothing.\n"
+ "Example:\n"
+ "auto_activation_volume_list = []\n"
+ "If auto_activation_volume_list is defined and it's not empty, only matching\n"
+ "volumes will be activated either automatically or by using --activate ay/-a ay.\n"
+ "vgname and vgname/lvname are matched exactly.\n"
+ "@tag matches any tag set in the LV or VG.\n"
+ "@* matches if any tag defined on the host is also set in the LV or VG.\n"
+ "Example:\n"
+ "auto_activation_volume_list = [ \"vg1\", \"vg2/lvol1\", \"@tag1\", \"@*\" ]\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),
+ "If read_only_volume_list is defined, each LV that is to be activated\n"
+ "is checked against the list, and if it matches, it is activated\n"
+ "in read-only mode. (This overrides '--permission rw' stored in the\n"
+ "metadata.)\n"
+ "vgname and vgname/lvname are matched exactly.\n"
+ "@tag matches any tag set in the LV or VG.\n"
+ "@* matches if any tag defined on the host is also set in the LV or VG.\n"
+ "Example:\n"
+ "read_only_volume_list = [ \"vg1\", \"vg2/lvol1\", \"@tag1\", \"@*\" ]\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_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_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_readahead_CFG, "readahead", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_READ_AHEAD, vsn(1, 0, 23), 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)
-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_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_runtime(activation_mirror_image_fault_policy_CFG, "mirror_image_fault_policy", activation_CFG_SECTION, 0, CFG_TYPE_STRING, vsn(2, 2, 57), 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)
-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_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_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_array(activation_mlock_filter_CFG, "mlock_filter", activation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, 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)
-cfg(activation_monitoring_CFG, "monitoring", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DMEVENTD_MONITOR, 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)
-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_mode_CFG, "activation_mode", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ACTIVATION_MODE, vsn(2,2,108), NULL)
-
-cfg(metadata_pvmetadatacopies_CFG, "pvmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATACOPIES, vsn(1, 0, 0), NULL)
-cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_VGMETADATACOPIES, vsn(2, 2, 69), NULL)
-cfg(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATASIZE, vsn(1, 0, 0), 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),
+ "For RAID or 'mirror' segment types, raid_region_size is the\n"
+ "size (in KiB) of:\n"
+ "each synchronization operation when initializing, and\n"
+ "each copy operation when performing a pvmove (using 'mirror' segtype).\n"
+ "This setting has replaced mirror_region_size since version 2.02.99.\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),
+ "Control error behavior when provisioned device becomes full. This\n"
+ "determines the default --errorwhenfull setting of new thin pools.\n"
+ "The command line option --errorwhenfull takes precedence over this\n"
+ "setting. error_when_full disabled (0) means --errorwhenfull n.\n")
+
+cfg(activation_readahead_CFG, "readahead", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_READ_AHEAD, vsn(1, 0, 23),
+ "Setting to use when there is no readahead value stored in the 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),
+ "Defines how a device failure in a RAID logical volume is handled.\n"
+ "This includes logical volumes that have the following segment types:\n"
+ "raid1, raid4, raid5*, and raid6*.\n"
+ "In the event of a failure, the following policies will determine what\n"
+ "actions are performed during the automated response to failures (when\n"
+ "dmeventd is monitoring the RAID logical volume) and when 'lvconvert' is\n"
+ "called manually with the options '--repair' and '--use-policies'.\n"
+ "Possible options are: warn, allocate.\n"
+ "warn - Use the system log to warn the user that a device in the RAID\n"
+ "logical volume has failed. It is left to the user to run\n"
+ "'lvconvert --repair' manually to remove or replace the failed\n"
+ "device. As long as the number of failed devices does not\n"
+ "exceed the redundancy of the logical volume (1 device for\n"
+ "raid4/5, 2 for raid6, etc) the logical volume will remain usable.\n"
+ "allocate - Attempt to use any extra physical volumes in the volume\n"
+ "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),
+ "Defines how a device failure affecting a mirror (of 'mirror' segment type) is\n"
+ "handled. A mirror is composed of mirror images (copies) and a log.\n"
+ "A disk log ensures that a mirror does not need to be re-synced\n"
+ "(all copies made the same) every time a machine reboots or crashes.\n"
+ "In the event of a failure, the specified policy will be used to determine\n"
+ "what happens. This applies to automatic repairs (when the mirror is being\n"
+ "monitored by dmeventd) and to manual lvconvert --repair when\n"
+ "--use-policies is given.\n"
+ "Possible options are: remove, allocate, allocate_anywhere.\n"
+ "remove - Simply remove the faulty device and run without it.\n"
+ "If the log device fails, the mirror would convert to using\n"
+ "an in-memory log. This means the mirror will not\n"
+ "remember its sync status across crashes/reboots and\n"
+ "the entire mirror will be re-synced.\n"
+ "If a mirror image fails, the mirror will convert to a\n"
+ "non-mirrored device if there is only one remaining good copy.\n"
+ "allocate - Remove the faulty device and try to allocate space on\n"
+ "a new device to be a replacement for the failed device.\n"
+ "Using this policy for the log is fast and maintains the\n"
+ "ability to remember sync state through crashes/reboots.\n"
+ "Using this policy for a mirror device is slow, as it\n"
+ "requires the mirror to resynchronize the devices, but it\n"
+ "will preserve the mirror characteristic of the device.\n"
+ "This policy acts like 'remove' if no suitable device and\n"
+ "space can be allocated for the replacement.\n"
+ "allocate_anywhere - Not yet implemented. Useful to place the log device\n"
+ "temporarily on same physical volume as one of the mirror\n"
+ "images. This policy is not recommended for mirror devices\n"
+ "since it would break the redundant nature of the mirror. This\n"
+ "policy acts like 'remove' if no suitable device and space can\n"
+ "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),
+ "The description of mirror_image_fault_policy also applies to this 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),
+ "This setting 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),
+ "Defines when a snapshot should be automatically extended.\n"
+ "When its space usage exceeds the percent set here, it is\n"
+ "extended. Setting this to 100 disables automatic extension.\n"
+ "The minimum value is 50 (a setting below 50 will be treated as 50.)\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),
+ "Defines how much extra space should be allocated for a snapshot\n"
+ "when it is automatically extended, as a percent of its current size.\n"
+ "Example:\n"
+ "With snapshot_autoextend_threshold 70 and snapshot_autoextend_percent 20,\n"
+ "whenever a snapshot exceeds 70% usage, it will be extended by another 20%.\n"
+ "For a 1G snapshot, using up 700M will trigger a resize to 1.2G.\n"
+ "When the usage exceeds 840M, the snapshot will be extended to 1.44G,\n"
+ "and so on.\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),
+ "Defines when a thin pool should be automatically extended.\n"
+ "When its space usage exceeds the percent set here, it is\n"
+ "extended. Setting this to 100 disables automatic extension.\n"
+ "The minimum value is 50 (a setting below 50 will be treated as 50.)\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),
+ "Defines how much extra space should be allocated for a thin pool\n"
+ "when it is automatically extended, as a percent of its current size.\n"
+ "Example:\n"
+ "With thin_pool_autoextend_threshold 70 and thin_pool_autoextend_percent 20,\n"
+ "whenever a thin pool exceeds 70% usage, it will be extended by another 20%.\n"
+ "For a 1G thin pool, using up 700M will trigger a resize to 1.2G.\n"
+ "When the usage exceeds 840M, the thin pool will be extended to 1.44G,\n"
+ "and so on.\n")
+
+cfg_array(activation_mlock_filter_CFG, "mlock_filter", activation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 62),
+ "While activating devices, I/O to devices being (re)configured is\n"
+ "suspended, and as a precaution against deadlocks, LVM needs to pin\n"
+ "any memory it is using so it is not paged out. Groups of pages that\n"
+ "are known not to be accessed during activation need not be pinned\n"
+ "into memory. Each string listed in this setting is compared against\n"
+ "each line in /proc/self/maps, and the pages corresponding to any\n"
+ "lines that match are not pinned. On some systems locale-archive was\n"
+ "found to make up over 80% of the memory used by the process.\n"
+ "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),
+ "Enable to revert to the default behaviour prior to version 2.02.62 which\n"
+ "used mlockall() to pin 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),
+ "Enable/disable monitoring when activating logical volumes.\n"
+ "Disabling can also be done with the --ignoremonitoring option.\n")
+
+cfg(activation_polling_interval_CFG, "polling_interval", activation_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_INTERVAL, vsn(2, 2, 63),
+ "When pvmove or lvconvert must wait for the kernel to finish\n"
+ "synchronising or merging data, they check and report progress\n"
+ "at intervals of this number of seconds.\n"
+ "If this is set to 0 and there is only one thing to wait for, there\n"
+ "are no progress reports, but the process is awoken immediately the\n"
+ "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),
+ "Each LV can have an 'activation skip' flag stored persistently against it.\n"
+ "During activation, this flag is used to decide whether such an LV is skipped.\n"
+ "The 'activation skip' flag can be set during LV creation and by default it\n"
+ "is automatically set for thin snapshot LVs. The auto_set_activation_skip\n"
+ "enables or disables this automatic setting of the flag while LVs are created.\n")
+
+cfg(activation_mode_CFG, "activation_mode", activation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_ACTIVATION_MODE, vsn(2,2,108),
+ "Determines how Logical Volumes are activated if any devices are missing.\n"
+ "Possible options are: complete, degraded, partial.\n"
+ "complete - Only allow activation of an LV if all of the Physical Volumes\n"
+ "it uses are present. Other PVs in the Volume Group may be missing.\n"
+ "degraded - Like complete, but additionally RAID Logical Volumes of\n"
+ "segment type raid1, raid4, raid5, radid6 and raid10 will\n"
+ "be activated if there is no data loss, i.e. they have\n"
+ "sufficient redundancy to present the entire addressable\n"
+ "range of the Logical Volume.\n"
+ "partial - Allows the activation of any Logical Volume even if\n"
+ "a missing or failed PV could cause data loss with a\n"
+ "portion of the Logical Volume inaccessible.\n"
+ "This setting should not normally be used, but may\n"
+ "sometimes assist with data recovery.\n"
+ "This setting corresponds with the --activationmode option for\n"
+ "lvchange and vgchange.\n")
+
+cfg(metadata_pvmetadatacopies_CFG, "pvmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATACOPIES, vsn(1, 0, 0),
+ "Default number of copies of metadata to hold on each PV. 0, 1 or 2.\n"
+ "You might want to override it from the command line with 0\n"
+ "when running pvcreate on new PVs which are to be added to large VGs.\n")
+
+cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_VGMETADATACOPIES, vsn(2, 2, 69),
+ "Default 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"
+ "number of copies of the VG metadata. If you set a value larger\n"
+ "than the the total number of metadata areas available then\n"
+ "metadata is stored in them all.\n"
+ "The default value of 0 (unmanaged) disables this automatic\n"
+ "management and allows you to control which metadata areas\n"
+ "are used at the individual PV level using 'pvchange metadataignore y/n'.\n")
+
+cfg(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_PVMETADATASIZE, vsn(1, 0, 0),
+ "Approximate default size of on-disk metadata areas in sectors.\n"
+ "You should increase this if you have large volume groups or\n"
+ "you want to retain a large on-disk history of your metadata changes.\n")
+
cfg(metadata_pvmetadataignore_CFG, "pvmetadataignore", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_BOOL, DEFAULT_PVMETADATAIGNORE, vsn(2, 2, 69), NULL)
cfg(metadata_stripesize_CFG, "stripesize", metadata_CFG_SECTION, CFG_ADVANCED, CFG_TYPE_INT, DEFAULT_STRIPESIZE, 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)
+
+cfg_array(metadata_dirs_CFG, "dirs", metadata_CFG_SECTION, CFG_ADVANCED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0),
+ "List of 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"
+ "preferably on different (non-LV) filesystems, and with no other\n"
+ "on-disk metadata (pvmetadatacopies = 0). Or this can be in\n"
+ "addition to on-disk metadata areas.\n"
+ "The feature was originally added to simplify testing and is not\n"
+ "supported under low memory situations - the machine could lock up.\n"
+ "Never edit any files in these directories by hand unless you\n"
+ "you are absolutely sure you know what you are doing! Use\n"
+ "the supplied toolset to make changes (e.g. vgcfgrestore).\n"
+ "Example:\n"
+ "dirs = [ \"/etc/lvm/metadata\", \"/mnt/disk2/lvm/metadata2\" ]\n")
cfg_section(metadata_disk_areas_CFG_SUBSECTION, "disk_areas", metadata_CFG_SECTION, CFG_ADVANCED | 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_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, vsn(1, 0, 0), NULL)
@@ -242,47 +1166,165 @@ cfg(disk_area_start_sector_CFG, "start_sector", disk_area_CFG_SUBSECTION, CFG_AD
cfg(disk_area_size_CFG, "size", disk_area_CFG_SUBSECTION, CFG_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, 0, vsn(1, 0, 0), NULL)
cfg(disk_area_id_CFG, "id", disk_area_CFG_SUBSECTION, CFG_ADVANCED | CFG_UNSUPPORTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), 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_aligned_CFG, "aligned", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_ALIGNED, 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)
-cfg(report_headings_CFG, "headings", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_HEADINGS, 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)
-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_prefixes_CFG, "prefixes", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_PREFIXES, vsn(2, 2, 36), NULL)
-cfg(report_quoted_CFG, "quoted", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_QUOTED, vsn(2, 2, 39), 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)
-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_devtypes_sort_CFG, "devtypes_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_DEVTYPES_SORT, 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)
-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_lvs_sort_CFG, "lvs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_LVS_SORT, 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)
-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_vgs_sort_CFG, "vgs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_VGS_SORT, 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)
-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_pvs_sort_CFG, "pvs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVS_SORT, 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)
-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_segs_sort_CFG, "segs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_SEGS_SORT, 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)
-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_pvsegs_sort_CFG, "pvsegs_sort", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_STRING, DEFAULT_PVSEGS_SORT, 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)
-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(dmeventd_mirror_library_CFG, "mirror_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_MIRROR_LIB, vsn(1, 2, 3), NULL)
+cfg(report_compact_output_CFG, "compact_output", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_COMPACT_OUTPUT, vsn(2, 2, 115),
+ "If enabled, fields which don't have value set for any of the rows\n"
+ "reported are skipped on output. Compact output is applicable only\n"
+ "if report is buffered (report/buffered=1).\n")
+
+cfg(report_aligned_CFG, "aligned", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_ALIGNED, vsn(1, 0, 0),
+ "Align columns on report output.\n")
+
+cfg(report_buffered_CFG, "buffered", report_CFG_SECTION, CFG_PROFILABLE, CFG_TYPE_BOOL, DEFAULT_REP_BUFFERED, vsn(1, 0, 0),
+ "When buffered reporting is used, the report's content is appended\n"
+ "incrementally to include each object being reported until the report\n"
+ "is flushed to output which normally happens at the end of command\n"
+ "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),
+ "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),
+ "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),
+ "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),
+ "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),
+ "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),
+ "Output each column as a row. 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),
+ "Use binary values 0 or 1 instead of descriptive literal values for\n"
+ "columns that have exactly two valid values to report (not counting the\n"
+ "'unknown' value which denotes that the 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "Comma separated 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),
+ "The library used 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)
-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_thin_library_CFG, "thin_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_THIN_LIB, vsn(2, 2, 89), NULL)
-cfg(dmeventd_executable_CFG, "executable", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_PATH, vsn(2, 2, 73), NULL)
+
+cfg(dmeventd_snapshot_library_CFG, "snapshot_library", dmeventd_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_DMEVENTD_SNAPSHOT_LIB, vsn(1, 2, 26),
+ "The library used when monitoring a snapshot device.\n"
+ "libdevmapper-event-lvm2snapshot.so monitors the filling of\n"
+ "snapshots and emits a warning through syslog when the use of\n"
+ "the snapshot 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),
+ "The library used when monitoring a thin device.\n"
+ "libdevmapper-event-lvm2thin.so monitors the filling of\n"
+ "pool and emits a warning through syslog when the use of\n"
+ "the pool 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),
+ "Full path of the dmeventd binary.\n")
cfg(tags_hosttags_CFG, "hosttags", tags_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_HOSTTAGS, vsn(1, 0, 18), NULL)
cfg_section(tag_CFG_SUBSECTION, "tag", tags_CFG_SECTION, CFG_NAME_VARIABLE | CFG_DEFAULT_UNDEFINED, 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)
-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_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(local_system_id_CFG, "system_id", local_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(2, 2, 117),
+ "Defines the system ID of the local host. This is used\n"
+ "when global/system_id_source is set to 'lvmlocal' in the main\n"
+ "configuration file, e.g. lvm.conf.\n"
+ "When used, it must be set to a unique value - often a hostname -\n"
+ "across all the hosts sharing access to the storage.\n"
+ "Example:\n"
+ "Set no system ID.\n"
+ "system_id = \"\"\n"
+ "Example:\n"
+ "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),
+ "Defines a list of extra system_ids other than the local\n"
+ "system_id that the local host is allowed to access. These are\n"
+ "used for all values of global/system_id_source except 'none'.\n"
+ "Only use this if you have read 'man lvmsystemid' and you are sure\n"
+ "you understand why you need to use it!\n")
cfg(CFG_COUNT, NULL, root_CFG_SECTION, 0, CFG_TYPE_INT, 0, vsn(0, 0, 0), NULL)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a9d48bae2f942f29…
Commit: a9d48bae2f942f29746f95ec35609e36ead6cea2
Parent: 249d4a921ca300c746588c7683484aa75442771b
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Thu Apr 9 21:13:55 2015 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Thu Apr 9 21:13:55 2015 +0100
cache: Set correct vgid when changing PV header.
pv_write is called both to write orphans and to rewrite PV headers
of PVs in VGs. It needs to select the correct VG id so that the
internal cache state gets updated correctly.
It only affected commands that involved further steps after
the pv_write and was often masked because the metadata would
be re-read off disk and correct itself.
"Incorrect metadata area header checksum" warnings appeared.
Example:
Create vg1 containing dev1, dev2 and dev3.
Hide dev1 and dev2 from the system.
Fix up vg1 with vgreduce --removemissing.
Bring back dev1 and dev2.
In a single operation reinstate dev1 and dev2 into vg1 (vgextend).
Done as separate operations (automatically fix-up dev1 and dev2 as orphans,
then vgextend) it worked, but done all in one go the internal cache got
corrupted and warnings about checksum errors appeared.
---
WHATS_NEW | 1 +
lib/cache/lvmcache.c | 1 +
lib/format_text/format-text.c | 5 +++--
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6f43437..1870801 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.119 -
==================================
+ Set correct vgid when updating cache when writing PV metadata.
More efficient clvmd singlenode locking emulation.
Don't skip invalidation of cached orphans if vg write lck is held (2.02.118).
Log relevant PV tags when using cling allocation.
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 27b4292..6f8c950 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1544,6 +1544,7 @@ struct lvmcache_info *lvmcache_add(struct labeller *labeller, const char *pvid,
.vgstatus = vgstatus,
};
+ /* N.B. vgid is not NUL-terminated when called from _text_pv_write */
if (vgid)
strncpy((char *)&vgsummary.vgid, vgid, sizeof(vgsummary.vgid));
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index bdac7f9..8e5578c 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -1318,7 +1318,7 @@ static int _write_single_mda(struct metadata_area *mda, void *baton)
return 1;
}
-/* Only for orphans */
+/* Only for orphans - FIXME That's not true any more */
static int _text_pv_write(const struct format_type *fmt, struct physical_volume *pv)
{
struct format_instance *fid = pv->fid;
@@ -1332,7 +1332,8 @@ static int _text_pv_write(const struct format_type *fmt, struct physical_volume
/* Add a new cache entry with PV info or update existing one. */
if (!(info = lvmcache_add(fmt->labeller, (const char *) &pv->id,
- pv->dev, pv->vg_name, NULL, 0)))
+ pv->dev, pv->vg_name,
+ is_orphan_vg(pv->vg_name) ? pv->vg_name : pv->vg ? &pv->vg->id : NULL, 0)))
return_0;
label = lvmcache_get_label(info);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1a7c9ce3bd6c80ec…
Commit: 1a7c9ce3bd6c80ec043af3dc8b88f63b31035e21
Parent: 073643c9a2f0f92a2e3f236b0017db4bbc7c3a54
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Apr 9 13:13:36 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Apr 9 13:13:36 2015 +0200
tests: handle debug.log from clvmd
When clvmd starts, it starts it's own command logging into debug.log.
This is interferring with our other command debug.log.
As as sideeffect we may experience log from command,
followed but lots of zeros and continued with clvmd log.
Fix it by renaming debug.log and now we could also print this trace
to get full list of clvmd activity nicely.
Also improve some post-mortem prints from udevadm and dmsetup to
make the output more usable.
---
test/lib/aux.sh | 4 +++-
test/lib/lvm-wrapper.sh | 3 +++
test/lib/utils.sh | 15 +++++++++++----
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 37a9a9a..f471fa4 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -48,9 +48,11 @@ prepare_clvmd() {
for i in $(seq 1 100) ; do
test $i -eq 100 && die "Startup of clvmd is too slow."
- test -e "$CLVMD_PIDFILE" && break
+ test -e "$CLVMD_PIDFILE" -a -e debug.log && break
sleep .2
done
+ # Keep log of clvmd in separate debug file
+ mv debug.log clvmddebug.log
}
prepare_dmeventd() {
diff --git a/test/lib/lvm-wrapper.sh b/test/lib/lvm-wrapper.sh
index 8bc96a2..cbc60d3 100644
--- a/test/lib/lvm-wrapper.sh
+++ b/test/lib/lvm-wrapper.sh
@@ -38,6 +38,9 @@ case "$CMD" in
test ${LVM_DEBUG_LEVEL:-0} -lt 1 && RUN_DBG= ;;
esac
+# Capture parallel users of debug.log file
+test -z "$(fuser debug.log 2>/dev/null)" || { echo "Test suite problem: \"debug.log\" is still in use!" >&2 ; return 1 ; }
+
# the exec is important, because otherwise fatal signals inside "not" go unnoticed
if test -n "$abs_top_builddir"; then
exec $RUN_DBG "$abs_top_builddir/tools/lvm" $CMD "$@"
diff --git a/test/lib/utils.sh b/test/lib/utils.sh
index 401a862..b06bf87 100644
--- a/test/lib/utils.sh
+++ b/test/lib/utils.sh
@@ -100,6 +100,11 @@ mkdtemp() {
die "$err"
}
+# Like grep, just always print 1st. line
+grep1_() {
+ awk -v pattern="${1}" 'NR==1 || $0~pattern' "${@:2}"
+}
+
STACKTRACE() {
trap - ERR
local i=0
@@ -129,9 +134,11 @@ STACKTRACE() {
test -z "$LVM_TEST_NODEBUG" -a -f debug.log && {
sed -e "s,^,## DEBUG: ,;s,$top_srcdir/\?,," < debug.log
+ echo "========= CLVMD debug log ========="
+ test -e clvmddebug.log && sed -e "s,^,## CLVMD: ,;s,$top_srcdir/\?,," < clvmddebug.log
test -e strace.log && sed -e "s,^,## STRACE: ,;s,$top_srcdir/\?,," < strace.log
echo "========= Info ==========="
- dmsetup info -c | grep "$PREFIX"
+ dmsetup info -c | grep1_ "$PREFIX"
echo "========= Active table ==========="
dmsetup table | grep "$PREFIX"
echo "======== Inactive table =========="
@@ -141,9 +148,9 @@ STACKTRACE() {
echo "======== Tree =========="
dmsetup ls --tree
echo "======== Recursive list of $DM_DEV_DIR =========="
- ls -Rla "$DM_DEV_DIR"
- for i in "/sys/block/dm-* /sys/block/loop*" ; do
- udevadm info --export-db "$i" || true
+ ls -Rl --hide=shm --hide=bus --hide=snd --hide=input "$DM_DEV_DIR"
+ for i in /sys/block/dm-* /sys/block/loop* ; do
+ udevadm info -p "$i" || true
done
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f32973c78e981226…
Commit: f32973c78e981226577e88db662a285ea6c11bd5
Parent: 8fdca0de7910052594a55bfb7bd3815afe701dad
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Wed Apr 8 11:14:16 2015 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Wed Apr 8 11:14:16 2015 +0200
select: mention { } use in lvm.8 man page and '-S help' properly
---
libdm/libdm-report.c | 2 +-
man/lvm.8.in | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index 6f528f1..9f50ff3 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -2612,7 +2612,7 @@ static void _display_selection_help(struct dm_report *rh)
log_warn(" size - Floating point value with units, 'm' unit used by default if not specified.");
log_warn(" percent - Non-negative integer with or without %% suffix.");
log_warn(" string - Characters quoted by \' or \" or unquoted.");
- log_warn(" string list - Strings enclosed by [ ] and elements delimited by either");
+ log_warn(" string list - Strings enclosed by [ ] or { } and elements delimited by either");
log_warn(" \"all items must match\" or \"at least one item must match\" operator.");
log_warn(" regular expression - Characters quoted by \' or \" or unquoted.");
log_warn(" ");
diff --git a/man/lvm.8.in b/man/lvm.8.in
index 2faaba4..26d94ee 100644
--- a/man/lvm.8.in
+++ b/man/lvm.8.in
@@ -470,6 +470,10 @@ that can be used in selection, see the output of \fB<lvm reporting command> -S h
\fB[\fP \(em List start
.IP
\fB]\fP \(em List end
+.IP
+\fB{\fP \(em List subset start
+.IP
+\fB}\fP \(em List subset end
.LP
\fBInformal grammar specification\fP:
.IP
@@ -477,7 +481,11 @@ that can be used in selection, see the output of \fB<lvm reporting command> -S h
.IP
.BR VALUE " = " [VALUE " log_op " VALUE]
.br
-For list-based types: string list. The log_op must always be of one type within the whole list value.
+For list-based types: string list. Matches strictly. The log_op must always be of one type within the whole list value.
+.IP
+.BR VALUE " = " {VALUE " log_op " VALUE}
+.br
+For list-based types: string list. Matches a subset. The log_op must always be of one type within the whole list value.
.IP
.BR VALUE " = " value
.br
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=64353ff74b56c71b…
Commit: 64353ff74b56c71b508fd040a45062facb395bae
Parent: ba049e203b35d6e03e38669a2a92af6538a0b2d0
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Apr 7 13:40:15 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Apr 7 13:40:15 2015 +0200
tests: when test fails collect more info
In some case it might be worth to know some more surrouding info
when command has crashed.
So collect tables and some udev db content in this case.
---
test/lib/utils.sh | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/test/lib/utils.sh b/test/lib/utils.sh
index 2f7dc65..401a862 100644
--- a/test/lib/utils.sh
+++ b/test/lib/utils.sh
@@ -130,6 +130,21 @@ STACKTRACE() {
test -z "$LVM_TEST_NODEBUG" -a -f debug.log && {
sed -e "s,^,## DEBUG: ,;s,$top_srcdir/\?,," < debug.log
test -e strace.log && sed -e "s,^,## STRACE: ,;s,$top_srcdir/\?,," < strace.log
+ echo "========= Info ==========="
+ dmsetup info -c | grep "$PREFIX"
+ echo "========= Active table ==========="
+ dmsetup table | grep "$PREFIX"
+ echo "======== Inactive table =========="
+ dmsetup table --inactive | grep "$PREFIX"
+ echo "======== Status =========="
+ dmsetup status | grep "$PREFIX"
+ echo "======== Tree =========="
+ dmsetup ls --tree
+ echo "======== Recursive list of $DM_DEV_DIR =========="
+ ls -Rla "$DM_DEV_DIR"
+ for i in "/sys/block/dm-* /sys/block/loop*" ; do
+ udevadm info --export-db "$i" || true
+ done
}
test -f SKIP_THIS_TEST && exit 200
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4f94669eca3c2a90…
Commit: 4f94669eca3c2a90577a972fd748f4b0c4e89928
Parent: c88ffbf9dfab5c636b45c51fda6ecf1e6f270b85
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Apr 3 17:14:50 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Apr 3 17:18:11 2015 +0200
pvmove: don't crash when name is not found
If the device name is not found in our metadata,
we cannot call strdup few lines later with NULL name.
More intersting story goes behind how it happens -
pvmove removal is unfortunatelly 'multi-state' process
and at some point (for now) we have in lvm2 metadata
LV pvmove0 as stripe and mirror image as error.
If such metadata are left - we fail with any further removal.
---
tools/polldaemon.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/tools/polldaemon.c b/tools/polldaemon.c
index 6cdcbbb..1b6e1b4 100644
--- a/tools/polldaemon.c
+++ b/tools/polldaemon.c
@@ -223,6 +223,12 @@ static int _poll_vg(struct cmd_context *cmd, const char *vgname,
if (!name && !parms->aborting)
continue;
+ if (!name) {
+ log_error("Device name for LV %s not found in metadata. "
+ "(unfinished pvmove mirror removal?)", display_lvname(lv));
+ goto err;
+ }
+
/* FIXME Need to do the activation from _set_up_pvmove here
* if it's not running and we're not aborting. */
if (!lv_is_active(lv)) {
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ee65528547aaec20…
Commit: ee65528547aaec2076d7dc5bf61285732dbbb534
Parent: 536f5fa0a310fe863340768ea1a8b062b63e02ef
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Apr 2 12:37:56 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Apr 2 13:38:41 2015 +0200
tests: fix test warning
We cannot print TEST WARNING within test shell script
(since it's running in debug mode and thus always prints it)
Use 'should false' trick let the string printed in this case.
So 'non cluster cases' should now end properly.
---
test/shell/pvmove-all-segtypes.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/shell/pvmove-all-segtypes.sh b/test/shell/pvmove-all-segtypes.sh
index 457054b..ce95059 100644
--- a/test/shell/pvmove-all-segtypes.sh
+++ b/test/shell/pvmove-all-segtypes.sh
@@ -58,7 +58,7 @@ lvremove -ff $vg
if test -e LOCAL_CLVMD ; then
#FIXME these tests currently fail end require cmirrord
-echo "TEST WARNING, FIXME!!! pvmove in clustered VG not fully supported!"
+echo "$(should false)FIXME!!! pvmove in clustered VG not fully supported!"
else
# Testing pvmove of mirror LV
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e28e22b9e1e4f724…
Commit: e28e22b9e1e4f7243608aa24ddf43ec63afd1751
Parent: f199aeb9eaa1821811f98308565ccc54ab52edf8
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Thu Apr 2 12:42:18 2015 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Apr 2 13:38:32 2015 +0200
lvmcache: skip drop when vg_write lock is not held
Commit 80f4b4b8039a88dfa2648a9b5bb5e16f41b81f87
introduced undesirable side-effects for lvm2app user
which happens to be our own python binding.
It appear obtaing pvs list keeps global lock.
So restricting this to VG_GLOBAL READ locks and skip
the drop skip if WRITE lock is held.
---
WHATS_NEW | 1 +
lib/cache/lvmcache.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 0a5d797..79136f9 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.119 -
==================================
+ Don't skip invalidation of cached orphans if vg write lck is held (2.02.118).
Log relevant PV tags when using cling allocation.
Add str_list_add_list() to combine two lists.
Fix LV processing with selection to always do the selection on initial state.
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 2b4e2c6..27b4292 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -287,7 +287,7 @@ void lvmcache_commit_metadata(const char *vgname)
void lvmcache_drop_metadata(const char *vgname, int drop_precommitted)
{
- if (lvmcache_vgname_is_locked(VG_GLOBAL))
+ if (lvmcache_vgname_is_locked(VG_GLOBAL) && !vg_write_lock_held())
return;
/* For VG_ORPHANS, we need to invalidate all labels on orphan PVs. */