Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=89661981e829d2cb228e3…
Commit: 89661981e829d2cb228e3db6f8127d14526ea025
Parent: 4a14617dc4413911b3af0cfea38cd5c2fe45afa8
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Feb 28 12:22:12 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Feb 28 12:22:12 2017 -0600
man: fix syntax for PV ranges
---
tools/command.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index 59818f9..a8c38ba 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -2733,8 +2733,8 @@ void print_man_all_positions_desc(struct command_name *cname)
printf("Physical Volume name, a device path under /dev.\n"
"For commands managing physical extents, a PV positional arg\n"
"generally accepts a suffix indicating a range of physical extents.\n"
- "Start and end range (inclusive): \\fIPV\\fP[:\\fIPE\\fP[-\\fIPE\\fP].\n"
- "Start and length range (counting from 0): \\fIPV\\fP[:\\fIPE\\fP[+\\fIPE\\fP].\n");
+ "Start and end range (inclusive): \\fIPV\\fP[\\fB:\\fP\\fIPE\\fP[\\fB-\\fP\\fIPE\\fP]].\n"
+ "Start and length range (counting from 0): \\fIPV\\fP[\\fB:\\fP\\fIPE\\fP[\\fB+\\fP\\fIPE\\fP]].\n");
}
if (has_tag_val) {
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8d0df0c011f23095cf028…
Commit: 8d0df0c011f23095cf028c556db15b531ca91ea5
Parent: 27384c52cf6a55ec7c8d64deecff2a81536193c7
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 24 16:43:05 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 27 14:44:00 2017 -0600
commands: fixes for recent raid changes
- Combine the equivalent lvconvert --type raid defs.
(Two cmd defs must be different without relying
on LV type, which are not known at the time the
cmd def is matched.)
- Remove unused optional options from lvconvert --stripes,
and lvconvert --stripesize.
- Use Number for --stripes_long val type.
- Combine the cmd def for raid reshape cleanup into the
existing start_poll cmd def (they were duplicate defs).
Calls into the raid code from a poll opertion will be
added.
---
tools/command-lines.in | 30 ++++++++++--------------------
1 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/tools/command-lines.in b/tools/command-lines.in
index c3d684e..f8e0db7 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -338,19 +338,16 @@ ID: lvconvert_raid_types
DESC: Convert LV to type mirror (also see type raid1).
RULE: all not lv_is_locked lv_is_pvmove
+# When LV is already raid, this changes the raid layout
+# (changing layout of raid0 and raid1 not allowed.)
+
lvconvert --type raid LV
OO: OO_LVCONVERT_RAID, OO_LVCONVERT
OP: PV ...
ID: lvconvert_raid_types
-DESC: Convert LV to raid.
-RULE: all not lv_is_locked lv_is_pvmove
-
-lvconvert --type raid LV_raid
-OO: OO_LVCONVERT_RAID, OO_LVCONVERT
-ID: lvconvert_raid_types
-DESC: Convert raid LV to different layout algorithm.
+DESC: Convert LV to raid or change raid layout.
RULE: all not lv_is_locked lv_is_pvmove
-RULE: all not LV_raid0 LV_raid1
+RULE: LV_raid not LV_raid0 LV_raid1
lvconvert --mirrors SNumber LV
OO: OO_LVCONVERT_RAID, OO_LVCONVERT, --mirrorlog MirrorLog
@@ -359,8 +356,8 @@ ID: lvconvert_raid_types
DESC: Convert LV to raid1 or mirror, or change number of mirror images.
RULE: all not lv_is_locked lv_is_pvmove
-lvconvert --stripes_long SNumber LV_raid
-OO: OO_LVCONVERT_RAID, OO_LVCONVERT
+lvconvert --stripes_long Number LV_raid
+OO: OO_LVCONVERT, --interval Number, --regionsize RegionSize, --stripesize SizeKB
OP: PV ...
ID: lvconvert_raid_types
DESC: Convert raid LV to change number of stripe images.
@@ -368,7 +365,7 @@ RULE: all not lv_is_locked lv_is_pvmove
RULE: all not LV_raid0 LV_raid1
lvconvert --stripesize SizeKB LV_raid
-OO: OO_LVCONVERT_RAID, OO_LVCONVERT
+OO: OO_LVCONVERT, --interval Number, --regionsize RegionSize
ID: lvconvert_raid_types
DESC: Convert raid LV to change the stripe size.
RULE: all not lv_is_locked lv_is_pvmove
@@ -381,13 +378,6 @@ DESC: Change the region size of an LV.
RULE: all not lv_is_locked lv_is_pvmove
RULE: all not LV_raid0
-lvconvert LV_mirror_raid
-OO: OO_LVCONVERT
-ID: lvconvert_raid_types
-DESC: Remove out-of-place reshape space
-RULE: all not lv_is_locked lv_is_pvmove
-RULE: all not LV_raid0 LV_raid1
-
---
# lvconvert raid-related utilities
@@ -677,7 +667,7 @@ RULE: all not lv_is_locked lv_is_pvmove
# This command just (re)starts the polling process on the LV
# to continue a previous conversion.
-lvconvert --startpoll LV_mirror
+lvconvert --startpoll LV_mirror_raid
OO: OO_LVCONVERT
ID: lvconvert_start_poll
DESC: Poll LV to continue conversion.
@@ -685,7 +675,7 @@ RULE: all and lv_is_converting
# alternate form of lvconvert --startpoll, this is only kept
# for compat since this was how it used to be done.
-lvconvert LV_mirror
+lvconvert LV_mirror_raid
OO: OO_LVCONVERT
ID: lvconvert_start_poll
DESC: Poll LV to continue conversion.
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=27384c52cf6a55ec7c8d6…
Commit: 27384c52cf6a55ec7c8d64deecff2a81536193c7
Parent: c41e99948819e896d9d06b4a8192ec7a63facf65
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Mon Feb 27 21:42:15 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Mon Feb 27 21:42:15 2017 +0100
lvconvert: limit libdm to maximum of 64 RAID devices
Commit 64a2fad5d6c6 raised the maximum number of RAID devices to 64.
Commit e2354ea344c2 introduced RAID_BITMAP_SIZE as 4 to have
256 bits (4 * 64 bit array members), thus changing the libdm API
unnecessarilly for the time being.
To not change the API, reduce RAID_BITMAP_SIZE to 1.
Remove an unneeded definition of it from libdm-common.h.
If we ever decide to raise past 64, we'll version the API.
Related: rhbz834579
Related: rhbz1191935
Related: rhbz1191978
---
libdm/libdevmapper.h | 11 ++++++++++-
libdm/libdm-common.h | 2 --
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 7fccac5..7136261 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -1739,7 +1739,16 @@ int dm_tree_node_add_raid_target(struct dm_tree_node *node,
*/
#define DM_CACHE_METADATA_MAX_SECTORS DM_THIN_METADATA_MAX_SECTORS
-#define RAID_BITMAP_SIZE 4
+/*
+ * Define number of elements in rebuild and writemostly arrays
+ * 'of struct dm_tree_node_raid_params'.
+ *
+ * Set to one to keep the current libdm API!
+ *
+ * If we ever raise the maximum number of RAID devices past 64 thus
+ * changing the API, we have to version it for backwards API compatibility.
+ */
+#define RAID_BITMAP_SIZE 1
struct dm_tree_node_raid_params {
const char *raid_type;
diff --git a/libdm/libdm-common.h b/libdm/libdm-common.h
index a064db8..4dc1870 100644
--- a/libdm/libdm-common.h
+++ b/libdm/libdm-common.h
@@ -23,8 +23,6 @@
#define DEV_NAME(dmt) (dmt->mangled_dev_name ? : dmt->dev_name)
#define DEV_UUID(DMT) (dmt->mangled_uuid ? : dmt->uuid)
-#define RAID_BITMAP_SIZE 4
-
int mangle_string(const char *str, const char *str_name, size_t len,
char *buf, size_t buf_len, dm_string_mangling_t mode);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4f7631b4adb9c6ff…
Commit: 4f7631b4adb9c6fff5cd47b5bd733ee716d05c8f
Parent: 5f6bdf707db24e882b3c3f86f8a5f2e2d2007c98
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 24 15:11:18 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 24 15:11:18 2017 -0600
man: change option sorting in synopsis
The options list was sorted as:
- options with both long and short forms, alphabetically
- options with only long form, alphabetically
This was done only for the visual effect. Change to
sort alphabetically by long opt, without regard to
short forms.
---
tools/command.c | 55 +++++++------------------------------------------------
1 files changed, 7 insertions(+), 48 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index 5dd0298..59818f9 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -2533,10 +2533,7 @@ static void print_man_option_desc(struct command_name *cname, int opt_enum)
}
/*
- * Print a list of all options names for a given
- * command name, listed by:
- * options with short+long names, alphabetically,
- * then options with only long names, alphabetically
+ * Print a list of all options names for a given command name.
*/
void print_man_all_options_list(struct command_name *cname)
@@ -2545,63 +2542,25 @@ void print_man_all_options_list(struct command_name *cname)
int sep = 0;
int i;
- /* print those with both short and long opts */
for (i = 0; i < ARG_COUNT; i++) {
opt_enum = opt_names_alpha[i]->opt_enum;
-
if (!cname->all_options[opt_enum])
continue;
- if (!opt_names[opt_enum].short_opt)
- continue;
-
if (sep)
printf(".br\n");
printf(".ad l\n");
- printf(" \\fB-%c\\fP|\\fB%s\\fP",
- opt_names[opt_enum].short_opt,
- man_long_opt_name(cname->name, opt_enum));
-
- val_enum = opt_names[opt_enum].val_enum;
-
- if (!val_names[val_enum].fn) {
- /* takes no arg */
- } else if (!val_names[val_enum].usage) {
- printf(" ");
- printf("\\fI");
- printf("%s", val_names[val_enum].name);
- printf("\\fP");
+ if (opt_names[opt_enum].short_opt) {
+ printf(" \\fB-%c\\fP|\\fB%s\\fP",
+ opt_names[opt_enum].short_opt,
+ man_long_opt_name(cname->name, opt_enum));
} else {
- printf(" ");
- print_val_man(val_names[val_enum].usage);
+ /* spaces for alignment without short opt */
+ printf(" \\fB%s\\fP", man_long_opt_name(cname->name, opt_enum));
}
- printf("\n.ad b\n");
-
- sep = 1;
- }
-
- /* print those without short opts */
- for (i = 0; i < ARG_COUNT; i++) {
- opt_enum = opt_names_alpha[i]->opt_enum;
-
- if (!cname->all_options[opt_enum])
- continue;
-
- if (opt_names[opt_enum].short_opt)
- continue;
-
- if (sep)
- printf(".br\n");
- printf(".ad l\n");
-
- /* space alignment without short opt */
- printf(" ");
-
- printf(" \\fB%s\\fP", man_long_opt_name(cname->name, opt_enum));
-
val_enum = opt_names[opt_enum].val_enum;
if (!val_names[val_enum].fn) {
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=74ba326007205ebb…
Commit: 74ba326007205ebbb5afca7c8f74a8b19e9dcb50
Parent: 189fa647931834b0d9cb30c20d16785b8e8923c9
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 24 13:44:05 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 24 13:44:05 2017 -0600
man: use Size variable for a number with unit
Define a separate variable type Size to represent
a number that takes an optional UNIT.
---
tools/args.h | 2 +-
tools/command.c | 25 +++++++++++++++----------
tools/lvmcmdline.c | 4 ++--
tools/tools.h | 2 +-
tools/vals.h | 22 +++++++++++-----------
5 files changed, 30 insertions(+), 25 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index 036aa87..dd25007 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -987,7 +987,7 @@ arg(logicalvolume_ARG, 'l', "logicalvolume", uint32_VAL, 0, 0,
arg(maxlogicalvolumes_ARG, 'l', "maxlogicalvolumes", uint32_VAL, 0, 0,
"Sets the maximum number of LVs allowed in a VG.\n")
-arg(extents_ARG, 'l', "extents", numsignedper_VAL, 0, 0,
+arg(extents_ARG, 'l', "extents", extents_VAL, 0, 0,
"#lvcreate\n"
"Specifies the size of the new LV in logical extents.\n"
"The --size and --extents options are alternate methods of specifying size.\n"
diff --git a/tools/command.c b/tools/command.c
index 8d5a96b..4e7c009 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -79,7 +79,7 @@ static inline int size_mb_arg_with_percent(struct cmd_context *cmd, struct arg_v
static inline int int_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; }
static inline int uint32_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; }
static inline int int_arg_with_sign(struct cmd_context *cmd, struct arg_values *av) { return 0; }
-static inline int int_arg_with_sign_and_percent(struct cmd_context *cmd, struct arg_values *av) { return 0; }
+static inline int extents_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; }
static inline int major_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; }
static inline int minor_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; }
static inline int string_arg(struct cmd_context *cmd, struct arg_values *av) { return 0; }
@@ -1792,13 +1792,13 @@ static void print_val_man(const char *str)
* that isn't already obvious.
*/
- if (!strcmp(str, "Number[k|UNIT]")) {
- printf("\\fINumber\\fP[k|UNIT]");
+ if (!strcmp(str, "Size[k|UNIT]")) {
+ printf("\\fISize\\fP[k|UNIT]");
return;
}
- if (!strcmp(str, "Number[m|UNIT]")) {
- printf("\\fINumber\\fP[m|UNIT]");
+ if (!strcmp(str, "Size[m|UNIT]")) {
+ printf("\\fISize\\fP[m|UNIT]");
return;
}
@@ -2807,16 +2807,21 @@ void print_man_all_positions_desc(struct command_name *cname)
printf(".br\n");
printf("See the option description for information about the string content.\n");
- /* Nearly every command uses a number arg somewhere. */
+ /*
+ * We could possibly check if the command accepts any option that
+ * uses Size, and only print this in those cases, but this seems
+ * so common that we should probably always print it.
+ */
printf("\n.HP\n");
- printf("\\fINumber\\fP, UNIT");
+ printf("\\fISize\\fP[UNIT]");
printf("\n");
printf(".br\n");
- printf("Input units are always treated as base two values, regardless of unit\n"
+ printf("Size is an input number that accepts an optional unit.\n"
+ "Input units are always treated as base two values, regardless of\n"
"capitalization, e.g. 'k' and 'K' both refer to 1024.\n"
- "The default input unit is specified by letter, followed by |UNIT\n"
- "which represents other possible input units: \\fBbBsSkKmMgGtTpPeE\\fP.\n"
+ "The default input unit is specified by letter, followed by |UNIT.\n"
+ "UNIT represents other possible input units: \\fBbBsSkKmMgGtTpPeE\\fP.\n"
"(This should not be confused with the output control --units, where\n"
"capital letters mean multiple of 1000.)\n");
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 02266c9..9b20d9f 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -672,8 +672,8 @@ int int_arg_with_sign(struct cmd_context *cmd __attribute__((unused)), struct ar
return 1;
}
-int int_arg_with_sign_and_percent(struct cmd_context *cmd __attribute__((unused)),
- struct arg_values *av)
+int extents_arg(struct cmd_context *cmd __attribute__((unused)),
+ struct arg_values *av)
{
char *ptr;
diff --git a/tools/tools.h b/tools/tools.h
index 62db506..1e1e7f1 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -188,7 +188,7 @@ int size_mb_arg_with_percent(struct cmd_context *cmd, struct arg_values *av);
int int_arg(struct cmd_context *cmd, struct arg_values *av);
int uint32_arg(struct cmd_context *cmd, struct arg_values *av);
int int_arg_with_sign(struct cmd_context *cmd, struct arg_values *av);
-int int_arg_with_sign_and_percent(struct cmd_context *cmd, struct arg_values *av);
+int extents_arg(struct cmd_context *cmd, struct arg_values *av);
int major_arg(struct cmd_context *cmd, struct arg_values *av);
int minor_arg(struct cmd_context *cmd, struct arg_values *av);
int string_arg(struct cmd_context *cmd, struct arg_values *av);
diff --git a/tools/vals.h b/tools/vals.h
index a94f81b..d485926 100644
--- a/tools/vals.h
+++ b/tools/vals.h
@@ -79,13 +79,13 @@
* options included in the usage text below that should
* be removed? Should "lvm1" be removed?
*
- * For Number args that take optional units, a full usage
- * could be "Number[bBsSkKmMgGtTpPeE]" (with implied |),
- * but repeating this full specification produces cluttered
- * output, and doesn't indicate which unit is the default.
- * "Number[Units]" would be cleaner, as would a subset of
- * common units, e.g. "Number[kmg...]", but neither helps
- * with default. "Number[k|UNIT]" and "Number[m|UNIT]" show
+ * Size is a Number that takes an optional unit.
+ * A full usage could be "Size[b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E]"
+ * but repeating this full specification produces long and
+ * cluttered output, and doesn't indicate which unit is the default.
+ * "Size[Units]" would be cleaner, as would a subset of
+ * common units, e.g. "Size[kmg...]", but neither helps
+ * with default. "Size[k|UNIT]" and "Size[m|UNIT]" show
* the default, and "UNIT" indicates that other units
* are possible without listing them all. This also
* suggests using the preferred lower case letters, because
@@ -115,11 +115,11 @@ val(activation_VAL, activation_arg, "Active", "y|n|ay")
val(cachemode_VAL, cachemode_arg, "CacheMode", "writethrough|writeback")
val(discards_VAL, discards_arg, "Discards", "passdown|nopassdown|ignore")
val(mirrorlog_VAL, mirrorlog_arg, "MirrorLog", "core|disk")
-val(sizekb_VAL, size_kb_arg, "SizeKB", "Number[k|UNIT]")
-val(sizemb_VAL, size_mb_arg, "SizeMB", "Number[m|UNIT]")
-val(regionsize_VAL, regionsize_arg, "RegionSize", "Number[m|UNIT]")
+val(sizekb_VAL, size_kb_arg, "SizeKB", "Size[k|UNIT]")
+val(sizemb_VAL, size_mb_arg, "SizeMB", "Size[m|UNIT]")
+val(regionsize_VAL, regionsize_arg, "RegionSize", "Size[m|UNIT]")
val(numsigned_VAL, int_arg_with_sign, "SNumber", "[+|-]Number")
-val(numsignedper_VAL, int_arg_with_sign_and_percent, "SNumberP", "[+|-]Number[%VG|%PVS|%FREE]")
+val(extents_VAL, extents_arg, "Extents", "[+|-]Number[%VG|%PVS|%FREE]")
val(permission_VAL, permission_arg, "Permission", "rw|r")
val(metadatatype_VAL, metadatatype_arg, "MetadataType", "lvm2|lvm1")
val(units_VAL, string_arg, "Units", "r|R|h|H|b|B|s|S|k|K|m|M|g|G|t|T|p|P|e|E")
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=64a2fad5d6c65e81…
Commit: 64a2fad5d6c65e81269251408dff10854f0ace7e
Parent: 34caf8317243b3b30e6fc858b4440ebf3ffb8810
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Feb 24 04:41:46 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Feb 24 05:20:58 2017 +0100
lvconvert/lvcreate: raise maximum number of raid images
Because of contraints in renaming shifted rimage/rmeta LV names
the current RaidLV limit is a maximum of 10 SubLV pairs.
With the previous introduction of reshaping infratructure that
constriant got removed.
Kernel supports 253 since dm-raid target 1.9.0, older kernels 64.
Raise the maximum number of RaidLV rimage/rmeta pairs to 64.
If we want to raise past 64, we have to introdce a check for
the kernel supporting it in lvcreate/lvconvert.
Related: rhbz834579
Related: rhbz1191935
Related: rhbz1191978
---
lib/config/defaults.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/config/defaults.h b/lib/config/defaults.h
index db78f0c..5554c9c 100644
--- a/lib/config/defaults.h
+++ b/lib/config/defaults.h
@@ -71,8 +71,8 @@
* FIXME: Increase these to 64 and further to the MD maximum
* once the SubLVs split and name shift got enhanced
*/
-#define DEFAULT_RAID1_MAX_IMAGES 10
-#define DEFAULT_RAID_MAX_IMAGES 10
+#define DEFAULT_RAID1_MAX_IMAGES 64
+#define DEFAULT_RAID_MAX_IMAGES 64
#define DEFAULT_ALLOCATION_STRIPE_ALL_DEVICES 0 /* Don't stripe across all devices if not -i/--stripes given */
#define DEFAULT_RAID_FAULT_POLICY "warn"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2d74de3f05d44b2a…
Commit: 2d74de3f05d44b2ac5f651e49d29878731a114a1
Parent: 34a8d3c2fdc9da2bb1974781070d01f901862b9a
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Feb 24 03:46:14 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Feb 24 05:20:58 2017 +0100
lvconvert: add infrastructure for RaidLV reshaping support
In order to support striped raid5/6/10 LV reshaping (change
of LV type, stripesize or number of legs), this patch
introduces more local infrastructure to raid_manip.c
used by followup patches.
Change:
- enhance _clear_meta_lvs() to support raid0 allowing
raid0_meta -> raid10 conversions to succeed by clearing
the raid0 rmeta images or the kernel will fail because
of discovering reordered raid devices
Related: rhbz834579
Related: rhbz1191935
Related: rhbz1191978
---
lib/metadata/raid_manip.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 2b5559a..fc02d3d 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -4579,6 +4579,7 @@ static int _raid1_to_mirrored_wrapper(TAKEOVER_FN_ARGS)
* order to wipe them then reattach and set back to raid0_meta.
*
* Same applies to raid4 <-> raid5.
+ * Same applies to raid10 -> raid0_meta.
*/
static int _clear_meta_lvs(struct logical_volume *lv)
{
@@ -4588,11 +4589,11 @@ static int _clear_meta_lvs(struct logical_volume *lv)
const struct segment_type *tmp_segtype;
struct dm_list meta_lvs;
struct lv_list *lvl_array, *lvl;
- int is_raid4_or_5N = seg_is_raid4(seg) || seg_is_raid5_n(seg);
+ int is_raid45n10 = seg_is_raid4(seg) || seg_is_raid5_n(seg) || seg_is_raid10(seg);
/* Reject non-raid0_meta/raid4/raid5_n segment types cautiously */
if (!seg->meta_areas ||
- (!seg_is_raid0_meta(seg) && !is_raid4_or_5N))
+ (!seg_is_raid0_meta(seg) && !is_raid45n10))
return_0;
if (!(lvl_array = dm_pool_alloc(lv->vg->vgmem, seg->area_count * sizeof(*lvl_array))))
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=92691e345d12515d…
Commit: 92691e345d12515d61e6e7748e5b9ddc4eff49c0
Parent: c1865b0a864e0623b2395c96e7853e4637e46772
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Feb 24 01:57:04 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Feb 24 05:20:58 2017 +0100
lvconvert: add infrastructure for RaidLV reshaping support
In order to support striped raid5/6/10 LV reshaping (change
of LV type, stripesize or number of legs), this patch
introduces more local infrastructure to raid_manip.c
used by followup patches.
Changes:
- add lv_raid_data_copies returning raid type specific number;
needed for raid10 with more than 2 data copies
- remove _shift_and_rename_image_components() constraint
to support more than 10 raid legs
- add function to calculate total rimage length used by out-of-place
reshape space allocation
- add out-of-place reshape space alloc/relocate/free functions
- move _data_rimages_count() used by reshape space alloc/realocate functions
Related: rhbz834579
Related: rhbz1191935
Related: rhbz1191978
---
lib/metadata/lv_manip.c | 2 +-
lib/metadata/raid_manip.c | 470 ++++++++++++++++++++++++++++++++++++++++++---
lib/raid/raid.c | 2 +-
3 files changed, 443 insertions(+), 31 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index f3cad09..b98391b 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -957,7 +957,7 @@ struct lv_segment *alloc_lv_segment(const struct segment_type *segtype,
seg->stripe_size = stripe_size;
seg->area_count = area_count;
seg->area_len = area_len;
- seg->data_copies = data_copies ? : 0; // lv_raid_data_copies(segtype, area_count);
+ seg->data_copies = data_copies ? : lv_raid_data_copies(segtype, area_count);
seg->chunk_size = chunk_size;
seg->region_size = region_size;
seg->extents_copied = extents_copied;
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 70e0a55..b2a5572 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -708,12 +708,11 @@ static int _reorder_raid10_near_seg_areas(struct lv_segment *seg, enum raid0_rai
*
* Returns: 1 on success, 0 on failure
*/
+static char *_generate_raid_name(struct logical_volume *lv,
+ const char *suffix, int count);
static int _shift_and_rename_image_components(struct lv_segment *seg)
{
- int len;
- char *shift_name;
uint32_t s, missing;
- struct cmd_context *cmd = seg->lv->vg->cmd;
/*
* All LVs must be properly named for their index before
@@ -724,21 +723,12 @@ static int _shift_and_rename_image_components(struct lv_segment *seg)
if (!seg_is_raid(seg))
return_0;
- if (seg->area_count > 10) {
- /*
- * FIXME: Handling more would mean I'd have
- * to handle double digits
- */
- log_error("Unable handle arrays with more than 10 devices.");
- return 0;
- }
-
log_very_verbose("Shifting images in %s.", display_lvname(seg->lv));
for (s = 0, missing = 0; s < seg->area_count; s++) {
if (seg_type(seg, s) == AREA_UNASSIGNED) {
if (seg_metatype(seg, s) != AREA_UNASSIGNED) {
- log_error(INTERNAL_ERROR "Metadata segment area"
+ log_error(INTERNAL_ERROR "Metadata segment area."
" #%d should be AREA_UNASSIGNED.", s);
return 0;
}
@@ -753,24 +743,16 @@ static int _shift_and_rename_image_components(struct lv_segment *seg)
display_lvname(seg_lv(seg, s)), missing);
/* Alter rmeta name */
- shift_name = dm_pool_strdup(cmd->mem, seg_metalv(seg, s)->name);
- if (!shift_name) {
+ if (!(seg_metalv(seg, s)->name = _generate_raid_name(seg->lv, "rmeta", s - missing))) {
log_error("Memory allocation failed.");
return 0;
}
- len = strlen(shift_name) - 1;
- shift_name[len] -= missing;
- seg_metalv(seg, s)->name = shift_name;
/* Alter rimage name */
- shift_name = dm_pool_strdup(cmd->mem, seg_lv(seg, s)->name);
- if (!shift_name) {
+ if (!(seg_lv(seg, s)->name = _generate_raid_name(seg->lv, "rimage", s - missing))) {
log_error("Memory allocation failed.");
return 0;
}
- len = strlen(shift_name) - 1;
- shift_name[len] -= missing;
- seg_lv(seg, s)->name = shift_name;
seg->areas[s - missing] = seg->areas[s];
seg->meta_areas[s - missing] = seg->meta_areas[s];
@@ -1030,6 +1012,442 @@ uint32_t raid_rimage_extents(const struct segment_type *segtype,
return r > UINT_MAX ? 0 : (uint32_t) r;
}
+/* Return number of data copies for @segtype */
+uint32_t lv_raid_data_copies(const struct segment_type *segtype, uint32_t area_count)
+{
+ if (segtype_is_any_raid10(segtype))
+ /* FIXME: change for variable number of data copies */
+ return 2;
+ else if (segtype_is_mirrored(segtype))
+ return area_count;
+ else if (segtype_is_striped_raid(segtype))
+ return segtype->parity_devs + 1;
+ return 1;
+}
+
+
+/* Return data images count for @total_rimages depending on @seg's type */
+static uint32_t _data_rimages_count(const struct lv_segment *seg, const uint32_t total_rimages)
+{
+ if (!seg_is_thin(seg) && total_rimages <= seg->segtype->parity_devs)
+ return_0;
+
+ return total_rimages - seg->segtype->parity_devs;
+}
+
+/* Get total area len of @lv, i.e. sum of area_len of all segments */
+static uint32_t _lv_total_rimage_len(struct logical_volume *lv)
+{
+ uint32_t s;
+ struct lv_segment *seg = first_seg(lv);
+
+ if (seg_is_raid(seg)) {
+ for (s = 0; s < seg->area_count; s++)
+ if (seg_lv(seg, s))
+ return seg_lv(seg, s)->le_count;
+ } else
+ return lv->le_count;
+
+ return_0;
+}
+
+/*
+ * HM helper:
+ *
+ * Compare the raid levels in segtype @t1 and @t2
+ *
+ * Return 1 if same, else 0
+ */
+static int _cmp_level(const struct segment_type *t1, const struct segment_type *t2)
+{
+ if ((segtype_is_any_raid10(t1) && !segtype_is_any_raid10(t2)) ||
+ (!segtype_is_any_raid10(t1) && segtype_is_any_raid10(t2)))
+ return 0;
+
+ return !strncmp(t1->name, t2->name, 5);
+}
+
+/*
+ * HM Helper:
+ *
+ * Check for same raid levels in segtype @t1 and @t2
+ *
+ * Return 1 if same, else != 1
+ */
+__attribute__ ((__unused__))
+static int is_same_level(const struct segment_type *t1, const struct segment_type *t2)
+{
+ return _cmp_level(t1, t2);
+}
+
+/* Return # of reshape LEs per device for @seg */
+static uint32_t _reshape_len_per_dev(struct lv_segment *seg)
+{
+ return seg->reshape_len;
+}
+
+/* Return # of reshape LEs per @lv (sum of all sub LVs reshape LEs) */
+static uint32_t _reshape_len_per_lv(struct logical_volume *lv)
+{
+ struct lv_segment *seg = first_seg(lv);
+
+ return _reshape_len_per_dev(seg) * _data_rimages_count(seg, seg->area_count);
+}
+
+/*
+ * HM Helper:
+ *
+ * store the allocated reshape length per data image
+ * in the only segment of the top-level RAID @lv and
+ * in the first segment of each sub lv.
+ */
+static int _lv_set_reshape_len(struct logical_volume *lv, uint32_t reshape_len)
+{
+ uint32_t s;
+ struct lv_segment *data_seg, *seg = first_seg(lv);
+
+ if (reshape_len >= lv->le_count - 1)
+ return_0;
+
+ seg->reshape_len = reshape_len;
+
+ for (s = 0; s < seg->area_count; s++) {
+ if (!seg_lv(seg, s))
+ return_0;
+
+ reshape_len = seg->reshape_len;
+ dm_list_iterate_items(data_seg, &seg_lv(seg, s)->segments) {
+ data_seg->reshape_len = reshape_len;
+ reshape_len = 0;
+ }
+ }
+
+ return 1;
+}
+
+/* HM Helper:
+ *
+ * correct segments logical start extents in all sub LVs of @lv
+ * after having reordered any segments in sub LVs e.g. because of
+ * reshape space (re)allocation.
+ */
+static int _lv_set_image_lvs_start_les(struct logical_volume *lv)
+{
+ uint32_t le, s;
+ struct lv_segment *data_seg, *seg = first_seg(lv);
+
+
+ for (s = 0; s < seg->area_count; s++) {
+ if (!seg_lv(seg, s))
+ return_0;
+
+ le = 0;
+ dm_list_iterate_items(data_seg, &(seg_lv(seg, s)->segments)) {
+ data_seg->reshape_len = le ? 0 : seg->reshape_len;
+ data_seg->le = le;
+ le += data_seg->len;
+ }
+ }
+
+ /* Try merging rimage sub LV segments _after_ adjusting start LEs */
+ for (s = 0; s < seg->area_count; s++)
+ if (!lv_merge_segments(seg_lv(seg, s)))
+ return_0;
+
+ return 1;
+}
+
+/*
+ * Relocate @out_of_place_les_per_disk from @lv's data images begin <-> end depending on @where
+ *
+ * @where:
+ * alloc_begin: end -> begin
+ * alloc_end: begin -> end
+ */
+enum alloc_where { alloc_begin, alloc_end, alloc_anywhere, alloc_none };
+static int _lv_relocate_reshape_space(struct logical_volume *lv, enum alloc_where where)
+{
+ uint32_t le, begin, end, s;
+ struct logical_volume *dlv;
+ struct dm_list *insert;
+ struct lv_segment *data_seg, *seg = first_seg(lv);
+
+ if (!_reshape_len_per_dev(seg))
+ return_0;
+
+ /*
+ * Move the reshape LEs of each stripe (i.e. the data image sub lv)
+ * in the first/last segment(s) across to the opposite end of the
+ * address space
+ */
+ for (s = 0; s < seg->area_count; s++) {
+ if (!(dlv = seg_lv(seg, s)))
+ return_0;
+
+ switch (where) {
+ case alloc_begin:
+ /* Move to the beginning -> start moving to the beginning from "end - reshape LEs" to end */
+ begin = dlv->le_count - _reshape_len_per_dev(seg);
+ end = dlv->le_count;
+ break;
+ case alloc_end:
+ /* Move to the end -> start moving to the end from 0 and end with reshape LEs */
+ begin = 0;
+ end = _reshape_len_per_dev(seg);
+ break;
+ default:
+ log_error(INTERNAL_ERROR "bogus reshape space reallocation request [%d]", where);
+ return 0;
+ }
+
+ /* Ensure segment boundary at begin/end of reshape space */
+ if (!lv_split_segment(dlv, begin ?: end))
+ return_0;
+
+ /* Select destination to move to (begin/end) */
+ insert = begin ? dlv->segments.n : &dlv->segments;
+ if (!(data_seg = find_seg_by_le(dlv, begin)))
+ return_0;
+
+ le = begin;
+ while (le < end) {
+ struct dm_list *n = data_seg->list.n;
+
+ le += data_seg->len;
+
+ dm_list_move(insert, &data_seg->list);
+
+ /* If moving to the begin, adjust insertion point so that we don't reverse order */
+ if (begin)
+ insert = data_seg->list.n;
+
+ data_seg = dm_list_item(n, struct lv_segment);
+ }
+
+ le = 0;
+ dm_list_iterate_items(data_seg, &dlv->segments) {
+ data_seg->reshape_len = le ? 0 : _reshape_len_per_dev(seg);
+ data_seg->le = le;
+ le += data_seg->len;
+ }
+ }
+
+ return 1;
+}
+
+/*
+ * Check if we've got out of space reshape
+ * capacity in @lv and allocate if necessary.
+ *
+ * We inquire the targets status interface to retrieve
+ * the current data_offset and the device size and
+ * compare that to the size of the component image LV
+ * to tell if an extension of the LV is needed or
+ * existing space can just be used,
+ *
+ * Three different scenarios need to be covered:
+ *
+ * - we have to reshape forwards
+ * (true for adding disks to a raid set) ->
+ * add extent to each component image upfront
+ * or move an existing one at the end across;
+ * kernel will set component devs data_offset to
+ * the passed in one and new_data_offset to 0,
+ * i.e. the data starts at offset 0 after the reshape
+ *
+ * - we have to reshape backwards
+ * (true for removing disks form a raid set) ->
+ * add extent to each component image by the end
+ * or use already existing one from a previous reshape;
+ * kernel will leave the data_offset of each component dev
+ * at 0 and set new_data_offset to the passed in one,
+ * i.e. the data will be at offset new_data_offset != 0
+ * after the reshape
+ *
+ * - we are free to reshape either way
+ * (true for layout changes keeping number of disks) ->
+ * let the kernel identify free out of place reshape space
+ * and select the appropriate data_offset and reshape direction
+ *
+ * Kernel will always be told to put data offset
+ * on an extent boundary.
+ * When we convert to mappings outside MD ones such as linear,
+ * striped and mirror _and_ data_offset != 0, split the first segment
+ * and adjust the rest to remove the reshape space.
+ * If it's at the end, just lv_reduce() and set seg->reshape_len to 0.
+ *
+ * Does not write metadata!
+ */
+static int _lv_alloc_reshape_space(struct logical_volume *lv,
+ enum alloc_where where,
+ enum alloc_where *where_it_was,
+ struct dm_list *allocate_pvs)
+{
+ uint32_t out_of_place_les_per_disk;
+ uint64_t data_offset;
+ struct lv_segment *seg = first_seg(lv);
+
+ if (!seg->stripe_size)
+ return_0;
+
+ /* Ensure min out-of-place reshape space 1 MiB */
+ out_of_place_les_per_disk = max(2048U, (unsigned) seg->stripe_size);
+ out_of_place_les_per_disk = (uint32_t) max(out_of_place_les_per_disk / (unsigned long long) lv->vg->extent_size, 1ULL);
+
+ /* Get data_offset and dev_sectors from the kernel */
+ if (!lv_raid_data_offset(lv, &data_offset)) {
+ log_error("Can't get data offset and dev size for %s from kernel.",
+ display_lvname(lv));
+ return 0;
+ }
+
+ /*
+ * If we have reshape space allocated and it has to grow,
+ * relocate it to the end in case kernel says it is at the
+ * beginning in order to grow the LV.
+ */
+ if (_reshape_len_per_dev(seg)) {
+ if (out_of_place_les_per_disk > _reshape_len_per_dev(seg)) {
+ /* Kernel says data is at data_offset > 0 -> relocate reshape space at the begin to the end */
+ if (data_offset && !_lv_relocate_reshape_space(lv, alloc_end))
+ return_0;
+
+ data_offset = 0;
+ out_of_place_les_per_disk -= _reshape_len_per_dev(seg);
+ } else
+ out_of_place_les_per_disk = 0;
+ }
+
+ /*
+ * If we don't reshape space allocated extend the LV.
+ *
+ * first_seg(lv)->reshape_len (only segment of top level raid LV)
+ * is accounting for the data rimages so that unchanged
+ * lv_extend()/lv_reduce() can be used to allocate/free,
+ * because seg->len etc. still holds the whole size as before
+ * including the reshape space
+ */
+ if (out_of_place_les_per_disk) {
+ uint32_t data_rimages = _data_rimages_count(seg, seg->area_count);
+ uint32_t reshape_len = out_of_place_les_per_disk * data_rimages;
+ uint32_t prev_rimage_len = _lv_total_rimage_len(lv);
+ uint64_t lv_size = lv->size;
+
+ if (!lv_extend(lv, seg->segtype, data_rimages,
+ seg->stripe_size, 1, seg->region_size,
+ reshape_len /* # of reshape LEs to add */,
+ allocate_pvs, lv->alloc, 0)) {
+ log_error("Failed to allocate out-of-place reshape space for %s.",
+ display_lvname(lv));
+ return 0;
+ }
+
+ lv->size = lv_size;
+ /* pay attention to lv_extend maybe having allocated more because of layout specific rounding */
+ if (!_lv_set_reshape_len(lv, _lv_total_rimage_len(lv) - prev_rimage_len))
+ return 0;
+ }
+
+ /* Preset data offset in case we fail relocating reshape space below */
+ seg->data_offset = 0;
+
+ /*
+ * Handle reshape space relocation
+ */
+ switch (where) {
+ case alloc_begin:
+ /* Kernel says data is at data_offset == 0 -> relocate reshape space at the end to the begin */
+ if (!data_offset && !_lv_relocate_reshape_space(lv, where))
+ return_0;
+ break;
+
+ case alloc_end:
+ /* Kernel says data is at data_offset > 0 -> relocate reshape space at the begin to the end */
+ if (data_offset && !_lv_relocate_reshape_space(lv, where))
+ return_0;
+ break;
+
+ case alloc_anywhere:
+ /* We don't care where the space is, kernel will just toggle data_offset accordingly */
+ break;
+
+ default:
+ log_error(INTERNAL_ERROR "Bogus reshape space allocation request.");
+ return 0;
+ }
+
+ if (where_it_was)
+ *where_it_was = data_offset ? alloc_begin : alloc_end;
+
+ /* Inform kernel about the reshape length in sectors */
+ seg->data_offset = _reshape_len_per_dev(seg) * lv->vg->extent_size;
+
+ return _lv_set_image_lvs_start_les(lv);
+}
+
+/* Remove any reshape space from the data LVs of @lv */
+static int _lv_free_reshape_space_with_status(struct logical_volume *lv, enum alloc_where *where_it_was)
+{
+ uint32_t total_reshape_len;
+ struct lv_segment *seg = first_seg(lv);
+
+ if ((total_reshape_len = _reshape_len_per_lv(lv))) {
+ enum alloc_where where;
+ /*
+ * raid10:
+ *
+ * the allocator will have added times #data_copies stripes,
+ * so we need to lv_reduce() less visible size.
+ */
+ if (seg_is_any_raid10(seg)) {
+ if (total_reshape_len % seg->data_copies)
+ return_0;
+
+ total_reshape_len /= seg->data_copies;
+ }
+
+ /*
+ * Got reshape space on request to free it.
+ *
+ * If it happens to be at the beginning of
+ * the data LVs, remap it to the end in order
+ * to be able to free it via lv_reduce().
+ */
+ if (!_lv_alloc_reshape_space(lv, alloc_end, &where, NULL))
+ return_0;
+
+ seg->extents_copied = first_seg(lv)->area_len;
+ if (!lv_reduce(lv, total_reshape_len))
+ return_0;
+
+ seg->extents_copied = first_seg(lv)->area_len;
+
+ if (!_lv_set_reshape_len(lv, 0))
+ return 0;
+
+ /*
+ * Only in case reshape space was freed at the beginning,
+ * which is indicated by "where == alloc_begin",
+ * tell kernel to adjust data_offsets on raid devices to 0.
+ *
+ * The special, unused value '1' for seg->data_offset will cause
+ * "data_offset 0" to be emitted in the segment line.
+ */
+ seg->data_offset = (where == alloc_begin) ? 1 : 0;
+
+ } else if (where_it_was)
+ *where_it_was = alloc_none;
+
+ return 1;
+}
+
+__attribute__ ((__unused__))
+static int _lv_free_reshape_space(struct logical_volume *lv)
+{
+ return _lv_free_reshape_space_with_status(lv, NULL);
+}
+
+
/*
* _alloc_rmeta_for_lv
* @lv
@@ -4088,12 +4506,6 @@ static takeover_fn_t _get_takeover_fn(const struct lv_segment *seg, const struct
return _takeover_fns[_segtype_ix(seg->segtype, seg->area_count)][_segtype_ix(new_segtype, new_image_count)];
}
-/* Number of data (not parity) rimages */
-static uint32_t _data_rimages_count(const struct lv_segment *seg, const uint32_t total_rimages)
-{
- return total_rimages - seg->segtype->parity_devs;
-}
-
/*
* Determine whether data_copies, stripes, stripe_size are
* possible for conversion from seg_from to new_segtype.
diff --git a/lib/raid/raid.c b/lib/raid/raid.c
index 398e8b0..59db437 100644
--- a/lib/raid/raid.c
+++ b/lib/raid/raid.c
@@ -171,7 +171,7 @@ static int _raid_text_import(struct lv_segment *seg,
}
if (seg->data_copies < 2)
- seg->data_copies = 0; // lv_raid_data_copies(seg->segtype, seg->area_count);
+ seg->data_copies = lv_raid_data_copies(seg->segtype, seg->area_count);
if (seg_is_any_raid0(seg))
seg->area_len /= seg->area_count;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3fd3c9430d5f0b32…
Commit: 3fd3c9430d5f0b3291c0111ddcd4ddd524dd26ed
Parent: 8ab072507706fb826eee05eb369429ad0a7a406a
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Feb 23 14:24:28 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Feb 23 14:24:28 2017 -0600
man/help: change syntax to UNIT
(Change to recent commit 3f4ecaf8c2.)
Use --foo Number[k|UNIT] to indicate that
the default units of the number is k, but other
units listed below are also accepted.
Previously, underlined/italic Unit was used,
like other of variables, but this UNIT is more
like a shortcut than an actual variable.
---
tools/command.c | 18 ++++++++++--------
tools/vals.h | 10 +++++-----
2 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index c3c1960..04b44ad 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -1786,19 +1786,19 @@ static void print_val_man(const char *str)
int i;
/*
- * Doing bold k before underlined Unit creates a lot of
+ * Doing bold k before UNIT creates a lot of
* visual "noise" that makes the text hard to read.
* The extra markup in this case doesn't add anything
* that isn't already obvious.
*/
- if (!strcmp(str, "Number[k|Unit]")) {
- printf("\\fINumber\\fP[k|\\fIUnit\\fP]");
+ if (!strcmp(str, "Number[k|UNIT]")) {
+ printf("\\fINumber\\fP[k|UNIT]");
return;
}
- if (!strcmp(str, "Number[m|Unit]")) {
- printf("\\fINumber\\fP[m|\\fIUnit\\fP]");
+ if (!strcmp(str, "Number[m|UNIT]")) {
+ printf("\\fINumber\\fP[m|UNIT]");
return;
}
@@ -2798,13 +2798,15 @@ void print_man_all_positions_desc(struct command_name *cname)
/* Nearly every command uses a number arg somewhere. */
printf("\n.HP\n");
- printf("\\fINumber\\fP, \\fIUnit\\fP");
+ printf("\\fINumber\\fP, UNIT");
printf("\n");
printf(".br\n");
printf("Input units are always treated as base two values, regardless of unit\n"
"capitalization, e.g. 'k' and 'K' both refer to 1024.\n"
- "The default input unit is specified by letter, followed by |\\fIUnit\\fP\n"
- "which represents other possible input units: \\fBbBsSkKmMgGtTpPeE\\fP.\n");
+ "The default input unit is specified by letter, followed by |UNIT\n"
+ "which represents other possible input units: \\fBbBsSkKmMgGtTpPeE\\fP.\n"
+ "(This should not be confused with the output control --units, where\n"
+ "capital letters mean multiple of 1000.)\n");
printf("\n.HP\n");
printf("Environment");
diff --git a/tools/vals.h b/tools/vals.h
index 3eb27e9..a94f81b 100644
--- a/tools/vals.h
+++ b/tools/vals.h
@@ -85,8 +85,8 @@
* output, and doesn't indicate which unit is the default.
* "Number[Units]" would be cleaner, as would a subset of
* common units, e.g. "Number[kmg...]", but neither helps
- * with default. "Number[k|Unit]" and "Number[m|Unit]" show
- * the default, and "Unit" indicates that other units
+ * with default. "Number[k|UNIT]" and "Number[m|UNIT]" show
+ * the default, and "UNIT" indicates that other units
* are possible without listing them all. This also
* suggests using the preferred lower case letters, because
* --size and other option args treat upper/lower letters
@@ -115,9 +115,9 @@ val(activation_VAL, activation_arg, "Active", "y|n|ay")
val(cachemode_VAL, cachemode_arg, "CacheMode", "writethrough|writeback")
val(discards_VAL, discards_arg, "Discards", "passdown|nopassdown|ignore")
val(mirrorlog_VAL, mirrorlog_arg, "MirrorLog", "core|disk")
-val(sizekb_VAL, size_kb_arg, "SizeKB", "Number[k|Unit]")
-val(sizemb_VAL, size_mb_arg, "SizeMB", "Number[m|Unit]")
-val(regionsize_VAL, regionsize_arg, "RegionSize", "Number[m|Unit]")
+val(sizekb_VAL, size_kb_arg, "SizeKB", "Number[k|UNIT]")
+val(sizemb_VAL, size_mb_arg, "SizeMB", "Number[m|UNIT]")
+val(regionsize_VAL, regionsize_arg, "RegionSize", "Number[m|UNIT]")
val(numsigned_VAL, int_arg_with_sign, "SNumber", "[+|-]Number")
val(numsignedper_VAL, int_arg_with_sign_and_percent, "SNumberP", "[+|-]Number[%VG|%PVS|%FREE]")
val(permission_VAL, permission_arg, "Permission", "rw|r")
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=8ab072507706fb82…
Commit: 8ab072507706fb826eee05eb369429ad0a7a406a
Parent: 3f4ecaf8c2b3146e81bcb32bd4f0321beee1192a
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Thu Feb 23 15:09:29 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Thu Feb 23 15:09:29 2017 +0100
lvchange: reject writemostly/writebehind on raid1 during resync
The MD kernel raid1 personality does no use any writemostly leg as the primary.
In case a previous linear LV holding data gets upconverted to
raid1 it becomes the primary leg of the new raid1 LV and a full
resynchronization is started to update the new legs.
No writemostly and/or writebehind setting may be allowed during
this initial, full synchronization period of this new raid1 LV
(using the lvchange(8) command), because that would change the
primary (i.e the previous linear LV) thus causing data loss.
lvchange has a bug not preventing this scenario.
Fix rejects setting writemostly and/or writebehind on resychronizing raid1 LVs.
Once we have status in the lvm2 metadata about the linear -> raid upconversion,
we may relax this constraint for other types of resynchronization
(e.g. for user requested "lvchange --resync ").
New lvchange-raid1-writemostly.sh test is added to the test suite.
Resolves: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855895
---
WHATS_NEW | 1 +
lib/metadata/metadata-exported.h | 1 +
lib/metadata/raid_manip.c | 8 +++++-
test/shell/lvchange-raid1-writemostly.sh | 41 ++++++++++++++++++++++++++++++
tools/lvchange.c | 15 +++++++++++
5 files changed, 65 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 722b6f6..14109fb 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.169 -
=====================================
+ Reject writemostly/writebehind in lvchange during resynchronization.
Deactivate active origin first before removal for improved workflow.
Fix regression of accepting options --type and -m with lvresize (2.02.158).
Add lvconvert --swapmetadata, new specific way to swap pool metadata LVs.
diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h
index 573c09d..e4d2267 100644
--- a/lib/metadata/metadata-exported.h
+++ b/lib/metadata/metadata-exported.h
@@ -1232,6 +1232,7 @@ uint32_t raid_rimage_extents(const struct segment_type *segtype,
uint32_t raid_ensure_min_region_size(const struct logical_volume *lv, uint64_t raid_size, uint32_t region_size);
int lv_raid_change_region_size(struct logical_volume *lv,
int yes, int force, uint32_t new_region_size);
+int lv_raid_in_sync(const struct logical_volume *lv);
/* -- metadata/raid_manip.c */
/* ++ metadata/cache_manip.c */
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index cdd7af8..b6215a2 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -238,7 +238,7 @@ static int _deactivate_and_remove_lvs(struct volume_group *vg, struct dm_list *r
* Returns: 1 if in-sync, 0 otherwise.
*/
#define _RAID_IN_SYNC_RETRIES 6
-static int _raid_in_sync(struct logical_volume *lv)
+static int _raid_in_sync(const struct logical_volume *lv)
{
int retries = _RAID_IN_SYNC_RETRIES;
dm_percent_t sync_percent;
@@ -269,6 +269,12 @@ static int _raid_in_sync(struct logical_volume *lv)
return (sync_percent == DM_PERCENT_100) ? 1 : 0;
}
+/* External interface to raid in-sync check */
+int lv_raid_in_sync(const struct logical_volume *lv)
+{
+ return _raid_in_sync(lv);
+}
+
/* Check if RaidLV @lv is synced or any raid legs of @lv are not synced */
static int _raid_devs_sync_healthy(struct logical_volume *lv)
{
diff --git a/test/shell/lvchange-raid1-writemostly.sh b/test/shell/lvchange-raid1-writemostly.sh
new file mode 100644
index 0000000..edf11bd
--- /dev/null
+++ b/test/shell/lvchange-raid1-writemostly.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# Copyright (C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA2110-1301 USA
+
+SKIP_WITH_LVMLOCKD=1
+SKIP_WITH_LVMPOLLD=1
+
+. lib/inittest
+
+which mkfs.ext4 || skip
+aux have_raid 1 3 5 || skip
+
+aux prepare_vg 4
+
+for d in $dev1 $dev2 $dev3 $dev4
+do
+ aux delay_dev $d 1
+done
+
+#
+# Test writemostly prohibited on resyncrhonizing raid1
+#
+
+# Create 4-way striped LV
+lvcreate -aey --ty raid1 -m 3 -L 32M -n $lv1 $vg
+not lvchange -y --writemostly $dev1 $vg/$lv1
+check lv_field $vg/$lv1 segtype "raid1"
+check lv_field $vg/$lv1 stripes 4
+check lv_attr_bit health $vg/${lv1}_rimage_0 "-"
+aux wait_for_sync $vg $lv1
+lvchange -y --writemostly $dev1 $vg/$lv1
+check lv_attr_bit health $vg/${lv1}_rimage_0 "w"
+
+vgremove -ff $vg
diff --git a/tools/lvchange.c b/tools/lvchange.c
index 1c00b76..cba0496 100644
--- a/tools/lvchange.c
+++ b/tools/lvchange.c
@@ -739,6 +739,21 @@ static int _lvchange_writemostly(struct logical_volume *lv)
struct cmd_context *cmd = lv->vg->cmd;
struct lv_segment *raid_seg = first_seg(lv);
+ /*
+ * Prohibit writebehind and writebehind during synchronization.
+ *
+ * FIXME: we can do better once we can distingush between
+ * an initial sync after a linear -> raid1 upconversion
+ * and any later additions of legs, requested resyncs
+ * via lvchange or leg repairs/replacements.
+ */
+ if (!lv_raid_in_sync(lv)) {
+ log_error("Unable to change write%s on %s while it is not in-sync.",
+ arg_is_set(cmd, writemostly_ARG) ? "mostly" : "behind",
+ display_lvname(lv));
+ return 0;
+ }
+
if (arg_is_set(cmd, writebehind_ARG))
raid_seg->writebehind = arg_uint_value(cmd, writebehind_ARG, 0);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3f4ecaf8c2b3146e…
Commit: 3f4ecaf8c2b3146e81bcb32bd4f0321beee1192a
Parent: da634bfc8933619a70284077b499c82802f04ceb
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Feb 22 16:50:30 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Feb 22 16:50:30 2017 -0600
man/help: improve the style of units indicator
We use --foo Number[k|Units] to indicate that
the default units of the number is k, but other
units listed below are also accepted.
Capitalize and underline Units so it is consistent
with other variables, and reference it at the end.
Technically, the k should be bold, but this
tends to make the text visually hard to read
because of the excessive highlights scattered
everywhere. So it's left normal text for now
(it's unlikely to confuse anyone.)
---
tools/command.c | 19 +++++++++----------
tools/vals.h | 12 ++++++------
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index 1a5fbb5..c3c1960 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -1786,20 +1786,19 @@ static void print_val_man(const char *str)
int i;
/*
- * The suffix [k|unit] is just printed in plain text.
- * Doing bold k and underlined unit creates a lot of
- * visual "noise" that is choppy and hard to read.
+ * Doing bold k before underlined Unit creates a lot of
+ * visual "noise" that makes the text hard to read.
* The extra markup in this case doesn't add anything
* that isn't already obvious.
*/
- if (!strcmp(str, "Number[k|unit]")) {
- printf("\\fINumber\\fP[k|unit]");
+ if (!strcmp(str, "Number[k|Unit]")) {
+ printf("\\fINumber\\fP[k|\\fIUnit\\fP]");
return;
}
- if (!strcmp(str, "Number[m|unit]")) {
- printf("\\fINumber\\fP[m|unit]");
+ if (!strcmp(str, "Number[m|Unit]")) {
+ printf("\\fINumber\\fP[m|\\fIUnit\\fP]");
return;
}
@@ -2799,13 +2798,13 @@ void print_man_all_positions_desc(struct command_name *cname)
/* Nearly every command uses a number arg somewhere. */
printf("\n.HP\n");
- printf("\\fINumber\\fP");
+ printf("\\fINumber\\fP, \\fIUnit\\fP");
printf("\n");
printf(".br\n");
printf("Input units are always treated as base two values, regardless of unit\n"
"capitalization, e.g. 'k' and 'K' both refer to 1024.\n"
- "The default input unit is specified by letter, followed by |unit which\n"
- "represents other possible input units: bBsSkKmMgGtTpPeE.\n");
+ "The default input unit is specified by letter, followed by |\\fIUnit\\fP\n"
+ "which represents other possible input units: \\fBbBsSkKmMgGtTpPeE\\fP.\n");
printf("\n.HP\n");
printf("Environment");
diff --git a/tools/vals.h b/tools/vals.h
index 4dc3a61..3eb27e9 100644
--- a/tools/vals.h
+++ b/tools/vals.h
@@ -83,10 +83,10 @@
* could be "Number[bBsSkKmMgGtTpPeE]" (with implied |),
* but repeating this full specification produces cluttered
* output, and doesn't indicate which unit is the default.
- * "Number[units]" would be cleaner, as would a subset of
+ * "Number[Units]" would be cleaner, as would a subset of
* common units, e.g. "Number[kmg...]", but neither helps
- * with default. "Number[k|unit]" and "Number[m|unit]" show
- * the default, and "unit" indicates that other units
+ * with default. "Number[k|Unit]" and "Number[m|Unit]" show
+ * the default, and "Unit" indicates that other units
* are possible without listing them all. This also
* suggests using the preferred lower case letters, because
* --size and other option args treat upper/lower letters
@@ -115,9 +115,9 @@ val(activation_VAL, activation_arg, "Active", "y|n|ay")
val(cachemode_VAL, cachemode_arg, "CacheMode", "writethrough|writeback")
val(discards_VAL, discards_arg, "Discards", "passdown|nopassdown|ignore")
val(mirrorlog_VAL, mirrorlog_arg, "MirrorLog", "core|disk")
-val(sizekb_VAL, size_kb_arg, "SizeKB", "Number[k|unit]")
-val(sizemb_VAL, size_mb_arg, "SizeMB", "Number[m|unit]")
-val(regionsize_VAL, regionsize_arg, "RegionSize", "Number[m|unit]")
+val(sizekb_VAL, size_kb_arg, "SizeKB", "Number[k|Unit]")
+val(sizemb_VAL, size_mb_arg, "SizeMB", "Number[m|Unit]")
+val(regionsize_VAL, regionsize_arg, "RegionSize", "Number[m|Unit]")
val(numsigned_VAL, int_arg_with_sign, "SNumber", "[+|-]Number")
val(numsignedper_VAL, int_arg_with_sign_and_percent, "SNumberP", "[+|-]Number[%VG|%PVS|%FREE]")
val(permission_VAL, permission_arg, "Permission", "rw|r")
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=da634bfc8933619a…
Commit: da634bfc8933619a70284077b499c82802f04ceb
Parent: 1eb1869626cbdacbeca037fbd81d01756f2faa76
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Feb 22 16:38:54 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Feb 22 16:38:54 2017 -0600
man: indicate repeatable options
Print ... after a repeatable option in the OPTIONS section.
An alternative would be to just mention in the text description
that the option is repeatable.
---
tools/command.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index d170eec..1a5fbb5 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -176,8 +176,8 @@ struct opt_name {
char _padding[7];
const char *long_opt; /* --foo */
int val_enum; /* xyz_VAL when --foo takes a val like "--foo xyz" */
- uint32_t unused1;
- uint32_t unused2;
+ uint32_t flags;
+ uint32_t prio;
const char *desc;
};
@@ -2617,7 +2617,6 @@ void print_man_all_options_list(struct command_name *cname)
/*
* All options used for a given command name, along with descriptions.
- * listed in order of:
*/
void print_man_all_options_desc(struct command_name *cname)
@@ -2656,6 +2655,9 @@ void print_man_all_options_desc(struct command_name *cname)
print_val_man(val_names[val_enum].usage);
}
+ if (opt_names[opt_enum].flags & ARG_COUNTABLE)
+ printf(" ...");
+
if (opt_names[opt_enum].desc) {
printf("\n");
printf(".br\n");
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=aa72caca5a19c67c…
Commit: aa72caca5a19c67caffefc3f967af630b93ee2f0
Parent: f44e69f9fc2dc56d1fec02f6303b2a1101cdf47e
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Feb 22 15:16:20 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Feb 22 15:40:59 2017 +0100
tests: support zero_dev
When the test would need to try to write some large amount of data
we can give it 'zero' segments - for obvious reason such written data
can't be verified but in some test cases it doesn't really matter.
Usage follows 'error_dev' style.
For now test suite is not supporting any combination of
error/delay/zero segments so only 1 type could be used per PV.
---
test/lib/aux.sh | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 5108a52..9779358 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -866,7 +866,7 @@ common_dev_() {
else
test -z "${offsets[@]}" && offsets="0:"
fi ;;
- error) offsets=${@:3}
+ error|zero) offsets=${@:3}
test -z "${offsets[@]}" && offsets="0:" ;;
esac
@@ -893,8 +893,8 @@ common_dev_() {
case "$tgtype" in
delay)
echo "$from $len delay $pvdev $(($pos + $offset)) $read_ms $pvdev $(($pos + $offset)) $write_ms" ;;
- error)
- echo "$from $len error" ;;
+ error|zero)
+ echo "$from $len $tgtype" ;;
esac
pos=$(($pos + $len))
done > "$name.devtable"
@@ -1013,12 +1013,23 @@ restore_from_devtable() {
#
# Convert device to device with errors
# Takes the list of pairs of error segment from:len
-# Original device table is replace with multiple lines
+# Combination with zero or delay is unsupported
+# Original device table is replaced with multiple lines
# i.e. error_dev "$dev1" 8:32 96:8
error_dev() {
common_dev_ error "$@"
}
+#
+# Convert existing device to a device with zero segments
+# Takes the list of pairs of zero segment from:len
+# Combination with error or delay is unsupported
+# Original device table is replaced with multiple lines
+# i.e. zero_dev "$dev1" 8:32 96:8
+zero_dev() {
+ common_dev_ zero "$@"
+}
+
backup_dev() {
local dev
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9712995edd60220c…
Commit: 9712995edd60220cd525c51b6bab9f7bd3b38b5a
Parent: 6716f5a2f46f034f24d01918cc1dc78cd7bac9be
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Feb 22 15:12:54 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Feb 22 15:35:04 2017 +0100
snapshot: improve removal of active origin volume
Previously when lvremove tried to remove 'active' origin,
it had been asking for every 'snapshot' LV separately
and doing individual single snapshot removals first.
To be faster it now deactivates origin before removal
all connected snapshots.
This avoids multiple reloads of dm table for origin volume
which were unnecessary as origin was meant to be removed as well.
---
WHATS_NEW | 1 +
lib/metadata/lv_manip.c | 17 +++++++++++++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index b0768cd..722b6f6 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.169 -
=====================================
+ Deactivate active origin first before removal for improved workflow.
Fix regression of accepting options --type and -m with lvresize (2.02.158).
Add lvconvert --swapmetadata, new specific way to swap pool metadata LVs.
Add lvconvert --startpoll, new specific way to start polling conversions.
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index d8f869d..78cc30e 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -6229,12 +6229,21 @@ int lv_remove_with_dependencies(struct cmd_context *cmd, struct logical_volume *
/* Remove snapshot LVs first */
if ((force == PROMPT) &&
/* Active snapshot already needs to confirm each active LV */
- !lv_is_active(lv) &&
- yes_no_prompt("Removing origin %s will also remove %u "
- "snapshots(s). Proceed? [y/n]: ",
- lv->name, lv->origin_count) == 'n')
+ (yes_no_prompt("Do you really want to remove%s "
+ "%sorigin logical volume %s with %u snapshot(s)? [y/n]: ",
+ lv_is_active(lv) ? " active" : "",
+ vg_is_clustered(lv->vg) ? "clustered " : "",
+ display_lvname(lv),
+ lv->origin_count) == 'n'))
goto no_remove;
+ if (!deactivate_lv(cmd, lv)) {
+ stack;
+ goto no_remove;
+ }
+ log_verbose("Removing origin logical volume %s with %u snapshots(s).",
+ display_lvname(lv), lv->origin_count);
+
dm_list_iterate_safe(snh, snht, &lv->snapshot_segs)
if (!lv_remove_with_dependencies(cmd, dm_list_struct_base(snh, struct lv_segment,
origin_list)->cow,
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b7ae57c6a6fd69d2…
Commit: b7ae57c6a6fd69d23cc8c180920ddca372914419
Parent: 21fc35dd1bcd068ad4453e5c18b2d754bdcb12b0
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Feb 21 12:05:36 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Feb 21 12:27:51 2017 -0600
man: teaking output format
---
tools/command.c | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index c425fd1..e7596df 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -1798,6 +1798,38 @@ static void print_val_man(const char *str)
return;
}
+ /*
+ * The suffix [k|unit] is just printed in plain text.
+ * Doing bold k and underlined unit creates a lot of
+ * visual "noise" that is choppy and hard to read.
+ * The extra markup in this case doesn't add anything
+ * that isn't already obvious.
+ */
+
+ if (!strcmp(str, "Number[k|unit]")) {
+ printf("\\fINumber\\fP[k|unit]");
+ return;
+ }
+
+ if (!strcmp(str, "Number[m|unit]")) {
+ printf("\\fINumber\\fP[m|unit]");
+ return;
+ }
+
+ if (!strcmp(str, "[+|-]Number")) {
+ printf("[\\fB+\\fP|\\fB-\\fP]\\fINumber\\fP");
+ return;
+ }
+
+ if (!strcmp(str, "[+|-]Number[%VG|%PVS|%FREE]")) {
+ printf("[\\fB+\\fP|\\fB-\\fP]\\fINumber\\fP[\\fB%%VG\\fP|\\fB%%PVS\\fP|\\fB%%FREE\\fP]");
+ return;
+ }
+
+ /*
+ * I think this bit is almost unnecessary with the specific
+ * ones checked above.
+ */
if (strstr(str, "Number[") || strstr(str, "]Number")) {
for (i = 0; i < strlen(str); i++) {
if (str[i] == 'N')
@@ -2666,7 +2698,7 @@ void print_man_all_positions_desc(struct command_name *cname)
/* Nearly every command uses a number arg somewhere. */
printf("\n.HP\n");
- printf("\\fINumber\\fP, \\fISize\\fP");
+ printf("\\fINumber\\fP");
printf("\n");
printf(".br\n");
printf("Input units are always treated as base two values, regardless of unit\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=21fc35dd1bcd068a…
Commit: 21fc35dd1bcd068ad4453e5c18b2d754bdcb12b0
Parent: 7e411b111f4d87a1f342a016299fe90c2d64ec2d
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Feb 21 11:40:51 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Feb 21 12:27:51 2017 -0600
commands: adjust default help output
Remove the "usage notes" which should just
live in the man pages.
When there are 3 or more variants of a command,
print all the options produces a lot of output,
so require --longhelp to print all the options
in these cases.
---
tools/command.c | 7 ++++-
tools/command.h | 3 +-
tools/lvmcmdline.c | 54 +++++++++++++++------------------------------------
3 files changed, 23 insertions(+), 41 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index fe8c1f6..c425fd1 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -1229,7 +1229,7 @@ static int is_lvm_all_opt(int opt)
/* Find common options for all variants of each command name. */
-static void factor_common_options(void)
+void factor_common_options(void)
{
int cn, opt_enum, ci, oo, ro, found;
struct command *cmd;
@@ -1602,7 +1602,7 @@ static void print_usage_def(struct arg_def *def)
printf(" ...");
}
-void print_usage(struct command *cmd)
+void print_usage(struct command *cmd, int longhelp)
{
struct command_name *cname = find_command_name(cmd->name);
int onereq = (cmd->cmd_flags & CMD_FLAG_ONE_REQUIRED_OPT) ? 1 : 0;
@@ -1652,6 +1652,9 @@ void print_usage(struct command *cmd)
}
}
+ if (!longhelp)
+ goto done;
+
if (!cmd->oo_count)
goto op_count;
diff --git a/tools/command.h b/tools/command.h
index 2d8f628..51c4551 100644
--- a/tools/command.h
+++ b/tools/command.h
@@ -213,7 +213,8 @@ struct command {
int define_commands(char *run_name);
int command_id_to_enum(const char *str);
-void print_usage(struct command *cmd);
+void print_usage(struct command *cmd, int longhelp);
void print_usage_common(struct command_name *cname, struct command *cmd);
+void factor_common_options(void);
#endif
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 9fa8d94..ecb5802 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -1564,7 +1564,7 @@ static struct command *_find_command(struct cmd_context *cmd, const char *path,
log_error("Run '%s --help' for more information.", name);
if (close_ro) {
log_warn("Closest command usage is:");
- print_usage(&_cmdline.commands[close_i]);
+ print_usage(&_cmdline.commands[close_i], 0);
}
return NULL;
}
@@ -1677,39 +1677,6 @@ static void _short_usage(const char *name)
log_error("Run `%s --help' for more information.", name);
}
-static void _usage_notes(void)
-{
- /*
- * Excluding commonly understood syntax style like the meanings of:
- * [ ] for optional, ... for repeatable, | for one of the following,
- * -- for an option name, lower case strings and digits for literals.
- */
- log_print("Usage notes:\n"
- ". Variable parameters are: Number, String, PV, VG, LV, Tag.\n"
- ". Select indicates that a required positional parameter can\n"
- " be omitted if the --select option is used.\n"
- ". --size Number can be replaced with --extents NumberExtents.\n"
- ". When --name is omitted from lvcreate, a new LV name is\n"
- " generated with the \"lvol\" prefix and a unique numeric suffix.\n"
- ". The required VG parameter in lvcreate may be omitted when\n"
- " the VG name is included in another option, e.g. --name VG/LV.\n"
- ". For required options listed in parentheses, e.g. (--A, --B),\n"
- " any one is required, after which the others are optional.\n"
- ". The _new suffix indicates the VG or LV must not yet exist.\n"
- ". LV followed by _<type> indicates that an LV of the given type\n"
- " is required. (raid represents any raid<N> type.)\n"
- ". Input units are always treated as base two values, regardless of\n"
- " unit capitalization, e.g. 'k' and 'K' both refer to 1024.\n"
- ". The default input unit is specified by letter, followed by |unit\n"
- " which represents other possible input units: bBsSkKmMgGtTpPeE.\n"
- ". Output units can be specified with the --units option, for which\n"
- " lower/upper case letters refer to base 2/10 values.\n"
- " formats that are recognized, e.g. for compatibility.\n"
- ". See man pages for short option equivalents of long option names,\n"
- " and for more detailed descriptions of variable parameters.\n"
- " \n");
-}
-
static int _usage(const char *name, int longhelp)
{
struct command_name *cname = find_command_name(name);
@@ -1721,8 +1688,19 @@ static int _usage(const char *name, int longhelp)
return 0;
}
+ /*
+ * Looks at all variants of each command name and figures out
+ * which options are common to all variants (for compact output)
+ */
+ factor_common_options();
+
log_print("%s - %s\n", name, cname->desc);
+ /* Reduce the default output when there are several variants. */
+
+ if (cname->variants < 3)
+ longhelp = 1;
+
for (i = 0; i < COMMAND_COUNT; i++) {
if (strcmp(_cmdline.commands[i].name, name))
continue;
@@ -1733,15 +1711,15 @@ static int _usage(const char *name, int longhelp)
if ((_cmdline.commands[i].cmd_flags & CMD_FLAG_SECONDARY_SYNTAX) && !longhelp)
continue;
- print_usage(&_cmdline.commands[i]);
+ print_usage(&_cmdline.commands[i], longhelp);
cmd = &_cmdline.commands[i];
}
/* Common options are printed once for all variants of a command name. */
- print_usage_common(cname, cmd);
-
if (longhelp)
- _usage_notes();
+ print_usage_common(cname, cmd);
+ else
+ log_print("Use --longhelp to show all options.");
return 1;
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f80d37375354b9b9…
Commit: f80d37375354b9b9cab5326d9d03e036012a824e
Parent: d2dbe71fb3e6210b252db94ec214cee6df2ddb4f
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Feb 21 11:09:01 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Feb 21 12:27:51 2017 -0600
man: expand type option description
---
tools/args.h | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index e7a1ab2..036aa87 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -646,7 +646,16 @@ arg(trustcache_ARG, '\0', "trustcache", 0, 0, 0,
"Avoids certain device scanning during command processing. Do not use.\n")
arg(type_ARG, '\0', "type", segtype_VAL, 0, 0,
- "Specifies an LV type, or \"segment type\".\n")
+ "Specifies an LV type, or \"segment type\".\n"
+ "See usage definitions for specific ways to use these types.\n"
+ "For more information about redundancy and performance (\\fBraid\\fP<N>, \\fBmirror\\fP, \\fBstriped\\fP, \\fBlinear\\fP) see \\fBlvmraid\\fP(7).\n"
+ "For thin provisioning (\\fBthin\\fP, \\fBthin-pool\\fP) see \\fBlvmthin\\fP(7).\n"
+ "For performance caching (\\fBcache\\fP, \\fBcache-pool\\fP) see \\fBlvmcache\\fP(7).\n"
+ "For copy-on-write snapshots (\\fBsnapshot\\fP) see usage definitions.\n"
+ "Several commands omit an explicit type option because the type\n"
+ "is inferred from other options or shortcuts\n"
+ "(e.g. --stripes, --mirrors, --snapshot, --virtualsize, --thin, --cache).\n"
+ "Use inferred types with care because it can lead to unexpected results.\n")
arg(unbuffered_ARG, '\0', "unbuffered", 0, 0, 0,
"Produce output immediately without sorting or aligning the columns properly.\n")
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2a65e2d49e9056bf…
Commit: 2a65e2d49e9056bfe291f291c70f1ba9ec72e2e7
Parent: 7c14004f69f18aeb6fbb022f0ef81f109177022c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Feb 21 09:38:49 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Feb 21 09:38:49 2017 +0100
tests: ensure first call is version test
Check 'dmsetup version' is called before starting any more
advanced logic in $DM_DEV_DIR.
Call also replaces mkdir as it creates needed path with control node.
---
test/lib/inittest.sh | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh
index dcc1304..b75eddc 100644
--- a/test/lib/inittest.sh
+++ b/test/lib/inittest.sh
@@ -77,6 +77,11 @@ find "$TESTOLDPWD/lib" ! \( -name '*.sh' -o -name '*.[cdo]' \
DM_DEFAULT_NAME_MANGLING_MODE=none
DM_DEV_DIR="$TESTDIR/dev"
LVM_SYSTEM_DIR="$TESTDIR/etc"
+# abort on the internal dm errors in the tests (allowing test user override)
+DM_ABORT_ON_INTERNAL_ERRORS=${DM_ABORT_ON_INTERNAL_ERRORS:-1}
+
+export DM_DEFAULT_NAME_MANGLING_MODE DM_DEV_DIR LVM_SYSTEM_DIR DM_ABORT_ON_INTERNAL_ERRORS
+
mkdir "$LVM_SYSTEM_DIR" "$DM_DEV_DIR"
if test -n "$LVM_TEST_DEVDIR" ; then
test -d "$LVM_TEST_DEVDIR" || die "Test device directory LVM_TEST_DEVDIR=\"$LVM_TEST_DEVDIR\" is not valid."
@@ -85,14 +90,11 @@ else
mknod "$DM_DEV_DIR/testnull" c 1 3 || die "mknod failed"
echo >"$DM_DEV_DIR/testnull" || \
die "Filesystem does support devices in $DM_DEV_DIR (mounted with nodev?)"
- mkdir "$DM_DEV_DIR/mapper"
+ # dmsetup makes here needed control entry if still missing
+ dmsetup version || \
+ die "Dmsetup in $DM_DEV_DIR can't report version?"
fi
-# abort on the internal dm errors in the tests (allowing test user override)
-DM_ABORT_ON_INTERNAL_ERRORS=${DM_ABORT_ON_INTERNAL_ERRORS:-1}
-
-export DM_DEFAULT_NAME_MANGLING_MODE DM_DEV_DIR LVM_SYSTEM_DIR DM_ABORT_ON_INTERNAL_ERRORS
-
echo "$TESTNAME" >TESTNAME
echo "Kernel is $(uname -a)"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d409fec079d27c34…
Commit: d409fec079d27c349b4e570a619bd860ce4fde7e
Parent: 921d5972e8bfa778f7389c4abdaa8691ce432c70
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Feb 21 00:49:49 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Feb 21 00:52:05 2017 +0100
tests: paralelize creation and teardown
To speedup initial construction and destruction of test devices
(mainly in case more then 1 is needed) call dmsetup
in parallel.
---
test/lib/aux.sh | 39 +++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 16 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 7c3daa5..10f6f92 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -405,23 +405,25 @@ teardown_devs_prefixed() {
fi
# Remove devices, start with closed (sorted by open count)
- local remfail=no
+ # Run 'dmsetup remove' in parallel
+ rm -f REMOVE_FAILED
local need_udev_wait=0
init_udev_transaction
- for dm in $(dm_info name --sort open | grep "$prefix"); do
- dmsetup remove "$dm" &>/dev/null || remfail=yes
+ for dm in $(dm_info name --sort open,name | grep "$prefix"); do
+ dmsetup remove "$dm" &>/dev/null || touch REMOVE_FAILED &
need_udev_wait=1
done
+ wait
finish_udev_transaction
test $need_udev_wait -eq 0 || udev_wait
- if test $remfail = yes; then
+ if test -f REMOVE_FAILED; then
local num_devs
local num_remaining_devs=999
while num_devs=$(dm_table | grep "$prefix" | wc -l) && \
test $num_devs -lt $num_remaining_devs -a $num_devs -ne 0; do
test "$stray" -eq 0 || echo "Removing $num_devs stray mapped devices with names beginning with $prefix: "
- # HACK: sort also by minors - so we try to close 'possibly later' created device first
+ # HACK: sort also by minors - so we try to close 'possibly later' created device first
for dm in $(dm_info name --sort open,-minor | grep "$prefix") ; do
dmsetup remove -f "$dm" || true
done
@@ -794,6 +796,7 @@ prepare_devs() {
local size=$(($devsize*2048)) # sectors
local count=0
+ rm -f CREATE_FAILED
init_udev_transaction
for i in $(seq 1 $n); do
local name="${PREFIX}$pvname$i"
@@ -801,17 +804,19 @@ prepare_devs() {
DEVICES[$count]=$dev
count=$(( $count + 1 ))
echo 0 $size linear "$BACKING_DEV" $((($i-1)*$size + $shift)) > "$name.table"
- if not dmsetup create -u "TEST-$name" "$name" "$name.table" &&
- test -n "$LVM_TEST_BACKING_DEVICE";
- then # maybe the backing device is too small for this test
- LVM_TEST_BACKING_DEVICE=
- rm -f BACKING_DEV
- prepare_devs "$@"
- return $?
- fi
+ dmsetup create -u "TEST-$name" "$name" "$name.table" || touch CREATE_FAILED &
+ test -f CREATE_FAILED && break;
done
+ wait
finish_udev_transaction
+ if test -f CREATE_FAILED -a -n "$LVM_TEST_BACKING_DEVICE"; then
+ LVM_TEST_BACKING_DEVICE=
+ rm -f BACKING_DEV CREATE_FAILED
+ prepare_devs "$@"
+ return $?
+ fi
+
# non-ephemeral devices need to be cleared between tests
test -f LOOP || for d in ${DEVICES[@]}; do
blkdiscard "$d" 2>/dev/null || true
@@ -833,9 +838,11 @@ prepare_devs() {
# ( IFS=$'\n'; echo "${DEVICES[*]}" ) >DEVICES
echo "ok"
- for dev in "${DEVICES[@]}"; do
- notify_lvmetad "$dev"
- done
+ if test -e LOCAL_LVMETAD; then
+ for dev in "${DEVICES[@]}"; do
+ notify_lvmetad "$dev"
+ done
+ fi
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d22cccdf631576d4…
Commit: d22cccdf631576d4fd0504ffd17812d778f9d37b
Parent: a2d2cd8777ea0f387383743ba2739007ef1b3baf
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Feb 20 15:26:24 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 20 15:36:30 2017 -0600
man vgchange/lvchange: note special option usage
---
tools/command-lines.in | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/command-lines.in b/tools/command-lines.in
index 092f941..606d2e7 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -250,7 +250,9 @@ OO_LVCHANGE_META: --addtag Tag, --deltag Tag,
lvchange OO_LVCHANGE_META VG|LV|Tag|Select ...
OO: --activate Active, OO_LVCHANGE
ID: lvchange_properties
-DESC: Change a general LV property.
+DESC: Change a general LV attribute.
+DESC: For options listed in parentheses, any one is
+DESC: required, after which the others are optional.
RULE: all not lv_is_pvmove lv_is_mirror_log lv_is_mirror_image
RULE: all and lv_is_vg_writable
RULE: --contiguous not --alloc
@@ -1408,7 +1410,9 @@ vgchange OO_VGCHANGE_META
OO: OO_VGCHANGE
OP: VG|Tag|Select ...
ID: vgchange_properties
-DESC: Change a general VG property.
+DESC: Change a general VG attribute.
+DESC: For options listed in parentheses, any one is
+DESC: required, after which the others are optional.
vgchange --monitor Bool
OO: --sysinit, --ignorelockingfailure, --poll Bool, OO_VGCHANGE
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a2d2cd8777ea0f38…
Commit: a2d2cd8777ea0f387383743ba2739007ef1b3baf
Parent: 2396c506890e62da5d13c4f3bcd1f715272ab382
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Feb 20 15:17:10 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 20 15:36:30 2017 -0600
man lvcreate: add special option notes at the start
The --name, --size, --extents options deserve a special
note at the start of the man page, before appearing in
the usage section.
---
man/lvcreate.8.des | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/man/lvcreate.8.des b/man/lvcreate.8.des
index e18affe..488dab4 100644
--- a/man/lvcreate.8.des
+++ b/man/lvcreate.8.des
@@ -26,3 +26,14 @@ virtual size rather than a physical size. A cache LV is the combination of
a standard LV with a cache pool, used to cache active portions of the LV
to improve performance.
+.SS Usage notes
+
+In the usage section below, \fB--size\fP \fINumber\fP can be replaced
+in each case with \fB--extents\fP \fINumberExtents\fP. Also see both
+descriptions the options section.
+
+In the usage section below, \fB--name\fP is omitted from the required
+options, even though it is typically used. When the name is not
+specified, a new LV name is generated with the "lvol" prefix and a unique
+numeric suffix. Also see the description in the options section.
+
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2396c506890e62da…
Commit: 2396c506890e62da5d13c4f3bcd1f715272ab382
Parent: 4d29d9afb21a4571b45fe18d16cc4b57cd7ec187
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Feb 20 15:09:02 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 20 15:36:10 2017 -0600
man: add variables descriptions
Add a section describing variables.
In the full options list, include common
options in the alphabetical listing instead
of at the end.
---
tools/command.c | 172 ++++++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 152 insertions(+), 20 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index 06dcc77..b1fdc1b 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -2484,35 +2484,20 @@ void print_man_all_options_list(struct command_name *cname)
/*
* All options used for a given command name, along with descriptions.
* listed in order of:
- * 1. options that are not common to all lvm commands, alphabetically
- * 2. options common to all lvm commands, alphabetically
*/
void print_man_all_options_desc(struct command_name *cname)
{
int opt_enum, val_enum;
- int print_common = 0;
int sep = 0;
int i;
- again:
- /*
- * Loop 1: print options that are not common to all lvm commands.
- * Loop 2: print options common to all lvm commands (lvm_all)
- */
-
for (i = 0; i < ARG_COUNT; i++) {
opt_enum = opt_names_alpha[i]->opt_enum;
if (!cname->all_options[opt_enum])
continue;
- if (!print_common && is_lvm_all_opt(opt_enum))
- continue;
-
- if (print_common && !is_lvm_all_opt(opt_enum))
- continue;
-
printf("\n.TP\n");
if (opt_names[opt_enum].short_opt) {
@@ -2545,11 +2530,153 @@ void print_man_all_options_desc(struct command_name *cname)
sep = 1;
}
+}
- if (!print_common) {
- print_common = 1;
- goto again;
+void print_man_all_positions_desc(struct command_name *cname)
+{
+ struct command *cmd;
+ int ci, rp, op;
+ int has_vg_val = 0;
+ int has_lv_val = 0;
+ int has_pv_val = 0;
+ int has_tag_val = 0;
+ int has_select_val = 0;
+ int has_lv_type = 0;
+
+ for (ci = 0; ci < COMMAND_COUNT; ci++) {
+ cmd = &commands[ci];
+
+ if (strcmp(cmd->name, cname->name))
+ continue;
+
+ for (rp = 0; rp < cmd->rp_count; rp++) {
+ if (cmd->required_pos_args[rp].def.val_bits & val_enum_to_bit(vg_VAL))
+ has_vg_val = 1;
+
+ if (cmd->required_pos_args[rp].def.val_bits & val_enum_to_bit(lv_VAL)) {
+ has_lv_val = 1;
+ if (cmd->required_pos_args[rp].def.lvt_bits)
+ has_lv_type = 1;
+ }
+
+ if (cmd->required_pos_args[rp].def.val_bits & val_enum_to_bit(pv_VAL))
+ has_pv_val = 1;
+
+ if (cmd->required_pos_args[rp].def.val_bits & val_enum_to_bit(tag_VAL))
+ has_tag_val = 1;
+
+ if (cmd->required_pos_args[rp].def.val_bits & val_enum_to_bit(select_VAL))
+ has_select_val = 1;
+ }
+
+ for (op = 0; op < cmd->op_count; op++) {
+ if (cmd->optional_pos_args[op].def.val_bits & val_enum_to_bit(vg_VAL))
+ has_vg_val = 1;
+
+ if (cmd->optional_pos_args[op].def.val_bits & val_enum_to_bit(lv_VAL)) {
+ has_lv_val = 1;
+ if (cmd->optional_pos_args[op].def.lvt_bits)
+ has_lv_type = 1;
+ }
+
+ if (cmd->optional_pos_args[op].def.val_bits & val_enum_to_bit(pv_VAL))
+ has_pv_val = 1;
+
+ if (cmd->optional_pos_args[op].def.val_bits & val_enum_to_bit(tag_VAL))
+ has_tag_val = 1;
+
+ if (cmd->optional_pos_args[op].def.val_bits & val_enum_to_bit(select_VAL))
+ has_select_val = 1;
+ }
+ }
+
+ if (has_vg_val) {
+ printf("\n.TP\n");
+
+ printf("\\fI%s\\fP", val_names[vg_VAL].name);
+ printf("\n");
+ printf(".br\n");
+ printf("Volume Group name. See \\fBlvm\\fP(8) for valid names.\n");
+
+ if (!strcmp(cname->name, "lvcreate"))
+ printf("For lvcreate, the required VG positional arg may be\n"
+ "omitted when the VG name is included in another option,\n"
+ "e.g. --name VG/LV.\n");
}
+
+ if (has_lv_val) {
+ printf("\n.TP\n");
+
+ printf("\\fI%s\\fP", val_names[lv_VAL].name);
+ printf("\n");
+ printf(".br\n");
+ printf("Logical Volume name. See \\fBlvm\\fP(8) for valid names.\n"
+ "An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.\n");
+
+ if (has_lv_type)
+ printf("LV followed by _<type> indicates that an LV of the\n"
+ "given type is required. (raid represents raid<N> type)\n");
+ }
+
+ if (has_pv_val) {
+ printf("\n.TP\n");
+
+ printf("\\fI%s\\fP", val_names[pv_VAL].name);
+ printf("\n");
+ printf(".br\n");
+ printf("Physical Volume name, a device path under /dev.\n"
+ "For commands managing physical extents, a PV positional arg\n"
+ "generally accepts a suffix indicating a range of physical extents.\n"
+ "Start and end range (inclusive): \\fIPV\\fP[:\\fIPE\\fP[-\\fIPE\\fP].\n"
+ "Start and length range (counting from 0): \\fIPV\\fP[:\\fIPE\\fP[+\\fIPE\\fP].\n");
+ }
+
+ if (has_tag_val) {
+ printf("\n.TP\n");
+
+ printf("\\fI%s\\fP", val_names[tag_VAL].name);
+ printf("\n");
+ printf(".br\n");
+ printf("Tag name. See \\fBlvm\\fP(8) for information about tag names and using tags\n"
+ "in place of a VG, LV or PV.\n");
+ }
+
+ if (has_select_val) {
+ printf("\n.TP\n");
+
+ printf("\\fI%s\\fP", val_names[select_VAL].name);
+ printf("\n");
+ printf(".br\n");
+ printf("Select indicates that a required positional parameter can\n"
+ "be omitted if the \\fB--select\\fP option is used.\n"
+ "No arg appears in this position.\n");
+ }
+
+ /* Every command uses a string arg somewhere. */
+
+ printf("\n.TP\n");
+ printf("\\fI%s\\fP", val_names[string_VAL].name);
+ printf("\n");
+ printf(".br\n");
+ printf("See the option description for information about the string content.\n");
+
+ /* Nearly every command uses a number arg somewhere. */
+
+ printf("\n.TP\n");
+ printf("\\fINumber\\fP, \\fISize\\fP");
+ printf("\n");
+ printf(".br\n");
+ printf("Input units are always treated as base two values, regardless of unit\n"
+ "capitalization, e.g. 'k' and 'K' both refer to 1024.\n"
+ "The default input unit is specified by letter, followed by |unit which\n"
+ "represents other possible input units: bBsSkKmMgGtTpPeE.\n");
+
+ printf("\n.TP\n");
+ printf("Environment");
+ printf("\n");
+ printf(".br\n");
+ printf("See \\fBlvm\\fP(8) for information about environment variables used by lvm.\n"
+ "For example, LVM_VG_NAME can generally be substituted for a required VG parameter.\n");
}
void print_desc_man(const char *desc)
@@ -2641,7 +2768,7 @@ void print_man(char *name, char *des_file, int include_primary, int include_seco
cname = find_command_name(name);
- printf(".TH %s 8 \"LVM TOOLS #VERSION#\" \"Sistina Software UK\"\n",
+ printf(".TH %s 8 \"LVM TOOLS #VERSION#\" \"Red Hat, Inc.\"\n",
upper_command_name(lvmname));
for (i = 0; i < COMMAND_COUNT; i++) {
@@ -2657,6 +2784,9 @@ void print_man(char *name, char *des_file, int include_primary, int include_seco
printf(".SH OPTIONS\n");
printf(".br\n");
print_man_all_options_desc(cname);
+ printf(".SH VARIABLES\n");
+ printf(".br\n");
+ print_man_all_positions_desc(cname);
prev_cmd = NULL;
}
@@ -2752,7 +2882,9 @@ void print_man(char *name, char *des_file, int include_primary, int include_seco
printf(".SH OPTIONS\n");
printf(".br\n");
print_man_all_options_desc(cname);
-
+ printf(".SH VARIABLES\n");
+ printf(".br\n");
+ print_man_all_positions_desc(cname);
}
printf("\n");
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d8514b24e115f4c4…
Commit: d8514b24e115f4c45fb7b6263f553a30e776a3da
Parent: aff62c74b7b947d19dda7f03e79d0f2437ad4730
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Feb 18 19:09:24 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 20 00:43:40 2017 +0100
cleanup: use multiline string
---
tools/lvmcmdline.c | 50 +++++++++++++++++++++++++-------------------------
1 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index e796873..9fa8d94 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -1684,30 +1684,30 @@ static void _usage_notes(void)
* [ ] for optional, ... for repeatable, | for one of the following,
* -- for an option name, lower case strings and digits for literals.
*/
- log_print("Usage notes:");
- log_print(". Variable parameters are: Number, String, PV, VG, LV, Tag.");
- log_print(". Select indicates that a required positional parameter can");
- log_print(" be omitted if the --select option is used.");
- log_print(". --size Number can be replaced with --extents NumberExtents.");
- log_print(". When --name is omitted from lvcreate, a new LV name is");
- log_print(" generated with the \"lvol\" prefix and a unique numeric suffix.");
- log_print(". The required VG parameter in lvcreate may be omitted when");
- log_print(" the VG name is included in another option, e.g. --name VG/LV.");
- log_print(". For required options listed in parentheses, e.g. (--A, --B),");
- log_print(" any one is required, after which the others are optional.");
- log_print(". The _new suffix indicates the VG or LV must not yet exist.");
- log_print(". LV followed by _<type> indicates that an LV of the given type");
- log_print(" is required. (raid represents any raid<N> type.)");
- log_print(". Input units are always treated as base two values, regardless of");
- log_print(" unit capitalization, e.g. 'k' and 'K' both refer to 1024.");
- log_print(". The default input unit is specified by letter, followed by |unit");
- log_print(" which represents other possible input units: bBsSkKmMgGtTpPeE.");
- log_print(". Output units can be specified with the --units option, for which");
- log_print(" lower/upper case letters refer to base 2/10 values.");
- log_print(" formats that are recognized, e.g. for compatibility.");
- log_print(". See man pages for short option equivalents of long option names,");
- log_print(" and for more detailed descriptions of variable parameters.");
- log_print(" ");
+ log_print("Usage notes:\n"
+ ". Variable parameters are: Number, String, PV, VG, LV, Tag.\n"
+ ". Select indicates that a required positional parameter can\n"
+ " be omitted if the --select option is used.\n"
+ ". --size Number can be replaced with --extents NumberExtents.\n"
+ ". When --name is omitted from lvcreate, a new LV name is\n"
+ " generated with the \"lvol\" prefix and a unique numeric suffix.\n"
+ ". The required VG parameter in lvcreate may be omitted when\n"
+ " the VG name is included in another option, e.g. --name VG/LV.\n"
+ ". For required options listed in parentheses, e.g. (--A, --B),\n"
+ " any one is required, after which the others are optional.\n"
+ ". The _new suffix indicates the VG or LV must not yet exist.\n"
+ ". LV followed by _<type> indicates that an LV of the given type\n"
+ " is required. (raid represents any raid<N> type.)\n"
+ ". Input units are always treated as base two values, regardless of\n"
+ " unit capitalization, e.g. 'k' and 'K' both refer to 1024.\n"
+ ". The default input unit is specified by letter, followed by |unit\n"
+ " which represents other possible input units: bBsSkKmMgGtTpPeE.\n"
+ ". Output units can be specified with the --units option, for which\n"
+ " lower/upper case letters refer to base 2/10 values.\n"
+ " formats that are recognized, e.g. for compatibility.\n"
+ ". See man pages for short option equivalents of long option names,\n"
+ " and for more detailed descriptions of variable parameters.\n"
+ " \n");
}
static int _usage(const char *name, int longhelp)
@@ -3285,6 +3285,6 @@ int lvm2_main(int argc, char **argv)
out:
lvm_fin(cmd);
+
return lvm_return_code(ret);
}
-
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f16ad760cb828228…
Commit: f16ad760cb828228affd13cb6d701dfb54a5f249
Parent: cd24e6de898f9f20a56430d4a6d55c635a65bc65
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Feb 19 15:50:19 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 20 00:43:12 2017 +0100
man: thin dmeventd plugin update
Document new dmeventd/thin_command lvm.conf configurable.
---
man/dmeventd.8.in | 108 ++++++++++++++++++++++++++++++++++++-----------------
1 files changed, 74 insertions(+), 34 deletions(-)
diff --git a/man/dmeventd.8.in b/man/dmeventd.8.in
index aa62451..057f756 100644
--- a/man/dmeventd.8.in
+++ b/man/dmeventd.8.in
@@ -23,40 +23,6 @@ dmeventd is the event monitoring daemon for device-mapper devices.
Library plugins can register and carry out actions triggered when
particular events occur.
.
-.SH LVM PLUGINS
-.
-.HP
-.IR Mirror
-.br
-Attempts to handle device failure automatically. See
-.BR lvm.conf (5).
-.
-.HP
-.IR Raid
-.br
-Attempts to handle device failure automatically. See
-.BR lvm.conf (5).
-.
-.HP
-.IR Snapshot
-.br
-Monitors how full a snapshot is becoming and emits a warning to
-syslog when it exceeds 80% full.
-The warning is repeated when 85%, 90% and 95% of the snapshot is filled.
-See
-.BR lvm.conf (5).
-Snapshot which runs out of space gets invalid and when it is mounted,
-it gets umounted if possible.
-.
-.HP
-.IR Thin
-.br
-Monitors how full a thin pool data and metadata is becoming and emits
-a warning to syslog when it exceeds 80% full.
-The warning is repeated when 85%, 90% and 95% of the thin pool is filled.
-See
-.BR lvm.conf (5).
-If the thin-pool runs out of space, thin volumes are umounted if possible.
.
.SH OPTIONS
.
@@ -104,6 +70,80 @@ events to monitor from the currently running daemon.
.br
Show version of dmeventd.
.
+.SH LVM PLUGINS
+.
+.HP
+.BR Mirror
+.br
+Attempts to handle device failure automatically. See
+.BR lvm.conf (5).
+.
+.HP
+.BR Raid
+.br
+Attempts to handle device failure automatically. See
+.BR lvm.conf (5).
+.
+.HP
+.BR Snapshot
+.br
+Monitors how full a snapshot is becoming and emits a warning to
+syslog when it exceeds 80% full.
+The warning is repeated when 85%, 90% and 95% of the snapshot is filled.
+See
+.BR lvm.conf (5).
+Snapshot which runs out of space gets invalid and when it is mounted,
+it gets umounted if possible.
+.
+.HP
+.BR Thin
+.br
+Monitors how full a thin pool data and metadata is becoming and emits
+a warning to syslog when it exceeds 80% full.
+The warning is repeated when more then 85%, 90% and 95%
+of the thin pool is filled. See
+.BR lvm.conf (5).
+When a thin pool fills over 50% (data or metadata) thin plugin calls
+configured \fIdmeventd/thin_command\fP with every 5% increase.
+With default setting it calls internal
+\fBlvm lvextend --use-policies\fP to resize thin pool
+when it's been filled above configured threshold
+\fIactivation/thin_pool_autoextend_threshold\fP.
+If the command fails, dmeventd thin plugin will keep
+retrying execution with increasing time delay between
+retries upto 42 minutes.
+User may also configure external command to support more advanced
+maintenance operations of a thin pool.
+Such external command can e.g. remove some unneeded snapshots,
+use \fBfstrim\fP(8) to free recover space in a thin pool,
+but also can use \fBlvextend --use-policies\fP if other actions
+have not released enough space.
+Command is executed with environmental variable
+\fBLVM_RUN_BY_DMEVENTD=1\fP so any lvm2 command executed
+in this environment will not try to interact with dmeventd.
+To see the fullness of a thin pool command may check these
+two environmental variables
+\fBDMEVENTD_THIN_POOL_DATA\fP and \fBDMEVENTD_THIN_POOL_DATA\fP.
+Command can also read status with tools like \fBlvs\fP(8).
+.
+.SH ENVIRONMENT VARIABLES
+.
+.TP
+.B DMEVENTD_THIN_POOL_DATA
+Variable is set by thin plugin and is available to executed program. Value present
+actual usage of thin pool data volume. Variable is not set when error event
+is processed.
+.TP
+.B DMEVENTD_THIN_POOL_DATA
+Variable is set by thin plugin and is available to executed program. Value present
+actual usage of thin pool metadata volume. Variable is not set when error event
+is processed.
+.TP
+.B LVM_RUN_BY_DMEVENTD
+Variable is set by thin plugin to prohibit recursive interation
+with dmeventd by any executed lvm2 command from
+a thin_command environment.
+.
.SH SEE ALSO
.
.BR lvm (8),
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=13944738d49ee420…
Commit: 13944738d49ee420cb8b6b9eab4984b0a01b700d
Parent: fab0d63121f0ac59996526db40b70cb1efceb306
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 17 15:44:26 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 17 15:44:26 2017 -0600
man/help: fix description of r|R unit
---
tools/args.h | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index 0575a2f..e7a1ab2 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -673,12 +673,11 @@ arg(unconfigured_ARG, '\0', "unconfigured", 0, 0, 0,
arg(units_ARG, '\0', "units", units_VAL, 0, 0,
"All sizes are output in these units:\n"
- "human-(r)eadable with rounding,\n"
+ "human-(r)eadable with '<' rounding indicator,\n"
"(h)uman-readable, (b)ytes, (s)ectors, (k)ilobytes, (m)egabytes,\n"
"(g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes.\n"
"Capitalise to use multiples of 1000 (S.I.) instead of 1024.\n"
- "Custom units can be specified, e.g. --units 3M.\n"
- "r|R rounds numbers and displays the '<' prefix before rounded values.\n")
+ "Custom units can be specified, e.g. --units 3M.\n")
arg(unquoted_ARG, '\0', "unquoted", 0, 0, 0,
"When used with --nameprefixes, output values in the field=value\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=87fe9328d30660e2…
Commit: 87fe9328d30660e2eecd990bfce893ae65817f44
Parent: 6064b0359a7f3fbc07e56dd7094732ea184c199e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 17 15:28:00 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 17 15:28:00 2017 -0600
man pvmove: move details to notes
---
man/pvmove.8.des | 45 ---------------------------------------------
man/pvmove.8.end | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 45 deletions(-)
diff --git a/man/pvmove.8.des b/man/pvmove.8.des
index 5286ef4..c003c5e 100644
--- a/man/pvmove.8.des
+++ b/man/pvmove.8.des
@@ -14,48 +14,3 @@ More than one pvmove can run concurrently if they are moving data from
different source PVs, but additional pvmoves will ignore any LVs already
in the process of being changed, so some data might not get moved.
-pvmove works as follows:
-
-1. A temporary 'pvmove' LV is created to store details of all the data
-movements required.
-
-2. Every LV in the VG is searched for contiguous data that need moving
-according to the command line arguments.
-For each piece of data found, a new segment is added to the end of the
-pvmove LV.
-This segment takes the form of a temporary mirror to copy the data
-from the original location to a newly allocated location.
-The original LV is updated to use the new temporary mirror segment
-in the pvmove LV instead of accessing the data directly.
-
-3. The VG metadata is updated on disk.
-
-4. The first segment of the pvmove LV is activated and starts to mirror
-the first part of the data. Only one segment is mirrored at once as this
-is usually more efficient.
-
-5. A daemon repeatedly checks progress at the specified time interval.
-When it detects that the first temporary mirror is in sync, it breaks that
-mirror so that only the new location for that data gets used and writes a
-checkpoint into the VG metadata on disk. Then it activates the mirror for
-the next segment of the pvmove LV.
-
-6. When there are no more segments left to be mirrored, the temporary LV
-is removed and the VG metadata is updated so that the LVs reflect the new
-data locations.
-
-Note that this new process cannot support the original LVM1
-type of on-disk metadata. Metadata can be converted using
-\fBvgconvert\fP(8).
-
-If the \fB\-\-atomic\fP option is used, a slightly different approach is
-used for the move. Again, a temporary 'pvmove' LV is created to store the
-details of all the data movements required. This temporary LV contains
-all the segments of the various LVs that need to be moved. However, in
-this case, an identical LV is allocated that contains the same number of
-segments and a mirror is created to copy the contents from the first
-temporary LV to the second. After a complete copy is made, the temporary
-LVs are removed, leaving behind the segments on the destination PV. If an
-abort is issued during the move, all LVs being moved will remain on the
-source PV.
-
diff --git a/man/pvmove.8.end b/man/pvmove.8.end
index 9dd3adc..906606d 100644
--- a/man/pvmove.8.end
+++ b/man/pvmove.8.end
@@ -1,3 +1,50 @@
+.SH NOTES
+
+pvmove works as follows:
+
+1. A temporary 'pvmove' LV is created to store details of all the data
+movements required.
+
+2. Every LV in the VG is searched for contiguous data that need moving
+according to the command line arguments.
+For each piece of data found, a new segment is added to the end of the
+pvmove LV.
+This segment takes the form of a temporary mirror to copy the data
+from the original location to a newly allocated location.
+The original LV is updated to use the new temporary mirror segment
+in the pvmove LV instead of accessing the data directly.
+
+3. The VG metadata is updated on disk.
+
+4. The first segment of the pvmove LV is activated and starts to mirror
+the first part of the data. Only one segment is mirrored at once as this
+is usually more efficient.
+
+5. A daemon repeatedly checks progress at the specified time interval.
+When it detects that the first temporary mirror is in sync, it breaks that
+mirror so that only the new location for that data gets used and writes a
+checkpoint into the VG metadata on disk. Then it activates the mirror for
+the next segment of the pvmove LV.
+
+6. When there are no more segments left to be mirrored, the temporary LV
+is removed and the VG metadata is updated so that the LVs reflect the new
+data locations.
+
+Note that this new process cannot support the original LVM1
+type of on-disk metadata. Metadata can be converted using
+\fBvgconvert\fP(8).
+
+If the \fB\-\-atomic\fP option is used, a slightly different approach is
+used for the move. Again, a temporary 'pvmove' LV is created to store the
+details of all the data movements required. This temporary LV contains
+all the segments of the various LVs that need to be moved. However, in
+this case, an identical LV is allocated that contains the same number of
+segments and a mirror is created to copy the contents from the first
+temporary LV to the second. After a complete copy is made, the temporary
+LVs are removed, leaving behind the segments on the destination PV. If an
+abort is issued during the move, all LVs being moved will remain on the
+source PV.
+
.SH EXAMPLES
Move all physical extents that are used by simple LVs on the specified PV to
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6064b0359a7f3fbc…
Commit: 6064b0359a7f3fbc07e56dd7094732ea184c199e
Parent: 50e0345f9d245cdcb29e4988760e788defa5e88e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 17 15:11:19 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 17 15:11:19 2017 -0600
man: mention force behavior in various places
---
man/lvremove.8.des | 5 +++++
man/pvcreate.8.des | 3 +++
man/pvremove.8.des | 5 +++++
man/vgcfgrestore.8.des | 3 +++
man/vgremove.8.des | 3 +++
5 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/man/lvremove.8.des b/man/lvremove.8.des
index d049c63..14587c1 100644
--- a/man/lvremove.8.des
+++ b/man/lvremove.8.des
@@ -6,6 +6,11 @@ removal. LVs cannot be deactivated or removed while they are open (e.g.
if they contain a mounted filesystem). Removing an origin LV will also
remove all dependent snapshots.
+When a single force option is used, LVs are removed without confirmation,
+and the command will try to deactivate unused LVs.
+
+To remove damaged LVs, two force options may be required (\fB-ff\fP).
+
\fBHistorical LVs\fP
If the configuration setting \fBmetadata/record_lvs_history\fP is enabled
diff --git a/man/pvcreate.8.des b/man/pvcreate.8.des
index 3dfddbc..1b00e9e 100644
--- a/man/pvcreate.8.des
+++ b/man/pvcreate.8.des
@@ -16,3 +16,6 @@ data on that disk. This can be done by zeroing the first sector with:
Use \fBvgcreate\fP(8) to create a new VG on the PV, or \fBvgextend\fP(8)
to add the PV to existing VG.
+The force option will create a PV without confirmation. Repeating the
+force option (\fB-ff\fP) will forcibly create a PV, overriding checks that
+normally prevent it, e.g. if the PV is already in a VG.
diff --git a/man/pvremove.8.des b/man/pvremove.8.des
index f12b76e..cc84148 100644
--- a/man/pvremove.8.des
+++ b/man/pvremove.8.des
@@ -1,2 +1,7 @@
pvremove wipes the label on a device so that LVM will no longer recognise
it as a PV.
+
+A PV cannot be removed from a VG while it is used by an active LV.
+
+Repeat the force option (\fB-ff\fP) to forcibly remove a PV belonging to
+an existing VG. Normally, \fBvgreduce\fP(8) should be used instead.
diff --git a/man/vgcfgrestore.8.des b/man/vgcfgrestore.8.des
index cb7867d..ee3a99e 100644
--- a/man/vgcfgrestore.8.des
+++ b/man/vgcfgrestore.8.des
@@ -6,3 +6,6 @@ A back up file can be specified with \fB\-\-file\fP. If no backup file is
specified, the most recent one is used. Use \fB\-\-list\fP for a list of
the available back up and archive files of a VG.
+WARNING: When a VG contains thin pools, changes to thin metadata cannot be
+reverted, and data loss may occur if thin metadata has changed. The force
+option is required to restore in this case.
diff --git a/man/vgremove.8.des b/man/vgremove.8.des
index 04dc0e3..6414c73 100644
--- a/man/vgremove.8.des
+++ b/man/vgremove.8.des
@@ -4,3 +4,6 @@ to confirm LV removal.
If one or more PVs in the VG are lost, consider
\fBvgreduce \-\-removemissing\fP to make the VG
metadata consistent again.
+
+Repeat the force option (\fB-ff\fP) to forcibly remove LVs in the VG
+without confirmation.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=50e0345f9d245cdc…
Commit: 50e0345f9d245cdcb29e4988760e788defa5e88e
Parent: 10cb8e0ec08d430d697fb8a58caaefb5aea32928
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 17 14:46:10 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 17 14:46:10 2017 -0600
man lvmconfig: refer to typeconfig option name
---
tools/args.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index 1f3ace7..0575a2f 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -546,7 +546,7 @@ arg(shared_ARG, '\0', "shared", 0, 0, 0,
arg(sinceversion_ARG, '\0', "sinceversion", string_VAL, 0, 0,
"Specify an LVM version in x.y.z format where x is the major version,\n"
"the y is the minor version and z is the patchlevel (e.g. 2.2.106).\n"
- "This option is currently applicable only with --type new\n"
+ "This option is currently applicable only with --typeconfig new\n"
"to display all configuration settings introduced since given version.\n")
arg(splitcache_ARG, '\0', "splitcache", 0, 0, 0,
@@ -1024,7 +1024,7 @@ arg(list_ARG, 'l', "list", 0, 0, 0,
"#dumpconfig\n"
"#config\n"
"List config settings with summarizing comment. This is the same as using\n"
- "options --type list --withsummary.\n"
+ "options --typeconfig list --withsummary.\n"
"#vgcfgrestore\n"
"List metadata backup and archive files pertaining to the VG.\n"
"May be used with --file. Does not restore the VG.\n"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f88ce5fb9954721b…
Commit: f88ce5fb9954721b41fa1fc19c53abc18006c395
Parent: 56deed9d54c9070cc586f040264a8e1985b19bdc
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 17 11:45:13 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Feb 17 13:20:15 2017 -0600
lvconvert: include swap behavior in generic pool syntax
For this syntax:
lvconvert --thinpool LV1 --poolmetadata LV2
lvconvert --cachepool LV1 --poolmetadata LV2
Restore the metadata swapping behavior in addition to
the pool creation behavior. When LV1 is already a pool,
the metadata LV will be swapped with LV2.
When LV1 is not a pool, it will be converted to a
pool using the specified LV for metadata.
This syntax is no longer advertised because of the
ambiguous behavior. The primary syntaxes for pool
creation and metadata swapping will be the advertised
methods.
---
man/lvconvert.8.end | 21 +++++++
man/lvmthin.7.in | 16 ------
tools/args.h | 9 ++-
tools/command-lines.in | 66 ++++++++++++++++++-----
tools/command.c | 5 ++
tools/command.h | 3 +-
tools/lvconvert.c | 136 ++++++++++++++++++++++++++----------------------
tools/lvmcmdline.c | 7 ++-
tools/tools.h | 2 +-
9 files changed, 166 insertions(+), 99 deletions(-)
diff --git a/man/lvconvert.8.end b/man/lvconvert.8.end
index fa8cc1d..5a3d475 100644
--- a/man/lvconvert.8.end
+++ b/man/lvconvert.8.end
@@ -1,3 +1,24 @@
+.SH NOTES
+
+This previous command syntax would perform two different operations:
+.br
+\fBlvconvert --thinpool\fP \fILV1\fP \fB--poolmetadata\fP \fILV2\fP
+.br
+If LV1 was not a thin pool, the command would convert LV1 to
+a thin pool, optionally using a specified LV for metadata.
+But, if LV1 was already a thin pool, the command would swap
+the current metadata LV with LV2 (for repair purposes.)
+
+In the same way, this previous command syntax would perform two different
+operations:
+.br
+\fBlvconvert --cachepool\fP \fILV1\fP \fB--poolmetadata\fP \fILV2\fP
+.br
+If LV1 was not a cache pool, the command would convert LV1 to
+a cache pool, optionally using a specified LV for metadata.
+But, if LV1 was already a cache pool, the command would swap
+the current metadata LV with LV2 (for repair purposes.)
+
.SH EXAMPLES
Convert a linear LV to a two-way mirror LV.
diff --git a/man/lvmthin.7.in b/man/lvmthin.7.in
index 714233e..f6f8548 100644
--- a/man/lvmthin.7.in
+++ b/man/lvmthin.7.in
@@ -278,22 +278,6 @@ or vgchange to activate thin snapshots with the "k" attribute.
\&
-.SS Alternate syntax for specifying type thin\-pool
-
-\&
-
-The fully specified syntax for creating a thin pool LV shown above is:
-
-.B lvconvert \-\-type thin-pool \-\-poolmetadata VG/ThinMetaLV VG/ThinDataLV
-
-An alternate syntax may be used for the same operation:
-
-.B lvconvert \-\-thinpool VG/ThinDataLV \-\-poolmetadata VG/ThinMetaLV
-
-The thin-pool type is inferred by lvm; the \-\-thinpool option is not an
-alias for \-\-type thin\-pool.
-
-
.SS Automatic pool metadata LV
\&
diff --git a/tools/args.h b/tools/args.h
index f64b126..06595a6 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -589,9 +589,12 @@ arg(stripes_long_ARG, '\0', "stripes", number_VAL, 0, 0,
"existing allocated space, only newly allocated space can be striped.\n")
arg(swapmetadata_ARG, '\0', "swapmetadata", 0, 0, 0,
- "Remove the metadata LV in a pool and replace it with another specified LV.\n"
- "The removed LV is preserved and given the name of the LV that replaced it.\n"
- "Used for repair only.\n")
+ "Extracts the metadata LV from a pool and replaces it with another specified LV.\n"
+ "The extracted LV is preserved and given the name of the LV that replaced it.\n"
+ "Use for repair only. When the metadata LV is swapped out of the pool, it can\n"
+ "be activated directly and used with thin provisioning tools:\n"
+ "\\fBcache_dump\\fP(8), \\fBcache_repair\\fP(8), \\fBcache_restore\\fP(8),\n"
+ "\\fBthin_dump\\fP(8), \\fBthin_repair\\fP(8), \\fBthin_restore\\fP(8).\n")
arg(syncaction_ARG, '\0', "syncaction", syncaction_VAL, 0, 0,
"Initiate different types of RAID synchronization.\n"
diff --git a/tools/command-lines.in b/tools/command-lines.in
index 377e536..aed38e7 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -454,17 +454,36 @@ DESC: Convert LV to type thin-pool.
RULE: all and lv_is_visible
RULE: all not lv_is_locked lv_is_origin lv_is_merging_origin lv_is_external_origin lv_is_virtual
-# alternate form of lvconvert --type thin-pool
-# deprecated because of non-standard syntax (missing positional arg)
-# Commands in this form are converted to standard form so that
-# the validation of LV types and rules specified above will apply.
-lvconvert --thinpool LV_linear_striped_raid_cache
+# This command syntax has two different meanings depending on
+# whether the LV pos arg is already a thin pool or not.
+#
+# 1. When the LV arg is not a pool, this command converts
+# the LV into a pool, optionally using a specified meta LV.
+# This is an alternate form of the primary command:
+# lvconvert --type thin-pool LV
+#
+# 2. When the LV is is already a pool and a meta LV is specified,
+# the meta LV is swapped. Swapping a meta LV is a very specialized
+# operation that users should never use.
+# This is an alternate form of the primary command:
+# lvconvert --swapmetadata --poolmetadata LV LV
+#
+# The command def cannot include --poolmetadata as a required
+# option, otherwise 1 would not pass, so the validation of
+# this option cannot be done by the command defs, but has to
+# be done ad hoc in the lvconvert implementation.
+#
+# This command syntax is deprecated, and the primary forms
+# of creating a pool or swapping metadata should be used.
+
+lvconvert --thinpool LV_linear_striped_raid_cache_thinpool
OO: --type thin-pool, --stripes_long Number, --stripesize SizeKB,
--discards Discards, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT
OP: PV ...
-ID: lvconvert_to_thinpool_noarg
+ID: lvconvert_to_thinpool_or_swap_metadata
DESC: Convert LV to type thin-pool (variant, use --type thin-pool).
-FLAGS: SECONDARY_SYNTAX
+DESC: Swap metadata LV in a thin pool (variant, use --swapmetadata).
+FLAGS: PREVIOUS_SYNTAX
---
@@ -475,17 +494,36 @@ OP: PV ...
ID: lvconvert_to_cachepool
DESC: Convert LV to type cache-pool.
-# alternate form of lvconvert --type cache-pool
-# deprecated because of non-standard syntax (missing positional arg)
-# Commands in this form are converted to standard form so that
-# the validation of LV types and rules specified above will apply.
-lvconvert --cachepool LV_linear_striped_raid
+# This command syntax has two different meanings depending on
+# whether the LV pos arg is already a cache pool or not.
+#
+# 1. When the LV arg is not a pool, this command converts
+# the LV into a pool, optionally using a specified meta LV.
+# This is an alternate form of the primary command:
+# lvconvert --type cache-pool LV
+#
+# 2. When the LV is is already a pool and a meta LV is specified,
+# the meta LV is swapped. Swapping a meta LV is a very specialized
+# operation that users should never use.
+# This is an alternate form of the primary command:
+# lvconvert --swapmetadata --poolmetadata LV LV
+#
+# The command def cannot include --poolmetadata as a required
+# option, otherwise 1 would not pass, so the validation of
+# this option cannot be done by the command defs, but has to
+# be done ad hoc in the lvconvert implementation.
+#
+# This command syntax is deprecated, and the primary forms
+# of creating a pool or swapping metadata should be used.
+
+lvconvert --cachepool LV_linear_striped_raid_cachepool
OO: --type cache-pool, OO_LVCONVERT_POOL, OO_LVCONVERT,
--cachemode CacheMode, --cachepolicy String, --cachesettings String
OP: PV ...
-ID: lvconvert_to_cachepool_noarg
+ID: lvconvert_to_cachepool_or_swap_metadata
DESC: Convert LV to type cache-pool (variant, use --type cache-pool).
-FLAGS: SECONDARY_SYNTAX
+DESC: Swap metadata LV in a cache pool (variant, use --swapmetadata).
+FLAGS: PREVIOUS_SYNTAX
---
diff --git a/tools/command.c b/tools/command.c
index 6cd4d68..2897c65 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -1128,6 +1128,8 @@ static void add_flags(struct command *cmd, char *line)
{
if (strstr(line, "SECONDARY_SYNTAX"))
cmd->cmd_flags |= CMD_FLAG_SECONDARY_SYNTAX;
+ if (strstr(line, "PREVIOUS_SYNTAX"))
+ cmd->cmd_flags |= CMD_FLAG_PREVIOUS_SYNTAX;
}
#define MAX_RULE_OPTS 64
@@ -2659,6 +2661,9 @@ void print_man(char *name, char *des_file, int include_primary, int include_seco
prev_cmd = NULL;
}
+ if (cmd->cmd_flags & CMD_FLAG_PREVIOUS_SYNTAX)
+ continue;
+
if ((cmd->cmd_flags & CMD_FLAG_SECONDARY_SYNTAX) && !include_secondary)
continue;
diff --git a/tools/command.h b/tools/command.h
index fcf0ccb..95bd797 100644
--- a/tools/command.h
+++ b/tools/command.h
@@ -166,7 +166,8 @@ struct cmd_rule {
*/
#define CMD_FLAG_ONE_REQUIRED_OPT 1 /* lvchange/vgchage require one item from required_opt_args */
#define CMD_FLAG_SECONDARY_SYNTAX 2 /* allows syntax variants to be suppressed in certain output */
-#define CMD_FLAG_PARSE_ERROR 4 /* error parsing command-lines.in def */
+#define CMD_FLAG_PREVIOUS_SYNTAX 4 /* allows syntax variants to not be advertised in output */
+#define CMD_FLAG_PARSE_ERROR 8 /* error parsing command-lines.in def */
/* a register of the lvm commands */
struct command {
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index a2ad115..b9e0665 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -3790,51 +3790,6 @@ int lvconvert_to_pool_cmd(struct cmd_context *cmd, int argc, char **argv)
NULL, NULL, &_lvconvert_to_pool_single);
}
-/*
- * Reformats non-standard command form into standard command form.
- *
- * In the command variants with no position LV arg, the LV arg is taken from
- * the --thinpool/--cachepool arg, and the position args are modified to match
- * the standard command form.
- */
-
-int lvconvert_to_pool_noarg_cmd(struct cmd_context *cmd, int argc, char **argv)
-{
- struct command *new_command;
- char *pool_data_name;
- int i, p;
-
- switch (cmd->command->command_enum) {
- case lvconvert_to_thinpool_noarg_CMD:
- pool_data_name = (char *)arg_str_value(cmd, thinpool_ARG, NULL);
- new_command = get_command(lvconvert_to_thinpool_CMD);
- break;
- case lvconvert_to_cachepool_noarg_CMD:
- pool_data_name = (char *)arg_str_value(cmd, cachepool_ARG, NULL);
- new_command = get_command(lvconvert_to_cachepool_CMD);
- break;
- default:
- log_error(INTERNAL_ERROR "Unknown pool conversion.");
- return 0;
- };
-
- log_debug("Changing command %d:%s to standard form %d:%s",
- cmd->command->command_index, cmd->command->command_id,
- new_command->command_index, new_command->command_id);
-
- /* Make the LV the first position arg. */
-
- p = cmd->position_argc;
- for (i = 0; i < cmd->position_argc; i++)
- cmd->position_argv[p] = cmd->position_argv[p-1];
-
- cmd->position_argv[0] = pool_data_name;
- cmd->position_argc++;
- cmd->command = new_command;
-
- return lvconvert_to_pool_cmd(cmd, argc, argv);
-}
-
static int _lvconvert_to_cache_vol_single(struct cmd_context *cmd,
struct logical_volume *lv,
struct processing_handle *handle)
@@ -4077,39 +4032,96 @@ int lvconvert_swap_pool_metadata_cmd(struct cmd_context *cmd, int argc, char **a
NULL, NULL, &_lvconvert_swap_pool_metadata_single);
}
-#if 0
-int lvconvert_swap_pool_metadata_noarg_cmd(struct cmd_context *cmd, int argc, char **argv)
+static int _lvconvert_to_pool_or_swap_metadata_single(struct cmd_context *cmd,
+ struct logical_volume *lv,
+ struct processing_handle *handle)
{
- struct command *new_command;
- char *pool_name;
+ struct dm_list *use_pvh = NULL;
+ int to_thinpool = 0;
+ int to_cachepool = 0;
switch (cmd->command->command_enum) {
- case lvconvert_swap_thinpool_metadata_CMD:
- pool_name = (char *)arg_str_value(cmd, thinpool_ARG, NULL);
+ case lvconvert_to_thinpool_or_swap_metadata_CMD:
+ to_thinpool = 1;
break;
- case lvconvert_swap_cachepool_metadata_CMD:
- pool_name = (char *)arg_str_value(cmd, cachepool_ARG, NULL);
+ case lvconvert_to_cachepool_or_swap_metadata_CMD:
+ to_cachepool = 1;
break;
default:
- log_error(INTERNAL_ERROR "Unknown pool conversion.");
+ log_error(INTERNAL_ERROR "Invalid lvconvert pool command");
return 0;
};
- new_command = get_command(lvconvert_swap_pool_metadata_CMD);
+ if (cmd->position_argc > 1) {
+ /* First pos arg is required LV, remaining are optional PVs. */
+ if (!(use_pvh = create_pv_list(cmd->mem, lv->vg, cmd->position_argc - 1, cmd->position_argv + 1, 0)))
+ return_ECMD_FAILED;
+ } else
+ use_pvh = &lv->vg->pvs;
+
+ /*
+ * We can finally determine if this command is supposed to create
+ * a pool or swap the metadata in an existing pool.
+ *
+ * This allows the ambiguous command:
+ * 'lvconvert --thinpool LV1 --poolmetadata LV2' to mean either:
+ * 1. convert LV2 to a pool using the specified meta LV2
+ * 2. swap the meta lv in LV1 with LV2
+ *
+ * In case 2, the poolmetadata option is required, but in case 1
+ * it is optional. So, the command def is not able to validate
+ * the required/optional option, and we have to check here
+ * for missing poolmetadata in case 2.
+ */
+ if (lv_is_pool(lv)) {
+ if (!arg_is_set(cmd, poolmetadata_ARG)) {
+ log_error("The --poolmetadata option is required to swap metadata.");
+ return ECMD_FAILED;
+ }
+ return _lvconvert_swap_pool_metadata_single(cmd, lv, handle);
+ }
+
+ if (!_lvconvert_to_pool(cmd, lv, to_thinpool, to_cachepool, use_pvh))
+ return_ECMD_FAILED;
+
+ return ECMD_PROCESSED;
+}
+
+/*
+ * In the command variants with no position LV arg, the LV arg is taken from
+ * the --thinpool/--cachepool arg, and the position args are modified to match
+ * the standard command form.
+ */
+
+int lvconvert_to_pool_or_swap_metadata_cmd(struct cmd_context *cmd, int argc, char **argv)
+{
+ char *pool_data_name;
+ int i, p;
- log_debug("Changing command %d:%s to standard form %d:%s",
- cmd->command->command_index, cmd->command->command_id,
- new_command->command_index, new_command->command_id);
+ switch (cmd->command->command_enum) {
+ case lvconvert_to_thinpool_or_swap_metadata_CMD:
+ pool_data_name = (char *)arg_str_value(cmd, thinpool_ARG, NULL);
+ break;
+ case lvconvert_to_cachepool_or_swap_metadata_CMD:
+ pool_data_name = (char *)arg_str_value(cmd, cachepool_ARG, NULL);
+ break;
+ default:
+ log_error(INTERNAL_ERROR "Unknown pool conversion.");
+ return 0;
+ };
/* Make the LV the first position arg. */
- cmd->position_argv[0] = pool_name;
+ p = cmd->position_argc;
+ for (i = 0; i < cmd->position_argc; i++)
+ cmd->position_argv[p] = cmd->position_argv[p-1];
+
+ cmd->position_argv[0] = pool_data_name;
cmd->position_argc++;
- cmd->command = new_command;
- return lvconvert_swap_pool_metadata_cmd(cmd, argc, argv);
+ return process_each_lv(cmd, 1, cmd->position_argv, NULL, NULL, READ_FOR_UPDATE,
+ NULL, NULL, &_lvconvert_to_pool_or_swap_metadata_single);
}
-#endif
static int _lvconvert_merge_thin_single(struct cmd_context *cmd,
struct logical_volume *lv,
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 7e50d05..26f7476 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -135,12 +135,12 @@ struct command_function command_functions[CMD_COUNT] = {
/* lvconvert utilities for creating/maintaining thin and cache objects. */
{ lvconvert_to_thinpool_CMD, lvconvert_to_pool_cmd },
- { lvconvert_to_thinpool_noarg_CMD, lvconvert_to_pool_noarg_cmd },
{ lvconvert_to_cachepool_CMD, lvconvert_to_pool_cmd },
- { lvconvert_to_cachepool_noarg_CMD, lvconvert_to_pool_noarg_cmd },
{ lvconvert_to_thin_with_external_CMD, lvconvert_to_thin_with_external_cmd },
{ lvconvert_to_cache_vol_CMD, lvconvert_to_cache_vol_cmd },
{ lvconvert_swap_pool_metadata_CMD, lvconvert_swap_pool_metadata_cmd },
+ { lvconvert_to_thinpool_or_swap_metadata_CMD, lvconvert_to_pool_or_swap_metadata_cmd },
+ { lvconvert_to_cachepool_or_swap_metadata_CMD, lvconvert_to_pool_or_swap_metadata_cmd },
{ lvconvert_merge_thin_CMD, lvconvert_merge_thin_cmd },
{ lvconvert_split_and_keep_cachepool_CMD, lvconvert_split_cachepool_cmd },
{ lvconvert_split_and_remove_cachepool_CMD, lvconvert_split_cachepool_cmd },
@@ -1727,6 +1727,9 @@ static int _usage(const char *name, int longhelp)
if (strcmp(_cmdline.commands[i].name, name))
continue;
+ if (_cmdline.commands[i].cmd_flags & CMD_FLAG_PREVIOUS_SYNTAX)
+ continue;
+
if ((_cmdline.commands[i].cmd_flags & CMD_FLAG_SECONDARY_SYNTAX) && !longhelp)
continue;
diff --git a/tools/tools.h b/tools/tools.h
index b3858a0..62db506 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -274,10 +274,10 @@ int lvconvert_combine_split_snapshot_cmd(struct cmd_context *cmd, int argc, char
int lvconvert_start_poll_cmd(struct cmd_context *cmd, int argc, char **argv);
int lvconvert_to_pool_cmd(struct cmd_context *cmd, int argc, char **argv);
-int lvconvert_to_pool_noarg_cmd(struct cmd_context *cmd, int argc, char **argv);
int lvconvert_to_cache_vol_cmd(struct cmd_context *cmd, int argc, char **argv);
int lvconvert_to_thin_with_external_cmd(struct cmd_context *cmd, int argc, char **argv);
int lvconvert_swap_pool_metadata_cmd(struct cmd_context *cmd, int argc, char **argv);
+int lvconvert_to_pool_or_swap_metadata_cmd(struct cmd_context *cmd, int argc, char **argv);
int lvconvert_merge_thin_cmd(struct cmd_context *cmd, int argc, char **argv);
int lvconvert_split_cachepool_cmd(struct cmd_context *cmd, int argc, char **argv);
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=56deed9d54c9070c…
Commit: 56deed9d54c9070cc586f040264a8e1985b19bdc
Parent: 00f299b93265ea2a9a930f26c68d887b8708da5a
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 17 13:57:59 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 17 13:57:59 2017 +0100
commands: compensate --uuid
As we now user binary search - it's nondeterministict
which of the same 'args' will be give - so duplicates
need 'extra' care.
So provide same hack for output for --uuidstr_ARG as
for input.
Solves 'pvscan -u'.
---
tools/command.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index 1abac20..6cd4d68 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -866,6 +866,11 @@ static void add_opt_arg(struct command *cmd, char *str, int *takes_arg, int requ
}
opt = opt_str_to_num(cmd, str);
+
+ /* If the binary-search finds uuidstr_ARG switch to uuid_ARG */
+ if (opt == uuidstr_ARG)
+ opt = uuid_ARG;
+
skip:
if (required > 0)
cmd->required_opt_args[cmd->ro_count++].opt = opt;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=772834e40aef44a8…
Commit: 772834e40aef44a8f7bc884050e1b88087073706
Parent: 582a272b3f401e1bb6eafaa52d0ed1d318d04a9f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 17 10:00:43 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 17 13:20:55 2017 +0100
commands: optimize binary search
Since there is a lot of options and lot of searches,
use binary search to keep strcmp at minimum.
The interesting part is - alphabetically sorted array contains
duplicates and some of them are not the 'right anwer', so
after we find matching string but not matching long_ARG,
we may need to check if the surrouding strings are the right matching
one.
The single loops is used also for strictly define --foo_long
(i.e. --stripes) and just differs at final part.
TODO1: replace strstr call with some flag (just like short_opt).
TODO2: drop '--' from being stored and tests by strcmp.
---
tools/command.c | 79 +++++++++++++++++++++++++++++++-----------------------
1 files changed, 45 insertions(+), 34 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index e5a4640..b202878 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -359,46 +359,57 @@ static int opt_str_to_num(struct command *cmd, char *str)
char long_name[MAX_LONG_OPT_NAME_LEN];
char *p;
int i;
+ int first = 0, last = ARG_COUNT - 1, middle;
- /*
- * --foo_long means there are two args entries
- * for --foo, one with a short option and one
- * without, and we want the one without the
- * short option.
- */
- if (strstr(str, "_long")) {
- memset(long_name, 0, sizeof(long_name));
- strncpy(long_name, str, MAX_LONG_OPT_NAME_LEN-1);
- if ((p = strstr(long_name, "_long")))
- *p = '\0';
-
- for (i = 0; i < ARG_COUNT; i++) {
- if (!opt_names[i].long_opt)
- continue;
- /* skip anything with a short opt */
- if (opt_names[i].short_opt)
- continue;
- if (!strcmp(opt_names[i].long_opt, long_name))
- return opt_names[i].opt_enum;
- }
+ dm_strncpy(long_name, str, sizeof(long_name));
- log_error("Parsing command defs: unknown opt str: %s %s", str, long_name);
- cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
- return ARG_UNUSED;
- }
+ if ((p = strstr(long_name, "_long")))
+ /*
+ * --foo_long means there are two args entries
+ * for --foo, one with a short option and one
+ * without, and we want the one without the
+ * short option (== 0).
+ */
+ *p = '\0';
- for (i = 0; i < ARG_COUNT; i++) {
- if (!opt_names[i].long_opt)
- continue;
- /* These are only selected using --foo_long */
- if (strstr(opt_names[i].name, "_long_ARG"))
- continue;
- if (!strcmp(opt_names[i].long_opt, str))
- return opt_names[i].opt_enum;
+ /* Binary search in sorted array of long options (with duplicates) */
+ while (first <= last) {
+ middle = first + (last - first) / 2;
+ if ((i = strcmp(opt_names_alpha[middle]->long_opt, long_name)) < 0)
+ first = middle + 1;
+ else if (i > 0)
+ last = middle - 1;
+ else {
+ /* Matching long option string found.
+ * As sorted array contains duplicates, we need to also
+ * check left & right side for possible match
+ */
+ for (i = middle;;) {
+ if ((!p && !strstr(opt_names_alpha[i]->name, "_long_ARG")) ||
+ (p && !opt_names_alpha[i]->short_opt))
+ return opt_names_alpha[i]->opt_enum; /* Found */
+ /* Check if there is something on the 'left-side' */
+ if ((i <= first) || strcmp(opt_names_alpha[--i]->long_opt, long_name))
+ break;
+ }
+
+ /* Nothing on the left, so look on the 'right-side' */
+ for (i = middle + 1; i <= last; ++i) {
+ if (strcmp(opt_names_alpha[i]->long_opt, long_name))
+ break;
+ if ((!p && !strstr(opt_names_alpha[i]->name, "_long_ARG")) ||
+ (p && !opt_names_alpha[i]->short_opt))
+ return opt_names_alpha[i]->opt_enum; /* Found */
+ }
+
+ break; /* Nothing... */
+ }
}
- log_error("Parsing command defs: unknown opt str: \"%s\"", str);
+ log_error("Parsing command defs: unknown opt str: \"%s\"%s%s.",
+ str, p ? " ": "", p ? long_name : "");
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
+
return ARG_UNUSED;
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1cb95fa5a050c505…
Commit: 1cb95fa5a050c5056d882ef9cbb01ce8040df019
Parent: 15f51bc42113494bfb49fbc0d6a1913f68fb80a8
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Feb 16 13:59:52 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Feb 16 13:59:52 2017 -0600
commands: initialize commands[] once
When using liblvm2cmd, a process can do multiple
init/exit calls, i.e.
lvm2_init(); lvm2_run(); lvm2_exit();
lvm2_init(); lvm2_run(); lvm2_exit();
...
define_commands() needs to set up the global commands[]
definitions only the first time.
---
tools/lvmcmdline.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index ed32f1c..e599ded 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -1130,6 +1130,10 @@ void lvm_register_commands(char *name)
{
int i;
+ /* already initialized */
+ if (_cmdline.commands)
+ return;
+
memset(&commands, 0, sizeof(commands));
/*
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6a5c9ba34902193a…
Commit: 6a5c9ba34902193ac9d03fe30976d259391905b3
Parent: 2556498ee191cc9eaa505c611c5570937ff32315
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Feb 15 15:06:52 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Feb 15 15:28:54 2017 -0600
commands: use existing vg/lv name parsing functions
inside the new lv arg parsing function.
This includes getting the VG name from the env var,
and some added checks on the format of the vg/lv string.
---
tools/toollib.c | 45 +++++++++++++++++++++++++++++----------------
1 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/tools/toollib.c b/tools/toollib.c
index 6e0a4f1..842f67c 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -3362,10 +3362,10 @@ static int _get_arg_lvnames(struct cmd_context *cmd,
* came up with its own inconsistent approach.
*
* In this case, when the position arg is a single name, it is treated as an LV
- * name (not a VG name). This leaves the VG unknown. So, other option values
- * must be searched for a VG name. If one of those option values contains a
- * vgname/lvname value, then the VG name is extracted and used for the LV
- * position arg.
+ * name (not a VG name). This leaves the VG unknown. So, other option values,
+ * or env var, must be searched for a VG name. If one of the option values
+ * contains a vgname/lvname value, then the VG name is extracted and used for
+ * the LV position arg. Or, if the env var has the VG name, that is used.
*
* Other option values that are searched for a VG name are:
* --thinpool, --cachepool.
@@ -3375,21 +3375,21 @@ static int _get_arg_lvnames(struct cmd_context *cmd,
* . add vg/lv1 to arg_lvnames
*
* command lv1
- * . error: no vg name
+ * . error: no vg name (unless LVM_VG_NAME)
*
- * command --option vg/lv1 vg/lv2
+ * command --option=vg/lv1 vg/lv2
* . verify both vg names match
* . add vg to arg_vgnames
* . add vg/lv2 to arg_lvnames
*
- * command --option lv1 lv2
- * . error: no vg name
+ * command --option=lv1 lv2
+ * . error: no vg name (unless LVM_VG_NAME)
*
- * command --option vg/lv1 lv2
+ * command --option=vg/lv1 lv2
* . add vg to arg_vgnames
* . add vg/lv2 to arg_lvnames
*
- * command --option lv1 vg/lv2
+ * command --option=lv1 vg/lv2
* . add vg to arg_vgnames
* . add vg/lv2 to arg_lvnames
*/
@@ -3405,6 +3405,7 @@ static int _get_arg_lvnames_using_options(struct cmd_context *cmd,
const char *pos_vgname = NULL;
const char *opt_vgname = NULL;
const char *pos_lvname = NULL;
+ const char *env_vgname = NULL;
const char *use_vgname = NULL;
char *tmp_name;
char *split;
@@ -3440,9 +3441,12 @@ static int _get_arg_lvnames_using_options(struct cmd_context *cmd,
}
if ((split = strchr(pos_name, '/'))) {
- pos_vgname = pos_name;
- pos_lvname = split + 1;
- *split = '\0';
+ /*
+ * This splits pos_name 'x/y' into pos_vgname 'x' and pos_lvname 'y'
+ * It skips repeated '/', e.g. x//y
+ * It also checks and fails for extra '/', e.g. x/y/z
+ */
+ pos_vgname = _extract_vgname(cmd, pos_name, &pos_lvname);
} else {
pos_lvname = pos_name;
pos_vgname = NULL;
@@ -3453,7 +3457,9 @@ static int _get_arg_lvnames_using_options(struct cmd_context *cmd,
else if (arg_is_set(cmd, cachepool_ARG))
arg_name = arg_str_value(cmd, cachepool_ARG, NULL);
- if (!pos_vgname && !arg_name) {
+ env_vgname = _default_vgname(cmd);
+
+ if (!pos_vgname && !arg_name && !env_vgname) {
log_error("Cannot find VG name for LV %s.", pos_lvname);
return ECMD_FAILED;
}
@@ -3479,7 +3485,7 @@ static int _get_arg_lvnames_using_options(struct cmd_context *cmd,
opt_vgname = NULL;
}
- if (!pos_vgname && !opt_vgname) {
+ if (!pos_vgname && !opt_vgname && !env_vgname) {
log_error("Cannot find VG name for LV %s.", pos_lvname);
return ECMD_FAILED;
}
@@ -3490,7 +3496,14 @@ static int _get_arg_lvnames_using_options(struct cmd_context *cmd,
return ECMD_FAILED;
}
- use_vgname = pos_vgname ? pos_vgname : opt_vgname;
+ if (pos_vgname)
+ use_vgname = pos_vgname;
+ else if (opt_vgname)
+ use_vgname = opt_vgname;
+ else if (env_vgname)
+ use_vgname = env_vgname;
+ else
+ return_ECMD_FAILED;
if (!str_list_add(cmd->mem, arg_vgnames, dm_pool_strdup(cmd->mem, use_vgname))) {
log_error("strlist allocation failed.");
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=286d39ee3c4334e9…
Commit: 286d39ee3c4334e9ce0609d9136dfd6b5d6bf34a
Parent: d3af0e7528dbba30824379fc98cb4db437559ad5
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Feb 15 12:40:35 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Feb 15 12:40:35 2017 -0600
lvconvert: handle old arg quirk when combining snapshot
The old ad hoc arg parsing when combining a split snapshot
allowed the first lv to have a vgname, but not the second.
Since lvconvert now uses the standard arg parsing in
process_each_lv(), the old one-off behavior requires a
work around.
---
tools/lvconvert.c | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 502d614..a2ad115 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -3649,6 +3649,43 @@ static int _lvconvert_combine_split_snapshot_single(struct cmd_context *cmd,
int lvconvert_combine_split_snapshot_cmd(struct cmd_context *cmd, int argc, char **argv)
{
+ const char *vgname = NULL;
+ const char *lvname1;
+ const char *lvname2;
+ char *vglv;
+ int vglv_sz;
+
+ /*
+ * Hack to accomodate an old parsing quirk that allowed the
+ * the VG name to be attached to only the LV in arg pos 1,
+ * i.e. lvconvert -s vgname/lvname lvname
+ *
+ * The LV name in arg pos 2 is the one that is processed
+ * by process_each_lv(). If that LV has no VG name, but
+ * the first LV does, then copy the VG name from arg pos 1
+ * and add it to the LV name in arg pos 2 so that the
+ * standard arg parsing in process_each_lv will find it.
+ *
+ * This is the only instance in all commands.
+ */
+
+ lvname1 = cmd->position_argv[0];
+ lvname2 = cmd->position_argv[1];
+
+ if (strstr("/", lvname1) && !strstr("/", lvname2) && !getenv("LVM_VG_NAME")) {
+ if (!validate_lvname_param(cmd, &vgname, &lvname1))
+ return_ECMD_FAILED;
+
+ vglv_sz = strlen(vgname) + strlen(lvname2) + 2;
+ if (!(vglv = dm_pool_alloc(cmd->mem, vglv_sz)) ||
+ dm_snprintf(vglv, vglv_sz, "%s/%s", vgname, lvname2) < 0) {
+ log_error("vg/lv string alloc failed.");
+ return_ECMD_FAILED;
+ }
+
+ cmd->position_argv[1] = vglv;
+ }
+
return process_each_lv(cmd, 1, cmd->position_argv + 1, NULL, NULL, READ_FOR_UPDATE,
NULL, NULL, &_lvconvert_combine_split_snapshot_single);
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f46b28bdb6f8c0f7…
Commit: f46b28bdb6f8c0f7bae7a8b4fb4b886332831318
Parent: c868562a7968db9b0d00df9b1d0a8967a9aacaa3
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Feb 14 09:49:26 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Feb 14 09:52:09 2017 -0600
commands: improve help/usage output
Replace --help --help with --long-help.
Some blank lines were needed.
Add 'lvm help all' to print help for all commands.
---
tools/args.h | 7 +++-
tools/command-lines.in | 2 +-
tools/command.c | 5 ++-
tools/lvmcmdline.c | 95 ++++++++++++++++++++++++++++--------------------
4 files changed, 64 insertions(+), 45 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index b33df9a..f64b126 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -244,6 +244,9 @@ arg(locktype_ARG, '\0', "locktype", locktype_VAL, 0, 0,
arg(logonly_ARG, '\0', "logonly", 0, 0, 0,
"Suppress command report and display only log report.\n")
+arg(longhelp_ARG, '\0', "longhelp", 0, 0, 0,
+ "Display long help text.\n")
+
arg(maxrecoveryrate_ARG, '\0', "maxrecoveryrate", sizekb_VAL, 0, 0,
"Sets the maximum recovery rate for a RAID LV. The rate value\n"
"is an amount of data per second for each device in the array.\n"
@@ -920,8 +923,8 @@ arg(force_ARG, 'f', "force", 0, ARG_COUNTABLE, 0,
/* Not used. */
arg(full_ARG, 'f', "full", 0, 0, 0, NULL)
-arg(help_ARG, 'h', "help", 0, ARG_COUNTABLE, 0,
- "Display help text. Repeat this option for more information.\n")
+arg(help_ARG, 'h', "help", 0, 0, 0,
+ "Display help text.\n")
arg(cache_ARG, 'H', "cache", 0, 0, 0,
"Specifies the command is handling a cache LV or cache pool.\n"
diff --git a/tools/command-lines.in b/tools/command-lines.in
index 2eddd41..b6aa1d1 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -187,7 +187,7 @@
# OO_ALL is included in every command automatically.
#
OO_ALL: --commandprofile String, --config String, --debug,
---driverloaded Bool, --help, --profile String, --quiet,
+--driverloaded Bool, --help, --longhelp, --profile String, --quiet,
--verbose, --version, --yes, --test
#
diff --git a/tools/command.c b/tools/command.c
index 0ff5cd7..a968bed 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -1640,7 +1640,7 @@ void print_usage(struct command *cmd)
printf(" ]");
done:
- printf("\n");
+ printf("\n\n");
return;
}
@@ -1704,7 +1704,8 @@ void print_usage_common(struct command_name *cname, struct command *cmd)
}
}
- printf(" ]\n");
+ printf(" ]");
+ printf("\n\n");
}
#ifdef MAN_PAGE_GENERATOR
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 43278ff..494f01f 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -1384,7 +1384,7 @@ static struct command *_find_command(struct cmd_context *cmd, const char *path,
continue;
/* For help and version just return the first entry with matching name. */
- if (arg_is_set(cmd, help_ARG) || arg_is_set(cmd, help2_ARG) || arg_is_set(cmd, version_ARG))
+ if (arg_is_set(cmd, help_ARG) || arg_is_set(cmd, help2_ARG) || arg_is_set(cmd, longhelp_ARG) || arg_is_set(cmd, version_ARG))
return &commands[i];
match_required = 0; /* required parameters that match */
@@ -1661,7 +1661,40 @@ static void _short_usage(const char *name)
log_error("Run `%s --help' for more information.", name);
}
-static int _usage(const char *name, int help_count)
+static void _usage_notes(void)
+{
+ /*
+ * Excluding commonly understood syntax style like the meanings of:
+ * [ ] for optional, ... for repeatable, | for one of the following,
+ * -- for an option name, lower case strings and digits for literals.
+ */
+ log_print("Usage notes:");
+ log_print(". Variable parameters are: Number, String, PV, VG, LV, Tag.");
+ log_print(". Select indicates that a required positional parameter can");
+ log_print(" be omitted if the --select option is used.");
+ log_print(". --size Number can be replaced with --extents NumberExtents.");
+ log_print(". When --name is omitted from lvcreate, a new LV name is");
+ log_print(" generated with the \"lvol\" prefix and a unique numeric suffix.");
+ log_print(". The required VG parameter in lvcreate may be omitted when");
+ log_print(" the VG name is included in another option, e.g. --name VG/LV.");
+ log_print(". For required options listed in parentheses, e.g. (--A, --B),");
+ log_print(" any one is required, after which the others are optional.");
+ log_print(". The _new suffix indicates the VG or LV must not yet exist.");
+ log_print(". LV followed by _<type> indicates that an LV of the given type");
+ log_print(" is required. (raid represents any raid<N> type.)");
+ log_print(". Input units are always treated as base two values, regardless of");
+ log_print(" unit capitalization, e.g. 'k' and 'K' both refer to 1024.");
+ log_print(". The default input unit is specified by letter, followed by |unit");
+ log_print(" which represents other possible input units: bBsSkKmMgGtTpPeE.");
+ log_print(". Output units can be specified with the --units option, for which");
+ log_print(" lower/upper case letters refer to base 2/10 values.");
+ log_print(" formats that are recognized, e.g. for compatibility.");
+ log_print(". See man pages for short option equivalents of long option names,");
+ log_print(" and for more detailed descriptions of variable parameters.");
+ log_print(" ");
+}
+
+static int _usage(const char *name, int longhelp)
{
struct command_name *cname = find_command_name(name);
struct command *cmd;
@@ -1678,52 +1711,33 @@ static int _usage(const char *name, int help_count)
if (strcmp(_cmdline.commands[i].name, name))
continue;
- if ((_cmdline.commands[i].cmd_flags & CMD_FLAG_SECONDARY_SYNTAX) && (help_count < 3))
+ if ((_cmdline.commands[i].cmd_flags & CMD_FLAG_SECONDARY_SYNTAX) && !longhelp)
continue;
print_usage(&_cmdline.commands[i]);
cmd = &_cmdline.commands[i];
- printf("\n");
}
/* Common options are printed once for all variants of a command name. */
print_usage_common(cname, cmd);
- if (help_count > 1) {
- /*
- * Excluding commonly understood syntax style like the meanings of:
- * [ ] for optional, ... for repeatable, | for one of the following,
- * -- for an option name, lower case strings and digits for literals.
- */
- log_print("Usage notes:");
- log_print(". Variable parameters are: Number, String, PV, VG, LV, Tag.");
- log_print(". Select indicates that a required positional parameter can");
- log_print(" be omitted if the --select option is used.");
- log_print(". --size Number can be replaced with --extents NumberExtents.");
- log_print(". When --name is omitted from lvcreate, a new LV name is");
- log_print(" generated with the \"lvol\" prefix and a unique numeric suffix.");
- log_print(". The required VG parameter in lvcreate may be omitted when");
- log_print(" the VG name is included in another option, e.g. --name VG/LV.");
- log_print(". For required options listed in parentheses, e.g. (--A, --B),");
- log_print(" any one is required, after which the others are optional.");
- log_print(". The _new suffix indicates the VG or LV must not yet exist.");
- log_print(". LV followed by _<type> indicates that an LV of the given type");
- log_print(" is required. (raid represents any raid<N> type.)");
- log_print(". Input units are always treated as base two values, regardless of");
- log_print(" unit capitalization, e.g. 'k' and 'K' both refer to 1024.");
- log_print(". The default input unit is specified by letter, followed by |unit");
- log_print(" which represents other possible input units: bBsSkKmMgGtTpPeE.");
- log_print(". Output units can be specified with the --units option, for which");
- log_print(" lower/upper case letters refer to base 2/10 values.");
- log_print(". Use --help --help --help to print secondary command syntax");
- log_print(" formats that are recognized, e.g. for compatibility.");
- log_print(". See man pages for short option equivalents of long option names,");
- log_print(" and for more detailed descriptions of variable parameters.");
- }
+ if (longhelp)
+ _usage_notes();
return 1;
}
+static void _usage_all(void)
+{
+ int i;
+
+ for (i = 0; i < MAX_COMMAND_NAMES; i++) {
+ if (!command_names[i].name)
+ break;
+ _usage(command_names[i].name, 0);
+ }
+}
+
/*
* Sets up the arguments to pass to getopt_long().
*
@@ -2158,11 +2172,10 @@ static int _get_settings(struct cmd_context *cmd)
static int _process_common_commands(struct cmd_context *cmd)
{
- if (arg_is_set(cmd, help_ARG) || arg_is_set(cmd, help2_ARG)) {
- _usage(cmd->name, arg_count(cmd, help_ARG));
-
- if (arg_count(cmd, help_ARG) < 2)
- log_print("(Use --help --help for usage notes.)");
+ if (arg_is_set(cmd, help_ARG) ||
+ arg_is_set(cmd, longhelp_ARG) ||
+ arg_is_set(cmd, help2_ARG)) {
+ _usage(cmd->name, arg_is_set(cmd, longhelp_ARG));
return ECMD_PROCESSED;
}
@@ -2195,6 +2208,8 @@ int help(struct cmd_context *cmd __attribute__((unused)), int argc, char **argv)
if (!argc)
_display_help();
+ else if (argc == 1 && !strcmp(argv[0], "all"))
+ _usage_all();
else {
int i;
for (i = 0; i < argc; i++)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3350eb67cc66dcd2…
Commit: 3350eb67cc66dcd2c6ee6456a3524bc723aa4e38
Parent: 6118b0fb93502e1ba06e5a4a696a264c0e4af0ed
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Feb 14 09:53:13 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Feb 14 10:24:56 2017 +0100
libdm: move code for _stats_resize_group
Code is only needed when "fiemap.h" so keep it under single #ifdef.
---
libdm/libdm-stats.c | 62 +++++++++++++++++++++++++-------------------------
1 files changed, 31 insertions(+), 31 deletions(-)
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index 587c748..3f6730e 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -3868,37 +3868,6 @@ static int _extent_start_compare(const void *p1, const void *p2)
return 1;
}
-/*
- * Resize the group bitmap corresponding to group_id so that it can
- * contain at least num_regions members.
- */
-static int _stats_resize_group(struct dm_stats_group *group, int num_regions)
-{
- int last_bit = dm_bit_get_last(group->regions);
- dm_bitset_t new, old;
-
- if (last_bit >= num_regions) {
- log_error("Cannot resize group bitmap to %d with bit %d set.",
- num_regions, last_bit);
- return 0;
- }
-
- log_very_verbose("Resizing group bitmap from %d to %d (last_bit: %d).",
- group->regions[0], num_regions, last_bit);
-
- new = dm_bitset_create(NULL, num_regions);
- if (!new) {
- log_error("Could not allocate memory for new group bitmap.");
- return 0;
- }
-
- old = group->regions;
- dm_bit_copy(new, old);
- group->regions = new;
- dm_bitset_destroy(old);
- return 1;
-}
-
static int _stats_create_group(struct dm_stats *dms, dm_bitset_t regions,
const char *alias, uint64_t *group_id)
{
@@ -4203,6 +4172,37 @@ int dm_stats_get_group_descriptor(const struct dm_stats *dms,
#ifdef HAVE_LINUX_FIEMAP_H
/*
+ * Resize the group bitmap corresponding to group_id so that it can
+ * contain at least num_regions members.
+ */
+static int _stats_resize_group(struct dm_stats_group *group, int num_regions)
+{
+ int last_bit = dm_bit_get_last(group->regions);
+ dm_bitset_t new, old;
+
+ if (last_bit >= num_regions) {
+ log_error("Cannot resize group bitmap to %d with bit %d set.",
+ num_regions, last_bit);
+ return 0;
+ }
+
+ log_very_verbose("Resizing group bitmap from %d to %d (last_bit: %d).",
+ group->regions[0], num_regions, last_bit);
+
+ new = dm_bitset_create(NULL, num_regions);
+ if (!new) {
+ log_error("Could not allocate memory for new group bitmap.");
+ return 0;
+ }
+
+ old = group->regions;
+ dm_bit_copy(new, old);
+ group->regions = new;
+ dm_bitset_destroy(old);
+ return 1;
+}
+
+/*
* Group a table of region_ids corresponding to the extents of a file.
*/
static int _stats_group_file_regions(struct dm_stats *dms, uint64_t *region_ids,
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6118b0fb93502e1b…
Commit: 6118b0fb93502e1ba06e5a4a696a264c0e4af0ed
Parent: 65b82a80720b137e24077c29f9c52d6ad43f93a5
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 13 22:55:30 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Feb 14 00:05:04 2017 +0100
configure: update
---
configure | 198 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 198 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index 1cb4b54..9b69964 100755
--- a/configure
+++ b/configure
@@ -821,6 +821,8 @@ HAVE_PIE
POW_LIB
LIBOBJS
ALLOCA
+SORT
+WC
CHMOD
CSCOPE_CMD
CFLOW_CMD
@@ -5234,6 +5236,202 @@ else
CHMOD="$ac_cv_path_CHMOD"
fi
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}wc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}wc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_WC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $WC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_WC="$WC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+WC=$ac_cv_path_WC
+if test -n "$WC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
+$as_echo "$WC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_WC"; then
+ ac_pt_WC=$WC
+ # Extract the first word of "wc", so it can be a program name with args.
+set dummy wc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_WC+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_WC in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_WC="$ac_pt_WC" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_WC="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_WC=$ac_cv_path_ac_pt_WC
+if test -n "$ac_pt_WC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_WC" >&5
+$as_echo "$ac_pt_WC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_WC" = x; then
+ WC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ WC=$ac_pt_WC
+ fi
+else
+ WC="$ac_cv_path_WC"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}sort", so it can be a program name with args.
+set dummy ${ac_tool_prefix}sort; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_SORT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $SORT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+SORT=$ac_cv_path_SORT
+if test -n "$SORT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
+$as_echo "$SORT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_SORT"; then
+ ac_pt_SORT=$SORT
+ # Extract the first word of "sort", so it can be a program name with args.
+set dummy sort; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_SORT+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_SORT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_SORT="$ac_pt_SORT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_SORT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_SORT=$ac_cv_path_ac_pt_SORT
+if test -n "$ac_pt_SORT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_SORT" >&5
+$as_echo "$ac_pt_SORT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_SORT" = x; then
+ SORT=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ SORT=$ac_pt_SORT
+ fi
+else
+ SORT="$ac_cv_path_SORT"
+fi
+
################################################################################
ac_header_dirent=no
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5ab051df7a6f53ab…
Commit: 5ab051df7a6f53ababb1c283af2ec4f8e1c7cac3
Parent: c816e8b6365f777a2e555824ae2425f85869c5c5
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Feb 13 15:36:17 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 13 15:36:17 2017 -0600
WHATS_NEW: changes for recent command defs
---
WHATS_NEW | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 3fbef6f..c8b7fdc 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,14 +1,16 @@
Version 2.02.169 -
=====================================
- Add lvconvert --swapmetadata for previous non-specific command.
- Add lvconvert --startpoll for previous non-specific command.
- Add lvconvert --mergethin for specific --merge case.
- Add lvconvert --mergemirrors for specific --merge case.
- Add lvconvert --mergesnapshot for specific --merge case.
+ Add lvconvert --swapmetadata, new specific way to swap pool metadata LVs.
+ Add lvconvert --startpoll, new specific way to start polling conversions.
+ Add lvconvert --mergethin, new specific way to merge thin snapshots.
+ Add lvconvert --mergemirrors, new specific way to merge split mirrors.
+ Add lvconvert --mergesnapshot, new specific way to combine cow LVs.
Split up lvconvert code based on command definitions.
Split up lvchange code based on command definitions.
Generate help output and man pages from command definitions.
- Add command definitions and match every command to one.
+ Verify all command line items against command definition.
+ Match every command run to one command definition.
+ Specify every allowed command definition/syntax in command-lines.in.
Add extra memory page when limiting pthread stack size in clvmd.
Support striped/raid0* <-> raid10_near conversions
Support shrinking of RaidLvs
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c816e8b6365f777a…
Commit: c816e8b6365f777a2e555824ae2425f85869c5c5
Parent: 717363bb9427c02addeb22ef77396132cb30c782
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Feb 13 15:22:26 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 13 15:22:26 2017 -0600
WHATS_NEW: items from command definitions patch set
---
WHATS_NEW | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index b497c7e..3fbef6f 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,14 @@
Version 2.02.169 -
=====================================
+ Add lvconvert --swapmetadata for previous non-specific command.
+ Add lvconvert --startpoll for previous non-specific command.
+ Add lvconvert --mergethin for specific --merge case.
+ Add lvconvert --mergemirrors for specific --merge case.
+ Add lvconvert --mergesnapshot for specific --merge case.
+ Split up lvconvert code based on command definitions.
+ Split up lvchange code based on command definitions.
+ Generate help output and man pages from command definitions.
+ Add command definitions and match every command to one.
Add extra memory page when limiting pthread stack size in clvmd.
Support striped/raid0* <-> raid10_near conversions
Support shrinking of RaidLvs
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=698abdde165a3e74…
Commit: 698abdde165a3e747b81f18cf3405f2d4abb5bae
Parent: 13a6368522894e9d32544d8fb3d6360bbe9018d1
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Feb 10 16:20:19 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 13 10:31:23 2017 -0600
generate man pages
---
configure.in | 2 +
doc/license.txt | 14 +
man/Makefile.in | 39 +-
man/clvmd.8.in | 26 +
man/lvchange.8.des | 2 +
man/lvchange.8.end | 6 +
man/lvchange.8.in | 491 -------------------
man/lvconvert.8.des | 32 ++
man/lvconvert.8.end | 95 ++++
man/lvconvert.8.in | 1199 ----------------------------------------------
man/lvcreate.8.des | 28 ++
man/lvcreate.8.end | 98 ++++
man/lvcreate.8.in | 914 -----------------------------------
man/lvdisplay.8.des | 5 +
man/lvdisplay.8.in | 134 -----
man/lvextend.8.des | 5 +
man/lvextend.8.end | 16 +
man/lvextend.8.in | 134 -----
man/lvm-config.8.des | 5 +
man/lvm-config.8.in | 1 -
man/lvm-dumpconfig.8.des | 5 +
man/lvm-dumpconfig.8.in | 1 -
man/lvm-fullreport.8.des | 6 +
man/lvm-fullreport.8.in | 145 ------
man/lvm-lvpoll.8.des | 4 +
man/lvm-lvpoll.8.end | 33 ++
man/lvm-lvpoll.8.in | 89 ----
man/lvmchange.8.in | 10 -
man/lvmconfig.8.des | 3 +
man/lvmconfig.8.in | 225 ---------
man/lvmdiskscan.8.des | 7 +
man/lvmdiskscan.8.in | 27 -
man/lvmlockd.8.in | 42 +-
man/lvmsadc.8.des | 3 +
man/lvmsadc.8.in | 16 -
man/lvmsar.8.des | 3 +
man/lvmsar.8.in | 16 -
man/lvreduce.8.des | 14 +
man/lvreduce.8.end | 5 +
man/lvreduce.8.in | 110 -----
man/lvremove.8.des | 22 +
man/lvremove.8.end | 11 +
man/lvremove.8.in | 80 ---
man/lvrename.8.des | 2 +
man/lvrename.8.end | 10 +
man/lvrename.8.in | 51 --
man/lvresize.8.des | 2 +
man/lvresize.8.end | 6 +
man/lvresize.8.in | 124 -----
man/lvs.8.des | 1 +
man/lvs.8.end | 75 +++
man/lvs.8.in | 290 -----------
man/lvscan.8.des | 5 +
man/lvscan.8.in | 52 --
man/pvchange.8.des | 1 +
man/pvchange.8.end | 6 +
man/pvchange.8.in | 59 ---
man/pvck.8.des | 1 +
man/pvck.8.end | 8 +
man/pvck.8.in | 37 --
man/pvcreate.8.des | 18 +
man/pvcreate.8.end | 13 +
man/pvcreate.8.in | 210 --------
man/pvdisplay.8.des | 5 +
man/pvdisplay.8.in | 109 -----
man/pvmove.8.des | 61 +++
man/pvmove.8.end | 46 ++
man/pvmove.8.in | 187 -------
man/pvremove.8.des | 2 +
man/pvremove.8.in | 37 --
man/pvresize.8.des | 2 +
man/pvresize.8.end | 16 +
man/pvresize.8.in | 56 ---
man/pvs.8.des | 1 +
man/pvs.8.end | 11 +
man/pvs.8.in | 153 ------
man/pvscan.8.des | 105 ++++
man/pvscan.8.in | 178 -------
man/see_also.end | 67 +++
man/vgcfgbackup.8.des | 16 +
man/vgcfgbackup.8.in | 36 --
man/vgcfgrestore.8.des | 8 +
man/vgcfgrestore.8.end | 9 +
man/vgcfgrestore.8.in | 58 ---
man/vgchange.8.des | 2 +
man/vgchange.8.end | 16 +
man/vgchange.8.in | 346 -------------
man/vgck.8.des | 1 +
man/vgck.8.in | 22 -
man/vgconvert.8.des | 7 +
man/vgconvert.8.in | 48 --
man/vgcreate.8.des | 4 +
man/vgcreate.8.end | 6 +
man/vgcreate.8.in | 187 -------
man/vgdisplay.8.des | 4 +
man/vgdisplay.8.in | 123 -----
man/vgexport.8.des | 8 +
man/vgexport.8.in | 37 --
man/vgextend.8.des | 11 +
man/vgextend.8.end | 6 +
man/vgextend.8.in | 71 ---
man/vgimport.8.des | 5 +
man/vgimport.8.in | 38 --
man/vgimportclone.8.des | 6 +
man/vgimportclone.8.end | 9 +
man/vgimportclone.8.in | 46 --
man/vgmerge.8.des | 3 +
man/vgmerge.8.end | 7 +
man/vgmerge.8.in | 41 --
man/vgmknodes.8.des | 5 +
man/vgmknodes.8.in | 30 --
man/vgreduce.8.des | 1 +
man/vgreduce.8.in | 49 --
man/vgremove.8.des | 6 +
man/vgremove.8.in | 46 --
man/vgrename.8.des | 9 +
man/vgrename.8.end | 10 +
man/vgrename.8.in | 58 ---
man/vgs.8.des | 1 +
man/vgs.8.end | 17 +
man/vgs.8.in | 161 -------
man/vgscan.8.des | 1 +
man/vgscan.8.in | 43 --
man/vgsplit.8.des | 13 +
man/vgsplit.8.in | 80 ---
tools/Makefile.in | 1 -
126 files changed, 1159 insertions(+), 6683 deletions(-)
diff --git a/configure.in b/configure.in
index 8ec65c8..55bc0be 100644
--- a/configure.in
+++ b/configure.in
@@ -86,6 +86,8 @@ AC_PROG_RANLIB
AC_PATH_TOOL(CFLOW_CMD, cflow)
AC_PATH_TOOL(CSCOPE_CMD, cscope)
AC_PATH_TOOL(CHMOD, chmod)
+AC_PATH_TOOL(WC, wc)
+AC_PATH_TOOL(SORT, sort)
################################################################################
dnl -- Check for header files.
diff --git a/doc/license.txt b/doc/license.txt
new file mode 100644
index 0000000..5ba3e66
--- /dev/null
+++ b/doc/license.txt
@@ -0,0 +1,14 @@
+/*
+ * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
+ * Copyright (C) 2004-2017 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of LVM2.
+ *
+ * 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 Lesser General Public License v.2.1.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
diff --git a/man/Makefile.in b/man/Makefile.in
index 471cac3..ca2249c 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -31,18 +31,20 @@ LVMRAIDMAN = lvmraid.7
MAN5=lvm.conf.5
MAN7=lvmsystemid.7 lvmreport.7
-MAN8=lvm-config.8 lvm-dumpconfig.8 lvm-fullreport.8 lvm-lvpoll.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 \
+MAN8=lvm.8 lvmconf.8 lvmdump.8
+MAN8DM=dmsetup.8 dmstats.8
+MAN8CLUSTER=
+MAN8SYSTEMD_GENERATORS=lvm2-activation-generator.8
+
+MAN8GEN=lvm-config.8 lvm-dumpconfig.8 lvm-fullreport.8 lvm-lvpoll.8 \
+ lvcreate.8 lvchange.8 lvmconfig.8 lvconvert.8 lvdisplay.8 lvextend.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 \
vgck.8 vgcreate.8 vgconvert.8 vgdisplay.8 vgexport.8 vgextend.8 \
vgimport.8 vgimportclone.8 vgmerge.8 vgmknodes.8 vgreduce.8 vgremove.8 \
- vgrename.8 vgs.8 vgscan.8 vgsplit.8
-MAN8DM=dmsetup.8 dmstats.8
-MAN8CLUSTER=
-MAN8SYSTEMD_GENERATORS=lvm2-activation-generator.8
+ vgrename.8 vgs.8 vgscan.8 vgsplit.8 \
+ lvmsar.8 lvmsadc.8 lvmdiskscan.8 lvmchange.8
ifeq ($(MAKECMDGOALS),all_man)
MAN_ALL="yes"
@@ -113,8 +115,8 @@ MAN8DIR=$(mandir)/man8
include $(top_builddir)/make.tmpl
-CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8CLUSTER) \
- $(MAN8SYSTEMD_GENERATORS) $(MAN8DM)
+CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8GEN) $(MAN8CLUSTER) \
+ $(MAN8SYSTEMD_GENERATORS) $(MAN8DM) *.gen man-generator
DISTCLEAN_TARGETS+=$(FSADMMAN) $(BLKDEACTIVATEMAN) $(DMEVENTDMAN) \
$(LVMETADMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(CLVMDMAN) $(CMIRRORDMAN) \
$(LVMCACHEMAN) $(LVMTHINMAN) $(LVMDBUSDMAN) $(LVMRAIDMAN)
@@ -125,11 +127,11 @@ all: man device-mapper
device-mapper: $(MAN8DM)
-man: $(MAN5) $(MAN7) $(MAN8) $(MAN8CLUSTER) $(MAN8SYSTEMD_GENERATORS)
+man: $(MAN5) $(MAN7) $(MAN8) $(MAN8GEN) $(MAN8CLUSTER) $(MAN8SYSTEMD_GENERATORS)
all_man: man
-$(MAN5) $(MAN7) $(MAN8) $(MAN8DM) $(MAN8CLUSTER): Makefile
+$(MAN5) $(MAN7) $(MAN8) $(MAN8GEN) $(MAN8DM) $(MAN8CLUSTER): Makefile
Makefile: Makefile.in
@:
@@ -140,6 +142,18 @@ Makefile: Makefile.in
*) echo "Creating $@" ; $(SED) -e "s+#VERSION#+$(LVM_VERSION)+;s+#DEFAULT_SYS_DIR#+$(DEFAULT_SYS_DIR)+;s+#DEFAULT_ARCHIVE_DIR#+$(DEFAULT_ARCHIVE_DIR)+;s+#DEFAULT_BACKUP_DIR#+$(DEFAULT_BACKUP_DIR)+;s+#DEFAULT_PROFILE_DIR#+$(DEFAULT_PROFILE_DIR)+;s+#DEFAULT_CACHE_DIR#+$(DEFAULT_CACHE_DIR)+;s+#DEFAULT_LOCK_DIR#+$(DEFAULT_LOCK_DIR)+;s+#CLVMD_PATH#+@CLVMD_PATH@+;s+#LVM_PATH#+@LVM_PATH@+;s+#DEFAULT_RUN_DIR#+@DEFAULT_RUN_DIR@+;s+#DEFAULT_PID_DIR#+@DEFAULT_PID_DIR@+;s+#SYSTEMD_GENERATOR_DIR#+$(SYSTEMD_GENERATOR_DIR)+;s+#DEFAULT_MANGLING#+$(DEFAULT_MANGLING)+;" $< > $@ ;; \
esac
+man-generator:
+ $(CC) -DMAN_PAGE_GENERATOR -I$(top_builddir)/tools $(CFLAGS) $(top_srcdir)/tools/command.c -o $@
+ - ./man-generator lvmconfig > test.gen
+ if [ ! -s test.gen ] ; then cp genfiles/*.gen $(top_builddir)/man; fi;
+
+$(MAN8GEN): man-generator
+ echo "Generating $@" ;
+ if [ ! -e $@.gen ]; then ./man-generator $(basename $@) $(top_srcdir)/man/$@.des > $@.gen; fi
+ if [ -f $(top_srcdir)/man/$@.end ]; then cat $(top_srcdir)/man/$@.end >> $@.gen; fi;
+ cat $(top_srcdir)/man/see_also.end >> $@.gen
+ $(SED) -e "s+#VERSION#+$(LVM_VERSION)+;s+#DEFAULT_SYS_DIR#+$(DEFAULT_SYS_DIR)+;s+#DEFAULT_ARCHIVE_DIR#+$(DEFAULT_ARCHIVE_DIR)+;s+#DEFAULT_BACKUP_DIR#+$(DEFAULT_BACKUP_DIR)+;s+#DEFAULT_PROFILE_DIR#+$(DEFAULT_PROFILE_DIR)+;s+#DEFAULT_CACHE_DIR#+$(DEFAULT_CACHE_DIR)+;s+#DEFAULT_LOCK_DIR#+$(DEFAULT_LOCK_DIR)+;s+#CLVMD_PATH#+@CLVMD_PATH@+;s+#LVM_PATH#+@LVM_PATH@+;s+#DEFAULT_RUN_DIR#+@DEFAULT_RUN_DIR@+;s+#DEFAULT_PID_DIR#+@DEFAULT_PID_DIR@+;s+#SYSTEMD_GENERATOR_DIR#+$(SYSTEMD_GENERATOR_DIR)+;s+#DEFAULT_MANGLING#+$(DEFAULT_MANGLING)+;" $@.gen > $@
+
install_man5: $(MAN5)
$(INSTALL) -d $(MAN5DIR)
$(INSTALL_DATA) $(MAN5) $(MAN5DIR)/
@@ -148,9 +162,10 @@ install_man7: $(MAN7)
$(INSTALL) -d $(MAN7DIR)
$(INSTALL_DATA) $(MAN7) $(MAN7DIR)/
-install_man8: $(MAN8)
+install_man8: $(MAN8) $(MAN8GEN)
$(INSTALL) -d $(MAN8DIR)
$(INSTALL_DATA) $(MAN8) $(MAN8DIR)/
+ $(INSTALL_DATA) $(MAN8GEN) $(MAN8DIR)/
install_lvm2: install_man5 install_man7 install_man8
diff --git a/man/clvmd.8.in b/man/clvmd.8.in
index 9b9310d..21f8c7d 100644
--- a/man/clvmd.8.in
+++ b/man/clvmd.8.in
@@ -154,6 +154,32 @@ This timeout will be ignored if you start \fBclvmd\fP with the \fB\-d\fP.
.br
Display the version of the cluster LVM daemon.
.
+.SH NOTES
+.
+.SS Activation
+.
+In a clustered VG, clvmd is used for activation, and the following values are
+possible with \fBlvchange/vgchange -a\fP:
+.IP \fBy\fP|\fBsy\fP
+clvmd activates the LV in shared mode (with a shared lock),
+allowing multiple nodes to activate the LV concurrently.
+If the LV type prohibits shared access, such as an LV with a snapshot,
+an exclusive lock is automatically used instead.
+clvmd attempts to activate the LV concurrently on all nodes.
+.IP \fBey\fP
+clvmd activates the LV in exclusive mode (with an exclusive lock),
+allowing a single node to activate the LV.
+clvmd attempts to activate the LV concurrently on all nodes, but only
+one will succeed.
+.IP \fBly\fP
+clvmd attempts to activate the LV only on the local node.
+If the LV type allows concurrent access, then shared mode is used,
+otherwise exclusive.
+.IP \fBn\fP
+clvmd deactivates the LV on all nodes.
+.IP \fBln\fP
+clvmd deactivates the LV on the local node.
+.
.SH ENVIRONMENT VARIABLES
.TP
.B LVM_CLVMD_BINARY
diff --git a/man/lvchange.8.des b/man/lvchange.8.des
new file mode 100644
index 0000000..7aa8ce7
--- /dev/null
+++ b/man/lvchange.8.des
@@ -0,0 +1,2 @@
+lvchange changes LV attributes in the VG, changes LV activation in the
+kernel, and includes other utilities for LV maintenance.
diff --git a/man/lvchange.8.end b/man/lvchange.8.end
new file mode 100644
index 0000000..7134e46
--- /dev/null
+++ b/man/lvchange.8.end
@@ -0,0 +1,6 @@
+.SH EXAMPLES
+
+Change LV permission to read-only:
+.sp
+.B lvchange \-pr vg00/lvol1
+
diff --git a/man/lvchange.8.in b/man/lvchange.8.in
deleted file mode 100644
index 8da9f2d..0000000
--- a/man/lvchange.8.in
+++ /dev/null
@@ -1,491 +0,0 @@
-.TH LVCHANGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-
-.de UNITS
-..
-
-.
-.SH NAME
-.
-lvchange \(em change attributes of a logical volume
-.
-.SH SYNOPSIS
-.
-.ad l
-.B lvchange
-.RB [ \-a | \-\-activate
-.RB [ a ][ e | s | l ]{ y | n }]
-.RB [ \-\-activationmode
-.RB { complete | degraded | partial }]
-.RB [ \-\-addtag
-.IR Tag ]
-.RB [ \-K | \-\-ignoreactivationskip ]
-.RB [ \-k | \-\-setactivationskip
-.RB { y | n }]
-.RB [ \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-A | \-\-autobackup
-.RB { y | n }]
-.RB [ \-\-rebuild
-.IR PhysicalVolume ]
-.RB [ \-\-cachemode
-.RB { passthrough | writeback | writethrough }]
-.RB [ \-\-cachepolicy
-.IR Policy ]
-.RB [ \-\-cachesettings
-.IR Key \fB= Value ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-C | \-\-contiguous
-.RB { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-\-deltag
-.IR Tag ]
-.RB [ \-\-detachprofile ]
-.RB [ \-\-discards
-.RB { ignore | nopassdown | passdown }]
-.RB [ \-\-errorwhenfull
-.RB { y | n }]
-.RB [ \-h | \-? | \-\-help ]
-.RB \%[ \-\-ignorelockingfailure ]
-.RB \%[ \-\-ignoremonitoring ]
-.RB \%[ \-\-ignoreskippedcluster ]
-.RB \%[ \-\-metadataprofile
-.IR ProfileName ]
-.RB [ \-\-monitor
-.RB { y | n }]
-.RB [ \-\-noudevsync ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-p | \-\-permission
-.RB { r | rw }]
-.RB [ \-M | \-\-persistent
-.RB { y | n }
-.RB [ \-\-major
-.IR Major ]
-.RB [ \-\-minor
-.IR Minor ]]
-.RB [ \-\-poll
-.RB { y | n }]
-.RB [ \-\- [ raid ] maxrecoveryrate
-.IR Rate ]
-.RB [ \-\- [ raid ] minrecoveryrate
-.IR Rate ]
-.RB [ \-\- [ raid ] syncaction
-.RB { check | repair }]
-.RB [ \-\- [ raid ] writebehind
-.IR IOCount ]
-.RB [ \-\- [ raid ] writemostly
-.BR \fIPhysicalVolume [ : { y | n | t }]]
-.RB [ \-r | \-\-readahead
-.RB { \fIReadAheadSectors | auto | none }]
-.RB [ \-\-refresh ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-resync ]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB [ \-\-sysinit ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-Z | \-\-zero
-.RB { y | n }]
-.RI [ LogicalVolumePath ...]
-.ad b
-.
-.SH DESCRIPTION
-.
-lvchange allows you to change the attributes of a logical volume
-including making them known to the kernel ready for use.
-.
-.SH OPTIONS
-.
-See \fBlvm\fP(8) for common options.
-.
-.HP
-.BR \-a | \-\-activate
-.RB [ a ][ e | s | l ]{ y | n }
-.br
-Controls the availability of the logical volumes for use.
-Communicates with the kernel device-mapper driver via
-libdevmapper to activate (\fB\-ay\fP) or deactivate (\fB\-an\fP) the
-logical volumes.
-.br
-Activation of a logical volume creates a symbolic link
-\fI/dev/VolumeGroupName/LogicalVolumeName\fP pointing to the device node.
-This link is removed on deactivation.
-All software and scripts should access the device through
-this symbolic link and present this as the name of the device.
-The location and name of the underlying device node may depend on
-the distribution and configuration (e.g. udev) and might change
-from release to release.
-.br
-If autoactivation option is used (\fB\-aay\fP),
-the logical volume is activated only if it matches an item in
-the \fBactivation/auto_activation_volume_list\fP
-set in \fBlvm.conf\fP(5).
-If this list is not set, then all volumes are considered for
-activation. The \fB\-aay\fP option should be also used during system
-boot so it's possible to select which volumes to activate using
-the \fBactivation/auto_activation_volume_list\fP setting.
-.br
-In a clustered VG, clvmd is used for activation, and the
-following options are possible:
-
-With \fB\-aey\fP, clvmd activates the LV in exclusive mode
-(with an exclusive lock), allowing a single node to activate the LV.
-
-With \fB\-asy\fP, clvmd activates the LV in shared mode
-(with a shared lock), allowing multiple nodes to activate the LV concurrently.
-If the LV type prohibits shared access, such as an LV with a snapshot,
-the '\fBs\fP' option is ignored and an exclusive lock is used.
-
-With \fB\-ay\fP (no mode specified), clvmd activates the LV in shared mode
-if the LV type allows concurrent access, such as a linear LV.
-Otherwise, clvmd activates the LV in exclusive mode.
-
-With \fB\-aey\fP, \fB\-asy\fP, and \fB\-ay\fP, clvmd attempts to activate the LV
-on all nodes. If exclusive mode is used, then only one of the
-nodes will be successful.
-
-With \fB\-an\fP, clvmd attempts to deactivate the LV on all nodes.
-
-With \fB\-aly\fP, clvmd activates the LV only on the local node, and \fB\-aln\fP
-deactivates only on the local node. If the LV type allows concurrent
-access, then shared mode is used, otherwise exclusive.
-
-LVs with snapshots are always activated exclusively because they can only
-be used on one node at once.
-
-For local VGs \fB\-ay\fP, \fB\-aey\fP, and \fB\-asy\fP are all equivalent.
-.
-.HP
-.BR \-\-activationmode
-.RB { complete | degraded | partial }
-.br
-The activation mode determines whether logical volumes are allowed to
-activate when there are physical volumes missing (e.g. due to a device
-failure). \fBcomplete\fP is the most restrictive; allowing only those
-logical volumes to be activated that are not affected by the missing
-PVs. \fBdegraded\fP allows RAID logical volumes to be activated even if
-they have PVs missing. (Note that the "\fImirror\fP" segment type is not
-considered a RAID logical volume. The "\fIraid1\fP" segment type should
-be used instead.) Finally, \fBpartial\fP allows any logical volume to
-be activated even if portions are missing due to a missing or failed
-PV. This last option should only be used when performing recovery or
-repair operations. \fBdegraded\fP is the default mode. To change it,
-modify \fBactivation_mode\fP in \fBlvm.conf\fP(5).
-.
-.HP
-.BR \-K | \-\-ignoreactivationskip
-.br
-Ignore the flag to skip Logical Volumes during activation.
-.
-.HP
-.BR \-k | \-\-setactivationskip
-.RB { y | n }
-.br
-Controls whether Logical Volumes are persistently flagged to be
-skipped during activation. By default, thin snapshot volumes are
-flagged for activation skip. To activate such volumes,
-an extra \fB\-\-ignoreactivationskip\fP option must be used.
-The flag is not applied during deactivation. To see whether
-the flag is attached, use \fBlvs\fP(8) command where the state
-of the flag is reported within \fBlv_attr\fP bits.
-.
-.HP
-.BR \-\-cachemode
-.RB { passthrough | writeback | writethrough }
-.br
-Specifying a cache mode determines when the writes to a cache LV
-are considered complete. When \fBwriteback\fP is specified, a write is
-considered complete as soon as it is stored in the cache pool LV.
-If \fBwritethough\fP is specified, a write is considered complete only
-when it has been stored in the cache pool LV and on the origin LV.
-While \fBwritethrough\fP may be slower for writes, it is more
-resilient if something should happen to a device associated with the
-cache pool LV. With \fBpassthrough\fP mode, all reads are served
-from origin LV (all reads miss the cache) and all writes are
-forwarded to the origin LV; additionally, write hits cause cache
-block invalidates. See \fBlvmcache(7)\fP for more details.
-.
-.HP
-.BR \-\-cachepolicy
-.IR Policy ,
-.BR \-\-cachesettings
-.IR Key \fB= Value
-.br
-Only applicable to cached LVs; see also \fBlvmcache(7)\fP. Sets
-the cache policy and its associated tunable settings. In most use-cases,
-default values should be adequate.
-.
-.HP
-.BR \-C | \-\-contiguous
-.RB { y | n }
-.br
-Tries to set or reset the contiguous allocation policy for
-logical volumes. It's only possible to change a non-contiguous
-logical volume's allocation policy to contiguous, if all of the
-allocated physical extents are already contiguous.
-.
-.HP
-.BR \-\-detachprofile
-.br
-Detach any metadata configuration profiles attached to given
-Logical Volumes. See \fBlvm.conf\fP(5) for more information
-about metadata profiles.
-.
-.HP
-.BR \-\-discards
-.RB { ignore | nopassdown | passdown }
-.br
-Set this to \fBignore\fP to ignore any discards received by a
-thin pool Logical Volume. Set to \fBnopassdown\fP to process such
-discards within the thin pool itself and allow the no-longer-needed
-extents to be overwritten by new data. Set to \fBpassdown\fP (the
-default) to process them both within the thin pool itself and to
-pass them down the underlying device.
-.
-.HP
-.BR \-\-errorwhenfull
-.RB { y | n }
-.br
-Sets thin pool behavior when data space is exhaused. See
-.BR lvcreate (8)
-for information.
-.
-.HP
-.BR \-\-ignoremonitoring
-.br
-Make no attempt to interact with dmeventd unless \fB\-\-monitor\fP
-is specified.
-Do not use this if dmeventd is already monitoring a device.
-.
-.HP
-.BR \-\-major
-.IR Major
-.br
-Sets the major number. This option is supported only on older systems
-(kernel version 2.4) and is ignored on modern Linux systems where major
-numbers are dynamically assigned.
-.
-.HP
-.BR \-\-minor
-.IR Minor
-.br
-Set the minor number.
-.
-.HP
-.BR \-\-metadataprofile
-.IR ProfileName
-.br
-Uses and attaches \fIProfileName\fP configuration profile to the logical
-volume metadata. Whenever the logical volume is processed next time,
-the profile is automatically applied. If the volume group has another
-profile attached, the logical volume profile is preferred.
-See \fBlvm.conf\fP(5) for more information about metadata profiles.
-.
-.HP
-.BR \-\-monitor
-.RB { y | n }
-.br
-Start or stop monitoring a mirrored or snapshot logical volume with
-dmeventd, if it is installed.
-If a device used by a monitored mirror reports an I/O error,
-the failure is handled according to
-\%\fBmirror_image_fault_policy\fP and \fBmirror_log_fault_policy\fP
-set in \fBlvm.conf\fP(5).
-.
-.HP
-.BR \-\-noudevsync
-.br
-Disable udev synchronisation. The
-process will not wait for notification from udev.
-It 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.
-.
-.HP
-.BR \-p | \-\-permission
-.RB { r | rw }
-.br
-Change access permission to read-only or read/write.
-.
-.HP
-.BR \-M | \-\-persistent
-.RB { y | n }
-.br
-Set to \fBy\fP to make the minor number specified persistent.
-Change of persistent numbers is not supported for pool volumes.
-.
-.HP
-.BR \-\-poll
-.RB { y | n }
-.br
-Without polling a logical volume's backgrounded transformation process
-will never complete. If there is an incomplete pvmove or lvconvert (for
-example, on rebooting after a crash), use \fB\-\-poll y\fP to restart the
-process from its last checkpoint. However, it may not be appropriate to
-immediately poll a logical volume when it is activated, use
-\fB\-\-poll n\fP to defer and then \fB\-\-poll y\fP to restart the process.
-.
-.HP
-.BR \-\- [ raid ] rebuild
-.BR \fIPhysicalVolume
-.br
-Option can be repeated multiple times.
-Selects PhysicalVolume(s) to be rebuild in a RaidLV.
-Use this option instead of
-.BR \-\-resync
-or
-.BR \-\- [ raid ] syncaction
-\fBrepair\fP in case the PVs with corrupted data are known and their data
-should be reconstructed rather than reconstructing default (rotating) data.
-.br
-E.g. in a raid1 mirror, the master leg on /dev/sda may hold corrupt data due
-to a known transient disk error, thus
-.br
-\fBlvchange --rebuild /dev/sda LV\fP
-.br
-will request the master leg to be rebuild rather than rebuilding
-all other legs from the master.
-On a raid5 with rotating data and parity
-.br
-\fBlvchange --rebuild /dev/sda LV\fP
-.br
-will rebuild all data and parity blocks in the stripe on /dev/sda.
-.HP
-.BR \-\- [ raid ] maxrecoveryrate
-.BR \fIRate [ b | B | s | S | k | K | m | M | g | G ]
-.br
-Sets the maximum recovery rate for a RAID logical volume. \fIRate\fP
-is specified as an amount per second for each device in the array.
-If no suffix is given, then KiB/sec/device is assumed. Setting the
-recovery rate to \fB0\fP means it will be unbounded.
-.
-.HP
-.BR \-\- [ raid ] minrecoveryrate
-.BR \fIRate [ b | B | s | S | k | K | m | M | g | G ]
-.br
-Sets the minimum recovery rate for a RAID logical volume. \fIRate\fP
-is specified as an amount per second for each device in the array.
-If no suffix is given, then KiB/sec/device is assumed. Setting the
-recovery rate to \fB0\fP means it will be unbounded.
-.
-.HP
-.BR \-\- [ raid ] syncaction
-.RB { check | repair }
-.br
-This argument is used to initiate various RAID synchronization operations.
-The \fBcheck\fP and \fBrepair\fP options provide a way to check the
-integrity of a RAID logical volume (often referred to as "scrubbing").
-These options cause the RAID logical volume to
-read all of the data and parity blocks in the array and check for any
-discrepancies (e.g. mismatches between mirrors or incorrect parity values).
-If \fBcheck\fP is used, the discrepancies will be counted but not repaired.
-If \fBrepair\fP is used, the discrepancies will be corrected as they are
-encountered. The \fBlvs\fP(8) command can be used to show the number of
-discrepancies found or repaired.
-.
-.HP
-.BR \-\- [ raid ] writebehind
-.IR IOCount
-.br
-Specify the maximum number of outstanding writes that are allowed to
-devices in a RAID1 logical volume that are marked as write-mostly.
-Once this value is exceeded, writes become synchronous (i.e. all writes
-to the constituent devices must complete before the array signals the
-write has completed). Setting the value to zero clears the preference
-and allows the system to choose the value arbitrarily.
-.
-.HP
-.BR \-\- [ raid ] writemostly
-.BR \fIPhysicalVolume [ : { y | n | t }]
-.br
-Mark a device in a RAID1 logical volume as write-mostly. All reads
-to these drives will be avoided unless absolutely necessary. This keeps
-the number of I/Os to the drive to a minimum. The default behavior is to
-set the write-mostly attribute for the specified physical volume in the
-logical volume. It is possible to also remove the write-mostly flag by
-appending a "\fB:n\fP" to the physical volume or to toggle the value by specifying
-"\fB:t\fP". The \fB\-\-writemostly\fP argument can be specified more than one time
-in a single command; making it possible to toggle the write-mostly attributes
-for all the physical volumes in a logical volume at once.
-.
-.HP
-.BR \-r | \-\-readahead
-.RB { \fIReadAheadSectors | auto | none }
-.br
-Set read ahead sector count of this logical volume.
-For volume groups with metadata in lvm1 format, this must
-be a value between 2 and 120 sectors.
-The default value is "\fBauto\fP" which allows the kernel to choose
-a suitable value automatically.
-"\fBnone\fP" is equivalent to specifying zero.
-.
-.HP
-.BR \-\-refresh
-.br
-If the logical volume is active, reload its metadata.
-This is not necessary in normal operation, but may be useful
-if something has gone wrong or if you're doing clustering
-manually without a clustered lock manager.
-.
-.HP
-.BR \-\-resync
-.br
-Forces the complete resynchronization of a mirror. In normal
-circumstances you should not need this option because synchronization
-happens automatically. Data is read from the primary mirror device
-and copied to the others, so this can take a considerable amount of
-time - and during this time you are without a complete redundant copy
-of your data.
-.
-.HP
-.BR \-\-sysinit
-.br
-Indicates that \fBlvchange\fP(8) is being invoked from early system
-initialisation scripts (e.g. rc.sysinit or an initrd),
-before writeable filesystems are available. As such,
-some functionality needs to be disabled and this option
-acts as a shortcut which selects an appropriate set of options. Currently
-this is equivalent to using \fB\-\-ignorelockingfailure\fP,
-\fB\-\-ignoremonitoring\fP, \fB\-\-poll n\fP and setting
-\fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
-environment variable.
-
-If \fB\-\-sysinit\fP is used in conjunction with
-\fBlvmetad\fP(8) enabled and running,
-autoactivation is preferred over manual activation via direct lvchange call.
-Logical volumes are autoactivated according to
-\fBauto_activation_volume_list\fP set in \fBlvm.conf\fP(5).
-.
-.HP
-.BR \-Z | \-\-zero
-.RB { y | n }
-.br
-Set zeroing mode for thin pool. Note: already provisioned blocks from pool
-in non-zero mode are not cleared in unwritten parts when setting zero to
-\fBy\fP.
-.
-.SH ENVIRONMENT VARIABLES
-.
-.TP
-.B LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES
-Suppress locking failure messages.
-.
-.SH Examples
-.
-Changes the permission on volume lvol1 in volume group vg00 to be read-only:
-.sp
-.B lvchange \-pr vg00/lvol1
-.
-.SH SEE ALSO
-.
-.nh
-.BR lvm (8),
-.BR lvmetad (8),
-.BR lvs (8),
-.BR lvcreate (8),
-.BR vgchange (8),
-.BR lvmcache (7),
-.BR lvmthin (7),
-.BR lvm.conf (5)
diff --git a/man/lvconvert.8.des b/man/lvconvert.8.des
new file mode 100644
index 0000000..2aa95a1
--- /dev/null
+++ b/man/lvconvert.8.des
@@ -0,0 +1,32 @@
+lvconvert changes the LV type and includes utilities for LV data
+maintenance. The LV type controls data layout and redundancy.
+The LV type is also called the segment type or segtype.
+
+To display the current LV type, run the command:
+
+.B lvs \-o name,segtype
+.I LV
+
+The
+.B linear
+type is equivalent to the
+.B striped
+type when one stripe exists.
+In that case, the types can sometimes be used interchangably.
+
+In most cases, the
+.B mirror
+type is deprecated and the
+.B raid1
+type should be used. They are both implementations of mirroring.
+
+In some cases, an LV is a single device mapper (dm) layer above physical
+devices. In other cases, hidden LVs (dm devices) are layered between the
+visible LV and physical devices. LVs in the middle layers are called sub LVs.
+A command run on a visible LV sometimes operates on a sub LV rather than
+the specified LV. In other cases, a sub LV must be specified directly on
+the command line.
+
+Sub LVs can be displayed with the command
+.B lvs -a
+
diff --git a/man/lvconvert.8.end b/man/lvconvert.8.end
new file mode 100644
index 0000000..fa8cc1d
--- /dev/null
+++ b/man/lvconvert.8.end
@@ -0,0 +1,95 @@
+.SH EXAMPLES
+
+Convert a linear LV to a two-way mirror LV.
+.br
+.B lvconvert \-\-type mirror \-\-mirrors 1 vg/lvol1
+
+Convert a linear LV to a two-way RAID1 LV.
+.br
+.B lvconvert \-\-type raid1 \-\-mirrors 1 vg/lvol1
+
+Convert a mirror LV to use an in\-memory log.
+.br
+.B lvconvert \-\-mirrorlog core vg/lvol1
+
+Convert a mirror LV to use a disk log.
+.br
+.B lvconvert \-\-mirrorlog disk vg/lvol1
+
+Convert a mirror or raid1 LV to a linear LV.
+.br
+.B lvconvert --type linear vg/lvol1
+
+Convert a mirror LV to a raid1 LV with the same number of images.
+.br
+.B lvconvert \-\-type raid1 vg/lvol1
+
+Convert a linear LV to a two-way mirror LV, allocating new extents from specific
+PV ranges.
+.br
+.B lvconvert \-\-mirrors 1 vg/lvol1 /dev/sda:0\-15 /dev/sdb:0\-15
+
+Convert a mirror LV to a linear LV, freeing physical extents from a specific PV.
+.br
+.B lvconvert \-\-type linear vg/lvol1 /dev/sda
+
+Split one image from a mirror or raid1 LV, making it a new LV.
+.br
+.B lvconvert \-\-splitmirrors 1 \-\-name lv_split vg/lvol1
+
+Split one image from a raid1 LV, and track changes made to the raid1 LV
+while the split image remains detached.
+.br
+.B lvconvert \-\-splitmirrors 1 \-\-trackchanges vg/lvol1
+
+Merge an image (that was previously created with \-\-splitmirrors and
+\-\-trackchanges) back into the original raid1 LV.
+.br
+.B lvconvert \-\-mergemirrors vg/lvol1_rimage_1
+
+Replace PV /dev/sdb1 with PV /dev/sdf1 in a raid1/4/5/6/10 LV.
+.br
+.B lvconvert \-\-replace /dev/sdb1 vg/lvol1 /dev/sdf1
+
+Replace 3 PVs /dev/sd[b-d]1 with PVs /dev/sd[f-h]1 in a raid1 LV.
+.br
+.B lvconvert \-\-replace /dev/sdb1 \-\-replace /dev/sdc1 \-\-replace /dev/sdd1
+.RS
+.B vg/lvol1 /dev/sd[fgh]1
+.RE
+
+Replace the maximum of 2 PVs /dev/sd[bc]1 with PVs /dev/sd[gh]1 in a raid6 LV.
+.br
+.B lvconvert \-\-replace /dev/sdb1 \-\-replace /dev/sdc1 vg/lvol1 /dev/sd[gh]1
+
+Convert an LV into a thin LV in the specified thin pool. The existing LV
+is used as an external read\-only origin for the new thin LV.
+.br
+.B lvconvert \-\-type thin \-\-thinpool vg/tpool1 vg/lvol1
+
+Convert an LV into a thin LV in the specified thin pool. The existing LV
+is used as an external read\-only origin for the new thin LV, and is
+renamed "external".
+.br
+.B lvconvert \-\-type thin \-\-thinpool vg/tpool1
+.RS
+.B \-\-originname external vg/lvol1
+.RE
+
+Convert an LV to a cache pool LV using another specified LV for cache pool
+metadata.
+.br
+.B lvconvert \-\-type cache-pool \-\-poolmetadata vg/poolmeta1 vg/lvol1
+
+Convert an LV to a cache LV using the specified cache pool and chunk size.
+.br
+.B lvconvert \-\-type cache \-\-cachepool vg/cpool1 \-c 128 vg/lvol1
+
+Detach and keep the cache pool from a cache LV.
+.br
+.B lvconvert \-\-splitcache vg/lvol1
+
+Detach and remove the cache pool from a cache LV.
+.br
+.B lvconvert \-\-uncache vg/lvol1
+
diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in
deleted file mode 100644
index 0becc8a..0000000
--- a/man/lvconvert.8.in
+++ /dev/null
@@ -1,1199 +0,0 @@
-.TH LVCONVERT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc" \" -*- nroff -*-
-.SH NAME
-lvconvert \(em change LV type and other utilities
-.
-.SH SYNOPSIS
-
-.B lvconvert
-.RI [ OPTION ]...
-.IR VolumeGroup / LogicalVolume
-
-OPTIONS:
-.br
-.BR \-b ,
-.BR \-\-background
-.br
-.BR \-\-cachepolicy
-.IR Policy
-.br
-.BR \-\-cachepool
-.IR CachePoolLogicalVolume { Name | Path }
-.br
-.BR \-\-cachesettings
-.IB Key = Value
-.br
-.BR \-c ,
-.BR \-\-chunksize
-.BR \fIChunkSize [ b | B | s | S | k | K | m | M | g | G ]
-.br
-.BR \-\-corelog
-.br
-.BR \-\-discards
-.RB { ignore | nopassdown | passdown }
-.br
-.BR \-i ,
-.BR \-\-interval
-.IR Seconds
-.br
-.BR \-\-merge
-.br
-.BR \-\-mirrorlog
-.RB { disk | core | mirrored }
-.br
-.BR \-m ,
-.BR \-\-mirrors
-.IR Number
-.br
-.BR \-n ,
-.BR \-\-name
-.IR Name
-.br
-.BR \-\-noudevsync
-.br
-.BR \-\-originname
-.IR NewExternalOriginVolumeName
-.br
-.BR \-\-poolmetadata
-.IR PoolMetadataLogicalVolume { Name | Path }
-.br
-.BR \-\-poolmetadatasize
-.BR \fIPoolMetadataSize [ b | B | s | S | k | K | m | M | g | G ]
-.br
-.BR \-\-poolmetadataspare
-.RB { y | n }
-.br
-.BR \-r ,
-.BR \-\-readahead
-.RB { \fIReadAheadSectors | auto | none }
-.br
-.BR \-R ,
-.BR \-\-regionsize
-.IR MirrorLogRegionSize
-.br
-.BR \-\-repair
-.br
-.BR \-\-replace
-.IR PhysicalVolume
-.br
-.BR \-\-splitcache
-.br
-.BR \-\-splitmirrors
-.IR Number
-.br
-.BR \-\-splitsnapshot
-.br
-.BR \-\-stripes
-.IR Number
-.br
-.BR \-I ,
-.BR \-\-stripesize
-.IR StripeSize
-.br
-.B \-\-type striped
-.br
-.B \-\-type snapshot
-|
-.B \-\-snapshot
-|
-.B \-s
-.br
-.B \-\-type mirror
-.br
-.B \-\-type raid*
-.br
-.B \-\-type thin
-|
-.B \-\-thin
-|
-.B \-T
-.br
-.B \-\-type cache
-|
-.B \-\-cache
-|
-.B \-H
-.br
-.B \-\-type thin\-pool
-.br
-.B \-\-type cache\-pool
-.br
-.BR \-\-thinpool
-.IR ThinPoolLogicalVolume { Name | Path }
-.br
-.BR \-\-trackchanges
-.br
-.BR \-\-uncache
-.br
-.BR \-Z ,
-.BR \-\-zero
-.RB { y | n }
-.br
-
-Common options:
-.br
-.BR \-A ,
-.BR \-\-alloc
-.IR AllocationPolicy
-.br
-.BR \-f ,
-.BR \-\-force
-.br
-.BR \-\-commandprofile
-.IR ProfileName
-.br
-.BR \-h ,
-.BR \-? ,
-.BR \-\-help
-.br
-.BR \-v ,
-.BR \-\-verbose
-.br
-.BR \-y ,
-.BR \-\-yes
-.br
-.BR \-\-version
-
-
-
-
-.SH DESCRIPTION
-
-lvconvert changes the LV type and includes various LV utilities.
-
-To display the current LV type, run the command:
-
-.B lvs \-o name,segtype
-.IR VG / LV
-
-To change the LV type, run the command:
-
-.B lvconvert \-\-type
-.I NewType
-.IR VG / LV
-
-.SS LV types
-
-The LV type is also called the "segment type" or "segtype".
-
-LVs with the following types can be modified by lvconvert:
-.B striped,
-.B snapshot,
-.B mirror,
-.B raid*,
-.B thin,
-.B cache,
-.B thin\-pool,
-.B cache\-pool.
-
-The specific operations available on each LV type are listed below.
-
-The
-.B linear
-type is equivalent to the
-.B striped
-type when one stripe exists.
-In that case, the types can sometimes be used interchangably.
-
-In most cases, the
-.B mirror
-type is deprecated and the
-.B raid1
-type should be used. They are both implementations of mirroring.
-
-The
-.B raid*
-type refers to one of many raid levels, e.g.
-.B raid1,
-.B raid5.
-
-.SS LV layers
-
-In some cases, an LV is a single device mapper (dm) layer above physical
-devices. In other cases, hidden LVs (dm devices) are layered between the
-visible LV and physical devices. LVs in the middle layers are sometimes
-called sub LVs.
-
-Changing the LV type will often change the composition of sub LVs.
-
-Sub LVs can be displayed with the command
-.B lvs -a.
-
-A command run on a visible LV sometimes operates on a sub LV rather than
-the specified LV. These cases are noted below.
-
-Sometimes a sub LV must be specified directly on the command line, but
-this is a non-standard form. These cases may change in the future to
-avoid the direct use of hidden LVs.
-
-.SH COMMANDS
-
-.SS Operations on a StripedLV with type striped or linear:
-
-\&
-
-.B lvconvert \-\-merge
-VG/StripedLV
-./" FIXME: use --merge-mirror
-.br
-\[bu]
-Merge StripedLV into an LV when it is a previously split mirror.
-.br
-\[bu]
-Options \-\-background, \-\-interval.
-.br
-\[bu]
-See corresponding operation --splitmirrors.
-
-.B lvconvert \-\-type snapshot
-VG/StripedLV VG/SnapshotLV
-.br
-\[bu]
-Recombine StripedLV with SnapshotLV which was previously split.
-.br
-\[bu]
-Options \-\-chunksize, \-\-zero.
-.br
-\[bu]
-See corresponding operation --splitsnapshot.
-
-.B lvconvert \-\-type thin
-VG/StripedLV
-.br
-\[bu]
-Convert StripedLV to type thin with an external origin.
-.br
-\[bu]
-StripedLV becomes a read\-only external origin LV with a new name.
-.br
-\[bu]
-Requires \-\-thinpool to specify the thin pool to use.
-.br
-\[bu]
-Options \-\-originname.
-
-.B lvconvert \-\-type cache
-VG/StripedLV
-.br
-\[bu]
-Convert StripedLV to type cache.
-.br
-\[bu]
-Requires \-\-cachepool to specify the cache pool to use.
-.br
-\[bu]
-Options \-\-cachepolicy, \-\-cachesettings.
-
-.B lvconvert \-\-type thin\-pool
-VG/StripedLV
-.br
-\[bu]
-Convert StripedLV to type thin\-pool.
-.br
-\[bu]
-The StripedLV is used for thin pool data.
-.br
-\[bu]
-Options \-\-chunksize, \-\-discards, \-\-poolmetadata{size,spare},
-.br
- \-\-readahead, \-\-zero.
-
-.B lvconvert \-\-type cache\-pool
-VG/StripedLV
-.br
-\[bu]
-Convert StripedLV to type cache\-pool.
-.br
-\[bu]
-Options \-\-chunksize, \-\-poolmetadata{size,spare}.
-
-.B lvconvert \-\-type mirror
-VG/StripedLV
-.br
-\[bu]
-Convert StripedLV to type mirror.
-.br
-\[bu]
-Requires \-\-mirrors to specify the number of mirrors to use.
-.br
-\[bu]
-Options \-\-mirrorlog, \-\-regionsize.
-
-.B lvconvert \-\-type raid*
-VG/StripedLV
-.br
-\[bu]
-Convert StripedLV to type raid*.
-.br
-\[bu]
-Required options depend on the raid level.
-
-.SS Operations on RaidLV with type raid*:
-
-\&
-
-.B lvconvert \-\-mirrors
-Number
-VG/RaidLV
-.br
-\[bu]
-Change the number of images in raid1 RaidLV.
-
-.B lvconvert \-\-splitmirrors
-Number
-VG/RaidLV
-.br
-\[bu]
-Split images from raid1 RaidLV and use them to create a new LV.
-.br
-\[bu]
-Requires \-\-name for the new LV, or the use of \-\-trackchanges.
-
-.B lvconvert \-\-merge
-VG/RaidLV
-./" FIXME: use --merge-mirror
-.br
-\[bu]
-Merge RaidLV into an LV when it is a previously split mirror.
-.br
-\[bu]
-Options \-\-background, \-\-interval.
-.br
-\[bu]
-See corresponding operation --splitmirrors.
-
-.B lvconvert \-\-repair
-VG/RaidLV
-.br
-\[bu]
-Options \-\-background, \-\-interval.
-.br
-\[bu]
-Replace failed PVs in RaidLV.
-
-.B lvconvert \-\-replace
-PV
-VG/RaidLV
-.br
-\[bu]
-Replace specific PV(s) in a raid* LV with another PV.
-.br
-\[bu]
-The new PV(s) to use can be optionally specified after the LV.
-.br
-\[bu]
-Repeat to replace multiple: \-\-replace PV1 \-\-replace PV2 ...
-
-.B lvconvert \-\-type snapshot
-VG/RaidLV
-VG/SnapshotLV
-.br
-\[bu]
-Combine RaidLV with SnapshotLV that was previously split.
-.br
-\[bu]
-Options \-\-chunksize, \-\-zero.
-.br
-\[bu]
-See corresponding operation \-\-splitsnapshot.
-
-.B lvconvert \-\-type thin
-VG/RaidLV
-.br
-\[bu]
-Convert RaidLV to type thin with an external origin.
-.br
-\[bu]
-RaidLV becomes a read\-only external origin LV with a new name.
-.br
-\[bu]
-Requires \-\-thinpool to specify the thin pool to use.
-.br
-\[bu]
-Options \-\-originname.
-
-.B lvconvert \-\-type cache
-VG/RaidLV
-.br
-\[bu]
-Convert RaidLV to type cache.
-.br
-\[bu]
-Requires \-\-cachepool to specify the cache pool to use.
-.br
-\[bu]
-Options \-\-cachepolicy, \-\-cachesettings.
-
-.B lvconvert \-\-type thin\-pool
-VG/RaidLV
-.br
-\[bu]
-Convert RaidLV to type thin\-pool.
-.br
-\[bu]
-The RaidLV is used for thin pool data.
-.br
-\[bu]
-Options \-\-chunksize, \-\-discards, \-\-poolmetadata{size,spare},
-.br
- \-\-readahead, \-\-zero.
-
-.B lvconvert \-\-type cache\-pool
-VG/RaidLV
-.br
-\[bu]
-Convert RaidLV to type cache\-pool.
-.br
-\[bu]
-Options \-\-chunksize, \-\-poolmetadata{size,spare}.
-
-.B lvconvert \-\-type raid*
-VG/RaidLV
-.br
-\[bu]
-Convert RaidLV to use a different raid level.
-.br
-\[bu]
-Required options depend on the raid level.
-
-.B lvconvert \-\-type mirror
-VG/RaidLV
-.br
-\[bu]
-Convert RaidLV to type mirror.
-
-.B lvconvert \-\-type striped
-VG/RaidLV
-.br
-\[bu]
-Convert RaidLV to type striped.
-
-.B lvconvert \-\-type linear
-VG/RaidLV
-.br
-\[bu]
-Convert RaidLV to type linear.
-
-.SS Operations on MirrorLV with type mirror:
-
-\&
-
-.B lvconvert \-\-mirrors
-Number
-VG/MirrorLV
-.br
-\[bu]
-Change the number of images in MirrorLV.
-
-.B lvconvert \-\-splitmirrors
-Number
-VG/MirrorLV
-.br
-\[bu]
-Split images from MirrorLV and use them to create a new LV.
-.br
-\[bu]
-Requires \-\-name for the new LV.
-
-.B lvconvert \-\-mirrorlog
-LogType
-VG/MirrorLV
-.br
-\[bu]
-Change the type of log used by MirrorLV.
-
-.B lvconvert \-\-repair
-VG/MirrorLV
-.br
-\[bu]
-Options \-\-background, \-\-interval.
-.br
-\[bu]
-Replace failed PVs in MirrorLV.
-
-.B lvconvert \-\-type linear
-VG/MirrorLV
-.br
-\[bu]
-Convert MirrorLV to type linear.
-
-.B lvconvert \-\-type raid*
-VG/MirrorLV
-.br
-\[bu]
-Convert MirrorLV to type raid*.
-.br
-\[bu]
-Required options depend on the raid level.
-
-.SS Operations on CachePoolLV with type cache\-pool:
-
-\&
-
-.B lvconvert \-\-splitcache
-VG/CachePoolLV
-.br
-\[bu]
-Split the cache LV from CachePoolLV.
-.br
-\[bu]
-Equivalent to --splitcache on CacheLV.
-
-.SS Operations on CacheLV with type cache:
-
-\&
-
-.B lvconvert \-\-splitcache
-VG/CacheLV
-.br
-\[bu]
-Split and keep the cache pool from CacheLV.
-
-.B lvconvert \-\-uncache
-VG/CacheLV
-.br
-\[bu]
-Split and remove the cache pool from CacheLV.
-
-.B lvconvert \-\-splitmirrors
-Number
-VG/CacheLV
-.br
-\[bu]
-Split images from the mirrored origin of CacheLV to create a new LV.
-.br
-\[bu]
-Operates on mirror or raid1 sub LV.
-.br
-\[bu]
-Requires \-\-name for the new LV, or the use of \-\-trackchanges.
-
-.B lvconvert \-\-type thin\-pool
-VG/CacheLV
-.br
-\[bu]
-Convert CacheLV to type thin-pool.
-.br
-\[bu]
-The CacheLV is used for thin pool data.
-.br
-\[bu]
-Options \-\-chunksize, \-\-discards, \-\-poolmetadata{size,spare},
-.br
- \-\-readahead, \-\-zero.
-
-
-.SS Operations on ThinPoolLV with type thin\-pool:
-
-\&
-
-.B lvconvert \-\-splitcache
-VG/ThinPoolLV
-.br
-\[bu]
-Split and keep the cache pool from the data portion of ThinPoolLV.
-.br
-\[bu]
-Operates on the data sub LV of the thin pool LV.
-.br
-\[bu]
-The data sub LV of the thin pool must be a cache LV.
-
-.B lvconvert \-\-uncache
-VG/ThinPoolLV
-.br
-\[bu]
-Split and remove the cache pool from the data portion of ThinPoolLV.
-.br
-\[bu]
-Operates on the data sub LV of the thin pool LV.
-.br
-\[bu]
-The data sub LV of the thin pool must be a cache LV.
-
-.B lvconvert \-\-type cache
-VG/ThinPoolLV
-.br
-\[bu]
-Convert the data portion of ThinPoolLV to type cache.
-.br
-\[bu]
-Requires \-\-cachepool to specify the cache pool to use.
-.br
-\[bu]
-Operates on the data sub LV of the thin pool LV.
-.br
-\[bu]
-Options \-\-cachepolicy, \-\-cachesettings.
-
-.B lvconvert \-\-repair
-VG/ThinPoolLV
-.br
-\[bu]
-Repair ThinPoolLV.
-
-.SS Operations on ThinLV with type thin:
-
-\&
-
-.B lvconvert \-\-merge
-VG/ThinLV
-./" FIXME: use --merge-snapshot
-.br
-\[bu]
-Merge ThinLV into its origin LV.
-.br
-\[bu]
-ThinLV must have been created as a snapshot of another thin LV.
-.br
-\[bu]
-Options \-\-background, \-\-interval.
-
-.SS Operations on SnapshotLV with type snapshot:
-
-\&
-
-.B lvconvert \-\-splitsnapshot
-VG/SnapshotLV
-.br
-\[bu]
-Separate COW snapshot SnapshotLV from its origin LV.
-
-.B lvconvert \-\-merge
-VG/SnapshotLV
-./" FIXME: use --merge-snapshot
-.br
-\[bu]
-Merge COW snapshot SnapshotLV into its origin.
-.br
-\[bu]
-Options \-\-background, \-\-interval.
-
-.SH OPTIONS
-.
-See \fBlvm\fP(8) for common options.
-.br
-.
-.HP
-.BR \-b ,
-.BR \-\-background
-.br
-If the operation requires polling, this option causes the command to
-return before the operation is complete, and polling is done in the
-background.
-.
-.HP
-.BR \-\-cachepolicy
-.IR Policy
-.br
-Specifies the cache policy for a cache LV. Also see
-.BR lvmcache (7).
-.
-.HP
-.BR \-\-cachepool
-.IR CachePoolLogicalVolume { Name | Path }
-.br
-Specifies the cache pool to use when converting an LV to a cache LV. If
-CachePoolLogicalVolume is not yet a cache pool, the command will attempt
-to convert it into a cache pool prior to the cache LV conversion.
-Also see
-.BR lvmcache (7).
-.
-.HP
-.BR \-\-cachesettings
-.IB Key = Value
-.br
-Specifies tunable values for a cache LV. (The default values should
-usually be adequate.) The special string value \fBdefault\fP switches
-settings back to their default kernel values and removes them from the
-list of settings stored in LVM metadata.
-Also see
-.BR lvmcache (7).
-.
-.HP
-.BR \-c ,
-.BR \-\-chunksize
-.BR \fIChunkSize [ b | B | s | S | k | K | m | M | g | G ]
-.br
-Sets the chunk size for a snapshot, cache pool or thin pool.
-The default unit is in kilobytes.
-.sp
-For snapshots, the value must be a power of 2 between 4KiB and 512KiB
-and the default value is 4.
-.sp
-For a cache pool the value must be between 32KiB and 1GiB and
-the default value is 64.
-.sp
-For a thin pool the value must be between 64KiB and
-1GiB and the default value starts with 64 and scales
-up to fit the pool metadata size within 128MiB,
-if the pool metadata size is not specified.
-The value must be a multiple of 64KiB.
-(Early kernel support until thin target version 1.4 required the value
-to be a power of 2. Discards were not supported for non-power of 2 values
-until thin target version 1.5.)
-.
-.HP
-.BR \-\-corelog
-.br
-Specifies or changes the log type for a mirror LV.
-It is an alias for \fB\-\-mirrorlog core\fP.
-(This option does not apply to the \fBraid1\fP LV type.)
-.
-.HP
-.BR \-\-discards
-.RB { ignore | nopassdown | passdown }
-.br
-Specifies if discards will be processed by the thin layer in the
-kernel and passed down to the Physical Volume. This applies only
-to thin pools. The default is \fBpassdown\fP.
-Also see
-.BR lvmthin (7).
-.
-.HP
-.BR \-H ,
-.BR \-\-cache
-.br
-Alias for
-.B \-\-type cache.
-See COMMANDS description for
-.br
-.B lvconvert \-\-type cache.
-.
-.HP
-.BR \-i ,
-.BR \-\-interval
-.IR Seconds
-.br
-Report progress as a percentage at regular intervals.
-.
-.HP
-.BR \-\-merge
-.br
-Merges a snapshot that was split from an origin LV using
-\fB\-\-splitsnapshot\fP, back into the origin LV.
-
-Merges a raid1 image that was split from a raid1 LV using
-\fB\-\-splitsnapshot\fP and \fB\-\-trackchanges\fP, back into
-the original raid1 LV.
-
-To check if the kernel supports the snapshot merge feature, look for
-"snapshot\-merge" in the output of \fBdmsetup targets\fP.
-
-When merging a snapshot, if both the origin and snapshot LVs are not open,
-the merge will start immediately. Otherwise, the merge will start the
-first time either the origin or snapshot LV are activated and both are
-closed. Merging a snapshot into an origin that cannot be closed, for
-example a root filesystem, is deferred until the next time the origin
-volume is activated. When merging starts, the resulting LV will have the
-origin's name, minor number and UUID. While the merge is in progress,
-reads or writes to the origin appear as being directed to the snapshot
-being merged. When the merge finishes, the merged snapshot is removed.
-Multiple snapshots may be specified on the command line or a @tag may be
-used to specify multiple snapshots be merged to their respective origin.
-.
-.HP
-.BR \-\-mirrorlog
-.RB { disk | core | mirrored }
-.br
-Specifies or changes the log type for a mirror LV.
-The default is \fBdisk\fP, which is persistent and requires
-a small amount of storage space, usually on a separate device
-from the data being mirrored.
-\fBCore\fP may be useful for short-lived mirrors. It means the mirror is
-regenerated by copying the data from the first device again every
-time the device is activated - e.g. possibly after every reboot.
-Using \fBmirrored\fP will create a persistent log that is itself mirrored.
-(This option does not apply to the \fBraid1\fP LV type.)
-.
-.HP
-.BR \-m ,
-.BR \-\-mirrors
-.IR Number
-.br
-Specifies the number mirror images in addition to the original LV image,
-e.g. \fB\-\-mirrors 1\fP means two copies of the data, the original and
-one mirror image.
-
-The current maximum is 9 providing 10 raid1 images.
-
-This option is required when converting an LV to a \fBraid1\fP or
-\fBmirror\fP LV.
-
-This option can be used alone to change the number of mirror images in an
-existing \fBraid1\fP or \fBmirror\fP LV.
-
-The special case \fB\-\-mirrors 0\fP has been used historically to
-indicate a linear LV with no mirror images.
-.
-.HP
-.BR \-n ,
-.BR \-\-name
-.IR Name
-.br
-Specifies the name to use when the command is creating a new LV, e.g.
-.B \-\-splitmirrors.
-.
-.HP
-.BR \-\-noudevsync
-.br
-Disables udev synchronisation. The process will not wait for notification
-from udev. It 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 LVM creates.
-.
-.HP
-.BR \-\-originname
-.IR NewExternalOriginVolumeName
-.br
-Specifies the name to use for the external origin LV when converting an LV
-to a thin LV. The LV being converted becomes a read\-only external origin
-with this name.
-.br
-Without this option, the default name of "lvol<n>" will be generated where
-<n> is the LVM internal number of the LV.
-.br
-.
-.\" .HP
-.\" .BR \-\-pooldatasize
-.\" .IR PoolDataVolumeSize [ \fBbBsSkKmMgGtTpPeE ]
-.\" .br
-.\" Sets the size of pool's data logical volume.
-.\" The option \fB\-\-size\fP could be still used with thin pools.
-.
-.HP
-.BR \-\-poolmetadata
-.IR PoolMetadataLogicalVolume { Name | Path }
-.br
-Specifies the LV to use for thin pool metadata when converting an LV to a
-thin pool LV.
-.br
-Specifies the LV to use for cache pool metadata when converting an LV to a
-cache pool LV.
-.br
-The size should be between 2MiB and 16GiB.
-.br
-(This option can also be used when a thin pool or cache pool are created
-as an auxiliary operation within a different command.)
-Also see
-.BR lvmthin (7),
-and
-.BR lvmcache (7).
-.
-.HP
-.BR \-\-poolmetadatasize
-.BR \fIPoolMetadataSize [ b | B | s | S | k | K | m | M | g | G ]
-.br
-Specifies the size of a cache pool metadata LV or a thin pool metadata LV.
-This is used if a command creates a pool metadata LV automatically as part
-of the operation. This option is not used when an existing LV is
-specified as the pool metadata LV, i.e. \fB\-\-poolmetadata\fP.
-The default unit is megabytes.
-Also see
-.BR lvmthin (7),
-and
-.BR lvmcache (7).
-.
-.HP
-.BR \-\-poolmetadataspare
-.RB { y | n }
-.br
-Specifies if a spare pool metadata LV should be created.
-A spare pool metadata LV will be used for pool repair.
-Only one spare pool metadata LV is maintained within a VG, with the size
-of the largest existing pool metadata LV.
-The default is \fBy\fPes.
-.
-.HP
-.BR \-r ,
-.BR \-\-readahead
-.RB { \fIReadAheadSectors | auto | none }
-.br
-Specifies the read ahead sector count of a thin pool metadata LV.
-The default value is \fBauto\fP which allows the kernel to choose
-a suitable value automatically.
-\fBNone\fP is equivalent to specifying zero.
-.
-.HP
-.BR \-R ,
-.BR \-\-regionsize
-.IR MirrorLogRegionSize
-.br
-A mirror LV is divided into regions of this size (in MB), and the mirror
-log uses this granularity to track which regions are in sync.
-(This option does not apply to the \fBraid1\fP LV type.)
-.
-.HP
-.BR \-\-repair
-.br
-Replaces failed PVs in a raid1 or mirror LV with other PVs available in
-the VG. By default, the original number of mirror images will be restored
-if possible. Specify \fB\-y\fP on the command line to skip the prompts.
-Use \fB\-f\fP if you do not want any replacement. You may use
-\fB\-\-use\-policies\fP to use the device replacement policy specified in
-\fBlvm.conf\fP(5), see \fBactivation/mirror_log_fault_policy\fP or
-\fBactivation/mirror_device_fault_policy\fP.
-
-When used with a thin pool LV, this option automates the use of the
-\fBthin_repair\fP(8) tool on the thin pool. This repairs a very limitted
-number of problems. Only inactive thin pools can be repaired. There is
-no validation of metadata between kernel and LVM. This requires further
-manual work. After successfull repair the old unmodified metadata are
-still available in "<pool>_meta<n>" LV.
-Also see
-.BR lvmthin (7).
-.
-.HP
-.BR \-\-replace
-.IR PhysicalVolume
-.br
-Remove the specified device \fIPhysicalVolume\fP and replace it with one
-that is available in the VG, or from a specific list of PVs specified on
-the command line following the LV name. This option may be repeated multiple
-times depending on the RaidLV type.
-.
-.HP
-.BR \-s ,
-.BR \-\-snapshot
-.br
-Alias for
-.B \-\-type snapshot.
-See COMMANDS description for
-.br
-.B lvconvert \-\-type snapshot.
-.HP
-.BR \-\-split
-.br
-Separates \fISplitableLogicalVolume\fP.
-This option tries to detect the necessary split operation from its arguments.
-Avoid using this option and use one of the following instead:
-.B \-\-splitcache, \-\-splitmirrors, \-\-splitsnapshot.
-.
-.HP
-.BR \-\-splitcache
-.br
-Separates a cache pool from a cache LV, and keeps the unused cache pool
-LV. Before the separation, the cache is flushed. See similar option
-.B \-\-uncache.
-Also see
-.BR lvmcache (7).
-.
-.HP
-.BR \-\-splitmirrors
-.IR Number
-.br
-Splits the specified number of images from a \fBraid1\fP or \fBmirror\fP
-LV and uses them to create a new LV.
-
-If \fB\-\-trackchanges\fP is also specified, changes to the raid1 LV are
-tracked while the split LV remains detached.
-.B lvconvert \-\-merge
-can be used to recombine the split images with the original raid1 LV.
-
-A name can be specified for the new LV with \fB\-\-name\fP (a name is
-required without \fB\-\-trackchanges\fP).
-.
-.HP
-.BR \-\-splitsnapshot
-.br
-Separates a COW snapshot from its origin LV. The LV that is split off
-contains the chunks that differ from the origin LV along with metadata
-describing them. This LV can be wiped and then destroyed with lvremove.
-See corresponding operation
-.B lvconvert \-\-type snapshot.
-.
-.HP
-.BR \-\-stripes
-.IR Number
-.br
-Specifies the number of stripes in a striped LV. This is the number of
-physical volumes (devices) that a striped LV is spread across. Data that
-appears sequential in the LV is spread across multiple devices in units of
-the stripe size (see \fB\-\-stripesize\fP). This does not apply to
-existing allocated space, only newly allocated space can be striped.
-.
-.HP
-.BR \-I ,
-.BR \-\-stripesize
-.IR StripeSize
-.br
-Specifies the stripe size in kilobytes for a striped LV. The stripe size
-is the number of kilobytes written to each stripe, i.e. to one device,
-before writing to the next stripe/device. StripeSize must be a power of 2
-and cannot exceed the VG physical extent (PE) size.
-.
-.HP
-.BR \-\-type
-.IR SegmentType
-.br
-Converts an LV from one segment type to another.
-See COMMANDS section for a description of converting between each type.
-.
-.HP
-.BR \-\-thinpool
-.IR ThinPoolLogicalVolume { Name | Path }
-.br
-Specifies the thin pool to use when converting an LV to a thin LV. If
-ThinPoolLogicalVolume is not yet a thin pool, the command will attempt to
-convert it to a thin pool prior to the thin LV conversion.
-Also see
-.BR lvmthin (7).
-.
-.HP
-.BR \-\-trackchanges
-.br
-Can be used with \fB\-\-splitmirrors\fP on a raid1 LV. This causes
-changes to the original raid1 LV to be tracked while the split images
-remain detached. This allows the read\-only detached image(s) to be
-merged efficiently back into the raid1 LV later. Only the regions with
-changed data are resynchronized during merge. (This option only applies
-to the \fBraid1\fP LV type.)
-.
-.HP
-.BR \-T ,
-.BR \-\-thin
-.br
-Alias for
-.B \-\-type thin.
-See COMMANDS description for
-.br
-.B lvconvert \-\-type thin.
-.
-.HP
-.BR \-\-uncache
-.br
-Separates a cache pool from a cache LV, and removes the unused cache pool
-LV. Before the separation, the cache is flushed. See similar option
-.B \-\-splitcache.
-Also see
-.BR lvmcache (7).
-.
-.HP
-.BR \-Z ,
-.BR \-\-zero
-.RB { y | n }
-.br
-For snapshots, this controls zeroing of the first 4KiB of data in the
-snapshot. If the LV is read\-only, the snapshot will not be zeroed.
-
-For thin pools, this controls zeroing of provisioned blocks.
-Provisioning of large zeroed chunks negatively impacts performance.
-Also see
-.BR lvmthin (7).
-.
-
-.SH Examples
-.
-Convert a linear LV to a two-way mirror LV:
-.br
-.B lvconvert \-\-type mirror \-\-mirrors 1 vg/lvol1
-
-Convert a linear LV to a two-way RAID1 LV:
-.br
-.B lvconvert \-\-type raid1 \-\-mirrors 1 vg/lvol1
-
-Convert a mirror LV to use an in\-memory log:
-.br
-.B lvconvert \-\-mirrorlog core vg/lvol1
-
-Convert a mirror LV to use a disk log:
-.br
-.B lvconvert \-\-mirrorlog disk vg/lvol1
-
-Convert a mirror or raid1 LV to a linear LV:
-.br
-.B lvconvert --type linear vg/lvol1
-
-Convert a mirror LV to a raid1 LV with the same number of images:
-.br
-.B lvconvert \-\-type raid1 vg/lvol1
-
-./" Split and merge a COW snapshot:
-./" TODO
-Convert a linear LV to a two-way mirror LV, allocating new extents from specific
-PV ranges:
-.br
-.B lvconvert \-\-mirrors 1 vg/lvol1 /dev/sda:0\-15 /dev/sdb:0\-15
-
-Convert a mirror LV to a linear LV, freeing physical extents from a specific PV:
-.br
-.B lvconvert \-\-type linear vg/lvol1 /dev/sda
-
-Split one image from a mirror or raid1 LV, making it a new LV:
-.br
-.B lvconvert \-\-splitmirrors 1 \-\-name lv_split vg/lvol1
-
-Split one image from a raid1 LV, and track changes made to the raid1 LV
-while the split image remains detached:
-.br
-.B lvconvert \-\-splitmirrors 1 \-\-trackchanges vg/lvol1
-
-Merge an image (that was previously created with \-\-splitmirrors and
-\-\-trackchanges) back into the original raid1 LV:
-.br
-.B lvconvert \-\-merge vg/lvol1_rimage_1
-./" FIXME: use merge-mirror
-
-Replace PV /dev/sdb1 with PV /dev/sdf1 in a raid1/4/5/6/10 LV:
-.br
-.B lvconvert \-\-replace /dev/sdb1 vg/lvol1 /dev/sdf1
-
-Replace 3 PVs /dev/sd[b-d]1 with PVs /dev/sd[f-h]1 in a raid1 LV:
-.br
-.B lvconvert \-\-replace /dev/sdb1 \-\-replace /dev/sdc1 \-\-replace /dev/sdd1
-.RS
-.B vg/lvol1 /dev/sd[fgh]1
-.RE
-
-Replace the maximum of 2 PVs /dev/sd[bc]1 with PVs /dev/sd[gh]1 in a raid6 LV:
-.br
-.B lvconvert \-\-replace /dev/sdb1 \-\-replace /dev/sdc1 vg/lvol1 /dev/sd[gh]1
-
-Convert an LV into a thin LV in the specified thin pool. The existing LV
-is used as an external read\-only origin for the new thin LV.
-.br
-.B lvconvert \-\-type thin \-\-thinpool vg/tpool1 vg/lvol1
-
-Convert an LV into a thin LV in the specified thin pool. The existing LV
-is used as an external read\-only origin for the new thin LV, and is
-renamed "external":
-.br
-.B lvconvert \-\-type thin \-\-thinpool vg/tpool1
-.RS
-.B \-\-originname external vg/lvol1
-.RE
-
-Convert an LV to a cache pool LV using another specified LV for cache pool
-metadata:
-.br
-.B lvconvert \-\-type cache-pool \-\-poolmetadata vg/poolmeta1 vg/lvol1
-
-Convert an LV to a cache LV using the specified cache pool and chunk size:
-.br
-.B lvconvert \-\-type cache \-\-cachepool vg/cpool1 \-c 128 vg/lvol1
-
-Detach and keep the cache pool from a cache LV:
-.br
-.B lvconvert \-\-splitcache vg/lvol1
-
-Detach and remove the cache pool from a cache LV:
-.br
-.B lvconvert \-\-uncache vg/lvol1
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvm.conf (5),
-.BR lvmcache (7),
-.BR lvmthin (7),
-.BR lvdisplay (8),
-.BR lvextend (8),
-.BR lvreduce (8),
-.BR lvremove (8),
-.BR lvrename (8),
-.BR lvscan (8),
-.BR vgcreate (8),
-.BR cache_dump (8),
-.BR cache_repair (8),
-.BR cache_restore (8),
-.BR thin_dump (8),
-.BR thin_repair (8),
-.BR thin_restore (8)
diff --git a/man/lvcreate.8.des b/man/lvcreate.8.des
new file mode 100644
index 0000000..e18affe
--- /dev/null
+++ b/man/lvcreate.8.des
@@ -0,0 +1,28 @@
+lvcreate creates a new LV in a VG. For standard LVs, this requires
+allocating logical extents from the VG's free physical extents. If there
+is not enough free space, then the VG can be extended (see
+\fBvgextend\fP(8)) with other PVs, or existing LVs can be reduced or
+removed (see \fBlvremove\fP, \fBlvreduce\fP.)
+
+To control which PVs a new LV will use, specify one or more PVs as
+position args at the end of the command line. lvcreate will allocate
+physical extents only from the specified PVs.
+
+lvcreate can also create snapshots of existing LVs, e.g. for backup
+purposes. The data in a new snapshot LV represents the content of the
+original LV from the time the snapshot was created.
+
+RAID LVs can be created by specifying an LV type when creating the LV (see
+\fBlvmraid\fP(7)). Different RAID levels require different numbers of
+unique PVs be available in the VG for allocation.
+
+Thin pools (for thin provisioning) and cache pools (for caching) are
+represented by special LVs with types thin-pool and cache-pool (see
+\fBlvmthin\fP(7) and \fBlvmcache\fP(7)). The pool LVs are not usable as
+standard block devices, but the LV names act references to the pools.
+
+Thin LVs are thinly provisioned from a thin pool, and are created with a
+virtual size rather than a physical size. A cache LV is the combination of
+a standard LV with a cache pool, used to cache active portions of the LV
+to improve performance.
+
diff --git a/man/lvcreate.8.end b/man/lvcreate.8.end
new file mode 100644
index 0000000..74ae599
--- /dev/null
+++ b/man/lvcreate.8.end
@@ -0,0 +1,98 @@
+.SH EXAMPLES
+
+Create a striped LV with 3 stripes, a stripe size of 8KiB and a size of 100MiB.
+The LV name is chosen by lvcreate.
+.br
+.B lvcreate \-i 3 \-I 8 \-L 100m vg00
+
+Create a raid1 LV with two images, and a useable size of 500 MiB. This
+operation requires two devices, one for each mirror image. RAID metadata
+(superblock and bitmap) is also included on the two devices.
+.br
+.B lvcreate \-\-type raid1 \-m1 \-L 500m \-n mylv vg00
+
+Create a mirror LV with two images, and a useable size of 500 MiB.
+This operation requires three devices: two for mirror images and
+one for a disk log.
+.br
+.B lvcreate \-\-type mirror \-m1 \-L 500m \-n mylv vg00
+
+Create a mirror LV with 2 images, and a useable size of 500 MiB.
+This operation requires 2 devices because the log is in memory.
+.br
+.B lvcreate \-\-type mirror \-m1 \-\-mirrorlog core \-L 500m \-n mylv vg00
+
+Create a copy\-on\-write snapshot of an LV:
+.br
+.B lvcreate \-\-snapshot \-\-size 100m \-\-name mysnap vg00/mylv
+
+Create a copy\-on\-write snapshot with a size sufficient
+for overwriting 20% of the size of the original LV.
+.br
+.B lvcreate \-s \-l 20%ORIGIN \-n mysnap vg00/mylv
+
+Create a sparse LV with 1TiB of virtual space, and actual space just under
+100MiB.
+.br
+.B lvcreate \-\-snapshot \-\-virtualsize 1t \-\-size 100m \-\-name mylv vg00
+
+Create a linear LV with a usable size of 64MiB on specific physical extents.
+.br
+.B lvcreate \-L 64m \-n mylv vg00 /dev/sda:0\-7 /dev/sdb:0\-7
+
+Create a RAID5 LV with a usable size of 5GiB, 3 stripes, a stripe size of
+64KiB, using a total of 4 devices (including one for parity).
+.br
+.B lvcreate \-\-type raid5 \-L 5G \-i 3 \-I 64 \-n mylv vg00
+
+Create a RAID5 LV using all of the free space in the VG and spanning all the
+PVs in the VG (note that the command will fail if there are more than 8 PVs in
+the VG, in which case \fB\-i 7\fP must be used to get to the current maximum of
+8 devices including parity for RaidLVs).
+.br
+.B lvcreate \-\-config allocation/raid_stripe_all_devices=1
+.RS
+.B \-\-type raid5 \-l 100%FREE \-n mylv vg00
+.RE
+
+Create RAID10 LV with a usable size of 5GiB, using 2 stripes, each on
+a two-image mirror. (Note that the \fB-i\fP and \fB-m\fP arguments behave
+differently:
+\fB-i\fP specifies the total number of stripes,
+but \fB-m\fP specifies the number of images in addition
+to the first image).
+.br
+.B lvcreate \-\-type raid10 \-L 5G \-i 2 \-m 1 \-n mylv vg00
+
+Create a 1TiB thin LV, first creating a new thin pool for it, where
+the thin pool has 100MiB of space, uses 2 stripes, has a 64KiB stripe
+size, and 256KiB chunk size.
+.br
+.B lvcreate \-\-type thin \-\-name mylv \-\-thinpool mypool
+.RS
+.B \-V 1t \-L 100m \-i 2 \-I 64 \-c 256 vg00
+.RE
+
+Create a thin snapshot of a thin LV (the size option must not be
+used, otherwise a copy-on-write snapshot would be created).
+.br
+.B lvcreate \-\-snapshot \-\-name mysnap vg00/thinvol
+
+Create a thin snapshot of the read-only inactive LV named "origin"
+which becomes an external origin for the thin snapshot LV.
+.br
+.B lvcreate \-\-snapshot \-\-name mysnap \-\-thinpool mypool vg00/origin
+
+Create a cache pool from a fast physical device. The cache pool can
+then be used to cache an LV.
+.br
+.B lvcreate \-\-type cache-pool \-L 1G \-n my_cpool vg00 /dev/fast1
+
+Create a cache LV, first creating a new origin LV on a slow physical device,
+then combining the new origin LV with an existing cache pool.
+.br
+.B lvcreate \-\-type cache \-\-cachepool my_cpool
+.RS
+.B \-L 100G \-n mylv vg00 /dev/slow1
+.RE
+
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in
deleted file mode 100644
index 84afbda..0000000
--- a/man/lvcreate.8.in
+++ /dev/null
@@ -1,914 +0,0 @@
-.TH LVCREATE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.
-.\" Use 1st. parameter with \% to fix 'man2html' rendeing on same line!
-.de SIZE_G
-. IR \\$1 \c
-. RB [ b | B | s | S | k | K | m | M | g | G ]
-..
-.de SIZE_E
-. IR \\$1 \c
-. RB [ b | B | s | S | k | K | m | M | \c
-. BR g | G | t | T | p | P | e | E ]
-..
-.
-.SH NAME
-.
-lvcreate \- create a logical volume in an existing volume group
-.
-.SH SYNOPSIS
-.
-.ad l
-.B lvcreate
-.RB [ \-a | \-\-activate
-.RB [ a ][ e | l | s ]{ y | n }]
-.RB [ \-\-addtag
-.IR Tag ]
-.RB [ \-\-alloc
-.IR Allocation\%Policy ]
-.RB [ \-A | \-\-autobackup
-.RB { y | n }]
-.RB [ \-H | \-\-cache ]
-.RB [ \-\-cachemode
-.RB { passthrough | writeback | writethrough }]
-.RB [ \-\-cachepolicy
-.IR Policy ]
-.RB \%[ \-\-cachepool
-.IR CachePoolLogicalVolume ]
-.RB [ \-\-cachesettings
-.IR Key \fB= Value ]
-.RB [ \-c | \-\-chunksize
-.IR ChunkSize ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB \%[ \-C | \-\-contiguous
-.RB { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-\-discards
-.RB \%{ ignore | nopassdown | passdown }]
-.RB [ \-\-errorwhenfull
-.RB { y | n }]
-.RB [{ \-l | \-\-extents
-.BR \fILogicalExtents\%Number [ % { FREE | PVS | VG }]
-.RB |
-.BR \-L | \-\-size
-.BR \fILogicalVolumeSize }
-.RB [ \-i | \-\-stripes
-.IR Stripes
-.RB [ \-I | \-\-stripesize
-.IR StripeSize ]]]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-K | \-\-ignoreactivationskip ]
-.RB [ \-\-ignoremonitoring ]
-.RB [ \-\-minor
-.IR Minor
-.RB [ \-j | \-\-major
-.IR Major ]]
-.RB [ \-\-metadataprofile
-.IR Profile\%Name ]
-.RB [ \-m | \-\-mirrors
-.IR Mirrors
-.RB [ \-\-corelog | \-\-mirrorlog
-.RB { disk | core | mirrored }]
-.RB [ \-\-nosync ]
-.RB [ \-R | \-\-regionsize
-.BR \fIMirrorLogRegionSize ]]
-.RB [ \-\-monitor
-.RB { y | n }]
-.RB [ \-n | \-\-name
-.IR Logical\%Volume ]
-.RB [ \-\-noudevsync ]
-.RB [ \-p | \-\-permission
-.RB { r | rw }]
-.RB [ \-M | \-\-persistent
-.RB { y | n }]
-.\" .RB [ \-\-pooldatasize
-.\" .I DataVolumeSize
-.RB \%[ \-\-poolmetadatasize
-.IR MetadataVolumeSize ]
-.RB [ \-\-poolmetadataspare
-.RB { y | n }]
-.RB [ \-\- [ raid ] maxrecoveryrate
-.IR Rate ]
-.RB [ \-\- [ raid ] minrecoveryrate
-.IR Rate ]
-.RB [ \-r | \-\-readahead
-.RB { \fIReadAheadSectors | auto | none }]
-.RB [ \-\-reportformat
-.RB {basic | json}]
-.RB \%[ \-k | \-\-setactivationskip
-.RB { y | n }]
-.RB [ \-s | \-\-snapshot ]
-.RB [ \-V | \-\-virtualsize
-.IR VirtualSize ]
-.RB [ \-t | \-\-test ]
-.RB [ \-T | \-\-thin ]
-.RB [ \-\-thinpool
-.IR ThinPoolLogicalVolume ]
-.RB [ \-\-type
-.IR SegmentType ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-W | \-\-wipesignatures
-.RB { y | n }]
-.RB [ \-Z | \-\-zero
-.RB { y | n }]
-.RI [ VolumeGroup
-.RI |
-.RI \%{ ExternalOrigin | Origin | Pool } LogicalVolume
-.RI \%[ PhysicalVolumePath [ \fB: \fIPE \fR[ \fB\- PE ]]...]]
-.LP
-.B lvcreate
-.RB [ \-l | \-\-extents
-.BR \fILogicalExtentsNumber [ % { FREE | ORIGIN | PVS | VG }]
-|
-.BR \-L | \-\-size
-.\" | \-\-pooldatasize
-.IR LogicalVolumeSize ]
-.RB [ \-c | \-\-chunksize
-.IR ChunkSize ]
-.RB \%[ \-\-commandprofile
-.IR Profile\%Name ]
-.RB [ \-\-noudevsync ]
-.RB [ \-\-ignoremonitoring ]
-.RB [ \-\-metadataprofile
-.IR Profile\%Name ]
-.RB \%[ \-\-monitor
-.RB { y | n }]
-.RB [ \-n | \-\-name
-.IR SnapshotLogicalVolumeName ]
-.RB [ \-\-reportformat
-.RB {basic | json}]
-.BR \-s | \-\-snapshot | \-H | \-\-cache
-.RI \%{[ VolumeGroup \fB/\fP] OriginalLogicalVolume
-.RB \%[ \-V | \-\-virtualsize
-.IR VirtualSize ]}
-.ad b
-.
-.SH DESCRIPTION
-.
-lvcreate creates a new logical volume in a volume group (see
-.BR vgcreate "(8), " vgchange (8))
-by allocating logical extents from the free physical extent pool
-of that volume group. If there are not enough free physical extents then
-the volume group can be extended (see
-.BR vgextend (8))
-with other physical volumes or by reducing existing logical volumes
-of this volume group in size (see
-.BR lvreduce (8)).
-If you specify one or more PhysicalVolumes, allocation of physical
-extents will be restricted to these volumes.
-.br
-.br
-The second form supports the creation of snapshot logical volumes which
-keep the contents of the original logical volume for backup purposes.
-.
-.SH OPTIONS
-.
-See
-.BR lvm (8)
-for common options.
-.
-.HP
-.BR \-a | \-\-activate
-.RB [ a ][ l | e | s ]{ y | n }
-.br
-Controls the availability of the Logical Volumes for immediate use after
-the command finishes running.
-By default, new Logical Volumes are activated (\fB\-ay\fP).
-If it is possible technically, \fB\-an\fP will leave the new Logical
-Volume inactive. But for example, snapshots of active origin can only be
-created in the active state so \fB\-an\fP cannot be used with
-\fB-\-type snapshot\fP. This does not apply to thin volume snapshots,
-which are by default created with flag to skip their activation
-(\fB-ky\fP).
-Normally the \fB\-\-zero n\fP argument has to be supplied too because
-zeroing (the default behaviour) also requires activation.
-If autoactivation option is used (\fB\-aay\fP), the logical volume is
-activated only if it matches an item in the
-\fBactivation/auto_activation_volume_list\fP
-set in \fBlvm.conf\fP(5).
-For autoactivated logical volumes, \fB\-\-zero n\fP and
-\fB\-\-wipesignatures n\fP is always assumed and it can't
-be overridden. If the clustered locking is enabled,
-\fB\-aey\fP will activate exclusively on one node and
-.BR \-a { a | l } y
-will activate only on the local node.
-.
-.HP
-.BR \-H | \-\-cache
-.br
-Creates cache or cache pool logical volume.
-.\" or both.
-Specifying the optional argument \fB\-\-extents\fP or \fB\-\-size\fP
-will cause the creation of the cache logical volume.
-.\" Specifying the optional argument \fB\-\-pooldatasize\fP will cause
-.\" the creation of the cache pool logical volume.
-.\" Specifying both arguments will cause the creation of cache with its
-.\" cache pool volume.
-When the Volume group name is specified together with existing logical volume
-name which is NOT a cache pool name, such volume is treated
-as cache origin volume and cache pool is created. In this case the
-\fB\-\-extents\fP or \fB\-\-size\fP is used to specify size of cache pool volume.
-See \fBlvmcache\fP(7) for more info about caching support.
-Note that the cache segment type requires a dm-cache kernel module version
-1.3.0 or greater.
-.
-.HP
-.BR \-\-cachemode
-.RB { passthrough | writeback | writethrough }
-.br
-Specifying a cache mode determines when the writes to a cache LV
-are considered complete. When \fBwriteback\fP is specified, a write is
-considered complete as soon as it is stored in the cache pool LV.
-If \fBwritethough\fP is specified, a write is considered complete only
-when it has been stored in the cache pool LV and on the origin LV.
-While \fBwritethrough\fP may be slower for writes, it is more
-resilient if something should happen to a device associated with the
-cache pool LV. With \fBpassthrough\fP mode, all reads are served
-from origin LV (all reads miss the cache) and all writes are
-forwarded to the origin LV; additionally, write hits cause cache
-block invalidates. See \fBlvmcache(7)\fP for more details.
-.
-.HP
-.BR \-\-cachepolicy
-.IR Policy
-.br
-Only applicable to cached LVs; see also \fBlvmcache(7)\fP. Sets
-the cache policy. \fBmq\fP is the basic policy name. \fBsmq\fP is more advanced
-version available in newer kernels.
-.
-.HP
-.BR \-\-cachepool
-.IR CachePoolLogicalVolume { Name | Path }
-.br
-Specifies the name of cache pool volume name. The other way to specify pool name
-is to append name to Volume group name argument.
-.
-.HP
-.BR \-\-cachesettings
-.IB Key = Value
-.br
-Only applicable to cached LVs; see also \fBlvmcache(7)\fP. Sets
-the cache tunable settings. In most use-cases, default values should be adequate.
-Special string value \fBdefault\fP switches setting back to its default kernel value
-and removes it from the list of settings stored in lvm2 metadata.
-.
-.HP
-.BR \-c | \-\-chunksize
-.SIZE_G \%ChunkSize
-.br
-Gives the size of chunk for snapshot, cache pool and thin pool logical volumes.
-Default unit is in kilobytes.
-.br
-For snapshots the value must be power of 2 between 4KiB and 512KiB
-and the default value is 4KiB.
-.br
-For cache pools the value must a multiple of 32KiB
-between 32KiB and 1GiB. The default is 64KiB.
-When the size is specified with volume caching, it may not be smaller
-than cache pool creation chunk size was.
-.br
-For thin pools the value must be a multiple of 64KiB
-between 64KiB and 1GiB.
-Default value starts with 64KiB and grows up to
-fit the pool metadata size within 128MiB,
-if the pool metadata size is not specified.
-See
-.BR lvm.conf (5)
-setting \fBallocation/thin_pool_chunk_size_policy\fP
-to select different calculation policy.
-Thin pool target version <1.4 requires this value to be a power of 2.
-For target version <1.5 discard is not supported for non power of 2 values.
-.
-.HP
-.BR \-C | \-\-contiguous
-.RB { y | n }
-.br
-Sets or resets the contiguous allocation policy for
-logical volumes. Default is no contiguous allocation based
-on a next free principle.
-.
-.HP
-.BR \-\-corelog
-.br
-This is shortcut for option \fB\-\-mirrorlog core\fP.
-.
-.HP
-.BR \-\-discards
-.RB { ignore | nopassdown | passdown }
-.br
-Sets discards behavior for thin pool.
-Default is \fBpassdown\fP.
-.
-.HP
-.BR \-\-errorwhenfull
-.RB { y | n }
-.br
-Configures thin pool behaviour when data space is exhausted.
-Default is \fBn\fPo.
-Device will queue I/O operations until target timeout
-(see dm-thin-pool kernel module option \fPno_space_timeout\fP)
-expires. Thus configured system has a time to i.e. extend
-the size of thin pool data device.
-When set to \fBy\fPes, the I/O operation is immeditelly errored.
-.
-.HP
-.BR \-K | \-\-ignoreactivationskip
-.br
-Ignore the flag to skip Logical Volumes during activation.
-Use \fB\-\-setactivationskip\fP option to set or reset
-activation skipping flag persistently for logical volume.
-.
-.HP
-.BR \-\-ignoremonitoring
-.br
-Make no attempt to interact with dmeventd unless \fB\-\-monitor\fP
-is specified.
-.
-.HP
-.BR -l | \-\-extents
-.IR LogicalExtentsNumber \c
-.RB [ % { VG | PVS | FREE | ORIGIN }]
-.br
-Specifies the size of the new LV in logical extents. The number of
-physical extents allocated may be different, and depends on the LV type.
-Certain LV types require more physical extents for data redundancy or
-metadata. An alternate syntax allows the size to be determined indirectly
-as a percentage of the size of a related VG, LV, or set of PVs. The
-suffix \fB%VG\fP denotes the total size of the VG, the suffix \fB%FREE\fP
-the remaining free space in the VG, and the suffix \fB%PVS\fP the free
-space in the specified Physical Volumes. For a snapshot, the size
-can be expressed as a percentage of the total size of the Origin Logical
-Volume with the suffix \fB%ORIGIN\fP (\fB100%ORIGIN\fP provides space for
-the whole origin).
-When expressed as a percentage, the size defines an upper limit for the
-number of logical extents in the new LV. The precise number of logical
-extents in the new LV is not determined until the command has completed.
-.
-.HP
-.BR \-j | \-\-major
-.IR Major
-.br
-Sets the major number.
-Major numbers are not supported with pool volumes.
-This option is supported only on older systems
-(kernel version 2.4) and is ignored on modern Linux systems where major
-numbers are dynamically assigned.
-.
-.HP
-.BR \-\-metadataprofile
-.IR ProfileName
-.br
-Uses and attaches the \fIProfileName\fP configuration profile to the logical
-volume metadata. Whenever the logical volume is processed next time,
-the profile is automatically applied. If the volume group has another
-profile attached, the logical volume profile is preferred.
-See \fBlvm.conf\fP(5) for more information about \fBmetadata profiles\fP.
-.
-.HP
-.BR \-\-minor
-.IR Minor
-.br
-Sets the minor number.
-Minor numbers are not supported with pool volumes.
-.
-.HP
-.BR \-m | \-\-mirrors
-.IR mirrors
-.br
-Creates a mirrored logical volume with \fImirrors\fP copies.
-For example, specifying \fB\-m 1\fP
-would result in a mirror with two-sides; that is,
-a linear volume plus one copy.
-
-Specifying the optional argument \fB\-\-nosync\fP will cause the creation
-of the mirror LV to skip the initial resynchronization. Any data written
-afterwards will be mirrored, but the original contents will not be copied.
-
-This is useful for skipping a potentially long and resource intensive initial
-sync of an empty mirrored RaidLV.
-
-There are two implementations of mirroring which can be used and correspond
-to the "\fIraid1\fP" and "\fImirror\fP" segment types.
-The default is "\fIraid1\fP". See the
-\fB\-\-type\fP option for more information if you would like to use the
-legacy "\fImirror\fP" segment type. See
-.BR lvm.conf (5)
-settings \fB global/mirror_segtype_default\fP
-and \fBglobal/raid10_segtype_default\fP
-to configure default mirror segment type.
-The options
-\fB\-\-mirrorlog\fP and \fB\-\-corelog\fP apply
-to the legacy "\fImirror\fP" segment type only.
-
-Note the current maxima for mirrors are 7 for "mirror" providing
-8 mirror legs and 9 for "raid1" providing 10 legs.
-.
-.HP
-.BR \-\-mirrorlog
-.RB { disk | core | mirrored }
-.br
-Specifies the type of log to be used for logical volumes utilizing
-the legacy "\fImirror\fP" segment type.
-.br
-The default is \fBdisk\fP, which is persistent and requires
-a small amount of storage space, usually on a separate device from the
-data being mirrored.
-.br
-Using \fBcore\fP means the mirror is regenerated by copying the data
-from the first device each time the logical volume is activated,
-like after every reboot.
-.br
-Using \fBmirrored\fP will create a persistent log that is itself mirrored.
-.
-.HP
-.BR \-\-monitor
-.RB { y | n }
-.br
-Starts or avoids monitoring a mirrored, snapshot or thin pool logical volume with
-dmeventd, if it is installed.
-If a device used by a monitored mirror reports an I/O error,
-the failure is handled according to
-\fBactivation/mirror_image_fault_policy\fP
-and \fBactivation/mirror_log_fault_policy\fP
-set in \fBlvm.conf\fP(5).
-.
-.HP
-.BR \-n | \-\-name
-.IR LogicalVolume { Name | Path }
-.br
-Sets the name for the new logical volume.
-.br
-Without this option a default name of "lvol#" will be generated where
-# is the LVM internal number of the logical volume.
-.
-.HP
-.BR \-\-nosync
-.br
-Causes the creation of mirror, raid1, raid4, raid5 and raid10 to skip the
-initial resynchronization. In case of mirror, raid1 and raid10, any data
-written afterwards will be mirrored, but the original contents will not be
-copied. In case of raid4 and raid5, no parity blocks will be written,
-though any data written afterwards will cause parity blocks to be stored.
-.br
-This is useful for skipping a potentially long and resource intensive initial
-sync of an empty mirror/raid1/raid4/raid5 and raid10 LV.
-.br
-This option is not valid for raid6, because raid6 relies on proper parity
-(P and Q Syndromes) being created during initial synchronization in order
-to reconstruct proper user date in case of device failures.
-
-raid0 and raid0_meta don't provide any data copies or parity support
-and thus don't support initial resynchronization.
-.
-.HP
-.BR \-\-noudevsync
-.br
-Disables udev synchronisation. The
-process will not wait for notification from udev.
-It 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.
-.
-.HP
-.BR \-p | \-\-permission
-.RB { r | rw }
-.br
-Sets access permissions to read only (\fBr\fP) or read and write (\fBrw\fP).
-.br
-Default is read and write.
-.
-.HP
-.BR \-M | \-\-persistent
-.RB { y | n }
-.br
-Set to \fBy\fP to make the minor number specified persistent.
-Pool volumes cannot have persistent major and minor numbers.
-Defaults to \fBy\fPes only when major or minor number is specified.
-Otherwise it is \fBn\fPo.
-.\" .HP
-.\" .IR \fB\-\-pooldatasize " " PoolDataVolumeSize [ bBsSkKmMgGtTpPeE ]
-.\" Sets the size of pool's data logical volume.
-.\" For thin pools you may also specify the size
-.\" with the option \fB\-\-size\fP.
-.\"
-.
-.HP
-.BR \-\-poolmetadatasize
-.SIZE_G \%MetadataVolumeSize
-.br
-Sets the size of pool's metadata logical volume.
-Supported values are in range between 2MiB and 16GiB for thin pool,
-and upto 16GiB for cache pool. The minimum value is computed from pool's
-data size.
-Default value for thin pool is (Pool_LV_size / Pool_LV_chunk_size * 64b).
-To work with a thin pool, there should be at least 25% of free space
-when the size of metadata is smaller then 16MiB,
-or at least 4MiB of free space otherwise.
-Default unit is megabytes.
-.
-.HP
-.BR \-\-poolmetadataspare
-.RB { y | n }
-.br
-Controls creation and maintanence of pool metadata spare logical volume
-that will be used for automated pool recovery.
-Only one such volume is maintained within a volume group
-with the size of the biggest pool metadata volume.
-Default is \fBy\fPes.
-.
-.HP
-.BR \-\- [ raid ] maxrecoveryrate
-.SIZE_G \%Rate
-.br
-Sets the maximum recovery rate for a RAID logical volume. \fIRate\fP
-is specified as an amount per second for each device in the array.
-If no suffix is given, then KiB/sec/device is assumed. Setting the
-recovery rate to 0 means it will be unbounded.
-.
-.HP
-.BR \-\- [ raid ] minrecoveryrate
-.SIZE_G \%Rate
-.br
-Sets the minimum recovery rate for a RAID logical volume. \fIRate\fP
-is specified as an amount per second for each device in the array.
-If no suffix is given, then KiB/sec/device is assumed. Setting the
-recovery rate to 0 means it will be unbounded.
-.
-.HP
-.BR \-r | \-\-readahead
-.RB { \fIReadAheadSectors | auto | none }
-.br
-Sets read ahead sector count of this logical volume.
-For volume groups with metadata in lvm1 format, this must
-be a value between 2 and 120.
-The default value is \fBauto\fP which allows the kernel to choose
-a suitable value automatically.
-\fBnone\fP is equivalent to specifying zero.
-.
-.HP
-.BR \-R | \-\-regionsize
-.SIZE_G \%MirrorLogRegionSize
-.br
-A mirror is divided into regions of this size (in MiB), and the mirror log
-uses this granularity to track which regions are in sync.
-.
-.HP
-.BR \-k | \-\-setactivationskip
-.RB { y | n }
-.br
-Controls whether Logical Volumes are persistently flagged to be skipped during
-activation. By default, thin snapshot volumes are flagged for activation skip.
-See
-.BR lvm.conf (5)
-\fBactivation/auto_set_activation_skip\fP
-how to change its default behaviour.
-To activate such volumes, an extra \fB\-\-ignoreactivationskip\fP
-option must be used. The flag is not applied during deactivation. Use
-\fBlvchange \-\-setactivationskip\fP
-command to change the skip flag for existing volumes.
-To see whether the flag is attached, use \fBlvs\fP command
-where the state of the flag is reported within \fBlv_attr\fP bits.
-.
-.HP
-.BR \-L | \-\-size
-.SIZE_E \%LogicalVolumeSize
-.br
-Gives the size to allocate for the new logical volume.
-A size suffix of \fBB\fP for bytes, \fBS\fP for sectors as 512 bytes,
-\fBK\fP for kilobytes, \fBM\fP for megabytes,
-\fBG\fP for gigabytes, \fBT\fP for terabytes, \fBP\fP for petabytes
-or \fBE\fP for exabytes is optional.
-.br
-Default unit is megabytes.
-.
-.HP
-.BR \-s | \fB\-\-snapshot
-.IR OriginalLogicalVolume { Name | Path }
-.br
-Creates a snapshot logical volume (or snapshot) for an existing, so called
-original logical volume (or origin).
-Snapshots provide a 'frozen image' of the contents of the origin
-while the origin can still be updated. They enable consistent
-backups and online recovery of removed/overwritten data/files.
-.br
-Thin snapshot is created when the origin is a thin volume and
-the size IS NOT specified. Thin snapshot shares same blocks within
-the thin pool volume.
-The non thin volume snapshot with the specified size does not need
-the same amount of storage the origin has. In a typical scenario,
-15-20% might be enough. In case the snapshot runs out of storage, use
-.BR lvextend (8)
-to grow it. Shrinking a snapshot is supported by
-.BR lvreduce (8)
-as well. Run
-.BR lvs (8)
-on the snapshot in order to check how much data is allocated to it.
-Note: a small amount of the space you allocate to the snapshot is
-used to track the locations of the chunks of data, so you should
-allocate slightly more space than you actually need and monitor
-(\fB\-\-monitor\fP) the rate at which the snapshot data is growing
-so you can \fBavoid\fP running out of space.
-If \fB\-\-thinpool\fP is specified, thin volume is created that will
-use given original logical volume as an external origin that
-serves unprovisioned blocks.
-Only read-only volumes can be used as external origins.
-To make the volume external origin, lvm expects the volume to be inactive.
-External origin volume can be used/shared for many thin volumes
-even from different thin pools. See
-.BR lvconvert (8)
-for online conversion to thin volumes with external origin.
-.
-.HP
-.BR \-i | \-\-stripes
-.IR Stripes
-.br
-Gives the number of stripes.
-This is equal to the number of physical volumes to scatter
-the logical volume data. When creating a RAID 4/5/6 logical volume,
-the extra devices which are necessary for parity are
-internally accounted for. Specifying \fB\-i 3\fP
-would cause 3 devices for striped and RAID 0 logical volumes,
-4 devices for RAID 4/5, 5 devices for RAID 6 and 6 devices for RAID 10.
-Alternatively, RAID 0 will stripe across 2 devices,
-RAID 4/5 across 3 PVs, RAID 6 across 5 PVs and RAID 10 across
-4 PVs in the volume group if the \fB\-i\fP argument is omitted.
-In order to stripe across all PVs of the VG if the \fB\-i\fP argument is
-omitted, set raid_stripe_all_devices=1 in the allocation
-section of \fBlvm.conf (5)\fP or add
-.br
-\fB\-\-config allocation/raid_stripe_all_devices=1\fP
-.br
-to the command.
-
-Note the current maxima for stripes depend on the created RAID type.
-For raid10, the maximum of stripes is 32,
-for raid0, it is 64,
-for raid4/5, it is 63
-and for raid6 it is 62.
-
-See the \fB\-\-nosync\fP option to optionally avoid initial syncrhonization of RaidLVs.
-
-Two implementations of basic striping are available in the kernel.
-The original device-mapper implementation is the default and should
-normally be used. The alternative implementation using MD, available
-since version 1.7 of the RAID device-mapper kernel target (kernel
-version 4.2) is provided to facilitate the development of new RAID
-features. It may be accessed with \fB--type raid0[_meta]\fP, but is best
-avoided at present because of assorted restrictions on resizing and converting
-such devices.
-.HP
-.BR \-I | \-\-stripesize
-.IR StripeSize
-.br
-Gives the number of kilobytes for the granularity of the stripes.
-.br
-StripeSize must be 2^n (n = 2 to 9) for metadata in LVM1 format.
-For metadata in LVM2 format, the stripe size may be a larger
-power of 2 but must not exceed the physical extent size.
-.
-.HP
-.BR \-T | \-\-thin
-.br
-Creates thin pool or thin logical volume or both.
-Specifying the optional argument \fB\-\-size\fP or \fB\-\-extents\fP
-will cause the creation of the thin pool logical volume.
-Specifying the optional argument \fB\-\-virtualsize\fP will cause
-the creation of the thin logical volume from given thin pool volume.
-Specifying both arguments will cause the creation of both
-thin pool and thin volume using this pool.
-See \fBlvmthin\fP(7) for more info about thin provisioning support.
-Thin provisioning requires device mapper kernel driver
-from kernel 3.2 or greater.
-.
-.HP
-.BR \-\-thinpool
-.IR ThinPoolLogicalVolume { Name | Path }
-.br
-Specifies the name of thin pool volume name. The other way to specify pool name
-is to append name to Volume group name argument.
-.
-.HP
-.BR \-\-type
-.IR SegmentType
-.br
-Creates a logical volume with the specified segment type.
-Supported types are:
-.BR cache ,
-.BR cache-pool ,
-.BR error ,
-.BR linear ,
-.BR mirror,
-.BR raid0 ,
-.BR raid1 ,
-.BR raid4 ,
-.BR raid5_la ,
-.BR raid5_ls
-.RB (=
-.BR raid5 ),
-.BR raid5_ra ,
-.BR raid5_rs ,
-.BR raid6_nc ,
-.BR raid6_nr ,
-.BR raid6_zr
-.RB (=
-.BR raid6 ),
-.BR raid10 ,
-.BR snapshot ,
-.BR striped,
-.BR thin ,
-.BR thin-pool
-or
-.BR zero .
-Segment type may have a commandline switch alias that will
-enable its use.
-When the type is not explicitly specified an implicit type
-is selected from combination of options:
-.BR \-H | \-\-cache | \-\-cachepool
-(cache or cachepool),
-.BR \-T | \-\-thin | \-\-thinpool
-(thin or thinpool),
-.BR \-m | \-\-mirrors
-(raid1 or mirror),
-.BR \-s | \-\-snapshot | \-V | \-\-virtualsize
-(snapshot or thin),
-.BR \-i | \-\-stripes
-(striped).
-The default segment type is \fBlinear\fP.
-.
-.HP
-.BR \-V | \-\-virtualsize
-.SIZE_E \%VirtualSize
-.br
-Creates a thinly provisioned device or a sparse device of the given size (in MiB by default).
-See
-.BR lvm.conf (5)
-settings \fBglobal/sparse_segtype_default\fP
-to configure default sparse segment type.
-See \fBlvmthin\fP(7) for more info about thin provisioning support.
-Anything written to a sparse snapshot will be returned when reading from it.
-Reading from other areas of the device will return blocks of zeros.
-Virtual snapshot (sparse snapshot) is implemented by creating
-a hidden virtual device of the requested size using the zero target.
-A suffix of _vorigin is used for this device.
-Note: using sparse snapshots is not efficient for larger
-device sizes (GiB), thin provisioning should be used for this case.
-.
-.HP
-.BR \-W | \-\-wipesignatures
-.RB { y | n }
-.br
-Controls detection and subsequent wiping of signatures on newly created
-Logical Volume. There's a prompt for each signature detected to confirm
-its wiping (unless \fB--yes\fP is used where LVM assumes 'yes' answer
-for each prompt automatically). If this option is not specified, then by
-default \fB-W\fP | \fB--wipesignatures y\fP is assumed each time the
-zeroing is done (\fB\-Z\fP | \fB\-\-zero y\fP). This default behaviour
-can be controlled by \fB\%allocation/wipe_signatures_when_zeroing_new_lvs\fP
-setting found in
-.BR lvm.conf (5).
-.br
-If blkid wiping is used (\fBallocation/use_blkid_wiping\fP setting in
-.BR lvm.conf (5))
-and LVM2 is compiled with blkid wiping support, then \fBblkid\fP(8) library is used
-to detect the signatures (use \fBblkid \-k\fP command to list the signatures that are recognized).
-Otherwise, native LVM2 code is used to detect signatures (MD RAID, swap and LUKS
-signatures are detected only in this case).
-.br
-Logical volume is not wiped if the read only flag is set.
-.
-.HP
-.BR \-Z | \-\-zero
-.RB { y | n }
-.br
-Controls zeroing of the first 4KiB of data in the new logical volume.
-Default is \fBy\fPes.
-Snapshot COW volumes are always zeroed.
-Logical volume is not zeroed if the read only flag is set.
-.br
-Warning: trying to mount an unzeroed logical volume can cause the system to
-hang.
-.
-.SH Examples
-.
-Creates a striped logical volume with 3 stripes, a stripe size of 8KiB
-and a size of 100MiB in the volume group named vg00.
-The logical volume name will be chosen by lvcreate:
-.sp
-.B lvcreate \-i 3 \-I 8 \-L 100M vg00
-
-Creates a mirror logical volume with 2 sides with a useable size of 500 MiB.
-This operation would require 3 devices (or option
-\fB\-\-alloc \%anywhere\fP) - two for the mirror
-devices and one for the disk log:
-.sp
-.B lvcreate \-m1 \-L 500M vg00
-
-Creates a mirror logical volume with 2 sides with a useable size of 500 MiB.
-This operation would require 2 devices - the log is "in-memory":
-.sp
-.B lvcreate \-m1 \-\-mirrorlog core \-L 500M vg00
-
-Creates a snapshot logical volume named "vg00/snap" which has access to the
-contents of the original logical volume named "vg00/lvol1"
-at snapshot logical volume creation time. If the original logical volume
-contains a file system, you can mount the snapshot logical volume on an
-arbitrary directory in order to access the contents of the filesystem to run
-a backup while the original filesystem continues to get updated:
-.sp
-.B lvcreate \-\-size 100m \-\-snapshot \-\-name snap /dev/vg00/lvol1
-
-Creates a snapshot logical volume named "vg00/snap" with size
-for overwriting 20% of the original logical volume named "vg00/lvol1".:
-.sp
-.B lvcreate \-s \-l 20%ORIGIN \-\-name snap vg00/lvol1
-
-Creates a sparse device named /dev/vg1/sparse of size 1TiB with space for just
-under 100MiB of actual data on it:
-.sp
-.B lvcreate \-\-virtualsize 1T \-\-size 100M \-\-snapshot \-\-name sparse vg1
-
-Creates a linear logical volume "vg00/lvol1" using physical extents
-/dev/sda:0\-7 and /dev/sdb:0\-7 for allocation of extents:
-.sp
-.B lvcreate \-L 64M \-n lvol1 vg00 /dev/sda:0\-7 /dev/sdb:0\-7
-
-Creates a 5GiB RAID5 logical volume "vg00/my_lv", with 3 stripes (plus
-a parity drive for a total of 4 devices) and a stripesize of 64KiB:
-.sp
-.B lvcreate \-\-type raid5 \-L 5G \-i 3 \-I 64 \-n my_lv vg00
-
-Creates a RAID5 logical volume "vg00/my_lv", using all of the free
-space in the VG and spanning all the PVs in the VG (note that the command
-will fail if there's more than 8 PVs in the VG in which case \fB\-i 7\fP
-has to be used to get to the currently possible maximum of
-8 devices including parity for RaidLVs):
-.sp
-.B lvcreate \-\-config allocation/raid_stripe_all_devices=1 \-\-type raid5 \-l 100%FREE \-n my_lv vg00
-
-Creates a 5GiB RAID10 logical volume "vg00/my_lv", with 2 stripes on
-2 2-way mirrors. Note that the \fB-i\fP and \fB-m\fP arguments behave
-differently.
-The \fB-i\fP specifies the number of stripes.
-The \fB-m\fP specifies the number of
-.B additional
-copies:
-.sp
-.B lvcreate \-\-type raid10 \-L 5G \-i 2 \-m 1 \-n my_lv vg00
-
-Creates 100MiB pool logical volume for thin provisioning
-build with 2 stripes 64KiB and chunk size 256KiB together with
-1TiB thin provisioned logical volume "vg00/thin_lv":
-.sp
-.B lvcreate \-i 2 \-I 64 \-c 256 \-L100M \-T vg00/pool \-V 1T \-\-name thin_lv
-
-Creates a thin snapshot volume "thinsnap" of thin volume "thinvol" that
-will share the same blocks within the thin pool.
-Note: the size MUST NOT be specified, otherwise the non-thin snapshot
-is created instead:
-.sp
-.B lvcreate \-s vg00/thinvol \-\-name thinsnap
-
-Creates a thin snapshot volume of read-only inactive volume "origin"
-which then becomes the thin external origin for the thin snapshot volume
-in vg00 that will use an existing thin pool "vg00/pool":
-.sp
-.B lvcreate \-s \-\-thinpool vg00/pool origin
-
-Create a cache pool LV that can later be used to cache one
-logical volume.
-.sp
-.B lvcreate \-\-type cache-pool \-L 1G \-n my_lv_cachepool vg /dev/fast1
-
-If there is an existing cache pool LV, create the large slow
-device (i.e. the origin LV) and link it to the supplied cache pool LV,
-creating a cache LV.
-.sp
-.B lvcreate \-\-cache \-L 100G \-n my_lv vg/my_lv_cachepool /dev/slow1
-
-If there is an existing logical volume, create the small and fast
-cache pool LV and link it to the supplied existing logical
-volume (i.e. the origin LV), creating a cache LV.
-.sp
-.B lvcreate \-\-type cache \-L 1G \-n my_lv_cachepool vg/my_lv /dev/fast1
-
-.\" Create a 1G cached LV "lvol1" with 10M cache pool "vg00/pool".
-.\" .sp
-.\" .B lvcreate \-\-cache \-L 1G \-n lv \-\-pooldatasize 10M vg00/pool
-.
-.SH SEE ALSO
-.
-.nh
-.BR lvm (8),
-.BR lvm.conf (5),
-.BR lvmcache (7),
-.BR lvmthin (7),
-.BR lvconvert (8),
-.BR lvchange (8),
-.BR lvextend (8),
-.BR lvreduce (8),
-.BR lvremove (8),
-.BR lvrename (8)
-.BR lvs (8),
-.BR lvscan (8),
-.BR vgcreate (8),
-.BR blkid (8)
diff --git a/man/lvdisplay.8.des b/man/lvdisplay.8.des
new file mode 100644
index 0000000..48552cc
--- /dev/null
+++ b/man/lvdisplay.8.des
@@ -0,0 +1,5 @@
+lvdisplay shows the attributes of LVs, like size, read/write status,
+snapshot information, etc.
+
+\fBlvs\fP(8) is a preferred alternative that shows the same information
+and more, using a more compact and configurable output format.
diff --git a/man/lvdisplay.8.in b/man/lvdisplay.8.in
deleted file mode 100644
index e8e7809..0000000
--- a/man/lvdisplay.8.in
+++ /dev/null
@@ -1,134 +0,0 @@
-.TH LVDISPLAY 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvdisplay \(em display attributes of a logical volume
-.SH SYNOPSIS
-.B lvdisplay
-.RB [ \-a | \-\-all ]
-.RB [ \-c | \-\-colon ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoreskippedcluster ]
-.RB [ \-\-maps ]
-.RB [ \-\-nosuffix ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RI [ VolumeGroupName | LogicalVolume { Name | Path }\ ...]
-.br
-
-.B lvdisplay
-.BR \-C | \-\-columns
-.RB [ \-\-aligned ]
-.RB [ \-\-binary ]
-.RB [ \-a | \-\-all ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [[ \-\-configreport
-.IR ReportName ]
-.RB [ \-o | \-\-options
-.RI [ + | \- | # ] Field1 [, Field2 ...]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [, Key2 ...]]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB ...]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoreskippedcluster ]
-.RB [ \-\-logonly ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-segments ]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RI [ VolumeGroupName | LogicalVolume { Name | Path }\ ...]
-.SH DESCRIPTION
-lvdisplay allows you to see the attributes of a logical volume
-like size, read/write status, snapshot information etc.
-.P
-\fBlvs\fP(8) is an alternative that provides the same information
-in the style of \fBps\fP(1).
-\fBlvs\fP(8) is recommended over \fBlvdisplay\fP.
-
-.SH OPTIONS
-See \fBlvm\fP(8) for common options and \fBlvs\fP for options given with
-\fB\-\-columns\fP.
-.TP
-.B \-\-all
-Include information in the output about internal Logical Volumes that
-are components of normally-accessible Logical Volumes, such as mirrors,
-but which are not independently accessible (e.g. not mountable).
-For example, after creating a mirror using
-\fBlvcreate \-m1 \-\-mirrorlog disk\fP,
-this option will reveal three internal Logical Volumes, with suffixes
-mimage_0, mimage_1, and mlog.
-.TP
-.BR \-C ", " \-\-columns
-Display output in columns, the equivalent of \fBlvs\fP(8).
-Options listed are the same as options given in \fBlvs\fP(8).
-.TP
-.BR \-c ", " \-\-colon
-Generate colon separated output for easier parsing in scripts or programs.
-N.B. \fBlvs\fP(8) provides considerably more control over the output.
-.nf
-
-The values are:
-
-\(bu logical volume name
-\(bu volume group name
-\(bu logical volume access
-\(bu logical volume status
-\(bu internal logical volume number
-\(bu open count of logical volume
-\(bu logical volume size in sectors
-\(bu current logical extents associated to logical volume
-\(bu allocated logical extents of logical volume
-\(bu allocation policy of logical volume
-\(bu read ahead sectors of logical volume
-\(bu major device number of logical volume
-\(bu minor device number of logical volume
-
-.fi
-.TP
-.BR \-m ", " \-\-maps
-Display the mapping of logical extents to physical volumes and
-physical extents. To map physical extents
-to logical extents use:
-.B pvs \-\-segments \-o+lv_name,seg_start_pe,segtype
-.SH Examples
-Shows attributes of that logical volume. If snapshot
-logical volumes have been created for this original logical volume,
-this command shows a list of all snapshot logical volumes and their
-status (active or inactive) as well:
-.sp
-.B lvdisplay \-v vg00/lvol2
-
-Shows the attributes of this snapshot logical volume and also which
-original logical volume it is associated with:
-.sp
-.B lvdisplay vg00/snapshot
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvcreate (8),
-.BR lvs (8),
-.BR lvscan (8),
-.BR pvs (8)
diff --git a/man/lvextend.8.des b/man/lvextend.8.des
new file mode 100644
index 0000000..2a3781d
--- /dev/null
+++ b/man/lvextend.8.des
@@ -0,0 +1,5 @@
+lvextend extends the size of an LV. This requires allocating logical
+extents from the VG's free physical extents. A copy\-on\-write snapshot LV
+can also be extended to provide more space to hold COW blocks. Use
+\fBlvconvert\fP(8) to change the number of data images in a RAID or
+mirrored LV.
diff --git a/man/lvextend.8.end b/man/lvextend.8.end
new file mode 100644
index 0000000..6d197de
--- /dev/null
+++ b/man/lvextend.8.end
@@ -0,0 +1,16 @@
+.SH EXAMPLES
+
+Extend the size of an LV by 54MiB, using a specific PV.
+.br
+.B lvextend \-L +54 vg01/lvol10 /dev/sdk3
+
+Extend the size of an LV by the amount of free
+space on PV /dev/sdk3. This is equivalent to specifying
+"\-l +100%PVS" on the command line.
+.br
+.B lvextend vg01/lvol01 /dev/sdk3
+
+Extend an LV by 16MiB using specific physical extents.
+.br
+.B lvextend \-L+16m vg01/lvol01 /dev/sda:8\-9 /dev/sdb:8\-9
+
diff --git a/man/lvextend.8.in b/man/lvextend.8.in
deleted file mode 100644
index eefbf79..0000000
--- a/man/lvextend.8.in
+++ /dev/null
@@ -1,134 +0,0 @@
-.TH LVEXTEND 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvextend \(em extend the size of a logical volume
-.SH SYNOPSIS
-.B lvextend
-.RB [ \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-f | \-\-force ]
-.RB [ \-i | \-\-stripes
-.I Stripes
-.RB [ \-I | \-\-stripesize
-.IR StripeSize ]]
-.RB { \-l | \-\-extents
-.RI [ + ] LogicalExtentsNumber [ % { VG | LV | PVS | FREE | ORIGIN }]
-|
-.BR \-L | \-\-size
-.RI [ + ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]}
-.RB [ \-n | \-\-nofsck ]
-.RB [ \-\-noudevsync]
-.RB [ \-r | \-\-resizefs ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-use\-policies ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.I LogicalVolumePath
-.RI [ PhysicalVolumePath [ :PE [ \-PE ]]...]
-.SH DESCRIPTION
-lvextend allows you to extend the size of a logical volume.
-Extension of snapshot logical volumes (see
-.BR lvcreate (8)
-for information to create snapshots) is supported as well.
-But to change the number of copies in a mirrored logical
-volume use
-.BR lvconvert (8).
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-f ", " \-\-force
-Proceed with size extension without prompting.
-.TP
-.IR \fB\-l ", " \fB\-\-extents " [" + ] LogicalExtentsNumber [ % { VG | LV | PVS | FREE | ORIGIN }]
-Extend or set the logical volume size in units of logical extents.
-With the '\fI+\fP' sign the value is added to the actual size
-of the logical volume and without it, the value is taken as an absolute one.
-The total number of physical extents allocated will be
-greater than this, for example, if the volume is mirrored.
-The number can also be expressed as a percentage of the total space
-in the Volume Group with the suffix \fI%VG\fP, relative to the existing
-size of the Logical Volume with the suffix \fI%LV\fP, of the remaining
-free space for the specified PhysicalVolume(s) with the suffix \fI%PVS\fP,
-as a percentage of the remaining free space in the Volume Group
-with the suffix \fI%FREE\fP, or (for a snapshot) as a percentage of the total
-space in the Origin Logical Volume with the suffix \fI%ORIGIN\fP.
-The resulting value is rounded upward.
-N.B. In a future release, when expressed as a percentage with PVS, VG or FREE,
-the number will be treated as an approximate upper limit for the total number
-of physical extents to be allocated (including extents used by any mirrors, for
-example). The code may currently allocate more space than you might otherwise
-expect.
-.TP
-.IR \fB\-L ", " \fB\-\-size " [" + ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]
-Extend or set the logical volume size in units of megabytes.
-A size suffix of M for megabytes,
-G for gigabytes, T for terabytes, P for petabytes
-or E for exabytes is optional.
-With the + sign the value is added to the actual size
-of the logical volume and without it, the value is taken as an absolute one.
-.TP
-.BR \-i ", " \-\-stripes " " \fIStripes
-Gives the number of stripes for the extension.
-Not applicable to LVs using the original metadata LVM format, which must
-use a single value throughout.
-.TP
-.BR \-I ", " \-\-stripesize " " \fIStripeSize
-Gives the number of kilobytes for the granularity of the stripes.
-Not applicable to LVs using the original metadata LVM format, which must
-use a single value throughout.
-.br
-StripeSize must be 2^n (n = 2 to 9)
-.TP
-.BR \-n ", " \-\-nofsck
-Do not perform fsck before extending filesystem when filesystem
-requires it. You may need to use \fB\-\-force\fR to proceed with
-this option.
-.TP
-.B \-\-noudevsync
-Disable udev synchronisation. The
-process will not wait for notification from udev.
-It 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.
-.TP
-.BR \-r ", " \-\-resizefs
-Resize underlying filesystem together with the logical volume using
-\fBfsadm\fR(8).
-.TP
-.B \-\-use\-policies
-Resizes the logical volume according to configured policy. See
-\fBlvm.conf\fR(5) for some details.
-
-.SH Examples
-Extends the size of the logical volume "vg01/lvol10" by 54MiB on physical
-volume /dev/sdk3. This is only possible if /dev/sdk3 is a member of
-volume group vg01 and there are enough free physical extents in it:
-.sp
-.B lvextend \-L +54 /dev/vg01/lvol10 /dev/sdk3
-
-Extends the size of logical volume "vg01/lvol01" by the amount of free
-space on physical volume /dev/sdk3. This is equivalent to specifying
-"\-l +100%PVS" on the command line:
-.sp
-.B lvextend /dev/vg01/lvol01 /dev/sdk3
-
-Extends a logical volume "vg01/lvol01" by 16MiB using physical extents
-/dev/sda:8\-9 and /dev/sdb:8\-9 for allocation of extents:
-.sp
-.B lvextend -L+16M vg01/lvol01 /dev/sda:8\-9 /dev/sdb:8\-9
-
-.SH SEE ALSO
-.BR fsadm (8),
-.BR lvm (8),
-.BR lvm.conf (5),
-.BR lvcreate (8),
-.BR lvconvert (8),
-.BR lvreduce (8),
-.BR lvresize (8),
-.BR lvchange (8)
diff --git a/man/lvm-config.8.des b/man/lvm-config.8.des
new file mode 100644
index 0000000..1d36566
--- /dev/null
+++ b/man/lvm-config.8.des
@@ -0,0 +1,5 @@
+This command is the same as \fBlvmconfig\fP(8).
+
+lvm config produces formatted output from the LVM configuration tree. The
+sources of the configuration data include \fBlvm.conf\fP(5) and command
+line settings from \-\-config.
diff --git a/man/lvm-config.8.in b/man/lvm-config.8.in
deleted file mode 100644
index 5050d77..0000000
--- a/man/lvm-config.8.in
+++ /dev/null
@@ -1 +0,0 @@
-.so man8/lvmconfig.8
diff --git a/man/lvm-dumpconfig.8.des b/man/lvm-dumpconfig.8.des
new file mode 100644
index 0000000..18593fb
--- /dev/null
+++ b/man/lvm-dumpconfig.8.des
@@ -0,0 +1,5 @@
+This command is the same as \fBlvmconfig\fP(8).
+
+lvm dumpconfig produces formatted output from the LVM configuration tree. The
+sources of the configuration data include \fBlvm.conf\fP(5) and command
+line settings from \-\-config.
diff --git a/man/lvm-dumpconfig.8.in b/man/lvm-dumpconfig.8.in
deleted file mode 100644
index 5050d77..0000000
--- a/man/lvm-dumpconfig.8.in
+++ /dev/null
@@ -1 +0,0 @@
-.so man8/lvmconfig.8
diff --git a/man/lvm-fullreport.8.des b/man/lvm-fullreport.8.des
new file mode 100644
index 0000000..f350a0a
--- /dev/null
+++ b/man/lvm-fullreport.8.des
@@ -0,0 +1,6 @@
+lvm fullreport produces formatted output about PVs, PV segments, VGs, LVs
+and LV segments. The information is all gathered together for each VG
+(under a per-VG lock) so it is consistent. Information gathered from
+separate calls to \fBvgs\fP, \fBpvs\fP, and \fBlvs\fP can be inconsistent
+if information changes between commands.
+
diff --git a/man/lvm-fullreport.8.in b/man/lvm-fullreport.8.in
deleted file mode 100644
index 96ac937..0000000
--- a/man/lvm-fullreport.8.in
+++ /dev/null
@@ -1,145 +0,0 @@
-.TH LVM-FULLREPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc" \" -*- nroff -*-
-.SH NAME
-lvm fullreport \(em Report information about PVs, PV segments, VGs, LVs and LV segments, all at once for each VG.
-.SH SYNOPSIS
-.B lvm fullreport
-.RB [ \-a | \-\-all ]
-.RB [ \-\-aligned ]
-.RB [ \-\-binary ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [[ \-\-configreport
-.IR ReportName ]
-.RB [ \-o | \-\-options
-.RI [ + | \- | # ] Field1 [, Field2 ...]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [, Key2 ...]]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB ...]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoreskippedcluster ]
-.RB [ \-\-logonly ]
-.RB [ \-\-nameprefixes ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-rows ]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-\-unquoted ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RI [ VolumeGroupName
-.RI [ VolumeGroupName ...]]
-.SH DESCRIPTION
-lvm fullreport produces formatted output about PVs, PV segments, VGs, LVs
-and LV segments, all at once for each VG and guarded by per-VG lock
-for consistency.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.B \-\-all
-Include information in the output about internal Logical Volumes that
-are components of normally-accessible Logical Volumes, such as mirrors,
-but which are not independently accessible (e.g. not mountable).
-The names of such Logical Volumes are enclosed within square brackets
-in the output. For example, after creating a mirror using
-.B lvcreate -m1 \-\-mirrorlog disk
-, this option will reveal three internal Logical
-Volumes, with suffixes mimage_0, mimage_1, and mlog.
-.TP
-.B \-\-aligned
-Use with \fB\-\-separator\fP to align the output columns.
-.TP
-.B \-\-binary
-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).
-.TP
-.B \-\-configreport \fI ReportName
-Make any subsequent \fB\-o, \-\-options\fP, \fB\-O, \-\-sort\fP or
-\fB\-S, \-\-select\fP to apply for \fIReportName\fP where \fIReportName\fP
-is 'pv' for PV subreport, 'pvseg' for PV segment subreport, 'vg' for
-VG subreport, 'lv' for LV subreport, 'seg' for LV segment subreport or 'log'
-for log report. If \fB\-\-configreport\fP option is not used to identify a
-report, then all command's subreports are assumed except log report. The log
-report is available only if enabled by \fBlog/report_command_log\fP
-\fBlvm.conf\fP(5) setting or if \fB\-\-logonly\fP option is used.
-.TP
-.B \-\-logonly
-Suppress the main report itself and display only log report on output.
-.TP
-.B \-\-nameprefixes
-Add an "LVM2_" prefix plus the field name to the output. Useful
-with \fB\-\-noheadings\fP to produce a list of field=value pairs that can
-be used to set environment variables (for example, in \fBudev\fP(7) rules).
-.TP
-.B \-\-noheadings
-Suppress the headings line that is normally the first line of output.
-Useful if grepping the output.
-.TP
-.B \-\-nosuffix
-Suppress the suffix on output sizes. Use with \fB\-\-units\fP
-(except h and H) if processing the output.
-.TP
-.BR \-o ", " \-\-options
-Comma-separated ordered list of columns.
-.IP
-Precede the list with '\fI+\fP' to append to the current list
-of columns, '\fI-\fP' to remove from the current list of columns
-or '\fI#\fP' to compact given columns. The \fI\-o\fP option can
-be repeated, providing several lists. These lists are evaluated
-from left to right.
-.IP
-For the list of columns, see \fBpvs\fP(8), \fBvgs\fP(8),
-\fBlvs\fP(8) man page or check \fBpvs\fP, \fBvgs\fP, \fBlvs -o help\fP
-output.
-.TP
-.BR \-O ", " \-\-sort
-Comma-separated ordered list of columns to sort by. Replaces the default
-selection. Precede any column with '\fI\-\fP' for a reverse sort on that
-column.
-.TP
-.B \-\-rows
-Output columns as rows.
-.TP
-.BR \-S ", " \-\-select " " \fISelection
-Display only rows that match Selection criteria. All rows are displayed with
-the additional "selected" column (\fB-o selected\fP) showing 1 if the row
-matches the Selection and 0 otherwise. The Selection criteria are defined
-by specifying column names and their valid values (that can include reserved
-values) while making use of supported comparison operators. See \fBlvm\fP(8)
-and \fB\-S\fP, \fB\-\-select\fP description for more detailed information
-about constructing the Selection criteria. As a quick help and to see full
-list of column names that can be used in Selection including the list of
-reserved values and the set of supported selection operators, check the
-output of \fBpvs\fP, \fBvgs\fP, \fBlvs -S help\fP command.
-.TP
-.B \-\-separator \fISeparator
-String to use to separate each column. Useful if grepping the output.
-.TP
-.B \-\-unbuffered
-Produce output immediately without sorting or aligning the columns properly.
-.TP
-.B \-\-units \fIhHbBsSkKmMgGtTpPeE
-All sizes are output in these units: (h)uman-readable, (b)ytes, (s)ectors,
-(k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes.
-Capitalise to use multiples of 1000 (S.I.) instead of 1024. Can also specify
-custom units e.g. \-\-units 3M
-.TP
-.B \-\-unquoted
-When used with \fB\-\-nameprefixes\fP, output values in the field=value
-pairs are not quoted.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvs (8),
-.BR vgs (8),
-.BR lvs (8)
diff --git a/man/lvm-lvpoll.8.des b/man/lvm-lvpoll.8.des
new file mode 100644
index 0000000..35c2522
--- /dev/null
+++ b/man/lvm-lvpoll.8.des
@@ -0,0 +1,4 @@
+lvm lvpoll is an internal command used by \fBlvmpolld\fP(8) to monitor and
+complete \fBlvconvert\fP(8) and \fBpvmove\fP(8) operations. lvpoll itself
+does not initiate these operations and should not normally need to be run
+directly.
diff --git a/man/lvm-lvpoll.8.end b/man/lvm-lvpoll.8.end
new file mode 100644
index 0000000..eddb364
--- /dev/null
+++ b/man/lvm-lvpoll.8.end
@@ -0,0 +1,33 @@
+.SH NOTES
+
+To find the name of the pvmove LV that was created by an original
+\fBpvmove /dev/name\fP command, use the command:
+.br
+\fBlvs -a -S move_pv=/dev/name\fP.
+
+.SH EXAMPLES
+
+Continue polling a pvmove operation.
+.br
+.B lvm lvpoll --polloperation pvmove vg00/pvmove0
+
+Abort a pvmove operation.
+.br
+.B lvm lvpoll --polloperation pvmove --abort vg00/pvmove0
+
+Continue polling a mirror conversion.
+.br
+.B lvm lvpoll --polloperation convert vg00/lvmirror
+
+Continue mirror repair.
+.br
+.B lvm lvpoll --polloperation convert vg/damaged_mirror --handlemissingpvs
+
+Continue snapshot merge.
+.br
+.B lvm lvpoll --polloperation merge vg/snapshot_old
+
+Continue thin snapshot merge.
+.br
+.B lvm lvpoll --polloperation merge_thin vg/thin_snapshot
+
diff --git a/man/lvm-lvpoll.8.in b/man/lvm-lvpoll.8.in
deleted file mode 100644
index 8ffbdd4..0000000
--- a/man/lvm-lvpoll.8.in
+++ /dev/null
@@ -1,89 +0,0 @@
-.TH "LVPOLL" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" \" -*- nroff -*-
-.SH NAME
-lvpoll \(em Internal command used by lvmpolld to complete some Logical Volume operations.
-
-.SH SYNOPSIS
-.B lvm lvpoll
-.BR \-\-polloperation
-.RI { pvmove | convert | merge | merge_thin }
-.RB [ \-\-abort ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-handlemissingpvs ]
-.RB [ \-i | \-\-interval
-.IR Seconds ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.IR LogicalVolume [ Path ]
-.SH DESCRIPTION
-\fBlvpoll\fP is an internal command used by \fBlvmpolld\fP(8) to monitor and
-complete \fBlvconvert\fP(8) and \fBpvmove\fP(8) operations.
-\fBlvpoll\fP itself does not initiate these operations and
-you should never normally need to invoke it directly.
-
-.I LogicalVolume
-The Logical Volume undergoing conversion or, in the case of pvmove, the name of
-the internal pvmove Logical Volume (see \fBEXAMPLES\fP).
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-\-polloperation " {" \fIconvert | \fImerge | \fImerge_thin | \fIpvmove }
-Mandatory option.
-\fIpvmove\fP refers to a pvmove operation that is moving data.
-\fIconvert\fP refers to an operation that is increasing the number of redundant copies of data maintained by a mirror.
-\fImerge\fP indicates a merge operation that doesn't involve thin volumes.
-\fImerge_thin\fP indicates a merge operation involving thin snapshots.
-\fBpvmove\fP(8) and \fBlvconvert\fP(8) describe how to initiate these operations.
-.TP
-.B \-\-abort
-Abort pvmove in progress. See \fBpvmove\fP(8).
-.TP
-.B \-\-handlemissingpvs
-Used when the polling operation needs to handle missing PVs to be able to
-continue. This can happen when \fBlvconvert\fP(8) is repairing a mirror
-with one or more faulty devices.
-.TP
-.BR \-i ", " \-\-interval " "\fISeconds
-Report progress at regular intervals
-
-.SH EXAMPLES
-Resume polling of a pvmove operation identified by the Logical Volume vg00/pvmove0:
-.sp
-.B lvm lvpoll --polloperation pvmove vg00/pvmove0
-.P
-Abort the same pvmove operation:
-.sp
-.B lvm lvpoll --polloperation pvmove --abort vg00/pvmove0
-.P
-To find out the name of the pvmove Logical Volume resulting from an original
-\fBpvmove /dev/sda1\fP command you may use the following \fBlvs\fP command.
-(Remove the parentheses from the LV name.)
-.sp
-.B lvs -a -S move_pv=/dev/sda1
-.P
-Resume polling of mirror conversion vg00/lvmirror:
-.sp
-.B lvm lvpoll --polloperation convert vg00/lvmirror
-.P
-Complete mirror repair:
-.sp
-.B lvm lvpoll --polloperation convert vg/damaged_mirror --handlemissingpvs
-.P
-Process snapshot merge:
-.sp
-.B lvm lvpoll --polloperation merge vg/snapshot_old
-.P
-Finish thin snapshot merge:
-.sp
-.B lvm lvpoll --polloperation merge_thin vg/thin_snapshot
-.SH SEE ALSO
-.BR lvconvert (8),
-.BR lvm (8),
-.BR lvmpolld (8),
-.BR lvs (8),
-.BR pvmove (8)
diff --git a/man/lvmchange.8.in b/man/lvmchange.8.in
deleted file mode 100644
index dc6b3bd..0000000
--- a/man/lvmchange.8.in
+++ /dev/null
@@ -1,10 +0,0 @@
-.TH LVMCHANGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvmchange \(em change attributes of the logical volume manager
-.SH SYNOPSIS
-.B lvmchange
-.SH DESCRIPTION
-lvmchange is not currently supported under LVM2, although
-\fBdmsetup\fP(8) has a \fBremove_all\fP command.
-.SH SEE ALSO
-.BR dmsetup (8)
diff --git a/man/lvmconfig.8.des b/man/lvmconfig.8.des
new file mode 100644
index 0000000..17f9f18
--- /dev/null
+++ b/man/lvmconfig.8.des
@@ -0,0 +1,3 @@
+lvmconfig produces formatted output from the LVM configuration tree. The
+sources of the configuration data include \fBlvm.conf\fP(5) and command
+line settings from \-\-config.
diff --git a/man/lvmconfig.8.in b/man/lvmconfig.8.in
deleted file mode 100644
index f4b6abd..0000000
--- a/man/lvmconfig.8.in
+++ /dev/null
@@ -1,225 +0,0 @@
-.TH "LVMCONFIG" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
-.SH "NAME"
-lvmconfig, lvm dumpconfig, lvm config \(em Display LVM configuration
-.SH SYNOPSIS
-.
-.ad l
-.B lvmconfig
-.RB [ \-f | \-\-file
-.IR Filename ]
-.RB [ \-\-type
-.RB { current | default | diff | full |\: list | missing | new \c
-.RB | profilable | profilable-command | profilable-metadata }]
-.RB [ \-\-atversion
-.IR Version ]
-.RB [ \-\-sinceversion
-.IR Version ]
-.RB [ \-\-ignoreadvanced ]
-.RB [ \-\-ignoreunsupported ]
-.RB [ \-\-ignorelocal ]
-.RB [ \-l | \-\-list ]
-.RB [ \-\-config
-.IR ConfigurationString ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-\-profile
-.IR ProfileName ]
-.RB [ \-\-metadataprofile
-.IR ProfileName ]
-.RB [ \-\-mergedconfig ]
-.RB [ \-\-showdeprecated ]
-.RB [ \-\-showunsupported ]
-.RB [ \-\-validate ]
-.RB [ \-\-withsummary ]
-.RB [ \-\-withcomments ]
-.RB [ \-\-withspaces ]
-.RB [ \-\-withversions ]
-.RB [ ConfigurationNode... ]
-.ad b
-.
-.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
-.BR \-l ", " \-\-list
-List configuration settings with summarizing comment. This is the same as using
-\fBlvmconfig --type list --withsummary\fP.
-
-.TP
-.BR \-\-type " {" current | default | diff | full | missing | new | profilable |\: profilable-command | profilable-metadata }
-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 \fBcurrent\fP 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 \fBdefault\fP 3
-Display all possible configuration settings with default values assigned.
-.IP \fBdiff\fP 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.
-Using this type also implies the use of \fB\-\-mergedconfig\fP option.
-This is actually minimal LVM configuration which can be used without
-a change to current configured behaviour.
-.IP \fBfull\fP 3
-Display full configuration tree - a combination of current configuration tree
-(\fB\-\-type current\fP) and tree of settings for which default values are
-used (\fB\-\-type missing\fP). This is exactly the configuration tree that
-LVM2 uses during command execution. Using this type also implies
-the use of \fB\-\-mergedconfig\fP option. If comments are displayed
-(see \fB\-\-withcomments\fP and \fB\-\-withsummary\fP options), then
-for each setting found in existing configuration and for which defaults
-are not used, there's an extra comment line printed to denote this.
-.IP \fBlist\fP 3
-Display plain list of configuration settings.
-.IP \fBmissing\fP 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 \fBnew\fP 3
-Display all new configuration settings introduced in current LVM version
-or specific version as defined by \fB\-\-atversion\fP option.
-.IP \fBprofilable\fP 3
-Display all profilable configuration settings with default values assigned.
-See \fBlvm.conf\fP(5) for more info about \fBprofile config\fP method.
-.IP \fBprofilable-command\fP 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 \fBprofilable-metadata\fP 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
-.BI \-\-sinceversion " 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).
-This option is currently applicable only with \fB\-\-type new\fP
-to display all configuration settings introduced since given version.
-
-.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 and 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 output by default,
-all the other types ignore unsupported settings.
-
-.TP
-.B \-\-ignorelocal
-Ignore local section.
-
-.TP
-.BI \-\-config " ConfigurationString"
-Use \fIConfigurationString\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 \fIProfileName\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 \fIProfileName\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 \-\-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
-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
-output by default, all the other types ignore unsupported settings.
-
-.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 \-\-withsummary
-Display a one line comment for each configuration node.
-
-.TP
-.B \-\-withcomments
-Display a full comment for each configuration node. For deprecated
-settings, also display comments about deprecation in addition.
-
-.TP
-.B \-\-withspaces
-Where appropriate, add more spaces in output for better readability.
-
-.TP
-.B \-\-withversions
-Also display a comment containing the version of introduction for
-each configuration node. If the setting is deprecated, also display
-the version since which it is deprecated.
-
-.SH SEE ALSO
-.BR lvm (8)
-.BR lvmconf (8)
-.BR lvm.conf (5)
diff --git a/man/lvmdiskscan.8.des b/man/lvmdiskscan.8.des
new file mode 100644
index 0000000..c1e87cc
--- /dev/null
+++ b/man/lvmdiskscan.8.des
@@ -0,0 +1,7 @@
+lvmdiskscan scans all SCSI, (E)IDE disks, multiple devices and a bunch of
+other block devices in the system looking for LVM PVs. The size reported
+is the real device size. Define a filter in \fBlvm.conf\fP(5) to restrict
+the scan to avoid a CD ROM, for example.
+
+This command is deprecated, use \fBpvs\fP instead.
+
diff --git a/man/lvmdiskscan.8.in b/man/lvmdiskscan.8.in
deleted file mode 100644
index 6de34c1..0000000
--- a/man/lvmdiskscan.8.in
+++ /dev/null
@@ -1,27 +0,0 @@
-.TH LVMDISKSCAN 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvmdiskscan \(em scan for all devices visible to LVM2
-.SH SYNOPSIS
-.B lvmdiskscan
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-l | \-\-lvmpartition ]
-.RB [ \-v | \-\-verbose ]
-.SH DESCRIPTION
-lvmdiskscan scans all SCSI, (E)IDE disks, multiple devices and a bunch
-of other block devices in the system looking for LVM physical volumes.
-The size reported is the real device size.
-Define a filter in \fBlvm.conf\fP(5) to restrict
-the scan to avoid a CD ROM, for example.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-l ", " \-\-lvmpartition
-Only reports Physical Volumes.
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvm.conf (5),
-.BR pvscan (8),
-.BR vgscan (8)
diff --git a/man/lvmlockd.8.in b/man/lvmlockd.8.in
index f01c695..6e9b703 100644
--- a/man/lvmlockd.8.in
+++ b/man/lvmlockd.8.in
@@ -573,25 +573,37 @@ To place the lvmlock LV on a specific device, create the VG with only that
device, then use vgextend to add other devices.
-.SS shared LVs
-
-When an LV is used concurrently from multiple hosts (e.g. by a
-multi\-host/cluster application or file system), the LV can be activated
-on multiple hosts concurrently using a shared lock.
-
-To activate the LV with a shared lock: lvchange \-asy vg/lv.
-
-With lvmlockd, an unspecified activation mode is always exclusive, i.e.
-\-ay defaults to \-aey.
-
-If the LV type does not allow the LV to be used concurrently from multiple
-hosts, then a shared activation lock is not allowed and the lvchange
-command will report an error. LV types that cannot be used concurrently
+.SS LV activation
+
+In a shared VG, activation changes involve locking through lvmlockd, and
+the following values are possible with lvchange/vgchange -a:
+
+.IP \fBy\fP|\fBey\fP
+The command activates the LV in exclusive mode, allowing a single host
+to activate the LV. Before activating the LV, the command uses lvmlockd
+to acquire an exclusive lock on the LV. If the lock cannot be acquired,
+the LV is not activated and an error is reported. This would happen if
+the LV is active on another host.
+
+.IP \fBsy\fP
+The command activates the LV in shared mode, allowing multiple hosts to
+activate the LV concurrently. Before activating the LV, the
+command uses lvmlockd to acquire a shared lock on the LV. If the lock
+cannot be acquired, the LV is not activated and an error is reported.
+This would happen if the LV is active exclusively on another host. If the
+LV type prohibits shared access, such as a snapshot, the command will
+report an error and fail.
+The shared mode is intended for a multi\-host/cluster application or
+file system.
+LV types that cannot be used concurrently
from multiple hosts include thin, cache, raid, mirror, and snapshot.
-
lvextend on LV with shared locks is not yet allowed. The LV must be
deactivated, or activated exclusively to run lvextend.
+.IP \fBn\fP
+The command deactivates the LV. After deactivating the LV, the command
+uses lvmlockd to release the current lock on the LV.
+
.SS recover from lost PV holding sanlock locks
diff --git a/man/lvmsadc.8.des b/man/lvmsadc.8.des
new file mode 100644
index 0000000..e4cfd8d
--- /dev/null
+++ b/man/lvmsadc.8.des
@@ -0,0 +1,3 @@
+lvmsadc is not currently supported in LVM. The device-mapper statistics
+facility provides similar performance metrics using the \fBdmstats(8)\fP
+command.
diff --git a/man/lvmsadc.8.in b/man/lvmsadc.8.in
deleted file mode 100644
index 81d2b66..0000000
--- a/man/lvmsadc.8.in
+++ /dev/null
@@ -1,16 +0,0 @@
-.TH "LVMSADC" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
-
-.SH "NAME"
-lvmsadc \(em LVM system activity data collector
-
-.SH "SYNOPSIS"
-.B lvmsadc
-
-.SH "DESCRIPTION"
-lvmsadc is not currently supported under LVM2: the device-mapper statistics
-facility provides similar performance metrics using the \fBdmstats(8)\fP
-command.
-
-.SH "SEE ALSO"
-.BR dmstats (8)
-.BR lvm (8)
diff --git a/man/lvmsar.8.des b/man/lvmsar.8.des
new file mode 100644
index 0000000..3177506
--- /dev/null
+++ b/man/lvmsar.8.des
@@ -0,0 +1,3 @@
+lvmsar is not currently supported in LVM. The device-mapper statistics
+facility provides similar performance metrics using the \fBdmstats(8)\fP
+command.
diff --git a/man/lvmsar.8.in b/man/lvmsar.8.in
deleted file mode 100644
index fca111f..0000000
--- a/man/lvmsar.8.in
+++ /dev/null
@@ -1,16 +0,0 @@
-.TH "LVMSAR" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
-
-.SH "NAME"
-lvmsar \(em LVM system activity reporter
-
-.SH "SYNOPSIS"
-.B lvmsar
-
-.SH "DESCRIPTION"
-lvmsar is not currently supported under LVM2: the device-mapper statistics
-facility provides similar performance metrics using the \fBdmstats(8)\fP
-command.
-
-.SH "SEE ALSO"
-.BR dmstats (8)
-.BR lvm (8)
diff --git a/man/lvreduce.8.des b/man/lvreduce.8.des
new file mode 100644
index 0000000..7f0ba0c
--- /dev/null
+++ b/man/lvreduce.8.des
@@ -0,0 +1,14 @@
+lvreduce reduces the size of an LV. The freed logical extents are returned
+to the VG to be used by other LVs. A copy\-on\-write snapshot LV can also
+be reduced if less space is needed to hold COW blocks. Use
+\fBlvconvert\fP(8) to change the number of data images in a RAID or
+mirrored LV.
+
+Be careful when reducing an LV's size, because data in the reduced area is
+lost. Ensure that any file system on the LV is resized \fBbefore\fP
+running lvreduce so that the removed extents are not in use by the file
+system.
+
+Sizes will be rounded if necessary. For example, the LV size must be an
+exact number of extents, and the size of a striped segment must be a
+multiple of the number of stripes.
diff --git a/man/lvreduce.8.end b/man/lvreduce.8.end
new file mode 100644
index 0000000..59fde52
--- /dev/null
+++ b/man/lvreduce.8.end
@@ -0,0 +1,5 @@
+.SH EXAMPLES
+
+Reduce the size of an LV by 3 logical extents:
+.br
+.B lvreduce \-l \-3 vg00/lvol1
diff --git a/man/lvreduce.8.in b/man/lvreduce.8.in
deleted file mode 100644
index edf0c92..0000000
--- a/man/lvreduce.8.in
+++ /dev/null
@@ -1,110 +0,0 @@
-.TH LVREDUCE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvreduce \(em reduce the size of a logical volume
-.SH SYNOPSIS
-.B lvreduce
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-f | \-\-force ]
-.RB [ \-\-noudevsync ]
-.RB { \-l | \-\-extents
-.RI [ \- ] LogicalExtentsNumber [ % { VG | LV | FREE | ORIGIN }]
-.RB |
-.BR \-L | \-\-size
-.RI [ \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]}
-.RB [ \-n | \-\-nofsck ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-r | \-\-resizefs ]
-.IR LogicalVolume { Name | Path }
-.SH DESCRIPTION
-lvreduce allows you to reduce the size of a logical volume.
-Be careful when reducing a logical volume's size, because data in the
-reduced part is lost!!!
-.br
-You should therefore ensure that any filesystem on the volume is
-resized
-.I before
-running lvreduce so that the extents that are to be removed are not in use.
-.br
-Shrinking snapshot logical volumes (see
-.BR lvcreate (8)
-for information to create snapshots) is supported as well.
-But to change the number of copies in a mirrored logical
-volume use
-.BR lvconvert (8).
-.br
-Sizes will be rounded if necessary - for example, the volume size must
-be an exact number of extents and the size of a striped segment must
-be a multiple of the number of stripes.
-.br
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-f ", " \-\-force
-Force size reduction without prompting even when it may cause data loss.
-.TP
-.IR \fB\-l ", " \fB\-\-extents " [" \- ] LogicalExtentsNumber [ % { VG | LV | FREE | ORIGIN }]
-Reduce or set the logical volume size in units of logical extents.
-With the \fI-\fP sign the value will be subtracted from
-the logical volume's actual size and without it the value will be taken
-as an absolute size.
-The total number of physical extents freed will be greater than this logical
-value if, for example, the volume is mirrored.
-The number can also be expressed as a percentage of the total space
-in the Volume Group with the suffix \fI%VG\fP, relative to the existing
-size of the Logical Volume with the suffix \fI%LV\fP, as a percentage of the
-remaining free space in the Volume Group with the suffix \fI%FREE\fP, or (for
-a snapshot) as a percentage of the total space in the Origin Logical
-Volume with the suffix \fI%ORIGIN\fP.
-The resulting value for the subtraction is rounded downward, for the absolute
-size it is rounded upward.
-N.B. In a future release, when expressed as a percentage with VG or FREE, the
-number will be treated as an approximate total number of physical extents to be
-freed (including extents used by any mirrors, for example). The code may
-currently release more space than you might otherwise expect.
-.TP
-.IR \fB\-L ", " \fB\-\-size " [" \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]
-Reduce or set the logical volume size in units of megabytes.
-A size suffix of \fIk\fP for kilobyte, \fIm\fP for megabyte,
-\fIg\fP for gigabytes, \fIt\fP for terabytes, \fIp\fP for petabytes
-or \fIe\fP for exabytes is optional.
-With the \fI\-\fP sign the value will be subtracted from
-the logical volume's actual size and without it it will be taken as
-an absolute size.
-.TP
-.BR \-n ", " \-\-nofsck
-Do not perform fsck before resizing filesystem when filesystem
-requires it. You may need to use \fB\-\-force\fR to proceed with
-this option.
-.TP
-.BR \-\-noudevsync
-Disable udev synchronisation. The
-process will not wait for notification from udev.
-It 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.
-.TP
-.BR \-r ", " \-\-resizefs
-Resize underlying filesystem together with the logical volume using
-.BR fsadm (8).
-.SH Examples
-Reduce the size of logical volume lvol1 in volume group vg00 by 3 logical extents:
-.sp
-.B lvreduce \-l \-3 vg00/lvol1
-.SH SEE ALSO
-.BR fsadm (8),
-.BR lvchange (8),
-.BR lvconvert (8),
-.BR lvcreate (8),
-.BR lvextend (8),
-.BR lvm (8),
-.BR lvresize (8),
-.BR vgreduce (8)
diff --git a/man/lvremove.8.des b/man/lvremove.8.des
new file mode 100644
index 0000000..d049c63
--- /dev/null
+++ b/man/lvremove.8.des
@@ -0,0 +1,22 @@
+lvremove removes one or more LVs. For standard LVs, this returns the
+logical extents that were used by the LV to the VG for use by other LVs.
+
+Confirmation will be requested before deactivating any active LV prior to
+removal. LVs cannot be deactivated or removed while they are open (e.g.
+if they contain a mounted filesystem). Removing an origin LV will also
+remove all dependent snapshots.
+
+\fBHistorical LVs\fP
+
+If the configuration setting \fBmetadata/record_lvs_history\fP is enabled
+and the LV being removed forms part of the history of at least one LV that
+is still present, then a simplified representation of the LV will be
+retained. This includes the time of removal (\fBlv_time_removed\fP
+reporting field), creation time (\fBlv_time\fP), name (\fBlv_name\fP), LV
+uuid (\fBlv_uuid\fP) and VG name (\fBvg_name\fP). This allows later
+reporting to see the ancestry chain of thin snapshot volumes, even after
+some intermediate LVs have been removed. The names of such historical LVs
+acquire a hyphen as a prefix (e.g. '-lvol1') and cannot be reactivated.
+Use lvremove a second time, with the hyphen, to remove the record of the
+former LV completely.
+
diff --git a/man/lvremove.8.end b/man/lvremove.8.end
new file mode 100644
index 0000000..5c70ed6
--- /dev/null
+++ b/man/lvremove.8.end
@@ -0,0 +1,11 @@
+.SH EXAMPLES
+
+Remove an active LV without asking for confirmation.
+.br
+.B lvremove \-f vg00/lvol1
+
+Remove all LVs the specified VG.
+.br
+.B lvremove vg00
+
+
diff --git a/man/lvremove.8.in b/man/lvremove.8.in
deleted file mode 100644
index fe9375c..0000000
--- a/man/lvremove.8.in
+++ /dev/null
@@ -1,80 +0,0 @@
-.TH LVREMOVE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvremove \(em remove a logical volume
-.SH SYNOPSIS
-.B lvremove
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-nohistory ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-f | \-\-force ]
-.RB [ \-\-noudevsync ]
-.RI [ LogicalVolume { Name | Path }...]
-.SH DESCRIPTION
-lvremove removes one or more logical volumes.
-Confirmation will be requested before deactivating any active logical
-volume prior to removal. Logical volumes cannot be deactivated
-or removed while they are open (e.g. if they contain a mounted filesystem).
-Removing an origin logical volume will also remove all dependent snapshots.
-.sp
-If the logical volume is clustered then it must be deactivated on all
-nodes in the cluster before it can be removed. A single lvchange command
-issued from one node can do this.
-.sp
-If the configuration setting \fBmetadata/record_lvs_history\fP is enabled
-and the logical volume being removed forms part of the history of at least
-one logical volume that is still present then a simplified representation of
-the logical volume will be retained. This includes the time of removal
-(\fBlv_time_removed\fP reporting field), creation time (\fBlv_time\fP), name
-(\fBlv_name\fP), LV uuid (\fBlv_uuid\fP) and VG name (\fBvg_name\fP) and
-allows you to see the ancestry chain of thin snapshot volumes even after
-some intermediate logical volumes have been removed.
-The names of such historical logical volumes acquire a hyphen as a prefix
-(e.g. '-lvol1') and cannot be reactivated. Use lvremove a second time,
-with the hyphen, to remove the record of the former logical volume completely.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-f ", " \-\-force
-Remove active logical volumes without confirmation.
-Tool will try to deactivate \fIunused\fP volume.
-To proceed with damaged pools use \-ff
-.TP
-.B \-\-nohistory
-Disable the recording of history of logical volumes which are being removed.
-(This has no effect unless the configuration setting
-\fBmetadata/record_lvs_history\fP is enabled.)
-.TP
-.B \-\-noudevsync
-Disable udev synchronisation. The
-process will not wait for notification from udev.
-It 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.
-.SH Examples
-Remove the active logical volume lvol1 in volume group vg00
-without asking for confirmation:
-.sp
-.B lvremove \-f vg00/lvol1
-.sp
-Remove all logical volumes in volume group vg00:
-.sp
-.B lvremove vg00
-.SH SEE ALSO
-.BR lvcreate (8),
-.BR lvdisplay (8),
-.BR lvchange (8),
-.BR lvm (8),
-.BR lvs (8),
-.BR lvscan (8),
-.BR vgremove (8)
diff --git a/man/lvrename.8.des b/man/lvrename.8.des
new file mode 100644
index 0000000..a8455fc
--- /dev/null
+++ b/man/lvrename.8.des
@@ -0,0 +1,2 @@
+lvrename renames an existing LV or a historical LV (see \fBlvremove\fP for
+historical LV information.)
diff --git a/man/lvrename.8.end b/man/lvrename.8.end
new file mode 100644
index 0000000..3409b8a
--- /dev/null
+++ b/man/lvrename.8.end
@@ -0,0 +1,10 @@
+.SH EXAMPLES
+
+Rename "lvold" to "lvnew":
+.br
+.B lvrename /dev/vg02/lvold vg02/lvnew
+
+An alternate syntax to rename "lvold" to "lvnew":
+.br
+.B lvrename vg02 lvold lvnew
+
diff --git a/man/lvrename.8.in b/man/lvrename.8.in
deleted file mode 100644
index de6e519..0000000
--- a/man/lvrename.8.in
+++ /dev/null
@@ -1,51 +0,0 @@
-.TH LVRENAME 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvrename \(em rename a logical volume
-.SH SYNOPSIS
-.B lvrename
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-f | \-\-force ]
-.RB [ \-\-noudevsync ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RI { OldLogicalVolume { Name | Path }
-.IR NewLogicalVolume { Name | Path }
-|
-.I VolumeGroupName OldLogicalVolumeName NewLogicalVolumeName\fR}
-.SH DESCRIPTION
-lvrename renames an existing logical volume or an existing
-historical logical volume from
-.IR OldLogicalVolume { Name | Path }
-to
-.IR NewLogicalVolume { Name | Path }.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-\-noudevsync
-Disable udev synchronisation. The
-process will not wait for notification from udev.
-It 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.
-.SH EXAMPLE
-To rename lvold in volume group vg02 to lvnew:
-.sp
-.B lvrename /dev/vg02/lvold vg02/lvnew
-.sp
-An alternate syntax to rename this logical volume is:
-.sp
-.B lvrename vg02 lvold lvnew
-.sp
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvchange (8),
-.BR vgcreate (8),
-.BR vgrename (8)
diff --git a/man/lvresize.8.des b/man/lvresize.8.des
new file mode 100644
index 0000000..7fdcacc
--- /dev/null
+++ b/man/lvresize.8.des
@@ -0,0 +1,2 @@
+lvresize resizes an LV in the same way as lvextend and lvreduce. See
+\fBlvextend\fP(8) and \fBlvreduce\fP(8) for more information.
diff --git a/man/lvresize.8.end b/man/lvresize.8.end
new file mode 100644
index 0000000..a336d62
--- /dev/null
+++ b/man/lvresize.8.end
@@ -0,0 +1,6 @@
+.SH EXAMPLES
+
+Extend an LV by 16MB using specific physical extents:
+.br
+.B lvresize \-L+16M vg1/lv1 /dev/sda:0\-1 /dev/sdb:0\-1
+
diff --git a/man/lvresize.8.in b/man/lvresize.8.in
deleted file mode 100644
index 9cdb787..0000000
--- a/man/lvresize.8.in
+++ /dev/null
@@ -1,124 +0,0 @@
-.TH LVRESIZE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvresize \(em resize a logical volume
-.SH SYNOPSIS
-.B lvresize
-.RB [ \-\-alloc " " \fIAllocationPolicy ]
-.RB [ \-\-noudevsync ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-i | \-\-stripes " " \fIStripes
-.RB [ \-I | \-\-stripesize " " \fIStripeSize ]]
-.RB { \-l | \-\-extents
-.RI [ + | \- ] LogicalExtentsNumber [ % { VG | LV | PVS | FREE | ORIGIN "}] |"
-.BR \-L | \-\-size
-.RI [ + | \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]}
-.RB [ \-\-poolmetadatasize
-.RI [ + ] MetadataVolumeSize [ bBsSkKmMgG ]]
-.RB [ \-f | \-\-force ]
-.RB [ \-n | \-\-nofsck ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-r | \-\-resizefs ]
-.IR LogicalVolume { Name | Path }
-.RI [ PhysicalVolumePath [ :PE [ \-PE ]]...]
-.SH DESCRIPTION
-lvresize allows you to resize a logical volume.
-Be careful when reducing a logical volume's size, because data in the reduced
-part is lost!!!
-You should therefore ensure that any filesystem on the volume is
-shrunk first so that the extents that are to be removed are not in use.
-Resizing snapshot logical volumes (see
-.BR lvcreate (8)
-for information about creating snapshots) is supported as well.
-But to change the number of copies in a mirrored logical
-volume use
-.BR lvconvert (8).
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-f ", " \-\-force
-Force resize without prompting even when it may cause data loss.
-.TP
-.BR \-n ", " \-\-nofsck
-Do not perform fsck before resizing filesystem when filesystem
-requires it. You may need to use \fB\-\-force\fR to proceed with
-this option.
-.TP
-.BR \-r ", " \-\-resizefs
-Resize underlying filesystem together with the logical volume using
-\fBfsadm\fR(8).
-.TP
-.IR \fB\-l ", " \fB\-\-extents " [" + | \- ] LogicalExtentsNumber [ % { VG | LV | PVS | FREE | ORIGIN }]
-Change or set the logical volume size in units of logical extents.
-With the \fI+\fP or \fI\-\fP sign the value is added to or subtracted from the actual size
-of the logical volume and without it, the value is taken as an absolute one.
-The total number of physical extents affected will be
-greater than this if, for example, the volume is mirrored.
-The number can also be expressed as a percentage of the total space
-in the Volume Group with the suffix \fI%VG\fP, relative to the existing
-size of the Logical Volume with the suffix \fI%LV\fP, as a percentage of
-the remaining free space of the PhysicalVolumes on the command line with the
-suffix \fI%PVS\fP, as a percentage of the remaining free space in the
-Volume Group with the suffix \fI%FREE\fP, or (for a snapshot) as a percentage
-of the total space in the Origin Logical Volume with the suffix \fI%ORIGIN\fP.
-The resulting value is rounded downward for the subtraction otherwise
-it is rounded upward.
-N.B. In a future release, when expressed as a percentage with PVS, VG or FREE,
-the number will be treated as an approximate total number of physical extents
-to be allocated or freed (including extents used by any mirrors, for example).
-The code may currently allocate or remove more space than you might otherwise
-expect.
-.TP
-.IR \fB\-L ", " \fB\-\-size " [" + | \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]
-Change or set the logical volume size in units of megabytes.
-A size suffix of \fIM\fP for megabytes,
-\fIG\fP for gigabytes, \fIT\fP for terabytes, \fIP\fP for petabytes
-or \fIE\fP for exabytes is optional.
-With the \fI+\fP or \fI\-\fP sign the value is added or subtracted
-from the actual size of the logical volume and rounded
-to the full extent size and without it,
-the value is taken as an absolute one.
-.TP
-.BR \-i ", " \-\-stripes " " \fIStripes
-Gives the number of stripes to use when extending a Logical Volume.
-Defaults to whatever the last segment of the Logical Volume uses.
-Not applicable to LVs using the original metadata LVM format, which must
-use a single value throughout.
-.TP
-.IR \fB\-\-poolmetadatasize " [" + ] MetadataVolumeSize [ bBsSkKmMgG ]
-Change or set the thin pool metadata logical volume size.
-With the \fI+\fP sign the value is added to the actual size
-of the metadata volume and rounded to the full extent size
-and without it, the value is taken as an absolute one.
-Maximal size is 16GiB. Default unit is megabytes.
-.TP
-.BR \-I ", " \-\-stripesize " " \fIStripeSize
-Gives the number of kilobytes for the granularity of the stripes.
-Defaults to whatever the last segment of the Logical Volume uses.
-Not applicable to LVs using the original metadata LVM format, which
-must use a single value throughout.
-.br
-StripeSize must be 2^n (n = 2 to 9) for metadata in LVM1 format.
-For metadata in LVM2 format, the stripe size may be a larger
-power of 2 but must not exceed the physical extent size.
-.TP
-.B \-\-noudevsync
-Disable udev synchronisation. The
-process will not wait for notification from udev.
-It 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.
-.SH EXAMPLES
-.br
-Extend a logical volume vg1/lv1 by 16MB using physical extents
-/dev/sda:0\-1 and /dev/sdb:0\-1 for allocation of extents:
-.sp
-.B lvresize \-L+16M vg1/lv1 /dev/sda:0\-1 /dev/sdb:0\-1
-.SH SEE ALSO
-.BR fsadm (8),
-.BR lvm (8),
-.BR lvconvert (8),
-.BR lvcreate (8),
-.BR lvreduce (8),
-.BR lvchange (8)
diff --git a/man/lvs.8.des b/man/lvs.8.des
new file mode 100644
index 0000000..5f80764
--- /dev/null
+++ b/man/lvs.8.des
@@ -0,0 +1 @@
+lvs produces formatted output about LVs.
diff --git a/man/lvs.8.end b/man/lvs.8.end
new file mode 100644
index 0000000..d71f7c1
--- /dev/null
+++ b/man/lvs.8.end
@@ -0,0 +1,75 @@
+.SH NOTES
+.
+The lv_attr bits are:
+.IP 1 3
+Volume type: (C)ache, (m)irrored, (M)irrored without initial sync, (o)rigin,
+(O)rigin with merging snapshot, (r)aid, (R)aid without initial sync,
+(s)napshot, merging (S)napshot, (p)vmove, (v)irtual,
+mirror or raid (i)mage, mirror or raid (I)mage out-of-sync, mirror (l)og device,
+under (c)onversion, thin (V)olume, (t)hin pool, (T)hin pool data, raid or
+pool m(e)tadata or pool metadata spare.
+.IP 2 3
+Permissions: (w)riteable, (r)ead-only, (R)ead-only activation of non-read-only
+volume
+.IP 3 3
+Allocation policy: (a)nywhere, (c)ontiguous, (i)nherited, c(l)ing, (n)ormal
+This is capitalised if the volume is currently locked against allocation
+changes, for example during
+.BR pvmove (8).
+.IP 4 3
+fixed (m)inor
+.IP 5 3
+State: (a)ctive, (h)istorical, (s)uspended, (I)nvalid snapshot,
+invalid (S)uspended snapshot, snapshot (m)erge failed,
+suspended snapshot (M)erge failed, mapped (d)evice present without tables,
+mapped device present with (i)nactive table, thin-pool (c)heck needed,
+suspended thin-pool (C)heck needed, (X) unknown
+.IP 6 3
+device (o)pen, (X) unknown
+.IP 7 3
+Target type: (C)ache, (m)irror, (r)aid, (s)napshot, (t)hin, (u)nknown, (v)irtual.
+This groups logical volumes related to the same kernel target together. So,
+for example, mirror images, mirror logs as well as mirrors themselves appear as
+(m) if they use the original device-mapper mirror kernel driver; whereas the raid
+equivalents using the md raid kernel driver all appear as (r).
+Snapshots using the original device-mapper driver appear as (s); whereas
+snapshots of thin volumes using the new thin provisioning driver appear as (t).
+.IP 8 3
+Newly-allocated data blocks are overwritten with blocks of (z)eroes before use.
+.IP 9 3
+Volume Health, where there are currently three groups of attributes identified:
+.IP
+Common ones for all Logical Volumes: (p)artial, (X) unknown.
+.br
+(p)artial signifies that one or more of the Physical Volumes this Logical
+Volume uses is missing from the system. (X) unknown signifies the status
+is unknown.
+.IP
+Related to RAID Logical Volumes: (r)efresh needed, (m)ismatches exist, (w)ritemostly.
+.br
+(r)efresh signifies that one or more of the Physical Volumes this RAID Logical
+Volume uses had suffered a write error. The write error could be due to a
+temporary failure of that Physical Volume or an indication that it is failing.
+The device should be refreshed or replaced. (m)ismatches signifies that the
+RAID logical volume has portions of the array that are not coherent.
+Inconsistencies are detected by initiating a "check" on a RAID logical volume.
+(The scrubbing operations, "check" and "repair", can be performed on a RAID
+logical volume via the 'lvchange' command.) (w)ritemostly signifies the
+devices in a RAID 1 logical volume that have been marked write-mostly.
+.IP
+Related to Thin pool Logical Volumes: (F)ailed, out of (D)ata space,
+(M)etadata read only.
+.br
+(F)ailed is set if thin pool encounters serious failures and hence no further I/O
+is permitted at all. The out of (D)ata space is set if thin pool has run out of
+data space. (M)etadata read only signifies that thin pool encounters certain
+types of failures but it's still possible to do reads at least,
+but no metadata changes are allowed.
+.IP
+Related to Thin Logical Volumes: (F)ailed.
+.br
+(F)ailed is set when related thin pool enters Failed state and no further I/O
+is permitted at all.
+.IP 10 3
+s(k)ip activation: this volume is flagged to be skipped during activation.
+
diff --git a/man/lvs.8.in b/man/lvs.8.in
deleted file mode 100644
index 48ef866..0000000
--- a/man/lvs.8.in
+++ /dev/null
@@ -1,290 +0,0 @@
-.TH LVS 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvs \(em report information about logical volumes
-.SH SYNOPSIS
-.B lvs
-.RB [ \-\-aligned ]
-.RB [ \-\-binary ]
-.RB [ \-a | \-\-all ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [[ \-\-configreport
-.IR ReportName ]
-.RB [ \-o | \-\-options
-.RI [ + | \- | # ] Field1 [, Field2 ...]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [, Key2 ...]]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB ...]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-H | \-\-history ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoreskippedcluster ]
-.RB [ \-\-logonly ]
-.RB [ \-\-nameprefixes ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RI [ + | \- ] Key1 [,[ + | \- ] Key2 [,...]]]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-rows ]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-segments ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-\-unquoted ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RI [ VolumeGroupName | LogicalVolume { Name | Path }
-.RI [ VolumeGroupName | LogicalVolume { Name | Path }\ ...]]
-
-.SH DESCRIPTION
-lvs produces formatted output about logical volumes.
-.SH OPTIONS
-See
-.BR lvm (8)
-for common options.
-.TP
-.B \-\-aligned
-Use with \fB\-\-separator\fP to align the output columns.
-.TP
-.B \-\-all
-Include information in the output about internal Logical Volumes that
-are components of normally-accessible Logical Volumes, such as mirrors,
-but which are not independently accessible (e.g. not mountable).
-The names of such Logical Volumes are enclosed within square brackets
-in the output. For example, after creating a mirror using
-.B lvcreate -m1 \-\-mirrorlog disk
-, this option will reveal three internal Logical
-Volumes, with suffixes mimage_0, mimage_1, and mlog.
-.TP
-.B \-\-binary
-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).
-.TP
-.B \-\-configreport \fI ReportName
-Make any subsequent \fB\-o, \-\-options\fP, \fB\-O, \-\-sort\fP or
-\fB\-S, \-\-select\fP to apply for \fIReportName\fP where \fIReportName\fP
-is either 'lv' for command's main report or 'log' for log report.
-If \fB\-\-configreport\fP option is not used to identify a report, then
-command's main report is assumed. The log report is available only if
-enabled by \fBlog/report_command_log\fP \fBlvm.conf\fP(5) setting or
-if \fB\-\-logonly\fP option is used.
-.TP
-.B \-H ", " \-\-history
-Include historical logical volumes in the output.
-(This has no effect unless logical volumes were removed while the configuration
-setting \fBmetadata/record_lvs_history\fP was enabled.)
-.TP
-.B \-\-logonly
-Suppress the lvs report itself and display only log report on output.
-.TP
-.B \-\-nameprefixes
-Add an "LVM2_" prefix plus the field name to the output. Useful
-with \fB\-\-noheadings\fP to produce a list of field=value pairs that can
-be used to set environment variables (for example, in
-.BR udev (7)
-rules).
-.TP
-.B \-\-noheadings
-Suppress the headings line that is normally the first line of output.
-Useful if grepping the output.
-.TP
-.B \-\-nosuffix
-Suppress the suffix on output sizes. Use with \fB\-\-units\fP
-(except h and H) if processing the output.
-.TP
-.BR \-o ", " \-\-options
-Comma-separated ordered list of columns.
-.IP
-Precede the list with '\fI+\fP' to append to the current list
-of columns, '\fI-\fP' to remove from the current list of columns
-or '\fI#\fP' to compact given columns. The \fI\-o\fP option can
-be repeated, providing several lists. These lists are evaluated
-from left to right.
-.IP
-Use \fB\-o lv_all\fP to select all logical volume columns,
-and \fB\-o seg_all\fP
-to select all logical volume segment columns.
-.IP
-Use \fB\-o help\fP to view the full list of columns available.
-.IP
-Column names include:
-chunk_size,
-convert_lv,
-copy_percent,
-data_lv,
-devices,
-discards,
-lv_attr,
-lv_host,
-lv_kernel_major,
-lv_kernel_minor,
-lv_kernel_read_ahead,
-lv_major,
-lv_minor,
-lv_name,
-lv_path,
-lv_profile,
-lv_read_ahead,
-lv_size,
-lv_tags,
-lv_time,
-lv_uuid,
-metadata_lv,
-mirror_log,
-modules,
-move_pv,
-origin,
-origin_size,
-pool_lv,
-raid_max_recovery_rate,
-raid_min_recovery_rate,
-raid_mismatch_count,
-raid_sync_action,
-raid_write_behind,
-region_size,
-segtype,
-seg_count,
-seg_pe_ranges,
-seg_size,
-seg_size_pe,
-seg_start,
-seg_start_pe,
-seg_tags,
-snap_percent,
-stripes,
-stripe_size,
-sync_percent,
-thin_count,
-transaction_id,
-zero.
-.IP
-With \fB\-\-segments\fP, any "seg_" prefixes are optional;
-otherwise any "lv_" prefixes are optional. Columns mentioned in
-.BR vgs (8)
-can also be chosen.
-.IP
-The lv_attr bits are:
-.RS
-.IP 1 3
-Volume type: (C)ache, (m)irrored, (M)irrored without initial sync, (o)rigin,
-(O)rigin with merging snapshot, (r)aid, (R)aid without initial sync,
-(s)napshot, merging (S)napshot, (p)vmove, (v)irtual,
-mirror or raid (i)mage, mirror or raid (I)mage out-of-sync, mirror (l)og device,
-under (c)onversion, thin (V)olume, (t)hin pool, (T)hin pool data, raid or
-pool m(e)tadata or pool metadata spare.
-.IP 2 3
-Permissions: (w)riteable, (r)ead-only, (R)ead-only activation of non-read-only
-volume
-.IP 3 3
-Allocation policy: (a)nywhere, (c)ontiguous, (i)nherited, c(l)ing, (n)ormal
-This is capitalised if the volume is currently locked against allocation
-changes, for example during
-.BR pvmove (8).
-.IP 4 3
-fixed (m)inor
-.IP 5 3
-State: (a)ctive, (h)istorical, (s)uspended, (I)nvalid snapshot,
-invalid (S)uspended snapshot, snapshot (m)erge failed,
-suspended snapshot (M)erge failed, mapped (d)evice present without tables,
-mapped device present with (i)nactive table, thin-pool (c)heck needed,
-suspended thin-pool (C)heck needed, (X) unknown
-.IP 6 3
-device (o)pen, (X) unknown
-.IP 7 3
-Target type: (C)ache, (m)irror, (r)aid, (s)napshot, (t)hin, (u)nknown, (v)irtual.
-This groups logical volumes related to the same kernel target together. So,
-for example, mirror images, mirror logs as well as mirrors themselves appear as
-(m) if they use the original device-mapper mirror kernel driver; whereas the raid
-equivalents using the md raid kernel driver all appear as (r).
-Snapshots using the original device-mapper driver appear as (s); whereas
-snapshots of thin volumes using the new thin provisioning driver appear as (t).
-.IP 8 3
-Newly-allocated data blocks are overwritten with blocks of (z)eroes before use.
-.IP 9 3
-Volume Health, where there are currently three groups of attributes identified:
-.IP
-Common ones for all Logical Volumes: (p)artial, (X) unknown.
-.br
-(p)artial signifies that one or more of the Physical Volumes this Logical
-Volume uses is missing from the system. (X) unknown signifies the status
-is unknown.
-.IP
-Related to RAID Logical Volumes: (r)efresh needed, (m)ismatches exist, (w)ritemostly.
-.br
-(r)efresh signifies that one or more of the Physical Volumes this RAID Logical
-Volume uses had suffered a write error. The write error could be due to a
-temporary failure of that Physical Volume or an indication that it is failing.
-The device should be refreshed or replaced. (m)ismatches signifies that the
-RAID logical volume has portions of the array that are not coherent.
-Inconsistencies are detected by initiating a "check" on a RAID logical volume.
-(The scrubbing operations, "check" and "repair", can be performed on a RAID
-logical volume via the 'lvchange' command.) (w)ritemostly signifies the
-devices in a RAID 1 logical volume that have been marked write-mostly.
-.IP
-Related to Thin pool Logical Volumes: (F)ailed, out of (D)ata space,
-(M)etadata read only.
-.br
-(F)ailed is set if thin pool encounters serious failures and hence no further I/O
-is permitted at all. The out of (D)ata space is set if thin pool has run out of
-data space. (M)etadata read only signifies that thin pool encounters certain
-types of failures but it's still possible to do reads at least,
-but no metadata changes are allowed.
-.IP
-Related to Thin Logical Volumes: (F)ailed.
-.br
-(F)ailed is set when related thin pool enters Failed state and no further I/O
-is permitted at all.
-.IP 10 3
-s(k)ip activation: this volume is flagged to be skipped during activation.
-.RE
-.TP
-.BR \-O ", " \-\-sort
-Comma-separated ordered list of columns to sort by. Replaces the default
-selection. Precede any column with '\fI\-\fP' for a reverse sort on that column.
-.TP
-.B \-\-rows
-Output columns as rows.
-.TP
-.BR \-S ", " \-\-select " " \fISelection
-Display only rows that match Selection criteria. All rows are displayed with
-the additional "selected" column (\fB-o selected\fP) showing 1 if the row
-matches the Selection and 0 otherwise. The Selection criteria are defined
-by specifying column names and their valid values (that can include reserved
-values) while making use of supported comparison operators. See \fBlvm\fP(8)
-and \fB\-S\fP, \fB\-\-select\fP description for more detailed information
-about constructing the Selection criteria. As a quick help and to see full
-list of column names that can be used in Selection including the list of
-reserved values and the set of supported selection operators, check the
-output of \fBlvs -S help\fP command.
-.TP
-.B \-\-segments
-Use default columns that emphasize segment information.
-.TP
-.B \-\-separator \fISeparator
-String to use to separate each column. Useful if grepping the output.
-.TP
-.B \-\-unbuffered
-Produce output immediately without sorting or aligning the columns properly.
-.TP
-.B \-\-units \fIhHbBsSkKmMgGtTpPeE
-All sizes are output in these units: (h)uman-readable, (b)ytes, (s)ectors,
-(k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes.
-Capitalise to use multiples of 1000 (S.I.) instead of 1024. Can also specify
-custom units e.g. \fB\-\-units 3M\fP
-.TP
-.B \-\-unquoted
-When used with \fB\-\-nameprefixes\fP, output values in the field=value
-pairs are not quoted.
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvdisplay (8),
-.BR pvs (8),
-.BR vgs (8)
diff --git a/man/lvscan.8.des b/man/lvscan.8.des
new file mode 100644
index 0000000..e30eb58
--- /dev/null
+++ b/man/lvscan.8.des
@@ -0,0 +1,5 @@
+lvscan scans all VGs or all supported LVM block devices in the system for
+LVs. The output consists of one line for each LV indicating whether or not
+it is active, a snapshot or origin, the size of the device and its
+allocation policy. Use \fBlvs\fP(8) or \fBlvdisplay\fP(8) to obtain more
+comprehensive information about LVs.
diff --git a/man/lvscan.8.in b/man/lvscan.8.in
deleted file mode 100644
index 5710e3c..0000000
--- a/man/lvscan.8.in
+++ /dev/null
@@ -1,52 +0,0 @@
-.TH LVSCAN 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvscan \(em scan (all disks) for Logical Volumes
-.SH SYNOPSIS
-.B lvscan
-.RB [ \-a | \-\-all]
-.RB [ \-b | \-\-blockdevice ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-v | \-\-verbose ]
-.SH DESCRIPTION
-lvscan scans all known volume groups or all supported LVM block devices
-in the system for defined Logical Volumes. The output consists
-of one line for each Logical Volume indicating whether or not it is active,
-a snapshot or origin, the size of the device and its allocation policy.
-Use \fBlvs\fP(8) or \fBlvdisplay\fP(8) to obtain more-comprehensive
-information about the Logical Volumes.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-\-all
-Include information in the output about internal Logical Volumes that
-are components of normally-accessible Logical Volumes, such as mirrors,
-but which are not independently accessible (e.g. not mountable).
-For example, after creating a mirror using
-.B lvcreate \-m1 \-\-mirrorlog disk\fR,
-this option will reveal three internal Logical Volumes, with suffixes
-mimage_0, mimage_1, and mlog.
-.TP
-.BR \-b ", " \-\-blockdevice
-This option is now ignored. Instead, use \fBlvs\fP(8) or
-\fBlvdisplay\fP(8) to obtain the device number.
-.TP
-.IR \fB\-\-cache " " LogicalVolume
-Applicable only when \fBlvmetad\fP(8) is in use (see also \fBlvm.conf\fP(5),
-global/use_lvmetad). This command issues a rescan of physical volume labels and
-metadata areas of all PVs that the logical volume uses. In particular, this can
-be used when a RAID logical volume becomes degraded, to update information
-about physical volume availability. This is only necessary if the logical
-volume is \fBnot\fP being monitored by dmeventd (see \fBlvchange\fP(8), option
-\fB\-\-monitor\fP).
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvcreate (8),
-.BR lvdisplay (8)
-.BR lvs (8)
diff --git a/man/pvchange.8.des b/man/pvchange.8.des
new file mode 100644
index 0000000..802850f
--- /dev/null
+++ b/man/pvchange.8.des
@@ -0,0 +1 @@
+pvchange changes PV attributes in the VG.
diff --git a/man/pvchange.8.end b/man/pvchange.8.end
new file mode 100644
index 0000000..a524d07
--- /dev/null
+++ b/man/pvchange.8.end
@@ -0,0 +1,6 @@
+.SH EXAMPLES
+
+Disallow the allocation of physical extents on a PV (e.g. because of
+disk errors, or because it will be removed after freeing it).
+.br
+.B pvchange \-x n /dev/sdk1
diff --git a/man/pvchange.8.in b/man/pvchange.8.in
deleted file mode 100644
index c7ddc58..0000000
--- a/man/pvchange.8.in
+++ /dev/null
@@ -1,59 +0,0 @@
-.TH PVCHANGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvchange \(em change attributes of a physical volume
-.SH SYNOPSIS
-.B pvchange
-.RB [ \-\-addtag
-.IR Tag ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-f | \-\-force ]
-.RB [ \-\-deltag
-.IR Tag ]
-.RB [ \-\-metadataignore
-.RI { y | n }]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-a | \-\-all ]
-.RB [ \-x | \-\-allocatable
-.RI { y | n }]
-.RB [ \-u | \-\-uuid ]
-.RI [ PhysicalVolumePath ...]
-.SH DESCRIPTION
-pvchange allows you to change the allocation permissions of one or
-more physical volumes.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-a ", " \-\-all
-If PhysicalVolumePath is not specified on the command line all
-physical volumes are searched for and used.
-.TP
-.BR \-\-metadataignore " {" \fIy | \fIn }
-Ignore or un-ignore metadata areas on this physical volume.
-If metadata areas on a physical volume are ignored, LVM will
-not not store metadata in the metadata areas present on this Physical
-Volume.
-.TP
-.BR \-u ", " \-\-uuid
-Generate new random UUID for specified physical volumes.
-.TP
-.BR \-x ", " \-\-allocatable " {" \fIy | \fIn }
-Enable or disable allocation of physical extents on this physical volume.
-.SH Example
-Disallows the allocation of physical extents on this physical volume
-(possibly because of disk errors, or because it will be removed after
-freeing it:
-.sp
-.B pvchange \-x n /dev/sdk1
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvcreate (8)
diff --git a/man/pvck.8.des b/man/pvck.8.des
new file mode 100644
index 0000000..0a32657
--- /dev/null
+++ b/man/pvck.8.des
@@ -0,0 +1 @@
+pvck checks the LVM metadata for consistency on PVs.
diff --git a/man/pvck.8.end b/man/pvck.8.end
new file mode 100644
index 0000000..67af238
--- /dev/null
+++ b/man/pvck.8.end
@@ -0,0 +1,8 @@
+.SH EXAMPLES
+
+If the partition table is corrupted or lost on /dev/sda, and you suspect
+there was an LVM partition at approximately 100 MiB, then this
+area of the disk can be scanned using the \fB\-\-labelsector\fP
+parameter with a value of 204800 (100 * 1024 * 1024 / 512 = 204800).
+.br
+.B pvck \-\-labelsector 204800 /dev/sda
diff --git a/man/pvck.8.in b/man/pvck.8.in
deleted file mode 100644
index 368dc06..0000000
--- a/man/pvck.8.in
+++ /dev/null
@@ -1,37 +0,0 @@
-.TH PVCK 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvck \(em check physical volume metadata
-.SH SYNOPSIS
-.B pvck
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-labelsector
-.IR sector ]
-.I PhysicalVolume
-.RI [ PhysicalVolume ...]
-.SH DESCRIPTION
-pvck checks physical volume LVM metadata for consistency.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.B \-\-labelsector \fIsector
-By default, 4 sectors of \fBPhysicalVolume\fP are scanned for an LVM label,
-starting at sector 0. This parameter allows you to specify a different
-starting sector for the scan and is useful for recovery situations. For
-example, suppose the partition table is corrupted or lost on /dev/sda,
-but you suspect there was an LVM partition at approximately 100 MiB. This
-area of the disk may be scanned by using the \fB\-\-labelsector\fP parameter
-with a value of 204800 (100 * 1024 * 1024 / 512 = 204800):
-.sp
-.B pvck \-\-labelsector 204800 /dev/sda
-.sp
-Note that a script can be used with \fB\-\-labelsector\fP to automate the
-process of finding LVM labels.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvcreate (8),
-.BR pvscan (8)
-.BR vgck (8)
diff --git a/man/pvcreate.8.des b/man/pvcreate.8.des
new file mode 100644
index 0000000..3dfddbc
--- /dev/null
+++ b/man/pvcreate.8.des
@@ -0,0 +1,18 @@
+pvcreate initializes a PV so that it is recognized as belonging to LVM,
+and allows the PV to be used in a VG. A PV can be a disk partition, whole
+disk, meta device, or loopback file.
+
+For DOS disk partitions, the partition id should be set to 0x8e using
+.BR fdisk (8),
+.BR cfdisk (8),
+or a equivalent. For GUID Partition Table (GPT), the id is
+E6D6D379-F507-44C2-A23C-238F2A3DF928. For
+whole disk devices only
+the partition table must be erased, which will effectively destroy all
+data on that disk. This can be done by zeroing the first sector with:
+
+.BI "dd if=/dev/zero of=" PhysicalVolume " bs=512 count=1"
+
+Use \fBvgcreate\fP(8) to create a new VG on the PV, or \fBvgextend\fP(8)
+to add the PV to existing VG.
+
diff --git a/man/pvcreate.8.end b/man/pvcreate.8.end
new file mode 100644
index 0000000..b1b0f3e
--- /dev/null
+++ b/man/pvcreate.8.end
@@ -0,0 +1,13 @@
+.SH EXAMPLES
+
+Initialize a partition and a full device.
+.br
+.B pvcreate /dev/sdc4 /dev/sde
+
+If a device is a 4KiB sector drive that compensates for windows
+partitioning (sector 7 is the lowest aligned logical block, the 4KiB
+sectors start at LBA -1, and consequently sector 63 is aligned on a 4KiB
+boundary) manually account for this when initializing for use by LVM.
+.br
+.B pvcreate \-\-dataalignmentoffset 7s /dev/sdb
+
diff --git a/man/pvcreate.8.in b/man/pvcreate.8.in
deleted file mode 100644
index 97a9909..0000000
--- a/man/pvcreate.8.in
+++ /dev/null
@@ -1,210 +0,0 @@
-.TH PVCREATE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvcreate \(em initialize a disk or partition for use by LVM
-.SH SYNOPSIS
-.B pvcreate
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-f [ f ]| \-\-force
-.RB [ \-\-force ]]
-.RB [ \-y | \-\-yes ]
-.RB [ \-\-labelsector ]
-.RB [ \-\-bootloaderareasize
-.IR size ]
-.RB [ \-M | \-\-metadatatype
-.IR type ]
-.RB [ \-\- [ pv ] metadatacopies
-.IR NumberOfCopies ]
-.RB [ \-\-metadatasize
-.IR size ]
-.RB [ \-\-metadataignore
-.RI { y | n }]
-.RB [ \-\-dataalignment
-.IR alignment ]
-.RB [ \-\-dataalignmentoffset
-.IR alignment_offset ]
-.RB [ \-\-restorefile
-.IR file ]
-.RB [ \-\-norestorefile ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-setphysicalvolumesize
-.IR size ]
-.RB [ \-u | \-\-uuid
-.IR uuid ]
-.RB [ \-Z | \-\-zero
-.RI { y | n }]
-.I PhysicalVolume
-.RI [ PhysicalVolume ...]
-.SH DESCRIPTION
-pvcreate initializes
-.I PhysicalVolume
-for later use by the Logical Volume Manager (LVM). Each
-.I PhysicalVolume
-can be a disk partition, whole disk, meta device, or loopback file.
-For DOS disk partitions, the partition id should be set to 0x8e using
-.BR fdisk (8),
-.BR cfdisk (8),
-or a equivalent. For GUID Partition Table (GPT), the id is
-E6D6D379-F507-44C2-A23C-238F2A3DF928. For
-.B whole disk devices only
-the partition table must be erased, which will effectively destroy all
-data on that disk. This can be done by zeroing the first sector with:
-.sp
-.BI "dd if=/dev/zero of=" PhysicalVolume " bs=512 count=1"
-.sp
-Continue with
-.BR vgcreate (8)
-to create a new volume group on
-.IR PhysicalVolume ,
-or
-.BR vgextend (8)
-to add
-.I PhysicalVolume
-to an existing volume group.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-f ", " \-\-force
-Force the creation without any confirmation. You can not recreate
-(reinitialize) a physical volume belonging to an existing volume group.
-In an emergency you can override this behaviour with \fB-ff\fP.
-.TP
-.BR \-u ", " \-\-uuid " " \fIuuid
-Specify the uuid for the device.
-Without this option, \fBpvcreate\fP(8) generates a random uuid.
-All of your physical volumes must have unique uuids.
-You need to use this option before restoring a backup of LVM metadata
-onto a replacement device - see \fBvgcfgrestore\fP(8). As such, use of
-\fB\-\-restorefile\fP is compulsory unless the \fB\-\-norestorefile\fP is
-used.
-.TP
-.BR \-y ", " \-\-yes
-Answer yes to all questions.
-.TP
-.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
-Whether or not the first 4 sectors (2048 bytes) of the device should be
-wiped.
-If this option is not given, the
-default is to wipe these sectors unless either or both of the
-\fB\-\-restorefile\fP or \fB\-\-uuid\fP options were specified.
-.SH NEW METADATA OPTIONS
-LVM2 introduces a new format for storing metadata on disk.
-This new format is more efficient and resilient than the format the
-original version of LVM used and offers the advanced user greater
-flexibility and control.
-.P
-The new format may be selected on the command line with \fB\-M2\fP or by
-setting \fBformat = "lvm2"\fP in the \fBglobal\fP section of \fBlvm.conf\fP(5).
-Each physical volume in the same volume group must use the same format, but
-different volume groups on a machine may use different formats
-simultaneously: the tools can handle both formats.
-Additional formats can be added as shared libraries.
-.P
-Additional tools for manipulating the locations and sizes of metadata areas
-will be written in due course. Use the verbose/debug options on the tools
-to see where the metadata areas are placed.
-.TP
-.B \-\-metadatasize \fIsize
-The approximate amount of space to be set aside for each metadata area.
-(The size you specify may get rounded.)
-.TP
-.B \-\-dataalignment \fIalignment
-Align the start of the data to a multiple of this number.
-You should also specify an appropriate \fIPhysicalExtentSize\fP when creating
-the Volume Group with \fBvgcreate\fP.
-.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
-alignment. In addition it may be shifted by \fIalignment_offset\fP from
-\fIdata_alignment_offset_detection\fP (if enabled in \fBlvm.conf\fP(5)) or
-\fB\-\-dataalignmentoffset\fP.
-.TP
-.B \-\-dataalignmentoffset \fIalignment_offset
-Shift the start of the data area by this additional \fIalignment_offset\fP.
-.TP
-.BR \-\- [ pv ] metadatacopies " " \fINumberOfCopies
-The number of metadata areas to set aside on each PV. Currently
-this can be 0, 1 or 2.
-If set to 2, two copies of the volume group metadata
-are held on the PV, one at the front of the PV and one at the end.
-If set to 1 (the default), one copy is kept at the front of the PV
-(starting in the 5th sector).
-If set to 0, no copies are kept on this PV - you might wish to use this
-with VGs containing large numbers of PVs. But if you do this and
-then later use \fBvgsplit\fP(8) you must ensure that each VG is still going
-to have a suitable number of copies of the metadata after the split!
-.TP
-.BR \-\-metadataignore " {" \fIy | \fIn }
-Ignore or un-ignore metadata areas on this physical volume.
-The default is "n". This setting can be changed with \fBpvchange\fP.
-If metadata areas on a physical volume are ignored, LVM will
-not store metadata in the metadata areas present on this Physical
-Volume. 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 in case you need it in the future and to use this option to instruct
-LVM2 to ignore it.
-.TP
-.B \-\-restorefile \fIfile
-In conjunction with \fB\-\-uuid\fP, this extracts the location and size
-of the data on the PV from the file (produced by \fBvgcfgbackup\fP)
-and ensures that the metadata that the program produces is consistent
-with the contents of the file i.e. the physical extents will be in
-the same place and not get overwritten by new metadata. This provides
-a mechanism to upgrade the metadata format or to add/remove metadata
-areas. Use with care. See also \fBvgconvert\fP(8).
-.TP
-.B \-\-norestorefile
-In conjunction with \fB\-\-uuid\fP, this allows a \fIuuid\fP to be specified
-without also requiring that a backup of the metadata be provided.
-.TP
-.B \-\-labelsector \fIsector
-By default the PV is labelled with an LVM2 identifier in its second
-sector (sector 1). This lets you use a different sector near the
-start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS
-in the source). Use with care.
-.TP
-.B \-\-bootloaderareasize \fIsize
-Create a separate bootloader area of specified size besides PV's data
-area. The bootloader area is an area of reserved space on the PV from
-which LVM2 will not allocate any extents and it's kept untouched. This is
-primarily aimed for use with bootloaders to embed their own data or metadata.
-The start of the bootloader area is always aligned, see also \fB\-\-dataalignment\fP
-and \fB\-\-dataalignmentoffset\fP. The bootloader area size may eventually
-end up increased due to the alignment, but it's never less than the
-size that is requested. To see the bootloader area start and size of
-an existing Physical Volume use \fBpvs \-o +pv_ba_start,pv_ba_size\fP.
-.TP
-.B \-\-setphysicalvolumesize \fIsize
-Overrides the automatically-detected size of the PV. Use with care.
-.SH Examples
-Initialize partition #4 on the third SCSI disk and the entire fifth
-SCSI disk for later use by LVM:
-.sp
-.B pvcreate /dev/sdc4 /dev/sde
-
-If the 2nd SCSI disk is a 4KiB sector drive that compensates for windows
-partitioning (sector 7 is the lowest aligned logical block, the 4KiB
-sectors start at LBA -1, and consequently sector 63 is aligned on a 4KiB
-boundary) manually account for this when initializing for use by LVM:
-.sp
-.B pvcreate \-\-dataalignmentoffset 7s /dev/sdb
-
-.SH SEE ALSO
-.BR lvm.conf (5),
-.BR lvm (8),
-.BR vgcreate (8),
-.BR vgextend (8),
-.BR lvcreate (8),
-.BR cfdisk (8),
-.BR fdisk (8),
-.BR losetup (8),
-.BR mdadm (8),
-.BR vgcfgrestore (8),
-.BR vgconvert (8)
diff --git a/man/pvdisplay.8.des b/man/pvdisplay.8.des
new file mode 100644
index 0000000..74d57ca
--- /dev/null
+++ b/man/pvdisplay.8.des
@@ -0,0 +1,5 @@
+pvdisplay shows the attributes of PVs, like size, physical extent size,
+space used for the VG descriptor area, etc.
+
+\fBpvs\fP(8) is a preferred alternative that shows the same information
+and more, using a more compact and configurable output format.
diff --git a/man/pvdisplay.8.in b/man/pvdisplay.8.in
deleted file mode 100644
index 9bca720..0000000
--- a/man/pvdisplay.8.in
+++ /dev/null
@@ -1,109 +0,0 @@
-.TH PVDISPLAY 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvdisplay \- display attributes of a physical volume
-.SH SYNOPSIS
-.B pvdisplay
-.RB [ \-c | \-\-colon ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoreskippedcluster ]
-.RB [ \-\-maps ]
-.RB [ \-\-nosuffix ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-s | \-\-short ]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB [ \-\-units
-.IR hsbkmgtHKMGT ]
-.RB [ \-v [ v ]| \-\-verbose
-.RB [ \-\-verbose ]]
-.RB [ \-\-version ]
-.RI [ PhysicalVolumePath ...]
-.br
-
-.br
-.B pvdisplay
-.BR \-C | \-\-columns
-.RB [ \-\-aligned ]
-.RB [ \-\-binary ]
-.RB [ \-a | \-\-all ]
-.RB [ \-\-commandprofile
-.RB [[ \-\-configreport
-.IR ReportName ]
-.RB [ \-o | \-\-options
-.RI [ + | \- | # ] Field1 [, Field2 ...]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [, Key2 ...]]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB ...]
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-logonly ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-v [ v ]| \-\-verbose
-.RB [ \-\-verbose ]]
-.RB [ \-\-version ]
-.RI [ PhysicalVolumePath ...]
-.SH DESCRIPTION
-pvdisplay allows you to see the attributes of one or more physical volumes
-like size, physical extent size, space used for the volume group descriptor
-area and so on.
-.P
-\fBpvs\fP(8) is an alternative that provides the same information
-in the style of \fBps\fP(1).
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-C ", " \-\-columns
-Display output in columns, the equivalent of \fBpvs\fP(8). See
-\fBpvs\fP(8) for a description of other options with this form of
-\fBpvdisplay\fP.
-.TP
-.BR \-c ", " \-\-colon
-Generate colon separated output for easier parsing in scripts or programs.
-N.B. \fBpvs\fP(8) provides considerably more control over the output.
-.nf
-
-The values are:
-
-\(bu physical volume device name
-\(bu volume group name
-\(bu physical volume size in sectors
-\(bu internal physical volume number (obsolete)
-\(bu physical volume status
-\(bu physical volume (not) allocatable
-\(bu current number of logical volumes on this physical volume
-\(bu physical extent size in kilobytes
-\(bu total number of physical extents
-\(bu free number of physical extents
-\(bu allocated number of physical extents
-
-.fi
-.TP
-.BR \-s ", " \-\-short
-Only display the size of the given physical volumes.
-.TP
-.BR \-m ", " \-\-maps
-Display the mapping of physical extents to logical volumes and
-logical extents.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvs (8),
-.BR pvcreate (8),
-.BR lvcreate (8),
-.BR vgcreate (8)
diff --git a/man/pvmove.8.des b/man/pvmove.8.des
new file mode 100644
index 0000000..5286ef4
--- /dev/null
+++ b/man/pvmove.8.des
@@ -0,0 +1,61 @@
+pvmove moves the allocated physical extents (PEs) on a source PV to one or
+more destination PVs. You can optionally specify a source LV in which
+case only extents used by that LV will be moved to free (or specified)
+extents on the destination PV. If no destination PV is specified, the
+normal allocation rules for the VG are used.
+
+If pvmove is interrupted for any reason (e.g. the machine crashes) then
+run pvmove again without any PV arguments to restart any operations that
+were in progress from the last checkpoint. Alternatively, use the abort
+option at any time to abort the operation. The resulting location of LVs
+after an abort depends on whether the atomic option was used.
+
+More than one pvmove can run concurrently if they are moving data from
+different source PVs, but additional pvmoves will ignore any LVs already
+in the process of being changed, so some data might not get moved.
+
+pvmove works as follows:
+
+1. A temporary 'pvmove' LV is created to store details of all the data
+movements required.
+
+2. Every LV in the VG is searched for contiguous data that need moving
+according to the command line arguments.
+For each piece of data found, a new segment is added to the end of the
+pvmove LV.
+This segment takes the form of a temporary mirror to copy the data
+from the original location to a newly allocated location.
+The original LV is updated to use the new temporary mirror segment
+in the pvmove LV instead of accessing the data directly.
+
+3. The VG metadata is updated on disk.
+
+4. The first segment of the pvmove LV is activated and starts to mirror
+the first part of the data. Only one segment is mirrored at once as this
+is usually more efficient.
+
+5. A daemon repeatedly checks progress at the specified time interval.
+When it detects that the first temporary mirror is in sync, it breaks that
+mirror so that only the new location for that data gets used and writes a
+checkpoint into the VG metadata on disk. Then it activates the mirror for
+the next segment of the pvmove LV.
+
+6. When there are no more segments left to be mirrored, the temporary LV
+is removed and the VG metadata is updated so that the LVs reflect the new
+data locations.
+
+Note that this new process cannot support the original LVM1
+type of on-disk metadata. Metadata can be converted using
+\fBvgconvert\fP(8).
+
+If the \fB\-\-atomic\fP option is used, a slightly different approach is
+used for the move. Again, a temporary 'pvmove' LV is created to store the
+details of all the data movements required. This temporary LV contains
+all the segments of the various LVs that need to be moved. However, in
+this case, an identical LV is allocated that contains the same number of
+segments and a mirror is created to copy the contents from the first
+temporary LV to the second. After a complete copy is made, the temporary
+LVs are removed, leaving behind the segments on the destination PV. If an
+abort is issued during the move, all LVs being moved will remain on the
+source PV.
+
diff --git a/man/pvmove.8.end b/man/pvmove.8.end
new file mode 100644
index 0000000..9dd3adc
--- /dev/null
+++ b/man/pvmove.8.end
@@ -0,0 +1,46 @@
+.SH EXAMPLES
+
+Move all physical extents that are used by simple LVs on the specified PV to
+free physical extents elsewhere in the VG.
+.br
+.B pvmove /dev/sdb1
+
+Use a specific destination PV when moving physical extents.
+.br
+.B pvmove /dev/sdb1 /dev/sdc1
+
+Move extents belonging to a single LV.
+.br
+.B pvmove \-n lvol1 /dev/sdb1 /dev/sdc1
+
+Rather than moving the contents of an entire device, it is possible to
+move a range of physical extents, for example numbers 1000 to 1999
+inclusive on the specified PV.
+.br
+.B pvmove /dev/sdb1:1000\-1999
+
+A range of physical extents to move can be specified as start+length. For
+example, starting from PE 1000. (Counting starts from 0, so this refers to the
+1001st to the 2000th PE inclusive.)
+.br
+.B pvmove /dev/sdb1:1000+1000
+
+Move a range of physical extents to a specific PV (which must have
+sufficient free extents).
+.br
+.B pvmove /dev/sdb1:1000\-1999 /dev/sdc1
+
+Move a range of physical extents to specific new extents on a new PV.
+.br
+.B pvmove /dev/sdb1:1000\-1999 /dev/sdc1:0\-999
+
+If the source and destination are on the same disk, the
+\fBanywhere\fP allocation policy is needed.
+.br
+.B pvmove \-\-alloc anywhere /dev/sdb1:1000\-1999 /dev/sdb1:0\-999
+
+The part of a specific LV present within in a range of physical
+extents can also be picked out and moved.
+.br
+.B pvmove \-n lvol1 /dev/sdb1:1000\-1999 /dev/sdc1
+
diff --git a/man/pvmove.8.in b/man/pvmove.8.in
deleted file mode 100644
index 39fdfe4..0000000
--- a/man/pvmove.8.in
+++ /dev/null
@@ -1,187 +0,0 @@
-.TH PVMOVE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvmove \(em move physical extents
-.SH SYNOPSIS
-.B pvmove
-.RB [ \-\-abort ]
-.RB [ \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-\-atomic ]
-.RB [ \-b | \-\-background ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-i | \-\-interval
-.IR Seconds ]
-.RB [ \-\-noudevsync ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-n | \-\-name
-.IR LogicalVolume ]
-.RI [ SourcePhysicalVolume [ :PE [ \-PE ]...]
-.RI [ DestinationPhysicalVolume [ :PE [ \-PE ]...]...]]
-.SH DESCRIPTION
-pvmove allows you to move the allocated physical extents (PEs) on
-.I SourcePhysicalVolume
-to one or more other physical volumes (PVs).
-You can optionally specify a source
-.I LogicalVolume
-in which case only extents used by that LV will be moved to
-free (or specified) extents on
-.IR DestinationPhysicalVolume (s).
-If no
-.I DestinationPhysicalVolume
-is specified, the normal allocation rules for the Volume Group are used.
-
-If pvmove gets interrupted for any reason (e.g. the machine crashes)
-then run pvmove again without any PhysicalVolume arguments to
-restart any moves that were in progress from the last checkpoint.
-Alternatively use \fBpvmove \-\-abort\fP at any time to abort. The
-resulting location of logical volumes after an abort is issued depends
-on whether the
-.B \-\-atomic
-option was used when starting the pvmove process.
-
-You can run more than one pvmove at once provided they are moving data
-off different SourcePhysicalVolumes, but additional pvmoves will ignore
-any Logical Volumes already in the process of being changed, so some
-data might not get moved.
-
-\fBpvmove\fP works as follows:
-
-1. A temporary 'pvmove' Logical Volume is created to store
-details of all the data movements required.
-
-2. Every Logical Volume in the Volume Group is searched
-for contiguous data that need moving
-according to the command line arguments.
-For each piece of data found, a new segment is added to the end of the
-pvmove LV.
-This segment takes the form of a temporary mirror to copy the data
-from the original location to a newly-allocated location.
-The original LV is updated to use the new temporary mirror segment
-in the pvmove LV instead of accessing the data directly.
-
-3. The Volume Group metadata is updated on disk.
-
-4. The first segment of the pvmove Logical Volume is activated and starts
-to mirror the first part of the data. Only one segment is mirrored at once
-as this is usually more efficient.
-
-5. A daemon repeatedly checks progress at the specified time interval.
-When it detects that the first temporary mirror is in-sync,
-it breaks that mirror so that only the new location for that data gets used
-and writes a checkpoint into the Volume Group metadata on disk.
-Then it activates the mirror for the next segment of the pvmove LV.
-
-6. When there are no more segments left to be mirrored,
-the temporary Logical Volume is removed and the Volume Group metadata
-is updated so that the Logical Volumes reflect the new data locations.
-
-Note that this new process cannot support the original LVM1
-type of on-disk metadata. Metadata can be converted using \fBvgconvert\fP(8).
-
-If the
-.B \-\-atomic
-option is used, a slightly different approach is used for the move. Again,
-a temporary 'pvmove' logical volume is created to store the details of all
-the data movements required. This temporary LV contains all the segments of
-the various LVs that need to be moved. However this time, an identical
-logical volume is allocated that contains the same number of segments and
-a mirror is created to copy the contents from the first temporary LV to the
-second. When a complete copy is accomplished, the temporary logical volumes
-are removed, leaving behind the segments on the destination physical volume.
-If an abort is issued during the move, all logical volumes being moved will
-remain on the source physical volume.
-
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.B \-\-abort
-Abort any moves in progress. If the
-.B \-\-atomic
-option was used to start the pvmove, all logical volumes will remain on
-the source physical volume. Otherwise, those segments that have completed
-the move will stay on the destination physical volume, while those that
-have not will remain on the source physical volume.
-.TP
-.B \-\-atomic
-Make the entire operation atomic. That is, ensure that all affected logical
-volumes are moved to the destination physical volume together; unless the move
-has been aborted. If the move has been aborted, all logical volumes will
-remain on the source physical volume.
-.TP
-.B \-\-noudevsync
-Disable udev synchronisation. The
-process will not wait for notification from udev.
-It 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.
-.TP
-.BR \-b ", " \-\-background
-Run the daemon in the background.
-.TP
-.BR \-i ", " \-\-interval " " \fISeconds
-Report progress as a percentage at regular intervals.
-.TP
-.BR \-n ", " \-\-name " " \fILogicalVolume
-Move only the extents belonging to
-.I LogicalVolume
-from
-.I SourcePhysicalVolume
-instead of all allocated extents to the destination physical volume(s).
-
-.SH Examples
-To move all Physical Extents that are used by simple Logical Volumes on
-/dev/sdb1 to free Physical Extents elsewhere in the Volume Group use:
-.sp
-.B pvmove /dev/sdb1
-.P
-Additionally, a specific destination device /dev/sdc1
-can be specified like this:
-.sp
-.B pvmove /dev/sdb1 /dev/sdc1
-.P
-To perform the action only on extents belonging to the single Logical Volume
-lvol1 do this:
-.sp
-.B pvmove \-n lvol1 /dev/sdb1 /dev/sdc1
-.P
-Rather than moving the contents of the entire device, it is possible to
-move a range of Physical Extents - for example numbers 1000 to 1999
-inclusive on /dev/sdb1 - like this:
-.sp
-.B pvmove /dev/sdb1:1000\-1999
-.P
-A range can also be specified as start+length, so
-.sp
-.B pvmove /dev/sdb1:1000+1000
-.P
-also refers to 1000 Physical Extents starting from Physical Extent number 1000.
-(Counting starts from 0, so this refers to the 1001st to the 2000th inclusive.)
-.P
-To move a range of Physical Extents to a specific location (which must have
-sufficient free extents) use the form:
-.sp
-.B pvmove /dev/sdb1:1000\-1999 /dev/sdc1
-.sp
-or
-.sp
-.B pvmove /dev/sdb1:1000\-1999 /dev/sdc1:0\-999
-.P
-If the source and destination are on the same disk, the
-.B anywhere
-allocation policy would be needed, like this:
-.sp
-.B pvmove \-\-alloc anywhere /dev/sdb1:1000\-1999 /dev/sdb1:0\-999
-.P
-The part of a specific Logical Volume present within in a range of Physical
-Extents can also be picked out and moved, like this:
-.sp
-.B pvmove \-n lvol1 /dev/sdb1:1000\-1999 /dev/sdc1
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgconvert (8)
-.BR pvs (8)
diff --git a/man/pvremove.8.des b/man/pvremove.8.des
new file mode 100644
index 0000000..f12b76e
--- /dev/null
+++ b/man/pvremove.8.des
@@ -0,0 +1,2 @@
+pvremove wipes the label on a device so that LVM will no longer recognise
+it as a PV.
diff --git a/man/pvremove.8.in b/man/pvremove.8.in
deleted file mode 100644
index 6444884..0000000
--- a/man/pvremove.8.in
+++ /dev/null
@@ -1,37 +0,0 @@
-.TH PVREMOVE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvremove \(em remove a physical volume
-.SH SYNOPSIS
-.B pvremove
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-f [ f ]| \-\-force
-.RB [ \-\-force ]]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-y | \-\-yes ]
-.I PhysicalVolume
-.RI [ PhysicalVolume ...]
-.SH DESCRIPTION
-pvremove wipes the label on a device so that LVM will no longer
-recognise it as a physical volume.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-ff ", " \-\-force " " \-\-force
-Force the removal of a physical volume belonging to an existing volume group.
-Normally \fBvgreduce\fP(8) should be used instead of this command.
-You cannot remove a physical volume which in use by some active logical volume.
-.TP
-.BR \-y ", " \-\-yes
-Answer yes to all questions.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvcreate (8),
-.BR pvdisplay (8),
-.BR vgreduce (8)
diff --git a/man/pvresize.8.des b/man/pvresize.8.des
new file mode 100644
index 0000000..b3cfe63
--- /dev/null
+++ b/man/pvresize.8.des
@@ -0,0 +1,2 @@
+pvresize resizes a PV. The PV may already be in a VG and may have active
+LVs allocated on it.
diff --git a/man/pvresize.8.end b/man/pvresize.8.end
new file mode 100644
index 0000000..316e408
--- /dev/null
+++ b/man/pvresize.8.end
@@ -0,0 +1,16 @@
+.SH NOTES
+
+pvresize will refuse to shrink a PV if it has allocated extents beyond the
+new end.
+
+.SH EXAMPLES
+
+Expand a PV after enlarging the partition.
+.br
+.B pvresize /dev/sda1
+
+Shrink a PV prior to shrinking the partition (ensure that the PV size is
+appropriate for the intended new partition size).
+.br
+.B pvresize \-\-setphysicalvolumesize 40G /dev/sda1
+
diff --git a/man/pvresize.8.in b/man/pvresize.8.in
deleted file mode 100644
index b7d8f33..0000000
--- a/man/pvresize.8.in
+++ /dev/null
@@ -1,56 +0,0 @@
-.TH PVRESIZE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvresize \(em resize a disk or partition in use by LVM2
-.SH SYNOPSIS
-.B pvresize
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-setphysicalvolumesize
-.IR size ]
-.I PhysicalVolume
-.RI [ PhysicalVolume ...]
-.SH DESCRIPTION
-pvresize resizes
-.I PhysicalVolume
-which may already be in a volume group and have active logical volumes
-allocated on it.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BI \-\-setphysicalvolumesize " size"
-Overrides the automatically-detected size of the PV. Use with care, or
-prior to reducing the physical size of the device.
-.SH EXAMPLES
-Expand the PV on /dev/sda1 after enlarging the partition with fdisk:
-.sp
-.B pvresize /dev/sda1
-.sp
-Shrink the PV on /dev/sda1 prior to shrinking the partition with fdisk
-(ensure that the PV size is appropriate for your intended new partition
-size):
-.sp
-.B pvresize \-\-setphysicalvolumesize 40G /dev/sda1
-.sp
-.SH RESTRICTIONS
-pvresize will refuse to shrink
-.I PhysicalVolume
-if it has allocated extents after where its new end would be. In the future,
-it should relocate these elsewhere in the volume group if there is sufficient
-free space, like
-.B pvmove
-does.
-.sp
-.B pvresize
-won't currently work correctly on LVM1 volumes.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvmove (8),
-.BR lvresize (8),
-.BR fdisk (8)
diff --git a/man/pvs.8.des b/man/pvs.8.des
new file mode 100644
index 0000000..08497ce
--- /dev/null
+++ b/man/pvs.8.des
@@ -0,0 +1 @@
+pvs produces formatted output about PVs.
diff --git a/man/pvs.8.end b/man/pvs.8.end
new file mode 100644
index 0000000..ba36a8b
--- /dev/null
+++ b/man/pvs.8.end
@@ -0,0 +1,11 @@
+.SH NOTES
+.
+The pv_attr bits are:
+.IP 1 3
+(d)uplicate, (a)llocatable, (u)sed
+.IP 2 3
+e(x)ported
+.IP 3 3
+(m)issing
+
+
diff --git a/man/pvs.8.in b/man/pvs.8.in
deleted file mode 100644
index 54f21c3..0000000
--- a/man/pvs.8.in
+++ /dev/null
@@ -1,153 +0,0 @@
-.TH PVS 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvs \(em report information about physical volumes
-.SH SYNOPSIS
-.B pvs
-.RB [ \-a | \-\-all ]
-.RB [ \-\-aligned ]
-.RB [ \-\-binary ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [[ \-\-configreport
-.IR ReportName ]
-.RB [ \-o | \-\-options
-.RI [ + | \- | # ] Field1 [, Field2 ...]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [, Key2 ...]]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB ...]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoreskippedcluster ]
-.RB [ \-\-logonly ]
-.RB [ \-\-nameprefixes ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-rows ]
-.RB [ \-\-segments ]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-\-unquoted ]
-.RB [ \-v|\-\-verbose ]
-.RB [ \-\-version]
-.RI [ PhysicalVolume
-.RI [ PhysicalVolume ...]]
-.SH DESCRIPTION
-pvs produces formatted output about physical volumes.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.B \-\-all
-Include information in the output about devices that have not been
-initialized with \fBpvcreate\fP(8).
-.TP
-.B \-\-aligned
-Use with \fB\-\-separator\fP to align the output columns.
-.TP
-.B \-\-binary
-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).
-.TP
-.B \-\-configreport \fI ReportName
-Make any subsequent \fB\-o, \-\-options\fP, \fB\-O, \-\-sort\fP or
-\fB\-S, \-\-select\fP to apply for \fIReportName\fP where \fIReportName\fP
-is either 'pv' for command's main report or 'log' for log report.
-If \fB\-\-configreport\fP option is not used to identify a report, then
-command's main report is assumed. The log report is available only if
-enabled by \fBlog/report_command_log\fP \fBlvm.conf\fP(5) setting or
-if \fB\-\-logonly\fP option is used.
-.TP
-.B \-\-logonly
-Suppress the pvs report itself and display only log report on output.
-.TP
-.B \-\-nameprefixes
-Add an "LVM2_" prefix plus the field name to the output. Useful
-with \fB\-\-noheadings\fP to produce a list of field=value pairs that can
-be used to set environment variables (for example, in \fBudev\fP(7) rules).
-.TP
-.B \-\-noheadings
-Suppress the headings line that is normally the first line of output.
-Useful if grepping the output.
-.TP
-.B \-\-nosuffix
-Suppress the suffix on output sizes. Use with \fB\-\-units\fP
-(except h and H) if processing the output.
-.TP
-.BR \-o ", " \-\-options
-Comma-separated ordered list of columns.
-.IP
-Precede the list with '\fI+\fP' to append to the current list
-of columns, '\fI-\fP' to remove from the current list of columns
-or '\fI#\fP' to compact given columns. The \fI\-o\fP option can
-be repeated, providing several lists. These lists are evaluated
-from left to right.
-.IP
-Use \fB-o pv_all\fP to select all physical volume columns,
-and \fB-o pvseg_all\fP to select all Physical Volume segment columns.
-.IP
-Use \fB-o help\fP to view the full list of columns available.
-.IP
-Column names include: pv_fmt, pv_uuid, dev_size, pv_name, pv_mda_free,
-pv_mda_size, pv_ba_start, pv_ba_size, pe_start, pv_size, pv_free, pv_used,
-pv_attr, pv_pe_count, pv_pe_alloc_count, pv_tags, pv_mda_count,
-pv_mda_used_count, pvseg_start, and pvseg_size
-.IP
-With \fB\-\-segments\fP, any "pvseg_" prefixes are optional; otherwise any
-"pv_" prefixes are optional. Columns mentioned in \fBvgs\fP(8) can also
-be chosen. The pv_attr bits are: (a)llocatable, e(x)ported, (m)issing,
-(u)sed (but not allocatable), (d)uplicate.
-.TP
-.B \-\-segments
-Produces one line of output for each contiguous allocation of space on each
-Physical Volume, showing the start (pvseg_start) and length (pvseg_size) in
-units of physical extents.
-.TP
-.BR \-S ", " \-\-select " " \fISelection
-Display only rows that match Selection criteria. All rows are displayed with
-the additional "selected" column (\fB-o selected\fP) showing 1 if the row
-matches the Selection and 0 otherwise. The Selection criteria are defined
-by specifying column names and their valid values (that can include reserved
-values) while making use of supported comparison operators. See \fBlvm\fP(8)
-and \fB\-S\fP, \fB\-\-select\fP description for more detailed information
-about constructing the Selection criteria. As a quick help and to see full
-list of column names that can be used in Selection including the list of
-reserved values and the set of supported selection operators, check the
-output of \fBpvs -S help\fP command.
-.TP
-.BR \-O ", " \-\-sort
-Comma-separated ordered list of columns to sort by. Replaces the default
-selection. Precede any column with '\fI\-\fP' for a reverse sort on that
-column.
-.TP
-.B \-\-rows
-Output columns as rows.
-.TP
-.B \-\-separator \fISeparator
-String to use to separate each column. Useful if grepping the output.
-.TP
-.B \-\-unbuffered
-Produce output immediately without sorting or aligning the columns properly.
-.TP
-.B \-\-units \fIhHbBsSkKmMgGtTpPeE
-All sizes are output in these units: (h)uman-readable, (b)ytes, (s)ectors,
-(k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes.
-Capitalise to use multiples of 1000 (S.I.) instead of 1024. Can also specify
-custom units e.g. \-\-units 3M
-.TP
-.B \-\-unquoted
-When used with \fB\-\-nameprefixes\fP, output values in the field=value
-pairs are not quoted.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvdisplay (8),
-.BR lvs (8),
-.BR vgs (8)
diff --git a/man/pvscan.8.des b/man/pvscan.8.des
new file mode 100644
index 0000000..ab8c50c
--- /dev/null
+++ b/man/pvscan.8.des
@@ -0,0 +1,105 @@
+pvscan scans all supported LVM block devices in the system for PVs.
+
+\fBScanning with lvmetad\fP
+
+pvscan operates differently when used with the
+.BR lvmetad (8)
+daemon.
+
+Scanning disks is required to read LVM metadata and identify LVM PVs.
+Once read, lvmetad caches the metadata so that LVM commands can read it
+without repeatedly scanning disks. This is helpful because scanning disks
+is time consuming, and frequent scanning may interfere with the normal
+work of the system and disks.
+
+When lvmetad is not used, LVM commands revert to scanning disks to read
+metadata. Any LVM command that needs metadata will scan disks for it;
+running the pvscan command is not necessary for the sake of other LVM
+commands.
+
+When lvmetad is used, LVM commands avoid scanning disks by reading
+metadata from lvmetad. When new disks appear, they must be scanned so
+their metadata can be cached in lvmetad. This is done by the command
+pvscan \-\-cache, which scans disks and passes the metadata to lvmetad.
+
+The pvscan \-\-cache command is typically run automatically by system
+services when a new device appears. Users do not generally need to run
+this command if the system and lvmetad are running properly.
+
+Many scripts contain unnecessary pvscan (or vgscan) commands for
+historical reasons. To avoid disrupting the system with extraneous disk
+scanning, an ordinary pvscan (without \-\-cache) will simply read metadata
+from lvmetad like other LVM commands. It does not do anything beyond
+displaying the current state of the cache.
+
+.IP \[bu] 2
+When given specific device name arguments, pvscan \-\-cache will only
+read the named devices.
+
+.IP \[bu] 2
+LVM udev rules and systemd services are used to initiate automatic device
+scanning.
+
+.IP \[bu] 2
+To prevent devices from being scanned by pvscan --cache, add them
+to
+.BR lvm.conf (5)
+.B devices/global_filter.
+The devices/filter setting does not
+apply to system level scanning.
+For more information, see:
+.br
+.B lvmconfig --withcomments devices/global_filter
+
+.IP \[bu] 2
+If lvmetad is started or restarted after devices are visible, or
+if the global_filter has changed, then all devices must be rescanned
+for metadata with the command pvscan \-\-cache.
+
+.IP \[bu] 2
+lvmetad does not cache older metadata formats, e.g. lvm1, and will
+be temporarily disabled if they are seen.
+
+.IP \[bu] 2
+To notify lvmetad about a device that is no longer present, the major and
+minor numbers must be given, not the path.
+
+.P
+
+\fBAutomatic activation\fP
+
+When event-driven system services detect a new LVM device, the first step
+is to automatically scan and cache the metadata from the device. This is
+done by pvscan \-\-cache. A second step is to automatically activate LVs
+that are present on the new device. This auto-activation is done by the
+same pvscan \-\-cache command when the option '\-a|\-\-activate ay' is
+included.
+
+Auto-activation of VGs or LVs can be enabled/disabled using:
+.br
+.BR lvm.conf (5)
+.B activation/auto_activation_volume_list
+
+For more information, see:
+.br
+.B lvmconfig --withcomments activation/auto_activation_volume_list
+
+When this setting is undefined, all LVs are auto-activated (when lvm is
+fully integrated with the event-driven system services.)
+
+When a VG or LV is not auto-activated, traditional activation using
+vgchange or lvchange -a|--activate is needed.
+
+.IP \[bu] 2
+pvscan auto-activation can be only done in combination with \-\-cache.
+
+.IP \[bu] 2
+Auto-activation is designated by the "a" argument in '-a|--activate ay'.
+This is meant to distinguish system generated commands from explicit user
+commands, although it can be used in any activation command. Whenever it
+is used, the auto_activation_volume_list is applied.
+
+.IP \[bu] 2
+Auto-activation is not yet supported for LVs that are part of partial or
+clustered volume groups.
+
diff --git a/man/pvscan.8.in b/man/pvscan.8.in
deleted file mode 100644
index 5ff5fa5..0000000
--- a/man/pvscan.8.in
+++ /dev/null
@@ -1,178 +0,0 @@
-.TH PVSCAN 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvscan \(em scan all disks for physical volumes
-
-.SH SYNOPSIS
-.B pvscan
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-e | \-\-exported ]
-.RB [ \-n | \-\-novolumegroup ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-s | \-\-short ]
-.RB [ \-u | \-\-uuid ]
-.BR
-
-.B pvscan
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.B \-\-cache
-.RB [ \-a | \-\-activate " " \fIay ]
-.RB [ \-b | \-\-background ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-major
-.I major
-.B \-\-minor
-.I minor
-|
-.IR DevicePath
-|
-.IR major:minor ]...
-
-.SH DESCRIPTION
-pvscan scans all supported LVM block devices in the system for physical
-volumes.
-
-.SS Scanning with lvmetad
-
-pvscan operates differently when used with the
-.BR lvmetad (8)
-daemon.
-
-Scanning disks is required to read LVM metadata and identify LVM PVs.
-Once read, lvmetad caches the metadata so that LVM commands can read it
-without repeatedly scanning disks. This is helpful because scanning disks
-is time consuming, and frequent scanning may interfere with the normal
-work of the system and disks.
-
-When lvmetad is not used, LVM commands revert to scanning disks to read
-metadata. Any LVM command that needs metadata will scan disks for it;
-running the pvscan command is not necessary for the sake of other LVM
-commands.
-
-When lvmetad is used, LVM commands avoid scanning disks by reading
-metadata from lvmetad. When new disks appear, they must be scanned so
-their metadata can be cached in lvmetad. This is done by the command
-pvscan \-\-cache, which scans disks and passes the metadata to lvmetad.
-
-The pvscan \-\-cache command is typically run automatically by system
-services when a new device appears. Users do not generally need to run
-this command if the system and lvmetad are running properly.
-
-Many scripts contain unnecessary pvscan (or vgscan) commands for
-historical reasons. To avoid disrupting the system with extraneous disk
-scanning, an ordinary pvscan (without \-\-cache) will simply read metadata
-from lvmetad like other LVM commands. It does not do anything beyond
-displaying the current state of the cache.
-
-.I Notes
-
-.IP \[bu] 2
-When given specific device name arguments, pvscan \-\-cache will only
-read the named devices.
-
-.IP \[bu] 2
-LVM udev rules and systemd services are used to initiate automatic device
-scanning.
-
-.IP \[bu] 2
-To prevent devices from being scanned by pvscan --cache, add them
-to
-.BR lvm.conf (5)
-.B devices/global_filter.
-The devices/filter setting does not
-apply to system level scanning.
-For more information, see:
-.br
-.B lvmconfig --withcomments devices/global_filter
-
-.IP \[bu] 2
-If lvmetad is started or restarted after devices are visible, or
-if the global_filter has changed, then all devices must be rescanned
-for metadata with the command pvscan \-\-cache.
-
-.IP \[bu] 2
-lvmetad does not cache older metadata formats, e.g. lvm1, and will
-be temporarily disabled if they are seen.
-
-.IP \[bu] 2
-To notify lvmetad about a device that is no longer present, the major and
-minor numbers must be given, not the path.
-
-.SS Automatic activation
-
-When event-driven system services detect a new LVM device, the first step
-is to automatically scan and cache the metadata from the device. This is
-done by pvscan \-\-cache. A second step is to automatically activate LVs
-that are present on the new device. This auto-activation is done by the
-same pvscan \-\-cache command when the option '\-a|\-\-activate ay' is
-included.
-
-Auto-activation of VGs or LVs can be enabled/disabled using:
-.br
-.BR lvm.conf (5)
-.B activation/auto_activation_volume_list
-
-For more information, see:
-.br
-.B lvmconfig --withcomments activation/auto_activation_volume_list
-
-When this setting is undefined, all LVs are auto-activated (when lvm is
-fully integrated with the event-driven system services.)
-
-When a VG or LV is not auto-activated, traditional activation using
-vgchange or lvchange -a|--activate is needed.
-
-.I Notes
-
-.IP \[bu] 2
-pvscan auto-activation can be only done in combination with \-\-cache.
-
-.IP \[bu] 2
-Auto-activation is designated by the "a" argument in '-a|--activate ay'.
-This is meant to distinguish system generated commands from explicit user
-commands, although it can be used in any activation command. Whenever it
-is used, the auto_activation_volume_list is applied.
-
-.IP \[bu] 2
-Auto-activation is not yet supported for LVs that are part of partial or
-clustered volume groups.
-
-.P
-
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-e ", " \-\-exported
-Only show physical volumes belonging to exported volume groups.
-.TP
-.BR \-n ", " \-\-novolumegroup
-Only show physical volumes not belonging to any volume group.
-.TP
-.BR \-s ", " \-\-short
-Short listing format.
-.TP
-.BR \-u ", " \-\-uuid
-Show UUIDs in addition to device names.
-.TP
-.BR \-a ", " \-\-activate " " \fIay
-Automatically activate any logical volumes that are possible to activate
-with the addition of the new devices.
-.TP
-.BR \-b ", " \-\-background
-Run the command in the background.
-.TP
-.BR \-\-cache " [" \-\-major " " \fImajor " " \-\-minor " " \fIminor " | " \fIDevicePath " | " \fImajor:minor " ]..."
-Scan one or more devices and send the metadata to lvmetad.
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvmconfig (8),
-.BR lvmetad (8)
diff --git a/man/see_also.end b/man/see_also.end
new file mode 100644
index 0000000..70eeb89
--- /dev/null
+++ b/man/see_also.end
@@ -0,0 +1,67 @@
+.SH SEE ALSO
+
+.BR lvm (8)
+.BR lvm.conf (5)
+.BR lvmconfig (8)
+
+.BR pvchange (8)
+.BR pvck (8)
+.BR pvcreate (8)
+.BR pvdisplay (8)
+.BR pvmove (8)
+.BR pvremove (8)
+.BR pvresize (8)
+.BR pvs (8)
+.BR pvscan (8)
+
+.BR vgcfgbackup (8)
+.BR vgcfgrestore (8)
+.BR vgchange (8)
+.BR vgck (8)
+.BR vgcreate (8)
+.BR vgconvert (8)
+.BR vgdisplay (8)
+.BR vgexport (8)
+.BR vgextend (8)
+.BR vgimport (8)
+.BR vgimportclone (8)
+.BR vgmerge (8)
+.BR vgmknodes (8)
+.BR vgreduce (8)
+.BR vgremove (8)
+.BR vgrename (8)
+.BR vgs (8)
+.BR vgscan (8)
+.BR vgsplit (8)
+
+.BR lvcreate (8)
+.BR lvchange (8)
+.BR lvconvert (8)
+.BR lvdisplay (8)
+.BR lvextend (8)
+.BR lvreduce (8)
+.BR lvremove (8)
+.BR lvrename (8)
+.BR lvresize (8)
+.BR lvs (8)
+.BR lvscan (8)
+
+.BR lvm2-activation-generator (8)
+.BR blkdeactivate (8)
+.BR lvmdump (8)
+
+.BR dmeventd (8)
+.BR lvmetad (8)
+.BR lvmpolld (8)
+.BR lvmlockd (8)
+.BR lvmlockctl (8)
+.BR clvmd (8)
+.BR cmirrord (8)
+.BR lvmdbusd (8)
+
+.BR lvmsystemid (7)
+.BR lvmreport (7)
+.BR lvmraid (7)
+.BR lvmthin (7)
+.BR lvmcache (7)
+
diff --git a/man/vgcfgbackup.8.des b/man/vgcfgbackup.8.des
new file mode 100644
index 0000000..0720e01
--- /dev/null
+++ b/man/vgcfgbackup.8.des
@@ -0,0 +1,16 @@
+vgcfgbackup creates back up files containing metadata of VGs.
+If no VGs are named, back up files are created for all VGs.
+See \fBvgcfgrestore\fP for information on using the back up
+files.
+
+In a default installation, each VG is backed up into a separate file
+bearing the name of the VG in the directory \fI#DEFAULT_BACKUP_DIR#\fP.
+
+To use an alternative back up file, use \fB\-f\fP. In this case, when
+backing up multiple VGs, the file name is treated as a template, with %s
+replaced by the VG name.
+
+NB. This DOES NOT back up the data content of LVs.
+
+It may also be useful to regularly back up the files in
+\fI#DEFAULT_SYS_DIR#\fP.
diff --git a/man/vgcfgbackup.8.in b/man/vgcfgbackup.8.in
deleted file mode 100644
index c6f20d9..0000000
--- a/man/vgcfgbackup.8.in
+++ /dev/null
@@ -1,36 +0,0 @@
-.TH VGCFGBACKUP 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgcfgbackup \(em backup volume group descriptor area
-.SH SYNOPSIS
-.B vgcfgbackup
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-f | \-\-file
-.IR Filename ]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-v | \-\-verbose ]
-.RI [ VolumeGroupName ...]
-.SH DESCRIPTION
-vgcfgbackup allows you to backup the metadata of your volume groups.
-If you don't name any volume groups on the command line, all of them
-will be backed up.
-.sp
-In a default installation, each volume group gets backed up into a separate
-file bearing the name of the volume group in the directory
-\fI#DEFAULT_BACKUP_DIR#\fP.
-You can write the backup to an alternative file using \fB\-f\fP. In this case
-if you are backing up more than one volume group the filename is
-treated as a template, and %s gets replaced by the volume group name.
-.sp
-NB. This DOESN'T backup user/system data in logical
-volume(s)! Backup \fI#DEFAULT_SYS_DIR#\fP regularly too.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgcfgrestore (8)
diff --git a/man/vgcfgrestore.8.des b/man/vgcfgrestore.8.des
new file mode 100644
index 0000000..cb7867d
--- /dev/null
+++ b/man/vgcfgrestore.8.des
@@ -0,0 +1,8 @@
+vgcfgrestore restores the metadata of a VG from a text back up file
+produced by \fBvgcfgbackup\fP. This writes VG metadata onto the devices
+specifed in back up file.
+
+A back up file can be specified with \fB\-\-file\fP. If no backup file is
+specified, the most recent one is used. Use \fB\-\-list\fP for a list of
+the available back up and archive files of a VG.
+
diff --git a/man/vgcfgrestore.8.end b/man/vgcfgrestore.8.end
new file mode 100644
index 0000000..5ac451d
--- /dev/null
+++ b/man/vgcfgrestore.8.end
@@ -0,0 +1,9 @@
+.SH NOTES
+
+To replace PVs, \fBvgdisplay \-\-partial \-\-verbose\fP will show the
+UUIDs and sizes of any PVs that are no longer present. If a PV in the VG
+is lost and you wish to substitute another of the same size, use
+\fBpvcreate \-\-restorefile filename \-\-uuid uuid\fP (plus additional
+arguments as appropriate) to initialise it with the same UUID as the
+missing PV. Repeat for all other missing PVs in the VG. Then use
+\fBvgcfgrestore \-\-file filename\fP to restore the VG's metadata.
diff --git a/man/vgcfgrestore.8.in b/man/vgcfgrestore.8.in
deleted file mode 100644
index 96b0a10..0000000
--- a/man/vgcfgrestore.8.in
+++ /dev/null
@@ -1,58 +0,0 @@
-.TH VGCFGRESTORE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgcfgrestore \(em restore volume group descriptor area
-.SH SYNOPSIS
-.B vgcfgrestore
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-f | \-\-file
-.RI < filename >]
-.RB [ \-\-force ]
-.RB [ \-l [ l ]| \-\-list ]
-.RB [ \-h | \-\-help ]
-.RB [ \-M | \-\-metadatatype
-.IR 1 | 2 ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RI \fIVolumeGroupName\fP
-.SH DESCRIPTION
-vgcfgrestore allows you to restore the metadata of \fIVolumeGroupName\fP
-from a text backup file produced by \fBvgcfgbackup\fP.
-You can specify a backup file with \fB\-\-file\fP.
-If no backup file is specified, the most recent
-one is used. Use \fB\-\-list\fP for a list of the available
-backup and archive files of \fIVolumeGroupName\fP.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-l ", " \-\-list\fP
-List files pertaining to \fIVolumeGroupName\fP
-List metadata backup and archive files pertaining to \fIVolumeGroupName\fP.
-May be used with the \fB\-f\fP option. Does not restore \fIVolumeGroupName\fP.
-.TP
-.BR \-f ", " \-\-file " " \fIfilename
-Name of LVM metadata backup file
-Specifies a metadata backup or archive file to be used for restoring
-VolumeGroupName. Often this file has been created with \fBvgcfgbackup\fP.
-.TP
-.B \-\-force
-Necessary to restore metadata with thin pool volumes.
-.br
-\fBWARNING: Use with extreme caution.
-Most changes to thin metadata cannot be reverted.
-You may lose data if you restore metadata that does not match the thin pool
-kernel metadata precisely.\fP
-.SH REPLACING PHYSICAL VOLUMES
-\fBvgdisplay \-\-partial \-\-verbose\fP will show you the UUIDs and sizes of
-any PVs that are no longer present.
-If a PV in the VG is lost and you wish to substitute
-another of the same size, use
-\fBpvcreate \-\-restorefile filename \-\-uuid uuid\fP (plus additional
-arguments as appropriate) to initialise it with the same UUID as
-the missing PV. Repeat for all other missing PVs in the VG.
-Then use \fBvgcfgrestore \-\-file filename\fP to restore the volume
-group's metadata.
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgcreate (8)
diff --git a/man/vgchange.8.des b/man/vgchange.8.des
new file mode 100644
index 0000000..6b873d8
--- /dev/null
+++ b/man/vgchange.8.des
@@ -0,0 +1,2 @@
+vgchange changes VG attributes, changes LV activation in the kernel, and
+includes other utilities for VG maintenance.
diff --git a/man/vgchange.8.end b/man/vgchange.8.end
new file mode 100644
index 0000000..a11bdd1
--- /dev/null
+++ b/man/vgchange.8.end
@@ -0,0 +1,16 @@
+.SH NOTES
+
+If vgchange recognizes COW snapshot LVs that were dropped because they ran
+out of space, it displays a message informing the administrator that the
+snapshots should be removed.
+
+.SH EXAMPLES
+
+Activate all LVs in all VGs on all existing devices.
+.br
+.B vgchange \-a y
+
+Change the maximum number of LVs for an inactive VG.
+.br
+.B vgchange \-l 128 vg00
+
diff --git a/man/vgchange.8.in b/man/vgchange.8.in
deleted file mode 100644
index 3b2fc3e..0000000
--- a/man/vgchange.8.in
+++ /dev/null
@@ -1,346 +0,0 @@
-.TH VGCHANGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgchange \(em change attributes of a volume group
-.SH SYNOPSIS
-.B vgchange
-.RB [ \-\-addtag
-.IR Tag ]
-.RB [ \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-a | \-\-activate
-.RI [ a | e | s | l ]
-.RI { y | n }]
-.RB [ \-\-activationmode
-.IB { complete | degraded | partial } ]
-.RB [ \-K | \-\-ignoreactivationskip ]
-.RB [ \-\-monitor
-.RI { y | n }]
-.RB [ \-\-poll
-.RI { y | n }]
-.RB [ \-c | \-\-clustered
-.RI { y | n }]
-.RB [ \-u | \-\-uuid ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-\-deltag
-.IR Tag ]
-.RB [ \-\-detachprofile ]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoremonitoring ]
-.RB [ \-\-ignoreskippedcluster ]
-.RB [ \-\-sysinit ]
-.RB [ \-\-noudevsync ]
-.RB [ \-\-lock\-start ]
-.RB [ \-\-lock\-stop ]
-.RB [ \-\-lock\-type
-.IR LockType ]
-.RB [ \-l | \-\-logicalvolume
-.IR MaxLogicalVolumes ]
-.RB [ \-p | \-\-maxphysicalvolumes
-.IR MaxPhysicalVolumes ]
-.RB [ \-\-metadataprofile
-.IR ProfileName ]
-.RB [ \-\- [ vg ] metadatacopies
-.IR NumberOfCopies | unmanaged | all ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-s | \-\-physicalextentsize
-.IR PhysicalExtentSize [ bBsSkKmMgGtTpPeE ]]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB [ \-\-systemid
-.IR SystemID ]
-.RB [ \-\-refresh ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-x | \-\-resizeable
-.RI { y | n }]
-.RI [ VolumeGroupName ...]
-.SH DESCRIPTION
-vgchange allows you to change the attributes of one or more
-volume groups. Its main purpose is to activate and deactivate
-.IR VolumeGroupName ,
-or all volume groups if none is specified. Only active volume groups
-are subject to changes and allow access to their logical volumes.
-[Not yet implemented: During volume group activation, if
-.B vgchange
-recognizes snapshot logical volumes which were dropped because they ran
-out of space, it displays a message informing the administrator that such
-snapshots should be removed (see
-.BR lvremove (8)).
-]
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-A ", " \-\-autobackup " {" \fIy | \fIn }
-Controls automatic backup of metadata after the change. See
-.BR vgcfgbackup (8).
-Default is yes.
-.TP
-.BR \-a ", " \-\-activate " [" \fIa | \fIe | \fIs | \fIl ]{ \fIy | \fIn }
-Controls the availability of the logical volumes in the volume
-group for input/output.
-In other words, makes the logical volumes known/unknown to the kernel.
-If autoactivation option is used (\-aay), each logical volume in
-the volume group is activated only if it matches an item in the
-activation/auto_activation_volume_list set in lvm.conf. If this
-list is not set, then all volumes are considered for activation.
-The \-aay option should be also used during system boot so it's
-possible to select which volumes to activate using the
-activation/auto_activation_volume_list settting.
-.IP
-Activation of a logical volume creates a symbolic link
-/dev/VolumeGroupName/LogicalVolumeName pointing to the device node.
-This link is removed on deactivation.
-All software and scripts should access the device through
-this symbolic link and present this as the name of the device.
-The location and name of the underlying device node may depend on
-the distribution and configuration (e.g. udev) and might change
-from release to release.
-.IP
-In a clustered VG, clvmd is used for activation, and the
-following options are possible:
-
-With \-aey, clvmd activates the LV in exclusive mode
-(with an exclusive lock), allowing a single node to activate the LV.
-
-With \-asy, clvmd activates the LV in shared mode
-(with a shared lock), allowing multiple nodes to activate the LV concurrently.
-If the LV type prohibits shared access, such as an LV with a snapshot,
-the 's' option is ignored and an exclusive lock is used.
-
-With \-ay (no mode specified), clvmd activates the LV in shared mode
-if the LV type allows concurrent access, such as a linear LV.
-Otherwise, clvmd activates the LV in exclusive mode.
-
-With \-aey, \-asy, and \-ay, clvmd attempts to activate the LV
-on all nodes. If exclusive mode is used, then only one of the
-nodes will be successful.
-
-With \-an, clvmd attempts to deactivate the LV on all nodes.
-
-With \-aly, clvmd activates the LV only on the local node, and \-aln
-deactivates only on the local node. If the LV type allows concurrent
-access, then shared mode is used, otherwise exclusive.
-
-LVs with snapshots are always activated exclusively because they can only
-be used on one node at once.
-
-For local VGs, \-ay, \-aey, and \-asy are all equivalent.
-.IP
-In a shared VG, lvmlockd is used for locking if LVM is compiled with lockd
-support, and the following options are possible:
-
-With \-aey, the command activates the LV in exclusive mode, allowing a
-single host to activate the LV (the host running the command). Before
-activating the LV, the command uses lvmlockd to acquire an exclusive lock
-on the LV. If the lock cannot be acquired, the LV is not activated and an
-error is reported. This would happen if the LV is active on another host.
-
-With \-asy, the command activates the LV in shared mode, allowing multiple
-hosts to activate the LV concurrently. Before activating the LV, the
-command uses lvmlockd to acquire a shared lock on the LV. If the lock
-cannot be acquired, the LV is not activated and an error is reported.
-This would happen if the LV is active exclusively on another host. If the
-LV type prohibits shared access, such as a snapshot, the command will
-report an error and fail.
-
-With \-an, the command deactivates the LV on the host running the command.
-After deactivating the LV, the command uses lvmlockd to release the
-current lock on the LV.
-
-With lvmlockd, an unspecified mode is always exclusive, \-ay defaults to
-\-aey.
-
-.TP
-.BR \-\-activationmode " {" \fIcomplete | \fIdegraded | \fIpartial }
-The activation mode determines whether logical volumes are allowed to
-activate when there are physical volumes missing (e.g. due to a device
-failure). \fIcomplete\fP is the most restrictive; allowing only those
-logical volumes to be activated that are not affected by the missing
-PVs. \fIdegraded\fP allows RAID logical volumes to be activated even if
-they have PVs missing. (Note that the "mirror" segment type is not
-considered a RAID logical volume. The "raid1" segment type should
-be used instead.) Finally, \fIpartial\fP allows any logical volume to
-be activated even if portions are missing due to a missing or failed
-PV. This last option should only be used when performing recovery or
-repair operations. \fIdegraded\fP is the default mode. To change it, modify
-.B activation_mode
-in
-.BR lvm.conf (5).
-.TP
-.BR \-K ", " \-\-ignoreactivationskip
-Ignore the flag to skip Logical Volumes during activation.
-.TP
-.BR \-c ", " \-\-clustered " {" \fIy | \fIn }
-If clustered locking is enabled, this indicates whether this
-Volume Group is shared with other nodes in the cluster or whether
-it contains only local disks that are not visible on the other nodes.
-If the cluster infrastructure is unavailable on a particular node at a
-particular time, you may still be able to use Volume Groups that
-are not marked as clustered.
-.TP
-.BR \-\-detachprofile
-Detach any metadata configuration profiles attached to given
-Volume Groups. See \fBlvm.conf\fP(5) for more information
-about \fBmetadata profiles\fP.
-.TP
-.BR \-u ", " \-\-uuid
-Generate new random UUID for specified Volume Groups.
-.TP
-.BR \-\-monitor " {" \fIy | \fIn }
-Start or stop monitoring a mirrored or snapshot logical volume with
-dmeventd, if it is installed.
-If a device used by a monitored mirror reports an I/O error,
-the failure is handled according to
-.B mirror_image_fault_policy
-and
-.B mirror_log_fault_policy
-set in
-.BR lvm.conf (5).
-.TP
-.BR \-\-poll " {" \fIy | \fIn }
-Without polling a logical volume's backgrounded transformation process
-will never complete. If there is an incomplete pvmove or lvconvert (for
-example, on rebooting after a crash), use \fB\-\-poll y\fP to restart the
-process from its last checkpoint. However, it may not be appropriate to
-immediately poll a logical volume when it is activated, use
-\fB\-\-poll n\fP to defer and then \fB\-\-poll y\fP to restart the process.
-.TP
-.BR \-\-sysinit
-Indicates that vgchange(8) is being invoked from early system initialisation
-scripts (e.g. rc.sysinit or an initrd), before writeable filesystems are
-available. As such, some functionality needs to be disabled and this option
-acts as a shortcut which selects an appropriate set of options. Currently
-this is equivalent to using
-.BR \-\-ignorelockingfailure ,
-.BR \-\-ignoremonitoring ,
-.B \-\-poll n
-and setting \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
-environment variable.
-
-If \fB\-\-sysinit\fP is used in conjunction with lvmetad(8) enabled and running,
-autoactivation is preferred over manual activation via direct vgchange call.
-Logical volumes are autoactivated according to auto_activation_volume_list
-set in lvm.conf(5).
-.TP
-.BR \-\-noudevsync
-Disable udev synchronisation. The
-process will not wait for notification from udev.
-It 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.
-.TP
-.BR \-\-ignoremonitoring
-Make no attempt to interact with dmeventd unless
-.BR \-\-monitor
-is specified.
-Do not use this if dmeventd is already monitoring a device.
-.TP
-.BR \-\-lock\-start
-Start the lockspace of a shared VG in lvmlockd. lvmlockd locks becomes
-available for the VG, allowing LVM to use the VG. See
-.BR lvmlockd (8).
-.TP
-.BR \-\-lock\-stop
-Stop the lockspace of a shared VG in lvmlockd. lvmlockd locks become
-unavailable for the VG, preventing LVM from using the VG. See
-.BR lvmlockd (8).
-.TP
-.BR \-\-lock\-type " " \fILockType
-Change the VG lock type to or from a shared lock type used with lvmlockd. See
-.BR lvmlockd (8).
-.TP
-.BR \-l ", " \-\-logicalvolume " " \fIMaxLogicalVolumes
-Changes the maximum logical volume number of an existing inactive
-volume group.
-.TP
-.BR \-p ", " \-\-maxphysicalvolumes " " \fIMaxPhysicalVolumes
-Changes the maximum number of physical volumes that can belong
-to this volume group.
-For volume groups with metadata in lvm1 format, the limit is 255.
-If the metadata uses lvm2 format, the value 0 removes this restriction:
-there is then no limit. If you have a large number of physical volumes in
-a volume group with metadata in lvm2 format, for tool performance reasons,
-you should consider some use of \fB\-\-pvmetadatacopies 0\fP as described in
-\fBpvcreate(8)\fP, and/or use \fB\-\-vgmetadatacopies\fP.
-.TP
-.BR \-\-metadataprofile " " \fIProfileName
-Uses and attaches ProfileName configuration profile to the volume group
-metadata. Whenever the volume group is processed next time, the profile
-is automatically applied. The profile is inherited by all logical volumes
-in the volume group unless the logical volume itself has its own profile
-attached. See \fBlvm.conf\fP(5) for more information about \fBmetadata profiles\fP.
-.TP
-.BR \-\- [ vg ] metadatacopies " " \fINumberOfCopies | \fIunmanaged | \fIall
-Sets the desired number of metadata copies in the volume group. If set to
-a non-zero value, LVM will automatically manage the 'metadataignore'
-flags on the physical volumes (see \fBpvchange\fP or \fBpvcreate \-\-metadataignore\fP) in order
-to achieve \fINumberOfCopies\fP copies of metadata. If set to \fIunmanaged\fP,
-LVM will not automatically manage the 'metadataignore' flags. If set to
-\fIall\fP, LVM will first clear all of the 'metadataignore' flags on all
-metadata areas in the volume group, then set the value to \fIunmanaged\fP.
-The \fBvgmetadatacopies\fP 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.
-.TP
-.BR \-s ", " \-\-physicalextentsize " " \fIPhysicalExtentSize [ \fIBbBsSkKmMgGtTpPeE ]
-Changes the physical extent size on physical volumes of this volume group.
-A size suffix (k for kilobytes up to t for terabytes) is optional, megabytes
-is the default if no suffix is present. For LVM2 format, the value must be a
-power of 2 of at least 1 sector (where the sector size is the largest sector
-size of the PVs currently used in the VG) or, if not a power of 2, at least
-128KiB. For the older LVM1 format, it must be a power of 2 of at least 8KiB.
-The default is 4 MiB.
-
-Before increasing the physical extent size, you might need to use lvresize,
-pvresize and/or pvmove so that everything fits. For example, every
-contiguous range of extents used in a logical volume must start and
-end on an extent boundary.
-
-If the volume group metadata uses lvm1 format, extents can vary in size from
-8KiB to 16GiB and there is a limit of 65534 extents in each logical volume.
-The default of 4 MiB leads to a maximum logical volume size of around 256GiB.
-
-If the volume group metadata uses lvm2 format those restrictions do not apply,
-but having a large number of extents will slow down the tools but have no
-impact on I/O performance to the logical volume. The smallest PE is 1KiB.
-
-The 2.4 kernel has a limitation of 2TiB per block device.
-.TP
-.BR \-\-systemid " " \fISystemID
-Changes the system ID of the VG. Using this option requires caution
-because the VG may become foreign to the host running the command,
-leaving the host unable to access it. See
-.BR lvmsystemid (7).
-.TP
-.BR \-\-refresh
-If any logical volume in the volume group is active, reload its metadata.
-This is not necessary in normal operation, but may be useful
-if something has gone wrong or if you're doing clustering
-manually without a clustered lock manager.
-.TP
-.BR \-x ", " \-\-resizeable " {" \fIy | \fIn }
-Enables or disables the extension/reduction of this volume group
-with/by physical volumes.
-.SH Examples
-To activate all known volume groups in the system:
-.sp
-.B vgchange \-a y
-
-To change the maximum number of logical volumes of inactive volume group
-vg00 to 128.
-.sp
-.B vgchange \-l 128 /dev/vg00
-
-
-.SH SEE ALSO
-.BR lvchange (8),
-.BR lvm (8),
-.BR vgcreate (8)
diff --git a/man/vgck.8.des b/man/vgck.8.des
new file mode 100644
index 0000000..24e1dbe
--- /dev/null
+++ b/man/vgck.8.des
@@ -0,0 +1 @@
+vgck checks LVM metadata for consistency.
diff --git a/man/vgck.8.in b/man/vgck.8.in
deleted file mode 100644
index b10f57e..0000000
--- a/man/vgck.8.in
+++ /dev/null
@@ -1,22 +0,0 @@
-.TH VGCK 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgck \(em check volume group metadata
-.SH SYNOPSIS
-.B vgck
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-v | \-\-verbose ]
-.RI [ VolumeGroupName ...]
-.SH DESCRIPTION
-vgck checks LVM metadata for each named volume group for consistency.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgcreate (8),
-.BR vgchange (8),
-.BR vgscan (8)
diff --git a/man/vgconvert.8.des b/man/vgconvert.8.des
new file mode 100644
index 0000000..47bc0cc
--- /dev/null
+++ b/man/vgconvert.8.des
@@ -0,0 +1,7 @@
+vgconvert converts VG metadata from one format to another. The new
+metadata format must be able to fit into the space provided by the old
+format.
+
+Because the LVM1 format should no longer be used, this command is no
+longer needed in general.
+
diff --git a/man/vgconvert.8.in b/man/vgconvert.8.in
deleted file mode 100644
index d864483..0000000
--- a/man/vgconvert.8.in
+++ /dev/null
@@ -1,48 +0,0 @@
-.TH VGCONVERT 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgconvert \- convert volume group metadata format
-.SH SYNOPSIS
-.B vgconvert
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-labelsector ]
-.RB [ \-\-bootloaderareasize
-.IR size ]
-.RB [ \-M | \-\-metadatatype
-.IR type ]
-.RB [ \-\-pvmetadatacopies
-.IR NumberOfCopies ]
-.RB [ \-\-metadatasize
-.IR size ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-version ]
-.I VolumeGroupName
-.RI [ VolumeGroupName ...]
-.SH DESCRIPTION
-vgconvert converts
-.I VolumeGroupName
-metadata from one format to another provided that the metadata
-fits into the same space.
-.SH OPTIONS
-See \fBlvm\fP(8) and \fBpvcreate\fP(8) for options.
-.SH Examples
-Convert volume group vg1 from LVM1 metadata format to the new LVM2
-metadata format.
-.sp
-.B vgconvert \-M2 vg1
-.SH RECOVERY
-Use \fBpvscan\fP(8) to see which PVs lost their metadata.
-Run \fBpvcreate\fP(8) with the \fB\-\-uuid\fP and \fB\-\-restorefile\fP
-options on each such PV to reformat it as it was, using the archive
-file that \fBvgconvert\fP(8) created at the start of the procedure.
-Finally run \fBvgcfgrestore\fP(8) with that archive file to restore
-the original metadata.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvcreate (8),
-.BR vgcfgrestore (8)
diff --git a/man/vgcreate.8.des b/man/vgcreate.8.des
new file mode 100644
index 0000000..a2d7161
--- /dev/null
+++ b/man/vgcreate.8.des
@@ -0,0 +1,4 @@
+vgcreate creates a new VG on block devices. If the devices were not
+previously intialized as PVs with \fBpvcreate\fP(8), vgcreate will
+inititialize them, making them PVs. The pvcreate options for initializing
+devices are also available with vgcreate.
diff --git a/man/vgcreate.8.end b/man/vgcreate.8.end
new file mode 100644
index 0000000..66bcfbb
--- /dev/null
+++ b/man/vgcreate.8.end
@@ -0,0 +1,6 @@
+.SH EXAMPLES
+
+Create a VG with two PVs, using the default physical extent size.
+.br
+.B vgcreate myvg /dev/sdk1 /dev/sdl1
+
diff --git a/man/vgcreate.8.in b/man/vgcreate.8.in
deleted file mode 100644
index c66753b..0000000
--- a/man/vgcreate.8.in
+++ /dev/null
@@ -1,187 +0,0 @@
-.TH VGCREATE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgcreate \(em create a volume group
-.SH SYNOPSIS
-.B vgcreate
-.RB [ \-\-addtag
-.IR Tag ]
-.RB [ \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-c | \-\-clustered
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-l | \-\-maxlogicalvolumes
-.IR MaxLogicalVolumes ]
-.RB [ \-M | \-\-metadatatype
-.IR type ]
-.RB [ \-\-metadataprofile
-.IR ProfileName ]
-.RB [ \-p | \-\-maxphysicalvolumes
-.IR MaxPhysicalVolumes ]
-.RB [ \-\- [ vg ] metadatacopies
-.IR NumberOfCopies | unmanaged | all ]
-.RB [ \-s | \-\-physicalextentsize
-.IR PhysicalExtentSize [ bBsSkKmMgGtTpPeE ]]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-shared ]
-.RB [ \-\-systemid
-.IR SystemID ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ "PHYSICAL DEVICE OPTIONS" ]
-.I VolumeGroupName PhysicalDevicePath
-.RI [ PhysicalDevicePath ...]
-.SH DESCRIPTION
-vgcreate creates a new volume group called
-.I VolumeGroupName
-using the block special device \fIPhysicalDevicePath\fP.
-.sp
-If \fIPhysicalDevicePath\fP was not previously configured for LVM with
-\fBpvcreate\fP(8), the device will be initialized with the same
-default values used with \fBpvcreate\fP(8). If non-default
-\fPpvcreate\fP values are desired, they may be given on the
-commandline with the same options as \fBpvcreate\fP(8). See
-.B PHYSICAL DEVICE OPTIONS
-for available options. Note that the restore-related options such as
-.BR \-\-restorefile ", " \-\-uuid " and " \-\-physicalvolumesize
-are not available. If a restore operation is needed, use
-\fBpvcreate\fP(8) and \fBvgcfgrestore\fP(8).
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-c ", " \-\-clustered " {" \fIy | \fIn }
-If clustered locking is enabled, this defaults to \fBy\fP indicating that
-this Volume Group is shared with other nodes in the cluster.
-
-If the new Volume Group contains only local disks that are not visible
-on the other nodes, you must specify \fB\-\-clustered\ n\fP.
-If the cluster infrastructure is unavailable on a particular node at a
-particular time, you may still be able to use such Volume Groups.
-.TP
-.BR \-l ", " \-\-maxlogicalvolumes " " \fIMaxLogicalVolumes
-Sets the maximum number of logical volumes allowed in this
-volume group.
-The setting can be changed with \fBvgchange\fP(8).
-For volume groups with metadata in lvm1 format, the limit
-and default value is 255.
-If the metadata uses lvm2 format, the default value is 0
-which removes this restriction: there is then no limit.
-.TP
-.BR \-p ", " \-\-maxphysicalvolumes " " \fIMaxPhysicalVolumes
-Sets the maximum number of physical volumes that can belong
-to this volume group.
-The setting can be changed with \fBvgchange\fP.
-For volume groups with metadata in lvm1 format, the limit
-and default value is 255.
-If the metadata uses lvm2 format, the value 0 removes this restriction:
-there is then no limit. If you have a large number of physical volumes in
-a volume group with metadata in lvm2 format, for tool performance reasons,
-you should consider some use of \fB\-\-pvmetadatacopies 0\fP as described in
-\fBpvcreate\fP(8), and/or use \fB\-\-vgmetadatacopies\fP.
-.TP
-.BR \-\- [ vg ] metadatacopies " " \fINumberOfCopies | \fIunmanaged | \fIall
-Sets the desired number of metadata copies in the volume group. If set to
-a non-zero value, LVM will automatically manage the 'metadataignore'
-flags on the physical volumes (see \fBpvcreate\fP(8) or
-\fBpvchange \-\-metadataignore\fP) in order
-to achieve \fINumberOfCopies\fP copies of metadata. If set to \fIunmanaged\fP,
-LVM will not automatically manage the 'metadataignore' flags. If set to
-\fIall\fP, LVM will first clear all of the 'metadataignore' flags on all
-metadata areas in the volume group, then set the value to \fIunmanaged\fP.
-The \fBvgmetadatacopies\fP 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.
-The default value is \fIunmanaged\fP.
-.TP
-.BR \-\-metadataprofile " " \fIProfileName
-Uses and attaches the ProfileName configuration profile to the volume group
-metadata. Whenever the volume group is processed next time, the profile is
-automatically applied. The profile is inherited by all logical volumes in
-the volume group unless the logical volume itself has its own profile attached.
-See \fBlvm.conf\fP(5) for more information about \fBmetadata profiles\fP.
-.TP
-.BR \-s ", " \-\-physicalextentsize " " \fIPhysicalExtentSize [ \fIbBsSkKmMgGtTpPeE ]
-Sets the physical extent size on physical volumes of this volume group.
-A size suffix (k for kilobytes up to t for terabytes) is optional, megabytes
-is the default if no suffix is present. For LVM2 format, the value must be a
-power of 2 of at least 1 sector (where the sector size is the largest sector
-size of the PVs currently used in the VG) or, if not a power of 2, at least
-128KiB. For the older LVM1 format, it must be a power of 2 of at least 8KiB.
-The default is 4 MiB.
-Once this value has been set, it is difficult to change it without recreating
-the volume group which would involve backing up and restoring data on any
-logical volumes. However, if no extents need moving for the new
-value to apply, it can be altered using \fBvgchange \-s\fP.
-
-If the volume group metadata uses lvm1 format, extents can vary in size from
-8KiB to 16GiB and there is a limit of 65534 extents in each logical volume. The
-default of 4 MiB leads to a maximum logical volume size of around 256GiB.
-
-If the volume group metadata uses lvm2 format those restrictions do not apply,
-but having a large number of extents will slow down the tools but have no
-impact on I/O performance to the logical volume. The smallest PE is 1KiB
-
-The 2.4 kernel has a limitation of 2TiB per block device.
-
-.TP
-.B \-\-shared
-Create a shared VG using lvmlockd if LVM is compiled with lockd support.
- lvmlockd will select lock type sanlock or dlm depending on which lock
-manager is running. This allows multiple hosts to share a VG on shared
-devices. lvmlockd and a lock manager must be configured and running. See
-.BR lvmlockd (8).
-
-.TP
-.BR \-\-systemid " " \fISystemID
-Specifies the system ID that will be given to the new VG, overriding the
-system ID of the host running the command. A VG is normally created
-without this option, in which case the new VG is given the system ID of
-the host creating it. Using this option requires caution because the
-system ID of the new VG may not match the system ID of the host running
-the command, leaving the VG inaccessible to the host. See
-.BR lvmsystemid (7).
-
-.SH PHYSICAL DEVICE OPTIONS
-The following options are available for initializing physical devices in the
-volume group. These options are further described in the \fBpvcreate\fP(8)
-man page.
-.TP
-.BR \-f ", " \-\-force
-.TP
-.BR \-y ", " \-\-yes
-.TP
-.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
-.TP
-.B \-\-labelsector \fIsector
-.TP
-.B \-\-metadatasize \fIsize
-.TP
-.B \-\-pvmetadatacopies \fIcopies
-.TP
-.B \-\-dataalignment \fIalignment
-.TP
-.B \-\-dataalignmentoffset \fIalignment_offset
-.SH Examples
-Creates a volume group named "test_vg" using physical volumes "/dev/sdk1"
-and "/dev/sdl1" with default physical extent size of 4MiB:
-.sp
-.B vgcreate test_vg /dev/sdk1 /dev/sdl1
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvdisplay (8),
-.BR pvcreate (8),
-.BR vgdisplay (8),
-.BR vgextend (8),
-.BR vgreduce (8),
-.BR lvcreate (8),
-.BR lvdisplay (8),
-.BR lvextend (8),
-.BR lvreduce (8)
diff --git a/man/vgdisplay.8.des b/man/vgdisplay.8.des
new file mode 100644
index 0000000..c42f821
--- /dev/null
+++ b/man/vgdisplay.8.des
@@ -0,0 +1,4 @@
+vgdisplay shows the attributes of VGs, and the associated PVs and LVs.
+
+\fBvgs\fP(8) is a preferred alternative that shows the same information
+and more, using a more compact and configurable output format.
diff --git a/man/vgdisplay.8.in b/man/vgdisplay.8.in
deleted file mode 100644
index 045a6ae..0000000
--- a/man/vgdisplay.8.in
+++ /dev/null
@@ -1,123 +0,0 @@
-.TH VGDISPLAY 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgdisplay \(em display attributes of volume groups
-.SH SYNOPSIS
-.B vgdisplay
-.RB [ \-A | \-\-activevolumegroups ]
-.RB [ \-c | \-\-colon ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-s | \-\-short ]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoreskippedcluster ]
-.RB [ \-\-nosuffix ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-\-version ]
-.RI [ VolumeGroupName ...]
-.br
-
-.br
-.B vgdisplay
-.BR \-C | \-\-columns
-.RB [ \-\-aligned ]
-.RB [ \-\-binary ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [[ \-\-configreport
-.IR ReportName ]
-.RB [ \-o | \-\-options
-.RI [ + | \- | # ] Field1 [, Field2 ...]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [, Key2 ...]]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB ...]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoreskippedcluster ]
-.RB [ \-\-logonly ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RI [ VolumeGroupName ...]
-.SH DESCRIPTION
-vgdisplay allows you to see the attributes of
-.I VolumeGroupName
-(or all volume groups if none is given) with it's physical and logical
-volumes and their sizes etc.
-.P
-\fBvgs\fP(8) is an alternative that provides the same information
-in the style of \fBps\fP(1).
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-A ", " \-\-activevolumegroups
-Only select the active volume groups. The volume group is considered active
-if at least one of its logical volumes is active.
-.TP
-.BR \-C ", " \-\-columns
-Display output in columns, the equivalent of \fBvgs\fP(8).
-Options listed are the same as options given in \fPvgs\fP(8).
-.TP
-.BR \-c ", " \-\-colon
-Generate colon separated output for easier parsing in scripts or programs.
-N.B. \fBvgs\fP(8) provides considerably more control over the output.
-.nf
-
-The values are:
-
-1 volume group name
-2 volume group access
-3 volume group status
-4 internal volume group number
-5 maximum number of logical volumes
-6 current number of logical volumes
-7 open count of all logical volumes in this volume group
-8 maximum logical volume size
-9 maximum number of physical volumes
-10 current number of physical volumes
-11 actual number of physical volumes
-12 size of volume group in kilobytes
-13 physical extent size
-14 total number of physical extents for this volume group
-15 allocated number of physical extents for this volume group
-16 free number of physical extents for this volume group
-17 uuid of volume group
-
-.fi
-.TP
-.BR \-s ", " \-\-short
-Give a short listing showing the existence of volume groups.
-.TP
-.BR \-v ", " \-\-verbose
-Display verbose information containing long listings of physical
-and logical volumes. If given twice, also display verbose runtime
-information of vgdisplay's activities.
-.TP
-.B \-\-version
-Display version and exit successfully.
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgs (8),
-.BR pvcreate (8),
-.BR vgcreate (8),
-.BR lvcreate (8)
diff --git a/man/vgexport.8.des b/man/vgexport.8.des
new file mode 100644
index 0000000..f9fa49c
--- /dev/null
+++ b/man/vgexport.8.des
@@ -0,0 +1,8 @@
+vgexport makes inactive VGs unknown to the system. In this state, all the
+PVs in the VG can be moved to a different system, from which
+\fBvgimport\fP can then be run.
+
+Most LVM tools ignore exported VGs.
+
+vgexport clears the VG system ID, and vgimport sets the VG system ID to
+match the host running vgimport (if the host has a system ID).
diff --git a/man/vgexport.8.in b/man/vgexport.8.in
deleted file mode 100644
index 6e2ecbf..0000000
--- a/man/vgexport.8.in
+++ /dev/null
@@ -1,37 +0,0 @@
-.TH VGEXPORT 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgexport \- make volume groups unknown to the system
-.SH SYNOPSIS
-.B vgexport
-.RB [ \-a | \-\-all ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB [ \-v | \-\-verbose ]
-.RI [ VolumeGroupName ...]
-.SH DESCRIPTION
-vgexport allows you to make the inactive
-.IR VolumeGroupName (s)
-unknown to the system.
-You can then move all the Physical Volumes in that Volume Group to
-a different system for later
-.BR vgimport (8).
-Most LVM2 tools ignore exported Volume Groups.
-vgexport clears the VG system ID, and vgimport sets the VG system ID
-to match the host running vgimport (if the host has a system ID).
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-a ", " \-\-all
-Export all inactive Volume Groups.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvscan (8),
-.BR vgimport (8),
-.BR vgscan (8),
-.BR lvmsystemid (7)
diff --git a/man/vgextend.8.des b/man/vgextend.8.des
new file mode 100644
index 0000000..85fe6fc
--- /dev/null
+++ b/man/vgextend.8.des
@@ -0,0 +1,11 @@
+vgextend adds one or more PVs to a VG. This increases the space available
+for LVs in the VG.
+
+Also, PVs that have gone missing and then returned, e.g. due to a
+transient device failure, can be added back to the VG without
+re-initializing them (see \-\-restoremissing).
+
+If the specified PVs have not yet been initialized with pvcreate, vgextend
+will initialize them. In this case pvcreate options can be used, e.g.
+\-\-labelsector, \-\-metadatasize, \-\-metadataignore,
+\-\-pvmetadatacopies, \-\-dataalignment, \-\-dataalignmentoffset.
diff --git a/man/vgextend.8.end b/man/vgextend.8.end
new file mode 100644
index 0000000..e50fcce
--- /dev/null
+++ b/man/vgextend.8.end
@@ -0,0 +1,6 @@
+.SH EXAMPLES
+
+Add two PVs to a VG.
+.br
+.B vgextend vg00 /dev/sda4 /dev/sdn1
+
diff --git a/man/vgextend.8.in b/man/vgextend.8.in
deleted file mode 100644
index 51bd615..0000000
--- a/man/vgextend.8.in
+++ /dev/null
@@ -1,71 +0,0 @@
-.TH VGEXTEND 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgextend \(em add physical volumes to a volume group
-.SH SYNOPSIS
-.B vgextend
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-restoremissing ]
-.RB [ \-f | \-\-force ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ "PHYSICAL DEVICE OPTIONS" ]
-.I VolumeGroupName PhysicalDevicePath
-.RI [ PhysicalDevicePath ...]
-.SH DESCRIPTION
-vgextend allows you to add one or more initialized physical volumes
-(see \fBpvcreate\fP(8)) to an existing volume group to extend it in size. Moreover, it allows you to
-re-add a physical volume that has gone missing previously, due to a transient
-device failure, without re-initialising it. Use
-\fBvgextend \-\-restoremissing\fP to that effect.
-.sp
-If \fIPhysicalDevicePath\fP was not previously configured for LVM with
-\fBpvcreate\fP(8), the device will be initialized with the same
-default values used with \fBpvcreate\fP(8). If non-default
-\fPpvcreate\fP(8) values are desired, they may be given on the
-commandline with the same options as \fPpvcreate\fP(8). See
-.B PHYSICAL DEVICE OPTIONS
-for available options. Note that the restore-related options such as
-.BR \-\-restorefile ", " \-\-uuid " and " \-\-physicalvolumesize
-are not available. If a restore operation
-is needed, use \fBpvcreate\fP(8) and \fBvgcfgrestore\fP(8).
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.SH PHYSICAL DEVICE OPTIONS
-The following options are available for initializing physical devices in the
-volume group. These options are further described in the
-\fBpvcreate\fP(8) man page.
-.TP
-.BR \-f ", " \-\-force
-.TP
-.BR \-y ", " \-\-yes
-.TP
-.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
-.TP
-.B \-\-labelsector \fIsector
-.TP
-.B \-\-metadatasize \fIsize
-.TP
-.BR \-\-metadataignore " {" \fIy | \fIn }
-.TP
-.B \-\-pvmetadatacopies \fIcopies
-.TP
-.B \-\-dataalignment \fIalignment
-.TP
-.B \-\-dataalignmentoffset \fIalignment_offset
-.SH Examples
-Extends the existing volume group "vg00" by the new physical volumes
-(see \fBpvcreate\fP(8)) "/dev/sda4" and "/dev/sdn1".
-.sp
-.B vgextend vg00 /dev/sda4 /dev/sdn1
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgcreate (8),
-.BR vgreduce (8),
-.BR pvcreate (8)
diff --git a/man/vgimport.8.des b/man/vgimport.8.des
new file mode 100644
index 0000000..91196b6
--- /dev/null
+++ b/man/vgimport.8.des
@@ -0,0 +1,5 @@
+vgimport makes exported VGs known to the system again, perhaps after
+moving the PVs from a different system.
+
+vgexport clears the VG system ID, and vgimport sets the VG system ID to
+match the host running vgimport (if the host has a system ID).
diff --git a/man/vgimport.8.in b/man/vgimport.8.in
deleted file mode 100644
index ba4fdf9..0000000
--- a/man/vgimport.8.in
+++ /dev/null
@@ -1,38 +0,0 @@
-.TH VGIMPORT 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgimport \(em make exported volume groups known to the system
-.SH SYNOPSIS
-.B vgimport
-.RB [ \-a | \-\-all ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB [ \-v | \-\-verbose ]
-.RI [ VolumeGroupName ...]
-.SH DESCRIPTION
-vgimport allows you to make a Volume Group that was previously
-exported using
-.BR vgexport (8)
-known to the system again, perhaps after moving its Physical Volumes
-from a different machine.
-vgexport clears the VG system ID, and vgimport sets the VG system ID
-to match the host running vgimport (if the host has a system ID).
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-a ", " \-\-all
-Import all exported Volume Groups.
-.TP
-.BR \-\-force
-Import exported Volume Groups even if there are missing Physical Volumes.
-This option should only be used if the missing devices are known to have
-failed and they cannot be restored.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvscan (8),
-.BR vgexport (8),
-.BR vgscan (8),
-.BR lvmsystemid (7)
diff --git a/man/vgimportclone.8.des b/man/vgimportclone.8.des
new file mode 100644
index 0000000..a5002da
--- /dev/null
+++ b/man/vgimportclone.8.des
@@ -0,0 +1,6 @@
+vgimportclone imports a VG from duplicated PVs, e.g. created by a hardware
+snapshot of existing PVs.
+
+A duplicated VG cannot used until it is made to coexist with the original
+VG. vgimportclone renames the VG associated with the specified PVs and
+changes the associated VG and PV UUIDs.
diff --git a/man/vgimportclone.8.end b/man/vgimportclone.8.end
new file mode 100644
index 0000000..83394b5
--- /dev/null
+++ b/man/vgimportclone.8.end
@@ -0,0 +1,9 @@
+.SH EXAMPLES
+
+An original VG "vg00" has PVs "/dev/sda" and "/dev/sdb".
+The corresponding PVs from a hardware snapshot are "/dev/sdc" and "/dev/sdd".
+Rename the VG associated with "/dev/sdc" and "/dev/sdd" from "vg00" to "vg00_snap"
+(and change associated UUIDs).
+.br
+.B vgimportclone \-\-basevgname vg00_snap /dev/sdc /dev/sdd
+
diff --git a/man/vgimportclone.8.in b/man/vgimportclone.8.in
deleted file mode 100644
index cdf5e68..0000000
--- a/man/vgimportclone.8.in
+++ /dev/null
@@ -1,46 +0,0 @@
-.TH VGIMPORTCLONE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc." \" -*- nroff -*-
-.SH NAME
-vgimportclone \(em import and rename duplicated volume group (e.g. a hardware snapshot)
-.SH SYNOPSIS
-.B vgimportclone
-.RB [ \-n | \-\-basevgname
-.IR VolumeGroupName ]
-.RB [ \-i | \-\-import ]
-.I PhysicalVolume
-.RI [ PhysicalVolume ...]
-.SH DESCRIPTION
-vgimportclone is used to import a duplicated VG (e.g. hardware snapshot).
-Duplicate VG(s) and PV(s) are not able to be used until they are made
-to coexist with the origin VG(s) and PV(s).
-vgimportclone renames the VG associated with the specified PV(s) and
-changes the associated VG and PV UUIDs.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-n ", " \-\-basevgname " " \fIVolumeGroupName
-By default the snapshot VG will be renamed to the original name plus a
-numeric suffix to avoid duplicate naming (e.g. 'test_vg' would be renamed
-to 'test_vg1'). This option will override the base VG name that is
-used for all VG renames. If a VG already exists with the specified name
-a numeric suffix will be added (like the previous example) to make it unique.
-.TP
-.BR \-i ", " \-\-import
-Import exported Volume Groups. Otherwise VGs that have been exported
-will not be changed (nor will their associated PVs).
-.SH ENVIRONMENT VARIABLES
-.TP
-.B LVM_BINARY
-The LVM2 binary to use. Defaults to "lvm".
-.SH Examples
-The origin VG "vg00" has origin PVs "/dev/sda" and "/dev/sdb"
-and the respective snapshot PVs are "/dev/sdc" and "/dev/sdd".
-To rename the VG associated with "/dev/sdc" and "/dev/sdd"
-from "vg00" to "vg00_snap"
-(and to change associated VG and PV UUIDs) do:
-.sp
-.B vgimportclone \-\-basevgname vg00_snap /dev/sdc /dev/sdd
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgrename (8)
-
diff --git a/man/vgmerge.8.des b/man/vgmerge.8.des
new file mode 100644
index 0000000..ff7c177
--- /dev/null
+++ b/man/vgmerge.8.des
@@ -0,0 +1,3 @@
+vgmerge merges two existing VGs. The inactive source VG is merged into the
+destination VG if physical extent sizes are equal and PV and LV summaries
+of both VGs fit into the destination VG's limits.
diff --git a/man/vgmerge.8.end b/man/vgmerge.8.end
new file mode 100644
index 0000000..9787c6a
--- /dev/null
+++ b/man/vgmerge.8.end
@@ -0,0 +1,7 @@
+.SH EXAMPLES
+
+Merge an inactive VG named "vg00" into the active or inactive VG named
+"databases", giving verbose runtime information.
+.br
+.B vgmerge \-v databases vg00
+
diff --git a/man/vgmerge.8.in b/man/vgmerge.8.in
deleted file mode 100644
index bfc8c34..0000000
--- a/man/vgmerge.8.in
+++ /dev/null
@@ -1,41 +0,0 @@
-.TH VGMERGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgmerge \(em merge two volume groups
-.SH SYNOPSIS
-.B vgmerge
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-l | \-\-list ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.I DestinationVolumeGroupName
-.I SourceVolumeGroupName
-.SH DESCRIPTION
-vgmerge merges two existing volume groups. The inactive
-\fISourceVolumeGroupName\fP will be merged into
-the \fIDestinationVolumeGroupName\fP if physical extent sizes
-are equal and physical and logical volume summaries of both volume groups
-fit into \fIDestinationVolumeGroupName\fP's limits.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-l ", " \-\-list
-Display merged \fIDestinationVolumeGroupName\fP like \fBvgdisplay \-v\fP.
-.TP
-.BR \-t ", " \-\-test
-Do a test run WITHOUT making any real changes.
-.SH Examples
-Merge the inactive volume group named "my_vg"
-into the active or inactive volume group named "databases" giving verbose
-runtime information:
-.sp
-.B vgmerge \-v databases my_vg
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgcreate (8),
-.BR vgextend (8),
-.BR vgreduce (8)
diff --git a/man/vgmknodes.8.des b/man/vgmknodes.8.des
new file mode 100644
index 0000000..a93d629
--- /dev/null
+++ b/man/vgmknodes.8.des
@@ -0,0 +1,5 @@
+vgmknodes checks the LVM device nodes in /dev that are needed for active
+LVs and creates any that are missing and removes unused ones.
+
+This command should not usually be needed if all the system components are
+interoperating correctly.
diff --git a/man/vgmknodes.8.in b/man/vgmknodes.8.in
deleted file mode 100644
index c5bb5d4..0000000
--- a/man/vgmknodes.8.in
+++ /dev/null
@@ -1,30 +0,0 @@
-.TH VGMKNODES 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgmknodes \(em recreate volume group directory and logical volume special files
-.SH SYNOPSIS
-.B vgmknodes
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-refresh ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-v | \-\-verbose ]
-.RI [[ VolumeGroupName | LogicalVolumePath ]...]
-.SH DESCRIPTION
-Checks the LVM2 special files in /dev that are needed for active
-logical volumes and creates any missing ones and removes unused ones.
-.SH OPTIONS
-.TP
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-\-refresh
-If any logical volume in the volume group is active, reload its metadata.
-This is not necessary in normal operation, but may be useful
-if something has gone wrong or if you're doing clustering
-manually without a clustered lock manager.
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgscan (8),
-.BR dmsetup (8)
diff --git a/man/vgreduce.8.des b/man/vgreduce.8.des
new file mode 100644
index 0000000..1bcdaf9
--- /dev/null
+++ b/man/vgreduce.8.des
@@ -0,0 +1 @@
+vgreduce removes one or more unused PVs from a VG.
diff --git a/man/vgreduce.8.in b/man/vgreduce.8.in
deleted file mode 100644
index cce31e8..0000000
--- a/man/vgreduce.8.in
+++ /dev/null
@@ -1,49 +0,0 @@
-.TH VGREDUCE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgreduce \(em reduce a volume group
-.SH SYNOPSIS
-.B vgreduce
-.RB [ \-a | \-\-all ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-removemissing ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.I VolumeGroupName
-.RI [ PhysicalVolumePath ...]
-.SH DESCRIPTION
-vgreduce allows you to remove one or more unused physical volumes
-from a volume group.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-a ", " \-\-all
-Removes all empty physical volumes if none are given on command line.
-.TP
-.B \-\-removemissing
-Removes all missing physical volumes from the volume group, if there are no
-logical volumes allocated on those. This resumes normal operation of the volume
-group (new logical volumes may again be created, changed and so on).
-
-If this is not possible (there are logical volumes referencing the missing
-physical volumes) and you cannot or do not want to remove them manually, you
-can run this option with \fB\-\-force\fP to have \fBvgreduce\fP
-remove any partial LVs.
-
-Any logical volumes and dependent snapshots that were partly on the
-missing disks get removed completely. This includes those parts
-that lie on disks that are still present.
-
-If your logical volumes spanned several disks including the ones that are
-lost, you might want to try to salvage data first by activating your
-logical volumes with \fB\-\-partial\fP as described in \fBlvm\fP(8).
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgextend (8)
diff --git a/man/vgremove.8.des b/man/vgremove.8.des
new file mode 100644
index 0000000..04dc0e3
--- /dev/null
+++ b/man/vgremove.8.des
@@ -0,0 +1,6 @@
+vgremove removes one or more VGs. If LVs exist in the VG, a prompt is used
+to confirm LV removal.
+
+If one or more PVs in the VG are lost, consider
+\fBvgreduce \-\-removemissing\fP to make the VG
+metadata consistent again.
diff --git a/man/vgremove.8.in b/man/vgremove.8.in
deleted file mode 100644
index 4e600ef..0000000
--- a/man/vgremove.8.in
+++ /dev/null
@@ -1,46 +0,0 @@
-.TH VGREMOVE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgremove \(em remove a volume group
-.SH SYNOPSIS
-.B vgremove
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-f | \-\-force ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-noudevsync ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RI [ VolumeGroupName ...]
-.SH DESCRIPTION
-vgremove allows you to remove one or more volume groups.
-If one or more physical volumes in the volume group are lost,
-consider \fBvgreduce \-\-removemissing\fP to make the volume group
-metadata consistent again.
-.sp
-If there are logical volumes that exist in the volume group,
-a prompt will be given to confirm removal. You can override
-the prompt with \fB\-f\fP.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-f ", " \-\-force
-Force the removal of any logical volumes on the volume group
-without confirmation.
-To remove also damaged pool volumes use \-ff.
-.TP
-.BR \-\-noudevsync
-Disable udev synchronisation. The
-process will not wait for notification from udev.
-It 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.
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvremove (8),
-.BR vgcreate (8),
-.BR vgreduce (8)
diff --git a/man/vgrename.8.des b/man/vgrename.8.des
new file mode 100644
index 0000000..2384b6b
--- /dev/null
+++ b/man/vgrename.8.des
@@ -0,0 +1,9 @@
+vgrename renames a VG.
+
+All VGs visible to a system need to have different names, otherwise many
+LVM commands will refuse to run or give warning messages. VGs with the
+same name can occur when disks are moved between machines, or filters are
+changed. If a newly connected disk has a VG with the same name as the VG
+containing the root filesystem, the machine may not boot correctly. When
+two VGs have the same name, the VG UUID can be used in place of the source
+VG name.
diff --git a/man/vgrename.8.end b/man/vgrename.8.end
new file mode 100644
index 0000000..98eeb53
--- /dev/null
+++ b/man/vgrename.8.end
@@ -0,0 +1,10 @@
+.SH EXAMPLES
+
+Rename VG "vg02" to "myvg":
+.br
+.B vgrename "vg02" "myvg"
+
+Rename the VG with the specified UUID to "myvg".
+.br
+.B vgrename Zvlifi\-Ep3t\-e0Ng\-U42h\-o0ye\-KHu1\-nl7Ns4 myvg
+
diff --git a/man/vgrename.8.in b/man/vgrename.8.in
deleted file mode 100644
index 322d740..0000000
--- a/man/vgrename.8.in
+++ /dev/null
@@ -1,58 +0,0 @@
-.TH VGRENAME 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgrename \(em rename a volume group
-.SH SYNOPSIS
-.B vgrename
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.IR OldVolumeGroup { Path | Name | UUID }
-.IR NewVolumeGroup { Path | Name }
-.SH DESCRIPTION
-vgrename renames an existing (see
-.BR vgcreate (8))
-volume group from
-.IR OldVolumeGroup { Name | Path | UUID }
-to
-.IR NewVolumeGroup { Name | Path }.
-
-All the Volume Groups visible to a system need to have different
-names. Otherwise many LVM2 commands will refuse to run or give
-warning messages.
-
-This situation could arise when disks are moved between machines. If
-a disk is connected and it contains a Volume Group with the same name
-as the Volume Group containing your root filesystem the machine might
-not even boot correctly. However, the two Volume Groups should have
-different UUIDs (unless the disk was cloned) so you can rename
-one of the conflicting Volume Groups with
-\fBvgrename\fP.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.SH Examples
-Renames existing volume group vg02 to my_volume_group:
-.sp
-.B vgrename /dev/vg02 /dev/my_volume_group
-
-or
-.sp
-.B vgrename vg02 my_volume_group
-
-Changes the name of the Volume Group with UUID
-.br
-Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 to VolGroup00_tmp:
-.sp
-.B vgrename Zvlifi\-Ep3t\-e0Ng\-U42h\-o0ye\-KHu1\-nl7Ns4 VolGroup00_tmp
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgchange (8),
-.BR vgcreate (8),
-.BR lvrename (8)
diff --git a/man/vgs.8.des b/man/vgs.8.des
new file mode 100644
index 0000000..15bdb97
--- /dev/null
+++ b/man/vgs.8.des
@@ -0,0 +1 @@
+vgs produces formatted output about VGs.
diff --git a/man/vgs.8.end b/man/vgs.8.end
new file mode 100644
index 0000000..b8cda26
--- /dev/null
+++ b/man/vgs.8.end
@@ -0,0 +1,17 @@
+.SH NOTES
+.
+The vg_attr bits are:
+.IP 1 3
+Permissions: (w)riteable, (r)ead-only
+.IP 2 3
+Resi(z)eable
+.IP 3 3
+E(x)ported
+.IP 4 3
+(p)artial: one or more physical volumes belonging to the volume group
+are missing from the system
+.IP 5 3
+Allocation policy: (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere
+.IP 6 3
+(c)lustered, (s)hared
+
diff --git a/man/vgs.8.in b/man/vgs.8.in
deleted file mode 100644
index 080086c..0000000
--- a/man/vgs.8.in
+++ /dev/null
@@ -1,161 +0,0 @@
-.TH VGS 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgs \(em report information about volume groups
-.SH SYNOPSIS
-.B vgs
-.RB [ \-a | \-\-all ]
-.RB [ \-\-aligned ]
-.RB [ \-\-binary ]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [[ \-\-configreport
-.IR ReportName ]
-.RB [ \-o | \-\-options
-.RI [ + | \- | # ] Field1 [, Field2 ...]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [, Key2 ...]]
-.RB [ \-S | \-\-select
-.IR Selection ]
-.RB ...]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoreskippedcluster ]
-.RB [ \-\-logonly ]
-.RB [ \-\-nameprefixes ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-\-rows ]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-\-unquoted ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RI [ VolumeGroupName
-.RI [ VolumeGroupName ...]]
-.SH DESCRIPTION
-vgs produces formatted output about volume groups.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.B \-\-all
-List all volume groups. Equivalent to not specifying any volume groups.
-.TP
-.B \-\-aligned
-Use with \fB\-\-separator\fP to align the output columns.
-.TP
-.B \-\-binary
-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).
-.TP
-.B \-\-configreport \fI ReportName
-Make any subsequent \fB\-o, \-\-options\fP, \fB\-O, \-\-sort\fP or
-\fB\-S, \-\-select\fP to apply for \fIReportName\fP where \fIReportName\fP
-is either 'vg' for command's main report or 'log' for log report.
-If \fB\-\-configreport\fP option is not used to identify a report, then
-command's main report is assumed. The log report is available only if
-enabled by \fBlog/report_command_log\fP \fBlvm.conf\fP(5) setting or
-if \fB\-\-logonly\fP option is used.
-.TP
-.B \-\-logonly
-Suppress the vgs report itself and display only log report on output.
-.TP
-.B \-\-nameprefixes
-Add an "LVM2_" prefix plus the field name to the output. Useful
-with \fB\-\-noheadings\fP to produce a list of field=value pairs that can
-be used to set environment variables (for example, in \fBudev\fP(7) rules).
-.TP
-.B \-\-noheadings
-Suppress the headings line that is normally the first line of output.
-Useful if grepping the output.
-.TP
-.B \-\-nosuffix
-Suppress the suffix on output sizes. Use with \fB\-\-units\fP
-(except h and H) if processing the output.
-.TP
-.BR \-o ", " \-\-options
-Comma-separated ordered list of columns.
-.IP
-Precede the list with '\fI+\fP' to append to the current list
-of columns, '\fI-\fP' to remove from the current list of columns
-or '\fI#\fP' to compact given columns. The \fI\-o\fP option can
-be repeated, providing several lists. These lists are evaluated
-from left to right.
-.IP
-Use \fB\-o vg_all\fP to select all volume group columns.
-.IP
-Use \fB\-o help\fP to view the full list of columns available.
-.IP
-Column names include: vg_fmt, vg_uuid, vg_name, vg_attr, vg_size, vg_free,
-vg_sysid, vg_extent_size, vg_extent_count, vg_free_count, vg_profile, max_lv,
-max_pv, pv_count, lv_count, snap_count, vg_seqno, vg_tags, vg_mda_count,
-vg_mda_free, and vg_mda_size, vg_mda_used_count.
-.IP
-Any "vg_" prefixes are optional. Columns mentioned in either \fBpvs\fP(8)
-or \fBlvs\fP(8) can also be chosen, but columns cannot be taken from both
-at the same time.
-.IP
-The vg_attr bits are:
-.RS
-.IP 1 3
-Permissions: (w)riteable, (r)ead-only
-.IP 2 3
-Resi(z)eable
-.IP 3 3
-E(x)ported
-.IP 4 3
-(p)artial: one or more physical volumes belonging to the volume group
-are missing from the system
-.IP 5 3
-Allocation policy: (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere
-.IP 6 3
-(c)lustered, (s)hared
-.RE
-.TP
-.BR \-O ", " \-\-sort
-Comma-separated ordered list of columns to sort by. Replaces the default
-selection. Precede any column with '\fI\-\fP' for a reverse sort on that
-column.
-.TP
-.B \-\-rows
-Output columns as rows.
-.TP
-.BR \-S ", " \-\-select " " \fISelection
-Display only rows that match Selection criteria. All rows are displayed with
-the additional "selected" column (\fB-o selected\fP) showing 1 if the row
-matches the Selection and 0 otherwise. The Selection criteria are defined
-by specifying column names and their valid values (that can include reserved
-values) while making use of supported comparison operators. See \fBlvm\fP(8)
-and \fB\-S\fP, \fB\-\-select\fP description for more detailed information
-about constructing the Selection criteria. As a quick help and to see full
-list of column names that can be used in Selection including the list of
-reserved values and the set of supported selection operators, check the
-output of \fBvgs -S help\fP command.
-.TP
-.B \-\-separator \fISeparator
-String to use to separate each column. Useful if grepping the output.
-.TP
-.B \-\-unbuffered
-Produce output immediately without sorting or aligning the columns properly.
-.TP
-.B \-\-units \fIhHbBsSkKmMgGtTpPeE
-All sizes are output in these units: (h)uman-readable, (b)ytes, (s)ectors,
-(k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes.
-Capitalise to use multiples of 1000 (S.I.) instead of 1024. Can also specify
-custom units e.g. \-\-units 3M
-.TP
-.B \-\-unquoted
-When used with \fB\-\-nameprefixes\fP, output values in the field=value
-pairs are not quoted.
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgdisplay (8),
-.BR pvs (8),
-.BR lvs (8)
diff --git a/man/vgscan.8.des b/man/vgscan.8.des
new file mode 100644
index 0000000..e8041ed
--- /dev/null
+++ b/man/vgscan.8.des
@@ -0,0 +1 @@
+vgscan scans all supported LVM block devices in the system for VGs.
diff --git a/man/vgscan.8.in b/man/vgscan.8.in
deleted file mode 100644
index e85d817..0000000
--- a/man/vgscan.8.in
+++ /dev/null
@@ -1,43 +0,0 @@
-.TH VGSCAN 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgscan \(em scan all disks for volume groups and rebuild caches
-.SH SYNOPSIS
-.B vgscan
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-mknodes ]
-.RB [ \-\-notifydbus ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-reportformat
-.RB { basic | json }]
-.RB [ \-v | \-\-verbose ]
-.SH DESCRIPTION
-vgscan scans all SCSI, (E)IDE disks, multiple devices and a bunch
-of other disk devices in the system looking for LVM physical volumes
-and volume groups. Define a filter in \fBlvm.conf\fP(5) to restrict
-the scan to avoid a CD ROM, for example.
-.LP
-In LVM2, vgscans take place automatically; but you might still need to
-run one explicitly after changing hardware.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.B \-\-mknodes
-Also checks the LVM special files in /dev that are needed for active
-logical volumes and creates any missing ones and removes unused ones.
-.TP
-.B \-\-notifydbus
-Send a notification to D-Bus. The command will exit with an error
-if LVM is not built with support for D-Bus notification, or if the
-notify_dbus config setting is disabled.
-.TP
-.B \-\-cache
-Scan devices for LVM physical volumes and volume groups and instruct
-the lvmetad daemon to update its cached state accordingly.
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgcreate (8),
-.BR vgchange (8)
diff --git a/man/vgsplit.8.des b/man/vgsplit.8.des
new file mode 100644
index 0000000..29eb5c5
--- /dev/null
+++ b/man/vgsplit.8.des
@@ -0,0 +1,13 @@
+vgsplit moves one or more PVs from a source VG to a destination VG. The
+PVs can be specified explicitly or implicitly by naming an LV, in which
+case on PVs underlying the LV are moved.
+
+If the destination VG does not exist, a new VG is created (command options
+can be used to specify properties of the new VG, also see
+\fBvgcreate\fP(8).)
+
+LVs cannot be split between VGs; each LV must be entirely on the PVs in
+the source or destination VG.
+
+vgsplit can only move complete PVs. (See \fBpvmove\fP(8) for moving part
+of a PV.)
diff --git a/man/vgsplit.8.in b/man/vgsplit.8.in
deleted file mode 100644
index 5939ed5..0000000
--- a/man/vgsplit.8.in
+++ /dev/null
@@ -1,80 +0,0 @@
-.TH VGSPLIT 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgsplit \(em split a volume group into two
-.SH SYNOPSIS
-.B vgsplit
-.RB [ \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-c | \-\-clustered
-.RI { y | n }]
-.RB [ \-\-commandprofile
-.IR ProfileName ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-l | \-\-maxlogicalvolumes
-.IR MaxLogicalVolumes ]
-.RB [ \-M | \-\-metadatatype
-.IR type ]
-.RB [ \-p | \-\-maxphysicalvolumes
-.IR MaxPhysicalVolumes ]
-.RB [ \-\- [ vg ] metadatacopies
-.IR NumberOfCopies | unmanaged | all ]
-.RB [ \-n | \-\-name
-.IR LogicalVolumeName ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.I SourceVolumeGroupName DestinationVolumeGroupName
-.RI [ PhysicalVolumePath ...]
-.SH DESCRIPTION
-vgsplit moves one or more physical volumes from
-\fISourceVolumeGroupName\fP into \fIDestinationVolumeGroupName\fP.
-The physical volumes moved can be specified either explicitly via
-\fIPhysicalVolumePath\fP, or implicitly by \fB\-n\fP
-\fILogicalVolumeName\fP, in which case only physical volumes
-underlying the specified logical volume will be moved.
-
-If \fIDestinationVolumeGroupName\fP does not exist, a new volume
-group will be created. The default attributes
-for the new volume group can be specified with
-.BR \-\-alloc ,
-.BR \-\-clustered ,
-.BR \-\-maxlogicalvolumes ,
-.BR \-\-metadatatype ,
-.B \-\-maxphysicalvolumes \fRand
-.BR \-\- [ vg ] metadatacopies
-(see \fBvgcreate\fP(8) for a description of these options). If any
-of these options are not given, default attribute(s) are taken from
-\fISourceVolumeGroupName\fP. If a non-LVM2 metadata type (e.g. lvm1) is
-being used, you should use the \fB\-M\fP option to specify the metadata
-type directly.
-
-If
-.I DestinationVolumeGroupName
-does exist, it will be checked for compatibility with
-.I SourceVolumeGroupName
-before the physical volumes are moved. Specifying any of the above default
-volume group attributes with an existing destination volume group is an error,
-and no split will occur.
-
-Logical volumes cannot be split between volume groups. \fBvgsplit\fP(8) only
-moves complete physical volumes: To move part of a physical volume, use
-\fBpvmove\fP(8). Each existing logical volume must be entirely on the physical
-volumes forming either the source or the destination volume group. For this
-reason, \fBvgsplit\fP(8) may fail with an error if a split would result in a
-logical volume being split across volume groups.
-
-A vgsplit into an existing volume group retains the existing volume group's
-value of \fPvgmetadatacopies\fP (see \fBvgcreate\fP(8) and \fBlvm.conf\fP(5) for further
-explanation of \fPvgmetadatacopies\fP). To change the value of
-\fBvgmetadatacopies\fP, use \fBvgchange\fP(8).
-
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgcreate (8),
-.BR vgextend (8),
-.BR vgreduce (8),
-.BR vgmerge (8)
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 1761be4..5aaba2f 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -1,4 +1,3 @@
-
#
# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
# Copyright (C) 2004-2012 Red Hat, Inc. All rights reserved.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=f067c0ad78cc894a…
Commit: f067c0ad78cc894a2d620c38af4d74b679d5c316
Parent: c3e1838382122e254aaf9bda6159bc5e95303309
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jan 19 13:47:24 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 13 08:20:10 2017 -0600
args: split is a synonym for splitcache
also tidy the other synonyms
---
tools/args.h | 59 +++++++++++++++++++++--------------------------
tools/command-lines.in | 1 +
tools/lvmcmdline.c | 4 +++
3 files changed, 31 insertions(+), 33 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index 8802cd7..1d7d6f7 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -133,9 +133,6 @@ arg(configreport_ARG, '\0', "configreport", configreport_VAL, ARG_GROUPABLE, 1,
arg(configtype_ARG, '\0', "typeconfig", configtype_VAL, 0, 0,
"See lvmreport(7).\n")
-arg(corelog_ARG, '\0', "corelog", 0, 0, 0,
- "An alias for --mirrorlog core.\n")
-
arg(dataalignment_ARG, '\0', "dataalignment", sizekb_VAL, 0, 0,
"Align the start of the data to a multiple of this number.\n"
"Also specify an appropriate Physical Extent size when creating a VG.\n"
@@ -288,10 +285,6 @@ arg(mergedconfig_ARG, '\0', "mergedconfig", 0, 0, 0,
"cascade is displayed.\n"
"See lvm.conf(5) for more information about config.\n")
-arg(metadatacopies_ARG, '\0', "metadatacopies", metadatacopies_VAL, 0, 0,
- "For commands starting with 'pv', this is an alias for --pvmetadatacopies.\n"
- "For commands starting with 'vg', this is an alias for --vgmetadatacopies.\n")
-
arg(metadataignore_ARG, '\0', "metadataignore", bool_VAL, 0, 0,
"Specifies the metadataignore property of a PV.\n"
"If yes, metadata areas on the PV are ignored, and lvm will\n"
@@ -440,24 +433,6 @@ arg(pvmetadatacopies_ARG, '\0', "pvmetadatacopies", pvmetadatacopies_VAL, 0, 0,
"This may be useful in VGs containing many PVs (this places limitations\n"
"on the ability to use vgsplit later.)\n")
-arg(raidrebuild_ARG, '\0', "raidrebuild", pv_VAL, ARG_GROUPABLE, 0,
- "An alias for --rebuild.\n")
-
-arg(raidmaxrecoveryrate_ARG, '\0', "raidmaxrecoveryrate", sizekb_VAL, 0, 0,
- "An alias for --maxrecoveryrate.\n")
-
-arg(raidminrecoveryrate_ARG, '\0', "raidminrecoveryrate", sizekb_VAL, 0, 0,
- "An alias for --minrecoveryrate.\n")
-
-arg(raidsyncaction_ARG, '\0', "raidsyncaction", syncaction_VAL, 0, 0,
- "An alias for --syncaction.\n")
-
-arg(raidwritebehind_ARG, '\0', "raidwritebehind", number_VAL, 0, 0,
- "An alias for --writebehind.\n")
-
-arg(raidwritemostly_ARG, '\0', "raidwritemostly", writemostly_VAL, ARG_GROUPABLE, 0,
- "An alias for --writemostly.\n")
-
arg(readonly_ARG, '\0', "readonly", 0, 0, 0,
"Run the command in a special read-only mode which will read on-disk\n"
"metadata without needing to take any locks. This can be used to peek\n"
@@ -571,9 +546,6 @@ arg(sinceversion_ARG, '\0', "sinceversion", string_VAL, 0, 0,
"This option is currently applicable only with --type new\n"
"to display all configuration settings introduced since given version.\n")
-/* Not used */
-arg(split_ARG, '\0', "split", 0, 0, 0, NULL)
-
arg(splitcache_ARG, '\0', "splitcache", 0, 0, 0,
"Separates a cache pool from a cache LV, and keeps the unused cache pool LV.\n"
"Before the separation, the cache is flushed. Also see --uncache.\n")
@@ -732,9 +704,6 @@ arg(vgmetadatacopies_ARG, '\0', "vgmetadatacopies", vgmetadatacopies_VAL, 0, 0,
"\\fBall\\fP causes LVM to first clear the metadataignore flags on\n"
"all PVs, and then to become unmanaged.\n")
-arg(virtualoriginsize_ARG, '\0', "virtualoriginsize", sizemb_VAL, 0, 0,
- "An alias for --virtualsize.\n")
-
arg(withsummary_ARG, '\0', "withsummary", 0, 0, 0,
"Display a one line comment for each configuration node.\n")
@@ -768,10 +737,34 @@ arg(writemostly_ARG, '\0', "writemostly", writemostly_VAL, ARG_GROUPABLE, 0,
"the suffix \\fB:t\\fP. Repeat this option to change the attribute on\n"
"multiple PVs.\n")
-/* Allow some variations */
+/*
+ * Synonyms of other options.
+ *
+ * Only the standard option names are used in command definitions.
+ *
+ * If used on the command line, lvm automatically translates them
+ * to the standard option name.
+ *
+ * The generated help and man output does not include
+ * these variants. The description of the standard option names
+ * can mention a synonym, or in some cases the man page generation
+ * recognizes some of these and prints the option name to include
+ * the variant, e.g. man page generation prints --[raid]writebehind.
+ */
+arg(corelog_ARG, '\0', "corelog", 0, 0, 0, NULL)
+arg(resizable_ARG, '\0', "resizable", bool_VAL, 0, 0, NULL)
arg(allocation_ARG, '\0', "allocation", bool_VAL, 0, 0, NULL)
arg(available_ARG, '\0', "available", activation_VAL, 0, 0, NULL)
-arg(resizable_ARG, '\0', "resizable", bool_VAL, 0, 0, NULL)
+arg(raidrebuild_ARG, '\0', "raidrebuild", pv_VAL, ARG_GROUPABLE, 0, NULL)
+arg(raidsyncaction_ARG, '\0', "raidsyncaction", syncaction_VAL, 0, 0, NULL)
+arg(raidwritemostly_ARG, '\0', "raidwritemostly", writemostly_VAL, ARG_GROUPABLE, 0, NULL)
+arg(raidminrecoveryrate_ARG, '\0', "raidminrecoveryrate", sizekb_VAL, 0, 0, NULL)
+arg(raidmaxrecoveryrate_ARG, '\0', "raidmaxrecoveryrate", sizekb_VAL, 0, 0, NULL)
+arg(raidwritebehind_ARG, '\0', "raidwritebehind", number_VAL, 0, 0, NULL)
+arg(virtualoriginsize_ARG, '\0', "virtualoriginsize", sizemb_VAL, 0, 0, NULL)
+arg(split_ARG, '\0', "split", 0, 0, 0, NULL)
+arg(metadatacopies_ARG, '\0', "metadatacopies", metadatacopies_VAL, 0, 0, NULL)
+
/*
* ... and now the short args.
diff --git a/tools/command-lines.in b/tools/command-lines.in
index 81c70ba..4cc51fe 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -106,6 +106,7 @@
# maxrecoveryrate (raidmaxrecoveryrate)
# writebehind (raidwritebehind)
# virtualsize (virtualoriginsize)
+# splitcache (split)
# vgmetadatacopies (metadatacopies)
# pvmetadatacopies (metadatacopies)
#
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index dda4b16..4039dd9 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -940,6 +940,8 @@ static int _opt_standard_to_synonym(const char *cmd_name, int opt)
return raidwritebehind_ARG;
case virtualsize_ARG:
return virtualoriginsize_ARG;
+ case splitcache_ARG:
+ return split_ARG;
case pvmetadatacopies_ARG:
if (!strncmp(cmd_name, "pv", 2))
return metadatacopies_ARG;
@@ -977,6 +979,8 @@ static int _opt_synonym_to_standard(const char *cmd_name, int opt)
return writebehind_ARG;
case virtualoriginsize_ARG:
return virtualsize_ARG;
+ case split_ARG:
+ return splitcache_ARG;
case metadatacopies_ARG:
if (!strncmp(cmd_name, "pv", 2))
return pvmetadatacopies_ARG;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c3e1838382122e25…
Commit: c3e1838382122e254aaf9bda6159bc5e95303309
Parent: 15d9f2850e60a44cfc55d48ce108b4a82aecd9ae
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Jan 16 16:26:14 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 13 08:20:10 2017 -0600
man: lvmthin updates
Some minor changes to some of the command syntaxes
to use more standard forms.
---
man/lvmthin.7.in | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/man/lvmthin.7.in b/man/lvmthin.7.in
index ce86974..714233e 100644
--- a/man/lvmthin.7.in
+++ b/man/lvmthin.7.in
@@ -157,17 +157,17 @@ The --thinpool argument specifies which thin pool will
contain the ThinLV.
.fi
-.B lvcreate \-n ThinLV \-V VirtualSize \-\-thinpool VG/ThinPoolLV
+.B lvcreate \-n ThinLV \-V VirtualSize \-\-thinpool ThinPoolLV VG
.I Example
.br
Create a thin LV in a thin pool:
.br
-# lvcreate \-n thin1 \-V 1T \-\-thinpool vg/pool0
+# lvcreate \-n thin1 \-V 1T \-\-thinpool pool0 vg
Create another thin LV in the same thin pool:
.br
-# lvcreate \-n thin2 \-V 1T \-\-thinpool vg/pool0
+# lvcreate \-n thin2 \-V 1T \-\-thinpool pool0 vg
# lvs vg/thin1 vg/thin2
LV VG Attr LSize Pool Origin Data%
@@ -184,9 +184,9 @@ when creating a thin snapshot.
.br
A size argument will cause an old COW snapshot to be created.
-.B lvcreate \-n SnapLV \-s VG/ThinLV
+.B lvcreate \-n SnapLV \-\-snapshot VG/ThinLV
.br
-.B lvcreate \-n SnapLV \-s VG/PrevSnapLV
+.B lvcreate \-n SnapLV \-\-snapshot VG/PrevSnapLV
.I Example
.br
@@ -286,15 +286,12 @@ The fully specified syntax for creating a thin pool LV shown above is:
.B lvconvert \-\-type thin-pool \-\-poolmetadata VG/ThinMetaLV VG/ThinDataLV
-An existing LV is converted to a thin pool by changing its type to
-thin-pool. An alternate syntax may be used for the same operation:
+An alternate syntax may be used for the same operation:
.B lvconvert \-\-thinpool VG/ThinDataLV \-\-poolmetadata VG/ThinMetaLV
-The thin-pool type is inferred by lvm; the --thinpool option is not an
-alias for --type thin-pool. The use of the --thinpool option here is
-different from the use of the --thinpool option when creating a thin LV,
-where it specifies the pool in which the thin LV is created.
+The thin-pool type is inferred by lvm; the \-\-thinpool option is not an
+alias for \-\-type thin\-pool.
.SS Automatic pool metadata LV
@@ -1234,7 +1231,7 @@ and creates a thin LV in the new pool.
.br
\-V VirtualSize specifies the virtual size of the thin LV.
-.B lvcreate \-V VirtualSize \-L LargeSize
+.B lvcreate \-\-type thin \-V VirtualSize \-L LargeSize
.RS
.B \-n ThinLV \-\-thinpool VG/ThinPoolLV
.RE
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d9d5b8414bb5ead7…
Commit: d9d5b8414bb5ead7dbd223606a735497c0c069f9
Parent: 9a0f0c70bf59a5cd07828ff39e5ff04b4a5411ad
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jan 13 14:51:50 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 13 08:20:10 2017 -0600
command.h comment tidying
---
tools/command.h | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/tools/command.h b/tools/command.h
index e4ce989..d66ec52 100644
--- a/tools/command.h
+++ b/tools/command.h
@@ -110,7 +110,6 @@ struct pos_arg {
};
/*
- *
* Commands using a given command definition must follow a set
* of rules. If a given command+LV matches the conditions in
* opts/lvt_bits/lvp_bits, then the checks are applied.
@@ -133,10 +132,11 @@ struct cmd_rule {
uint32_t rule; /* RULE_INVALID, RULE_REQUIRE: check values must [not] be true */
int opts_count; /* entries in opts[] */
int check_opts_count; /* entries in check_opts[] */
-
};
/*
+ * Array sizes
+ *
* CMD_RO_ARGS needs to accomodate a list of options,
* of which one is required after which the rest are
* optional.
@@ -152,8 +152,8 @@ struct cmd_rule {
* one or more from required_opt_args is required,
* then the rest are optional.
*/
-#define CMD_FLAG_ONE_REQUIRED_OPT 1
-#define CMD_FLAG_SECONDARY_SYNTAX 2
+#define CMD_FLAG_ONE_REQUIRED_OPT 1 /* lvchange/vgchage require one item from required_opt_args */
+#define CMD_FLAG_SECONDARY_SYNTAX 2 /* allows syntax variants to be suppressed in certain output */
/* a register of the lvm commands */
struct command {
@@ -197,11 +197,9 @@ struct command {
int rp_count;
int op_count;
int io_count;
-
- /* used for processing current position */
- int pos_count;
-
int rule_count;
+
+ int pos_count; /* temp counter used by create-command */
};
#endif
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4d2c3502e79e34a5…
Commit: 4d2c3502e79e34a5cf0fdb65c2a4df23aa1b2ecb
Parent: 5c779b323132bfd2ddc5cf639a6fcd3e9b10a309
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jan 12 16:08:53 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 13 08:20:10 2017 -0600
man lvm: remove options
all options are now included in commands
---
man/lvm.8.in | 258 +---------------------------------------------------------
1 files changed, 3 insertions(+), 255 deletions(-)
diff --git a/man/lvm.8.in b/man/lvm.8.in
index cad724b..0a64e4f 100644
--- a/man/lvm.8.in
+++ b/man/lvm.8.in
@@ -45,6 +45,9 @@ A file containing a simple script with one command per line
can also be given on the command line. The script can also be
executed directly if the first line is #! followed by the absolute
path of \fBlvm\fP.
+.P
+Additional hyphens within option names are ignored. For example,
+\fB\-\-readonly\fP and \fB\-\-read\-only\fP are both accepted.
.
.SH BUILT-IN COMMANDS
.
@@ -238,261 +241,6 @@ The following commands are not implemented in LVM2 but might be
in the future:
.BR lvmsadc ", " lvmsar ", " pvdata .
.
-.SH OPTIONS
-.
-The following options are available for many of the commands.
-They are implemented generically and documented here rather
-than repeated on individual manual pages.
-.P
-Additional hyphens within option names are ignored. For example,
-\fB\-\-readonly\fP and \fB\-\-read\-only\fP are both accepted.
-.
-.HP
-.BR \-h | \-? | \-\-help
-.br
-Display the help text.
-.
-.HP
-.BR \-\-version
-.br
-Display version information.
-.
-.HP
-.BR \-v | \-\-verbose
-.br
-Set verbose level. Repeat from 1 to 3 times to increase the detail
-of messages sent to stdout and stderr. Overrides config file setting.
-.
-.HP
-.BR \-d | \-\-debug
-.br
-Set debug level. Repeat from 1 to 6 times to increase the detail of
-messages sent to the log file and/or syslog (if configured).
-Overrides config file setting.
-.
-.HP
-.BR \-q | \-\-quiet
-.br
-Suppress output and log messages.
-Overrides \fB\-d\fP and \fB\-v\fP.
-Repeat once to also suppress any prompts with answer 'no'.
-.
-.HP
-.BR \-\-yes
-.br
-Don't prompt for confirmation interactively but instead always assume the
-answer is 'yes'. Take great care if you use this!
-.
-.HP
-.BR \-t | \-\-test
-.br
-Run in test mode. Commands will not update metadata.
-This is implemented by disabling all metadata writing but nevertheless
-returning success to the calling function. This may lead to unusual
-error messages in multi-stage operations if a tool relies on reading
-back metadata it believes has changed but hasn't.
-.
-.HP
-.BR \-\-driverloaded
-.RB { y | n }
-.br
-Whether or not the device-mapper kernel driver is loaded.
-If you set this to \fBn\fP, no attempt will be made to contact the driver.
-.
-.HP
-.BR \-A | \-\-autobackup
-.RB { y | n }
-.br
-Whether or not to metadata should be backed up automatically after a change.
-You are strongly advised not to disable this!
-See \fBvgcfgbackup\fP(8).
-.
-.HP
-.BR \-P | \-\-partial
-.br
-When set, the tools will do their best to provide access to Volume Groups
-that are only partially available (one or more Physical Volumes belonging
-to the Volume Group are missing from the system). Where part of a logical
-volume is missing, \fI\%/dev/ioerror\fP will be substituted, and you could use
-\fBdmsetup\fP(8) to set this up to return I/O errors when accessed,
-or create it as a large block device of nulls. Metadata may not be
-changed with this option. To insert a replacement Physical Volume
-of the same or large size use \fBpvcreate \-u\fP to set the uuid to
-match the original followed by \fBvgcfgrestore\fP(8).
-.
-.HP
-.BR \-S | \-\-select
-.IR Selection
-.br
-For reporting commands, display only rows that match \fISelection\fP criteria.
-All rows are displayed with the additional "selected" column (\fB-o selected\fP)
-showing 1 if the row matches the \fISelection\fP and 0 otherwise. For non-reporting
-commands which process LVM entities, the selection can be used to match items
-to process. See \fBSelection\fP section in \fBlvmreport\fP(7) man page for more
-information about the way the selection criteria are constructed.
-.
-.HP
-.BR \-M | \-\-metadatatype
-.IR Type
-.br
-Specifies which \fItype\fP of on-disk metadata to use, such as \fBlvm1\fP
-or \fBlvm2\fP, which can be abbreviated to \fB1\fP or \fB2\fP respectively.
-The default (\fBlvm2\fP) can be changed by setting \fBformat\fP
-in the \fBglobal\fP section of the config file \fBlvm.conf\fP(5).
-.
-.HP
-.BR \-\-ignorelockingfailure
-.br
-This lets you proceed with read-only metadata operations such as
-\fBlvchange \-ay\fP and \fBvgchange \-ay\fP even if the locking module fails.
-One use for this is in a system init script if the lock directory
-is mounted read-only when the script runs.
-.
-.HP
-.BR \-\-ignoreskippedcluster
-.br
-Use to avoid exiting with an non-zero status code if the command is run
-without clustered locking and some clustered Volume Groups have to be
-skipped over.
-.
-.HP
-.BR \-\-readonly
-.br
-Run the command in a special read-only mode which will read on-disk
-metadata without needing to take any locks. This can be used to peek
-inside metadata used by a virtual machine image while the virtual
-machine is running.
-It can also be used to peek inside the metadata of clustered Volume
-Groups when clustered locking is not configured or running. No attempt
-will be made to communicate with the device-mapper kernel driver, so
-this option is unable to report whether or not Logical Volumes are
-actually in use.
-.
-.HP
-.BR \-\-foreign
-.br
-Cause the command to access foreign VGs, that would otherwise be skipped.
-It can be used to report or display a VG that is owned by another host.
-This option can cause a command to perform poorly because lvmetad caching
-is not used and metadata is read from disks.
-.
-.HP
-.BR \-\-shared
-.br
-Cause the command to access shared VGs, that would otherwise be skipped
-when lvmlockd is not being used. It can be used to report or display a
-lockd VG without locking. Applicable only if LVM is compiled with lockd
-support.
-.
-.HP
-.BR \-\-addtag
-.IR Tag
-.br
-Add the tag \fITag\fP to a PV, VG or LV.
-Supply this argument multiple times to add more than one tag at once.
-A tag is a word that can be used to group LVM2 objects of the same type
-together.
-Tags can be given on the command line in place of PV, VG or LV
-arguments. Tags should be prefixed with @ to avoid ambiguity.
-Each tag is expanded by replacing it with all objects possessing
-that tag which are of the type expected by its position on the command line.
-PVs can only possess tags while they are part of a Volume Group:
-PV tags are discarded if the PV is removed from the VG.
-As an example, you could tag some LVs as \fBdatabase\fP and others
-as \fBuserdata\fP and then activate the database ones
-with \fBlvchange \-ay @database\fP.
-Objects can possess multiple tags simultaneously.
-Only the new LVM2 metadata format supports tagging: objects using the
-LVM1 metadata format cannot be tagged because the on-disk format does not
-support it.
-Characters allowed in tags are:
-.BR A - Z
-.BR a - z
-.BR 0 - 9
-.BR "_ + . -"
-and as of version 2.02.78 the following characters are also accepted:
-.BR "/ = ! : # &" .
-.
-.HP
-.BR \-\-deltag
-.IR Tag
-.br
-Delete the tag \fITag\fP from a PV, VG or LV, if it's present.
-Supply this argument multiple times to remove more than one tag at once.
-.
-.HP
-.BR \-\-alloc
-.RB { anywhere | contiguous | cling | inherit | normal }
-.br
-Selects the allocation policy when a command needs to allocate
-Physical Extents from the Volume Group.
-Each Volume Group and Logical Volume has an allocation policy defined.
-The default for a Volume Group is \fBnormal\fP which applies
-common-sense rules such as not placing parallel stripes on the same
-Physical Volume. The default for a Logical Volume is \fBinherit\fP
-which applies the same policy as for the Volume Group. These policies can
-be changed using \fBlvchange\fP(8) and \fBvgchange\fP(8) or overridden
-on the command line of any command that performs allocation.
-The \fBcontiguous\fP policy requires that new Physical Extents be placed adjacent
-to existing Physical Extents.
-The \fBcling\fP policy places new Physical Extents on the same Physical
-Volume as existing Physical Extents in the same stripe of the Logical Volume.
-If there are sufficient free Physical Extents to satisfy
-an allocation request but \fBnormal\fP doesn't use them,
-\fBanywhere\fP will - even if that reduces performance by
-placing two stripes on the same Physical Volume.
-.
-.HP
-.BR \-\-commandprofile
-.IR ProfileName
-.br
-Selects the command configuration profile to use when processing an LVM command.
-See also \fBlvm.conf\fP(5) for more information about \fBcommand profile config\fP and
-the way it fits with other LVM configuration methods. Using \fB\-\-commandprofile\fP
-option overrides any command profile specified via \fBLVM_COMMAND_PROFILE\fP
-environment variable.
-.
-.HP
-.BR \-\-metadataprofile
-.IR ProfileName
-.br
-Selects the metadata configuration profile to use when processing an LVM command.
-When using metadata profile during Volume Group or Logical Volume creation,
-the metadata profile name is saved in metadata. When such Volume Group or Logical
-Volume is processed next time, the metadata profile is automatically applied
-and the use of \fB\-\-metadataprofile\fP option is not necessary. See also
-\fBlvm.conf\fP(5) for more information about \fBmetadata profile config\fP and the
-way it fits with other LVM configuration methods.
-.
-.HP
-.BR \-\-profile
-.IR ProfileName
-.br
-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
-\fB\-\-profile\fP has special meaning, see \fBlvmconfig\fP(8) for more information).
-.
-.HP
-.BR \-\-reportformat
-.IR {basic|json}
-.br
-Overrides current output format for reports which is defined globally by
-\fBreport/output_format\fP configuration setting in \fBlvm.conf\fP(5).
-The \fBbasic\fP format is the original format with columns and rows and
-if there is more than one report per command, each report is prefixed
-with report's name for identification. The \fBjson\fP stands for report
-output in JSON format.
-.HP
-.BR \-\-config
-.IR ConfigurationString
-.br
-Uses the ConfigurationString as direct string representation of the configuration
-to override the existing configuration. The ConfigurationString is of exactly
-the same format as used in any LVM configuration file. See \fBlvm.conf\fP(5)
-for more information about \fBdirect config override on command line\fP and the
-way it fits with other LVM configuration methods.
-.
.SH VALID NAMES
.
The valid characters for VG and LV names are:
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5c779b323132bfd2…
Commit: 5c779b323132bfd2ddc5cf639a6fcd3e9b10a309
Parent: db26a82f2f464d0f710229c24d67c83818fd8f3c
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jan 6 16:56:59 2017 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 13 08:20:10 2017 -0600
args: add man page descriptions
---
tools/args.h | 1582 ++++++++++++++++++++++++++++++++++++++++-------
tools/create-commands.c | 292 +++++++--
tools/lvmcmdline.c | 2 +-
tools/tools.h | 3 +-
4 files changed, 1611 insertions(+), 268 deletions(-)
diff --git a/tools/args.h b/tools/args.h
index 690b4ee..8802cd7 100644
--- a/tools/args.h
+++ b/tools/args.h
@@ -17,221 +17,1385 @@
* Put all long args that don't have a corresponding short option first.
*/
/* *INDENT-OFF* */
-arg(ARG_UNUSED, '-', "", 0, 0, 0) /* place holder for unused 0 value */
-
-arg(abort_ARG, '\0', "abort", 0, 0, 0)
-arg(activationmode_ARG, '\0', "activationmode", activationmode_VAL, 0, 0)
-arg(addtag_ARG, '\0', "addtag", tag_VAL, ARG_GROUPABLE, 0)
-arg(aligned_ARG, '\0', "aligned", 0, 0, 0)
-arg(alloc_ARG, '\0', "alloc", alloc_VAL, 0, 0)
-arg(atomic_ARG, '\0', "atomic", 0, 0, 0)
-arg(atversion_ARG, '\0', "atversion", string_VAL, 0, 0)
-arg(binary_ARG, '\0', "binary", 0, 0, 0)
-arg(bootloaderareasize_ARG, '\0', "bootloaderareasize", sizemb_VAL, 0, 0)
-arg(cache_long_ARG, '\0', "cache", 0, 0, 0)
-arg(cachemode_ARG, '\0', "cachemode", cachemode_VAL, 0, 0)
-arg(cachepool_ARG, '\0', "cachepool", lv_VAL, 0, 0)
-arg(commandprofile_ARG, '\0', "commandprofile", string_VAL, 0, 0)
-arg(config_ARG, '\0', "config", string_VAL, 0, 0)
-arg(configreport_ARG, '\0', "configreport", configreport_VAL, ARG_GROUPABLE, 1)
-arg(configtype_ARG, '\0', "typeconfig", configtype_VAL, 0, 0)
-arg(corelog_ARG, '\0', "corelog", 0, 0, 0)
-arg(dataalignment_ARG, '\0', "dataalignment", sizekb_VAL, 0, 0)
-arg(dataalignmentoffset_ARG, '\0', "dataalignmentoffset", sizekb_VAL, 0, 0)
-arg(deltag_ARG, '\0', "deltag", tag_VAL, ARG_GROUPABLE, 0)
-arg(detachprofile_ARG, '\0', "detachprofile", 0, 0, 0)
-arg(discards_ARG, '\0', "discards", discards_VAL, 0, 0)
-arg(driverloaded_ARG, '\0', "driverloaded", bool_VAL, 0, 0)
-arg(errorwhenfull_ARG, '\0', "errorwhenfull", bool_VAL, 0, 0)
-arg(force_long_ARG, '\0', "force", 0, ARG_COUNTABLE, 0)
-arg(foreign_ARG, '\0', "foreign", 0, 0, 0)
-arg(handlemissingpvs_ARG, '\0', "handlemissingpvs", 0, 0, 0)
-arg(ignoreadvanced_ARG, '\0', "ignoreadvanced", 0, 0, 0)
-arg(ignorelocal_ARG, '\0', "ignorelocal", 0, 0, 0)
-arg(ignorelockingfailure_ARG, '\0', "ignorelockingfailure", 0, 0, 0)
-arg(ignoremonitoring_ARG, '\0', "ignoremonitoring", 0, 0, 0)
-arg(ignoreskippedcluster_ARG, '\0', "ignoreskippedcluster", 0, 0, 0)
-arg(ignoreunsupported_ARG, '\0', "ignoreunsupported", 0, 0, 0)
-arg(labelsector_ARG, '\0', "labelsector", number_VAL, 0, 0)
-arg(lockopt_ARG, '\0', "lockopt", string_VAL, 0, 0)
-arg(lockstart_ARG, '\0', "lockstart", 0, 0, 0)
-arg(lockstop_ARG, '\0', "lockstop", 0, 0, 0)
-arg(locktype_ARG, '\0', "locktype", locktype_VAL, 0, 0)
-arg(logonly_ARG, '\0', "logonly", 0, 0, 0)
-arg(maxrecoveryrate_ARG, '\0', "maxrecoveryrate", sizekb_VAL, 0, 0)
-arg(merge_ARG, '\0', "merge", 0, 0, 0)
-arg(mergemirrors_ARG, '\0', "mergemirrors", 0, 0, 0)
-arg(mergesnapshot_ARG, '\0', "mergesnapshot", 0, 0, 0)
-arg(mergethin_ARG, '\0', "mergethin", 0, 0, 0)
-arg(mergedconfig_ARG, '\0', "mergedconfig", 0, 0, 0)
-arg(metadatacopies_ARG, '\0', "metadatacopies", metadatacopies_VAL, 0, 0)
-arg(metadataignore_ARG, '\0', "metadataignore", bool_VAL, 0, 0)
-arg(metadataprofile_ARG, '\0', "metadataprofile", string_VAL, 0, 0)
-arg(metadatasize_ARG, '\0', "metadatasize", sizemb_VAL, 0, 0)
-arg(minor_ARG, '\0', "minor", number_VAL, ARG_GROUPABLE, 0)
-arg(minrecoveryrate_ARG, '\0', "minrecoveryrate", sizekb_VAL, 0, 0)
-arg(mirrorlog_ARG, '\0', "mirrorlog", mirrorlog_VAL, 0, 0)
-arg(mirrorsonly_ARG, '\0', "mirrorsonly", 0, 0, 0)
-arg(mknodes_ARG, '\0', "mknodes", 0, 0, 0)
-arg(monitor_ARG, '\0', "monitor", bool_VAL, 0, 0)
-arg(nameprefixes_ARG, '\0', "nameprefixes", 0, 0, 0)
-arg(noheadings_ARG, '\0', "noheadings", 0, 0, 0)
-arg(nohistory_ARG, '\0', "nohistory", 0, 0, 0)
-arg(nolocking_ARG, '\0', "nolocking", 0, 0, 0)
-arg(norestorefile_ARG, '\0', "norestorefile", 0, 0, 0)
-arg(nosuffix_ARG, '\0', "nosuffix", 0, 0, 0)
-arg(nosync_ARG, '\0', "nosync", 0, 0, 0)
-arg(notifydbus_ARG, '\0', "notifydbus", 0, 0, 0)
-arg(noudevsync_ARG, '\0', "noudevsync", 0, 0, 0)
-arg(originname_ARG, '\0', "originname", lv_VAL, 0, 0)
-arg(physicalvolumesize_ARG, '\0', "setphysicalvolumesize", sizemb_VAL, 0, 0)
-arg(poll_ARG, '\0', "poll", bool_VAL, 0, 0)
-arg(polloperation_ARG, '\0', "polloperation", polloperation_VAL, 0, 0)
-arg(pooldatasize_ARG, '\0', "pooldatasize", sizemb_VAL, 0, 0)
-arg(poolmetadata_ARG, '\0', "poolmetadata", lv_VAL, 0, 0)
-arg(poolmetadatasize_ARG, '\0', "poolmetadatasize", sizemb_VAL, 0, 0)
-arg(poolmetadataspare_ARG, '\0', "poolmetadataspare", bool_VAL, 0, 0)
-arg(profile_ARG, '\0', "profile", string_VAL, 0, 0)
-arg(pvmetadatacopies_ARG, '\0', "pvmetadatacopies", pvmetadatacopies_VAL, 0, 0)
-arg(raidrebuild_ARG, '\0', "raidrebuild", pv_VAL, ARG_GROUPABLE, 0)
-arg(raidmaxrecoveryrate_ARG, '\0', "raidmaxrecoveryrate", sizekb_VAL, 0, 0)
-arg(raidminrecoveryrate_ARG, '\0', "raidminrecoveryrate", sizekb_VAL, 0, 0)
-arg(raidsyncaction_ARG, '\0', "raidsyncaction", syncaction_VAL, 0, 0)
-arg(raidwritebehind_ARG, '\0', "raidwritebehind", number_VAL, 0, 0)
-arg(raidwritemostly_ARG, '\0', "raidwritemostly", writemostly_VAL, ARG_GROUPABLE, 0)
-arg(readonly_ARG, '\0', "readonly", 0, 0, 0)
-arg(refresh_ARG, '\0', "refresh", 0, 0, 0)
-arg(removemissing_ARG, '\0', "removemissing", 0, 0, 0)
-arg(rebuild_ARG, '\0', "rebuild", pv_VAL, ARG_GROUPABLE, 0)
-arg(repair_ARG, '\0', "repair", 0, 0, 0)
-arg(replace_ARG, '\0', "replace", pv_VAL, ARG_GROUPABLE, 0)
-arg(reportformat_ARG, '\0', "reportformat", reportformat_VAL, 0, 0)
-arg(restorefile_ARG, '\0', "restorefile", string_VAL, 0, 0)
-arg(restoremissing_ARG, '\0', "restoremissing", 0, 0, 0)
-arg(resync_ARG, '\0', "resync", 0, 0, 0)
-arg(rows_ARG, '\0', "rows", 0, 0, 0)
-arg(segments_ARG, '\0', "segments", 0, 0, 0)
-arg(separator_ARG, '\0', "separator", string_VAL, 0, 0)
-arg(shared_ARG, '\0', "shared", 0, 0, 0)
-arg(sinceversion_ARG, '\0', "sinceversion", string_VAL, 0, 0)
-arg(split_ARG, '\0', "split", 0, 0, 0)
-arg(splitcache_ARG, '\0', "splitcache", 0, 0, 0)
-arg(splitmirrors_ARG, '\0', "splitmirrors", number_VAL, 0, 0)
-arg(splitsnapshot_ARG, '\0', "splitsnapshot", 0, 0, 0)
-arg(showdeprecated_ARG, '\0', "showdeprecated", 0, 0, 0)
-arg(showunsupported_ARG, '\0', "showunsupported", 0, 0, 0)
-arg(startpoll_ARG, '\0', "startpoll", 0, 0, 0)
-arg(stripes_long_ARG, '\0', "stripes", number_VAL, 0, 0)
-arg(swapmetadata_ARG, '\0', "swapmetadata", 0, 0, 0)
-arg(syncaction_ARG, '\0', "syncaction", syncaction_VAL, 0, 0)
-arg(sysinit_ARG, '\0', "sysinit", 0, 0, 0)
-arg(systemid_ARG, '\0', "systemid", string_VAL, 0, 0)
-arg(thinpool_ARG, '\0', "thinpool", lv_VAL, 0, 0)
-arg(trackchanges_ARG, '\0', "trackchanges", 0, 0, 0)
-arg(trustcache_ARG, '\0', "trustcache", 0, 0, 0)
-arg(type_ARG, '\0', "type", segtype_VAL, 0, 0)
-arg(unbuffered_ARG, '\0', "unbuffered", 0, 0, 0)
-arg(uncache_ARG, '\0', "uncache", 0, 0, 0)
-arg(cachepolicy_ARG, '\0', "cachepolicy", string_VAL, 0, 0)
-arg(cachesettings_ARG, '\0', "cachesettings", string_VAL, ARG_GROUPABLE, 0)
-arg(unconfigured_ARG, '\0', "unconfigured", 0, 0, 0)
-arg(units_ARG, '\0', "units", units_VAL, 0, 0)
-arg(unquoted_ARG, '\0', "unquoted", 0, 0, 0)
-arg(usepolicies_ARG, '\0', "usepolicies", 0, 0, 0)
-arg(validate_ARG, '\0', "validate", 0, 0, 0)
-arg(version_ARG, '\0', "version", 0, 0, 0)
-arg(vgmetadatacopies_ARG, '\0', "vgmetadatacopies", vgmetadatacopies_VAL, 0, 0)
-arg(virtualoriginsize_ARG, '\0', "virtualoriginsize", sizemb_VAL, 0, 0)
-arg(withsummary_ARG, '\0', "withsummary", 0, 0, 0)
-arg(withcomments_ARG, '\0', "withcomments", 0, 0, 0)
-arg(withspaces_ARG, '\0', "withspaces", 0, 0, 0)
-arg(withversions_ARG, '\0', "withversions", 0, 0, 0)
-arg(writebehind_ARG, '\0', "writebehind", number_VAL, 0, 0)
-arg(writemostly_ARG, '\0', "writemostly", writemostly_VAL, ARG_GROUPABLE, 0)
+arg(ARG_UNUSED, '-', "", 0, 0, 0, NULL) /* place holder for unused 0 value */
+
+arg(abort_ARG, '\0', "abort", 0, 0, 0,
+ "#pvmove\n"
+ "Abort any pvmove operations in progress. If a pvmove was started\n"
+ "with the --atomic option, then all LVs will remain on the source PV.\n"
+ "Otherwise, segments that have been moved will remain on the\n"
+ "destination PV, while unmoved segments will remain on the source PV.\n"
+ "#lvpoll\n"
+ "Stop processing a poll operation in lvmpolld.\n")
+
+arg(activationmode_ARG, '\0', "activationmode", activationmode_VAL, 0, 0,
+ "Determines if LV activation is allowed when PVs are missing,\n"
+ "e.g. because of a device failure.\n"
+ "\\fBcomplete\\fP only allows LVs with no missing PVs to be activated,\n"
+ "and is the most restrictive mode.\n"
+ "\\fBdegraded\\fP allows RAID LVs with missing PVs to be activated.\n"
+ "(This does not include the \"mirror\" type, see \"raid1\" instead.)\n"
+ "\\fBpartial\\fP allows any LV with missing PVs to be activated, and\n"
+ "should only be used for recovery or repair.\n"
+ "For default, see lvm.conf/activation_mode.\n")
+
+arg(addtag_ARG, '\0', "addtag", tag_VAL, ARG_GROUPABLE, 0,
+ "Adds a tag to a PV, VG or LV. This option can be repeated to add\n"
+ "multiple tags at once. See lvm(8) for information about tags.\n")
+
+arg(aligned_ARG, '\0', "aligned", 0, 0, 0,
+ "Use with --separator to align the output columns\n")
+
+arg(alloc_ARG, '\0', "alloc", alloc_VAL, 0, 0,
+ "Determines the allocation policy when a command needs to allocate\n"
+ "Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy\n"
+ "which can be changed with vgchange/lvchange, or overriden on the\n"
+ "command line.\n"
+ "\\fBnormal\\fP applies common sense rules such as not placing parallel stripes\n"
+ "on the same PV.\n"
+ "\\fBinherit\\fP applies the VG policy to an LV.\n"
+ "\\fBcontiguous\\fP requires new PEs be placed adjacent to existing PEs.\n"
+ "\\fBcling\\fP places new PEs on the same PV as existing PEs in the same\n"
+ "stripe of the LV.\n"
+ "If there are sufficient PEs for an allocation, but normal does not\n"
+ "use them, \\fBanywhere\\fP will use them even if it reduces performance,\n"
+ "e.g. by placing two stripes on the same PV.\n"
+ "Optional positional PV args on the command line can also be used to limit\n"
+ "which PVs the command will use for allocation.\n"
+ "See lvm(8) for more information about allocation.\n")
+
+arg(atomic_ARG, '\0', "atomic", 0, 0, 0,
+ "Makes a pvmove operation atomic, ensuring that all affected LVs are\n"
+ "moved to the destination PV, or none are if the operation is aborted.\n")
+
+arg(atversion_ARG, '\0', "atversion", string_VAL, 0, 0,
+ "Specify an LVM version in x.y.z format where x is the major version,\n"
+ "the y is the minor version and z is the patchlevel (e.g. 2.2.106).\n"
+ "When configuration is displayed, the configuration settings recognized\n"
+ "at this LVM version will be considered only. This can be used\n"
+ "to display a configuration that a certain LVM version understands and\n"
+ "which does not contain any newer settings for which LVM would\n"
+ "issue a warning message when checking the configuration.\n")
+
+arg(binary_ARG, '\0', "binary", 0, 0, 0,
+ "Use binary values \"0\" or \"1\" instead of descriptive literal values\n"
+ "for columns that have exactly two valid values to report (not counting\n"
+ "the \"unknown\" value which denotes that the value could not be determined).\n")
+
+arg(bootloaderareasize_ARG, '\0', "bootloaderareasize", sizemb_VAL, 0, 0,
+ "Create a separate bootloader area of specified size besides PV's data\n"
+ "area. The bootloader area is an area of reserved space on the PV from\n"
+ "which LVM will not allocate any extents and it's kept untouched. This is\n"
+ "primarily aimed for use with bootloaders to embed their own data or metadata.\n"
+ "The start of the bootloader area is always aligned, see also --dataalignment\n"
+ "and --dataalignmentoffset. The bootloader area size may eventually\n"
+ "end up increased due to the alignment, but it's never less than the\n"
+ "size that is requested. To see the bootloader area start and size of\n"
+ "an existing PV use pvs -o +pv_ba_start,pv_ba_size.\n")
+
+arg(cache_long_ARG, '\0', "cache", 0, 0, 0,
+ "#pvscan\n"
+ "Scan one or more devices and send the metadata to lvmetad.\n"
+ "#vgscan\n"
+ "Scan all devices and send the metadata to lvmetad.\n"
+ "#lvscan\n"
+ "Scan the devices used by an LV and send the metadata to lvmetad.\n")
+
+arg(cachemode_ARG, '\0', "cachemode", cachemode_VAL, 0, 0,
+ "Specifies when writes to a cache LV should be considered complete.\n"
+ "\\fBwriteback\\fP considers a write complete as soon as it is\n"
+ "stored in the cache pool.\n"
+ "\\fBwritethough\\fP considers a write complete only when it has\n"
+ "been stored in both the cache pool and on the origin LV.\n"
+ "While writethrough may be slower for writes, it is more\n"
+ "resilient if something should happen to a device associated with the\n"
+ "cache pool LV. With writethrough, all reads are served\n"
+ "from the origin LV (all reads miss the cache) and all writes are\n"
+ "forwarded to the origin LV; additionally, write hits cause cache\n"
+ "block invalidates. See lvmcache(7) for more information.\n")
+
+arg(cachepool_ARG, '\0', "cachepool", lv_VAL, 0, 0,
+ "The name of a cache pool LV.\n")
+
+arg(commandprofile_ARG, '\0', "commandprofile", string_VAL, 0, 0,
+ "The command profile to use for command configuration.\n"
+ "See lvm.conf(5) for more information about profiles.\n")
+
+arg(config_ARG, '\0', "config", string_VAL, 0, 0,
+ "Config settings for the command. These override lvm.conf settings.\n"
+ "The String arg uses the same format as lvm.conf,\n"
+ "or may use section/field syntax.\n"
+ "See lvm.conf(5) for more information about config.\n")
+
+arg(configreport_ARG, '\0', "configreport", configreport_VAL, ARG_GROUPABLE, 1,
+ "See lvmreport(7).\n")
+
+arg(configtype_ARG, '\0', "typeconfig", configtype_VAL, 0, 0,
+ "See lvmreport(7).\n")
+
+arg(corelog_ARG, '\0', "corelog", 0, 0, 0,
+ "An alias for --mirrorlog core.\n")
+
+arg(dataalignment_ARG, '\0', "dataalignment", sizekb_VAL, 0, 0,
+ "Align the start of the data to a multiple of this number.\n"
+ "Also specify an appropriate Physical Extent size when creating a VG.\n"
+ "To see the location of the first Physical Extent of an existing PV,\n"
+ "use pvs -o +pe_start. In addition, it may be shifted by an alignment offset.\n"
+ "See lvm.conf/data_alignment_offset_detection and --dataalignmentoffset.\n")
+
+arg(dataalignmentoffset_ARG, '\0', "dataalignmentoffset", sizekb_VAL, 0, 0,
+ "Shift the start of the data area by this additional offset.\n")
+
+arg(deltag_ARG, '\0', "deltag", tag_VAL, ARG_GROUPABLE, 0,
+ "Deletes a tag from a PV, VG or LV. This option can be repeated to delete\n"
+ "multiple tags at once. See lvm(8) for information about tags.\n")
+
+arg(detachprofile_ARG, '\0', "detachprofile", 0, 0, 0,
+ "Detaches a metadata profile from a VG or LV.\n"
+ "See lvm.conf(5) for more information about profiles.\n")
+
+arg(discards_ARG, '\0', "discards", discards_VAL, 0, 0,
+ "Specifies how the device-mapper thin pool layer in the kernel should\n"
+ "handle discards.\n"
+ "\\fBignore\\fP causes the thin pool to ignore discards.\n"
+ "\\fBnopassdown\\fP causes the thin pool to process discards itself to\n"
+ "allow reuse of unneeded extents in the thin pool.\n"
+ "\\fBpassdown\\fP causes the thin pool to process discards itself\n"
+ "(like nopassdown) and pass the discards to the underlying device.\n")
+
+arg(driverloaded_ARG, '\0', "driverloaded", bool_VAL, 0, 0,
+ "If set to no, the command will not attempt to use device-mapper.\n"
+ "For testing and debugging.\n")
+
+arg(errorwhenfull_ARG, '\0', "errorwhenfull", bool_VAL, 0, 0,
+ "Specifies thin pool behavior when data space is exhausted.\n"
+ "When yes, device-mapper will immediately return an error\n"
+ "when a thin pool is full and an I/O request requires space.\n"
+ "When no, device-mapper will queue these I/O requests for a\n"
+ "period of time to allow the thin pool to be extended.\n"
+ "Errors are returned if no space is available after the timeout.\n"
+ "(Also see dm-thin-pool kernel module option no_space_timeout.)\n")
+
+arg(force_long_ARG, '\0', "force", 0, ARG_COUNTABLE, 0,
+ "Force metadata restore even with thin pool LVs.\n"
+ "Use with extreme caution. Most changes to thin metadata\n"
+ "cannot be reverted.\n"
+ "You may lose data if you restore metadata that does not match the\n"
+ "thin pool kernel metadata precisely.\n")
+
+arg(foreign_ARG, '\0', "foreign", 0, 0, 0,
+ "Report/display foreign VGs that would otherwise be skipped.\n"
+ "See lvmsystemid(7) for more information about foreign VGs.\n")
+
+arg(handlemissingpvs_ARG, '\0', "handlemissingpvs", 0, 0, 0,
+ "Allows a polling operation to continue when PVs are missing,\n"
+ "e.g. for repairs due to faulty devices.\n")
+
+arg(ignoreadvanced_ARG, '\0', "ignoreadvanced", 0, 0, 0,
+ "Exclude advanced configuration settings from the output.\n")
+
+arg(ignorelocal_ARG, '\0', "ignorelocal", 0, 0, 0,
+ "Ignore local section.\n")
+
+arg(ignorelockingfailure_ARG, '\0', "ignorelockingfailure", 0, 0, 0,
+ "Allows a command to continue with read-only metadata\n"
+ "operations after locking failures.\n")
+
+arg(ignoremonitoring_ARG, '\0', "ignoremonitoring", 0, 0, 0,
+ "Do not interact with dmeventd unless --monitor is specified.\n"
+ "Do not use this if dmeventd is already monitoring a device.\n")
+
+arg(ignoreskippedcluster_ARG, '\0', "ignoreskippedcluster", 0, 0, 0,
+ "Use to avoid exiting with an non-zero status code if the command is run\n"
+ "without clustered locking and clustered VGs are skipped.\n")
+
+arg(ignoreunsupported_ARG, '\0', "ignoreunsupported", 0, 0, 0,
+ "Exclude unsupported configuration settings from the output. These settings are\n"
+ "either used for debugging and development purposes only or their support is not\n"
+ "yet complete and they are not meant to be used in production. The \\fBcurrent\\fP\n"
+ "and \\fBdiff\\fP types include unsupported settings in their output by default,\n"
+ "all the other types ignore unsupported settings.\n")
+
+arg(labelsector_ARG, '\0', "labelsector", number_VAL, 0, 0,
+ "By default the PV is labelled with an LVM2 identifier in its second\n"
+ "sector (sector 1). This lets you use a different sector near the\n"
+ "start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS\n"
+ "in the source). Use with care.\n")
+
+arg(lockopt_ARG, '\0', "lockopt", string_VAL, 0, 0,
+ "Used to pass options for special cases to lvmlockd.\n"
+ "See lvmlockd(8) for more information.\n")
+
+arg(lockstart_ARG, '\0', "lockstart", 0, 0, 0,
+ "Start the lockspace of a shared VG in lvmlockd.\n"
+ "lvmlockd locks becomes available for the VG, allowing LVM to use the VG.\n"
+ "See lvmlockd(8) for more information.\n")
+
+arg(lockstop_ARG, '\0', "lockstop", 0, 0, 0,
+ "Stop the lockspace of a shared VG in lvmlockd.\n"
+ "lvmlockd locks become unavailable for the VG, preventing LVM from using the VG.\n"
+ "See lvmlockd(8) for more information.\n")
+
+arg(locktype_ARG, '\0', "locktype", locktype_VAL, 0, 0,
+ "#vgchange\n"
+ "Change the VG lock type to or from a shared lock type used with lvmlockd.\n"
+ "See lvmlockd(8) for more information.\n"
+ "#vgcreate\n"
+ "Specify the VG lock type directly in place of using --shared.\n"
+ "See lvmlockd(8) for more information.\n")
+
+arg(logonly_ARG, '\0', "logonly", 0, 0, 0,
+ "Suppress command report and display only log report.\n")
+
+arg(maxrecoveryrate_ARG, '\0', "maxrecoveryrate", sizekb_VAL, 0, 0,
+ "Sets the maximum recovery rate for a RAID LV. The rate value\n"
+ "is an amount of data per second for each device in the array.\n"
+ "Setting the rate to 0 means it will be unbounded.\n")
+
+arg(merge_ARG, '\0', "merge", 0, 0, 0,
+ "An alias for --mergethin, --mergemirrors, or --mergesnapshot,\n"
+ "depending on the type of LV.\n")
+
+arg(mergemirrors_ARG, '\0', "mergemirrors", 0, 0, 0,
+ "Merge LV images that were split from a raid1 LV.\n"
+ "See --splitmirrors with --trackchanges.\n")
+
+arg(mergesnapshot_ARG, '\0', "mergesnapshot", 0, 0, 0,
+ "Merge COW snapshot LV into its origin.\n"
+ "When merging a snapshot, if both the origin and snapshot LVs are not open,\n"
+ "the merge will start immediately. Otherwise, the merge will start the\n"
+ "first time either the origin or snapshot LV are activated and both are\n"
+ "closed. Merging a snapshot into an origin that cannot be closed, for\n"
+ "example a root filesystem, is deferred until the next time the origin\n"
+ "volume is activated. When merging starts, the resulting LV will have the\n"
+ "origin's name, minor number and UUID. While the merge is in progress,\n"
+ "reads or writes to the origin appear as being directed to the snapshot\n"
+ "being merged. When the merge finishes, the merged snapshot is removed.\n"
+ "Multiple snapshots may be specified on the command line or a @tag may be\n"
+ "used to specify multiple snapshots be merged to their respective origin.\n")
+
+arg(mergethin_ARG, '\0', "mergethin", 0, 0, 0,
+ "Merge thin LV into its origin LV.\n"
+ "The origin thin LV takes the content of the thin snapshot,\n"
+ "and the thin snapshot LV is removed.\n")
+
+arg(mergedconfig_ARG, '\0', "mergedconfig", 0, 0, 0,
+ "When the command is run with --config\n"
+ "and/or --commandprofile (or using LVM_COMMAND_PROFILE\n"
+ "environment variable), --profile, or --metadataprofile,\n"
+ "merge all the contents of the \"config cascade\" before displaying it.\n"
+ "Without merging, only the configuration at the front of the\n"
+ "cascade is displayed.\n"
+ "See lvm.conf(5) for more information about config.\n")
+
+arg(metadatacopies_ARG, '\0', "metadatacopies", metadatacopies_VAL, 0, 0,
+ "For commands starting with 'pv', this is an alias for --pvmetadatacopies.\n"
+ "For commands starting with 'vg', this is an alias for --vgmetadatacopies.\n")
+
+arg(metadataignore_ARG, '\0', "metadataignore", bool_VAL, 0, 0,
+ "Specifies the metadataignore property of a PV.\n"
+ "If yes, metadata areas on the PV are ignored, and lvm will\n"
+ "not store metadata in the metadata areas of the PV.\n"
+ "If no, lvm will store metadata on the PV.\n")
+
+arg(metadataprofile_ARG, '\0', "metadataprofile", string_VAL, 0, 0,
+ "The metadata profile to use for command configuration.\n"
+ "See lvm.conf(5) for more information about profiles.\n")
+
+arg(metadatasize_ARG, '\0', "metadatasize", sizemb_VAL, 0, 0,
+ "The approximate amount of space used for each VG metadata area.\n"
+ "The size may be rounded.\n")
+
+arg(minor_ARG, '\0', "minor", number_VAL, ARG_GROUPABLE, 0,
+ "#lvcreate\n"
+ "#lvchange\n"
+ "Sets the minor number of an LV block device.\n"
+ "#pvscan\n"
+ "The minor number of a device.\n")
+
+arg(minrecoveryrate_ARG, '\0', "minrecoveryrate", sizekb_VAL, 0, 0,
+ "Sets the minimum recovery rate for a RAID LV. The rate value\n"
+ "is an amount of data per second for each device in the array.\n"
+ "Setting the rate to 0 means it will be unbounded.\n")
+
+arg(mirrorlog_ARG, '\0', "mirrorlog", mirrorlog_VAL, 0, 0,
+ "Specifies the type of mirror log for LVs with the \"mirror\" type\n"
+ "(does not apply to the \"raid1\" type.)\n"
+ "\\fBdisk\\fP is a persistent log and requires a small amount of\n"
+ "storage space, usually on a separate device from the data being mirrored.\n"
+ "\\fBcore\\fP is not persistent; the log is kept only in memory.\n"
+ "In this case, the mirror must be synchronized (by copying LV data from\n"
+ "the first device to others) each time the LV is activated, e.g. after reboot.\n"
+ "\\fBmirrored\\fP is a persistent log that is itself mirrored.\n")
+
+arg(mirrorsonly_ARG, '\0', "mirrorsonly", 0, 0, 0,
+ "Only remove missing PVs from mirror LVs.\n")
+
+arg(mknodes_ARG, '\0', "mknodes", 0, 0, 0,
+ "Also checks the LVM special files in /dev that are needed for active\n"
+ "LVs and creates any missing ones and removes unused ones.\n")
+
+arg(monitor_ARG, '\0', "monitor", bool_VAL, 0, 0,
+ "Start (yes) or stop (no) monitoring an LV with dmeventd.\n"
+ "dmeventd monitors kernel events for an LV, and performs\n"
+ "automated maintenance for the LV in reponse to specific events.\n"
+ "See dmeventd(8) for more information.\n")
+
+arg(nameprefixes_ARG, '\0', "nameprefixes", 0, 0, 0,
+ "Add an \"LVM2_\" prefix plus the field name to the output. Useful\n"
+ "with --noheadings to produce a list of field=value pairs that can\n"
+ "be used to set environment variables (for example, in udev rules).\n")
+
+arg(noheadings_ARG, '\0', "noheadings", 0, 0, 0,
+ "Suppress the headings line that is normally the first line of output.\n"
+ "Useful if grepping the output.\n")
+
+arg(nohistory_ARG, '\0', "nohistory", 0, 0, 0,
+ "Do not record history of LVs being removed.\n"
+ "This has no effect unless the configuration setting\n"
+ "metadata/record_lvs_history is enabled.\n")
+
+arg(nolocking_ARG, '\0', "nolocking", 0, 0, 0,
+ "Disable locking.\n")
+
+arg(norestorefile_ARG, '\0', "norestorefile", 0, 0, 0,
+ "In conjunction with --uuid, this allows a uuid to be specified\n"
+ "without also requiring that a backup of the metadata be provided.\n")
+
+arg(nosuffix_ARG, '\0', "nosuffix", 0, 0, 0,
+ "Suppress the suffix on output sizes. Use with --units\n"
+ "(except h and H) if processing the output.\n")
+
+arg(nosync_ARG, '\0', "nosync", 0, 0, 0,
+ "Causes the creation of mirror, raid1, raid4, raid5 and raid10 to skip the\n"
+ "initial synchronization. In case of mirror, raid1 and raid10, any data\n"
+ "written afterwards will be mirrored, but the original contents will not be\n"
+ "copied. In case of raid4 and raid5, no parity blocks will be written,\n"
+ "though any data written afterwards will cause parity blocks to be stored.\n"
+ "This is useful for skipping a potentially long and resource intensive initial\n"
+ "sync of an empty mirror/raid1/raid4/raid5 and raid10 LV.\n"
+ "This option is not valid for raid6, because raid6 relies on proper parity\n"
+ "(P and Q Syndromes) being created during initial synchronization in order\n"
+ "to reconstruct proper user date in case of device failures.\n"
+ "raid0 and raid0_meta do not provide any data copies or parity support\n"
+ "and thus do not support initial synchronization.\n")
+
+arg(notifydbus_ARG, '\0', "notifydbus", 0, 0, 0,
+ "Send a notification to D-Bus. The command will exit with an error\n"
+ "if LVM is not built with support for D-Bus notification, or if the\n"
+ "notify_dbus config setting is disabled.\n")
+
+arg(noudevsync_ARG, '\0', "noudevsync", 0, 0, 0,
+ "Disables udev synchronisation. The process will not wait for notification\n"
+ "from udev. It will continue irrespective of any possible udev processing\n"
+ "in the background. Only use this if udev is not running or has rules that\n"
+ "ignore the devices LVM creates.\n")
+
+arg(originname_ARG, '\0', "originname", lv_VAL, 0, 0,
+ "Specifies the name to use for the external origin LV when converting an LV\n"
+ "to a thin LV. The LV being converted becomes a read-only external origin\n"
+ "with this name.\n")
+
+arg(physicalvolumesize_ARG, '\0', "setphysicalvolumesize", sizemb_VAL, 0, 0,
+ "Overrides the automatically detected size of the PV.\n"
+ "Use with care, or prior to reducing the physical size of the device.\n")
+
+arg(poll_ARG, '\0', "poll", bool_VAL, 0, 0,
+ "When yes, start the background transformation of an LV.\n"
+ "An incomplete transformation, e.g. pvmove or lvconvert interrupted\n"
+ "by reboot or crash, can be restarted from the last checkpoint with --poll y.\n"
+ "When no, background transformation of an LV will not occur, and the\n"
+ "transformation will not complete. It may not be appropriate to immediately\n"
+ "poll an LV after activation, in which case --poll n can be used to defer\n"
+ "polling until a later --poll y command.\n")
+
+arg(polloperation_ARG, '\0', "polloperation", polloperation_VAL, 0, 0,
+ "The command to perform from lvmpolld.\n")
+
+/* Not used. */
+arg(pooldatasize_ARG, '\0', "pooldatasize", sizemb_VAL, 0, 0, NULL)
+
+arg(poolmetadata_ARG, '\0', "poolmetadata", lv_VAL, 0, 0,
+ "The name of a an LV to use for storing pool metadata.\n")
+
+arg(poolmetadatasize_ARG, '\0', "poolmetadatasize", sizemb_VAL, 0, 0,
+ "The size of the pool metadata LV created by the command.\n")
+
+arg(poolmetadataspare_ARG, '\0', "poolmetadataspare", bool_VAL, 0, 0,
+ "Enable or disable the automatic creation and management of a\n"
+ "spare pool metadata LV in the VG. A spare metadata LV is reserved\n"
+ "space that can be used when repairing a pool.\n")
+
+arg(profile_ARG, '\0', "profile", string_VAL, 0, 0,
+ "An alias for --commandprofile or --metadataprofile, depending\n"
+ "on the command.\n")
+
+arg(pvmetadatacopies_ARG, '\0', "pvmetadatacopies", pvmetadatacopies_VAL, 0, 0,
+ "The number of metadata areas to set aside on a PV for storing VG metadata.\n"
+ "When 2, one copy of the VG metadata is stored at the front of the PV\n"
+ "and a second copy is stored at the end.\n"
+ "When 1, one copy of the VG metadata is stored at the front of the PV\n"
+ "(starting in the 5th sector).\n"
+ "When 0, no copies of the VG metadata are stored on the given PV.\n"
+ "This may be useful in VGs containing many PVs (this places limitations\n"
+ "on the ability to use vgsplit later.)\n")
+
+arg(raidrebuild_ARG, '\0', "raidrebuild", pv_VAL, ARG_GROUPABLE, 0,
+ "An alias for --rebuild.\n")
+
+arg(raidmaxrecoveryrate_ARG, '\0', "raidmaxrecoveryrate", sizekb_VAL, 0, 0,
+ "An alias for --maxrecoveryrate.\n")
+
+arg(raidminrecoveryrate_ARG, '\0', "raidminrecoveryrate", sizekb_VAL, 0, 0,
+ "An alias for --minrecoveryrate.\n")
+
+arg(raidsyncaction_ARG, '\0', "raidsyncaction", syncaction_VAL, 0, 0,
+ "An alias for --syncaction.\n")
+
+arg(raidwritebehind_ARG, '\0', "raidwritebehind", number_VAL, 0, 0,
+ "An alias for --writebehind.\n")
+
+arg(raidwritemostly_ARG, '\0', "raidwritemostly", writemostly_VAL, ARG_GROUPABLE, 0,
+ "An alias for --writemostly.\n")
+
+arg(readonly_ARG, '\0', "readonly", 0, 0, 0,
+ "Run the command in a special read-only mode which will read on-disk\n"
+ "metadata without needing to take any locks. This can be used to peek\n"
+ "inside metadata used by a virtual machine image while the virtual\n"
+ "machine is running.\n"
+ "It can also be used to peek inside the metadata of clustered VGs\n"
+ "when clustered locking is not configured or running. No attempt\n"
+ "will be made to communicate with the device-mapper kernel driver, so\n"
+ "this option is unable to report whether or not LVs are\n"
+ "actually in use.\n")
+
+arg(refresh_ARG, '\0', "refresh", 0, 0, 0,
+ "If the LV is active, reload its metadata.\n"
+ "This is not necessary in normal operation, but may be useful\n"
+ "if something has gone wrong, or if some form of manual LV\n"
+ "sharing is being used.\n")
+
+arg(removemissing_ARG, '\0', "removemissing", 0, 0, 0,
+ "Removes all missing PVs from the VG, if there are no LVs allocated\n"
+ "on them. This resumes normal operation of the VG (new LVs may again\n"
+ "be created, changed and so on).\n"
+ "If this is not possible because LVs are referencing the missing PVs,\n"
+ "this option can be combined with --force to have the command remove\n"
+ "any partial LVs. In this case, any LVs and dependent snapshots that\n"
+ "were partly on the missing disks are removed completely, including\n"
+ "those parts on disks that are still present.\n"
+ "If LVs spanned several disks, including ones that are lost, salvaging\n"
+ "some data first may be possible by activating LVs in partial mode.\n")
+
+arg(rebuild_ARG, '\0', "rebuild", pv_VAL, ARG_GROUPABLE, 0,
+ "Selects a PV to rebuild in a raid LV. Multiple PVs can be rebuilt by\n"
+ "repeating this option.\n"
+ "Use this option in place of --resync or --syncaction repair when the\n"
+ "PVs with corrupted data are known, and their data should be reconstructed\n"
+ "rather than reconstructing default (rotating) data.\n")
+
+arg(repair_ARG, '\0', "repair", 0, 0, 0,
+ "Replace failed PVs in a raid or mirror LV, or run a repair\n"
+ "utility on a thin pool.\n")
+
+arg(replace_ARG, '\0', "replace", pv_VAL, ARG_GROUPABLE, 0,
+ "Replace a specific PV in a raid LV with another PV.\n"
+ "The new PV to use can be optionally specified after the LV.\n"
+ "Multiple PVs can be replaced by repeating this option.\n")
+
+arg(reportformat_ARG, '\0', "reportformat", reportformat_VAL, 0, 0,
+ "Overrides current output format for reports which is defined globally by\n"
+ "the report/output_format setting in lvm.conf.\n"
+ "\\fBbasic\\fP is the original format with columns and rows.\n"
+ "If there is more than one report per command, each report is prefixed\n"
+ "with the report name for identification. \\fBjson\\fP produces report\n"
+ "output in JSON format.\n")
+
+arg(restorefile_ARG, '\0', "restorefile", string_VAL, 0, 0,
+ "In conjunction with --uuid, this reads the file (produced by\n"
+ "vgcfgbackup), extracts the location and size of the data on the PV,\n"
+ "and ensures that the metadata produced by the program is consistent\n"
+ "with the contents of the file, i.e. the physical extents will be in\n"
+ "the same place and not be overwritten by new metadata. This provides\n"
+ "a mechanism to upgrade the metadata format or to add/remove metadata\n"
+ "areas. Use with care.\n")
+
+arg(restoremissing_ARG, '\0', "restoremissing", 0, 0, 0,
+ "Add a PV back into a VG after the PV was missing and then returned,\n"
+ "e.g. due to a transient failure. The PV is not reinitialized.\n")
+
+arg(resync_ARG, '\0', "resync", 0, 0, 0,
+ "Initiates mirror synchronization. Synchronization generally happens\n"
+ "automatically, but this option forces it to run.\n"
+ "Also see --rebuild to synchronize a specific PV.\n"
+ "During synchronization, data is read from the primary mirror device\n"
+ "and copied to the others. This can take considerable time, during\n"
+ "which the LV is without a complete redundant copy of the data.\n")
+
+arg(rows_ARG, '\0', "rows", 0, 0, 0,
+ "Output columns as rows.\n")
+
+arg(segments_ARG, '\0', "segments", 0, 0, 0,
+ "#pvs\n"
+ "Produces one line of output for each contiguous allocation of space on each\n"
+ "PV, showing the start (pvseg_start) and length (pvseg_size) in units of\n"
+ "physical extents.\n"
+ "#lvs\n"
+ "Use default columns that emphasize segment information.\n")
+
+arg(separator_ARG, '\0', "separator", string_VAL, 0, 0,
+ "String to use to separate each column. Useful if grepping the output.\n")
+
+arg(shared_ARG, '\0', "shared", 0, 0, 0,
+ "#vgcreate\n"
+ "Create a shared VG using lvmlockd if LVM is compiled with lockd support.\n"
+ "lvmlockd will select lock type sanlock or dlm depending on which lock\n"
+ "manager is running. This allows multiple hosts to share a VG on shared\n"
+ "devices. lvmlockd and a lock manager must be configured and running.\n"
+ "(A shared VG using lvmlockd is different from a clustered VG using clvmd.)\n"
+ "See lvmlockd(8) for more information about shared VGs.\n"
+ "#vgs\n"
+ "#lvs\n"
+ "#pvs\n"
+ "#fullreport\n"
+ "#vgdisplay\n"
+ "#lvdisplay\n"
+ "#pvdisplay\n"
+ "Report/display shared VGs that would otherwise be skipped when\n"
+ "lvmlockd is not being used on the host.\n"
+ "See lvmlockd(8) for more information about shared VGs.\n")
+
+arg(sinceversion_ARG, '\0', "sinceversion", string_VAL, 0, 0,
+ "Specify an LVM version in x.y.z format where x is the major version,\n"
+ "the y is the minor version and z is the patchlevel (e.g. 2.2.106).\n"
+ "This option is currently applicable only with --type new\n"
+ "to display all configuration settings introduced since given version.\n")
+
+/* Not used */
+arg(split_ARG, '\0', "split", 0, 0, 0, NULL)
+
+arg(splitcache_ARG, '\0', "splitcache", 0, 0, 0,
+ "Separates a cache pool from a cache LV, and keeps the unused cache pool LV.\n"
+ "Before the separation, the cache is flushed. Also see --uncache.\n")
+
+arg(splitmirrors_ARG, '\0', "splitmirrors", number_VAL, 0, 0,
+ "Splits the specified number of images from a raid1 or mirror LV\n"
+ "and uses them to create a new LV. If --trackchanges is also specified,\n"
+ "changes to the raid1 LV are tracked while the split LV remains detached.\n")
+
+arg(splitsnapshot_ARG, '\0', "splitsnapshot", 0, 0, 0,
+ "Separates a COW snapshot from its origin LV. The LV that is split off\n"
+ "contains the chunks that differ from the origin LV along with metadata\n"
+ "describing them. This LV can be wiped and then destroyed with lvremove.\n")
+
+arg(showdeprecated_ARG, '\0', "showdeprecated", 0, 0, 0,
+ "Include deprecated configuration settings in the output. These settings\n"
+ "are deprecated after a certain version. If a concrete version is specified\n"
+ "with --atversion, deprecated settings are automatically included\n"
+ "if the specified version is lower than the version in which the settings were\n"
+ "deprecated. The current and diff types include deprecated settings\n"
+ "in their output by default, all the other types ignore deprecated settings.\n")
+
+arg(showunsupported_ARG, '\0', "showunsupported", 0, 0, 0,
+ "Include unsupported configuration settings in the output. These settings\n"
+ "are either used for debugging or development purposes only, or their support\n"
+ "is not yet complete and they are not meant to be used in production. The\n"
+ "current and diff types include unsupported settings in their\n"
+ "output by default, all the other types ignore unsupported settings.\n")
+
+arg(startpoll_ARG, '\0', "startpoll", 0, 0, 0,
+ "Start polling an LV to continue processing a conversion.\n")
+
+arg(stripes_long_ARG, '\0', "stripes", number_VAL, 0, 0,
+ "Specifies the number of stripes in a striped LV. This is the number of\n"
+ "PVs (devices) that a striped LV is spread across. Data that\n"
+ "appears sequential in the LV is spread across multiple devices in units of\n"
+ "the stripe size (see --stripesize). This does not apply to\n"
+ "existing allocated space, only newly allocated space can be striped.\n")
+
+arg(swapmetadata_ARG, '\0', "swapmetadata", 0, 0, 0,
+ "Remove the metadata LV in a pool and replace it with another specified LV.\n"
+ "The removed LV is preserved and given the name of the LV that replaced it.\n"
+ "Used for repair only.\n")
+
+arg(syncaction_ARG, '\0', "syncaction", syncaction_VAL, 0, 0,
+ "Initiate different types of RAID synchronization.\n"
+ "This causes the RAID LV to read all data and parity\n"
+ "blocks in the array and check for discrepancies\n"
+ "(mismatches between mirrors or incorrect parity values).\n"
+ "\\fBcheck\\fP will count but not correct discrepancies.\n"
+ "\\fBrepair\\fP will correct discrepancies.\n"
+ "See lvs for reporting discrepancies found or repaired.\n")
+
+arg(sysinit_ARG, '\0', "sysinit", 0, 0, 0,
+ "Indicates that vgchange/lvchange is being invoked from early system initialisation\n"
+ "scripts (e.g. rc.sysinit or an initrd), before writable filesystems are\n"
+ "available. As such, some functionality needs to be disabled and this option\n"
+ "acts as a shortcut which selects an appropriate set of options. Currently,\n"
+ "this is equivalent to using --ignorelockingfailure, --ignoremonitoring,\n"
+ "--poll n, and setting env var LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES.\n"
+ "When used in conjunction with lvmetad enabled and running,\n"
+ "vgchange/lvchange skip autoactivation, and defer to pvscan autoactivation.\n")
+
+arg(systemid_ARG, '\0', "systemid", string_VAL, 0, 0,
+ "#vgcreate\n"
+ "Specifies the system ID that will be given to the new VG, overriding the\n"
+ "system ID of the host running the command. A VG is normally created\n"
+ "without this option, in which case the new VG is given the system ID of\n"
+ "the host creating it. Using this option requires caution because the\n"
+ "system ID of the new VG may not match the system ID of the host running\n"
+ "the command, leaving the VG inaccessible to the host.\n"
+ "See lvmsystemid(7) for more information.\n"
+ "#vgchange\n"
+ "Changes the system ID of the VG. Using this option requires caution\n"
+ "because the VG may become foreign to the host running the command,\n"
+ "leaving the host unable to access it.\n"
+ "See lvmsystemid(7) for more information.\n")
+
+arg(thinpool_ARG, '\0', "thinpool", lv_VAL, 0, 0,
+ "The name of a thin pool LV.\n")
+
+arg(trackchanges_ARG, '\0', "trackchanges", 0, 0, 0,
+ "Can be used with --splitmirrors on a raid1 LV. This causes\n"
+ "changes to the original raid1 LV to be tracked while the split images\n"
+ "remain detached. This allows the read-only detached image(s) to be\n"
+ "merged efficiently back into the raid1 LV later. Only the regions with\n"
+ "changed data are resynchronized during merge. (This option only applies\n"
+ "when using the raid1 LV type.)\n")
+
+/* TODO: hide this? */
+arg(trustcache_ARG, '\0', "trustcache", 0, 0, 0,
+ "Avoids certain device scanning during command processing. Do not use.\n")
+
+arg(type_ARG, '\0', "type", segtype_VAL, 0, 0,
+ "Specifies an LV type, or \"segment type\".\n")
+
+arg(unbuffered_ARG, '\0', "unbuffered", 0, 0, 0,
+ "Produce output immediately without sorting or aligning the columns properly.\n")
+
+arg(uncache_ARG, '\0', "uncache", 0, 0, 0,
+ "Separates a cache pool from a cache LV, and deletes the unused cache pool LV.\n"
+ "Before the separation, the cache is flushed. Also see --splitcache.\n")
+
+arg(cachepolicy_ARG, '\0', "cachepolicy", string_VAL, 0, 0,
+ "Specifies the cache policy for a cache LV.\n"
+ "See lvmcache(7) for more information.\n")
+
+arg(cachesettings_ARG, '\0', "cachesettings", string_VAL, ARG_GROUPABLE, 0,
+ "Specifies tunable values for a cache LV in \"Key = Value\" form.\n"
+ "Repeat this option to specify multiple values.\n"
+ "(The default values should usually be adequate.)\n"
+ "The special string value \\fBdefault\\fP switches\n"
+ "settings back to their default kernel values and removes\n"
+ "them from the list of settings stored in LVM metadata.\n"
+ "See lvmcache(7) for more information.\n")
+
+arg(unconfigured_ARG, '\0', "unconfigured", 0, 0, 0,
+ "Internal option used for generating config file during build.\n")
+
+arg(units_ARG, '\0', "units", units_VAL, 0, 0,
+ "All sizes are output in these units: (h)uman-readable, (b)ytes, (s)ectors,\n"
+ "(k)ilobytes, (m)egabytes, (g)igabytes, (t)erabytes, (p)etabytes, (e)xabytes.\n"
+ "Capitalise to use multiples of 1000 (S.I.) instead of 1024. Can also specify\n"
+ "custom units e.g. --units 3M.\n")
+
+arg(unquoted_ARG, '\0', "unquoted", 0, 0, 0,
+ "When used with --nameprefixes, output values in the field=value\n"
+ "pairs are not quoted.\n")
+
+arg(usepolicies_ARG, '\0', "usepolicies", 0, 0, 0,
+ "Perform an operation according to the policy configured in lvm.conf.\n"
+ "or a profile.\n")
+
+arg(validate_ARG, '\0', "validate", 0, 0, 0,
+ "Validate current configuration used and exit with appropriate\n"
+ "return code. The validation is done only for the configuration\n"
+ "at the front of the \"config cascade\". To validate the whole\n"
+ "merged configuration tree, also use --mergedconfig.\n"
+ "The validation is done even if lvm.conf config/checks is disabled.\n")
+
+arg(version_ARG, '\0', "version", 0, 0, 0,
+ "Display version information.\n")
+
+arg(vgmetadatacopies_ARG, '\0', "vgmetadatacopies", vgmetadatacopies_VAL, 0, 0,
+ "Number of copies of the VG metadata that are kept.\n"
+ "VG metadata is kept in VG metadata areas on PVs in the VG,\n"
+ "i.e. reserved space at the start and/or end of the PVs.\n"
+ "Keeping a copy of the VG metadata on every PV can reduce performance\n"
+ "in VGs containing a large number of PVs.\n"
+ "When this number is set to a non-zero value, LVM will automatically\n"
+ "choose PVs on which to store metadata, using the metadataignore flags\n"
+ "on PVs to achieve the specified number.\n"
+ "The number can also be replaced with special string values:\n"
+ "\\fBunmanaged\\fP causes LVM to not automatically manage the PV\n"
+ "metadataignore flags.\n"
+ "\\fBall\\fP causes LVM to first clear the metadataignore flags on\n"
+ "all PVs, and then to become unmanaged.\n")
+
+arg(virtualoriginsize_ARG, '\0', "virtualoriginsize", sizemb_VAL, 0, 0,
+ "An alias for --virtualsize.\n")
+
+arg(withsummary_ARG, '\0', "withsummary", 0, 0, 0,
+ "Display a one line comment for each configuration node.\n")
+
+arg(withcomments_ARG, '\0', "withcomments", 0, 0, 0,
+ "Display a full comment for each configuration node. For deprecated\n"
+ "settings, also display comments about deprecation.\n")
+
+arg(withspaces_ARG, '\0', "withspaces", 0, 0, 0,
+ "Where appropriate, add more spaces in output for better readability.\n")
+
+arg(withversions_ARG, '\0', "withversions", 0, 0, 0,
+ "Also display a comment containing the version of introduction for\n"
+ "each configuration node. If the setting is deprecated, also display\n"
+ "the version since which it is deprecated.\n")
+
+arg(writebehind_ARG, '\0', "writebehind", number_VAL, 0, 0,
+ "The maximum number of outstanding writes that are allowed to\n"
+ "devices in a RAID1 LV that is marked write-mostly.\n"
+ "Once this value is exceeded, writes become synchronous (i.e. all writes\n"
+ "to the constituent devices must complete before the array signals the\n"
+ "write has completed). Setting the value to zero clears the preference\n"
+ "and allows the system to choose the value arbitrarily.\n")
+
+arg(writemostly_ARG, '\0', "writemostly", writemostly_VAL, ARG_GROUPABLE, 0,
+ "Mark a device in a RAID1 LV as write-mostly. All reads\n"
+ "to these drives will be avoided unless absolutely necessary. This keeps\n"
+ "the number of I/Os to the drive to a minimum. The default behavior is to\n"
+ "set the write-mostly attribute for the specified PV.\n"
+ "It is also possible to remove the write-mostly flag by adding the\n"
+ "suffix \\fB:n\\fP at the end of the PV name, or to toggle the value with\n"
+ "the suffix \\fB:t\\fP. Repeat this option to change the attribute on\n"
+ "multiple PVs.\n")
/* Allow some variations */
-arg(allocation_ARG, '\0', "allocation", bool_VAL, 0, 0)
-arg(available_ARG, '\0', "available", activation_VAL, 0, 0)
-arg(resizable_ARG, '\0', "resizable", bool_VAL, 0, 0)
+arg(allocation_ARG, '\0', "allocation", bool_VAL, 0, 0, NULL)
+arg(available_ARG, '\0', "available", activation_VAL, 0, 0, NULL)
+arg(resizable_ARG, '\0', "resizable", bool_VAL, 0, 0, NULL)
/*
* ... and now the short args.
*/
-arg(activate_ARG, 'a', "activate", activation_VAL, 0, 0)
-arg(all_ARG, 'a', "all", 0, 0, 0)
-arg(autobackup_ARG, 'A', "autobackup", bool_VAL, 0, 0)
-arg(activevolumegroups_ARG, 'A', "activevolumegroups", 0, 0, 0)
-arg(background_ARG, 'b', "background", 0, 0, 0)
-arg(backgroundfork_ARG, 'b', "background", 0, 0, 0)
-arg(basevgname_ARG, 'n', "basevgname", string_VAL, 0, 0)
-arg(blockdevice_ARG, 'b', "blockdevice", 0, 0, 0)
-arg(chunksize_ARG, 'c', "chunksize", sizekb_VAL, 0, 0)
-arg(clustered_ARG, 'c', "clustered", bool_VAL, 0, 0)
-arg(colon_ARG, 'c', "colon", 0, 0, 0)
-arg(columns_ARG, 'C', "columns", 0, 0, 0)
-arg(contiguous_ARG, 'C', "contiguous", bool_VAL, 0, 0)
-arg(debug_ARG, 'd', "debug", 0, ARG_COUNTABLE, 0)
-arg(exported_ARG, 'e', "exported", 0, 0, 0)
-arg(physicalextent_ARG, 'E', "physicalextent", 0, 0, 0)
-arg(file_ARG, 'f', "file", string_VAL, 0, 0)
-arg(force_ARG, 'f', "force", 0, ARG_COUNTABLE, 0)
-arg(full_ARG, 'f', "full", 0, 0, 0)
-arg(help_ARG, 'h', "help", 0, ARG_COUNTABLE, 0)
-arg(cache_ARG, 'H', "cache", 0, 0, 0)
-arg(history_ARG, 'H', "history", 0, 0, 0)
-arg(help2_ARG, '?', "", 0, 0, 0)
-arg(import_ARG, 'i', "import", 0, 0, 0)
-arg(interval_ARG, 'i', "interval", number_VAL, 0, 0)
-arg(iop_version_ARG, 'i', "iop_version", 0, 0, 0)
-arg(stripes_ARG, 'i', "stripes", number_VAL, 0, 0)
-arg(stripesize_ARG, 'I', "stripesize", sizekb_VAL, 0, 0)
-arg(logicalvolume_ARG, 'l', "logicalvolume", number_VAL, 0, 0)
-arg(maxlogicalvolumes_ARG, 'l', "maxlogicalvolumes", number_VAL, 0, 0)
-arg(extents_ARG, 'l', "extents", numsignedper_VAL, 0, 0)
-arg(list_ARG, 'l', "list", 0, 0, 0)
-arg(lvmpartition_ARG, 'l', "lvmpartition", 0, 0, 0)
-arg(size_ARG, 'L', "size", sizemb_VAL, 0, 0)
-arg(persistent_ARG, 'M', "persistent", bool_VAL, 0, 0)
-arg(major_ARG, 'j', "major", number_VAL, ARG_GROUPABLE, 0)
-arg(setactivationskip_ARG, 'k', "setactivationskip", bool_VAL, 0, 0)
-arg(ignoreactivationskip_ARG, 'K', "ignoreactivationskip", 0, 0, 0)
-arg(maps_ARG, 'm', "maps", 0, 0, 0)
-arg(mirrors_ARG, 'm', "mirrors", numsigned_VAL, 0, 0)
-arg(metadatatype_ARG, 'M', "metadatatype", metadatatype_VAL, 0, 0)
-arg(name_ARG, 'n', "name", string_VAL, 0, 0)
-arg(nofsck_ARG, 'n', "nofsck", 0, 0, 0)
-arg(novolumegroup_ARG, 'n', "novolumegroup", 0, 0, 0)
-arg(oldpath_ARG, 'n', "oldpath", 0, 0, 0)
-arg(options_ARG, 'o', "options", string_VAL, ARG_GROUPABLE, 0)
-arg(sort_ARG, 'O', "sort", string_VAL, ARG_GROUPABLE, 0)
-arg(maxphysicalvolumes_ARG, 'p', "maxphysicalvolumes", uint32_VAL, 0, 0)
-arg(permission_ARG, 'p', "permission", permission_VAL, 0, 0)
-arg(partial_ARG, 'P', "partial", 0, 0, 0)
-arg(physicalvolume_ARG, 'P', "physicalvolume", 0, 0, 0)
-arg(quiet_ARG, 'q', "quiet", 0, ARG_COUNTABLE, 0)
-arg(readahead_ARG, 'r', "readahead", readahead_VAL, 0, 0)
-arg(resizefs_ARG, 'r', "resizefs", 0, 0, 0)
-arg(reset_ARG, 'R', "reset", 0, 0, 0)
-arg(regionsize_ARG, 'R', "regionsize", sizemb_VAL, 0, 0)
-arg(physicalextentsize_ARG, 's', "physicalextentsize", sizemb_VAL, 0, 0)
-arg(snapshot_ARG, 's', "snapshot", 0, 0, 0)
-arg(short_ARG, 's', "short", 0, 0, 0)
-arg(stdin_ARG, 's', "stdin", 0, 0, 0)
-arg(select_ARG, 'S', "select", string_VAL, ARG_GROUPABLE, 0)
-arg(test_ARG, 't', "test", 0, 0, 0)
-arg(thin_ARG, 'T', "thin", 0, 0, 0)
-arg(uuid_ARG, 'u', "uuid", 0, 0, 0)
-arg(uuidstr_ARG, 'u', "uuid", string_VAL, 0, 0)
-arg(uuidlist_ARG, 'U', "uuidlist", 0, 0, 0)
-arg(verbose_ARG, 'v', "verbose", 0, ARG_COUNTABLE, 0)
-arg(volumegroup_ARG, 'V', "volumegroup", 0, 0, 0)
-arg(virtualsize_ARG, 'V', "virtualsize", sizemb_VAL, 0, 0)
-arg(wipesignatures_ARG, 'W', "wipesignatures", bool_VAL, 0, 0)
-arg(allocatable_ARG, 'x', "allocatable", bool_VAL, 0, 0)
-arg(resizeable_ARG, 'x', "resizeable", bool_VAL, 0, 0)
-arg(yes_ARG, 'y', "yes", 0, 0, 0)
-arg(zero_ARG, 'Z', "zero", bool_VAL, 0, 0)
+arg(activate_ARG, 'a', "activate", activation_VAL, 0, 0,
+ "#lvchange\n"
+ "#vgchange\n"
+ "Change the active state of LVs.\n"
+ "An active LV can be used through a block device,\n"
+ "allowing data on the LV to be accessed.\n"
+ "\\fBy\\fP makes LVs active, or available.\n"
+ "\\fBn\\fP makes LVs inactive, or unavailable.\n"
+ "The block device for the LV is added or removed from the system\n"
+ "using device-mapper in the kernel.\n"
+ "A symbolic link /dev/VGName/LVName pointing to the device node is also added/removed.\n"
+ "All software and scripts should access the device through the symbolic\n"
+ "link and present this as the name of the device.\n"
+ "The location and name of the underlying device node may depend on\n"
+ "the distribution, configuration (e.g. udev), or release version.\n"
+ "\\fBay\\fP specifies autoactivation, in which case an LV is activated\n"
+ "only if it matches an item in lvm.conf activation/auto_activation_volume_list.\n"
+ "If the list is not set, all LVs are considered to match, and if\n"
+ "if the list is set but empty, no LVs match.\n"
+ "Autoactivation should be used during system boot to make it possible\n"
+ "to select which LVs should be automatically activated by the system.\n"
+ "See lvmlockd(8) for more information about activation options for shared VGs.\n"
+ "See clvmd(8) for more information about activation options for clustered VGs.\n"
+ "#lvcreate\n"
+ "Controls the active state of the new LV.\n"
+ "\\fBy\\fP makes the LV active, or available.\n"
+ "New LVs are made active by default.\n"
+ "\\fBn\\fP makes the LV inactive, or unavailable, only when possible.\n"
+ "In some cases, creating an LV requires it to be active.\n"
+ "For example, COW snapshots of an active origin LV can only\n"
+ "be created in the active state (this does not apply to thin snapshots.)\n"
+ "The --zero option normally requires the LV to be active.\n"
+ "If autoactivation \\fBay\\fP is used, the LV is only activated\n"
+ "if it matches an item in lvm.conf activation/auto_activation_volume_list.\n"
+ "\\fBay\\fP implies --zero n and --wipesignatures n.\n"
+ "See lvmlockd(8) for more information about activation options for shared VGs.\n"
+ "See clvmd(8) for more information about activation options for clustered VGs.\n")
+
+arg(all_ARG, 'a', "all", 0, 0, 0,
+ "#vgreduce\n"
+ "Removes all empty PVs if none are named on the command line.\n"
+ "#lvscan\n"
+ "#lvdisplay\n"
+ "#lvs\n"
+ "Show information about internal LVs.\n"
+ "These are components of normal LVs, such as mirrors,\n"
+ "which are not independently accessible, e.g. not mountable.\n"
+ "#vgs\n"
+ "List all VGs. Equivalent to not specifying any VGs.\n"
+ "#pvs\n"
+ "#pvdisplay\n"
+ "Show information about devices that have not been initialized\n"
+ "by LVM, i.e. they are not PVs.\n")
+
+arg(autobackup_ARG, 'A', "autobackup", bool_VAL, 0, 0,
+ "Specifies if metadata should be backed up automatically after a change.\n"
+ "Enabling this is strongly advised! See vgcfgbackup(8) for more information.\n")
+
+arg(activevolumegroups_ARG, 'A', "activevolumegroups", 0, 0, 0,
+ "Only select active VGs. The VG is considered active\n"
+ "if at least one of its LVs is active.\n")
+
+/* FIXME: remove background option from pvscan, it's not used */
+
+arg(background_ARG, 'b', "background", 0, 0, 0,
+ "If the operation requires polling, this option causes the command to\n"
+ "return before the operation is complete, and polling is done in the\n"
+ "background.\n")
+
+/* Not used */
+arg(backgroundfork_ARG, 'b', "background", 0, 0, 0, NULL)
+
+arg(basevgname_ARG, 'n', "basevgname", string_VAL, 0, 0,
+ "By default the snapshot VG will be renamed to the original name plus a\n"
+ "numeric suffix to avoid duplicate naming (e.g. 'test_vg' would be renamed\n"
+ "to 'test_vg1'). This option will override the base VG name that is\n"
+ "used for all VG renames. If a VG already exists with the specified name\n"
+ "a numeric suffix will be added (like the previous example) to make it unique.\n")
+
+arg(blockdevice_ARG, 'b', "blockdevice", 0, 0, 0,
+ "No longer used.\n")
+
+arg(chunksize_ARG, 'c', "chunksize", sizekb_VAL, 0, 0,
+ "The size of chunks in a snapshot, cache pool or thin pool.\n"
+ "For snapshots, the value must be a power of 2 between 4KiB and 512KiB\n"
+ "and the default value is 4.\n"
+ "For a cache pool the value must be between 32KiB and 1GiB\n"
+ "and the default value is 64.\n"
+ "For a thin pool the value must be between 64KiB and 1GiB\n"
+ "and the default value starts with 64 and scales up to fit the\n"
+ "pool metadata size within 128MiB, if the pool metadata size is not specified.\n"
+ "The value must be a multiple of 64KiB.\n")
+
+arg(clustered_ARG, 'c', "clustered", bool_VAL, 0, 0,
+ "#vgcreate\n"
+ "Create a clustered VG using clvmd if LVM is compiled with cluster support.\n"
+ "This allows multiple hosts to share a VG on shared devices.\n"
+ "clvmd and a lock manager must be configured and running.\n"
+ "(A clustered VG using clvmd is different from a shared VG using lvmlockd.)\n"
+ "See clvmd(8) for more information about clustered VGs.\n"
+ "#vgchange\n"
+ "Change the clustered property of a VG using clvmd.\n"
+ "See clvmd(8) for more information about clustered VGs.\n"
+ "#vgsplit\n"
+ "Specifies the clustered property of the new VG.\n")
+
+arg(colon_ARG, 'c', "colon", 0, 0, 0,
+ "Generate colon separated output for easier parsing in scripts or programs.\n"
+ "Also see vgs(8) which provides considerably more control over the output.\n")
+
+arg(columns_ARG, 'C', "columns", 0, 0, 0,
+ "Display output in columns, the equivalent of vgs(8).\n"
+ "Options listed are the same as options given in vgs(8).\n")
+
+arg(contiguous_ARG, 'C', "contiguous", bool_VAL, 0, 0,
+ "Sets or resets the contiguous allocation policy for LVs.\n"
+ "Default is no contiguous allocation based on a next free principle.\n"
+ "It is only possible to change a non-contiguous allocation policy\n"
+ "to contiguous if all of the allocated physical extents in the LV\n"
+ "are already contiguous.\n")
+
+arg(debug_ARG, 'd', "debug", 0, ARG_COUNTABLE, 0,
+ "Set debug level. Repeat from 1 to 6 times to increase the detail of\n"
+ "messages sent to the log file and/or syslog (if configured).\n")
+
+arg(exported_ARG, 'e', "exported", 0, 0, 0,
+ "Only show PVs belonging to exported VGs.\n")
+
+/* Not used. */
+arg(physicalextent_ARG, 'E', "physicalextent", 0, 0, 0, NULL)
+
+arg(file_ARG, 'f', "file", string_VAL, 0, 0,
+ "#lvmconfig\n"
+ "#dumpconfig\n"
+ "#config\n"
+ "Write output to the named file.\n"
+ "#vgcfgbackup\n"
+ "Write the backup to the named file.\n"
+ "When backing up more than one VG, the file name is\n"
+ "treated as a template, and %s is replaced by the VG name.\n"
+ "#vgcfgrestore\n"
+ "Read metadata backup from the named file.\n"
+ "Usually this file was created by vgcfgbackup.\n")
+
+arg(force_ARG, 'f', "force", 0, ARG_COUNTABLE, 0,
+ "Override various checks, confirmations and protections.\n"
+ "Use with extreme caution.\n")
+
+/* Not used. */
+arg(full_ARG, 'f', "full", 0, 0, 0, NULL)
+
+arg(help_ARG, 'h', "help", 0, ARG_COUNTABLE, 0,
+ "Display help text. Repeat this option for more information.\n")
+
+arg(cache_ARG, 'H', "cache", 0, 0, 0,
+ "Specifies the command is handling a cache LV or cache pool.\n"
+ "See --type cache and --type cache-pool.\n"
+ "See lvmcache(7) for more information about LVM caching.\n")
+
+arg(history_ARG, 'H', "history", 0, 0, 0,
+ "Include historical LVs in the output.\n"
+ "(This has no effect unless LVs were removed while\n"
+ "lvm.conf metadata/record_lvs_history was enabled.\n")
+
+/* Not used */
+arg(help2_ARG, '?', "", 0, 0, 0, NULL)
+
+arg(import_ARG, 'i', "import", 0, 0, 0,
+ "Import exported VGs. Otherwise VGs that have been exported\n"
+ "will not be changed (nor will their associated PVs).\n")
+
+arg(interval_ARG, 'i', "interval", number_VAL, 0, 0,
+ "Report progress at regular intervals.\n")
+
+/* Not used */
+arg(iop_version_ARG, 'i', "iop_version", 0, 0, 0, NULL)
+
+arg(stripes_ARG, 'i', "stripes", number_VAL, 0, 0,
+ "Specifies the number of stripes in a striped LV. This is the number of\n"
+ "PVs (devices) that a striped LV is spread across. Data that\n"
+ "appears sequential in the LV is spread across multiple devices in units of\n"
+ "the stripe size (see --stripesize). This does not apply to\n"
+ "existing allocated space, only newly allocated space can be striped.\n"
+ "When creating a RAID 4/5/6 LV, this number does not include the extra\n"
+ "devices that are required for parity. The largest number depends on\n"
+ "the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62.)\n"
+ "When unspecified, the default depends on the RAID type\n"
+ "(raid0: 2, raid10: 4, raid4/5: 3, raid6: 5.)\n"
+ "When unspecified, to stripe across all PVs of the VG,\n"
+ "set lvm.conf allocation/raid_stripe_all_devices=1.\n")
+
+arg(stripesize_ARG, 'I', "stripesize", sizekb_VAL, 0, 0,
+ "The amount of data that is written to one device before\n"
+ "moving to the next in a striped LV.\n")
+
+arg(logicalvolume_ARG, 'l', "logicalvolume", number_VAL, 0, 0,
+ "Sets the maximum number of LVs allowed in a VG.\n")
+
+arg(maxlogicalvolumes_ARG, 'l', "maxlogicalvolumes", number_VAL, 0, 0,
+ "Sets the maximum number of LVs allowed in a VG.\n")
+
+arg(extents_ARG, 'l', "extents", numsignedper_VAL, 0, 0,
+ "#lvcreate\n"
+ "Specifies the size of the new LV in logical extents.\n"
+ "The --size and --extents options are alternate methods of specifying size.\n"
+ "The total number of physical extents used will be\n"
+ "greater when redundant data is needed for RAID levels.\n"
+ "An alternate syntax allows the size to be determined indirectly\n"
+ "as a percentage of the size of a related VG, LV, or set of PVs. The\n"
+ "suffix \\fB%VG\\fP denotes the total size of the VG, the suffix \\fB%FREE\\fP\n"
+ "the remaining free space in the VG, and the suffix \\fB%PVS\\fP the free\n"
+ "space in the specified PVs. For a snapshot, the size\n"
+ "can be expressed as a percentage of the total size of the origin LV\n"
+ "with the suffix \\fB%ORIGIN\\fP (\\fB100%ORIGIN\\fP provides space for\n"
+ "the whole origin).\n"
+ "When expressed as a percentage, the size defines an upper limit for the\n"
+ "number of logical extents in the new LV. The precise number of logical\n"
+ "extents in the new LV is not determined until the command has completed.\n"
+ "#lvreduce\n"
+ "#lvextend\n"
+ "#lvresize\n"
+ "Specifies the new size of the LV in logical extents.\n"
+ "The --size and --extents options are alternate methods of specifying size.\n"
+ "The total number of physical extents used will be\n"
+ "greater when redundant data is needed for RAID levels.\n"
+ "An alternate syntax allows the size to be determined indirectly\n"
+ "as a percentage of the size of a related VG, LV, or set of PVs. The\n"
+ "suffix \\fB%VG\\fP denotes the total size of the VG, the suffix \\fB%FREE\\fP\n"
+ "the remaining free space in the VG, and the suffix \\fB%PVS\\fP the free\n"
+ "space in the specified PVs. For a snapshot, the size\n"
+ "can be expressed as a percentage of the total size of the origin LV\n"
+ "with the suffix \\fB%ORIGIN\\fP (\\fB100%ORIGIN\\fP provides space for\n"
+ "the whole origin).\n"
+ "When expressed as a percentage, the size defines an upper limit for the\n"
+ "number of logical extents in the new LV. The precise number of logical\n"
+ "extents in the new LV is not determined until the command has completed.\n"
+ "The plus prefix \\fB+\\fP can be used, in which case\n"
+ "the value is added to the current size,\n"
+ "or the minus prefix \\fB-\\fP can be used, in which case\n"
+ "the value is subtracted from the current size.\n")
+
+arg(list_ARG, 'l', "list", 0, 0, 0,
+ "#lvmconfig\n"
+ "#dumpconfig\n"
+ "#config\n"
+ "List config settings with summarizing comment. This is the same as using\n"
+ "options --type list --withsummary.\n"
+ "#vgcfgrestore\n"
+ "List metadata backup and archive files pertaining to the VG.\n"
+ "May be used with --file. Does not restore the VG.\n"
+ "#vgmerge\n"
+ "Display merged destination VG like vgdisplay -v.\n")
+
+arg(lvmpartition_ARG, 'l', "lvmpartition", 0, 0, 0,
+ "Only report PVs.\n")
+
+arg(size_ARG, 'L', "size", sizemb_VAL, 0, 0,
+ "#lvcreate\n"
+ "Specifies the size of the new LV.\n"
+ "The --size and --extents options are alternate methods of specifying size.\n"
+ "The total number of physical extents used will be\n"
+ "greater when redundant data is needed for RAID levels.\n"
+ "A suffix can be chosen from: \\fBbBsSkKmMgGtTpPeE\\fP.\n"
+ "All units are base two values, regardless of letter capitalization:\n"
+ "b|B is bytes, s|S is sectors of 512 bytes,\n"
+ "k|K is kilobytes, m|M is megabytes,\n"
+ "g|G is gigabytes, t|T is terabytes,\n"
+ "p|P is petabytes, e|E is exabytes.\n"
+ "#lvreduce\n"
+ "#lvextend\n"
+ "#lvresize\n"
+ "Specifies the new size of the LV.\n"
+ "The --size and --extents options are alternate methods of specifying size.\n"
+ "The total number of physical extents used will be\n"
+ "greater when redundant data is needed for RAID levels.\n"
+ "A suffix can be chosen from: \\fBbBsSkKmMgGtTpPeE\\fP.\n"
+ "All units are base two values, regardless of letter capitalization:\n"
+ "b|B is bytes, s|S is sectors of 512 bytes,\n"
+ "k|K is kilobytes, m|M is megabytes,\n"
+ "g|G is gigabytes, t|T is terabytes,\n"
+ "p|P is petabytes, e|E is exabytes.\n"
+ "The plus prefix \\fB+\\fP can be used, in which case\n"
+ "the value is added to the current size,\n"
+ "or the minus prefix \\fB-\\fP can be used, in which case\n"
+ "the value is subtracted from the current size.\n")
+
+arg(persistent_ARG, 'M', "persistent", bool_VAL, 0, 0,
+ "When yes, makes the specified minor number persistent.\n")
+
+arg(major_ARG, 'j', "major", number_VAL, ARG_GROUPABLE, 0,
+ "#lvcreate\n"
+ "#lvchange\n"
+ "Sets the major number of an LV block device.\n"
+ "#pvscan\n"
+ "The major number of a device.\n")
+
+arg(setactivationskip_ARG, 'k', "setactivationskip", bool_VAL, 0, 0,
+ "Persistently sets (yes) or clears (no) the \"activation skip\" flag on an LV.\n"
+ "An LV with this flag set is not activated unless the\n"
+ "--ignoreactivationskip option is used by the activation command.\n"
+ "This flag is set by default on new thin snapshot LVs.\n"
+ "The flag is not applied to deactivation.\n"
+ "The current value of the flag is indicated in the lvs lv_attr bits.\n")
+
+arg(ignoreactivationskip_ARG, 'K', "ignoreactivationskip", 0, 0, 0,
+ "Ignore the \"activation skip\" LV flag during activation\n"
+ "to allow LVs with the flag set to be activated.\n")
+
+arg(maps_ARG, 'm', "maps", 0, 0, 0,
+ "#lvdisplay\n"
+ "Display the mapping of logical extents to PVs and physical extents.\n"
+ "To map physical extents to logical extents use:\n"
+ "pvs --segments -o+lv_name,seg_start_pe,segtype\n"
+ "#pvdisplay\n"
+ "Display the mapping of physical extents to LVs and logical extents.\n")
+
+/* FIXME: should the unused mirrors option be removed from lvextend? */
+
+arg(mirrors_ARG, 'm', "mirrors", numsigned_VAL, 0, 0,
+ "#lvcreate\n"
+ "Specifies the number of mirror images in addition to the original LV\n"
+ "image, e.g. --mirrors 1 means there are two images of the data, the\n"
+ "original and one mirror image.\n"
+ "Optional positional PV args on the command line can specify the devices\n"
+ "the images should be placed on.\n"
+ "There are two mirroring implementations: \"raid1\" and \"mirror\".\n"
+ "These are the names of the corresponding LV types, or \"segment types\".\n"
+ "Use the --type option to specify which to use (raid1 is default,\n"
+ "and mirror is legacy)\n"
+ "Use lvm.conf global/mirror_segtype_default and\n"
+ "global/raid10_segtype_default to configure the default types.\n"
+ "See the --nosync option for avoiding initial image synchronization.\n"
+ "#lvconvert\n"
+ "Specifies the number of mirror images in addition to the original LV\n"
+ "image, e.g. --mirrors 1 means there are two images of the data, the\n"
+ "original and one mirror image.\n"
+ "Optional positional PV args on the command line can specify the devices\n"
+ "the images should be placed on.\n"
+ "There are two mirroring implementations: \"raid1\" and \"mirror\".\n"
+ "These are the names of the corresponding LV types, or \"segment types\".\n"
+ "Use the --type option to specify which to use (raid1 is default,\n"
+ "and mirror is legacy)\n"
+ "Use lvm.conf global/mirror_segtype_default and\n"
+ "global/raid10_segtype_default to configure the default types.\n"
+ "The plus prefix \\fB+\\fP can be used, in which case\n"
+ "the number is added to the current number of images,\n"
+ "or the minus prefix \\fB-\\fP can be used, in which case\n"
+ "the number is subtracted from the current number of images.\n"
+ "#lvextend\n"
+ "Not used.\n")
+
+arg(metadatatype_ARG, 'M', "metadatatype", metadatatype_VAL, 0, 0,
+ "Specifies the type of on-disk metadata to use.\n"
+ "\\fBlvm2\\fP (or just \\fB2\\fP) is the current, standard format.\n"
+ "\\fBlvm1\\fP (or just \\fB1\\fP) is a historical format that\n"
+ "can be used for accessing old data.\n")
+
+arg(name_ARG, 'n', "name", string_VAL, 0, 0,
+ "#lvcreate\n"
+ "#lvconvert\n"
+ "Specifies the name of a new LV.\n"
+ "When unspecified, a default name of \"lvol#\" is\n"
+ "generated, where # is a number generated by LVM.\n"
+ "#pvmove\n"
+ "Move only the extents belonging to the named LV.\n"
+ "#vgsplit\n"
+ "Move only PVs used by the named LV.\n")
+
+arg(nofsck_ARG, 'n', "nofsck", 0, 0, 0,
+ "Do not perform fsck before resizing filesystem when filesystem\n"
+ "requires it. You may need to use --force to proceed with\n"
+ "this option.\n")
+
+arg(novolumegroup_ARG, 'n', "novolumegroup", 0, 0, 0,
+ "Only show PVs not belonging to any VG.\n")
+
+/* Not used */
+arg(oldpath_ARG, 'n', "oldpath", 0, 0, 0, NULL)
+
+/*
+ * FIXME: a free-form discussion section and document the
+ * VG/LV/PV attr bits which were previously listed
+ * in the description for -o.
+ */
+
+arg(options_ARG, 'o', "options", string_VAL, ARG_GROUPABLE, 0,
+ "Comma-separated, ordered list of fields to display in columns.\n"
+ "String arg syntax is: [+|-|#]Field1[,Field2 ...]\n"
+ "The prefix \\fB+\\fP will append the specified fields to the default fields,\n"
+ "\\fB-\\fP will remove the specified fields from the default fields, and\n"
+ "\\fB#\\fP will compact specified fields (removing them when empty for all rows.)\n"
+ "Use \\fB-o help\\fP to view the list of all available fields.\n"
+ "The -o option can be repeated, providing several lists.\n"
+ "These lists are evaluated from left to right.\n"
+ "Use field name \\fBlv_all\\fP to view all LV fields,\n"
+ "\\fBvg_all\\fP all VG fields,\n"
+ "\\fBpv_all\\fP all PV fields,\n"
+ "\\fBpvseg_all\\fP all PV segment fields,\n"
+ "\\fBseg_all\\fP all LV segment fields, and\n"
+ "\\fBpvseg_all\\fP all PV segment columns.\n"
+ "See the lvm.conf report section for more config options.\n"
+ "See lvmreport(7) for more information about reporting.\n")
+
+arg(sort_ARG, 'O', "sort", string_VAL, ARG_GROUPABLE, 0,
+ "Comma-separated ordered list of columns to sort by. Replaces the default\n"
+ "selection. Precede any column with \\fB-\\fP for a reverse sort on that column.\n")
+
+arg(maxphysicalvolumes_ARG, 'p', "maxphysicalvolumes", uint32_VAL, 0, 0,
+ "Sets the maximum number of PVs that can belong to the VG.\n"
+ "The value 0 removes any limitation.\n"
+ "For large numbers of PVs, also see options --pvmetadatacopies,\n"
+ "and --vgmetadatacopies for improving performance.\n")
+
+arg(permission_ARG, 'p', "permission", permission_VAL, 0, 0,
+ "Set access permission to read only \\fBr\\fP or read and write \\fBrw\\fP.\n")
+
+/* FIXME: I left out some of the previous description that didn't sound correct. */
+
+arg(partial_ARG, 'P', "partial", 0, 0, 0,
+ "When set, the tools will do their best to provide access to VGs\n"
+ "that are only partially available (one or more PVs belonging\n"
+ "to the VG are missing from the system). Metadata may not be\n"
+ "changed with this option.\n")
+
+/* Not used */
+arg(physicalvolume_ARG, 'P', "physicalvolume", 0, 0, 0, NULL)
+
+arg(quiet_ARG, 'q', "quiet", 0, ARG_COUNTABLE, 0,
+ "Suppress output and log messages. Overrides --debug and --verbose.\n"
+ "Repeat once to also suppress any prompts with answer no.\n")
+
+arg(readahead_ARG, 'r', "readahead", readahead_VAL, 0, 0,
+ "Sets read ahead sector count of an LV.\n"
+ "\\fBauto\\fP is the default which allows the kernel to choose\n"
+ "a suitable value automatically.\n"
+ "\\fBnone\\fP is equivalent to zero.\n")
+
+arg(resizefs_ARG, 'r', "resizefs", 0, 0, 0,
+ "Resize underlying filesystem together with the LV using fsadm(8).\n")
+
+/* Not used */
+arg(reset_ARG, 'R', "reset", 0, 0, 0, NULL)
+
+arg(regionsize_ARG, 'R', "regionsize", sizemb_VAL, 0, 0,
+ "A mirror is divided into regions of this size, and the mirror log\n"
+ "uses this granularity to track which regions are in sync.\n"
+ "(This can be used with the \"mirror\" type, not the \"raid1\" type.)\n")
+
+arg(physicalextentsize_ARG, 's', "physicalextentsize", sizemb_VAL, 0, 0,
+ "#vgcreate\n"
+ "Sets the physical extent size of PVs in the VG.\n"
+ "The value must be either a power of 2 of at least 1 sector\n"
+ "(where the sector size is the largest sector size of the PVs\n"
+ "currently used in the VG), or at least 128KiB.\n"
+ "Once this value has been set, it is difficult to change\n"
+ "without recreating the VG, unless no extents need moving.\n"
+ "#vgchange\n"
+ "Sets the physical extent size of PVs in the VG.\n"
+ "The value must be either a power of 2 of at least 1 sector\n"
+ "(where the sector size is the largest sector size of the PVs\n"
+ "currently used in the VG), or at least 128KiB.\n"
+ "Once this value has been set, it is difficult to change\n"
+ "without recreating the VG, unless no extents need moving.\n"
+ "Before increasing the physical extent size, you might need to use lvresize,\n"
+ "pvresize and/or pvmove so that everything fits. For example, every\n"
+ "contiguous range of extents used in a LV must start and end on an extent boundary.\n")
+
+arg(snapshot_ARG, 's', "snapshot", 0, 0, 0,
+ "#lvcreate\n"
+ "Create a snapshot. Snapshots provide a \"frozen image\" of an origin LV.\n"
+ "The snapshot LV can be used, e.g. for backups, while the origin LV\n"
+ "continues to be used.\n"
+ "This option can create a COW (copy on write) snapshot,\n"
+ "or a thin snapshot (in a thin pool.)\n"
+ "Thin snapshots are created when the origin is a thin LV and\n"
+ "the size option is NOT specified. Thin snapshots share the same blocks\n"
+ "in the thin pool, and do not allocate new space from the VG.\n"
+ "Thin snapshots are created with the \"activation skip\" flag,\n"
+ "see --setactivationskip.\n"
+ "A thin snapshot of a non-thin \"external origin\" LV is created\n"
+ "when a thin pool is specified. Unprovisioned blocks in the thin snapshot\n"
+ "LV are read from the external origin LV. The external origin LV must\n"
+ "be read-only.\n"
+ "See lvmthin(7) for more information about LVM thin provisioning.\n"
+ "COW snapshots are created when a size is specified. The size is allocated\n"
+ "from space in the VG, and is the amount of space that can be used\n"
+ "for saving COW blocks as writes occur to the origin or snapshot.\n"
+ "The size chosen should depend upon the amount of writes that are expected;\n"
+ "often 20% of the origin LV is enough. If COW space runs low, it can\n"
+ "be extended with lvextend (shrinking is also allowed with lvreduce.)\n"
+ "A small amount of the COW snapshot LV size is used to track COW block\n"
+ "locations, so the full size is not available for COW data blocks.\n"
+ "Use lvs to check how much space is used, and see --monitor to\n"
+ "to automatically extend the size to avoid running out of space.\n"
+ "#lvconvert\n"
+ "Combine a former COW snapshot LV with a former origin LV to reverse\n"
+ "a previous --splitsnapshot command.\n")
+
+arg(short_ARG, 's', "short", 0, 0, 0,
+ "#pvdisplay\n"
+ "Only display the size of the given PVs.\n"
+ "#vgdisplay\n"
+ "Give a short listing showing the existence of VGs.\n"
+ "#pvscan\n"
+ "Short listing format.\n")
+
+/* Not used */
+arg(stdin_ARG, 's', "stdin", 0, 0, 0, NULL)
+
+arg(select_ARG, 'S', "select", string_VAL, ARG_GROUPABLE, 0,
+ "Select objects for processing and reporting based on specified criteria.\n"
+ "The criteria syntax is described in lvmreport(7) under Selection.\n"
+ "For reporting commands, display rows that match the criteria.\n"
+ "All rows can be displayed with an additional \"selected\" field (-o selected)\n"
+ "showing 1 if the row matches the selection and 0 otherwise.\n"
+ "For non-reporting commands which process LVM entities, the selection is\n"
+ "used to choose items to process.\n")
+
+arg(test_ARG, 't', "test", 0, 0, 0,
+ "Run in test mode. Commands will not update metadata.\n"
+ "This is implemented by disabling all metadata writing but nevertheless\n"
+ "returning success to the calling function. This may lead to unusual\n"
+ "error messages in multi-stage operations if a tool relies on reading\n"
+ "back metadata it believes has changed but hasn't.\n")
+
+arg(thin_ARG, 'T', "thin", 0, 0, 0,
+ "Specifies the command is handling a thin LV or thin pool.\n"
+ "See --type thin, --type thin-pool, and --virtualsize.\n"
+ "See lvmthin(7) for more information about LVM thin provisioning.\n")
+
+arg(uuid_ARG, 'u', "uuid", 0, 0, 0,
+ "#pvchange\n"
+ "Generate new random UUID for specified PVs.\n"
+ "#pvscan\n"
+ "Show UUIDs in addition to device names.\n"
+ "#vgchange\n"
+ "Generate new random UUID for specified VGs.\n")
+
+arg(uuidstr_ARG, 'u', "uuid", string_VAL, 0, 0,
+ "Specify a UUID for the device.\n"
+ "Without this option, a random UUID is generated.\n"
+ "This option is needed before restoring a backup of LVM metadata\n"
+ "onto a replacement device; see vgcfgrestore(8). As such, use of\n"
+ "--restorefile is compulsory unless the --norestorefile is used.\n"
+ "All PVs must have unique UUIDs, and LVM will prevent certain operations\n"
+ "if multiple devices are seen with the same UUID.\n"
+ "See vgimportclone(8) for more information.\n")
+
+/* Not used */
+arg(uuidlist_ARG, 'U', "uuidlist", 0, 0, 0, NULL)
+
+arg(verbose_ARG, 'v', "verbose", 0, ARG_COUNTABLE, 0,
+ "Set verbose level. Repeat from 1 to 4 times to increase the detail\n"
+ "of messages sent to stdout and stderr.\n")
+
+/* Not used */
+arg(volumegroup_ARG, 'V', "volumegroup", 0, 0, 0, NULL)
+
+arg(virtualsize_ARG, 'V', "virtualsize", sizemb_VAL, 0, 0,
+ "The virtual size of a new thin LV.\n"
+ "See lvmthin(7) for more information about LVM thin provisioning.\n"
+ "Using virtual size (-V) and actual size (-L) together creates\n"
+ "a sparse LV.\n"
+ "lvm.conf global/sparse_segtype_default determines the\n"
+ "default segment type used to create a sparse LV.\n"
+ "Anything written to a sparse LV will be returned when reading from it.\n"
+ "Reading from other areas of the LV will return blocks of zeros.\n"
+ "When using a snapshot to create a sparse LV, a hidden virtual device\n"
+ "is created using the zero target, and the LV has the suffix _vorigin.\n"
+ "Snapshots are less efficient than thin provisioning when creating\n"
+ "large sparse LVs (GiB).\n")
+
+arg(wipesignatures_ARG, 'W', "wipesignatures", bool_VAL, 0, 0,
+ "Controls detection and subsequent wiping of signatures on new LVs.\n"
+ "There is a prompt for each signature detected to confirm its wiping\n"
+ "(unless --yes is used to override confirmations.)\n"
+ "When not specified, signatures are wiped whenever zeroing is done\n"
+ "(see --zero). This behaviour can be configured with\n"
+ "lvm.conf allocation/wipe_signatures_when_zeroing_new_lvs.\n"
+ "If blkid wiping is used (lvm.conf allocation/use_blkid_wiping)\n"
+ "and LVM is compiled with blkid wiping support, then the blkid(8)\n"
+ "library is used to detect the signatures (use blkid -k to list the\n"
+ "signatures that are recognized).\n"
+ "Otherwise, native LVM code is used to detect signatures\n"
+ "(only MD RAID, swap and LUKS signatures are detected in this case.)\n"
+ "The LV is not wiped if the read only flag is set.\n")
+
+arg(allocatable_ARG, 'x', "allocatable", bool_VAL, 0, 0,
+ "Enable or disable allocation of physical extents on this PV.\n")
+
+arg(resizeable_ARG, 'x', "resizeable", bool_VAL, 0, 0,
+ "Enables or disables the addition or removal of PVs to/from a VG\n"
+ "(by vgextend/vgreduce).\n")
+
+arg(yes_ARG, 'y', "yes", 0, 0, 0,
+ "Do not prompt for confirmation interactively but always assume the\n"
+ "answer yes. Use with extreme caution.\n")
+
+arg(zero_ARG, 'Z', "zero", bool_VAL, 0, 0,
+ "#lvchange\n"
+ "Set zeroing mode for thin pool. Note: already provisioned blocks from pool\n"
+ "in non-zero mode are not cleared in unwritten parts when setting --zero y.\n"
+ "#lvconvert\n"
+ "For snapshots, this controls zeroing of the first 4KiB of data in the\n"
+ "snapshot. If the LV is read-only, the snapshot will not be zeroed.\n"
+ "For thin pools, this controls zeroing of provisioned blocks.\n"
+ "Provisioning of large zeroed chunks negatively impacts performance.\n"
+ "#lvcreate\n"
+ "Controls zeroing of the first 4KiB of data in the new LV.\n"
+ "Default is \\fBy\\fP.\n"
+ "Snapshot COW volumes are always zeroed.\n"
+ "LV is not zeroed if the read only flag is set.\n"
+ "Warning: trying to mount an unzeroed LV can cause the system to hang.\n"
+ "#pvcreate\n"
+ "#vgcreate\n"
+ "#vgextend\n"
+ "Controls if the first 4 sectors (2048 bytes) of the device are wiped.\n"
+ "The default is to wipe these sectors unless either or both of\n"
+ "--restorefile or --uuid are specified.\n")
/* this should always be last */
-arg(ARG_COUNT, '-', "", 0, 0, 0)
+arg(ARG_COUNT, '-', "", 0, 0, 0, NULL)
/* *INDENT-ON* */
diff --git a/tools/create-commands.c b/tools/create-commands.c
index d9f8218..f9ff800 100644
--- a/tools/create-commands.c
+++ b/tools/create-commands.c
@@ -68,6 +68,7 @@ struct opt_name {
int val_enum; /* xyz_VAL when --foo takes a val like "--foo xyz" */
uint32_t unused1;
uint32_t unused2;
+ const char *desc;
};
/* also see val_props in tools.h and vals.h */
@@ -104,7 +105,7 @@ enum {
/* create foo_ARG enums for --option's */
enum {
-#define arg(a, b, c, d, e, f) a ,
+#define arg(a, b, c, d, e, f, g) a ,
#include "args.h"
#undef arg
};
@@ -136,7 +137,7 @@ static struct val_name val_names[VAL_COUNT + 1] = {
/* create table of option names, e.g. --foo, and corresponding enum from args.h */
static struct opt_name opt_names[ARG_COUNT + 1] = {
-#define arg(a, b, c, d, e, f) { # a, a, b, "", "--" c, d, e, f },
+#define arg(a, b, c, d, e, f, g) { # a, a, b, "", "--" c, d, e, f, g },
#include "args.h"
#undef arg
};
@@ -180,9 +181,15 @@ static struct cmd_name cmd_names[MAX_CMD_NAMES] = {
#undef xx
};
+/* array of pointers into opt_names[] that is sorted alphabetically (by long opt name) */
+
+static struct opt_name *opt_names_alpha[ARG_COUNT + 1];
+
#define MAX_LINE 1024
#define MAX_LINE_ARGC 256
+#define DESC_LINE 256
+
#define REQUIRED 1 /* required option */
#define OPTIONAL 0 /* optional option */
#define IGNORE -1 /* ignore option */
@@ -2050,6 +2057,23 @@ void print_man_usage(struct command *cmd)
printf("\n");
}
+/*
+ * common options listed in the usage section.
+ *
+ * For commands with only one variant, this is only
+ * the options which are common to all lvm commands
+ * (in lvm_all, see is_lvm_all_opt).
+ *
+ * For commands with more than one variant, this
+ * is the set of options common to all variants
+ * (in cname->common_options), (which obviously
+ * includes the options common to all lvm commands.)
+ *
+ * List ordering:
+ * options with short+long names, alphabetically,
+ * then options with only long names, alphabetically
+ */
+
void print_man_usage_common(struct command *cmd)
{
struct cmd_name *cname;
@@ -2063,23 +2087,17 @@ void print_man_usage_common(struct command *cmd)
printf(".RS 4\n");
printf("[");
- /*
- * when there's more than one variant, options that
- * are common to all commands with a common name.
- */
-
- if (cname->variants < 2)
- goto all;
-
/* print those with short opts */
- for (opt_enum = 0; opt_enum < ARG_COUNT; opt_enum++) {
+ for (i = 0; i < ARG_COUNT; i++) {
+ opt_enum = opt_names_alpha[i]->opt_enum;
+
if (!cname->common_options[opt_enum])
continue;
if (!opt_names[opt_enum].short_opt)
continue;
- if (is_lvm_all_opt(opt_enum))
+ if ((cname->variants < 2) && !is_lvm_all_opt(opt_enum))
continue;
if (sep) {
@@ -2107,14 +2125,16 @@ void print_man_usage_common(struct command *cmd)
}
/* print those without short opts */
- for (opt_enum = 0; opt_enum < ARG_COUNT; opt_enum++) {
+ for (i = 0; i < ARG_COUNT; i++) {
+ opt_enum = opt_names_alpha[i]->opt_enum;
+
if (!cname->common_options[opt_enum])
continue;
if (opt_names[opt_enum].short_opt)
continue;
- if (is_lvm_all_opt(opt_enum))
+ if ((cname->variants < 2) && !is_lvm_all_opt(opt_enum))
continue;
if (sep) {
@@ -2140,67 +2160,108 @@ void print_man_usage_common(struct command *cmd)
break;
}
}
- all:
- /* options that are common to all lvm commands */
-
- /* those with short opts */
- for (oo = 0; oo < lvm_all.oo_count; oo++) {
- opt_enum = lvm_all.optional_opt_args[oo].opt;
- if (!opt_names[opt_enum].short_opt)
- continue;
+ printf(" ]\n");
+ return;
+}
- if (sep) {
- printf(",");
- printf("\n.br\n");
- printf(" ");
- }
+/*
+ * Format of description, when different command names have
+ * different descriptions:
+ *
+ * "#cmdname1"
+ * "text foo goes here"
+ * "a second line of text."
+ * "#cmdname2"
+ * "text bar goes here"
+ * "another line of text."
+ *
+ * When called for cmdname2, this function should just print:
+ *
+ * "text bar goes here"
+ * "another line of text."
+ */
- printf(" \\fB-%c\\fP|\\fB%s\\fP",
- opt_names[opt_enum].short_opt,
- man_long_opt_name(cmd->name, opt_enum));
+static void print_man_option_desc(struct cmd_name *cname, int opt_enum)
+{
+ const char *desc = opt_names[opt_enum].desc;
+ char buf[DESC_LINE];
+ int started_cname = 0;
+ int line_count = 0;
+ int di, bi;
- if (lvm_all.optional_opt_args[oo].def.val_bits) {
- printf(" ");
- print_def(&lvm_all.optional_opt_args[oo].def, 1);
- }
- sep = 1;
+ if (desc[0] != '#') {
+ printf("%s", desc);
+ return;
}
- /* those without short opts */
- for (oo = 0; oo < lvm_all.oo_count; oo++) {
- opt_enum = lvm_all.optional_opt_args[oo].opt;
+ for (di = 0; di < strlen(desc); di++) {
+ buf[bi++] = desc[di];
- if (opt_names[opt_enum].short_opt)
+ if (bi == DESC_LINE) {
+ printf("print_man_option_desc line too long\n");
+ return;
+ }
+
+ if (buf[bi-1] != '\n')
continue;
- if (sep) {
- printf(",");
- printf("\n.br\n");
- printf(" ");
+ if (buf[0] != '#') {
+ if (started_cname) {
+ printf("%s", buf);
+ line_count++;
+ }
+
+ memset(buf, 0, sizeof(buf));
+ bi = 0;
+ continue;
}
- /* space alignment without short opt */
- printf(" ");
+ /* Line starting with #cmdname */
- printf(" \\fB%s\\fP", man_long_opt_name(cmd->name, opt_enum));
+ /*
+ * Must be starting a new command name.
+ * If no lines have been printed, multiple command names
+ * are using the same text. If lines have been printed,
+ * then the start of a new command name means the end
+ * of text for the current command name.
+ */
+ if (line_count && started_cname)
+ return;
- if (lvm_all.optional_opt_args[oo].def.val_bits) {
- printf(" ");
- print_def(&lvm_all.optional_opt_args[oo].def, 1);
+ if (!strncmp(buf + 1, cname->name, strlen(cname->name))) {
+ /* The start of our command name. */
+ started_cname = 1;
+ memset(buf, 0, sizeof(buf));
+ bi = 0;
+ } else {
+ /* The start of another command name. */
+ memset(buf, 0, sizeof(buf));
+ bi = 0;
}
- sep = 1;
}
- printf(" ]\n");
+
+ if (bi && started_cname)
+ printf("%s", buf);
}
-void print_man_all_options(struct cmd_name *cname)
+/*
+ * Print a list of all options names for a given
+ * command name, listed by:
+ * options with short+long names, alphabetically,
+ * then options with only long names, alphabetically
+ */
+
+void print_man_all_options_list(struct cmd_name *cname)
{
int opt_enum, val_enum;
int sep = 0;
+ int i;
+
+ /* print those with both short and long opts */
+ for (i = 0; i < ARG_COUNT; i++) {
+ opt_enum = opt_names_alpha[i]->opt_enum;
- /* print those with short opts */
- for (opt_enum = 0; opt_enum < ARG_COUNT; opt_enum++) {
if (!cname->all_options[opt_enum])
continue;
@@ -2232,7 +2293,9 @@ void print_man_all_options(struct cmd_name *cname)
}
/* print those without short opts */
- for (opt_enum = 0; opt_enum < ARG_COUNT; opt_enum++) {
+ for (i = 0; i < ARG_COUNT; i++) {
+ opt_enum = opt_names_alpha[i]->opt_enum;
+
if (!cname->all_options[opt_enum])
continue;
@@ -2265,7 +2328,79 @@ void print_man_all_options(struct cmd_name *cname)
}
}
-#define DESC_LINE 256
+/*
+ * All options used for a given command name, along with descriptions.
+ * listed in order of:
+ * 1. options that are not common to all lvm commands, alphabetically
+ * 2. options common to all lvm commands, alphabetically
+ */
+
+void print_man_all_options_desc(struct cmd_name *cname)
+{
+ int opt_enum, val_enum;
+ int print_common = 0;
+ int sep = 0;
+ int i;
+
+ again:
+ /*
+ * Loop 1: print options that are not common to all lvm commands.
+ * Loop 2: print options common to all lvm commands (lvm_all)
+ */
+
+ for (i = 0; i < ARG_COUNT; i++) {
+ opt_enum = opt_names_alpha[i]->opt_enum;
+
+ if (!cname->all_options[opt_enum])
+ continue;
+
+ if (!print_common && is_lvm_all_opt(opt_enum))
+ continue;
+
+ if (print_common && !is_lvm_all_opt(opt_enum))
+ continue;
+
+ if (sep)
+ printf("\n.br\n");
+
+ printf("\n.TP\n");
+
+ if (opt_names[opt_enum].short_opt) {
+ printf("\\fB-%c\\fP|\\fB%s\\fP",
+ opt_names[opt_enum].short_opt,
+ man_long_opt_name(cname->name, opt_enum));
+ } else {
+ printf("\\fB%s\\fP", man_long_opt_name(cname->name, opt_enum));
+ }
+
+ val_enum = opt_names[opt_enum].val_enum;
+
+ if (!val_names[val_enum].fn) {
+ /* takes no arg */
+ } else if (!val_names[val_enum].usage) {
+ printf(" ");
+ printf("\\fI");
+ printf("%s", val_names[val_enum].name);
+ printf("\\fP");
+ } else {
+ printf(" ");
+ print_val_man(val_names[val_enum].usage);
+ }
+
+ if (opt_names[opt_enum].desc) {
+ printf("\n");
+ printf(".br\n");
+ print_man_option_desc(cname, opt_enum);
+ }
+
+ sep = 1;
+ }
+
+ if (!print_common) {
+ print_common = 1;
+ goto again;
+ }
+}
void print_desc_man(const char *desc)
{
@@ -2338,6 +2473,12 @@ void print_man_command(void)
printf("Common options:\n");
printf(".\n");
print_man_usage_common(prev_cmd);
+
+ printf("\n");
+ printf(".SH OPTIONS\n");
+ printf(".br\n");
+ print_man_all_options_desc(cname);
+
prev_cmd = NULL;
}
@@ -2396,7 +2537,7 @@ void print_man_command(void)
/* listing them all when there's only 1 or 2 is just repetative */
if (cname->variants > 2) {
printf(".P\n");
- print_man_all_options(cname);
+ print_man_all_options_list(cname);
printf("\n");
printf(".P\n");
printf("\n");
@@ -2419,6 +2560,12 @@ void print_man_command(void)
printf("Common options:\n");
printf(".\n");
print_man_usage_common(cmd);
+
+ printf("\n");
+ printf(".SH OPTIONS\n");
+ printf(".br\n");
+ print_man_all_options_desc(cname);
+
}
printf("\n");
@@ -2730,6 +2877,23 @@ next:
}
}
+static int long_name_compare(const void *on1, const void *on2)
+{
+ struct opt_name **optname1 = (void *)on1;
+ struct opt_name **optname2 = (void *)on2;
+ return strcmp((*optname1)->long_opt + 2, (*optname2)->long_opt + 2);
+}
+
+static void create_opt_names_alpha(void)
+{
+ int i;
+
+ for (i = 0; i < ARG_COUNT; i++)
+ opt_names_alpha[i] = &opt_names[i];
+
+ qsort(opt_names_alpha, ARG_COUNT, sizeof(long), long_name_compare);
+}
+
void print_command_list(void)
{
int i;
@@ -2754,6 +2918,17 @@ void print_option_list(void)
opt_names[i].short_opt ? opt_names[i].short_opt : 0);
}
+void print_option_alpha_list(void)
+{
+ int i;
+
+ for (i = 0; i < ARG_COUNT; i++)
+ printf("%d %s %s %c (%d)\n",
+ opt_names_alpha[i]->opt_enum, opt_names_alpha[i]->name,
+ opt_names_alpha[i]->long_opt, opt_names_alpha[i]->short_opt ?: ' ',
+ opt_names_alpha[i]->short_opt ? opt_names_alpha[i]->short_opt : 0);
+}
+
static void print_help(int argc, char *argv[])
{
printf("%s [options] --output <format> <filename>\n", argv[0]);
@@ -2791,9 +2966,12 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
+ create_opt_names_alpha();
+
if (!strcmp(argv[1], "debug")) {
print_command_list();
print_option_list();
+ print_option_alpha_list();
return 0;
}
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 4f1718b..afc941b 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -64,7 +64,7 @@ static struct val_props _val_props[VAL_COUNT + 1] = {
* Table of valid --option's
*/
static struct arg_props _arg_props[ARG_COUNT + 1] = {
-#define arg(a, b, c, d, e, f) {a, b, "", "--" c, d, e, f},
+#define arg(a, b, c, d, e, f, g) {a, b, "", "--" c, d, e, f, g},
#include "args.h"
#undef arg
};
diff --git a/tools/tools.h b/tools/tools.h
index 89ee8ad..392490f 100644
--- a/tools/tools.h
+++ b/tools/tools.h
@@ -59,7 +59,7 @@ enum {
/* define the enums for the command line --options, foo_ARG */
enum {
-#define arg(a, b, c, d, e, f) a ,
+#define arg(a, b, c, d, e, f, g) a ,
#include "args.h"
#undef arg
};
@@ -109,6 +109,7 @@ struct arg_props {
int val_enum; /* foo_VAL from vals.h */
uint32_t flags;
uint32_t prio;
+ const char *desc;
};
struct arg_value_group_list {
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=19267fa6aa0709e3…
Commit: 19267fa6aa0709e3d0c962ad0904920f06102a5b
Parent: 2923d9e47deb11b28b8b753dd7862da186da051c
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Dec 15 11:49:19 2016 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Mon Feb 13 08:20:10 2017 -0600
lvmlockd: test mode doesn't work
The --test option is not yet compatible with shared VGs
because changes are made in lvmlockd that cannot be
reversed or faked.
---
lib/metadata/metadata.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index b11d306..1b500ed 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -5629,6 +5629,11 @@ static int _access_vg_lock_type(struct cmd_context *cmd, struct volume_group *vg
}
}
+ if (test_mode()) {
+ log_error("Test mode is not yet supported with lock type %s.", vg->lock_type);
+ return 0;
+ }
+
return 1;
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b6301aa977df6759…
Commit: b6301aa977df675918f25f6ace11628fa846392c
Parent: a39c828c01f747696a6e042df48da62ec0e1ba75
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Feb 12 18:17:07 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 10:06:18 2017 +0100
cleanup: use fall through
gcc gets 'selective' on having commented fall through case.
---
lib/metadata/metadata.c | 2 +-
libdm/libdm-report.c | 5 +++++
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 1289fec..0731108 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -1256,7 +1256,7 @@ uint32_t extents_from_percent_size(struct volume_group *vg, const struct dm_list
}
break;
}
- /* Fall back to use all PVs in VG like %FREE */
+ /* fall through to use all PVs in VG like %FREE */
case PERCENT_FREE:
if (!(extents = vg->free_count)) {
log_error("No free extents in Volume group %s.", vg->name);
diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c
index 93b8774..f9e261d 100644
--- a/libdm/libdm-report.c
+++ b/libdm/libdm-report.c
@@ -3062,26 +3062,31 @@ static void _get_final_time(time_range_t range, struct tm *tm,
tm_up.tm_sec += 1;
break;
}
+ /* fall through */
case RANGE_MINUTE:
if (tm_up.tm_min < 59) {
tm_up.tm_min += 1;
break;
}
+ /* fall through */
case RANGE_HOUR:
if (tm_up.tm_hour < 23) {
tm_up.tm_hour += 1;
break;
}
+ /* fall through */
case RANGE_DAY:
if (tm_up.tm_mday < _get_days_in_month(tm_up.tm_mon, tm_up.tm_year)) {
tm_up.tm_mday += 1;
break;
}
+ /* fall through */
case RANGE_MONTH:
if (tm_up.tm_mon < 11) {
tm_up.tm_mon += 1;
break;
}
+ /* fall through */
case RANGE_YEAR:
tm_up.tm_year += 1;
break;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b185a3e3334e72c3…
Commit: b185a3e3334e72c3aae6791ec4cb8768d55e0b9b
Parent: aa0c735e2ccbea969bad846f3e89c91a81d88fbf
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Feb 13 09:58:46 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Mon Feb 13 10:06:07 2017 +0100
config: update doc
---
conf/example.conf.in | 1 +
lib/config/config_settings.h | 4 +++-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 7cb6f4a..5e238e4 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -2054,6 +2054,7 @@ dmeventd {
# or metadata volume gets above 50%.
# Command which starts with 'lvm ' prefix is internal lvm command.
# You can write your own handler to customise behaviour in more details.
+ # User handler is specified with the full path starting with '/'.
# This configuration option has an automatic default value.
# thin_command = "lvm lvextend --use-policies"
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 8f49b12..1d9603f 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -1863,7 +1863,9 @@ cfg(dmeventd_thin_command_CFG, "thin_command", dmeventd_CFG_SECTION, CFG_DEFAULT
"The plugin runs command with each 5% increment when thin-pool data volume\n"
"or metadata volume gets above 50%.\n"
"Command which starts with 'lvm ' prefix is internal lvm command.\n"
- "You can write your own handler to customise behaviour in more details.\n")
+ "You can write your own handler to customise behaviour in more details.\n"
+ "User handler is specified with the full path starting with '/'.\n")
+ /* TODO: systemd service handler */
cfg(dmeventd_executable_CFG, "executable", dmeventd_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_DMEVENTD_PATH, vsn(2, 2, 73), "@DMEVENTD_PATH@", 0, NULL,
"The full path to the dmeventd binary.\n")
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2a9eda1229c9d5d7…
Commit: 2a9eda1229c9d5d7150acdd3d8dd4908fbc784a8
Parent: 8296b99a89b849d7d7b5dcac6214582b3eaad639
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Feb 11 18:14:00 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Sat Feb 11 18:23:15 2017 +0100
mem: add extra mem pages for pthread stack
Some archs can use even 64K pages and then lvm2 runs into trouble if
the stack is 'too small' to fit extra page capturing stack overwrite.
So when lvm2 limits stack - add extra mem page - be it 4K or 64K.
Relates to ppc64le bug: https://bugzilla.redhat.com/1387279
---
WHATS_NEW | 1 +
WHATS_NEW_DM | 1 +
daemons/clvmd/clvmd.c | 2 +-
daemons/dmeventd/dmeventd.c | 2 +-
libdaemon/server/daemon-server.c | 2 +-
5 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index e5f1ba1..b497c7e 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.169 -
=====================================
+ Add extra memory page when limiting pthread stack size in clvmd.
Support striped/raid0* <-> raid10_near conversions
Support shrinking of RaidLvs
Support region size changes on existing RaidLVs
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 47f647a..f11b28c 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.138 -
=====================================
+ Add extra memory page when limiting pthread stack size in dmeventd.
Avoids immediate resume when preloaded device is smaller.
Do not suppress kernel key description in dmsetup table output.
Support configurable command executed from dmeventd thin plugin.
diff --git a/daemons/clvmd/clvmd.c b/daemons/clvmd/clvmd.c
index a276c63..dcc986b 100644
--- a/daemons/clvmd/clvmd.c
+++ b/daemons/clvmd/clvmd.c
@@ -517,7 +517,7 @@ int main(int argc, char *argv[])
/* Initialise the LVM thread variables */
dm_list_init(&lvm_cmd_head);
if (pthread_attr_init(&stack_attr) ||
- pthread_attr_setstacksize(&stack_attr, STACK_SIZE)) {
+ pthread_attr_setstacksize(&stack_attr, STACK_SIZE + getpagesize())) {
log_sys_error("pthread_attr_init", "");
exit(1);
}
diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c
index 58922ac..a2883a1 100644
--- a/daemons/dmeventd/dmeventd.c
+++ b/daemons/dmeventd/dmeventd.c
@@ -468,7 +468,7 @@ static int _pthread_create_smallstack(pthread_t *t, void *(*fun)(void *), void *
/*
* We use a smaller stack since it gets preallocated in its entirety
*/
- pthread_attr_setstacksize(&attr, THREAD_STACK_SIZE);
+ pthread_attr_setstacksize(&attr, THREAD_STACK_SIZE + getpagesize());
/*
* If no-one will be waiting, we need to detach.
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
index 6af6de9..10cc8f7 100644
--- a/libdaemon/server/daemon-server.c
+++ b/libdaemon/server/daemon-server.c
@@ -42,7 +42,7 @@ static int _pthread_create(pthread_t *t, void *(*fun)(void *), void *arg, int st
/*
* We use a smaller stack since it gets preallocated in its entirety
*/
- pthread_attr_setstacksize(&attr, stacksize);
+ pthread_attr_setstacksize(&attr, stacksize + getpagesize());
return pthread_create(t, &attr, fun, arg);
}
#endif
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=caa2094e33188806…
Commit: caa2094e33188806137a8fe6d8c6ecce779ecc59
Parent: c908a8b131d0ae12cf87a271b10dfeaf65d4e0a7
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Feb 10 21:19:03 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Feb 10 21:22:38 2017 +0100
test: lvresize-raid.sh missing conditional
Test missed to check for raid0 present in the kernel.
Related: rhbz1366296
---
test/shell/lvresize-raid.sh | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/shell/lvresize-raid.sh b/test/shell/lvresize-raid.sh
index b4f6058..691946d 100644
--- a/test/shell/lvresize-raid.sh
+++ b/test/shell/lvresize-raid.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012,2017 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
@@ -17,7 +17,8 @@ SKIP_WITH_LVMPOLLD=1
aux have_raid 1 3 0 || skip
levels="5 6 10"
-aux have_raid4 && levels="0 0_meta 4 $levels"
+aux have_raid4 && levels="4 $levels"
+aux have_raid 1 7 0 && levels="0 0_meta $levels"
aux prepare_pvs 6
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c908a8b131d0ae12…
Commit: c908a8b131d0ae12cf87a271b10dfeaf65d4e0a7
Parent: 035c614c195b08398df3403c4bbd3d986cca68c3
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 10 19:57:04 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 10 20:29:11 2017 +0100
libdm: avoid resume if preloaded device is smaller
When we preload device with smaller size, we avoid its resume,
so later suspend/resume of full device tree my process all
existing in flight bios.
Also update comment and avoid using confusing opposite meaning.
---
WHATS_NEW_DM | 1 +
libdm/libdm-deptree.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index ac2d420..47f647a 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
Version 1.02.138 -
=====================================
+ Avoids immediate resume when preloaded device is smaller.
Do not suppress kernel key description in dmsetup table output.
Support configurable command executed from dmeventd thin plugin.
Support new R|r human readable units output format.
diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c
index 9570b8a..d658bf9 100644
--- a/libdm/libdm-deptree.c
+++ b/libdm/libdm-deptree.c
@@ -2874,8 +2874,8 @@ int dm_tree_preload_children(struct dm_tree_node *dnode,
else if (child->props.size_changed < 0)
dnode->props.size_changed = -1;
- /* Resume device immediately if it has parents and its size changed */
- if (!dm_tree_node_num_children(child, 1) || !child->props.size_changed)
+ /* No resume for a device without parents or with unchanged or smaller size */
+ if (!dm_tree_node_num_children(child, 1) || (child->props.size_changed <= 0))
continue;
if (!node_created && (dm_list_size(&child->props.segs) == 1)) {
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=68ec6940e6897192…
Commit: 68ec6940e6897192aec6480a14492a5adc6937d8
Parent: 55eaabd1183042b8e03b3a969eadf624623c4b62
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Fri Feb 10 17:07:39 2017 +0000
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Fri Feb 10 17:09:17 2017 +0000
man: mention dmstats in lvmsar and lvmsadc man pages
---
man/lvmsadc.8.in | 5 ++++-
man/lvmsar.8.in | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/man/lvmsadc.8.in b/man/lvmsadc.8.in
index e156de2..81d2b66 100644
--- a/man/lvmsadc.8.in
+++ b/man/lvmsadc.8.in
@@ -7,7 +7,10 @@ lvmsadc \(em LVM system activity data collector
.B lvmsadc
.SH "DESCRIPTION"
-lvmsadc is not currently supported under LVM2.
+lvmsadc is not currently supported under LVM2: the device-mapper statistics
+facility provides similar performance metrics using the \fBdmstats(8)\fP
+command.
.SH "SEE ALSO"
+.BR dmstats (8)
.BR lvm (8)
diff --git a/man/lvmsar.8.in b/man/lvmsar.8.in
index a9a6132..fca111f 100644
--- a/man/lvmsar.8.in
+++ b/man/lvmsar.8.in
@@ -7,7 +7,10 @@ lvmsar \(em LVM system activity reporter
.B lvmsar
.SH "DESCRIPTION"
-lvmsar is not currently supported under LVM2.
+lvmsar is not currently supported under LVM2: the device-mapper statistics
+facility provides similar performance metrics using the \fBdmstats(8)\fP
+command.
.SH "SEE ALSO"
+.BR dmstats (8)
.BR lvm (8)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d8568552e460afe4…
Commit: d8568552e460afe477f1baa7c46da81039f85b15
Parent: 3673ce48e0d6147fe7a24fcce97130fab8914e51
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Sat Feb 4 14:09:26 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Sat Feb 4 14:09:26 2017 +0100
WHATS_NEW: New segment type raid6_n_6
---
WHATS_NEW | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 95a24ba..cfa1179 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.169 -
=====================================
+ Support raid6_n_6 segment type and conversions from/to it.
Support raid5_n segment type and conversions from/to it.
Support new internal command _dmeventd_thin_command.
Introduce new dmeventd/thin_command configurable setting.