master - raid: fix compile time warning
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8b9b76d029143b4589e...
Commit: 8b9b76d029143b4589e41a6c4b8daa0eec163909
Parent: 59e57be54f9b4c9e83ec1ede480285965a7411eb
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Mar 10 14:40:39 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Mar 10 14:40:39 2017 +0100
raid: fix compile time warning
---
lib/metadata/raid_manip.c | 44 ++++++++++++++++++++++++++++++++++++--------
1 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index a8c2e19..5278001 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1491,7 +1491,7 @@ static int _lv_alloc_reshape_space(struct logical_volume *lv,
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;
+ uint64_t lv_size_cur = lv->size;
if (!lv_extend(lv, seg->segtype, data_rimages,
seg->stripe_size, 1, /* seg_is_any_raid10(seg) ? seg->data_copies : 1, */ seg->region_size,
@@ -1502,7 +1502,7 @@ static int _lv_alloc_reshape_space(struct logical_volume *lv,
return 0;
}
- lv->size = lv_size;
+ lv->size = lv_size_cur;
/* 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;
@@ -4405,10 +4405,10 @@ static int _get_allowed_conversion_options(const struct lv_segment *seg_from,
/*
* Log any possible conversions for @lv
*/
-typedef int (*type_flag_fn_t)(uint64_t *processed_segtypes, void *data);
+typedef int (*type_flag_fn_t)(const struct logical_volume *lv, void *ref, void *data);
/* Loop through pt->flags calling tfn with argument @data */
-static int _process_type_flags(const struct logical_volume *lv, struct possible_type *pt, uint64_t *processed_segtypes, type_flag_fn_t tfn, void *data)
+static int _process_type_flags(const struct logical_volume *lv, struct possible_type *pt, void *ref, type_flag_fn_t tfn, void *data)
{
unsigned i;
uint64_t t;
@@ -4420,7 +4420,7 @@ static int _process_type_flags(const struct logical_volume *lv, struct possible_
if ((t & pt->possible_types) &&
!(t & seg->segtype->flags) &&
((segtype = get_segtype_from_flag(lv->vg->cmd, t))))
- if (!tfn(processed_segtypes, data ? : (void *) segtype))
+ if (!tfn(lv, ref, data ? : (void *) segtype))
return 0;
}
@@ -4428,7 +4428,7 @@ static int _process_type_flags(const struct logical_volume *lv, struct possible_
}
/* Callback to increment unsigned possible conversion types in *data */
-static int _count_possible_conversions(uint64_t *processed_segtypes, void *data)
+static int _count_possible_conversions(const struct logical_volume *lv, void *ref, void *data)
{
unsigned *possible_conversions = data;
@@ -4438,15 +4438,43 @@ static int _count_possible_conversions(uint64_t *processed_segtypes, void *data)
}
/* Callback to log possible conversion to segment type in *data */
-static int _log_possible_conversion(uint64_t *processed_segtypes, void *data)
+static int _log_possible_transitions(const struct logical_volume *lv, void *ref, void *data)
{
struct segment_type *segtype = data;
+ char *segtype_name = dm_pool_strdup(lv->vg->vgmem, first_seg(lv)->segtype->name);
+ char *p = strchr(segtype_name, '_');
+ const char *from_name = ((struct segment_type *) ref)->name;
+ size_t len;
+
+ if (p)
+ *p = '\0';
+
+ len = strlen(segtype_name);
+ if (strcmp(from_name, segtype->name) &&
+ strncmp(segtype_name, segtype->name, len))
+ log_error(" -> %s", segtype->name);
+
+ return 1;
+}
+
+/* Callback to log possible conversion to segment type in *data */
+static int _log_possible_conversion(const struct logical_volume *lv, void *processed_segtypes_ptr, void *data)
+{
+ struct segment_type *segtype = data;
+ struct possible_takeover_reshape_type *pt = NULL;
+ struct lv_segment seg;
+ uint64_t *processed_segtypes = processed_segtypes_ptr;
/* Already processed? */
if (!(~*processed_segtypes & segtype->flags))
return 1;
log_error(" %s", segtype->name);
+ seg.segtype = segtype;
+ seg.area_count = first_seg(lv)->area_count;
+ if ((pt = _get_possible_takeover_reshape_type(&seg, NULL, (struct possible_type *) pt)))
+ if (!_process_type_flags(lv, (struct possible_type *) pt, segtype, _log_possible_transitions, NULL))
+ return_0;
*processed_segtypes |= segtype->flags;
@@ -4478,7 +4506,7 @@ static int _log_possible_conversion_types(const struct logical_volume *lv, const
const char *alias;
uint64_t processed_segtypes = UINT64_C(0);
- /* Count any possible segment types @seg an be directly converted to */
+ /* Count any possible segment types @seg can be directly converted to */
while ((pt = _get_possible_type(seg, NULL, 0, pt)))
if (!_process_type_flags(lv, pt, &processed_segtypes, _count_possible_conversions, &possible_conversions))
return_0;
6 years, 9 months
master - raid: fix compile time warning
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=992b938d08e6c450478...
Commit: 992b938d08e6c45047822d0939d1f9fff9964c3b
Parent: 6e667adbce7ecc4be25b0ab66f3a36ad3ecb3970
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Mar 10 14:37:50 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Mar 10 14:37:50 2017 +0100
raid: fix compile time warning
---
lib/metadata/raid_manip.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index 9e9455a..5278001 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -1491,7 +1491,7 @@ static int _lv_alloc_reshape_space(struct logical_volume *lv,
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;
+ uint64_t lv_size_cur = lv->size;
if (!lv_extend(lv, seg->segtype, data_rimages,
seg->stripe_size, 1, /* seg_is_any_raid10(seg) ? seg->data_copies : 1, */ seg->region_size,
@@ -1502,7 +1502,7 @@ static int _lv_alloc_reshape_space(struct logical_volume *lv,
return 0;
}
- lv->size = lv_size;
+ lv->size = lv_size_cur;
/* 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;
6 years, 9 months
master - tmp
by Heinz Mauelshagen
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6e667adbce7ecc4be25...
Commit: 6e667adbce7ecc4be25b0ab66f3a36ad3ecb3970
Parent: 59e57be54f9b4c9e83ec1ede480285965a7411eb
Author: Heinz Mauelshagen <heinzm(a)redhat.com>
AuthorDate: Fri Mar 10 14:27:38 2017 +0100
Committer: Heinz Mauelshagen <heinzm(a)redhat.com>
CommitterDate: Fri Mar 10 14:27:50 2017 +0100
tmp
---
lib/config/defaults.h | 10 +++-------
lib/metadata/raid_manip.c | 40 ++++++++++++++++++++++++++++++++++------
man/lvmraid.7.in | 5 +++--
3 files changed, 40 insertions(+), 15 deletions(-)
diff --git a/lib/config/defaults.h b/lib/config/defaults.h
index 5554c9c..1bfbf6f 100644
--- a/lib/config/defaults.h
+++ b/lib/config/defaults.h
@@ -66,13 +66,9 @@
#define DEFAULT_MIRROR_LOG_FAULT_POLICY "allocate"
#define DEFAULT_MIRROR_IMAGE_FAULT_POLICY "remove"
#define DEFAULT_MIRROR_MAX_IMAGES 8 /* limited by kernel DM_KCOPYD_MAX_REGIONS */
-/* Limited by kernel failed devices bitfield in superblock (raid4/5/6 MD max 253) */
-/*
- * 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 64
-#define DEFAULT_RAID_MAX_IMAGES 64
+/* Limited by kernel failed devices bitfield in superblock (raid4/5/6 MD max 253!) */
+#define DEFAULT_RAID1_MAX_IMAGES 253
+#define DEFAULT_RAID_MAX_IMAGES 253
#define DEFAULT_ALLOCATION_STRIPE_ALL_DEVICES 0 /* Don't stripe across all devices if not -i/--stripes given */
#define DEFAULT_RAID_FAULT_POLICY "warn"
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index a8c2e19..9e9455a 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -4405,10 +4405,10 @@ static int _get_allowed_conversion_options(const struct lv_segment *seg_from,
/*
* Log any possible conversions for @lv
*/
-typedef int (*type_flag_fn_t)(uint64_t *processed_segtypes, void *data);
+typedef int (*type_flag_fn_t)(const struct logical_volume *lv, void *ref, void *data);
/* Loop through pt->flags calling tfn with argument @data */
-static int _process_type_flags(const struct logical_volume *lv, struct possible_type *pt, uint64_t *processed_segtypes, type_flag_fn_t tfn, void *data)
+static int _process_type_flags(const struct logical_volume *lv, struct possible_type *pt, void *ref, type_flag_fn_t tfn, void *data)
{
unsigned i;
uint64_t t;
@@ -4420,7 +4420,7 @@ static int _process_type_flags(const struct logical_volume *lv, struct possible_
if ((t & pt->possible_types) &&
!(t & seg->segtype->flags) &&
((segtype = get_segtype_from_flag(lv->vg->cmd, t))))
- if (!tfn(processed_segtypes, data ? : (void *) segtype))
+ if (!tfn(lv, ref, data ? : (void *) segtype))
return 0;
}
@@ -4428,7 +4428,7 @@ static int _process_type_flags(const struct logical_volume *lv, struct possible_
}
/* Callback to increment unsigned possible conversion types in *data */
-static int _count_possible_conversions(uint64_t *processed_segtypes, void *data)
+static int _count_possible_conversions(const struct logical_volume *lv, void *ref, void *data)
{
unsigned *possible_conversions = data;
@@ -4438,15 +4438,43 @@ static int _count_possible_conversions(uint64_t *processed_segtypes, void *data)
}
/* Callback to log possible conversion to segment type in *data */
-static int _log_possible_conversion(uint64_t *processed_segtypes, void *data)
+static int _log_possible_transitions(const struct logical_volume *lv, void *ref, void *data)
{
struct segment_type *segtype = data;
+ char *segtype_name = dm_pool_strdup(lv->vg->vgmem, first_seg(lv)->segtype->name);
+ char *p = strchr(segtype_name, '_');
+ const char *from_name = ((struct segment_type *) ref)->name;
+ size_t len;
+
+ if (p)
+ *p = '\0';
+
+ len = strlen(segtype_name);
+ if (strcmp(from_name, segtype->name) &&
+ strncmp(segtype_name, segtype->name, len))
+ log_error(" -> %s", segtype->name);
+
+ return 1;
+}
+
+/* Callback to log possible conversion to segment type in *data */
+static int _log_possible_conversion(const struct logical_volume *lv, void *processed_segtypes_ptr, void *data)
+{
+ struct segment_type *segtype = data;
+ struct possible_takeover_reshape_type *pt = NULL;
+ struct lv_segment seg;
+ uint64_t *processed_segtypes = processed_segtypes_ptr;
/* Already processed? */
if (!(~*processed_segtypes & segtype->flags))
return 1;
log_error(" %s", segtype->name);
+ seg.segtype = segtype;
+ seg.area_count = first_seg(lv)->area_count;
+ if ((pt = _get_possible_takeover_reshape_type(&seg, NULL, (struct possible_type *) pt)))
+ if (!_process_type_flags(lv, (struct possible_type *) pt, segtype, _log_possible_transitions, NULL))
+ return_0;
*processed_segtypes |= segtype->flags;
@@ -4478,7 +4506,7 @@ static int _log_possible_conversion_types(const struct logical_volume *lv, const
const char *alias;
uint64_t processed_segtypes = UINT64_C(0);
- /* Count any possible segment types @seg an be directly converted to */
+ /* Count any possible segment types @seg can be directly converted to */
while ((pt = _get_possible_type(seg, NULL, 0, pt)))
if (!_process_type_flags(lv, pt, &processed_segtypes, _count_possible_conversions, &possible_conversions))
return_0;
diff --git a/man/lvmraid.7.in b/man/lvmraid.7.in
index 79e6fe0..0831db7 100644
--- a/man/lvmraid.7.in
+++ b/man/lvmraid.7.in
@@ -1052,8 +1052,8 @@ All segments with PE ranges '33-33' provide the out-of-place reshape space.
The dataoffset column shows that the data was moved from initial offset 0 to
2048 sectors on each component DataLV.
-If the RaidLV should be restriped for performance reasons,
-convert the 3-way striped raid6_nr LV to 5-way-striped.
+For performance reasons the raid6_nr RaidLV can be restriped.
+Convert it from 3-way striped to 5-way-striped.
.nf
# lvconvert --stripes 5 -y tb/lv
@@ -1090,6 +1090,7 @@ convert the 3-way striped raid6_nr LV to 5-way-striped.
[lv_rmeta_6] ewi-aor--- linear /dev/sdaf:0-0
.fi
+Stripes also can be removed from raid5 and 6.
Convert the 5-way striped raid6_nr LV to 4-way-striped.
The force option needs to be used, because removing stripes
(i.e. image SubLVs) from a RaidLV will shrink its size.
6 years, 9 months
master - tools: add generated headers to .gitignore
by Bryn Reeves
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1f7ac54bc4434922327...
Commit: 1f7ac54bc4434922327b92c92aeb3498fb204479
Parent: 6a0f597727d2b52aa9bf607544087ce97a81dee2
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Fri Mar 10 13:13:41 2017 +0000
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Fri Mar 10 13:13:41 2017 +0000
tools: add generated headers to .gitignore
---
tools/.gitignore | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tools/.gitignore b/tools/.gitignore
index 2e7b332..ec529c3 100644
--- a/tools/.gitignore
+++ b/tools/.gitignore
@@ -2,3 +2,6 @@
dmsetup
dmstats
lvm
+cmds.h
+command-count.h
+command-lines-input.h
6 years, 9 months
master - man: add man-generator and build artefacts to .gitignore
by Bryn Reeves
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=59e57be54f9b4c9e83e...
Commit: 59e57be54f9b4c9e83ec1ede480285965a7411eb
Parent: 1f7ac54bc4434922327b92c92aeb3498fb204479
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Fri Mar 10 13:14:02 2017 +0000
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Fri Mar 10 13:14:02 2017 +0000
man: add man-generator and build artefacts to .gitignore
---
man/.gitignore | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/man/.gitignore b/man/.gitignore
new file mode 100644
index 0000000..4165b16
--- /dev/null
+++ b/man/.gitignore
@@ -0,0 +1,2 @@
+*.gen
+man-generator
6 years, 9 months
master - dmsetup: always initialise 'mode' in filemap create functions
by Bryn Reeves
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6a0f597727d2b52aa9b...
Commit: 6a0f597727d2b52aa9bf607544087ce97a81dee2
Parent: 146b2582b05b3b4b0f25296620ed2c2ca9e0f467
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Fri Mar 10 12:04:02 2017 +0000
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Fri Mar 10 12:17:25 2017 +0000
dmsetup: always initialise 'mode' in filemap create functions
Older compilers cannot tell that the 'mode' variable is only
used in branches in which it is assigned:
dmsetup.c:5651: warning: "mode" may be used uninitialized in this function
dmsetup.c:5023: warning: "mode" may be used uninitialized in this function
Avoid this by always assigning the variable a value.
---
tools/dmsetup.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index eaeb1ce..945557f 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -5004,6 +5004,8 @@ static int _stats_check_filemap_switches(void)
static dm_filemapd_mode_t _stats_get_filemapd_mode(void)
{
+ if (_switches[NOMONITOR_ARG] || _switches[NOGROUP_ARG])
+ return DM_FILEMAPD_FOLLOW_NONE;
if (!_switches[FOLLOW_ARG])
return DM_FILEMAPD_FOLLOW_INODE;
return dm_filemapd_mode_from_string(_string_args[FOLLOW_ARG]);
@@ -5073,9 +5075,9 @@ static int _stats_create_file(CMD_ARGS)
precise = _int_args[PRECISE_ARG];
group = !_switches[NOGROUP_ARG];
- if (!_switches[NOMONITOR_ARG] && group)
- if ((mode = _stats_get_filemapd_mode()) == -1)
- goto bad;
+ mode = _stats_get_filemapd_mode();
+ if (!_switches[NOMONITOR_ARG] && (mode == DM_FILEMAPD_FOLLOW_NONE))
+ goto bad;
if (!(dms = dm_stats_create(DM_STATS_PROGRAM_ID)))
goto_bad;
@@ -5681,9 +5683,9 @@ static int _stats_update_file(CMD_ARGS)
group_id = (uint64_t) _int_args[GROUP_ID_ARG];
- if (!_switches[NOMONITOR_ARG])
- if ((mode = _stats_get_filemapd_mode()) < 0)
- goto bad;
+ mode = _stats_get_filemapd_mode();
+ if (!_switches[NOMONITOR_ARG] && (mode == DM_FILEMAPD_FOLLOW_NONE))
+ goto bad;
if (_switches[PROGRAM_ID_ARG])
program_id = _string_args[PROGRAM_ID_ARG];
6 years, 9 months
master - dmsetup: always initialise 'mode' in filemap create functions
by Bryn Reeves
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1659be588d6d077ddd4...
Commit: 1659be588d6d077ddd4d9d095cfb336520898975
Parent: 146b2582b05b3b4b0f25296620ed2c2ca9e0f467
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Fri Mar 10 12:04:02 2017 +0000
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Fri Mar 10 12:04:02 2017 +0000
dmsetup: always initialise 'mode' in filemap create functions
Older compilers cannot tell that the 'mode' variable is only
used in branches in which it is assigned:
dmsetup.c:5651: warning: "mode" may be used uninitialized in this function
dmsetup.c:5023: warning: "mode" may be used uninitialized in this function
Avoid this by always assigning the variable a value.
---
tools/cmds.h | 143 +++++++
tools/command-count.h | 16 +
tools/command-lines-input.h | 965 +++++++++++++++++++++++++++++++++++++++++++
tools/dmsetup.c | 14 +-
4 files changed, 1132 insertions(+), 6 deletions(-)
diff --git a/tools/cmds.h b/tools/cmds.h
new file mode 100644
index 0000000..fe42140
--- /dev/null
+++ b/tools/cmds.h
@@ -0,0 +1,143 @@
+/*
+ * 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
+ */
+/* Do not edit. This file is generated by the Makefile. */
+cmd(CMD_NONE, none)
+cmd(devtypes_general_CMD, devtypes_general)
+cmd(formats_general_CMD, formats_general)
+cmd(fullreport_general_CMD, fullreport_general)
+cmd(help_general_CMD, help_general)
+cmd(lastlog_general_CMD, lastlog_general)
+cmd(lvchange_activate_CMD, lvchange_activate)
+cmd(lvchange_monitor_CMD, lvchange_monitor)
+cmd(lvchange_persistent_CMD, lvchange_persistent)
+cmd(lvchange_poll_CMD, lvchange_poll)
+cmd(lvchange_properties_CMD, lvchange_properties)
+cmd(lvchange_rebuild_CMD, lvchange_rebuild)
+cmd(lvchange_refresh_CMD, lvchange_refresh)
+cmd(lvchange_resync_CMD, lvchange_resync)
+cmd(lvchange_syncaction_CMD, lvchange_syncaction)
+cmd(lvconvert_change_mirrorlog_CMD, lvconvert_change_mirrorlog)
+cmd(lvconvert_change_region_size_CMD, lvconvert_change_region_size)
+cmd(lvconvert_combine_split_snapshot_CMD, lvconvert_combine_split_snapshot)
+cmd(lvconvert_merge_CMD, lvconvert_merge)
+cmd(lvconvert_merge_mirror_images_CMD, lvconvert_merge_mirror_images)
+cmd(lvconvert_merge_snapshot_CMD, lvconvert_merge_snapshot)
+cmd(lvconvert_merge_thin_CMD, lvconvert_merge_thin)
+cmd(lvconvert_raid_types_CMD, lvconvert_raid_types)
+cmd(lvconvert_repair_pvs_or_thinpool_CMD, lvconvert_repair_pvs_or_thinpool)
+cmd(lvconvert_replace_pv_CMD, lvconvert_replace_pv)
+cmd(lvconvert_split_and_keep_cachepool_CMD, lvconvert_split_and_keep_cachepool)
+cmd(lvconvert_split_and_remove_cachepool_CMD, lvconvert_split_and_remove_cachepool)
+cmd(lvconvert_split_cow_snapshot_CMD, lvconvert_split_cow_snapshot)
+cmd(lvconvert_split_mirror_images_CMD, lvconvert_split_mirror_images)
+cmd(lvconvert_start_poll_CMD, lvconvert_start_poll)
+cmd(lvconvert_swap_pool_metadata_CMD, lvconvert_swap_pool_metadata)
+cmd(lvconvert_to_cachepool_CMD, lvconvert_to_cachepool)
+cmd(lvconvert_to_cachepool_or_swap_metadata_CMD, lvconvert_to_cachepool_or_swap_metadata)
+cmd(lvconvert_to_cache_vol_CMD, lvconvert_to_cache_vol)
+cmd(lvconvert_to_thinpool_CMD, lvconvert_to_thinpool)
+cmd(lvconvert_to_thinpool_or_swap_metadata_CMD, lvconvert_to_thinpool_or_swap_metadata)
+cmd(lvconvert_to_thin_with_external_CMD, lvconvert_to_thin_with_external)
+cmd(lvcreate_cachepool_CMD, lvcreate_cachepool)
+cmd(lvcreate_cache_vol_with_new_origin_CMD, lvcreate_cache_vol_with_new_origin)
+cmd(lvcreate_cache_vol_with_new_origin_or_convert_to_cache_vol_with_cachepool_CMD, lvcreate_cache_vol_with_new_origin_or_convert_to_cache_vol_with_cachepool)
+cmd(lvcreate_cow_snapshot_CMD, lvcreate_cow_snapshot)
+cmd(lvcreate_cow_snapshot_with_virtual_origin_CMD, lvcreate_cow_snapshot_with_virtual_origin)
+cmd(lvcreate_error_vol_CMD, lvcreate_error_vol)
+cmd(lvcreate_linear_CMD, lvcreate_linear)
+cmd(lvcreate_mirror_CMD, lvcreate_mirror)
+cmd(lvcreate_mirror_or_raid1_CMD, lvcreate_mirror_or_raid1)
+cmd(lvcreate_raid_any_CMD, lvcreate_raid_any)
+cmd(lvcreate_striped_CMD, lvcreate_striped)
+cmd(lvcreate_thinpool_CMD, lvcreate_thinpool)
+cmd(lvcreate_thin_snapshot_CMD, lvcreate_thin_snapshot)
+cmd(lvcreate_thin_snapshot_of_external_CMD, lvcreate_thin_snapshot_of_external)
+cmd(lvcreate_thin_vol_CMD, lvcreate_thin_vol)
+cmd(lvcreate_thin_vol_and_thinpool_CMD, lvcreate_thin_vol_and_thinpool)
+cmd(lvcreate_thin_vol_with_thinpool_or_sparse_snapshot_CMD, lvcreate_thin_vol_with_thinpool_or_sparse_snapshot)
+cmd(lvcreate_zero_vol_CMD, lvcreate_zero_vol)
+cmd(lvdisplay_general_CMD, lvdisplay_general)
+cmd(lvextend_by_policy_CMD, lvextend_by_policy)
+cmd(lvextend_by_pv_CMD, lvextend_by_pv)
+cmd(lvextend_by_size_CMD, lvextend_by_size)
+cmd(lvextend_pool_metadata_by_size_CMD, lvextend_pool_metadata_by_size)
+cmd(lvmchange_general_CMD, lvmchange_general)
+cmd(lvmconfig_general_CMD, lvmconfig_general)
+cmd(lvmdiskscan_general_CMD, lvmdiskscan_general)
+cmd(lvmsadc_general_CMD, lvmsadc_general)
+cmd(lvmsar_general_CMD, lvmsar_general)
+cmd(lvpoll_general_CMD, lvpoll_general)
+cmd(lvreduce_general_CMD, lvreduce_general)
+cmd(lvremove_general_CMD, lvremove_general)
+cmd(lvrename_lv_lv_CMD, lvrename_lv_lv)
+cmd(lvrename_vg_lv_lv_CMD, lvrename_vg_lv_lv)
+cmd(lvresize_by_pv_CMD, lvresize_by_pv)
+cmd(lvresize_by_size_CMD, lvresize_by_size)
+cmd(lvresize_pool_metadata_by_size_CMD, lvresize_pool_metadata_by_size)
+cmd(lvscan_cache_CMD, lvscan_cache)
+cmd(lvscan_general_CMD, lvscan_general)
+cmd(lvs_general_CMD, lvs_general)
+cmd(pvchange_properties_all_CMD, pvchange_properties_all)
+cmd(pvchange_properties_some_CMD, pvchange_properties_some)
+cmd(pvck_general_CMD, pvck_general)
+cmd(pvcreate_general_CMD, pvcreate_general)
+cmd(pvdata_general_CMD, pvdata_general)
+cmd(pvdisplay_general_CMD, pvdisplay_general)
+cmd(pvmove_any_CMD, pvmove_any)
+cmd(pvmove_one_CMD, pvmove_one)
+cmd(pvremove_general_CMD, pvremove_general)
+cmd(pvresize_general_CMD, pvresize_general)
+cmd(pvscan_cache_CMD, pvscan_cache)
+cmd(pvscan_show_CMD, pvscan_show)
+cmd(pvs_general_CMD, pvs_general)
+cmd(segtypes_general_CMD, segtypes_general)
+cmd(systemid_general_CMD, systemid_general)
+cmd(tags_general_CMD, tags_general)
+cmd(version_general_CMD, version_general)
+cmd(vgcfgbackup_general_CMD, vgcfgbackup_general)
+cmd(vgcfgrestore_by_file_CMD, vgcfgrestore_by_file)
+cmd(vgcfgrestore_by_vg_CMD, vgcfgrestore_by_vg)
+cmd(vgcfgrestore_list_by_file_CMD, vgcfgrestore_list_by_file)
+cmd(vgcfgrestore_list_by_vg_CMD, vgcfgrestore_list_by_vg)
+cmd(vgchange_activate_CMD, vgchange_activate)
+cmd(vgchange_lockstart_CMD, vgchange_lockstart)
+cmd(vgchange_lockstop_CMD, vgchange_lockstop)
+cmd(vgchange_monitor_CMD, vgchange_monitor)
+cmd(vgchange_poll_CMD, vgchange_poll)
+cmd(vgchange_properties_CMD, vgchange_properties)
+cmd(vgchange_refresh_CMD, vgchange_refresh)
+cmd(vgck_general_CMD, vgck_general)
+cmd(vgconvert_general_CMD, vgconvert_general)
+cmd(vgcreate_general_CMD, vgcreate_general)
+cmd(vgdisplay_general_CMD, vgdisplay_general)
+cmd(vgexport_all_CMD, vgexport_all)
+cmd(vgexport_some_CMD, vgexport_some)
+cmd(vgextend_general_CMD, vgextend_general)
+cmd(vgimport_all_CMD, vgimport_all)
+cmd(vgimportclone_general_CMD, vgimportclone_general)
+cmd(vgimport_some_CMD, vgimport_some)
+cmd(vgmerge_general_CMD, vgmerge_general)
+cmd(vgmknodes_general_CMD, vgmknodes_general)
+cmd(vgreduce_all_CMD, vgreduce_all)
+cmd(vgreduce_by_pv_CMD, vgreduce_by_pv)
+cmd(vgreduce_missing_CMD, vgreduce_missing)
+cmd(vgremove_general_CMD, vgremove_general)
+cmd(vgrename_by_name_CMD, vgrename_by_name)
+cmd(vgrename_by_uuid_CMD, vgrename_by_uuid)
+cmd(vgscan_general_CMD, vgscan_general)
+cmd(vgs_general_CMD, vgs_general)
+cmd(vgsplit_by_lv_CMD, vgsplit_by_lv)
+cmd(vgsplit_by_pv_CMD, vgsplit_by_pv)
+cmd(CMD_COUNT, count)
diff --git a/tools/command-count.h b/tools/command-count.h
new file mode 100644
index 0000000..69b8dc2
--- /dev/null
+++ b/tools/command-count.h
@@ -0,0 +1,16 @@
+/*
+ * 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
+ */
+/* Do not edit. This file is generated by the Makefile. */
+#define COMMAND_COUNT 157
diff --git a/tools/command-lines-input.h b/tools/command-lines-input.h
new file mode 100644
index 0000000..de69665
--- /dev/null
+++ b/tools/command-lines-input.h
@@ -0,0 +1,965 @@
+/*
+ * 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
+ */
+/* Do not edit. This file is generated by the Makefile. */
+const char _command_input[] =
+
+"OO_ALL: --commandprofile String, --config String, --debug,\n"
+"--driverloaded Bool, --help, --longhelp, --profile String, --quiet,\n"
+"--verbose, --version, --yes, --test\n"
+"OO_REPORT: --aligned, --all, --binary, --configreport ConfigReport, --foreign,\n"
+"--ignorelockingfailure, --ignoreskippedcluster, --logonly,\n"
+"--nameprefixes, --noheadings, --nolocking, --nosuffix,\n"
+"--options String, --partial, --readonly, --reportformat ReportFmt, --rows,\n"
+"--select String, --separator String, --shared, --sort String,\n"
+"--trustcache, --unbuffered, --units Units, --unquoted\n"
+"OO_CONFIG: --atversion String, --typeconfig ConfigType, --file String, --ignoreadvanced,\n"
+"--ignoreunsupported, --ignorelocal, --list, --mergedconfig, --metadataprofile String,\n"
+"--sinceversion String, --showdeprecated, --showunsupported, --validate, --withsummary,\n"
+"--withcomments, --withspaces, --unconfigured, --withversions\n"
+"OO_LVCHANGE: --autobackup Bool, --force, --ignoremonitoring,\n"
+"--ignoreskippedcluster, --noudevsync, --reportformat ReportFmt,\n"
+"--select String\n"
+"OO_LVCHANGE_META: --addtag Tag, --deltag Tag,\n"
+"--alloc Alloc, --contiguous Bool,\n"
+"--detachprofile, --metadataprofile String, --profile String,\n"
+"--permission Permission, --readahead Readahead, --setactivationskip Bool,\n"
+"--errorwhenfull Bool, --discards Discards, --zero Bool,\n"
+"--cachemode CacheMode, --cachepolicy String, --cachesettings String,\n"
+"--minrecoveryrate SizeKB, --maxrecoveryrate SizeKB,\n"
+"--writebehind Number, --writemostly WriteMostlyPV, --persistent n\n"
+"lvchange OO_LVCHANGE_META VG|LV|Tag|Select ...\n"
+"OO: --activate Active, OO_LVCHANGE\n"
+"ID: lvchange_properties\n"
+"DESC: Change a general LV attribute.\n"
+"DESC: For options listed in parentheses, any one is\n"
+"DESC: required, after which the others are optional.\n"
+"RULE: all not lv_is_pvmove lv_is_mirror_log lv_is_mirror_image\n"
+"RULE: all and lv_is_vg_writable\n"
+"RULE: --contiguous not --alloc\n"
+"RULE: --profile not --detachprofile\n"
+"RULE: --metadataprofile not --detachprofile\n"
+"RULE: --minrecoveryrate --maxrecoveryrate and LV_raid\n"
+"RULE: --writebehind --writemostly and LV_raid1\n"
+"RULE: --cachemode --cachepolicy --cachesettings and LV_cache LV_cachepool\n"
+"RULE: --errorwhenfull --discards --zero and LV_thinpool\n"
+"RULE: --permission not lv_is_external_origin lv_is_raid_metadata lv_is_raid_image LV_thinpool\n"
+"RULE: --alloc --contiguous --metadataprofile --permission --persistent --profile --readahead not lv_is_thick_origin\n"
+"RULE: --alloc --discards --zero --cachemode --cachepolicy --cachesettings not lv_is_partial\n"
+"lvchange --resync VG|LV_raid_mirror|Tag|Select ...\n"
+"OO: --activate Active, OO_LVCHANGE\n"
+"ID: lvchange_resync\n"
+"DESC: Resyncronize a mirror or raid LV.\n"
+"RULE: all not lv_is_pvmove lv_is_locked\n"
+"RULE: all not LV_raid0\n"
+"lvchange --syncaction SyncAction VG|LV_raid|Tag|Select ...\n"
+"OO: OO_LVCHANGE\n"
+"ID: lvchange_syncaction\n"
+"DESC: Resynchronize or check a raid LV.\n"
+"RULE: all not LV_raid0\n"
+"lvchange --rebuild PV VG|LV_raid|Tag|Select ...\n"
+"OO: OO_LVCHANGE\n"
+"ID: lvchange_rebuild\n"
+"DESC: Reconstruct data on specific PVs of a raid LV.\n"
+"RULE: all not LV_raid0\n"
+"lvchange --activate Active VG|LV|Tag|Select ...\n"
+"OO: --activationmode ActivationMode, --partial, --ignoreactivationskip,\n"
+"--ignorelockingfailure, --sysinit, OO_LVCHANGE\n"
+"ID: lvchange_activate\n"
+"DESC: Activate or deactivate an LV.\n"
+"lvchange --refresh VG|LV|Tag|Select ...\n"
+"OO: --partial, --poll Bool, OO_LVCHANGE\n"
+"ID: lvchange_refresh\n"
+"DESC: Reactivate an LV using the latest metadata.\n"
+"lvchange --monitor Bool VG|LV|Tag|Select ...\n"
+"OO: --poll Bool, OO_LVCHANGE\n"
+"ID: lvchange_monitor\n"
+"DESC: Start or stop monitoring an LV from dmeventd.\n"
+"RULE: all not lv_is_pvmove\n"
+"lvchange --poll Bool VG|LV|Tag|Select ...\n"
+"OO: --monitor Bool, OO_LVCHANGE\n"
+"ID: lvchange_poll\n"
+"DESC: Start or stop processing an LV conversion.\n"
+"lvchange --persistent y --minor Number LV\n"
+"OO: --major Number, OO_LVCHANGE\n"
+"ID: lvchange_persistent\n"
+"DESC: Make the minor device number persistent for an LV.\n"
+"RULE: all not LV_thinpool LV_cachepool\n"
+"OO_LVCONVERT_RAID: --mirrors SNumber, --stripes_long Number,\n"
+"--stripesize SizeKB, --regionsize RegionSize, --interval Number\n"
+"OO_LVCONVERT_POOL: --poolmetadata LV, --poolmetadatasize SizeMB,\n"
+"--poolmetadataspare Bool, --readahead Readahead, --chunksize SizeKB\n"
+"OO_LVCONVERT_CACHE: --cachemode CacheMode, --cachepolicy String,\n"
+"--cachesettings String, --zero Bool\n"
+"OO_LVCONVERT: --alloc Alloc, --background, --force, --noudevsync\n"
+"lvconvert --type linear LV\n"
+"OO: OO_LVCONVERT_RAID, OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_raid_types\n"
+"DESC: Convert LV to linear.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"lvconvert --type striped LV\n"
+"OO: OO_LVCONVERT_RAID, OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_raid_types\n"
+"DESC: Convert LV to striped.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"lvconvert --type mirror LV\n"
+"OO: OO_LVCONVERT_RAID, OO_LVCONVERT, --mirrorlog MirrorLog\n"
+"OP: PV ...\n"
+"ID: lvconvert_raid_types\n"
+"DESC: Convert LV to type mirror (also see type raid1),\n"
+"DESC: (also see lvconvert --mirrors).\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvconvert --type raid LV\n"
+"OO: OO_LVCONVERT_RAID, OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_raid_types\n"
+"DESC: Convert LV to raid or change raid layout\n"
+"DESC: (a specific raid level must be used, e.g. raid1).\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"lvconvert --mirrors SNumber LV\n"
+"OO: OO_LVCONVERT_RAID, OO_LVCONVERT, --mirrorlog MirrorLog\n"
+"OP: PV ...\n"
+"ID: lvconvert_raid_types\n"
+"DESC: Convert LV to raid1 or mirror, or change number of mirror images.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"lvconvert --stripes_long Number LV_raid\n"
+"OO: OO_LVCONVERT, --interval Number, --regionsize RegionSize, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"ID: lvconvert_raid_types\n"
+"DESC: Convert raid LV to change number of stripe images.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"RULE: all not LV_raid0 LV_raid1\n"
+"lvconvert --stripesize SizeKB LV_raid\n"
+"OO: OO_LVCONVERT, --interval Number, --regionsize RegionSize\n"
+"ID: lvconvert_raid_types\n"
+"DESC: Convert raid LV to change the stripe size.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"RULE: all not LV_raid0 LV_raid1\n"
+"lvconvert --regionsize RegionSize LV_raid\n"
+"OO: OO_LVCONVERT\n"
+"ID: lvconvert_change_region_size\n"
+"DESC: Change the region size of an LV.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"RULE: all not LV_raid0\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvconvert --splitmirrors Number --name LV_new LV_raid1_mirror_cache\n"
+"OO: OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_split_mirror_images\n"
+"DESC: Split images from a raid1 or mirror LV and use them to create a new LV.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"lvconvert --splitmirrors Number --trackchanges LV_raid1_cache\n"
+"OO: OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_split_mirror_images\n"
+"DESC: Split images from a raid1 LV and track changes to origin.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"lvconvert --mergemirrors LV_linear_raid|VG|Tag ...\n"
+"OO: OO_LVCONVERT\n"
+"ID: lvconvert_merge_mirror_images\n"
+"DESC: Merge LV images that were split from a raid1 LV.\n"
+"RULE: all not lv_is_locked lv_is_pvmove lv_is_merging_origin lv_is_virtual_origin lv_is_external_origin lv_is_merging_cow\n"
+"lvconvert --mirrorlog MirrorLog LV_mirror\n"
+"OO: OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_change_mirrorlog\n"
+"DESC: Change the type of mirror log used by a mirror LV.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvconvert --type thin --thinpool LV LV_linear_striped_raid_cache\n"
+"OO: --thin, --originname LV_new, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT\n"
+"ID: lvconvert_to_thin_with_external\n"
+"DESC: Convert LV to a thin LV, using the original LV as an external origin.\n"
+"RULE: all and lv_is_visible\n"
+"RULE: all not lv_is_locked\n"
+"lvconvert --thin --thinpool LV LV_linear_striped_raid_cache\n"
+"OO: --type thin, --originname LV_new, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT\n"
+"ID: lvconvert_to_thin_with_external\n"
+"DESC: Convert LV to a thin LV, using the original LV as an external origin\n"
+"DESC: (infers --type thin).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"RULE: all and lv_is_visible\n"
+"RULE: all not lv_is_locked\n"
+"lvconvert --type cache --cachepool LV LV_linear_striped_raid_thinpool\n"
+"OO: --cache, OO_LVCONVERT_CACHE, OO_LVCONVERT_POOL, OO_LVCONVERT\n"
+"ID: lvconvert_to_cache_vol\n"
+"DESC: Convert LV to type cache.\n"
+"RULE: all and lv_is_visible\n"
+"lvconvert --cache --cachepool LV LV_linear_striped_raid_thinpool\n"
+"OO: --type cache, OO_LVCONVERT_CACHE, OO_LVCONVERT_POOL, OO_LVCONVERT\n"
+"ID: lvconvert_to_cache_vol\n"
+"DESC: Convert LV to type cache (infers --type cache).\n"
+"RULE: all and lv_is_visible\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvconvert --type thin-pool LV_linear_striped_raid_cache\n"
+"OO: --stripes_long Number, --stripesize SizeKB,\n"
+"--discards Discards, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_to_thinpool\n"
+"DESC: Convert LV to type thin-pool.\n"
+"RULE: all and lv_is_visible\n"
+"RULE: all not lv_is_locked lv_is_origin lv_is_merging_origin lv_is_external_origin lv_is_virtual\n"
+"lvconvert --thinpool LV_linear_striped_raid_cache_thinpool\n"
+"OO: --type thin-pool, --stripes_long Number, --stripesize SizeKB,\n"
+"--discards Discards, --zero Bool, OO_LVCONVERT_POOL, OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_to_thinpool_or_swap_metadata\n"
+"DESC: Convert LV to type thin-pool (variant, use --type thin-pool).\n"
+"DESC: Swap metadata LV in a thin pool (variant, use --swapmetadata).\n"
+"FLAGS: PREVIOUS_SYNTAX\n"
+"lvconvert --type cache-pool LV_linear_striped_raid\n"
+"OO: OO_LVCONVERT_CACHE, OO_LVCONVERT_POOL, OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_to_cachepool\n"
+"DESC: Convert LV to type cache-pool.\n"
+"lvconvert --cachepool LV_linear_striped_raid_cachepool\n"
+"OO: --type cache-pool, OO_LVCONVERT_CACHE, OO_LVCONVERT_POOL, OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_to_cachepool_or_swap_metadata\n"
+"DESC: Convert LV to type cache-pool (variant, use --type cache-pool).\n"
+"DESC: Swap metadata LV in a cache pool (variant, use --swapmetadata).\n"
+"FLAGS: PREVIOUS_SYNTAX\n"
+"lvconvert --splitcache LV_cachepool_cache_thinpool\n"
+"OO: OO_LVCONVERT\n"
+"ID: lvconvert_split_and_keep_cachepool\n"
+"DESC: Separate and keep the cache pool from a cache LV.\n"
+"lvconvert --uncache LV_cache_thinpool\n"
+"OO: OO_LVCONVERT\n"
+"ID: lvconvert_split_and_remove_cachepool\n"
+"DESC: Separate and delete the cache pool from a cache LV.\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvconvert --swapmetadata --poolmetadata LV LV_thinpool_cachepool\n"
+"OO: --chunksize SizeKB, OO_LVCONVERT\n"
+"ID: lvconvert_swap_pool_metadata\n"
+"DESC: Swap metadata LV in a thin pool or cache pool (for repair only).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvconvert --merge LV_linear_striped_raid_thin_snapshot|VG|Tag ...\n"
+"OO: --background, --interval Number, OO_LVCONVERT\n"
+"ID: lvconvert_merge\n"
+"DESC: Merge LV that was split from a mirror (variant, use --mergemirrors).\n"
+"DESC: Merge thin LV into its origin LV (variant, use --mergethin).\n"
+"DESC: Merge COW snapshot LV into its origin (variant, use --mergesnapshot).\n"
+"RULE: all not lv_is_locked lv_is_pvmove lv_is_merging_origin lv_is_virtual_origin lv_is_external_origin lv_is_merging_cow\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvconvert --mergethin LV_thin ...\n"
+"OO: OO_LVCONVERT\n"
+"ID: lvconvert_merge_thin\n"
+"DESC: Merge thin LV into its origin LV.\n"
+"RULE: all not lv_is_locked lv_is_pvmove lv_is_merging_origin lv_is_virtual_origin lv_is_external_origin lv_is_merging_cow\n"
+"RULE: all and lv_is_visible\n"
+"lvconvert --mergesnapshot LV_snapshot ...\n"
+"OO: --background, --interval Number, OO_LVCONVERT\n"
+"ID: lvconvert_merge_snapshot\n"
+"DESC: Merge COW snapshot LV into its origin.\n"
+"RULE: all not lv_is_locked lv_is_pvmove lv_is_merging_origin lv_is_virtual_origin lv_is_external_origin lv_is_merging_cow\n"
+"RULE: all and lv_is_visible\n"
+"lvconvert --splitsnapshot LV_snapshot\n"
+"OO: OO_LVCONVERT\n"
+"ID: lvconvert_split_cow_snapshot\n"
+"DESC: Separate a COW snapshot from its origin LV.\n"
+"RULE: all not lv_is_locked lv_is_pvmove lv_is_origin lv_is_external_origin lv_is_merging_cow\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvconvert --type snapshot LV LV_linear\n"
+"OO: --snapshot, --chunksize SizeKB, --zero Bool, OO_LVCONVERT\n"
+"ID: lvconvert_combine_split_snapshot\n"
+"DESC: Combine a former COW snapshot (second arg) with a former\n"
+"DESC: origin LV (first arg) to reverse a splitsnapshot command.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"RULE: all and lv_is_visible\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvconvert --snapshot LV LV_linear\n"
+"OO: --type snapshot, --chunksize SizeKB, --zero Bool, OO_LVCONVERT\n"
+"ID: lvconvert_combine_split_snapshot\n"
+"DESC: Combine a former COW snapshot (second arg) with a former\n"
+"DESC: origin LV (first arg) to reverse a splitsnapshot command.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"RULE: all and lv_is_visible\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvconvert --repair LV_raid_mirror_thinpool\n"
+"OO: --usepolicies, --interval Number, OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_repair_pvs_or_thinpool\n"
+"DESC: Replace failed PVs in a raid or mirror LV.\n"
+"DESC: Repair a thin pool.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"lvconvert --replace PV LV_raid\n"
+"OO: OO_LVCONVERT\n"
+"OP: PV ...\n"
+"ID: lvconvert_replace_pv\n"
+"DESC: Replace specific PV(s) in a raid LV with another PV.\n"
+"RULE: all not lv_is_locked lv_is_pvmove\n"
+"lvconvert --startpoll LV_mirror_raid\n"
+"OO: OO_LVCONVERT\n"
+"ID: lvconvert_start_poll\n"
+"DESC: Poll LV to continue conversion.\n"
+"RULE: all and lv_is_converting\n"
+"lvconvert LV_mirror_raid\n"
+"OO: OO_LVCONVERT\n"
+"ID: lvconvert_start_poll\n"
+"DESC: Poll LV to continue conversion (also see --startpoll).\n"
+"RULE: all and lv_is_converting\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"OO_LVCREATE: --addtag Tag, --alloc Alloc, --autobackup Bool, --activate Active,\n"
+"--contiguous Bool, --ignoreactivationskip, --ignoremonitoring, --major Number,\n"
+"--metadataprofile String, --minor Number, --monitor Bool, --name String, --nosync,\n"
+"--noudevsync, --permission Permission, --persistent Bool, --readahead Readahead,\n"
+"--reportformat ReportFmt, --setactivationskip Bool, --wipesignatures Bool,\n"
+"--zero Bool\n"
+"OO_LVCREATE_CACHE: --cachemode CacheMode, --cachepolicy String, --cachesettings String,\n"
+"--chunksize SizeKB\n"
+"OO_LVCREATE_POOL: --poolmetadatasize SizeMB, --poolmetadataspare Bool, --chunksize SizeKB\n"
+"OO_LVCREATE_THIN: --discards Discards, --errorwhenfull Bool\n"
+"OO_LVCREATE_RAID: --mirrors SNumber, --stripes Number, --stripesize SizeKB,\n"
+"--regionsize RegionSize, --minrecoveryrate SizeKB, --maxrecoveryrate SizeKB\n"
+"lvcreate --type error --size SizeMB VG\n"
+"OO: OO_LVCREATE\n"
+"ID: lvcreate_error_vol\n"
+"DESC: Create an LV that returns errors when used.\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type zero --size SizeMB VG\n"
+"OO: OO_LVCREATE\n"
+"ID: lvcreate_zero_vol\n"
+"DESC: Create an LV that returns zeros when read.\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type linear --size SizeMB VG\n"
+"OO: OO_LVCREATE\n"
+"OP: PV ...\n"
+"IO: --mirrors 0, --stripes 1\n"
+"ID: lvcreate_linear\n"
+"DESC: Create a linear LV.\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --size SizeMB VG\n"
+"OO: --type linear, OO_LVCREATE\n"
+"OP: PV ...\n"
+"IO: --mirrors 0, --stripes 1\n"
+"ID: lvcreate_linear\n"
+"DESC: Create a linear LV.\n"
+"lvcreate --type striped --size SizeMB VG\n"
+"OO: --stripes Number, --stripesize SizeKB, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_striped\n"
+"DESC: Create a striped LV (also see lvcreate --stripes).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --stripes Number --size SizeMB VG\n"
+"OO: --type striped, --stripesize SizeKB, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_striped\n"
+"DESC: Create a striped LV (infers --type striped).\n"
+"lvcreate --type mirror --size SizeMB VG\n"
+"OO: --mirrors SNumber, --mirrorlog MirrorLog, --regionsize RegionSize, --stripes Number, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_mirror\n"
+"DESC: Create a mirror LV (also see --type raid1).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --mirrors SNumber --size SizeMB VG\n"
+"OO: --type raid1, --type mirror, --mirrorlog MirrorLog, --stripes Number, OO_LVCREATE_RAID, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_mirror_or_raid1\n"
+"DESC: Create a raid1 or mirror LV (infers --type raid1|mirror).\n"
+"lvcreate --type raid --size SizeMB VG\n"
+"OO: OO_LVCREATE_RAID, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_raid_any\n"
+"DESC: Create a raid LV (a specific raid level must be used, e.g. raid1).\n"
+"lvcreate --type snapshot --size SizeMB LV\n"
+"OO: --snapshot, --stripes Number, --stripesize SizeKB,\n"
+"--chunksize SizeKB, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_cow_snapshot\n"
+"DESC: Create a COW snapshot LV of an origin LV\n"
+"DESC: (also see --snapshot).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --snapshot --size SizeMB LV\n"
+"OO: --type snapshot, --stripes Number, --stripesize SizeKB,\n"
+"--chunksize SizeKB, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_cow_snapshot\n"
+"DESC: Create a COW snapshot LV of an origin LV.\n"
+"lvcreate --type snapshot --size SizeMB --virtualsize SizeMB VG\n"
+"OO: --snapshot, --chunksize SizeKB, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_cow_snapshot_with_virtual_origin\n"
+"DESC: Create a sparse COW snapshot LV of a virtual origin LV\n"
+"DESC: (also see --snapshot).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --snapshot --size SizeMB --virtualsize SizeMB VG\n"
+"OO: --type snapshot, --chunksize SizeKB, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_cow_snapshot_with_virtual_origin\n"
+"DESC: Create a sparse COW snapshot LV of a virtual origin LV.\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type thin-pool --size SizeMB VG\n"
+"OO: --thinpool LV_new, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thinpool\n"
+"DESC: Create a thin pool.\n"
+"lvcreate --thin --size SizeMB VG\n"
+"OO: --type thin-pool, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thinpool\n"
+"DESC: Create a thin pool (infers --type thin-pool).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --size SizeMB --thinpool LV_new VG\n"
+"OO: --thin, --type thin-pool, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thinpool\n"
+"DESC: Create a thin pool named by the --thinpool arg\n"
+"DESC: (infers --type thin-pool).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type cache-pool --size SizeMB VG\n"
+"OO: --cache, OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_cachepool\n"
+"DESC: Create a cache pool.\n"
+"lvcreate --type cache-pool --size SizeMB --cachepool LV_new VG\n"
+"OO: --cache, OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE\n"
+"OP: PV ...\n"
+"ID: lvcreate_cachepool\n"
+"DESC: Create a cache pool named by the --cachepool arg\n"
+"DESC: (variant, uses --cachepool in place of --name).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type thin --virtualsize SizeMB --thinpool LV_thinpool VG\n"
+"OO: --thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_vol\n"
+"DESC: Create a thin LV in a thin pool.\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type thin --virtualsize SizeMB LV_thinpool\n"
+"OO: --thin, OO_LVCREATE_THIN, OO_LVCREATE\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_vol\n"
+"DESC: Create a thin LV in a thin pool named in the first arg\n"
+"DESC: (variant, also see --thinpool for naming pool).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --virtualsize SizeMB --thinpool LV_thinpool VG\n"
+"OO: --type thin, --thin, OO_LVCREATE_THIN, OO_LVCREATE\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_vol\n"
+"DESC: Create a thin LV in a thin pool (infers --type thin).\n"
+"lvcreate --virtualsize SizeMB LV_thinpool\n"
+"OO: --type thin, --thin, OO_LVCREATE_THIN, OO_LVCREATE\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_vol\n"
+"DESC: Create a thin LV in the thin pool named in the first arg\n"
+"DESC: (variant, infers --type thin, also see --thinpool for\n"
+"DESC: naming pool.)\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type thin LV_thin\n"
+"OO: --thin, OO_LVCREATE_THIN, OO_LVCREATE\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_snapshot\n"
+"DESC: Create a thin LV that is a snapshot of an existing thin LV.\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --thin LV_thin\n"
+"OO: --type thin, OO_LVCREATE_THIN, OO_LVCREATE\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_snapshot\n"
+"DESC: Create a thin LV that is a snapshot of an existing thin LV\n"
+"DESC: (infers --type thin).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --snapshot LV_thin\n"
+"OO: --type thin, OO_LVCREATE_THIN, OO_LVCREATE\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_snapshot\n"
+"DESC: Create a thin LV that is a snapshot of an existing thin LV\n"
+"DESC: (infers --type thin).\n"
+"lvcreate --type thin --thinpool LV_thinpool LV\n"
+"OO: --thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_snapshot_of_external\n"
+"DESC: Create a thin LV that is a snapshot of an external origin LV.\n"
+"lvcreate --snapshot --thinpool LV_thinpool LV\n"
+"OO: --type thin, OO_LVCREATE_THIN, OO_LVCREATE\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_snapshot_of_external\n"
+"DESC: Create a thin LV that is a snapshot of an external origin LV\n"
+"DESC: (infers --type thin).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type thin --virtualsize SizeMB --size SizeMB --thinpool LV_new\n"
+"OO: --thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_vol_and_thinpool\n"
+"DESC: Create a thin LV, first creating a thin pool for it,\n"
+"DESC: where the new thin pool is named by the --thinpool arg.\n"
+"lvcreate --thin --virtualsize SizeMB --size SizeMB --thinpool LV_new\n"
+"OO: --type thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_vol_and_thinpool\n"
+"DESC: Create a thin LV, first creating a thin pool for it,\n"
+"DESC: where the new thin pool is named by the --thinpool arg\n"
+"DESC: (variant, infers --type thin).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type thin --virtualsize SizeMB --size SizeMB LV_new|VG\n"
+"OO: --thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_vol_and_thinpool\n"
+"DESC: Create a thin LV, first creating a thin pool for it,\n"
+"DESC: where the new thin pool is named in the first arg,\n"
+"DESC: or the new thin pool name is generated when the first\n"
+"DESC: arg is a VG name.\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --thin --virtualsize SizeMB --size SizeMB LV_new|VG\n"
+"OO: --type thin, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_vol_and_thinpool\n"
+"DESC: Create a thin LV, first creating a thin pool for it,\n"
+"DESC: where the new thin pool is named in the first arg,\n"
+"DESC: or the new thin pool name is generated when the first\n"
+"DESC: arg is a VG name (variant, infers --type thin).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --size SizeMB --virtualsize SizeMB VG\n"
+"OO: --type thin, --type snapshot, --thin, --snapshot, OO_LVCREATE_POOL, OO_LVCREATE_THIN, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"IO: --mirrors 0\n"
+"ID: lvcreate_thin_vol_with_thinpool_or_sparse_snapshot\n"
+"DESC: Create a thin LV, first creating a thin pool for it\n"
+"DESC: (infers --type thin).\n"
+"DESC: Create a sparse snapshot of a virtual origin LV\n"
+"DESC: (infers --type snapshot).\n"
+"DESC: Chooses --type thin or --type snapshot according to\n"
+"DESC: config setting sparse_segtype_default.\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type cache --size SizeMB --cachepool LV_cachepool VG\n"
+"OO: --cache, OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"ID: lvcreate_cache_vol_with_new_origin\n"
+"DESC: Create a cache LV, first creating a new origin LV,\n"
+"DESC: then combining it with the existing cache pool named\n"
+"DESC: by the --cachepool arg.\n"
+"lvcreate --size SizeMB --cachepool LV_cachepool VG\n"
+"OO: --type cache, --cache, OO_LVCREATE_CACHE, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"ID: lvcreate_cache_vol_with_new_origin\n"
+"DESC: Create a cache LV, first creating a new origin LV,\n"
+"DESC: then combining it with the existing cache pool named\n"
+"DESC: by the --cachepool arg (variant, infers --type cache).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --type cache --size SizeMB LV_cachepool\n"
+"OO: --cache, OO_LVCREATE_POOL, OO_LVCREATE_CACHE, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"ID: lvcreate_cache_vol_with_new_origin\n"
+"DESC: Create a cache LV, first creating a new origin LV,\n"
+"DESC: then combining it with the existing cache pool named\n"
+"DESC: in the first arg (variant, also use --cachepool).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvcreate --cache --size SizeMB LV\n"
+"OO: OO_LVCREATE_CACHE, OO_LVCREATE_POOL, OO_LVCREATE,\n"
+"--stripes Number, --stripesize SizeKB\n"
+"OP: PV ...\n"
+"ID: lvcreate_cache_vol_with_new_origin_or_convert_to_cache_vol_with_cachepool\n"
+"DESC: When LV is a cache pool, create a cache LV,\n"
+"DESC: first creating a new origin LV, then combining it with\n"
+"DESC: the existing cache pool named in the first arg\n"
+"DESC: (variant, infers --type cache, also use --cachepool).\n"
+"DESC: When LV is not a cache pool, convert the specified LV\n"
+"DESC: to type cache after creating a new cache pool LV to use\n"
+"DESC: (use lvconvert).\n"
+"FLAGS: SECONDARY_SYNTAX\n"
+"lvdisplay\n"
+"OO: --aligned, --all, --binary, --colon, --columns,\n"
+"--configreport ConfigReport, --foreign, --history, --ignorelockingfailure,\n"
+"--ignoreskippedcluster, --logonly, --maps, --noheadings,\n"
+"--nosuffix, --options String, --sort String, --partial, --readonly,\n"
+"--reportformat ReportFmt, --segments, --select String, --separator String,\n"
+"--shared, --unbuffered, --units Units\n"
+"OP: VG|LV|Tag ...\n"
+"ID: lvdisplay_general\n"
+"lvextend --size PSizeMB LV\n"
+"OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber,\n"
+"--nofsck, --nosync, --noudevsync, --reportformat ReportFmt, --resizefs,\n"
+"--stripes Number, --stripesize SizeKB, --poolmetadatasize PSizeMB,\n"
+"--type SegType\n"
+"OP: PV ...\n"
+"ID: lvextend_by_size\n"
+"DESC: Extend an LV by a specified size.\n"
+"lvextend LV PV ...\n"
+"OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber,\n"
+"--nofsck, --nosync, --noudevsync,\n"
+"--reportformat ReportFmt, --resizefs, --stripes Number, --stripesize SizeKB,\n"
+"--type SegType\n"
+"ID: lvextend_by_pv\n"
+"DESC: Extend an LV by specified PV extents.\n"
+"lvextend --poolmetadatasize PSizeMB LV_thinpool\n"
+"OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber,\n"
+"--nofsck, --nosync, --noudevsync,\n"
+"--reportformat ReportFmt, --stripes Number, --stripesize SizeKB,\n"
+"--type SegType\n"
+"OP: PV ...\n"
+"ID: lvextend_pool_metadata_by_size\n"
+"DESC: Extend a pool metadata SubLV by a specified size.\n"
+"lvextend --usepolicies LV_thinpool_snapshot\n"
+"OO: --alloc Alloc, --autobackup Bool, --force, --mirrors SNumber,\n"
+"--nofsck, --nosync, --noudevsync,\n"
+"--reportformat ReportFmt, --resizefs,\n"
+"--type SegType\n"
+"OP: PV ...\n"
+"ID: lvextend_by_policy\n"
+"DESC: Extend an LV according to a predefined policy.\n"
+"lvmconfig\n"
+"OO: OO_CONFIG\n"
+"OP: String ...\n"
+"ID: lvmconfig_general\n"
+"lvreduce --size NSizeMB LV\n"
+"OO: --autobackup Bool, --force, --nofsck, --noudevsync,\n"
+"--reportformat ReportFmt, --resizefs\n"
+"ID: lvreduce_general\n"
+"lvremove VG|LV|Tag|Select ...\n"
+"OO: --autobackup Bool, --force, --nohistory, --noudevsync,\n"
+"--reportformat ReportFmt, --select String\n"
+"ID: lvremove_general\n"
+"lvrename VG LV LV_new\n"
+"OO: --autobackup Bool, --noudevsync, --reportformat ReportFmt\n"
+"ID: lvrename_vg_lv_lv\n"
+"lvrename LV LV_new\n"
+"OO: --autobackup Bool, --noudevsync, --reportformat ReportFmt\n"
+"ID: lvrename_lv_lv\n"
+"lvresize --size SSizeMB LV\n"
+"OO: --alloc Alloc, --autobackup Bool, --force,\n"
+"--nofsck, --nosync, --noudevsync, --reportformat ReportFmt, --resizefs,\n"
+"--stripes Number, --stripesize SizeKB, --poolmetadatasize PSizeMB,\n"
+"--type SegType\n"
+"OP: PV ...\n"
+"ID: lvresize_by_size\n"
+"DESC: Resize an LV by a specified size.\n"
+"lvresize LV PV ...\n"
+"OO: --alloc Alloc, --autobackup Bool, --force,\n"
+"--nofsck, --nosync, --noudevsync,\n"
+"--reportformat ReportFmt, --resizefs, --stripes Number, --stripesize SizeKB,\n"
+"--type SegType\n"
+"ID: lvresize_by_pv\n"
+"DESC: Resize an LV by specified PV extents.\n"
+"lvresize --poolmetadatasize PSizeMB LV_thinpool\n"
+"OO: --alloc Alloc, --autobackup Bool, --force,\n"
+"--nofsck, --nosync, --noudevsync,\n"
+"--reportformat ReportFmt, --stripes Number, --stripesize SizeKB,\n"
+"--type SegType\n"
+"OP: PV ...\n"
+"ID: lvresize_pool_metadata_by_size\n"
+"DESC: Resize a pool metadata SubLV by a specified size.\n"
+"lvs\n"
+"OO: --history, --segments, OO_REPORT\n"
+"OP: VG|LV|Tag ...\n"
+"ID: lvs_general\n"
+"lvscan\n"
+"OO: --all, --blockdevice, --ignorelockingfailure, --partial,\n"
+"--readonly, --reportformat ReportFmt\n"
+"ID: lvscan_general\n"
+"lvscan --cache_long\n"
+"OO: --blockdevice, --ignorelockingfailure, --partial,\n"
+"--readonly, --reportformat ReportFmt\n"
+"OP: LV ...\n"
+"ID: lvscan_cache\n"
+"OO_PVCHANGE: --autobackup Bool, --force, --ignoreskippedcluster,\n"
+"--reportformat ReportFmt, --uuid\n"
+"OO_PVCHANGE_META: --allocatable Bool, --addtag Tag, --deltag Tag,\n"
+"--uuid, --metadataignore Bool\n"
+"pvchange OO_PVCHANGE_META --all\n"
+"OO: OO_PVCHANGE\n"
+"ID: pvchange_properties_all\n"
+"DESC: Change properties of all PVs.\n"
+"pvchange OO_PVCHANGE_META PV|Select ...\n"
+"OO: --select String, OO_PVCHANGE\n"
+"ID: pvchange_properties_some\n"
+"DESC: Change properties of specified PVs.\n"
+"pvresize PV ...\n"
+"OO: --setphysicalvolumesize SizeMB, --reportformat ReportFmt\n"
+"ID: pvresize_general\n"
+"pvck PV ...\n"
+"OO: --labelsector Number\n"
+"ID: pvck_general\n"
+"pvcreate PV ...\n"
+"OO: --dataalignment SizeKB, --dataalignmentoffset SizeKB, --bootloaderareasize SizeMB,\n"
+"--force, --labelsector Number, --metadatatype MetadataType,\n"
+"--pvmetadatacopies MetadataCopiesPV, --metadatasize SizeMB,\n"
+"--metadataignore Bool, --norestorefile, --setphysicalvolumesize SizeMB,\n"
+"--reportformat ReportFmt, --restorefile String, --uuidstr String, --zero Bool\n"
+"ID: pvcreate_general\n"
+"pvdisplay\n"
+"OO: --aligned, --all, --binary, --colon, --columns, --configreport ConfigReport,\n"
+"--foreign, --ignorelockingfailure, --ignoreskippedcluster,\n"
+"--logonly, --maps, --noheadings, --nosuffix, --options String,\n"
+"--readonly, --reportformat ReportFmt, --select String, --separator String, --shared,\n"
+"--short, --sort String, --unbuffered, --units Units\n"
+"OP: PV|Tag ...\n"
+"ID: pvdisplay_general\n"
+"pvmove PV\n"
+"OO: --abort, --alloc Alloc, --atomic, --autobackup Bool, --background,\n"
+"--interval Number, --name LV, --noudevsync, --reportformat ReportFmt\n"
+"OP: PV ...\n"
+"ID: pvmove_one\n"
+"DESC: Move PV extents.\n"
+"pvmove\n"
+"OO: --abort, --background, --interval Number\n"
+"ID: pvmove_any\n"
+"DESC: Continue or abort existing pvmove operations.\n"
+"pvremove PV ...\n"
+"OO: --force, --reportformat ReportFmt\n"
+"ID: pvremove_general\n"
+"pvs\n"
+"OO: --segments, OO_REPORT\n"
+"OP: PV|Tag ...\n"
+"ID: pvs_general\n"
+"pvscan\n"
+"OO: --ignorelockingfailure, --reportformat ReportFmt, --exported, --novolumegroup,\n"
+"--short, --uuid\n"
+"ID: pvscan_show\n"
+"DESC: Display PV information.\n"
+"pvscan --cache_long\n"
+"OO: --ignorelockingfailure, --reportformat ReportFmt, --background,\n"
+"--activate Active, --major Number, --minor Number\n"
+"OP: PV|String ...\n"
+"ID: pvscan_cache\n"
+"DESC: Populate the lvmetad cache by scanning PVs.\n"
+"vgcfgbackup\n"
+"OO: --file String, --foreign, --ignorelockingfailure, --partial, --readonly,\n"
+"--reportformat ReportFmt\n"
+"OP: VG ...\n"
+"ID: vgcfgbackup_general\n"
+"OO_VGCFGRESTORE: --force_long, --metadatatype MetadataType\n"
+"vgcfgrestore VG\n"
+"OO: OO_VGCFGRESTORE\n"
+"ID: vgcfgrestore_by_vg\n"
+"DESC: Restore VG metadata from last backup.\n"
+"vgcfgrestore --file String VG\n"
+"OO: OO_VGCFGRESTORE\n"
+"ID: vgcfgrestore_by_file\n"
+"DESC: Restore VG metadata from specified file.\n"
+"vgcfgrestore --list VG\n"
+"OO: OO_VGCFGRESTORE\n"
+"ID: vgcfgrestore_list_by_vg\n"
+"DESC: List all VG metadata backups.\n"
+"vgcfgrestore --list --file String\n"
+"OO: OO_VGCFGRESTORE\n"
+"OP: VG\n"
+"ID: vgcfgrestore_list_by_file\n"
+"DESC: List one VG metadata backup file.\n"
+"OO_VGCHANGE: --autobackup Bool, --ignoremonitoring, --ignoreskippedcluster,\n"
+"--noudevsync, --reportformat ReportFmt, --select String, --force\n"
+"OO_VGCHANGE_META: --addtag Tag, --deltag Tag,\n"
+"--logicalvolume Uint32, --maxphysicalvolumes Uint32, --alloc Alloc, --uuid,\n"
+"--clustered Bool, --pvmetadatacopies MetadataCopiesPV, --vgmetadatacopies MetadataCopiesVG,\n"
+"--physicalextentsize SizeMB, --resizeable Bool, --systemid String, --locktype LockType,\n"
+"--profile String, --detachprofile, --metadataprofile String\n"
+"vgchange OO_VGCHANGE_META\n"
+"OO: OO_VGCHANGE\n"
+"OP: VG|Tag|Select ...\n"
+"ID: vgchange_properties\n"
+"DESC: Change a general VG attribute.\n"
+"DESC: For options listed in parentheses, any one is\n"
+"DESC: required, after which the others are optional.\n"
+"vgchange --monitor Bool\n"
+"OO: --sysinit, --ignorelockingfailure, --poll Bool, OO_VGCHANGE\n"
+"OP: VG|Tag|Select ...\n"
+"ID: vgchange_monitor\n"
+"DESC: Start or stop monitoring LVs from dmeventd.\n"
+"vgchange --poll Bool\n"
+"OO: --ignorelockingfailure, OO_VGCHANGE\n"
+"OP: VG|Tag|Select ...\n"
+"ID: vgchange_poll\n"
+"DESC: Start or stop processing LV conversions.\n"
+"vgchange --activate Active\n"
+"OO: --activationmode ActivationMode, --ignoreactivationskip, --partial, --sysinit,\n"
+"--ignorelockingfailure, --monitor Bool, --poll Bool, OO_VGCHANGE\n"
+"OP: VG|Tag|Select ...\n"
+"ID: vgchange_activate\n"
+"DESC: Activate or deactivate LVs.\n"
+"vgchange --refresh\n"
+"OO: --sysinit, --ignorelockingfailure, --monitor Bool, --poll Bool, OO_VGCHANGE\n"
+"OP: VG|Tag|Select ...\n"
+"ID: vgchange_refresh\n"
+"DESC: Reactivate LVs using the latest metadata.\n"
+"vgchange --lockstart\n"
+"OO: --lockopt String, OO_VGCHANGE\n"
+"OP: VG|Tag|Select ...\n"
+"ID: vgchange_lockstart\n"
+"DESC: Start the lockspace of a shared VG in lvmlockd.\n"
+"vgchange --lockstop\n"
+"OO: --lockopt String, OO_VGCHANGE\n"
+"OP: VG|Tag|Select ...\n"
+"ID: vgchange_lockstop\n"
+"DESC: Stop the lockspace of a shared VG in lvmlockd.\n"
+"vgck\n"
+"OO: --reportformat ReportFmt\n"
+"OP: VG|Tag ...\n"
+"ID: vgck_general\n"
+"vgconvert VG ...\n"
+"OO: --force, --labelsector Number, --bootloaderareasize SizeMB,\n"
+"--metadatatype MetadataType, --pvmetadatacopies MetadataCopiesPV,\n"
+"--metadatasize SizeMB, --reportformat ReportFmt\n"
+"ID: vgconvert_general\n"
+"vgcreate VG_new PV ...\n"
+"OO: --addtag Tag, --alloc Alloc, --autobackup Bool, --clustered Bool, --maxlogicalvolumes Uint32,\n"
+"--maxphysicalvolumes Uint32, --metadataprofile String, --metadatatype MetadataType,\n"
+"--physicalextentsize SizeMB, --force, --zero Bool, --labelsector Number,\n"
+"--metadatasize SizeMB, --pvmetadatacopies MetadataCopiesPV, --vgmetadatacopies MetadataCopiesVG,\n"
+"--reportformat ReportFmt, --dataalignment SizeKB, --dataalignmentoffset SizeKB,\n"
+"--shared, --systemid String, --locktype LockType, --lockopt String\n"
+"ID: vgcreate_general\n"
+"vgdisplay\n"
+"OO: --activevolumegroups, --aligned, --binary, --colon, --columns,\n"
+"--configreport ConfigReport, --foreign, --ignorelockingfailure,\n"
+"--ignoreskippedcluster, --logonly, --noheadings, --nosuffix,\n"
+"--options String, --partial, --readonly, --reportformat ReportFmt, --select String,\n"
+"--shared, --short, --separator String, --sort String, --unbuffered, --units Units\n"
+"OP: VG|Tag ...\n"
+"ID: vgdisplay_general\n"
+"OO_VGEXPORT: --reportformat ReportFmt\n"
+"vgexport VG|Tag|Select ...\n"
+"OO: --select String, OO_VGEXPORT\n"
+"ID: vgexport_some\n"
+"DESC: Export specified VGs.\n"
+"vgexport --all\n"
+"OO: OO_VGEXPORT\n"
+"ID: vgexport_all\n"
+"DESC: Export all VGs.\n"
+"vgextend VG PV ...\n"
+"OO: --autobackup Bool,\n"
+"--force, --zero Bool, --labelsector Number, --metadatatype MetadataType,\n"
+"--metadatasize SizeMB, --pvmetadatacopies MetadataCopiesPV,\n"
+"--metadataignore Bool, --dataalignment SizeKB, --dataalignmentoffset SizeKB,\n"
+"--reportformat ReportFmt, --restoremissing\n"
+"ID: vgextend_general\n"
+"OO_VGIMPORT: --force, --reportformat ReportFmt\n"
+"vgimport VG|Tag|Select ...\n"
+"OO: --select String, OO_VGIMPORT\n"
+"ID: vgimport_some\n"
+"DESC: Import specified VGs.\n"
+"vgimport --all\n"
+"OO: OO_VGIMPORT\n"
+"ID: vgimport_all\n"
+"DESC: Import all VGs.\n"
+"vgimportclone PV ...\n"
+"OO: --basevgname VG, --import\n"
+"ID: vgimportclone_general\n"
+"vgmerge VG VG\n"
+"OO: --autobackup Bool, --list\n"
+"ID: vgmerge_general\n"
+"vgmknodes\n"
+"OO: --ignorelockingfailure, --refresh, --reportformat ReportFmt\n"
+"OP: VG|LV|Tag ...\n"
+"ID: vgmknodes_general\n"
+"OO_VGREDUCE: --autobackup Bool, --force, --reportformat ReportFmt\n"
+"vgreduce VG PV ...\n"
+"OO: OO_VGREDUCE\n"
+"ID: vgreduce_by_pv\n"
+"DESC: Remove a PV from a VG.\n"
+"vgreduce --all VG\n"
+"OO: OO_VGREDUCE\n"
+"ID: vgreduce_all\n"
+"DESC: Remove all unused PVs from a VG.\n"
+"vgreduce --removemissing VG\n"
+"OO: --mirrorsonly, OO_VGREDUCE\n"
+"ID: vgreduce_missing\n"
+"DESC: Remove all missing PVs from a VG.\n"
+"vgremove VG|Tag|Select ...\n"
+"OO: --force, --noudevsync, --reportformat ReportFmt, --select String\n"
+"ID: vgremove_general\n"
+"vgrename VG VG_new\n"
+"OO: --autobackup Bool, --force, --reportformat ReportFmt\n"
+"ID: vgrename_by_name\n"
+"DESC: Rename a VG.\n"
+"vgrename String VG_new\n"
+"OO: --autobackup Bool, --force, --reportformat ReportFmt\n"
+"ID: vgrename_by_uuid\n"
+"DESC: Rename a VG by specifying the VG UUID.\n"
+"vgs\n"
+"OO: OO_REPORT\n"
+"OP: VG|Tag ...\n"
+"ID: vgs_general\n"
+"vgscan\n"
+"OO: --cache_long, --ignorelockingfailure, --mknodes, --notifydbus,\n"
+"--partial, --reportformat ReportFmt\n"
+"ID: vgscan_general\n"
+"OO_VGSPLIT: --autobackup Bool\n"
+"OO_VGSPLIT_NEW: --alloc Alloc, --clustered Bool,\n"
+"--maxlogicalvolumes Uint32, --maxphysicalvolumes Uint32,\n"
+"--metadatatype MetadataType, --vgmetadatacopies MetadataCopiesVG\n"
+"vgsplit VG VG PV ...\n"
+"OO: OO_VGSPLIT, OO_VGSPLIT_NEW\n"
+"ID: vgsplit_by_pv\n"
+"DESC: Split a VG by specified PVs.\n"
+"vgsplit --name LV VG VG\n"
+"OO: OO_VGSPLIT, OO_VGSPLIT_NEW\n"
+"ID: vgsplit_by_lv\n"
+"DESC: Split a VG by PVs in a specified LV.\n"
+"config\n"
+"OO: OO_CONFIG\n"
+"OP: String ...\n"
+"ID: lvmconfig_general\n"
+"dumpconfig\n"
+"OO: OO_CONFIG\n"
+"OP: String ...\n"
+"ID: lvmconfig_general\n"
+"devtypes\n"
+"OO: --aligned, --binary, --nameprefixes, --noheadings,\n"
+"--nosuffix, --options String, --reportformat ReportFmt, --rows,\n"
+"--select String, --separator String, --sort String, --unbuffered, --unquoted\n"
+"ID: devtypes_general\n"
+"fullreport\n"
+"OO: OO_REPORT\n"
+"OP: VG ...\n"
+"ID: fullreport_general\n"
+"lastlog\n"
+"OO: --reportformat ReportFmt, --select String\n"
+"ID: lastlog_general\n"
+"lvpoll --polloperation PollOp LV ...\n"
+"OO: --abort, --autobackup Bool, --handlemissingpvs, --interval Number\n"
+"ID: lvpoll_general\n"
+"formats\n"
+"ID: formats_general\n"
+"help\n"
+"OP: String ...\n"
+"ID: help_general\n"
+"version\n"
+"ID: version_general\n"
+"pvdata\n"
+"ID: pvdata_general\n"
+"segtypes\n"
+"ID: segtypes_general\n"
+"systemid\n"
+"ID: systemid_general\n"
+"tags\n"
+"ID: tags_general\n"
+"lvmchange\n"
+"ID: lvmchange_general\n"
+"lvmdiskscan\n"
+"OO: --lvmpartition, --readonly\n"
+"ID: lvmdiskscan_general\n"
+"lvmsadc\n"
+"ID: lvmsadc_general\n"
+"lvmsar\n"
+"OO: --full, --stdin\n"
+"ID: lvmsar_general\n"
+"\n";
diff --git a/tools/dmsetup.c b/tools/dmsetup.c
index eaeb1ce..945557f 100644
--- a/tools/dmsetup.c
+++ b/tools/dmsetup.c
@@ -5004,6 +5004,8 @@ static int _stats_check_filemap_switches(void)
static dm_filemapd_mode_t _stats_get_filemapd_mode(void)
{
+ if (_switches[NOMONITOR_ARG] || _switches[NOGROUP_ARG])
+ return DM_FILEMAPD_FOLLOW_NONE;
if (!_switches[FOLLOW_ARG])
return DM_FILEMAPD_FOLLOW_INODE;
return dm_filemapd_mode_from_string(_string_args[FOLLOW_ARG]);
@@ -5073,9 +5075,9 @@ static int _stats_create_file(CMD_ARGS)
precise = _int_args[PRECISE_ARG];
group = !_switches[NOGROUP_ARG];
- if (!_switches[NOMONITOR_ARG] && group)
- if ((mode = _stats_get_filemapd_mode()) == -1)
- goto bad;
+ mode = _stats_get_filemapd_mode();
+ if (!_switches[NOMONITOR_ARG] && (mode == DM_FILEMAPD_FOLLOW_NONE))
+ goto bad;
if (!(dms = dm_stats_create(DM_STATS_PROGRAM_ID)))
goto_bad;
@@ -5681,9 +5683,9 @@ static int _stats_update_file(CMD_ARGS)
group_id = (uint64_t) _int_args[GROUP_ID_ARG];
- if (!_switches[NOMONITOR_ARG])
- if ((mode = _stats_get_filemapd_mode()) < 0)
- goto bad;
+ mode = _stats_get_filemapd_mode();
+ if (!_switches[NOMONITOR_ARG] && (mode == DM_FILEMAPD_FOLLOW_NONE))
+ goto bad;
if (_switches[PROGRAM_ID_ARG])
program_id = _string_args[PROGRAM_ID_ARG];
6 years, 9 months
master - libdm: move initialisation of group_id in _aggregate_histogram()
by Bryn Reeves
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=146b2582b05b3b4b0f2...
Commit: 146b2582b05b3b4b0f25296620ed2c2ca9e0f467
Parent: 97b6486b2703d8b4d7584caf24f16686dbb9dde2
Author: Bryn M. Reeves <bmr(a)redhat.com>
AuthorDate: Fri Mar 10 11:45:08 2017 +0000
Committer: Bryn M. Reeves <bmr(a)redhat.com>
CommitterDate: Fri Mar 10 11:45:08 2017 +0000
libdm: move initialisation of group_id in _aggregate_histogram()
Older compilers are not able to determine that although group_id
is only assigned in one branch of a conditional, it is never used
used when the other branch is taken:
libdm-stats.c:3319: warning: "group_id" may be used uninitialized in this function
Avoid this by always initialising the variable when it is
declared.
---
libdm/libdm-stats.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index 616c6bb..cff23d8 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -3315,8 +3315,8 @@ static struct dm_histogram *_aggregate_histogram(const struct dm_stats *dms,
uint64_t area_id)
{
struct dm_histogram *dmh_aggr, *dmh_cur, **dmh_cachep;
+ uint64_t group_id = DM_STATS_GROUP_NOT_PRESENT;
int bin, nr_bins, group = 1;
- uint64_t group_id;
size_t hist_size;
if (area_id == DM_STATS_WALK_REGION) {
6 years, 9 months
master - lvmdbustest.py: Correct debug & assert order
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=97b6486b2703d8b4d75...
Commit: 97b6486b2703d8b4d7584caf24f16686dbb9dde2
Parent: ee7946ed82e11b5d22b02b67821661ff3e3a0993
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Thu Mar 9 16:07:14 2017 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Mar 9 16:39:47 2017 -0600
lvmdbustest.py: Correct debug & assert order
If we do the assert first we won't get to the print statement.
---
test/dbus/lvmdbustest.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index 6c928e2..f8a1918 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -1734,10 +1734,10 @@ class TestDbusService(unittest.TestCase):
path = self._lookup(resource_name)
self.assertTrue(path != '/')
else:
- self.assertTrue(ec == 0, "%s exit code = %d" % (operation, ec))
std_err_print(
"%s failed with stdout= %s, stderr= %s" %
(operation, stdout, stderr))
+ self.assertTrue(ec == 0, "%s exit code = %d" % (operation, ec))
def test_external_vg_create(self):
# We need to ensure that if a user creates something outside of lvm
6 years, 9 months
master - lvmdbustest.py: Correct call_lvm doc
by Tony Asleson
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=ee7946ed82e11b5d22b...
Commit: ee7946ed82e11b5d22b02b67821661ff3e3a0993
Parent: 957e283de8298e2bb83517dbf8b724bc733cbbd9
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Thu Mar 9 16:06:24 2017 -0600
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Thu Mar 9 16:39:47 2017 -0600
lvmdbustest.py: Correct call_lvm doc
---
test/dbus/lvmdbustest.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/test/dbus/lvmdbustest.py b/test/dbus/lvmdbustest.py
index 2a65466..6c928e2 100755
--- a/test/dbus/lvmdbustest.py
+++ b/test/dbus/lvmdbustest.py
@@ -119,7 +119,9 @@ def call_lvm(command):
"""
Call lvm executable and return a tuple of exitcode, stdout, stderr
:param command: Command to execute
- :param debug: Dump debug to stdout
+ :type command: list
+ :returns (exitcode, stdout, stderr)
+ :rtype (int, str, str)
"""
# Prepend the full lvm executable so that we can run different versions
6 years, 9 months