summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorKarol Lewandowski <k.lewandowsk@samsung.com>2024-01-23 12:58:00 +0100
committerKarol Lewandowski <k.lewandowsk@samsung.com>2024-01-23 12:58:00 +0100
commitcbab226a74fbaaa43220dee80e8435555c6506ce (patch)
tree1bbd14ec625ea85d0bcc32232d51c1f71e2604d2 /man
parent44a3c2255bc480c82f34db156553a595606d8a0b (diff)
downloaddevice-mapper-sandbox/klewandowski/upstream_2.03.22.tar.gz
device-mapper-sandbox/klewandowski/upstream_2.03.22.tar.bz2
device-mapper-sandbox/klewandowski/upstream_2.03.22.zip
Diffstat (limited to 'man')
-rw-r--r--man/.gitignore2
-rw-r--r--man/Makefile.in317
-rw-r--r--man/blkdeactivate.8.in72
-rw-r--r--man/blkdeactivate.8_main164
-rw-r--r--man/clvmd.8.in125
-rw-r--r--man/cmirrord.8.in30
-rw-r--r--man/cmirrord.8_main46
-rw-r--r--man/dmeventd.8.in59
-rw-r--r--man/dmeventd.8_main179
-rw-r--r--man/dmfilemapd.8_main206
-rw-r--r--man/dmsetup.8.in714
-rw-r--r--man/dmsetup.8_main1100
-rw-r--r--man/dmstats.8_main1244
-rw-r--r--man/fsadm.8.in81
-rw-r--r--man/fsadm.8_main129
-rw-r--r--man/lvchange.8.in169
-rw-r--r--man/lvchange.8_des2
-rw-r--r--man/lvchange.8_end6
-rw-r--r--man/lvchange.8_pregen1047
-rw-r--r--man/lvconvert.8.in307
-rw-r--r--man/lvconvert.8_des71
-rw-r--r--man/lvconvert.8_end121
-rw-r--r--man/lvconvert.8_pregen2040
-rw-r--r--man/lvcreate.8.in381
-rw-r--r--man/lvcreate.8_des46
-rw-r--r--man/lvcreate.8_end107
-rw-r--r--man/lvcreate.8_pregen2377
-rw-r--r--man/lvdisplay.8.in116
-rw-r--r--man/lvdisplay.8_des5
-rw-r--r--man/lvdisplay.8_end0
-rw-r--r--man/lvdisplay.8_pregen460
-rw-r--r--man/lvextend.8.in116
-rw-r--r--man/lvextend.8_des12
-rw-r--r--man/lvextend.8_end22
-rw-r--r--man/lvextend.8_pregen672
-rw-r--r--man/lvm-fullreport.8_des5
-rw-r--r--man/lvm-fullreport.8_end0
-rw-r--r--man/lvm-fullreport.8_pregen447
-rw-r--r--man/lvm-lvpoll.8_des4
-rw-r--r--man/lvm-lvpoll.8_end33
-rw-r--r--man/lvm-lvpoll.8_pregen270
-rw-r--r--man/lvm.8.in402
-rw-r--r--man/lvm.8_main589
-rw-r--r--man/lvm.conf.5.in548
-rw-r--r--man/lvm.conf.5_main224
-rw-r--r--man/lvm_import_vdo.8_main117
-rw-r--r--man/lvmautoactivation.7_main302
-rw-r--r--man/lvmcache.7_main701
-rw-r--r--man/lvmchange.8.in10
-rw-r--r--man/lvmconf.8.in43
-rw-r--r--man/lvmconfig.8_des4
-rw-r--r--man/lvmconfig.8_end0
-rw-r--r--man/lvmconfig.8_pregen463
-rw-r--r--man/lvmdbusd.8_main35
-rw-r--r--man/lvmdevices.8_des102
-rw-r--r--man/lvmdevices.8_end0
-rw-r--r--man/lvmdevices.8_pregen519
-rw-r--r--man/lvmdiskscan.8.in25
-rw-r--r--man/lvmdiskscan.8_des6
-rw-r--r--man/lvmdiskscan.8_end0
-rw-r--r--man/lvmdiskscan.8_pregen252
-rw-r--r--man/lvmdump.8.in74
-rw-r--r--man/lvmdump.8_main126
-rw-r--r--man/lvmetad.8.in51
-rw-r--r--man/lvmlockctl.8_main119
-rw-r--r--man/lvmlockd.8_main888
-rw-r--r--man/lvmpolld.8_main112
-rw-r--r--man/lvmraid.7_main1867
-rw-r--r--man/lvmreport.7_main1882
-rw-r--r--man/lvmsadc.8.in13
-rw-r--r--man/lvmsadc.8_main20
-rw-r--r--man/lvmsar.8.in13
-rw-r--r--man/lvmsar.8_main20
-rw-r--r--man/lvmsystemid.7_main383
-rw-r--r--man/lvmthin.7_main1365
-rw-r--r--man/lvmvdo.7_main448
-rw-r--r--man/lvreduce.8.in99
-rw-r--r--man/lvreduce.8_des18
-rw-r--r--man/lvreduce.8_end6
-rw-r--r--man/lvreduce.8_pregen375
-rw-r--r--man/lvremove.8.in55
-rw-r--r--man/lvremove.8_des26
-rw-r--r--man/lvremove.8_end10
-rw-r--r--man/lvremove.8_pregen332
-rw-r--r--man/lvrename.8.in46
-rw-r--r--man/lvrename.8_des2
-rw-r--r--man/lvrename.8_end10
-rw-r--r--man/lvrename.8_pregen282
-rw-r--r--man/lvresize.8.in102
-rw-r--r--man/lvresize.8_des6
-rw-r--r--man/lvresize.8_end10
-rw-r--r--man/lvresize.8_pregen615
-rw-r--r--man/lvs.8.in194
-rw-r--r--man/lvs.8_des1
-rw-r--r--man/lvs.8_end83
-rw-r--r--man/lvs.8_pregen470
-rw-r--r--man/lvscan.8.in39
-rw-r--r--man/lvscan.8_des5
-rw-r--r--man/lvscan.8_end0
-rw-r--r--man/lvscan.8_pregen282
-rw-r--r--man/pvchange.8.in53
-rw-r--r--man/pvchange.8_des4
-rw-r--r--man/pvchange.8_end7
-rw-r--r--man/pvchange.8_pregen371
-rw-r--r--man/pvck.8.in35
-rw-r--r--man/pvck.8_des136
-rw-r--r--man/pvck.8_end9
-rw-r--r--man/pvck.8_pregen552
-rw-r--r--man/pvcreate.8.in192
-rw-r--r--man/pvcreate.8_des78
-rw-r--r--man/pvcreate.8_end13
-rw-r--r--man/pvcreate.8_pregen473
-rw-r--r--man/pvdisplay.8.in94
-rw-r--r--man/pvdisplay.8_des5
-rw-r--r--man/pvdisplay.8_end0
-rw-r--r--man/pvdisplay.8_pregen465
-rw-r--r--man/pvmove.8.in152
-rw-r--r--man/pvmove.8_des15
-rw-r--r--man/pvmove.8_end93
-rw-r--r--man/pvmove.8_pregen380
-rw-r--r--man/pvremove.8.in33
-rw-r--r--man/pvremove.8_des7
-rw-r--r--man/pvremove.8_end0
-rw-r--r--man/pvremove.8_pregen265
-rw-r--r--man/pvresize.8.in53
-rw-r--r--man/pvresize.8_des2
-rw-r--r--man/pvresize.8_end16
-rw-r--r--man/pvresize.8_pregen260
-rw-r--r--man/pvs.8.in106
-rw-r--r--man/pvs.8_des1
-rw-r--r--man/pvs.8_end10
-rw-r--r--man/pvs.8_pregen464
-rw-r--r--man/pvscan.8.in61
-rw-r--r--man/pvscan.8_des50
-rw-r--r--man/pvscan.8_end0
-rw-r--r--man/pvscan.8_pregen604
-rw-r--r--man/see_also.end74
-rw-r--r--man/vgcfgbackup.8.in31
-rw-r--r--man/vgcfgbackup.8_des16
-rw-r--r--man/vgcfgbackup.8_end0
-rw-r--r--man/vgcfgbackup.8_pregen302
-rw-r--r--man/vgcfgrestore.8.in47
-rw-r--r--man/vgcfgrestore.8_des11
-rw-r--r--man/vgcfgrestore.8_end10
-rw-r--r--man/vgcfgrestore.8_pregen374
-rw-r--r--man/vgchange.8.in213
-rw-r--r--man/vgchange.8_des2
-rw-r--r--man/vgchange.8_end16
-rw-r--r--man/vgchange.8_pregen951
-rw-r--r--man/vgck.8.in18
-rw-r--r--man/vgck.8_des1
-rw-r--r--man/vgck.8_end0
-rw-r--r--man/vgck.8_pregen282
-rw-r--r--man/vgconvert.8.in42
-rw-r--r--man/vgconvert.8_des3
-rw-r--r--man/vgconvert.8_end0
-rw-r--r--man/vgconvert.8_pregen312
-rw-r--r--man/vgcreate.8.in151
-rw-r--r--man/vgcreate.8_des9
-rw-r--r--man/vgcreate.8_end6
-rw-r--r--man/vgcreate.8_pregen495
-rw-r--r--man/vgdisplay.8.in106
-rw-r--r--man/vgdisplay.8_des4
-rw-r--r--man/vgdisplay.8_end0
-rw-r--r--man/vgdisplay.8_pregen437
-rw-r--r--man/vgexport.8.in29
-rw-r--r--man/vgexport.8_des19
-rw-r--r--man/vgexport.8_end0
-rw-r--r--man/vgexport.8_pregen310
-rw-r--r--man/vgextend.8.in67
-rw-r--r--man/vgextend.8_des11
-rw-r--r--man/vgextend.8_end6
-rw-r--r--man/vgextend.8_pregen365
-rw-r--r--man/vgimport.8.in27
-rw-r--r--man/vgimport.8_des5
-rw-r--r--man/vgimport.8_end0
-rw-r--r--man/vgimport.8_pregen305
-rw-r--r--man/vgimportclone.8.in46
-rw-r--r--man/vgimportclone.8_des6
-rw-r--r--man/vgimportclone.8_end9
-rw-r--r--man/vgimportclone.8_pregen268
-rw-r--r--man/vgimportdevices.8_des10
-rw-r--r--man/vgimportdevices.8_end0
-rw-r--r--man/vgimportdevices.8_pregen309
-rw-r--r--man/vgmerge.8.in39
-rw-r--r--man/vgmerge.8_des3
-rw-r--r--man/vgmerge.8_end7
-rw-r--r--man/vgmerge.8_pregen257
-rw-r--r--man/vgmknodes.8.in26
-rw-r--r--man/vgmknodes.8_des5
-rw-r--r--man/vgmknodes.8_end0
-rw-r--r--man/vgmknodes.8_pregen280
-rw-r--r--man/vgreduce.8.in45
-rw-r--r--man/vgreduce.8_des1
-rw-r--r--man/vgreduce.8_end0
-rw-r--r--man/vgreduce.8_pregen383
-rw-r--r--man/vgremove.8.in40
-rw-r--r--man/vgremove.8_des9
-rw-r--r--man/vgremove.8_end0
-rw-r--r--man/vgremove.8_pregen294
-rw-r--r--man/vgrename.8.in54
-rw-r--r--man/vgrename.8_des9
-rw-r--r--man/vgrename.8_end10
-rw-r--r--man/vgrename.8_pregen289
-rw-r--r--man/vgs.8.in115
-rw-r--r--man/vgs.8_des1
-rw-r--r--man/vgs.8_end17
-rw-r--r--man/vgs.8_pregen448
-rw-r--r--man/vgscan.8.in33
-rw-r--r--man/vgscan.8_des1
-rw-r--r--man/vgscan.8_end0
-rw-r--r--man/vgscan.8_pregen267
-rw-r--r--man/vgsplit.8.in78
-rw-r--r--man/vgsplit.8_des14
-rw-r--r--man/vgsplit.8_end0
-rw-r--r--man/vgsplit.8_pregen371
216 files changed, 36025 insertions, 5930 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
diff --git a/man/Makefile.in b/man/Makefile.in
index 8be34c3..8488d30 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -1,6 +1,6 @@
#
# Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
-# Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2004-2017 Red Hat, Inc. All rights reserved.
#
# This file is part of LVM2.
#
@@ -10,100 +10,297 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
-ifeq ("@FSADM@", "yes")
-FSADMMAN = fsadm.8
+ifeq ($(V),1)
+ Q=
else
-FSADMMAN =
+ Q=@
endif
-ifeq ("@BLKDEACTIVATE@", "yes")
+FSADMMAN = fsadm.8
+LVMIMPORTVDOMAN = lvm_import_vdo.8
BLKDEACTIVATEMAN = blkdeactivate.8
-else
-BLKDEACTIVATEMAN =
-endif
-
-ifeq ("@DMEVENTD@", "yes")
DMEVENTDMAN = dmeventd.8
-else
-DMEVENTDMAN =
-endif
-
-ifeq ("@BUILD_LVMETAD@", "yes")
-LVMETAD = lvmetad.8
-else
-LVMETAD =
-endif
+DMFILEMAPDMAN = dmfilemapd.8
+LVMPOLLDMAN = lvmpolld.8
+LVMLOCKDMAN = lvmlockd.8 lvmlockctl.8
+CMIRRORDMAN = cmirrord.8
+LVMDBUSDMAN = lvmdbusd.8
MAN5=lvm.conf.5
-MAN8=lvchange.8 lvconvert.8 lvcreate.8 lvdisplay.8 lvextend.8 lvm.8 \
- lvmchange.8 lvmconf.8 lvmdiskscan.8 lvmdump.8 lvmsadc.8 lvmsar.8 \
- lvreduce.8 lvremove.8 lvrename.8 lvresize.8 lvs.8 \
- lvscan.8 pvchange.8 pvck.8 pvcreate.8 pvdisplay.8 pvmove.8 pvremove.8 \
- pvresize.8 pvs.8 pvscan.8 vgcfgbackup.8 vgcfgrestore.8 vgchange.8 \
- 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 $(FSADMMAN) $(BLKDEACTIVATEMAN) $(LVMETAD)
-
-ifneq ("@CLVMD@", "none")
- MAN8CLUSTER=clvmd.8
+MAN7=lvmsystemid.7 lvmreport.7 lvmraid.7 lvmautoactivation.7
+
+MAN8=lvm.8 lvmdump.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 \
+ lvmsar.8 lvmsadc.8 lvmdiskscan.8 lvmdevices.8 vgimportdevices.8
+MAN8SO=lvm-config.8 lvm-dumpconfig.8
+MAN8DM=dmsetup.8 dmstats.8
+MAN8CLUSTER=
+
+ifeq (,$(findstring $(MAKECMDGOALS), distclean all_man install_all_man))
+ MAN7 += lvmcache.7 lvmthin.7 lvmvdo.7
+ MAN8+=$(FSADMMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(LVMDBUSDMAN) $(LVMIMPORTVDOMAN)
+ MAN8DM+=$(BLKDEACTIVATEMAN) $(DMEVENTDMAN) $(DMFILEMAPDMAN)
+ MAN8CLUSTER+=$(CMIRRORDMAN)
else
- MAN8CLUSTER=
-endif
-ifeq ("@BUILD_CMIRRORD@", "yes")
- MAN8CLUSTER+=cmirrord.8
+ ifeq ("@FSADM@", "yes")
+ MAN8+=$(FSADMMAN)
+ endif
+
+ ifeq ("@LVMIMPORTVDO@", "yes")
+ MAN8+=$(LVMIMPORTVDOMAN)
+ endif
+
+ ifeq ("@BUILD_LVMDBUSD@", "yes")
+ MAN8+=$(LVMDBUSDMAN)
+ endif
+
+ ifeq ("@BUILD_LVMPOLLD@", "yes")
+ MAN8+=$(LVMPOLLDMAN)
+ endif
+
+ ifeq ("@BUILD_LVMLOCKD@", "yes")
+ MAN8+=$(LVMLOCKDMAN)
+ endif
+
+ ifeq ("@BLKDEACTIVATE@", "yes")
+ MAN8DM+=$(BLKDEACTIVATEMAN)
+ endif
+
+ ifeq ("@BUILD_DMEVENTD@", "yes")
+ MAN8DM+=$(DMEVENTDMAN)
+ endif
+
+ ifeq ("@BUILD_DMFILEMAPD@", "yes")
+ MAN8DM+=$(DMFILEMAPDMAN)
+ endif
+
+ ifeq ("@BUILD_CMIRRORD@", "yes")
+ MAN8CLUSTER+=$(CMIRRORDMAN)
+ endif
+
+ ifeq ("@CACHE@", "internal")
+ MAN7 += lvmcache.7
+ else
+ ifeq ("@WRITECACHE@", "internal")
+ MAN7 += lvmcache.7
+ endif
+ endif
+
+ ifeq ("@THIN@", "internal")
+ MAN7 += lvmthin.7
+ endif
+
+ ifeq ("@VDO@", "internal")
+ MAN7 += lvmvdo.7
+ endif
+
endif
-MAN8DM=dmsetup.8 $(DMEVENTDMAN)
MAN5DIR=$(mandir)/man5
+MAN7DIR=$(mandir)/man7
MAN8DIR=$(mandir)/man8
-CLEAN_TARGETS=$(MAN5) $(MAN8) $(MAN8CLUSTER) $(FSADMMAN) $(BLKDEACTIVATEMAN) $(DMEVENTDMAN) $(MAN8DM)
-DISTCLEAN_TARGETS=fsadm.8 clvmd.8 cmirrord.8 dmeventd.8
+MANGENERATOR=$(top_builddir)/tools/man-generator
+TESTMAN=test.gen
include $(top_builddir)/make.tmpl
-ifneq ("@CLVMD@", "none")
- install: install_cluster
-endif
+CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8:%.8=%.8_gen) $(MAN8CLUSTER) \
+ $(MAN8DM) $(TESTMAN)
all: man device-mapper
-.PHONY: man install_man5 install_man8
+.PHONY: man install_man5 install_man7 install_man8 pregenerated_man
device-mapper: $(MAN8DM)
-man: $(MAN5) $(MAN8) $(MAN8CLUSTER)
+man: $(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8CLUSTER)
+
+all_man: man
+
+$(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8DM) $(MAN8CLUSTER): Makefile
+
+$(MANGENERATOR):
+ @echo " [MAKE] $<"
+ $(Q) $(MAKE) -C $(top_builddir) tools
-$(MAN5) $(MAN8) $(MAN8DM) $(MAN8CLUSTER): Makefile
+# Test whether or not the man page generator works
+$(TESTMAN): $(MANGENERATOR) Makefile
+ @echo " [TSTMAN] $@"
+ $(Q) - $(MANGENERATOR) --primary lvmconfig > $@
-%: %.in
- @case "$@" 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_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@+;" $< > $@ ;; \
- esac
+SEE_ALSO=$(srcdir)/see_also.end
+
+.PRECIOUS: %.8_gen
+
+%.8_gen: $(srcdir)/%.8_des $(srcdir)/%.8_end $(MANGENERATOR) $(TESTMAN)
+ $(Q)set -e ; ( \
+ if [ ! -s $(TESTMAN) ] ; then \
+ cat $(srcdir)/$(@:%.8_gen=%.8_pregen) \
+ $(srcdir)/$(basename $@).8_end $(SEE_ALSO) ; \
+ else \
+ MANCMD=$(basename $@) && \
+ $(MANGENERATOR) --primary $$MANCMD $< && \
+ $(MANGENERATOR) --secondary $$MANCMD && \
+ cat $(srcdir)/$(basename $@).8_end $(SEE_ALSO) ; \
+ fi \
+ ) > $@
+
+#
+# When EDITLINE_LIBS is defined, we are compiling with libedit
+#
+ifneq ("$(EDITLINE_LIBS)", "")
+DEFAULT_LIBLINE=editline
+else
+DEFAULT_LIBLINE=readline
+endif
+
+define SUBSTVARS
+$(SED) -e "s+#VERSION#+$(LVM_VERSION)+" \
+ -e "s+#DEFAULT_SYS_DIR#+$(DEFAULT_SYS_DIR)+" \
+ -e "s+#DEFAULT_ARCHIVE_DIR#+$(DEFAULT_ARCHIVE_DIR)+" \
+ -e "s+#DEFAULT_BACKUP_DIR#+$(DEFAULT_BACKUP_DIR)+" \
+ -e "s+#DEFAULT_PROFILE_DIR#+$(DEFAULT_PROFILE_DIR)+" \
+ -e "s+#DEFAULT_CACHE_DIR#+$(DEFAULT_CACHE_DIR)+" \
+ -e "s+#DEFAULT_LOCK_DIR#+$(DEFAULT_LOCK_DIR)+" \
+ -e "s+#LVM_PATH#+@bindir@/lvm+" \
+ -e "s+#DEFAULT_RUN_DIR#+$(DEFAULT_RUN_DIR)+" \
+ -e "s+#DEFAULT_PID_DIR#+$(DEFAULT_PID_DIR)+" \
+ -e "s+#SYSTEMD_GENERATOR_DIR#+$(SYSTEMD_GENERATOR_DIR)+" \
+ -e "s+#DEFAULT_LIBLINE#+$(DEFAULT_LIBLINE)+" \
+ -e "s+#DEFAULT_MANGLING#+$(DEFAULT_MANGLING)+" $< > $@
+endef
+
+# Escape any '-' to '\-' (except ^.TH line)
+# and fix unwanted changes:
+# '\\-' back to '\-'
+# words like 'device\-mapper' back to 'device-mapper',
+# \[\->] \[<\-] back to \[->], \[<-]
+# however for some words i.e. '*-pool' we want '*\-pool'
+# also 'vg-lv,[systemd-]machine-id,lvm-full,lvm-lvpoll' should go with \-
+#
+define ESCAPEHYPHENS
+$(SED) -i -e "/^.TH/ !s+-+\\\-+g" \
+ -e "s+\\\[\]-+\\\-+g" \
+ -e "s+\(^\|[^[:alnum:]\-]\)\([[:alpha:]]\{1,\}\)\\\-\((\|[([:alpha:]]\{2,\}\)+\1\2-\3+g" \
+ -e "s+\([[:alpha:]]\)-\(pool\)+\1\\\-\2+g" \
+ -e "s+[\][[]\(<\{0,1\}\)\\\-+\\\[\1-+g" \
+ -e "s+\(vg.\{1,\}[^\]\)-lv+\1\\\-lv+g" \
+ -e "s+systemd-machine+systemd\\\-machine+g" \
+ -e "s+machine-id+machine\\\-id+g" \
+ -e "s+lvm-full+lvm\\\-full+g" \
+ -e "s+lvm-lvpoll+lvm\\\-lvpoll+g" \
+ -e "s+\([[:digit:]]\)\s\([KMGTPE]iB\)+\1\\\ \2+g" \
+ $@
+endef
+
+.PHONY: checksed
+checksed:
+ $(Q) echo "cmd -a -b retry -c ret --use-policy -d" > $@
+ $(Q) echo "cmd \fI-u\fB -d retry \fI--use-pol --use-poli 4.0 --use \"-L|--size\"" >> $@
+ $(Q) echo "cmd --use-pol" >> $@
+ $(Q) echo "cmd --[raid]use device-mapper thin-pool \fB-\fP sdb1:1000-1999 \fB-t\fP|\fB--test\fP -? -o-field3" >> $@
+ $(Q) echo "cmd -dd---- \[->] \[<-] -*- -o#field5 -o-field3 -d" >> $@
+ $(Q) echo "-d" >> $@
+ $(Q) echo ".TH 2.03.12(2)-git" >> $@
+ $(Q) echo "--verbose" >> $@
+ $(Q) echo ".BR -- [ raid ] most -- [ raid ] most" >> $@
+ $(Q) echo ".BR | --verbose|--verb --verbose --verbose --verbose --verbose" >> $@
+ $(Q) echo "skip - unint --aa-dd- --aa-dd-- ---aa-dd 4.0 \-a\-b" >> $@
+ $(Q) echo "cmd \-a \-b retry \-c ret \-\-use\-policy \-d" > $@-e
+ $(Q) echo "cmd \fI\-u\fB \-d retry \fI\-\-use\-pol \-\-use\-poli 4.0 \-\-use \"\-L|\-\-size\"" >> $@-e
+ $(Q) echo "cmd \-\-use\-pol" >> $@-e
+ $(Q) echo "cmd \-\-[raid]use device-mapper thin\-pool \fB\-\fP sdb1:1000\-1999 \fB\-t\fP|\fB\-\-test\fP \-? \-o\-field3" >> $@-e
+ $(Q) echo "cmd \-dd\-\-\-\- \[->] \[<-] \-*\- \-o#field5 \-o\-field3 \-d" >> $@-e
+ $(Q) echo "\-d" >> $@-e
+ $(Q) echo ".TH 2.03.12(2)-git" >> $@-e
+ $(Q) echo "\-\-verbose" >> $@-e
+ $(Q) echo ".BR \-\- [ raid ] most \-\- [ raid ] most" >> $@-e
+ $(Q) echo ".BR | \-\-verbose|\-\-verb \-\-verbose \-\-verbose \-\-verbose \-\-verbose" >> $@-e
+ $(Q) echo "skip \- unint \-\-aa\-dd\- \-\-aa\-dd\-\- \-\-\-aa\-dd 4.0 \-a\-b" >> $@-e
+ $(Q) $(ESCAPEHYPHENS)
+ $(Q) echo "--- H Y P H E N A T E D ---"
+ $(Q) cat $@
+ $(Q) diff -u $@-e $@
+ $(Q) $(RM) $@ $@-e
+
+%.5: $(srcdir)/%.5_main
+ @echo " [MAN] $@"
+ $(Q) $(SUBSTVARS)
+ $(Q) $(ESCAPEHYPHENS)
+
+%.7: $(srcdir)/%.7_main
+ @echo " [MAN] $@"
+ $(Q) $(SUBSTVARS)
+ $(Q) $(ESCAPEHYPHENS)
+
+%.8: $(srcdir)/%.8_main
+ @echo " [MAN] $@"
+ $(Q) $(SUBSTVARS)
+ $(Q) $(ESCAPEHYPHENS)
+
+%.8: %.8_gen
+ @echo " [MAN] $@"
+ $(Q) $(SUBSTVARS)
+ $(Q) $(ESCAPEHYPHENS)
+
+$(MAN8SO): lvmconfig.8
+ @echo " [MAN] $@"
+ $(Q) echo ".so $<" > $@
install_man5: $(MAN5)
- $(INSTALL) -d $(MAN5DIR)
- $(INSTALL_DATA) $(MAN5) $(MAN5DIR)/
+ @echo " [INSTALL] $^"
+ $(Q) $(INSTALL) -d $(MAN5DIR)
+ $(Q) $(INSTALL_DATA) $^ $(MAN5DIR)/
+
+install_man7: $(MAN7)
+ @echo " [INSTALL] $^"
+ $(Q) $(INSTALL) -d $(MAN7DIR)
+ $(Q) $(INSTALL_DATA) $^ $(MAN7DIR)/
-install_man8: $(MAN8)
- $(INSTALL) -d $(MAN8DIR)
- $(INSTALL_DATA) $(MAN8) $(MAN8DIR)/
+install_man8: $(MAN8) $(MAN8SO)
+ @echo " [INSTALL] $^"
+ $(Q) $(INSTALL) -d $(MAN8DIR)
+ $(Q) $(INSTALL_DATA) $^ $(MAN8DIR)/
-install_lvm2: install_man5 install_man8
+install_lvm2: install_man5 install_man7 install_man8
install_cluster: $(MAN8CLUSTER)
- $(INSTALL) -d $(MAN8DIR)
- $(INSTALL_DATA) $(MAN8CLUSTER) $(MAN8DIR)/
+ifdef MAN8CLUSTER
+ @echo " [INSTALL] $^"
+ $(Q) $(INSTALL) -d $(MAN8DIR)
+ $(Q) $(INSTALL_DATA) $^ $(MAN8DIR)/
+endif
install_device-mapper: $(MAN8DM)
- $(INSTALL) -d $(MAN8DIR)
- $(INSTALL_DATA) $(MAN8DM) $(MAN8DIR)/
+ @echo " [INSTALL] $^"
+ $(Q) $(INSTALL) -d $(MAN8DIR)
+ $(Q) $(INSTALL_DATA) $^ $(MAN8DIR)/
+
+install: install_lvm2 install_device-mapper install_cluster
+
+install_all_man: install install_systemd_generators
+
+# Copy generated man pages back to source tree as fallback for machines where generator doesn't work
+pregenerated_man: $(MANGENERATOR) $(TESTMAN)
+ @echo " [GENERATE] $^"
+ $(Q) set -e ; test -s $(TESTMAN) && for i in $(srcdir)/*.8_des; do \
+ CMD=`basename $$i .8_des`; \
+ ( $(MANGENERATOR) --primary $$CMD $$i && \
+ $(MANGENERATOR) --secondary $$CMD ) \
+ > $(srcdir)/$$CMD.8_pregen ; \
+ done
-install: install_lvm2 install_device-mapper
+generate: pregenerated_man
diff --git a/man/blkdeactivate.8.in b/man/blkdeactivate.8.in
deleted file mode 100644
index 6e566c8..0000000
--- a/man/blkdeactivate.8.in
+++ /dev/null
@@ -1,72 +0,0 @@
-.TH "BLKDEACTIVATE" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
-.SH "NAME"
-blkdeactivate \- utility to deactivate block devices
-.SH SYNOPSIS
-.B blkdeactivate
-.RI [ options ]
-.RI [ device... ]
-.sp
-.SH DESCRIPTION
-blkdeactivate utility deactivates block devices. If a device
-is mounted, the utility can unmount it automatically before
-trying to deactivate. The utility currently supports
-\fIdevice-mapper\fP devices, including \fILVM\fP volumes.
-LVM volumes are handled directly using the \fIlvm\fP command.
-Other device-mapper based devices are handled using the
-\fIdmsetup\fP command.
-.SH OPTIONS
-.IP "\fB\-h, \-\-help\fP"
-Display the help text.
-.IP "\fB\-u, \-\-umount\fP"
-Unmount a mounted device before trying to deactivate it.
-Without this option used, a device that is mounted is not deactivated.
-.IP "\fB\-d, \-\-dmoption\fP \fIdm_options\fP"
-Comma separated list of device-mapper specific options.
-.IP "\fB\-l, \-\-lvmoption\fP \fIlvm_options\fP"
-Comma separated list of LVM specific options.
-.SH DM_OPTIONS
-.IP "\fBretry\fP"
-Retry removal several times in case of failure.
-.IP "\fBforce\fP"
-Force device removal. See \fBdmsetup\fP(8) for more information.
-.SH LVM_OPTIONS
-.IP "\fBretry\fP"
-Retry removal several times in case of failure.
-.IP "\fBwholevg\fP"
-Deactivate the whole LVM Volume Group when processing a Logical Volume.
-Deactivating Volume Group as a whole takes less time than deactivating
-each Logical Volume separately.
-
-.SH EXAMPLES
-.sp
-Deactivate all supported block devices found in the system. If a device
-is mounted, skip its deactivation.
-.sp
-.B blkdeactivate
-
-Deactivate all supported block devices found in the system. If a device
-is mounted, unmount it first if possible.
-.sp
-.B blkdeactivate \-u
-
-Deactivate supplied device together with all its holders. If any of the
-devices processed is mounted, unmount it first if possible.
-.sp
-.B blkdeactivate \-u /dev/vg/lvol0
-
-Deactivate all supported block devices found in the system. Retry deactivation
-of device-mapper devices in case the deactivation fails. Deactivate the whole
-Volume Group at once when processing an LVM Logical Volume.
-.sp
-.B blkdeactivate \-u -d retry -l wholevg
-
-Deactivate all supported block devices found in the system. Retry deactivation
-of device-mapper devices in case the deactivation fails and force removal.
-.sp
-.B blkdeactivate -d force,retry
-
-.SH SEE ALSO
-.BR lsblk (8)
-.BR umount (8)
-.BR dmsetup (8)
-.BR lvm (8)
diff --git a/man/blkdeactivate.8_main b/man/blkdeactivate.8_main
new file mode 100644
index 0000000..398db37
--- /dev/null
+++ b/man/blkdeactivate.8_main
@@ -0,0 +1,164 @@
+.TH "BLKDEACTIVATE" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH NAME
+.
+blkdeactivate \(em utility to deactivate block devices
+.
+.SH SYNOPSIS
+.
+.ad l
+.nh
+.B blkdeactivate
+.RB [ -d
+.IR dm_options ]
+.RB [ -e ]
+.RB [ -h ]
+.RB [ -l
+.IR lvm_options ]
+.RB [ -m
+.IR mpath_options ]
+.RB [ -r
+.IR mdraid_options ]
+.RB [ -o
+.IR vdo_options ]
+.RB [ -u ]
+.RB [ -v ]
+.RI [ device ]
+.hy
+.ad b
+.
+.SH DESCRIPTION
+.
+The blkdeactivate utility deactivates block devices. For mounted
+block devices, it attempts to unmount it automatically before
+trying to deactivate. The utility currently supports
+device-mapper devices (DM), including LVM volumes and
+software RAID MD devices. LVM volumes are handled directly
+using the \fBlvm\fP(8) command, the rest of device-mapper
+based devices are handled using the \fBdmsetup\fP(8) command.
+MD devices are handled using the \fBmdadm\fP(8) command.
+.
+.SH OPTIONS
+.
+.TP
+.BR -d | --dmoptions " " \fIdm_options
+Comma separated list of device-mapper specific options.
+Accepted \fBdmsetup\fP(8) options are:
+.RS
+.TP
+.B retry
+Retry removal several times in case of failure.
+.TP
+.B force
+Force device removal.
+.RE
+.
+.TP
+.BR -e | --errors
+Show errors reported from tools called by \fBblkdeactivate\fP. Without this
+option, any error messages from these external tools are suppressed and the
+\fBblkdeactivate\fP itself provides only a summary message to indicate
+the device was skipped.
+.
+.TP
+.BR -h | --help
+Display the help text.
+.
+.TP
+.BR -l | --lvmoptions " " \fIlvm_options
+Comma-separated list of LVM specific options:
+.RS
+.TP
+.B retry
+Retry removal several times in case of failure.
+.TP
+.B wholevg
+Deactivate the whole LVM Volume Group when processing a Logical Volume.
+Deactivating the Volume Group as a whole is quicker than deactivating
+each Logical Volume separately.
+.RE
+.
+.TP
+.BR -r | --mdraidoptions " " \fImdraid_options
+Comma-separated list of MD RAID specific options:
+.RS
+.TP
+.B wait
+Wait MD device's resync, recovery or reshape action to complete
+before deactivation.
+.RE
+.
+.TP
+.BR -m | --mpathoptions " " \fImpath_options
+Comma-separated list of device-mapper multipath specific options:
+.RS
+.TP
+.B disablequeueing
+Disable queueing on all multipath devices before deactivation.
+This avoids a situation where blkdeactivate may end up waiting if
+all the paths are unavailable for any underlying device-mapper multipath
+device.
+.RE
+.
+.TP
+.BR -o | --vdooptions " " \fIvdo_options
+Comma-separated list of VDO specific options:
+.RS
+.TP
+.BR configfile = \fIfile
+Use specified VDO configuration file.
+.RE
+.
+.TP
+.BR -u | --umount
+Unmount a mounted device before trying to deactivate it.
+Without this option used, a device that is mounted is not deactivated.
+.
+.TP
+.BR -v ", " --verbose
+Run in verbose mode. Use \fB-vv\fP for even more verbose mode.
+.
+.SH EXAMPLES
+.
+Deactivate all supported block devices found in the system, skipping mounted
+devices.
+.br
+#
+.B blkdeactivate
+.P
+Deactivate all supported block devices found in the system, unmounting any
+mounted devices first, if possible.
+.br
+#
+.B blkdeactivate -u
+.P
+Deactivate the device /dev/vg/lvol0 together with all its holders, unmounting
+any mounted devices first, if possible.
+.br
+#
+.B blkdeactivate -u /dev/vg/lvol0
+.P
+Deactivate all supported block devices found in the system. If the deactivation
+of a device-mapper device fails, retry it. Deactivate the whole
+Volume Group at once when processing an LVM Logical Volume.
+.br
+#
+.B blkdeactivate -u -d retry -l wholevg
+.P
+Deactivate all supported block devices found in the system. If the deactivation
+of a device-mapper device fails, retry it and force removal.
+.br
+#
+.B blkdeactivate -d force,retry
+.
+.SH SEE ALSO
+.
+.nh
+.ad l
+.BR dmsetup (8),
+.BR lsblk (8),
+.BR lvm (8),
+.BR mdadm (8),
+.BR multipathd (8),
+.BR vdo (8),
+.BR umount (8)
diff --git a/man/clvmd.8.in b/man/clvmd.8.in
deleted file mode 100644
index 2d7b06b..0000000
--- a/man/clvmd.8.in
+++ /dev/null
@@ -1,125 +0,0 @@
-.TH CLVMD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
-.SH NAME
-clvmd \- cluster LVM daemon
-.SH SYNOPSIS
-.B clvmd
-.RB [ \-d
-.RI [< value >]
-.RB [ \-C ]]
-.RB [ \-E
-.RI < "lock uuid" >]
-.RB [ \-f ]
-.RB [ \-h ]
-.RB [ \-I
-.IR "cluster_manager" ]
-.RB [ \-R ]
-.RB [ \-S ]
-.RB [ \-t
-.RI < timeout >]
-.RB [ \-T
-.RI < "start timeout" >]
-.RB [ \-V ]
-.SH DESCRIPTION
-clvmd is the daemon that distributes LVM metadata updates around a cluster.
-It must be running on all nodes in the cluster and will give an error
-if a node in the cluster does not have this daemon running.
-.SH OPTIONS
-.TP
-.BR \-d [< \fIvalue >]
-Enable debug logging. Value can be 0, 1 or 2.
-.br
-0 disables debug logging
-.br
-1 sends debug logs to stderr (implies \fB\-f\fP option)
-.br
-2 sends debug logs to syslog
-.br
-If
-.B \-d
-is specified without a value then 1 is assumed.
-.TP
-.B \-C
-Only valid if
-.B \-d
-is also specified. Tells all clvmds in a cluster to enable/disable debug logging.
-Without this switch, only the local clvmd will change its debug level to that
-given with
-.B \-d
-.
-.br
-This does not work correctly if specified on the command-line that starts clvmd.
-If you want to start clvmd
-.B and
-enable cluster-wide logging then the command needs to be issued twice, eg:
-.br
-.B clvmd
-.br
-.B clvmd -d2
-.br
-.TP
-.BR \-E < "\fIlock uuid" >
-Pass lock uuid to be reacquired exclusively when clvmd is restarted.
-.TP
-.B \-f
-Don't fork, run in the foreground.
-.TP
-.B \-h
-Show help information.
-.TP
-.B \-I \fIcluster manager
-Selects the cluster manager to use for locking and internal communications,
-the available managers will be listed as part of the \fBclvmd -h\fP output.
-clvmd will use the first cluster manager that succeeds, and it checks them
-in the order cman,corosync,openais. As it is quite possible to have
-(eg) corosync and cman available on the same system you might have to
-manually specify this option to override the search.
-.TP
-.B \-R
-Tells all the running clvmds in the cluster to reload their device cache and
-re-read the lvm configuration file. This command should be run whenever the
-devices on a cluster system are changed.
-.TP
-.B \-S
-Tells the running clvmd to exit and reexecute itself, for example at the
-end of a package upgrade. The new instance is instructed to reacquire
-any locks in the same state as they were previously held. (Alternative
-methods of restarting the daemon have the side effect of changing
-exclusive LV locks into shared locks.)
-.TP
-.BR \-t < \fItimeout >
-Specifies the timeout for commands to run around the cluster. This should not
-be so small that commands with many disk updates to do will fail, so you
-may need to increase this on systems with very large disk farms.
-The default is 30 seconds.
-.TP
-.BR \-T < "\fIstart timeout" >
-Specifies the timeout for clvmd daemon startup. If the daemon does not report
-that it has started up within this time then the parent command will exit with
-status of 5. This does NOT mean that clvmd has not started! What it means is
-that the startup of clvmd has been delayed for some reason; the most likely
-cause of this is an inquorate cluster though it could be due to locking
-latencies on a cluster with large numbers of logical volumes. If you get the
-return code of 5 it is usually not necessary to restart clvmd - it will start
-as soon as that blockage has cleared. This flag is to allow startup scripts
-to exit in a timely fashion even if the cluster is stalled for some reason.
-.br
-The default is 0 (no timeout) and the value is in seconds. Don't set this too
-small or you will experience spurious errors. 10 or 20 seconds might be
-sensible.
-.br
-This timeout will be ignored if you start clvmd with the -d switch.
-.TP
-.B \-V
-Display the version of the cluster LVM daemon.
-
-.SH ENVIRONMENT VARIABLES
-.TP
-.B LVM_CLVMD_BINARY
-The CLVMD binary to use when clmvd restart is requested.
-Defaults to #CLVMD_PATH#.
-.TP
-.B LVM_BINARY
-The LVM2 binary to use. Defaults to #LVM_PATH#.
-
-.SH SEE ALSO
-.BR lvm (8)
diff --git a/man/cmirrord.8.in b/man/cmirrord.8.in
deleted file mode 100644
index 035fa43..0000000
--- a/man/cmirrord.8.in
+++ /dev/null
@@ -1,30 +0,0 @@
-.TH CMIRRORD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
-.SH NAME
-cmirrord \- cluster mirror log daemon
-
-.SH SYNOPSIS
-.B cmirrord
-
-.SH DESCRIPTION
-cmirrord is the daemon that tracks mirror log information in a cluster.
-It is specific to device-mapper based mirrors (and by extension, LVM
-cluster mirrors). Cluster mirrors are not possible without this daemon
-running.
-
-This daemon relies on the cluster infrastructure provided by the
-Cluster MANager (CMAN), which must be set up and running in order for
-cmirrord to function. (The cluster infrastructure is also required for
-clvmd.)
-
-Output is logged via syslog. The USR1 signal can be issued to cmirrord
-to gather current status information for debugging purposes.
-
-Once started, cmirrord will run until it is shutdown via INT signal. If
-there are still active cluster mirrors, however, the signal will be
-ignored. Active cluster mirrors should be shutdown before stopping the
-cluster mirror log daemon.
-
-.SH SEE ALSO
-.BR lvm (8)
-.BR clvmd (8)
-.BR cluster.conf (5) \ No newline at end of file
diff --git a/man/cmirrord.8_main b/man/cmirrord.8_main
new file mode 100644
index 0000000..b841ae4
--- /dev/null
+++ b/man/cmirrord.8_main
@@ -0,0 +1,46 @@
+.TH CMIRRORD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
+.
+.SH NAME
+.
+cmirrord \(em cluster mirror log daemon
+.
+.SH SYNOPSIS
+.
+.B cmirrord
+.RB [ -f | --foreground ]
+.RB [ -h | --help ]
+.
+.SH DESCRIPTION
+.
+\fBcmirrord\fP is the daemon that tracks mirror log information in a cluster.
+It is specific to device-mapper based mirrors (and by extension, LVM
+cluster mirrors). Cluster mirrors are not possible without this daemon
+running.
+.P
+This daemon relies on the cluster infrastructure provided by the corosync,
+which must be set up and running in order for cmirrord to function.
+.P
+Output is logged via \fBsyslog\fP(3). The \fBSIGUSR1 signal\fP(7) can be
+issued to \fBcmirrord\fP to gather current status information for debugging
+purposes.
+.P
+Once started, \fBcmirrord\fP will run until it is shutdown via \fBSIGINT\fP
+signal. If there are still active cluster mirrors, however, the signal will be
+ignored. Active cluster mirrors should be shutdown before stopping the cluster
+mirror log daemon.
+.
+.SH OPTIONS
+.
+.TP
+.BR -f | --foreground
+Do not fork and log to the terminal.
+.TP
+.BR -h | --help
+Print usage.
+.
+.SH SEE ALSO
+.
+.BR lvmlockd (8),
+.BR lvm (8),
+.BR syslog (3),
+.BR signal (7)
diff --git a/man/dmeventd.8.in b/man/dmeventd.8.in
deleted file mode 100644
index e742a61..0000000
--- a/man/dmeventd.8.in
+++ /dev/null
@@ -1,59 +0,0 @@
-.TH DMEVENTD 8 "DM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
-.SH NAME
-dmeventd \- Device-mapper event daemon
-.SH SYNOPSIS
-.B dmeventd
-.RB [ \-d " [" -d " [" -d ]]]
-.RB [ \-f ]
-.RB [ \-h ]
-.RB [ \-R ]
-.RB [ \-V ]
-.RB [ \-? ]
-.SH DESCRIPTION
-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
-.TP
-.I Mirror
-Attempts to handle device failure automatically. See \fBlvm.conf\fP(5).
-.TP
-.I Raid
-Attempts to handle device failure automatically. See \fBlvm.conf\fP(5).
-.TP
-.I Snapshot
-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 \fBlvm.conf\fP(5).
-.TP
-.I Thin
-Monitors how full a thin pool 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 \fBlvm.conf\fP(5).
-.SH OPTIONS
-.TP
-.B \-d
-Repeat from 1 to 3 times (-d, -dd, -ddd) to increase the detail of
-debug messages sent to syslog.
-Each extra d adds more debugging information.
-.TP
-.B \-f
-Don't fork, run in the foreground.
-.TP
-.BR \-h ", " \-?
-Show help information.
-.TP
-.B \-R
-Replace a running dmeventd instance. The running dmeventd must be version
-2.02.77 or newer. The new dmeventd instance will obtain a list of devices and
-events to monitor from the currently running daemon.
-.TP
-.B \-V
-Show version of dmeventd.
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvm.conf (5)
diff --git a/man/dmeventd.8_main b/man/dmeventd.8_main
new file mode 100644
index 0000000..77b07e4
--- /dev/null
+++ b/man/dmeventd.8_main
@@ -0,0 +1,179 @@
+.TH DMEVENTD 8 "DM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
+.
+.SH NAME
+.
+dmeventd \(em Device-mapper event daemon
+.
+.SH SYNOPSIS
+.
+.B dmeventd
+.RB [ -d
+.RB [ -d
+.RB [ -d ]]]
+.RB [ -f ]
+.RB [ -h ]
+.RB [ -l ]
+.RB [ -R ]
+.RB [ -V ]
+.RB [ -? ]
+.
+.SH DESCRIPTION
+.
+dmeventd is the event monitoring daemon for device-mapper devices.
+Library plugins can register and carry out actions triggered when
+particular events occur.
+.
+.SH OPTIONS
+.
+.TP
+.B -d
+Repeat from 1 to 3 times
+.RB ( -d ,
+.BR -dd ,
+.BR -ddd )
+to increase the detail of
+debug messages sent to syslog.
+Each extra d adds more debugging information.
+.
+.TP
+.B -f
+Don't fork, run in the foreground.
+.
+.TP
+.B -h
+Show help information.
+.
+.TP
+.B -l
+Log through stdout and stderr instead of syslog.
+This option works only with option -f, otherwise it is ignored.
+.
+.TP
+.B -?
+Show help information on stderr.
+.
+.TP
+.B -R
+Replace a running dmeventd instance. The running dmeventd must be version
+2.02.77 or newer. The new dmeventd instance will obtain a list of devices and
+events to monitor from the currently running daemon.
+.
+.TP
+.B -V
+Show version of dmeventd.
+.
+.SH LVM PLUGINS
+.
+.TP
+.B Mirror
+Attempts to handle device failure automatically.
+.br
+See
+.BR lvm.conf (5).
+.
+.TP
+.B Raid
+Attempts to handle device failure automatically.
+.br
+See
+.BR lvm.conf (5).
+.
+.TP
+.B Snapshot
+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.
+.
+.TP
+.B Thin
+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 \fBdmeventd/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
+\fBactivation/thin_pool_autoextend_threshold\fP.
+If the command fails, dmeventd thin plugin will keep
+retrying execution with increasing time delay between
+retries up to 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_\:METADATA\fP.
+Command can also read status with tools like \fBlvs\fP(8).
+.
+.TP
+.B Vdo
+Monitors how full a VDO pool data 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 VDO pool is filled. See
+.BR lvm.conf (5).
+When a VDO pool fills over 50% vdo plugin calls
+configured \fBdmeventd/vdo_command\fP with every 5% increase.
+With default setting it calls internal
+\fBlvm lvextend --use-policies\fP to resize VDO pool
+when it's been filled above the configured threshold
+\fBactivation/vdo_pool_autoextend_threshold\fP.
+If the command fails, dmeventd vdo plugin will keep
+retrying execution with increasing time delay between
+retries up to 42 minutes.
+User may also configure external command to support more advanced
+maintenance operations of a VDO pool.
+Such external command can e.g. remove some unneeded space
+with \fBfstrim\fP(8),
+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 VDO pool command may check this
+environmental variable \fBDMEVENTD_VDO_POOL\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_METADATA
+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 DMEVENTD_VDO_POOL
+Variable is set by vdo plugin and is available to executed program. Value present
+actual usage of VDO pool data volume. Variable is not set when error event
+is processed.
+.TP
+.B LVM_RUN_BY_DMEVENTD
+Variable is set by thin and vdo plugin to prohibit recursive interaction
+with dmeventd by any executed lvm2 command from
+a thin_command, vdo_command environment.
+.
+.SH SEE ALSO
+.
+.BR lvm (8),
+.BR lvm.conf (5),
+.BR lvextend (8),
+.br
+.BR fstrim (8)
diff --git a/man/dmfilemapd.8_main b/man/dmfilemapd.8_main
new file mode 100644
index 0000000..c363dd2
--- /dev/null
+++ b/man/dmfilemapd.8_main
@@ -0,0 +1,206 @@
+.TH DMFILEMAPD 8 "Dec 17 2016" "Linux" "MAINTENANCE COMMANDS"
+.
+.de OPT_FD
+. I file_descriptor
+..
+.
+.de OPT_GROUP
+. I group_id
+..
+.
+.de OPT_PATH
+. I abs_path
+..
+.
+.de OPT_MODE
+. BR inode | path
+..
+.
+.de OPT_DEBUG
+. RI [ foreground " [" verbose ]]
+..
+.
+.SH NAME
+.
+dmfilemapd \(em device-mapper filemap monitoring daemon
+.
+.SH SYNOPSIS
+.
+.de CMD_DMFILEMAPD
+. ad l
+. nh
+. BR dmfilemapd
+. OPT_FD
+. OPT_GROUP
+. OPT_PATH
+. OPT_MODE
+. OPT_DEBUG
+. hy
+. ad b
+..
+.CMD_DMFILEMAPD
+.
+.PD
+.
+.SH DESCRIPTION
+.
+The dmfilemapd daemon monitors groups of \fBdmstats\fP(8) regions that
+correspond to the extents of a file, adding and removing regions to
+reflect the changing state of the file on-disk.
+.P
+The daemon is normally launched automatically by the \fBdmstats
+create\fP command, but can be run manually, either to create a new
+daemon where one did not previously exist, or to change the options
+previously used, by killing the existing daemon and starting a new
+one.
+.
+.SH OPTIONS
+.
+.TP
+.OPT_FD
+Specify the file descriptor number for the file to be monitored.
+The file descriptor must reference a regular file, open for reading,
+in a local file system that supports the FIEMAP ioctl, and that
+returns data describing the physical location of extents.
+.sp
+The process that executes \fBdmfilemapd\fP is responsible for
+opening the file descriptor that is handed to the daemon.
+.
+.TP
+.OPT_GROUP
+The \fBdmstats\fP group identifier of the group that \fBdmfilemapd\fP
+should update. The group must exist and it should correspond to
+a set of regions created by a previous filemap operation.
+.
+.TP
+.OPT_PATH
+The absolute path to the file being monitored, at the time that
+it was opened. The use of \fIabs_path\fP by the daemon differs,
+depending on the filemap following mode in use; see \fBMODES\fP
+and the \fImode\fP option for more information.
+.
+.TP
+.OPT_MODE
+The filemap monitoring mode the daemon.
+Use either
+.B inode
+(\fBDM_FILEMAP_FOLLOW_INODE\fP), or
+.B path
+(\fBDM_FILEMAP_FOLLOW_PATH\fP), to enable follow-inode or
+follow-path mode respectively.
+.
+.TP
+.RI [ foreground ]
+.br
+If set to 1, disable forking and allow the daemon to run in the
+foreground.
+.
+.TP
+.RI [ verbose ]
+.br
+Control daemon logging. If set to zero, the daemon will close all
+stdio streams and run silently. If \fBverbose\fP is a number
+between 1 and 3, stdio will be retained and the daemon will log
+messages to stdout and stderr that match the specified verbosity
+level.
+.
+.SH MODES
+.
+The file map monitoring daemon can monitor files in two distinct
+ways: the mode affects the behaviour of the daemon when a file
+under monitoring is renamed or unlinked, and the conditions which
+cause the daemon to terminate.
+.P
+In both modes, the daemon will always shut down when the group
+being monitored is deleted.
+.P
+.B Follow inode
+.P
+The daemon follows the inode of the file, as it was at the time the
+daemon started. The file descriptor referencing the file is kept
+open at all times, and the daemon will exit when it detects that
+the file has been unlinked and it is the last holder of a reference
+to the file.
+.P
+This mode is useful if the file is expected to be renamed, or moved
+within the file system, while it is being monitored.
+.P
+.B Follow path
+.P
+The daemon follows the path that was given on the daemon command
+line. The file descriptor referencing the file is re-opened on each
+iteration of the daemon, and the daemon will exit if no file exists
+at this location (a tolerance is allowed so that a brief delay
+between removal and replacement is permitted).
+.P
+This mode is useful if the file is updated by unlinking the original
+and placing a new file at the same path.
+.
+.SH LIMITATIONS
+.
+The daemon attempts to maintain good synchronization between the file
+extents and the regions contained in the group, however, since the
+daemon can only react to new allocations once they have been written,
+there are inevitably some IO events that cannot be counted when a
+file is growing, particularly if the file is being extended by a
+single thread writing beyond EOF (for example, the \fBdd\fP program).
+.P
+There is a further loss of events in that there is currently no way
+to atomically resize a \fBdmstats\fP region and preserve its current
+counter values. This affects files when they grow by extending the
+final extent, rather than allocating a new extent: any events that
+had accumulated in the region between any prior operation and the
+resize are lost.
+.P
+File mapping is currently most effective in cases where the majority
+of IO does not trigger extent allocation. Future updates may address
+these limitations when kernel support is available.
+.
+.SH EXAMPLES
+.
+Normally the daemon is started automatically by the \fBdmstats\fP
+\fBcreate\fP or \fBupdate_filemap\fP commands but it can be run
+manually for debugging or testing purposes.
+.P
+Start the daemon in the background, in follow-path mode
+.br
+#
+.B dmfilemapd 3 0 /srv/images/vm.img path 0 0 3< /srv/images/vm.img
+.br
+.P
+Start the daemon in follow-inode mode, disable forking and enable
+verbose logging
+.br
+.ad l
+#
+.B dmfilemapd 3 0 /var/tmp/data inode 1 3 3< /var/tmp/data
+.nf
+Starting dmfilemapd with fd=3, group_id=0 mode=inode, path=/var/tmp/data
+dm version [ opencount flush ] [16384] (*1)
+dm info (253:0) [ opencount flush ] [16384] (*1)
+dm message (253:0) [ opencount flush ] @stats_list dmstats [16384] (*1)
+Read alias 'data' from aux_data
+Found group_id 0: alias="data"
+dm_stats_walk_init: initialised flags to 4000000000000
+starting stats walk with GROUP
+exiting _filemap_monitor_get_events() with deleted=0, check=0
+Waiting for check interval
+.fi
+.ad b
+
+.
+.SH AUTHORS
+.
+Bryn M. Reeves <bmr@redhat.com>
+.
+.SH SEE ALSO
+.
+.BR dmstats (8)
+.P
+LVM2 resource page:
+.UR https://www.sourceware.org/lvm2
+.UE
+.br
+Device-mapper resource page:
+.UR http://sources.redhat.com/dm
+.UE
diff --git a/man/dmsetup.8.in b/man/dmsetup.8.in
deleted file mode 100644
index a4eac1e..0000000
--- a/man/dmsetup.8.in
+++ /dev/null
@@ -1,714 +0,0 @@
-.TH DMSETUP 8 "Apr 06 2006" "Linux" "MAINTENANCE COMMANDS"
-.SH NAME
-dmsetup \- low level logical volume management
-.SH SYNOPSIS
-.ad l
-.B dmsetup clear
-.I device_name
-.br
-.B dmsetup create
-.I device_name
-.RB [ \-u
-.IR uuid ]
-.RB [ \-\-notable | \-\-table
-.RI < table >|
-.RS
-.IR table_file ]
-.RB [{ \-\-addnodeoncreate | \-\-addnodeonresume }]
-.RB [ \-\-readahead
-.RI [ \+ ]< sectors >| auto | none ]
-.RE
-.br
-.B dmsetup deps
-.RB [ \-o
-.IR options ]
-.RI [ device_name ]
-.br
-.B dmsetup help
-.RB [ \-c | \-C | \-\-columns ]
-.br
-.B dmsetup info
-.RI [ device_name ]
-.br
-.B dmsetup info
-.BR \-c | \-C | \-\-columns
-.RB [ \-\-noheadings ]
-.RB [ \-\-separator
-.IR separator ]
-.RS
-.RB [ \-o
-.IR fields ]
-.RB [ \-O | \-\-sort
-.IR sort_fields ]
-.RI [ device_name ]
-.RE
-.br
-.B dmsetup load
-.I device_name
-.RB [ \-\-table
-.RI < table >| table_file ]
-.br
-.B dmsetup ls
-.RB [ \-\-target
-.IR target_type ]
-.RB [ \-\-exec
-.IR command ]
-.RB [ \-\-tree ]
-.RB [ \-o
-.IR options ]
-.RE
-.br
-.B dmsetup message
-.I device_name sector message
-.br
-.B dmsetup mknodes
-.RI [ device_name ]
-.br
-.B dmsetup mangle
-.RI [ device_name ]
-.br
-.B dmsetup reload
-.I device_name
-.RB [ \-\-table
-.RI < table >| table_file ]
-.br
-.B dmsetup wipe_table
-.I device_name
-.br
-.B dmsetup remove
-.RB [ \-f | \-\-force ]
-.RB [ \-\-retry ]
-.I device_name
-.br
-.B dmsetup remove_all
-.RB [ \-f | \-\-force ]
-.br
-.B dmsetup rename
-.I device_name new_name
-.br
-.B dmsetup rename
-.I device_name
-.B \-\-setuuid
-.I uuid
-.br
-.B dmsetup resume
-.I device_name
-.RB [{ \-\-addnodeoncreate | \-\-addnodeonresume }]
-.RS
-.RB [ \-\-readahead
-.RI [ \+ ]< sectors >| auto | none ]
-.RE
-.br
-.B dmsetup setgeometry
-.I device_name cyl head sect start
-.br
-.B dmsetup splitname
-.I device_name
-.RI [ subsystem ]
-.br
-.B dmsetup status
-.RB [ \-\-target
-.IR target_type ]
-.RB [ \-\-noflush ]
-.RI [ device_name ]
-.br
-.B dmsetup suspend
-.RB [ \-\-nolockfs ]
-.RB [ \-\-noflush ]
-.I device_name
-.br
-.B dmsetup table
-.RB [ \-\-target
-.IR target_type ]
-.RB [ \-\-showkeys ]
-.RI [ device_name ]
-.br
-.B dmsetup targets
-.br
-.B dmsetup udevcomplete
-.I cookie
-.br
-.B dmsetup udevcomplete_all
-.RI [ age_in_minutes ]
-.br
-.B dmsetup udevcookies
-.br
-.B dmsetup udevcreatecookie
-.br
-.B dmsetup udevflags
-.I cookie
-.br
-.B dmsetup udevreleasecookie
-.RI [ cookie ]
-.br
-.B dmsetup version
-.br
-.B dmsetup wait
-.RB [ \-\-noflush ]
-.I device_name
-.RI [ event_nr ]
-.br
-
-.B devmap_name
-.I major minor
-.br
-.B devmap_name
-.I major:minor
-.ad b
-.SH DESCRIPTION
-dmsetup manages logical devices that use the device-mapper driver.
-Devices are created by loading a table that specifies a target for
-each sector (512 bytes) in the logical device.
-
-The first argument to dmsetup is a command.
-The second argument is the logical device name or uuid.
-
-Invoking the command as \fBdevmap_name\fP is equivalent to
-.br
-\fBdmsetup info \-c \-\-noheadings \-j \fImajor\fB \-m \fIminor\fP.
-.SH OPTIONS
-.TP
-.B \-\-addnodeoncreate
-Ensure /dev/mapper node exists after dmsetup create.
-.TP
-.B \-\-addnodeonresume
-Ensure /dev/mapper node exists after dmsetup resume (default with udev).
-.TP
-.B \-\-checks
-Perform additional checks on the operations requested and report
-potential problems. Useful when debugging scripts.
-In some cases these checks may slow down operations noticeably.
-.TP
-.BR \-c | \-C | \-\-columns
-Display output in columns rather than as Field: Value lines.
-.TP
-.BR \-h | \-\-help
-Outputs a summary of the commands available, optionally including
-the list of report fields (synonym with \fBhelp\fP command).
-.TP
-.B \-\-inactive
-When returning any table information from the kernel report on the
-inactive table instead of the live table.
-Requires kernel driver version 4.16.0 or above.
-.TP
-.IR \fB\-\-manglename \ < mangling_mode >
-Mangle any character not on a whitelist using mangling_mode when
-processing device-mapper device names and UUIDs. The names and UUIDs
-are mangled on input and unmangled on output where the mangling_mode
-is one of: none (no mangling), hex (always do the mangling) and auto
-(only do the mangling if not mangled yet, do nothing if already
-mangled, error on mixed; this is used by default).
-Character whitelist: 0-9, A-Z, a-z, #+-.:=@_. This whitelist is
-also supported by udev. Any character not on a whitelist is replaced
-with its hex value (two digits) prefixed by \\x.
-.TP
-.BR \-j | \-\-major\ \fImajor
-Specify the major number.
-.TP
-.BR \-m | \-\-minor\ \fIminor
-Specify the minor number.
-.TP
-.BR \-n | \-\-noheadings
-Suppress the headings line when using columnar output.
-.TP
-.B \-\-noopencount
-Tell the kernel not to supply the open reference count for the device.
-.TP
-.B \-\-notable
-When creating a device, don't load any table.
-.TP
-.B \-\-noudevrules
-Do not allow udev to manage nodes for devices in device-mapper directory.
-.TP
-.B \-\-noudevsync
-Do not synchronise with udev when creating, renaming or removing devices.
-.TP
-.BR \-o | \-\-options
-Specify which fields to display.
-.TP
-.IR \fB\-\-readahead \ [ \+ ]< sectors >| auto | none
-Specify read ahead size in units of sectors.
-The default value is \fIauto\fP which allows the kernel to choose
-a suitable value automatically. The \fI\+\fP prefix lets you
-specify a minimum value which will not be used if it is
-smaller than the value chosen by the kernel.
-The value \fInone\fP is equivalent to specifying zero.
-.TP
-.BR \-r | \-\-readonly
-Set the table being loaded read-only.
-.TP
-.IR \fB\-\-table \ < table >
-Specify a one-line table directly on the command line.
-.TP
-.B \-\-udevcookie \fIcookie
-Use cookie for udev synchronisation.
-.TP
-.BR \-u | \-\-uuid
-Specify the uuid.
-.TP
-.BR \-y | \-\-yes
-Answer yes to all prompts automatically.
-.TP
-.BR \-v | \-\-verbose \ [ \-v | \-\-verbose ]
-Produce additional output.
-.TP
-.B \-\-verifyudev
-If udev synchronisation is enabled, verify that udev operations get performed
-correctly and try to fix up the device nodes afterwards if not.
-.TP
-.B \-\-version
-Display the library and kernel driver version.
-.br
-.SH COMMANDS
-.TP
-.B clear
-.I device_name
-.br
-Destroys the table in the inactive table slot for device_name.
-.br
-.TP
-.B create
-.I device_name
-.RB [ \-u
-.IR uuid ]
-.RB [ \-\-notable | \-\-table
-.RI < \fItable >| table_file ]
-.RB [{ \-\-addnodeoncreate | \-\-addnodeonresume }]
-.RB [ \-\-readahead
-.RI [ + ]< sectors >| auto | none ]
-.br
-Creates a device with the given name.
-If table_file or <table> is supplied, the table is loaded and made live.
-Otherwise a table is read from standard input unless \-\-notable is used.
-The optional uuid can be used in place of
-device_name in subsequent dmsetup commands.
-If successful a device will appear as
-/dev/mapper/<device-name>.
-See below for information on the table format.
-.br
-.TP
-.B deps
-.RB [ \-o
-.IR options ]
-.RI [ device_name ]
-.br
-Outputs a list of devices referenced by the live table for the specified
-device. Device names on output can be customised by following options:
-devno (major and minor pair, used by default), blkdevname (block device name),
-devname (map name for device-mapper devices, equal to blkdevname otherwise).
-.br
-.TP
-.B help
-.RB [ \-c | \-C | \-\-columns ]
-.br
-Outputs a summary of the commands available, optionally including
-the list of report fields.
-.br
-.TP
-.B info
-.RI [ device_name ]
-.br
-Outputs some brief information about the device in the form:
-.RS
-.RS
- State: SUSPENDED|ACTIVE, READ-ONLY
- Tables present: LIVE and/or INACTIVE
- Open reference count
- Last event sequence number (used by \fBwait\fP)
- Major and minor device number
- Number of targets in the live table
- UUID
-.RE
-.RE
-.br
-.TP
-.B info
-.BR \-c | \-C | \-\-columns
-.RB [ \-\-noheadings ]
-.RB [ \-\-separator
-.IR separator ]
-.RB [ \-o
-.IR fields ]
-.RB [ \-O | \-\-sort
-.IR sort_fields ]
-.RI [ device_name ]
-.br
-Output you can customise.
-Fields are comma-separated and chosen from the following list:
-name, major, minor, attr, open, segments, events, uuid.
-Attributes are: (L)ive, (I)nactive, (s)uspended, (r)ead-only, read-(w)rite.
-Precede the list with '+' to append
-to the default selection of columns instead of replacing it.
-Precede any sort_field with - for a reverse sort on that column.
-.br
-.TP
-.B ls
-.RB [ \-\-target
-.IR target_type ]
-.RB [ \-\-exec
-.IR command ]
-.RB [ \-\-tree ]
-.RB [ \-o
-.IR options ]
-.br
-List device names. Optionally only list devices that have at least
-one target of the specified type. Optionally execute a command for
-each device. The device name is appended to the supplied command.
-Device names on output can be customised by following options: devno (major
-and minor pair, used by default), blkdevname (block device name),
-devname (map name for device-mapper devices, equal to blkdevname otherwise).
---tree displays dependencies between devices as a tree.
-It accepts a comma-separate list of options.
-Some specify the information displayed against each node:
-device/nodevice; blkdevname; active, open, rw, uuid.
-Others specify how the tree is displayed:
-ascii, utf, vt100; compact, inverted, notrunc.
-.br
-.HP
-.BR load | reload
-.I device_name
-.RB [ \-\-table
-.RI < table >| table_file ]
-.br
-Loads <table> or table_file into the inactive table slot for device_name.
-If neither is supplied, reads a table from standard input.
-.br
-.HP
-.B wipe_table
-.I device_name
-.br
-Wait for any I/O in-flight through the device to complete, then
-replace the table with a new table that fails any new I/O
-sent to the device. If successful, this should release any devices
-held open by the device's table(s).
-.br
-.HP
-.B message
-.I device_name sector message
-.br
-Send message to target. If sector not needed use 0.
-.br
-.HP
-.B mknodes
-.RI [ device_name ]
-.br
-Ensure that the node in /dev/mapper for device_name is correct.
-If no device_name is supplied, ensure that all nodes in /dev/mapper
-correspond to mapped devices currently loaded by the device-mapper kernel
-driver, adding, changing or removing nodes as necessary.
-.br
-.HP
-.B mangle
-.RI [ device_name ]
-.br
-Ensure existing device-mapper device name and UUID is in the correct mangled
-form containing only whitelisted characters (supported by udev) and do
-a rename if necessary. Any character not on the whitelist will be mangled
-based on the --manglename setting. Automatic rename works only for device
-names and not for device UUIDs because the kernel does not allow changing
-the UUID of active devices. Any incorrect UUIDs are reported only and they
-must be manually corrected by deactivating the device first and then
-reactivating it with proper mangling mode used (see also --manglename).
-.br
-.HP
-.B remove
-.RB [ \-f | \-\-force ]
-.RB [ \-\-retry ]
-.I device_name
-.br
-Removes a device. It will no longer be visible to dmsetup.
-Open devices cannot be removed except with older kernels
-that contain a version of device-mapper prior to 4.8.0.
-In this case the device will be deleted when its open_count
-drops to zero. From version 4.8.0 onwards, if a device can't
-be removed because an uninterruptible process is waiting for
-I/O to return from it, adding \-\-force will replace the table
-with one that fails all I/O, which might allow the
-process to be killed. If an attempt to remove a device fails,
-perhaps because a process run from a quick udev rule
-temporarily opened the device, the \-\-retry option will cause
-the operation to be retried for a few seconds before failing.
-.br
-.HP
-.B remove_all
-.RB [ \-f | \-\-force ]
-.br
-Attempts to remove all device definitions i.e. reset the driver.
-Use with care! From version 4.8.0 onwards, if devices can't
-be removed because uninterruptible processes are waiting for
-I/O to return from them, adding \-\-force will replace the table
-with one that fails all I/O, which might allow the
-process to be killed. This also runs \fBmknodes\fP afterwards.
-.br
-.HP
-.B rename
-.I device_name new_name
-.br
-Renames a device.
-.br
-.HP
-.B rename
-.I device_name
-.B \-\-setuuid
-.I uuid
-.br
-Sets the uuid of a device that was created without a uuid.
-After a uuid has been set it cannot be changed.
-.br
-.TP
-.B resume
-.I device_name
-.RB [{ \-\-addnodeoncreate | \-\-addnodeonresume }]
-.RB [ \-\-readahead
-.RI [ + ]< sectors >| auto | none ]
-.br
-Un-suspends a device.
-If an inactive table has been loaded, it becomes live.
-Postponed I/O then gets re-queued for processing.
-.br
-.TP
-.B setgeometry \fIdevice_name cyl head sect start
-.br
-Sets the device geometry to C/H/S.
-.br
-.HP
-.B splitname
-.I device_name
-.RI [ subsystem ]
-.br
-Splits given device name into subsystem constituents.
-Default subsystem is LVM.
-.br
-.TP
-.B status
-.RB [ \-\-target
-.IR target_type ]
-.RB [ \-\-noflush ]
-.RI [ device_name ]
-.br
-Outputs status information for each of the device's targets.
-With \-\-target, only information relating to the specified target type
-any is displayed. With \-\-noflush, the thin target (from version 1.3.0)
-doesn't commit any outstanding changes to disk before reporting its statistics.
-.br
-.HP
-.B suspend
-.RB [ \-\-nolockfs ]
-.RB [ \-\-noflush ]
-.I device_name
-.br
-Suspends a device. Any I/O that has already been mapped by the device
-but has not yet completed will be flushed. Any further I/O to that
-device will be postponed for as long as the device is suspended.
-If there's a filesystem on the device which supports the operation,
-an attempt will be made to sync it first unless \-\-nolockfs is specified.
-Some targets such as recent (October 2006) versions of multipath may support
-the \-\-noflush option. This lets outstanding I/O that has not yet reached the
-device to remain unflushed.
-.br
-.TP
-.B table
-.RB [ \-\-target
-.IR target_type ]
-.RB [ \-\-showkeys ]
-.RI [ device_name ]
-.br
-Outputs the current table for the device in a format that can be fed
-back in using the create or load commands.
-With \-\-target, only information relating to the specified target type
-is displayed.
-Encryption keys are suppressed in the table output for the crypt
-target unless the \-\-showkeys parameter is supplied.
-.br
-.TP
-.B targets
-.br
-Displays the names and versions of the currently-loaded targets.
-.br
-.HP
-.B udevcomplete
-.I cookie
-.br
-Wake any processes that are waiting for udev to complete processing the specified cookie.
-.br
-.HP
-.B udevcomplete_all
-.RI [ age_in_minutes ]
-.br
-Remove all cookies older than the specified number of minutes.
-Any process waiting on a cookie will be resumed immediately.
-.br
-.HP
-.B udevcookies
-.br
-List all existing cookies. Cookies are system-wide semaphores with keys
-prefixed by two predefined bytes (0x0D4D).
-.br
-.TP
-.B udevcreatecookie
-.br
-Creates a new cookie to synchronize actions with udev processing.
-The output is a cookie value. Normally we don't need to create cookies since
-dmsetup creates and destroys them for each action automatically. However, we can
-generate one explicitly to group several actions together and use only one
-cookie instead. We can define a cookie to use for each relevant command by using
-\-\-udevcookie option. Alternatively, we can export this value into the environment
-of the dmsetup process as DM_UDEV_COOKIE variable and it will be used automatically
-with all subsequent commands until it is unset.
-Invoking this command will create system-wide semaphore that needs to be cleaned
-up explicitly by calling udevreleasecookie command.
-.br
-.HP
-.B udevflags
-.I cookie
-.br
-Parses given cookie value and extracts any udev control flags encoded.
-The output is in environment key format that is suitable for use in udev
-rules. If the flag has its symbolic name assigned then the output is
-DM_UDEV_FLAG_<flag_name>='1', DM_UDEV_FLAG<flag_position>='1' otherwise.
-Subsystem udev flags don't have symbolic names assigned and these ones are
-always reported as DM_SUBSYSTEM_UDEV_FLAG<flag_position>='1'. There are
-16 udev flags altogether.
-.br
-.HP
-.B udevreleasecookie
-.RI [ cookie ]
-.br
-Waits for all pending udev processing bound to given cookie value and clean up
-the cookie with underlying semaphore. If the cookie is not given directly,
-the command will try to use a value defined by DM_UDEV_COOKIE environment variable.
-.br
-.TP
-.B version
-.br
-Outputs version information.
-
-.TP
-.B wait
-.RB [ \-\-noflush ]
-.I device_name
-.RI [ event_nr ]
-.br
-Sleeps until the event counter for device_name exceeds event_nr.
-Use \-v to see the event number returned.
-To wait until the next event is triggered, use \fBinfo\fP to find
-the last event number.
-With \-\-noflush, the thin target (from version 1.3.0) doesn't commit
-any outstanding changes to disk before reporting its statistics.
-.SH TABLE FORMAT
-Each line of the table specifies a single target and is of the form:
-.P
-.I logical_start_sector num_sectors
-.B target_type
-.RI < target_args >
-.P
-Simple target types and <target_args> include:
-.HP
-.B linear
-.I destination_device start_sector
-.br
-The traditional linear mapping.
-.HP
-.B striped
-.I num_stripes chunk_size
-.RI [ destination
-.IR start_sector ]+
-.br
-Creates a striped area.
-.br
-e.g. striped 2 32 /dev/hda1 0 /dev/hdb1 0
-will map the first chunk (16k) as follows:
-.RS
-.RS
- LV chunk 1 -> hda1, chunk 1
- LV chunk 2 -> hdb1, chunk 1
- LV chunk 3 -> hda1, chunk 2
- LV chunk 4 -> hdb1, chunk 2
- etc.
-.RE
-.RE
-.TP
-.B error
-.br
-Errors any I/O that goes to this area. Useful for testing or
-for creating devices with holes in them.
-.TP
-.B zero
-.br
-Returns blocks of zeroes on reads. Any data written is discarded silently.
-This is a block-device equivalent of the /dev/zero character-device data sink
-described in \fBnull(4)\fP.
-.P
-More complex targets include:
-.TP
-.B crypt
-.br
-Transparent encryption of block devices using the kernel crypto API.
-.TP
-.B delay
-.br
-Delays reads and/or writes to different devices. Useful for testing.
-.TP
-.B flakey
-.br
-Creates a similar mapping to the linear target but
-exhibits unreliable behaviour periodically.
-Useful for simulating failing devices when testing.
-.TP
-.B mirror
-.br
-Mirrors data across two or more devices.
-.HP
-.B multipath
-.br
-Mediates access through multiple paths to the same device.
-.TP
-.BR raid
-.br
-Offers an interface to the kernel's software raid driver, md.
-.HP
-.B snapshot
-.br
-Supports snapshots of devices.
-.P
-To find out more about the various targets and their table formats and status
-lines, please read the files in the Documentation/device-mapper directory in
-the kernel source tree.
-(Your distribution might include a copy of this information in the
-documentation directory for the device-mapper package.)
-
-.SH EXAMPLES
-
-# A table to join two disks together
-.br
-.br
-0 1028160 linear /dev/hda 0
-.br
-1028160 3903762 linear /dev/hdb 0
-
-
-# A table to stripe across the two disks,
-.br
-# and add the spare space from
-.br
-# hdb to the back of the volume
-
-0 2056320 striped 2 32 /dev/hda 0 /dev/hdb 0
-.br
-2056320 2875602 linear /dev/hdb 1028160
-
-.SH ENVIRONMENT VARIABLES
-.TP
-.B DM_DEV_DIR
-The device directory name.
-Defaults to "/dev" and must be an absolute path.
-.TP
-.B DM_UDEV_COOKIE
-A cookie to use for all relevant commands to synchronize with udev processing.
-It is an alternative to using \-\-udevcookie option.
-
-.SH AUTHORS
-Original version: Joe Thornber (thornber@sistina.com)
-
-.SH SEE ALSO
-Device-mapper resource page: http://sources.redhat.com/dm/
diff --git a/man/dmsetup.8_main b/man/dmsetup.8_main
new file mode 100644
index 0000000..0c53e39
--- /dev/null
+++ b/man/dmsetup.8_main
@@ -0,0 +1,1100 @@
+.TH DMSETUP 8 "Apr 06 2006" "Linux" "MAINTENANCE COMMANDS"
+.
+.SH NAME
+.
+dmsetup \(em low level logical volume management
+.
+.SH SYNOPSIS
+.
+.\".nh
+.ad l
+.PD 0
+.HP 9
+.B dmsetup
+.de CMD_CLEAR
+. BR clear
+. IR device_name
+..
+.CMD_CLEAR
+.
+.HP
+.B dmsetup
+.de CMD_CREATE
+. ad l
+. nh
+. BR create
+. IR device_name
+. RB [ -n | --notable |\: --table
+. IR table |\: table_file ]
+. RB [ --readahead
+. RB [ + ] \fIsectors |\: auto | none ]
+. RB [ -u | --uuid
+. IR uuid ]
+. RB [ --addnodeoncreate |\: --addnodeonresume ]
+. hy
+. ad b
+..
+.CMD_CREATE
+.
+.HP
+.B dmsetup
+.de CMD_CREATE_CONCISE
+. ad l
+. BR create
+. BR --concise
+. RI [ concise_device_specification ]
+. ad b
+..
+.CMD_CREATE_CONCISE
+.
+.HP
+.B dmsetup
+.de CMD_DEPS
+. ad l
+. BR deps
+. RB [ -o
+. IR options ]
+. RI [ device_name ...]
+. ad b
+..
+.CMD_DEPS
+.
+.HP
+.B dmsetup
+.de CMD_HELP
+. BR help
+. RB [ -c | -C | --columns ]
+..
+.CMD_HELP
+.
+.HP
+.B dmsetup
+.de CMD_INFO
+. BR info
+. RI [ device_name ...]
+..
+.CMD_INFO
+.
+.HP
+.B dmsetup
+.de CMD_INFOLONG
+. ad l
+. nh
+. BR info
+. BR -c | -C | --columns
+. RB [ --count
+. IR count ]
+. RB [ --interval
+. IR seconds ]
+. RB [ --noheadings ]
+. RB [ -o
+. IR fields ]
+. RB [ -O | --sort
+. IR sort_fields ]
+. RB [ --nameprefixes ]
+. RB [ --separator
+. IR separator ]
+. RI [ device_name ]
+. hy
+. ad b
+..
+.CMD_INFOLONG
+.
+.HP
+.B dmsetup
+.de CMD_LOAD
+. ad l
+. BR load
+. IR device_name
+. RB [ --table
+. IR table | table_file ]
+. ad b
+..
+.CMD_LOAD
+.
+.HP
+.B dmsetup
+.de CMD_LS
+. ad l
+. nh
+. BR ls
+. RB [ --target
+. IR target_type ]
+. RB [ -o
+. IR options ]
+. RB [ --exec
+. IR command ]
+. RB [ --tree ]
+. hy
+. ad b
+..
+.CMD_LS
+.
+.HP
+.B dmsetup
+.de CMD_MANGLE
+. BR mangle
+. RI [ device_name ...]
+..
+.CMD_MANGLE
+.
+.HP
+.B dmsetup
+.de CMD_MEASURE
+. BR measure
+. RI [ device_name ...]
+..
+.CMD_MEASURE
+.
+.HP
+.B dmsetup
+.de CMD_MESSAGE
+. BR message
+. IR device_name
+. IR sector
+. IR message
+..
+.CMD_MESSAGE
+.
+.HP
+.B dmsetup
+.de CMD_MKNODES
+. BR mknodes
+. RI [ device_name ...]
+..
+.CMD_MKNODES
+.
+.HP
+.B dmsetup
+.de CMD_RELOAD
+. ad l
+. BR reload
+. IR device_name
+. RB [ --table
+. IR table | table_file ]
+. ad b
+..
+.CMD_RELOAD
+.
+.HP
+.B dmsetup
+.de CMD_REMOVE
+. ad l
+. BR remove
+. RB [ -f | --force ]
+. RB [ --retry ]
+. RB [ --deferred ]
+. IR device_name ...
+. ad b
+..
+.CMD_REMOVE
+.
+.HP
+.B dmsetup
+.de CMD_REMOVE_ALL
+. BR remove_all
+. RB [ -f | --force ]
+. RB [ --deferred ]
+..
+.CMD_REMOVE_ALL
+.
+.HP
+.B dmsetup
+.de CMD_RENAME
+. BR rename
+. IR device_name
+. IR new_name
+..
+.CMD_RENAME
+.
+.HP
+.B dmsetup
+.de CMD_RENAME_UUID
+. BR rename
+. IR device_name
+. BR --setuuid
+. IR uuid
+..
+.CMD_RENAME_UUID
+.
+.HP
+.B dmsetup
+.de CMD_RESUME
+. ad l
+. BR resume
+. IR device_name ...
+. RB [ --addnodeoncreate | --addnodeonresume ]
+. RB [ --noflush ]
+. RB [ --nolockfs ]
+. RB \%[ --readahead
+. RB \%[ + ] \fIsectors | auto | none ]
+. ad b
+..
+.CMD_RESUME
+.
+.HP
+.B dmsetup
+.de CMD_SETGEOMETRY
+. ad l
+. nh
+. BR setgeometry
+. IR device_name
+. IR cyl
+. IR head
+. IR sect
+. IR start
+. hy
+. ad b
+..
+.CMD_SETGEOMETRY
+.
+.HP
+.B dmsetup
+.de CMD_SPLITNAME
+. BR splitname
+. IR device_name
+. RI [ subsystem ]
+..
+.CMD_SPLITNAME
+.
+.HP
+.B dmsetup
+.de CMD_STATS
+. BR stats
+. IR command
+. RI [ options ]
+..
+.CMD_STATS
+.
+.HP
+.B dmsetup
+.de CMD_STATUS
+. ad l
+. BR status
+. RB [ --target
+. IR target_type ]
+. RB [ --noflush ]
+. RI [ device_name ...]
+. ad b
+..
+.CMD_STATUS
+.
+.HP
+.B dmsetup
+.de CMD_SUSPEND
+. ad l
+. nh
+. BR suspend
+. RB [ --nolockfs ]
+. RB [ --noflush ]
+. IR device_name ...
+. hy
+. ad b
+..
+.CMD_SUSPEND
+.
+.HP
+.B dmsetup
+.de CMD_TABLE
+. ad l
+. nh
+. BR table
+. RB [ --concise ]
+. RB [ --target
+. IR target_type ]
+. RB [ --showkeys ]
+. RI [ device_name ...]
+. hy
+. ad b
+..
+.CMD_TABLE
+.
+.HP
+.B dmsetup
+.de CMD_TARGETS
+. BR targets
+..
+.CMD_TARGETS
+.
+.HP
+.B dmsetup
+.de CMD_UDEVCOMPLETE
+. BR udevcomplete
+. IR cookie
+..
+.CMD_UDEVCOMPLETE
+.
+.HP
+.B dmsetup
+.de CMD_UDEVCOMPLETE_ALL
+. BR udevcomplete_all
+. RI [ age_in_minutes ]
+..
+.CMD_UDEVCOMPLETE_ALL
+.
+.HP
+.B dmsetup
+.de CMD_UDEVCOOKIES
+. BR udevcookie
+..
+.CMD_UDEVCOOKIES
+.
+.HP
+.B dmsetup
+.de CMD_UDEVCREATECOOKIE
+. BR udevcreatecookie
+..
+.CMD_UDEVCREATECOOKIE
+.
+.HP
+.B dmsetup
+.de CMD_UDEVFLAGS
+. BR udevflags
+. IR cookie
+..
+.CMD_UDEVFLAGS
+.
+.HP
+.B dmsetup
+.de CMD_UDEVRELEASECOOKIE
+. BR udevreleasecookie
+. RI [ cookie ]
+..
+.CMD_UDEVRELEASECOOKIE
+.
+.HP
+.B dmsetup
+.de CMD_VERSION
+. BR version
+..
+.CMD_VERSION
+.
+.HP
+.B dmsetup
+.de CMD_WAIT
+. ad l
+. nh
+. BR wait
+. RB [ --noflush ]
+. IR device_name
+. RI [ event_nr ]
+. hy
+. ad b
+..
+.CMD_WAIT
+.
+.HP
+.B dmsetup
+.de CMD_WIPE_TABLE
+. ad l
+. nh
+. BR wipe_table
+. IR device_name ...
+. RB [ -f | --force ]
+. RB [ --noflush ]
+. RB [ --nolockfs ]
+. hy
+. ad b
+..
+.CMD_WIPE_TABLE
+.
+.TP
+\ \&
+.
+.TP
+.B devmap_name \fImajor minor
+.TP
+.B devmap_name \fImajor:minor
+.PD
+.ad b
+.
+.SH DESCRIPTION
+.
+dmsetup manages logical devices that use the device-mapper driver.
+Devices are created by loading a table that specifies a target for
+each sector (512 bytes) in the logical device.
+.P
+The first argument to dmsetup is a command.
+The second argument is the logical device name or uuid.
+.P
+Invoking the dmsetup tool as \fBdevmap_name\fP
+(which is not normally distributed and is supported
+only for historical reasons) is equivalent to
+.BI \%dmsetup\ info\ -c\ --noheadings\ -j \ major\ -m \ minor \c
+\fR.
+.\" dot above here fixes -Thtml rendering for next HP option
+.
+.SH OPTIONS
+.
+.TP
+.B --addnodeoncreate
+Ensure \fI/dev/mapper\fP node exists after \fBdmsetup create\fP.
+.
+.TP
+.B --addnodeonresume
+Ensure \fI/dev/mapper\fP node exists after \fBdmsetup\ resume\fP (default with udev).
+.
+.TP
+.B --checks
+Perform additional checks on the operations requested and report
+potential problems. Useful when debugging scripts.
+In some cases these checks may slow down operations noticeably.
+.
+.TP
+.BR -c | -C | --columns
+Display output in columns rather than as Field: Value lines.
+.
+.TP
+.B --count \fIcount
+Specify the number of times to repeat a report. Set this to zero
+continue until interrupted. The default interval is one second.
+.
+.TP
+.BR -f | --force
+Try harder to complete operation.
+.
+.TP
+.BR -h | --help
+Outputs a summary of the commands available, optionally including
+the list of report fields (synonym with \fBhelp\fP command).
+.
+.TP
+.B --inactive
+When returning any table information from the kernel report on the
+inactive table instead of the live table.
+Requires kernel driver version 4.16.0 or above.
+.
+.TP
+.B --interval \fIseconds
+Specify the interval in seconds between successive iterations for
+repeating reports. If \fB--interval\fP is specified but \fB--count\fP
+is not, reports will continue to repeat until interrupted.
+The default interval is one second.
+.
+.TP
+.BR --manglename " " auto | hex | none
+Mangle any character not on a whitelist using mangling_mode when
+processing device-mapper device names and UUIDs. The names and UUIDs
+are mangled on input and unmangled on output where the mangling mode
+is one of:
+\fBauto\fP (only do the mangling if not mangled yet, do nothing
+if already mangled, error on mixed),
+\fBhex\fP (always do the mangling) and
+\fBnone\fP (no mangling).
+Default mode is \fB#DEFAULT_MANGLING#\fP.
+Character whitelist: 0-9, A-Z, a-z, #+\-.:=@_. This whitelist is
+also supported by udev. Any character not on a whitelist is replaced
+with its hex value (two digits) prefixed by \\x.
+Mangling mode could be also set through
+\fBDM_DEFAULT_NAME_MANGLING_MODE\fP
+environment variable.
+.
+.TP
+.BR -j | --major " " \fImajor
+Specify the major number.
+.
+.TP
+.BR -m | --minor " " \fIminor
+Specify the minor number.
+.
+.TP
+.BR -n | --notable
+When creating a device, don't load any table.
+.
+.TP
+.B --nameprefixes
+Add a "DM_" 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 when using columnar output.
+.
+.TP
+.B --noflush
+Do not flush outstanding I/O when suspending a device, or do not
+commit thin-pool metadata when obtaining thin-pool status.
+.
+.TP
+.B --nolockfs
+Do not attempt to synchronize filesystem eg, when suspending a device.
+.
+.TP
+.B --noopencount
+Tell the kernel not to supply the open reference count for the device.
+.
+.TP
+.B --noudevrules
+Do not allow udev to manage nodes for devices in device-mapper directory.
+.
+.TP
+.B --noudevsync
+Do not synchronize with udev when creating, renaming or removing devices.
+.
+.TP
+.BR -o | --options " " \fIoptions
+Specify which fields to display.
+.
+.TP
+.BR --readahead \ [ + ] \fIsectors | auto | none
+Specify read ahead size in units of sectors.
+The default value is \fBauto\fP which allows the kernel to choose
+a suitable value automatically. The \fB+\fP prefix lets you
+specify a minimum value which will not be used if it is
+smaller than the value chosen by the kernel.
+The value \fBnone\fP is equivalent to specifying zero.
+.
+.TP
+.BR -r | --readonly
+Set the table being loaded read-only.
+.
+.TP
+.BR -S | --select " " \fIselection
+Process only items that match \fIselection\fP criteria. If the command is
+producing report output, adding the "selected" column (\fB-o
+selected\fP) displays all rows and shows 1 if the row matches the
+\fIselection\fP and 0 otherwise. The selection criteria are defined by
+specifying column names and their valid values while making use of supported
+comparison operators. As a quick help and to see full list of column names that
+can be used in selection and the set of supported selection operators, check
+the output of \fBdmsetup\ info\ -c\ -S\ help\fP command.
+.
+.TP
+.B --table \fItable
+Specify a one-line table directly on the command line.
+See below for more information on the table format.
+.
+.TP
+.B --udevcookie \fIcookie
+Use cookie for udev synchronization.
+Note: Same cookie should be used for same type of operations i.e. creation of
+multiple different devices. It's not advised to combine different
+operations on the single device.
+.
+.TP
+.BR -u | --uuid " " \fIuuid
+Specify the \fIuuid\fP.
+.
+.TP
+.BR -y | --yes
+Answer yes to all prompts automatically.
+.
+.TP
+.BR -v | --verbose " [" -v | --verbose ]
+Produce additional output.
+.
+.TP
+.B --verifyudev
+If udev synchronization is enabled, verify that udev operations get performed
+correctly and try to fix up the device nodes afterwards if not.
+.
+.TP
+.B --version
+Display the library and kernel driver version.
+.
+.SH COMMANDS
+.
+.HP
+.CMD_CLEAR
+.br
+Destroys the table in the inactive table slot for device_name.
+.
+.HP
+.CMD_CREATE
+.br
+Creates a device with the given name.
+If \fItable\fP or \fItable_file\fP is supplied, the table is loaded and made live.
+Otherwise a table is read from standard input unless \fB--notable\fP is used.
+The optional \fIuuid\fP can be used in place of
+device_name in subsequent dmsetup commands.
+If successful the device will appear in table and for live
+device the node \fI/dev/mapper/device_name\fP is created.
+See below for more information on the table format.
+.
+.HP
+.CMD_CREATE_CONCISE
+.br
+Creates one or more devices from a concise device specification.
+Each device is specified by a comma-separated list: name, uuid, minor number, flags, comma-separated table lines.
+Flags defaults to read-write (rw) or may be read-only (ro).
+Uuid, minor number and flags are optional so those fields may be empty.
+A semi-colon separates specifications of different devices.
+Use a backslash to escape the following character, for example a comma or semi-colon in a name or table. See also CONCISE FORMAT below.
+.
+.HP
+.CMD_DEPS
+.br
+Outputs a list of devices referenced by the live table for the specified
+device. Device names on output can be customised by following \fIoptions\fP:
+\fBdevno\fP (major and minor pair, used by default),
+\fBblkdevname\fP (block device name),
+\fBdevname\fP (map name for device-mapper devices, equal to blkdevname otherwise).
+.
+.HP
+.CMD_HELP
+.br
+Outputs a summary of the commands available, optionally including
+the list of report fields.
+.
+.HP
+.CMD_INFO
+.br
+Outputs some brief information about the device in the form:
+.RS
+.RS
+ State: SUSPENDED|ACTIVE, READ-ONLY
+ Tables present: LIVE and/or INACTIVE
+ Open reference count
+ Last event sequence number (used by \fBwait\fP)
+ Major and minor device number
+ Number of targets in the live table
+ UUID
+.RE
+.RE
+.HP
+.CMD_INFOLONG
+.br
+Output you can customise.
+Fields are comma-separated and chosen from the following list:
+.BR name ,
+.BR major ,
+.BR minor ,
+.BR attr ,
+.BR open ,
+.BR segments ,
+.BR events ,
+.BR uuid .
+Attributes are:
+.RB ( L )ive,
+.RB ( I )nactive,
+.RB ( s )uspended,
+.RB ( r )ead-only,
+.RB read-( w )rite.
+Precede the list with '\fB+\fP' to append
+to the default selection of columns instead of replacing it.
+Precede any sort field with '\fB-\fP' for a reverse sort on that column.
+.
+.HP
+.CMD_LS
+.br
+List device names. Optionally only list devices that have at least
+one target of the specified type. Optionally execute a command for
+each device. The device name is appended to the supplied command.
+Device names on output can be customised by following options:
+\fBdevno\fP (major and minor pair, used by default),
+\fBblkdevname\fP (block device name),
+\fBdevname\fP (map name for device-mapper devices, equal to blkdevname otherwise).
+\fB--tree\fP displays dependencies between devices as a tree.
+It accepts a comma-separate list of \fIoptions\fP.
+Some specify the information displayed against each node:
+.BR device / nodevice ;
+.BR blkdevname ;
+.BR active ", " open ", " rw ", " uuid .
+Others specify how the tree is displayed:
+.BR ascii ", " utf ", " vt100 ;
+.BR compact ", " inverted ", " notrunc .
+.
+.HP
+.BR load | \c
+.CMD_RELOAD
+.br
+Loads \fItable\fP or \fItable_file\fP into the inactive table slot for device_name.
+If neither is supplied, reads a table from standard input.
+.
+.HP
+.CMD_MANGLE
+.br
+Ensure existing device-mapper \fIdevice_name\fP and UUID is in the correct mangled
+form containing only whitelisted characters (supported by udev) and do
+a rename if necessary. Any character not on the whitelist will be mangled
+based on the \fB--manglename\fP setting. Automatic rename works only for device
+names and not for device UUIDs because the kernel does not allow changing
+the UUID of active devices. Any incorrect UUIDs are reported only and they
+must be manually corrected by deactivating the device first and then
+reactivating it with proper mangling mode used (see also \fB--manglename\fP).
+.
+.HP
+.CMD_MEASURE
+.br
+Show the data that \fIdevice_name\fP would report to the IMA subsystem
+if a measurement was triggered at the current time.
+This is for debugging and does not actually trigger a measurement.
+.
+.HP
+.CMD_MESSAGE
+.br
+Send message to target. If sector not needed use 0.
+.
+.HP
+.CMD_MKNODES
+.br
+Ensure that the node in \fI/dev/mapper\fP for \fIdevice_name\fP is correct.
+If no device_name is supplied, ensure that all nodes in \fI/dev/mapper\fP
+correspond to mapped devices currently loaded by the device-mapper kernel
+driver, adding, changing or removing nodes as necessary.
+.
+.HP
+.CMD_REMOVE
+.br
+Removes a device. It will no longer be visible to dmsetup. Open devices
+cannot be removed, but adding \fB--force\fP will replace the table with one
+that fails all I/O. \fB--deferred\fP will enable deferred removal of open
+devices - the device will be removed when the last user closes it. The deferred
+removal feature is supported since version 4.27.0 of the device-mapper
+driver available in upstream kernel version 3.13. (Use \fBdmsetup version\fP
+to check this.) If an attempt to remove a device fails, perhaps because a process run
+from a quick udev rule temporarily opened the device, the \fB--retry\fP
+option will cause the operation to be retried for a few seconds before failing.
+Do NOT combine
+\fB--force\fP and \fB--udevcookie\fP, as udev may start to process udev
+rules in the middle of error target replacement and result in nondeterministic
+result.
+.
+.HP
+.CMD_REMOVE_ALL
+.br
+Attempts to remove all device definitions i.e. reset the driver. This also runs
+\fBmknodes\fP afterwards. Use with care! Open devices cannot be removed, but
+adding \fB--force\fP will replace the table with one that fails all I/O.
+\fB--deferred\fP will enable deferred removal of open devices - the device
+will be removed when the last user closes it. The deferred removal feature is
+supported since version 4.27.0 of the device-mapper driver available in
+upstream kernel version 3.13.
+.
+.HP
+.CMD_RENAME
+.br
+Renames a device.
+.
+.HP
+.CMD_RENAME_UUID
+.br
+Sets the uuid of a device that was created without a uuid.
+After a uuid has been set it cannot be changed.
+.
+.HP
+.CMD_RESUME
+.br
+Un-suspends a device.
+If an inactive table has been loaded, it becomes live.
+Postponed I/O then gets re-queued for processing.
+.
+.HP
+.CMD_SETGEOMETRY
+.br
+Sets the device geometry to C/H/S.
+.
+.HP
+.CMD_SPLITNAME
+.br
+Splits given \fIdevice name\fP into \fIsubsystem\fP constituents.
+The default subsystem is LVM.
+LVM currently generates device names by concatenating the names of the Volume
+Group, Logical Volume and any internal Layer with a hyphen as separator.
+Any hyphens within the names are doubled to escape them.
+The precise encoding might change without notice in any future
+release, so we recommend you always decode using the current version of
+this command.
+.HP
+.CMD_STATS
+.br
+Manages IO statistics regions for devices.
+See
+.BR dmstats (8)
+for more details.
+.HP
+.CMD_STATUS
+.br
+Outputs status information for each of the device's targets.
+With \fB--target\fP, only information relating to the specified target type
+any is displayed. With \fB--noflush\fP, the thin target (from version 1.3.0)
+doesn't commit any outstanding changes to disk before reporting its statistics.
+.
+.HP
+.CMD_SUSPEND
+.br
+Suspends a device. Any I/O that has already been mapped by the device
+but has not yet completed will be flushed. Any further I/O to that
+device will be postponed for as long as the device is suspended.
+If there's a filesystem on the device which supports the operation,
+an attempt will be made to sync it first unless \fB--nolockfs\fP is specified.
+Some targets such as recent (October 2006) versions of multipath may support
+the \fB--noflush\fP option. This lets outstanding I/O that has not yet reached the
+device to remain unflushed.
+.
+.HP
+.CMD_TABLE
+.br
+Outputs the current table for the device in a format that can be fed
+back in using the create or load commands.
+With \fB--target\fP, only information relating to the specified target type
+is displayed.
+Real encryption keys are suppressed in the table output for crypt and integrity
+targets unless the \fB--showkeys\fP parameter is supplied. Kernel key
+references prefixed with \fB:\fP are not affected by the parameter and get
+displayed always (crypt target only).
+With \fB--concise\fP, the output is presented concisely on a single line.
+Commas then separate the name, uuid, minor device number, flags ('ro' or 'rw')
+and the table (if present). Semi-colons separate devices. Backslashes escape
+any commas, semi-colons or backslashes. See CONCISE FORMAT below.
+.
+.HP
+.CMD_TARGETS
+.br
+Displays the names and versions of the currently-loaded targets.
+.
+.HP
+.CMD_UDEVCOMPLETE
+.br
+Wake any processes that are waiting for udev to complete processing the specified cookie.
+.
+.HP
+.CMD_UDEVCOMPLETE_ALL
+.br
+Remove all cookies older than the specified number of minutes.
+Any process waiting on a cookie will be resumed immediately.
+.
+.HP
+.CMD_UDEVCOOKIES
+.br
+List all existing cookies. Cookies are system-wide semaphores with keys
+prefixed by two predefined bytes (0x0D4D).
+.
+.HP
+.CMD_UDEVCREATECOOKIE
+.br
+Creates a new cookie to synchronize actions with udev processing.
+The output is a cookie value. Normally we don't need to create cookies since
+dmsetup creates and destroys them for each action automatically. However, we can
+generate one explicitly to group several actions together and use only one
+cookie instead. We can define a cookie to use for each relevant command by using
+\fB--udevcookie\fP option. Alternatively, we can export this value into the environment
+of the dmsetup process as \fBDM_UDEV_COOKIE\fP variable and it will be used automatically
+with all subsequent commands until it is unset.
+Invoking this command will create system-wide semaphore that needs to be cleaned
+up explicitly by calling udevreleasecookie command.
+.
+.HP
+.CMD_UDEVFLAGS
+.br
+Parses given \fIcookie\fP value and extracts any udev control flags encoded.
+The output is in environment key format that is suitable for use in udev
+rules. If the flag has its symbolic name assigned then the output is
+DM_UDEV_FLAG_<flag_name> = '1', DM_UDEV_FLAG<flag_position> = '1' otherwise.
+Subsystem udev flags don't have symbolic names assigned and these ones are
+always reported as DM_SUBSYSTEM_UDEV_FLAG<flag_position> = '1'. There are
+16 udev flags altogether.
+.
+.HP
+.CMD_UDEVRELEASECOOKIE
+.br
+Waits for all pending udev processing bound to given cookie value and clean up
+the cookie with underlying semaphore. If the cookie is not given directly,
+the command will try to use a value defined by \fBDM_UDEV_COOKIE\fP environment variable.
+.
+.HP
+.CMD_VERSION
+.br
+Outputs version information.
+.
+.HP
+.CMD_WAIT
+.br
+Sleeps until the event counter for device_name exceeds event_nr.
+Use \fB-v\fP to see the event number returned.
+To wait until the next event is triggered, use \fBinfo\fP to find
+the last event number.
+With \fB--noflush\fP, the thin target (from version 1.3.0) doesn't commit
+any outstanding changes to disk before reporting its statistics.
+.
+.HP
+.CMD_WIPE_TABLE
+.br
+Wait for any I/O in-flight through the device to complete, then
+replace the table with a new table that fails any new I/O
+sent to the device. If successful, this should release any devices
+held open by the device's table(s).
+.
+.SH TABLE FORMAT
+.
+Each line of the table specifies a single target and is of the form:
+.sp
+.I logical_start_sector num_sectors
+.B target_type
+.I target_args
+.sp
+Simple target types and target args include:
+.
+.TP
+.B linear \fIdestination_device start_sector
+The traditional linear mapping.
+.TP
+.B striped \fInum_stripes chunk_size \fR[\fIdestination start_sector\fR]...
+Creates a striped area.
+.br
+e.g. striped 2 32 /dev/hda1 0 /dev/hdb1 0
+will map the first chunk (16k) as follows:
+.RS
+.IP
+ LV chunk 1 \[->] hda1, chunk 1
+ LV chunk 2 \[->] hdb1, chunk 1
+ LV chunk 3 \[->] hda1, chunk 2
+ LV chunk 4 \[->] hdb1, chunk 2
+ etc.
+.RE
+.TP
+.B error
+Errors any I/O that goes to this area. Useful for testing or
+for creating devices with holes in them.
+.TP
+.B zero
+Returns blocks of zeroes on reads. Any data written is discarded silently.
+This is a block-device equivalent of the \fI/dev/zero\fP
+character-device data sink described in \fBnull\fP(4).
+.P
+More complex targets include:
+.TP
+.B cache
+Improves performance of a block device (eg, a spindle) by dynamically
+migrating some of its data to a faster smaller device (eg, an SSD).
+.TP
+.B crypt
+Transparent encryption of block devices using the kernel crypto API.
+.TP
+.B delay
+Delays reads and/or writes to different devices. Useful for testing.
+.TP
+.B flakey
+Creates a similar mapping to the linear target but
+exhibits unreliable behaviour periodically.
+Useful for simulating failing devices when testing.
+.TP
+.B mirror
+Mirrors data across two or more devices.
+.TP
+.B multipath
+Mediates access through multiple paths to the same device.
+.TP
+.B raid
+Offers an interface to the kernel's software raid driver, md.
+.TP
+.B snapshot
+Supports snapshots of devices.
+.TP
+.BR thin ", " thin-pool
+Supports thin provisioning of devices and also provides a better snapshot support.
+.P
+To find out more about the various targets and their table formats and status
+lines, please read the files in the Documentation/device-mapper directory in
+the kernel source tree.
+(Your distribution might include a copy of this information in the
+documentation directory for the device-mapper package.)
+.
+.SH EXAMPLES
+.
+.nf
+# A table to join two disks together
+0 1028160 linear /dev/hda 0
+1028160 3903762 linear /dev/hdb 0
+.P
+# A table to stripe across the two disks,
+# and add the spare space from
+# hdb to the back of the volume
+0 2056320 striped 2 32 /dev/hda 0 /dev/hdb 0
+2056320 2875602 linear /dev/hdb 1028160
+.fi
+.
+.SH CONCISE FORMAT
+.
+A concise representation of one of more devices.
+.sp
+.br
+- A comma separates the fields of each device.
+.br
+- A semi-colon separates devices.
+.TP
+The representation of a device takes the form:
+.ad l
+.nh
+<name>,<uuid>,\:<minor>,<flags>,\:<table>\:[,<table>+]\:[;<name>,<uuid>,\:<minor>,<flags>,<table>\:[,<table>+]]
+.hy
+.ad b
+.TP
+The fields are:
+.
+.TP
+.B name
+The name of the device.
+.TP
+.B uuid
+The UUID of the device (or empty).
+.TP
+.B minor
+The minor number of the device. If empty, the kernel assigns a suitable minor number.
+.TP
+.B flags
+Supported flags are:
+.br
+.ad l
+.B ro
+Sets the table being loaded for the device read-only
+.br
+.B rw
+Sets the table being loaded for the device read-write (default)
+.ad b
+.TP
+.B table
+One line of the table. See TABLE FORMAT above.
+.
+.SH EXAMPLES
+.
+.PD 0
+.ad l
+.nh
+# A simple linear read-only device
+.TP
+test-linear-small,,,ro,\:0 2097152 linear /dev/loop0 0,\:2097152 2097152 linear /dev/loop1 0
+.P
+# Two linear devices
+.TP
+test-linear-small,,,,\:0 2097152 linear /dev/loop0 0;\:test-linear-large,\:,,,\:0 2097152 linear /dev/loop1 0, 2097152 2097152 linear /dev/loop2 0
+.hy
+.ad b
+.PD
+.
+.SH ENVIRONMENT VARIABLES
+.
+.TP
+.B DM_DEV_DIR
+The device directory name.
+Defaults to "\fI/dev\fP" and must be an absolute path.
+.TP
+.B DM_UDEV_COOKIE
+A cookie to use for all relevant commands to synchronize with udev processing.
+It is an alternative to using \fB--udevcookie\fP option.
+.TP
+.B DM_DEFAULT_NAME_MANGLING_MODE
+A default mangling mode. Defaults to "\fB#DEFAULT_MANGLING#\fP"
+and it is an alternative to using \fB--manglename\fP option.
+.
+.SH AUTHORS
+.
+Original version: Joe Thornber <thornber@redhat.com>
+.
+.SH SEE ALSO
+.
+.BR dmstats (8),
+.BR udev (7),
+.BR udevadm (8)
+.P
+LVM2 resource page:
+.UR https://www.sourceware.org/lvm2
+.UE
+.br
+Device-mapper resource page:
+.UR http://sources.redhat.com/dm
+.UE
diff --git a/man/dmstats.8_main b/man/dmstats.8_main
new file mode 100644
index 0000000..a2d6493
--- /dev/null
+++ b/man/dmstats.8_main
@@ -0,0 +1,1244 @@
+.TH DMSTATS 8 "Jun 23 2016" "Linux" "MAINTENANCE COMMANDS"
+.
+.de OPT_PROGRAMS
+. RB [ --allprograms | --programid
+. IR id ]
+..
+.
+.de OPT_REGIONS
+. RB [ --allregions | --regionid
+. IR id ]
+..
+.de OPT_OBJECTS
+. RB [ --area ]
+. RB [ --region ]
+. RB [ --group ]
+..
+.de OPT_FOREGROUND
+. RB [ --foreground ]
+..
+.
+.\" Print units suffix, use with arg to print human
+.\" man2html can't handle too many changes per command
+.de UNITS
+. BR b | B | s | S | k | K | m | M | \c
+. BR g | G | t | T | p | P | e | E ]
+..
+.
+.\" Print help text for units, use with arg to print human
+.de HELP_UNITS
+. RB ( b )ytes,
+. RB ( s )ectors,
+. RB ( k )ilobytes,
+. RB ( m )egabytes,
+. RB ( g )igabytes,
+. RB ( t )erabytes,
+. RB ( p )etabytes,
+. RB ( e )xabytes.
+. nop Capitalise to use multiples of 1000 (S.I.) instead of 1024.
+..
+.
+.SH NAME
+.
+dmstats \(em device-mapper statistics management
+.
+.SH SYNOPSIS
+.
+.B dmsetup
+.B stats
+.I command
+[OPTIONS]
+.sp
+.
+.PD 0
+.HP
+.B dmstats
+.de CMD_COMMAND
+. ad l
+. nh
+. IR command
+. IR device_name \ |
+. BR --major
+. IR major
+. BR --minor
+. IR minor \ |
+. BR -u | --uuid
+. IR uuid
+. RB [ -v | --verbose ]
+. hy
+. ad b
+..
+.CMD_COMMAND
+.
+.HP
+.B dmstats
+.de CMD_CLEAR
+. ad l
+. nh
+. BR clear
+. IR device_name
+. OPT_PROGRAMS
+. OPT_REGIONS
+. hy
+. ad b
+..
+.CMD_CLEAR
+.
+.HP
+.B dmstats
+.de CMD_CREATE
+. ad l
+. nh
+. BR create
+. IR device_name ...| file_path ...| \fB--alldevices
+. RB [ --areas
+. IR nr_areas | \fB--areasize
+. IR area_size ]
+. RB [ --bounds
+. IR histogram_boundaries ]
+. RB [ --filemap ]
+. RB [ --follow
+. IR follow_mode ]
+. OPT_FOREGROUND
+. RB [ --nomonitor ]
+. RB [ --nogroup ]
+. RB [ --precise ]
+. RB [ --start
+. IR start_sector
+. BR --length
+. IR length | \fB--segments ]
+. RB [ --userdata
+. IR user_data ]
+. RB [ --programid
+. IR id ]
+. hy
+. ad b
+..
+.CMD_CREATE
+.
+.HP
+.B dmstats
+.de CMD_DELETE
+. ad l
+. nh
+. BR delete
+. IR device_name | \fB--alldevices
+. OPT_PROGRAMS
+. OPT_REGIONS
+. hy
+. ad b
+..
+.CMD_DELETE
+.
+.HP
+.B dmstats
+.de CMD_GROUP
+. ad l
+. nh
+. BR group
+. RI [ device_name | \fB--alldevices ]
+. RB [ --alias
+. IR name ]
+. RB [ --regions
+. IR regions ]
+. hy
+. ad b
+..
+.CMD_GROUP
+.HP
+.B dmstats
+.de CMD_HELP
+. ad l
+. BR help
+. RB [ -c | -C | --columns ]
+. ad b
+..
+.CMD_HELP
+.
+.HP
+.B dmstats
+.de CMD_LIST
+. ad l
+. nh
+. BR list
+. RI [ device_name ]
+. RB [ --histogram ]
+. OPT_PROGRAMS
+. RB [ --units
+. IR units ]
+. OPT_OBJECTS
+. RB [ --nosuffix ]
+. RB [ --notimesuffix ]
+. RB [ -v | --verbose ]
+. hy
+. ad b
+..
+.CMD_LIST
+.
+.HP
+.B dmstats
+.de CMD_PRINT
+. ad l
+. nh
+. BR print
+. RI [ device_name ]
+. RB [ --clear ]
+. OPT_PROGRAMS
+. OPT_REGIONS
+. hy
+. ad b
+..
+.CMD_PRINT
+.
+.HP
+.B dmstats
+.de CMD_REPORT
+. ad l
+. nh
+. BR report
+. RI [ device_name ]
+. RB [ --interval
+. IR seconds ]
+. RB [ --count
+. IR count ]
+. RB [ --units
+. IR units ]
+. RB [ --histogram ]
+. OPT_PROGRAMS
+. OPT_REGIONS
+. OPT_OBJECTS
+. RB [ -O | --sort
+. IR sort_fields ]
+. RB [ -S | --select
+. IR selection ]
+. RB [ --units
+. IR units ]
+. RB [ --nosuffix ]
+. RB [ --notimesuffix ]
+. hy
+. ad b
+..
+.CMD_REPORT
+.HP
+.B dmstats
+.de CMD_UNGROUP
+. ad l
+. nh
+. BR ungroup
+. RI [ device_name | \fB--alldevices ]
+. RB [ --groupid
+. IR id ]
+. hy
+. ad b
+..
+.CMD_UNGROUP
+.HP
+.B dmstats
+.de CMD_UPDATE_FILEMAP
+. ad l
+. nh
+. BR update_filemap
+. IR file_path
+. RB [ --groupid
+. IR id ]
+. RB [ --follow
+. IR follow_mode ]
+. OPT_FOREGROUND
+. hy
+. ad b
+..
+.CMD_UPDATE_FILEMAP
+.
+.PD
+.ad b
+.
+.SH DESCRIPTION
+.
+The dmstats program manages IO statistics regions for devices that use
+the device-mapper driver. Statistics regions may be created, deleted,
+listed and reported on using the tool.
+.P
+The first argument to dmstats is a \fIcommand\fP.
+.P
+The second argument is the \fIdevice name\fP,
+\fIuuid\fP or \fImajor\fP and \fIminor\fP numbers.
+.P
+Further options permit the selection of regions, output format
+control, and reporting behaviour.
+.P
+When no device argument is given dmstats will by default operate on all
+device-mapper devices present. The \fBcreate\fP and \fBdelete\fP
+commands require the use of \fB--alldevices\fP when used in this way.
+.
+.SH OPTIONS
+.
+.TP
+.B --alias \fIname
+Specify an alias name for a group.
+.
+.TP
+.B --alldevices
+If no device arguments are given allow operation on all devices when
+creating or deleting regions.
+.
+.TP
+.B --allprograms
+Include regions from all program IDs for list and report operations.
+.
+.TP
+.B --allregions
+Include all present regions for commands that normally accept a single
+region identifier.
+.
+.TP
+.B --area
+When performing a list or report, include objects of type area in the
+results.
+.
+.TP
+.B --areas \fInr_areas
+Specify the number of statistics areas to create within a new region.
+.
+.TP
+.B --areasize \fIarea_size\fR[\c
+.UNITS
+Specify the size of areas into which a new region should be divided. An
+optional suffix selects units of:
+.HELP_UNITS
+.
+.TP
+.B --clear
+When printing statistics counters, also atomically reset them to zero.
+.
+.TP
+.B --count \fIcount
+Specify the iteration count for repeating reports. If the count
+argument is zero reports will continue to repeat until interrupted.
+.
+.TP
+.B --group
+When performing a list or report, include objects of type group in the
+results.
+.
+.TP
+.B --filemap
+Instead of creating regions on a device as specified by command line
+options, open the file found at each \fBfile_path\fP argument, and
+create regions corresponding to the locations of the on-disk extents
+allocated to the file(s).
+.
+.TP
+.B --nomonitor
+Disable the \fBdmfilemapd\fP daemon when creating new file mapped
+groups. Normally the device-mapper filemap monitoring daemon,
+\fBdmfilemapd\fP, is started for each file mapped group to update the
+set of regions as the file changes on-disk: use of this option
+disables this behaviour.
+.sp
+Regions in the group may still be updated with the
+\fBupdate_filemap\fP command, or by starting the daemon manually.
+.
+.TP
+.B --follow \fIfollow_mode
+Specify the \fBdmfilemapd\fP file following mode. The file map
+monitoring daemon can monitor files in two distinct ways: the mode
+affects the behaviour of the daemon when a file under monitoring is
+renamed or unlinked, and the conditions which cause the daemon to
+terminate.
+.sp
+The \fBfollow_mode\fP argument is either "inode", for follow-inode
+mode, or "path", for follow-path.
+.sp
+If follow-inode mode is used, the daemon will hold the file open, and
+continue to update regions from the same file descriptor. This means
+that the mapping will follow rename, move (within the same file
+system), and unlink operations. This mode is useful if the file is
+expected to be moved, renamed, or unlinked while it is being
+monitored.
+.sp
+In follow-inode mode, the daemon will exit once it detects that the
+file has been unlinked and it is the last holder of a reference to it.
+.sp
+If follow-path is used, the daemon will re-open the provided path on
+each monitoring iteration. This means that the group will be updated
+to reflect a new file being moved to the same path as the original
+file. This mode is useful for files that are expected to be updated
+via unlink and rename.
+.sp
+In follow-path mode, the daemon will exit if the file is removed and
+not replaced within a brief tolerance interval.
+.sp
+In either mode, the daemon exits automatically if the monitored group
+is removed.
+.
+.TP
+.B --foreground
+Specify that the \fBdmfilemapd\fP daemon should run in the foreground.
+The daemon will not fork into the background, and will replace the
+\fBdmstats\fP command that started it.
+.
+.TP
+.B --groupid \fIid
+Specify the group to operate on.
+.
+.TP
+.B --bounds \fIhistogram_boundaries\c
+.RB [ ns | us | ms | s ]
+Specify the boundaries of a latency histogram to be tracked for the
+region as a comma separated list of latency values. Latency values are
+given in nanoseconds. An optional unit suffix of
+.BR ns , us , ms ,
+or \fBs\fP may be given after each value to specify units of
+nanoseconds, microseconds, milliseconds or seconds respectively.
+.
+.TP
+.B --histogram
+When used with the \fBreport\fP and \fBlist\fP commands select default
+fields that emphasize latency histogram data.
+.
+.TP
+.B --interval \fIseconds
+Specify the interval in seconds between successive iterations for
+repeating reports. If \fB--interval\fP is specified but
+\fB--count\fP is not,
+reports will continue to repeat until interrupted.
+.
+.TP
+.B --length \fIlength\fR[\c
+.UNITS
+Specify the length of a new statistics region in sectors. An optional
+suffix selects units of:
+.HELP_UNITS
+.
+.TP
+.BR -j | --major " " \fImajor
+Specify the major number.
+.
+.TP
+.BR -m | --minor " " \fIminor
+Specify the minor number.
+.
+.TP
+.B --nogroup
+When creating regions mapping the extents of a file in the file
+system, do not create a group or set an alias.
+.
+.TP
+.B --nosuffix
+Suppress the suffix on output sizes. Use with \fB--units\fP
+(except h and H) if processing the output.
+.
+.TP
+.B --notimesuffix
+Suppress the suffix on output time values. Histogram boundary values
+will be reported in units of nanoseconds.
+.
+.TP
+.BR -o | --options
+Specify which report fields to display.
+.
+.TP
+.BR -O | --sort " " \fIsort_fields
+Sort output according to the list of fields given. Precede any
+sort field with '\fB-\fP' for a reverse sort on that column.
+.
+.TP
+.B --precise
+Attempt to use nanosecond precision counters when creating new
+statistics regions.
+.
+.TP
+.B --programid \fIid
+Specify a program ID string. When creating new statistics regions this
+string is stored with the region. Subsequent operations may supply a
+program ID in order to select only regions with a matching value. The
+default program ID for dmstats-managed regions is "dmstats".
+.
+.TP
+.B --region
+When performing a list or report, include objects of type region in the
+results.
+.
+.TP
+.B --regionid \fIid
+Specify the region to operate on.
+.
+.TP
+.B --regions \fIregion_list
+Specify a list of regions to group. The group list is a comma-separated
+list of region identifiers. Continuous sequences of identifiers may be
+expressed as a hyphen separated range, for example: '1-10'.
+.
+.TP
+.B --relative
+If displaying the histogram report show relative (percentage) values
+instead of absolute counts.
+.
+.TP
+.BR -S | --select " " \fIselection
+Display only rows that match \fIselection\fP criteria. All rows with the
+additional "selected" column (\fB-o selected\fP) showing 1 if the row matches
+the \fIselection\fP and 0 otherwise. The selection criteria are defined by
+specifying column names and their valid values while making use of
+supported comparison operators.
+.
+.TP
+.B --start \fIstart\fR[\c
+.UNITS
+Specify the start offset of a new statistics region in sectors. An
+optional suffix selects units of:
+.HELP_UNITS
+.
+.TP
+.B --segments
+When used with \fBcreate\fP, create a new statistics region for each
+target contained in the given device(s). This causes a separate region
+to be allocated for each segment of the device.
+.sp
+The newly created regions are automatically placed into a group unless
+the \fB--nogroup\fP option is given. When grouping is enabled a group
+alias may be specified using the \fB--alias\fP option.
+.
+.TP
+.B --units \c
+.RI [ units ] \c
+.RB [ h | H | \c
+.UNITS
+Set the display units for report output.
+All sizes are output in these units:
+.RB ( h )uman-readable,
+.HELP_UNITS
+Can also specify custom units e.g. \fB--units\ 3M\fP.
+.
+.TP
+.B --userdata \fIuser_data
+Specify user data (a word) to be stored with a new region. The value
+is added to any internal auxiliary data (for example, group
+information), and stored with the region in the aux_data field provided
+by the kernel. Whitespace is not permitted.
+.
+.TP
+.BR -u | --uuid
+Specify the uuid.
+.
+.TP
+.BR -v | --verbose \ [ -v | --verbose ]
+Produce additional output.
+.
+.SH COMMANDS
+.
+.HP
+.CMD_CLEAR
+.br
+Instructs the kernel to clear statistics counters for the specified
+regions (with the exception of in-flight IO counters).
+.
+.HP
+.CMD_CREATE
+.br
+Creates one or more new statistics regions on the specified device(s).
+.sp
+The region will span the entire device unless \fB--start\fP and
+\fB--length\fP or \fB--segments\fP are given. The \fB--start\fP an
+\fB--length\fP options allow a region of arbitrary length to be placed
+at an arbitrary offset into the device. The \fB--segments\fP option
+causes a new region to be created for each target in the corresponding
+device-mapper device's table.
+.sp
+If the \fB--precise\fP option is used the command will attempt to
+create a region using nanosecond precision counters.
+.sp
+If \fB--bounds\fP is given a latency histogram will be tracked for
+the new region. The boundaries of the histogram bins are given as a
+comma separated list of latency values. There is an implicit lower bound
+of zero on the first bin and an implicit upper bound of infinity (or the
+configured interval duration) on the final bin.
+.sp
+Latencies are given in nanoseconds. An optional unit suffix of ns, us,
+ms, or s may be given after each value to specify units of nanoseconds,
+microseconds, milliseconds or seconds respectively, so for example, 10ms
+is equivalent to 10000000. Latency values with a precision of less than
+one millisecond can only be used when precise timestamps are enabled: if
+\fB--precise\fP is not given and values less than one millisecond are
+used it will be enabled automatically.
+.sp
+An optional \fBprogram_id\fP or \fBuser_data\fP string may be associated
+with the region. A \fBprogram_id\fP may then be used to select regions
+for subsequent list, print, and report operations. The \fBuser_data\fP
+stores an arbitrary string and is not used by dmstats or the
+device-mapper kernel statistics subsystem.
+.sp
+By default dmstats creates regions with a \fBprogram_id\fP of
+"dmstats".
+.sp
+On success the \fBregion_id\fP of the newly created region is printed
+to stdout.
+.sp
+If the \fB--filemap\fP option is given with a regular file, or list
+of files, as the \fBfile_path\fP argument, instead of creating regions
+with parameters specified on the command line, \fBdmstats\fP will open
+the files located at \fBfile_path\fP and create regions corresponding to
+the physical extents allocated to the file. This can be used to monitor
+statistics for individual files in the file system, for example, virtual
+machine images, swap areas, or large database files.
+.sp
+To work with the \fB--filemap\fP option, files must be located on a
+local file system, backed by a device-mapper device, that supports
+physical extent data using the FIEMAP ioctl (Ext4 and XFS for e.g.).
+.sp
+By default regions that map a file are placed into a group and the
+group alias is set to the basename of the file. This behaviour can be
+overridden with the \fB--alias\fP and \fB--nogroup\fP options.
+.sp
+Creating a group that maps a file automatically starts a daemon,
+\fBdmfilemapd\fP to monitor the file and update the mapping as the
+extents allocated to the file change. This behaviour can be disabled
+using the \fB--nomonitor\fP option.
+.sp
+Use the \fB--group\fP option to only display information for groups
+when listing and reporting.
+.
+.HP
+.CMD_DELETE
+.br
+Delete the specified statistics region. All counters and resources used
+by the region are released and the region will not appear in the output
+of subsequent list, print, or report operations.
+.sp
+All regions registered on a device may be removed using
+\fB--allregions\fP.
+.sp
+To remove all regions on all devices both \fB--allregions\fP and
+\fB--alldevices\fP must be used.
+.sp
+If a \fB--groupid\fP is given instead of a \fB--regionid\fP the
+command will attempt to delete the group and all regions that it
+contains.
+.sp
+If a deleted region is the first member of a group of regions the group
+will also be removed.
+.
+.HP
+.CMD_GROUP
+.br
+Combine one or more statistics regions on the specified device into a
+group.
+.sp
+The list of regions to be grouped is specified with \fB--regions\fP
+and an optional alias may be assigned with \fB--alias\fP. The set of
+regions is given as a comma-separated list of region identifiers. A
+continuous range of identifiers spanning from \fBR1\fP to \fBR2\fP may
+be expressed as '\fBR1\fP-\fBR2\fP'.
+.sp
+Regions that have a histogram configured can be grouped: in this case
+the number of histogram bins and their bounds must match exactly.
+.sp
+On success the group list and newly created \fBgroup_id\fP are
+printed to stdout.
+.sp
+The group metadata is stored with the first (lowest numbered)
+\fBregion_id\fP in the group: deleting this region will also delete
+the group and other group members will be returned to their prior
+state.
+.
+.HP
+.CMD_HELP
+.br
+Outputs a summary of the commands available, optionally including
+the list of report fields.
+.
+.HP
+.CMD_LIST
+.br
+List the statistics regions, areas, or groups registered on the device.
+If the \fB--allprograms\fP switch is given all regions will be listed
+regardless of region program ID values.
+.sp
+By default only regions and groups are included in list output. If
+\fB-v\fP or \fB--verbose\fP is given the report will also include a
+row of information for each configured group and for each area contained
+in each region displayed.
+.sp
+Regions that contain a single area are by default omitted from the
+verbose list since their properties are identical to the area that they
+contain - to view all regions regardless of the number of areas present
+use \fB--region\fP). To also view the areas contained within regions
+use \fB--area\fP.
+.sp
+If \fB--histogram\fP is given the report will include the bin count
+and latency boundary values for any configured histograms.
+.
+.HP
+.CMD_PRINT
+.br
+Print raw statistics counters for the specified region or for all
+present regions.
+.
+.HP
+.CMD_REPORT
+.br
+Start a report for the specified object or for all present objects. If
+the count argument is specified, the report will repeat at a fixed
+interval set by the \fB--interval\fP option. The default interval is
+one second.
+.sp
+If the \fB--allprograms\fP switch is given, all regions will be
+listed, regardless of region program ID values.
+.sp
+If the \fB--histogram\fP is given the report will include the histogram
+values and latency boundaries.
+.sp
+If the \fB--relative\fP is used the default histogram field displays
+bin values as a percentage of the total number of I/Os.
+.sp
+Object types (areas, regions and groups) to include in the report are
+selected using the \fB--area\fP, \fB--region\fP, and \fB--group\fP
+options.
+.
+.HP
+.CMD_UNGROUP
+.br
+Remove an existing group and return all the group's regions to their
+original state.
+.sp
+The group to be removed is specified using \fB--groupid\fP.
+.
+.HP
+.CMD_UPDATE_FILEMAP
+.br
+Update a group of \fBdmstats\fP regions specified by \fBgroup_id\fP,
+that were previously created with \fB--filemap\fP, either directly,
+or by starting the monitoring daemon, \fBdmfilemapd\fP.
+.sp
+This will add and remove regions to reflect changes in the allocated
+extents of the file on-disk, since the time that it was created or last
+updated.
+.sp
+Use of this command is not normally needed since the \fBdmfilemapd\fP
+daemon will automatically monitor filemap groups and perform these
+updates when required.
+.sp
+If a filemapped group was created with \fB--nomonitor\fP, or the
+daemon has been killed, the \fBupdate_filemap\fP can be used to
+manually force an update or start a new daemon.
+.sp
+Use \fB--nomonitor\fP to force a direct update and disable starting
+the monitoring daemon.
+.
+.SH REGIONS, AREAS, AND GROUPS
+.
+The device-mapper statistics facility allows separate performance
+counters to be maintained for arbitrary regions of devices. A region may
+span any range: from a single sector to the whole device. A region may
+be further sub-divided into a number of distinct areas (one or more),
+each with its own counter set. In this case a summary value for the
+entire region is also available for use in reports.
+.P
+In addition, one or more regions on one device can be combined into
+a statistics group. Groups allow several regions to be aggregated and
+reported as a single entity; counters for all regions and areas are
+summed and used to report totals for all group members. Groups also
+permit the assignment of an optional alias, allowing meaningful names
+to be associated with sets of regions.
+.P
+The group metadata is stored with the first (lowest numbered)
+\fBregion_id\fP in the group: deleting this region will also delete
+the group and other group members will be returned to their prior
+state.
+.P
+By default new regions span the entire device. The \fB--start\fP and
+\fB--length\fP options allows a region of any size to be placed at any
+location on the device.
+.P
+Using offsets it is possible to create regions that map individual
+objects within a block device (for example: partitions, files in a file
+system, or stripes or other structures in a RAID volume). Groups allow
+several non-contiguous regions to be assembled together for reporting
+and data aggregation.
+.P
+A region may be either divided into the specified number of equal-sized
+areas, or into areas of the given size by specifying one of
+\fB--areas\fP or \fB--areasize\fP when creating a region with the
+\fBcreate\fP command. Depending on the size of the areas and the device
+region the final area within the region may be smaller than requested.
+.
+.SS Region identifiers
+.
+Each region is assigned an identifier when it is created that is used to
+reference the region in subsequent operations. Region identifiers are
+unique within a given device (including across different \fBprogram_id\fP
+values).
+.P
+Depending on the sequence of create and delete operations, gaps may
+exist in the sequence of \fBregion_id\fP values for a particular device.
+.P
+The \fBregion_id\fP should be treated as an opaque identifier used to
+reference the region.
+.
+.SS Group identifiers
+.
+Groups are also assigned an integer identifier at creation time;
+like region identifiers, group identifiers are unique within the
+containing device.
+.P
+The \fBgroup_id\fP should be treated as an opaque identifier used to
+reference the group.
+.
+.SH FILE MAPPING
+.
+Using \fB--filemap\fP, it is possible to create regions that
+correspond to the extents of a file in the file system. This allows
+IO statistics to be monitored on a per-file basis, for example to
+observe large database files, virtual machine images, or other files
+of interest.
+.P
+To be able to use file mapping, the file must be backed by a
+device-mapper device, and in a file system that supports the FIEMAP
+ioctl (and which returns data describing the physical location of
+extents). This currently includes \fBxfs(5)\fP and \fBext4(5)\fP.
+.P
+By default the regions making up a file are placed together in a
+group, and the group alias is set to the \fBbasename(3)\fP of the
+file. This allows statistics to be reported for the file as a whole,
+aggregating values for the regions making up the group. To see only
+the whole file (group) when using the \fBlist\fP and \fBreport\fP
+commands, use \fB--group\fP.
+.P
+Since it is possible for the file to change after the initial
+group of regions is created, the \fBupdate_filemap\fP command, and
+\fBdmfilemapd\fP daemon are provided to update file mapped groups
+either manually or automatically.
+.
+.SS File follow modes
+.
+The file map monitoring daemon can monitor files in two distinct ways:
+follow-inode mode, and follow-path mode.
+.P
+The mode affects the behaviour of the daemon when a file under
+monitoring is renamed or unlinked, and the conditions which cause the
+daemon to terminate.
+.P
+If follow-inode mode is used, the daemon will hold the file open, and
+continue to update regions from the same file descriptor. This means
+that the mapping will follow rename, move (within the same file
+system), and unlink operations. This mode is useful if the file is
+expected to be moved, renamed, or unlinked while it is being
+monitored.
+.P
+In follow-inode mode, the daemon will exit once it detects that the
+file has been unlinked and it is the last holder of a reference to it.
+.P
+If follow-path is used, the daemon will re-open the provided path on
+each monitoring iteration. This means that the group will be updated
+to reflect a new file being moved to the same path as the original
+file. This mode is useful for files that are expected to be updated
+via unlink and rename.
+.P
+In follow-path mode, the daemon will exit if the file is removed and
+not replaced within a brief tolerance interval (one second).
+.P
+To stop the daemon, delete the group containing the mapped regions:
+the daemon will automatically shut down.
+.P
+The daemon can also be safely killed at any time and the group kept:
+if the file is still being allocated the mapping will become
+progressively out-of-date as extents are added and removed (in this
+case the daemon can be re-started or the group updated manually with
+the \fBupdate_filemap\fP command).
+.P
+See the \fBcreate\fP command and \fB--filemap\fP, \fB--follow\fP,
+and \fB--nomonitor\fP options for further information.
+.
+.SS Limitations
+.
+The daemon attempts to maintain good synchronization between the file
+extents and the regions contained in the group, however, since it can
+only react to new allocations once they have been written, there are
+inevitably some IO events that cannot be counted when a file is
+growing, particularly if the file is being extended by a single thread
+writing beyond end-of-file (for example, the \fBdd\fP program).
+.P
+There is a further loss of events in that there is currently no way
+to atomically resize a \fBdmstats\fP region and preserve its current
+counter values. This affects files when they grow by extending the
+final extent, rather than allocating a new extent: any events that
+had accumulated in the region between any prior operation and the
+resize are lost.
+.P
+File mapping is currently most effective in cases where the majority
+of IO does not trigger extent allocation. Future updates may address
+these limitations when kernel support is available.
+.
+.SH REPORT FIELDS
+.
+The dmstats report provides several types of field that may be added to
+the default field set, or used to create custom reports.
+.P
+All performance counters and metrics are calculated per-area.
+.
+.SS Derived metrics
+.
+A number of metrics fields are included that provide high level
+performance indicators. These are based on the fields provided by the
+conventional Linux iostat program and are derived from the basic counter
+values provided by the kernel for each area.
+.TP
+.B reads_merged_per_sec
+Reads merged per second.
+.TP
+.B writes_merged_per_sec
+Writes merged per second.
+.TP
+.B reads_per_sec
+Reads completed per second.
+.TP
+.B writes_per_sec
+Writes completed per second.
+.TP
+.B read_size_per_sec
+Size of data read per second.
+.TP
+.B write_size_per_sec
+Size of data written per second.
+.TP
+.B avg_request_size
+Average request size.
+.TP
+.B queue_size
+Average queue size.
+.TP
+.B await
+The average wait time for read and write operations.
+.TP
+.B r_await
+The average wait time for read operations.
+.TP
+.B w_await
+The average wait time for write operations.
+.TP
+.B throughput
+The device throughput in operations per second.
+.TP
+.B service_time
+The average service time (in milliseconds) for operations issued
+to the device.
+.TP
+.B util
+Percentage of CPU time during which I/O requests were issued to the
+device (bandwidth utilization for the device). Device saturation occurs
+when this value is close to 100%.
+.
+.SS Group, region and area meta fields
+.
+Meta fields provide information about the groups, regions, or areas that
+the statistics values relate to. This includes the region and area
+identifier, start, length, and counts, as well as the program ID and
+user data values.
+.TP
+.B region_id
+Region identifier. This is a non-negative integer returned by the kernel
+when a statistics region is created.
+.TP
+.B region_start
+The region start location. Display units are selected by the
+\fB--units\fP option.
+.TP
+.B region_len
+The length of the region. Display units are selected by the
+\fB--units\fP option.
+.TP
+.B area_id
+Area identifier. Area identifiers are assigned by the device-mapper
+statistics library and uniquely identify each area within a region. Each
+ID corresponds to a distinct set of performance counters for that area
+of the statistics region. Area identifiers are always monotonically
+increasing within a region so that higher ID values correspond to
+greater sector addresses within the area and no gaps in the sequence of
+identifiers exist.
+.TP
+.B area_start
+The area start location. Display units are selected by the
+\fB--units\fP option.
+.TP
+.B area_len
+The length of the area. Display units are selected by the
+\fB--units\fP option.
+.TP
+.B area_count
+The number of areas in this region.
+.TP
+.B program_id
+The program ID value associated with this region.
+.TP
+.B user_data
+The user data value associated with this region.
+.TP
+.B group_id
+Group identifier. This is a non-negative integer returned by the dmstats
+\fBgroup\fP command when a statistics group is created.
+.TP
+.B interval_ns
+The estimated interval over which the current counter values have
+accumulated. The value is reported as an integer expressed in units
+of nanoseconds.
+.TP
+.B interval
+The estimated interval over which the current counter values have
+accumulated. The value is reported as a real number in units of
+seconds.
+.
+.SS Basic counters
+.
+Basic counters provide access to the raw counter data from the kernel,
+allowing further processing to be carried out by another program.
+.P
+The kernel provides thirteen separate counters for each statistics
+area. The first eleven of these match the counters provided in
+/proc/diskstats or /sys/block/*/*/stat. The final pair provide separate
+counters for read and write time.
+.TP
+.B read_count
+Count of reads completed this interval.
+.TP
+.B reads_merged_count
+Count of reads merged this interval.
+.TP
+.B read_sector_count
+Count of 512 byte sectors read this interval.
+.TP
+.B read_time
+Accumulated duration of all read requests (ns).
+.TP
+.B write_count
+Count of writes completed this interval.
+.TP
+.B writes_merged_count
+Count of writes merged this interval.
+.TP
+.B write_sector_count
+Count of 512 byte sectors written this interval.
+.TP
+.B write_time
+Accumulated duration of all write requests (ns).
+.TP
+.B in_progress_count
+Count of requests currently in progress.
+.TP
+.B io_ticks
+Nanoseconds spent servicing requests.
+.TP
+.B queue_ticks
+This field is incremented at each I/O start, I/O completion, I/O merge,
+or read of these stats by the number of I/Os in progress multiplied by
+the number of milliseconds spent doing I/O since the last update of this
+field. This can provide an easy measure of both I/O completion time and
+the backlog that may be accumulating.
+.TP
+.B read_ticks
+Nanoseconds spent servicing reads.
+.TP
+.B write_ticks
+Nanoseconds spent servicing writes.
+.
+.SS Histogram fields
+.
+Histograms measure the frequency distribution of user specified I/O
+latency intervals. Histogram bin boundaries are specified when a region
+is created.
+.P
+A brief representation of the histogram values and latency intervals can
+be included in the report using these fields.
+.TP
+.B hist_count
+A list of the histogram counts for the current statistics area in order
+of ascending latency value. Each value represents the number of I/Os
+with latency times falling into that bin's time range during the sample
+period.
+.TP
+.B hist_count_bounds
+A list of the histogram counts for the current statistics area in order
+of ascending latency value including bin boundaries: each count is
+prefixed by the lower bound of the corresponding histogram bin.
+.TP
+.B hist_count_ranges
+A list of the histogram counts for the current statistics area in order
+of ascending latency value including bin boundaries: each count is
+prefixed by both the lower and upper bounds of the corresponding
+histogram bin.
+.TP
+.B hist_percent
+A list of the relative histogram values for the current statistics area
+in order of ascending latency value, expressed as a percentage. Each
+value represents the proportion of I/Os with latency times falling into
+that bin's time range during the sample period.
+.TP
+.B hist_percent_bounds
+A list of the relative histogram values for the current statistics area
+in order of ascending latency value, expressed as a percentage and
+including bin boundaries. Each value represents the proportion of I/Os
+with latency times falling into that bin's time range during the sample
+period and is prefixed with the corresponding bin's lower bound.
+.TP
+.B hist_percent_ranges
+A list of the relative histogram values for the current statistics area
+in order of ascending latency value, expressed as a percentage and
+including bin boundaries. Each value represents the proportion of I/Os
+with latency times falling into that bin's time range during the sample
+period and is prefixed with the corresponding bin's lower and upper
+bounds.
+.TP
+.B hist_bounds
+A list of the histogram boundary values for the current statistics area
+in order of ascending latency value. The values are expressed in whole
+units of seconds, milliseconds, microseconds or nanoseconds with a suffix
+indicating the unit.
+.TP
+.B hist_ranges
+A list of the histogram bin ranges for the current statistics area in
+order of ascending latency value. The values are expressed as
+"LOWER-UPPER" in whole units of seconds, milliseconds, microseconds or
+nanoseconds with a suffix indicating the unit.
+.TP
+.B hist_bins
+The number of latency histogram bins configured for the area.
+.
+.SH EXAMPLES
+.
+Create a whole-device region with one area on vg00/lvol1
+.br
+#
+.B dmstats create vg00/lvol1
+.br
+vg00/lvol1: Created new region with 1 area(s) as region ID 0
+.P
+Create a 32M region 1G into device d0
+.br
+#
+.B dmstats create --start 1G --length 32M d0
+.br
+d0: Created new region with 1 area(s) as region ID 0
+.P
+Create a whole-device region with 8 areas on every device
+.br
+.br
+#
+.B dmstats create --areas 8
+.br
+vg00-lvol1: Created new region with 8 area(s) as region ID 0
+.br
+vg00-lvol2: Created new region with 8 area(s) as region ID 0
+.br
+vg00-lvol3: Created new region with 8 area(s) as region ID 0
+.br
+vg01-lvol0: Created new region with 8 area(s) as region ID 2
+.br
+vg01-lvol1: Created new region with 8 area(s) as region ID 0
+.br
+vg00-lvol2: Created new region with 8 area(s) as region ID 1
+.P
+Delete all regions on all devices
+.br
+.br
+#
+.B dmstats delete --alldevices --allregions
+.P
+Create a whole-device region with areas 10 GiB in size on vg00/lvol1
+using dmsetup
+.br
+.br
+#
+.B dmsetup stats create --areasize 10G vg00/lvol1
+.br
+vg00-lvol1: Created new region with 5 area(s) as region ID 1
+.P
+Create a 1 GiB region with 16 areas at the start of vg00/lvol1
+.br
+#
+.B dmstats create --start 0 --len 1G --areas=16 vg00/lvol1
+.br
+vg00-lvol1: Created new region with 16 area(s) as region ID 0
+.P
+List the statistics regions registered on vg00/lvol1
+.br
+#
+.B dmstats list vg00/lvol1
+.br
+Name RgID RStart RSize #Areas ASize ProgID
+.br
+vg00-lvol1 0 0 61.00g 1 61.00g dmstats
+.br
+vg00-lvol1 1 61.00g 19.20g 1 19.20g dmstats
+.br
+vg00-lvol1 2 80.20g 2.14g 1 2.14g dmstats
+.P
+Display five statistics reports for vg00/lvol1 at an interval of one second
+.br
+.br
+#
+.B dmstats report --interval 1 --count 5 vg00/lvol1
+.br
+#
+.B dmstats report
+.br
+Name RgID ArID AStart ASize RRqM/s WRqM/s R/s W/s RSz/s WSz/s AvRqSz QSize Util% AWait RdAWa WrAWa
+.br
+vg_hex-lv_home 0 0 0 61.00g 0.00 0.00 0.00 218.00 0 1.04m 4.50k 2.97 81.70 13.62 0.00 13.62
+.br
+vg_hex-lv_home 1 0 61.00g 19.20g 0.00 0.00 0.00 5.00 0 548.00k 109.50k 0.14 11.00 27.40 0.00 27.40
+.br
+vg_hex-lv_home 2 0 80.20g 2.14g 0.00 0.00 0.00 14.00 0 1.15m 84.00k 0.39 18.70 27.71 0.00 27.71
+.P
+Create one region for reach target contained in device vg00/lvol1
+.br
+.br
+#
+.B dmstats create --segments vg00/lvol1
+.br
+vg00-lvol1: Created new region with 1 area(s) as region ID 0
+.br
+vg00-lvol1: Created new region with 1 area(s) as region ID 1
+.br
+vg00-lvol1: Created new region with 1 area(s) as region ID 2
+.P
+Create regions mapping each file in the directory images/ and place
+them into separate groups, each named after the corresponding file
+.br
+#
+.B dmstats create --filemap images/*
+.br
+images/vm1.qcow2: Created new group with 87 region(s) as group ID 0.
+.br
+images/vm1-1.qcow2: Created new group with 8 region(s) as group ID 87.
+.br
+images/vm2.qcow2: Created new group with 11 region(s) as group ID 95.
+.br
+images/vm2-1.qcow2: Created new group with 1454 region(s) as group ID 106.
+.br
+images/vm3.img: Created new group with 2 region(s) as group ID 1560.
+.P
+Print raw counters for region 4 on device d0
+.br
+#
+.B dmstats print --regionid 4 d0
+.br
+2097152+65536 0 0 0 0 29 0 264 701 0 41 701 0 41
+.
+.SH AUTHORS
+.
+Bryn M. Reeves <bmr@redhat.com>
+.
+.SH SEE ALSO
+.
+.BR dmsetup (8)
+.P
+LVM2 resource page:
+.UR https://www.sourceware.org/lvm2
+.UE
+.br
+Device-mapper resource page:
+.UR http://sources.redhat.com/dm
+.UE
+.P
+Device-mapper statistics kernel documentation
+.br
+.I Documentation/device-mapper/statistics.txt
diff --git a/man/fsadm.8.in b/man/fsadm.8.in
deleted file mode 100644
index 46be1ff..0000000
--- a/man/fsadm.8.in
+++ /dev/null
@@ -1,81 +0,0 @@
-.TH "FSADM" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
-.SH "NAME"
-fsadm \- utility to resize or check filesystem on a device
-.SH SYNOPSIS
-.B fsadm
-.RI [ options ]
-.B check
-.I device
-.sp
-.B fsadm
-.RI [ options ]
-.B resize
-.I device
-.RI [ new_size [ BKMGTEP ]]
-.sp
-.SH DESCRIPTION
-fsadm utility checks or resizes the filesystem on a device.
-It tries to use the same API for
-.IR ext2 ", " ext3 ", " ext4 ", " ReiserFS " and " XFS
-filesystem.
-.SH OPTIONS
-.TP
-.BR \-e ", " \-\-ext\-offline
-Unmount ext2/ext3/ext4 filesystem before doing resize.
-.TP
-.BR \-f ", " \-\-force
-Bypass some sanity checks.
-.TP
-.BR \-h ", " \-\-help
-Display the help text.
-.TP
-.BR \-n ", " \-\-dry\-run
-Print commands without running them.
-.TP
-.BR \-v ", " \-\-verbose
-Be more verbose.
-.TP
-.BR \-y ", " \-\-yes
-Answer "yes" at any prompts.
-.TP
-.I new_size
-Absolute number of filesystem blocks to be in the filesystem,
-or an absolute size using a suffix (in powers of 1024).
-If new_size is not supplied, the whole device is used.
-
-.SH DIAGNOSTICS
-On successful completion, the status code is 0.
-A status code of 2 indicates the operation was interrupted by the user.
-A status code of 3 indicates the requested check operation could not be performed
-because the filesystem is mounted and does not support an online
-.BR fsck (8).
-A status code of 1 is used for other failures.
-
-.SH EXAMPLES
-Resize the filesystem on logical volume /dev/vg/test to 1000 megabytes.
-If /dev/vg/test contains ext2/ext3/ext4
-filesystem it will be unmounted prior the resize.
-All [y|n] questions will be answered 'y'.
-.sp
-.B fsadm \-e \-y resize /dev/vg/test 1000M
-.SH ENVIRONMENT VARIABLES
-.TP
-.B TMPDIR
-The temporary directory name for mount points. Defaults to "/tmp".
-.TP
-.B DM_DEV_DIR
-The device directory name.
-Defaults to "/dev" and must be an absolute path.
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvresize (8),
-.BR lvm.conf (5),
-.BR fsck (8),
-.BR tune2fs (8),
-.BR resize2fs (8),
-.BR reiserfstune (8),
-.BR resize_reiserfs (8),
-.BR xfs_info (8),
-.BR xfs_growfs (8),
-.BR xfs_check (8)
diff --git a/man/fsadm.8_main b/man/fsadm.8_main
new file mode 100644
index 0000000..dfff5bb
--- /dev/null
+++ b/man/fsadm.8_main
@@ -0,0 +1,129 @@
+.TH "FSADM" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH "NAME"
+.
+fsadm \(em utility to resize or check filesystem on a device
+.
+.SH SYNOPSIS
+.
+.PD 0
+.ad l
+.TP 6
+.B fsadm
+.RI [ options ]
+.BR check
+.IR device
+.
+.TP
+.B fsadm
+.RI [ options ]
+.BR resize
+.IR device
+.RI [ new_size ]
+.ad b
+.PD
+.
+.SH DESCRIPTION
+.
+fsadm utility checks or resizes the filesystem on a device (can be
+also dm-crypt encrypted device).
+It tries to use the same API for
+.BR ext2 ,
+.BR ext3 ,
+.BR ext4 ,
+.BR ReiserFS
+and
+.BR XFS
+filesystem.
+.
+.SH OPTIONS
+.
+.TP
+.BR -e | --ext-offline
+Unmount ext2/ext3/ext4 filesystem before doing resize.
+.
+.TP
+.BR -f | --force
+Bypass some sanity checks.
+.
+.TP
+.BR -h | --help
+Display the help text.
+.
+.TP
+.BR -l | --lvresize
+Resize also given lvm2 logical volume. More volume management
+functionality is provided with complementary \fBlvresize\fP(8) and the option
+.BR -r | --resizefs.
+.
+.TP
+.BR -n | --dry-run
+Print commands without running them.
+.
+.TP
+.BR -v | --verbose
+Be more verbose.
+.
+.TP
+.BR -y | --yes
+Answer "yes" at any prompts.
+.
+.TP
+.BR -c | --cryptresize
+Resize dm-crypt mapping together with filesystem detected on the device. The dm-crypt device must be recognizable by cryptsetup(8).
+.
+.TP
+.BR \fInew_size [ B | K | M | G | T | P | E ]
+Absolute number of filesystem blocks to be in the filesystem,
+or an absolute size using a suffix (in powers of 1024).
+If new_size is not supplied, the whole device is used.
+.
+.SH DIAGNOSTICS
+.
+On successful completion, the status code is 0.
+A status code of 2 indicates the operation was interrupted by the user.
+A status code of 3 indicates the requested check operation could not be performed
+because the filesystem is mounted and does not support an online
+.BR fsck (8).
+A status code of 1 is used for other failures.
+.
+.SH EXAMPLES
+.
+Resize the filesystem on logical volume \fI/dev/vg/test\fP to 1000 megabytes.
+If \fI/dev/vg/test\fP contains ext2/ext3/ext4
+filesystem it will be unmounted prior the resize.
+All [y/n] questions will be answered 'y'.
+.P
+#
+.B fsadm -e -y resize /dev/vg/test 1000M
+.
+.SH ENVIRONMENT VARIABLES
+.
+.TP
+.B TMPDIR
+The temporary directory name for mount points. Defaults to "\fI/tmp\fP".
+.TP
+.B DM_DEV_DIR
+The device directory name.
+Defaults to "\fI/dev\fP" and must be an absolute path.
+.
+.SH SEE ALSO
+.
+.nh
+.ad l
+.BR lvm (8),
+.BR lvresize (8),
+.BR lvm.conf (5),
+.P
+.BR fsck (8),
+.BR tune2fs (8),
+.BR resize2fs (8),
+.P
+.BR reiserfstune (8),
+.BR resize_reiserfs (8),
+.P
+.BR xfs_info (8),
+.BR xfs_growfs (8),
+.BR xfs_check (8),
+.P
+.BR cryptsetup (8)
diff --git a/man/lvchange.8.in b/man/lvchange.8.in
deleted file mode 100644
index 32a0580..0000000
--- a/man/lvchange.8.in
+++ /dev/null
@@ -1,169 +0,0 @@
-.TH LVCHANGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvchange \- change attributes of a logical volume
-.SH SYNOPSIS
-.B lvchange
-.RB [ \-\-addtag
-.IR Tag ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-a | \-\-activate
-.RI [ a | e | l ]{ y | n }]
-.RB [ \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-C | \-\-contiguous
-.RI { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-\-deltag
-.IR Tag ]
-.RB [ \-\-discards
-.RI { ignore | nopassdown | passdown }]
-.RB [ \-\-resync ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoremonitoring ]
-.RB [ \-\-monitor
-.RI { y | n }]
-.RB [ \-\-poll
-.RI { y | n }]
-.RB [ \-\-sysinit ]
-.RB [ \-\-noudevsync ]
-.RB [ \-M | \-\-persistent
-.RI { y | n }]
-.RB [ \-\-minor
-.IR minor ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-p | \-\-permission
-.RI { r | rw }]
-.RB [ \-r | \-\-readahead
-.RI { ReadAheadSectors | auto | none }]
-.RB [ \-\-refresh ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-Z | \-\-zero
-.RI { y | n }]
-.I LogicalVolumePath
-.RI [ LogicalVolumePath ...]
-.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.
-.TP
-.BR \-a ", " \-\-activate " [" \fIa | \fIe | \fIl ]{ \fIy | \fIn }
-Controls the availability of the logical volumes for use.
-Communicates with the kernel device-mapper driver via
-libdevmapper to activate (\-ay) or deactivate (\-an) the
-logical volumes. If autoactivation option is used (\-aay),
-the logical volume is activated only if it matches an item in
-the activation/auto_activation_volume_list set in lvm.conf.
-Autoactivation is not yet supported for logical volumes that
-are part of partial or clustered volume groups.
-.IP
-If clustered locking is enabled, -aey will activate exclusively
-on one node and -aly will activate only on the local node.
-To deactivate only on the local node use -aln.
-Logical volumes with single-host snapshots are always activated
-exclusively because they can only be used on one node at once.
-.TP
-.BR \-C ", " \-\-contiguous " {" \fIy | \fIn }
-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.
-.TP
-.BR \-\-discards " {" \fIignore | \fInopassdown | \fIpassdown }
-Set this to \fIignore\fP to ignore any discards received by a
-thin pool Logical Volume. Set to \fInopassdown\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 \fIpassdown\fP (the
-default) to process them both within the thin pool itself and to
-pass them down the underlying device.
-.TP
-.B \-\-resync
-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.
-.TP
-.B \-\-minor \fIminor
-Set the minor number.
-.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
-\fBmirror_image_fault_policy\fP and \fBmirror_log_fault_policy\fP
-set in \fBlvm.conf\fP.
-.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
-.B \-\-sysinit
-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 lvmetad(8) enabled and running,
-autoactivation is preferred over manual activation via direct lvchange call.
-Logical volumes are autoactivated according to auto_activation_volume_list
-set in lvm.conf(5).
-.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
-.B \-\-ignoremonitoring
-Make no attempt to interact with dmeventd unless \fB\-\-monitor\fP
-is specified.
-Do not use this if dmeventd is already monitoring a device.
-.TP
-.BR \-M ", " \-\-persistent " {" \fIy | \fIn }
-Set to y to make the minor number specified persistent.
-.TP
-.BR \-p ", " \-\-permission " {" \fIr | \fIrw }
-Change access permission to read-only or read/write.
-.TP
-.BR \-r ", " \-\-readahead " {" \fIReadAheadSectors | \fIauto | \fInone }
-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 "auto" which allows the kernel to choose
-a suitable value automatically.
-"None" is equivalent to specifying zero.
-.TP
-.B \-\-refresh
-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.
-.TP
-.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
-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
-\fIy\fP.
-.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
-.BR lvm (8),
-.BR lvcreate (8),
-.BR vgchange (8)
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..e6d44c5
--- /dev/null
+++ b/man/lvchange.8_end
@@ -0,0 +1,6 @@
+.
+.SH EXAMPLES
+.
+Change LV permission to read-only:
+.br
+.B lvchange -pr vg00/lvol1
diff --git a/man/lvchange.8_pregen b/man/lvchange.8_pregen
new file mode 100644
index 0000000..ed70042
--- /dev/null
+++ b/man/lvchange.8_pregen
@@ -0,0 +1,1047 @@
+.TH LVCHANGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvchange \(em Change the attributes of logical volume(s)
+.
+.SH SYNOPSIS
+.
+\fBlvchange\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.P
+.ad l
+ \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
+.br
+ \fB--activationmode\fP \fBpartial\fP|\fBdegraded\fP|\fBcomplete\fP
+.br
+ \fB--addtag\fP \fITag\fP
+.br
+ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.br
+ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP
+.br
+ \fB--cachepolicy\fP \fIString\fP
+.br
+ \fB--cachesettings\fP \fIString\fP
+.br
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--compression\fP \fBy\fP|\fBn\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-C\fP|\fB--contiguous\fP \fBy\fP|\fBn\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--deduplication\fP \fBy\fP|\fBn\fP
+.br
+ \fB--deltag\fP \fITag\fP
+.br
+ \fB--detachprofile\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP
+.br
+ \fB-f\fP|\fB--force\fP
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB-K\fP|\fB--ignoreactivationskip\fP
+.br
+ \fB--ignorelockingfailure\fP
+.br
+ \fB--ignoremonitoring\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB-j\fP|\fB--major\fP \fINumber\fP
+.br
+ \fB--\fP[\fBraid\fP]\fBmaxrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+ \fB--metadataprofile\fP \fIString\fP
+.br
+ \fB--minor\fP \fINumber\fP
+.br
+ \fB--\fP[\fBraid\fP]\fBminrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+ \fB--monitor\fP \fBy\fP|\fBn\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--noudevsync\fP
+.br
+ \fB-P\fP|\fB--partial\fP
+.br
+ \fB-p\fP|\fB--permission\fP \fBrw\fP|\fBr\fP
+.br
+ \fB-M\fP|\fB--persistent\fP \fBy\fP|\fBn\fP
+.br
+ \fB--poll\fP \fBy\fP|\fBn\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP
+.br
+ \fB--readonly\fP
+.br
+ \fB--rebuild\fP \fIPV\fP
+.br
+ \fB--refresh\fP
+.br
+ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+ \fB--resync\fP
+.br
+ \fB-S\fP|\fB--select\fP \fIString\fP
+.br
+ \fB-k\fP|\fB--setactivationskip\fP \fBy\fP|\fBn\fP
+.br
+ \fB--setautoactivation\fP \fBy\fP|\fBn\fP
+.br
+ \fB--\fP[\fBraid\fP]\fBsyncaction\fP \fBcheck\fP|\fBrepair\fP
+.br
+ \fB--sysinit\fP
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB--vdosettings\fP \fIString\fP
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB--\fP[\fBraid\fP]\fBwritebehind\fP \fINumber\fP
+.br
+ \fB--\fP[\fBraid\fP]\fBwritemostly\fP \fIPV\fP[\fB:t\fP|\fBn\fP|\fBy\fP]
+.br
+ \fB-y\fP|\fB--yes\fP
+.br
+ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+lvchange changes LV attributes in the VG, changes LV activation in the
+kernel, and includes other utilities for LV maintenance.
+.
+.SH USAGE
+.
+Change a general LV attribute.
+.br
+For options listed in parentheses, any one is
+.br
+required, after which the others are optional.
+.br
+.P
+\fBlvchange\fP
+.RS 4
+( \fB-C\fP|\fB--contiguous\fP \fBy\fP|\fBn\fP
+.br
+ \fB-p\fP|\fB--permission\fP \fBrw\fP|\fBr\fP
+.br
+ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP
+.br
+ \fB-k\fP|\fB--setactivationskip\fP \fBy\fP|\fBn\fP
+.br
+ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
+.br
+ \fB-M\fP|\fB--persistent\fP \fBn\fP
+.br
+ \fB--addtag\fP \fITag\fP
+.br
+ \fB--deltag\fP \fITag\fP
+.br
+ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.br
+ \fB--compression\fP \fBy\fP|\fBn\fP
+.br
+ \fB--deduplication\fP \fBy\fP|\fBn\fP
+.br
+ \fB--detachprofile\fP
+.br
+ \fB--metadataprofile\fP \fIString\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB--setautoactivation\fP \fBy\fP|\fBn\fP
+.br
+ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP
+.br
+ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
+.br
+ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP
+.br
+ \fB--cachepolicy\fP \fIString\fP
+.br
+ \fB--cachesettings\fP \fIString\fP
+.br
+ \fB--\fP[\fBraid\fP]\fBminrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+ \fB--\fP[\fBraid\fP]\fBmaxrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+ \fB--vdosettings\fP \fIString\fP
+.br
+ \fB--\fP[\fBraid\fP]\fBwritebehind\fP \fINumber\fP
+.br
+ \fB--\fP[\fBraid\fP]\fBwritemostly\fP \fIPV\fP[\fB:t\fP|\fBn\fP|\fBy\fP] )
+.RE
+.RS 4
+ \fIVG\fP|\fILV\fP|\fITag\fP|\fISelect\fP ...
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP ]
+.br
+[ \fB--poll\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Resyncronize a mirror or raid LV.
+.br
+Use to reset 'R' attribute on a not initially synchronized LV.
+.br
+.P
+\fBlvchange\fP \fB--resync\fP \fIVG\fP|\fILV1\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: mirror raid
+.RE
+.P
+\(em
+.P
+Resynchronize or check a raid LV.
+.br
+.P
+\fBlvchange\fP \fB--syncaction\fP \fBcheck\fP|\fBrepair\fP \fIVG\fP|\fILV1\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: raid
+.RE
+.P
+\(em
+.P
+Reconstruct data on specific PVs of a raid LV.
+.br
+.P
+\fBlvchange\fP \fB--rebuild\fP \fIPV\fP \fIVG\fP|\fILV1\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: raid
+.RE
+.P
+\(em
+.P
+Activate or deactivate an LV.
+.br
+.P
+\fBlvchange\fP \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP \fIVG\fP|\fILV\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-P\fP|\fB--partial\fP ]
+.br
+[ \fB-K\fP|\fB--ignoreactivationskip\fP ]
+.br
+[ \fB--activationmode\fP \fBpartial\fP|\fBdegraded\fP|\fBcomplete\fP ]
+.br
+[ \fB--poll\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--sysinit\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Reactivate an LV using the latest metadata.
+.br
+.P
+\fBlvchange\fP \fB--refresh\fP \fIVG\fP|\fILV\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-P\fP|\fB--partial\fP ]
+.br
+[ \fB--activationmode\fP \fBpartial\fP|\fBdegraded\fP|\fBcomplete\fP ]
+.br
+[ \fB--poll\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Start or stop monitoring an LV from dmeventd.
+.br
+.P
+\fBlvchange\fP \fB--monitor\fP \fBy\fP|\fBn\fP \fIVG\fP|\fILV\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Start or stop processing an LV conversion.
+.br
+.P
+\fBlvchange\fP \fB--poll\fP \fBy\fP|\fBn\fP \fIVG\fP|\fILV\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Make the minor device number persistent for an LV.
+.br
+.P
+\fBlvchange\fP \fB-M\fP|\fB--persistent\fP \fBy\fP \fB--minor\fP \fINumber\fP \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-j\fP|\fB--major\fP \fINumber\fP ]
+.br
+[ \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP ]
+.br
+[ \fB--poll\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB--ignoremonitoring\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
+.br
+Change the active state of LVs.
+An active LV can be used through a block device,
+allowing data on the LV to be accessed.
+\fBy\fP makes LVs active, or available.
+\fBn\fP makes LVs inactive, or unavailable.
+The block device for the LV is added or removed from the system
+using device-mapper in the kernel.
+A symbolic link /dev/VGName/LVName pointing to the device node is also added/removed.
+All software and scripts should access the device through the 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, configuration (e.g. udev), or release version.
+\fBay\fP specifies autoactivation, which is used by system-generated
+activation commands. By default, LVs are autoactivated.
+An autoactivation property can be set on a VG or LV to disable autoactivation,
+see --setautoactivation y|n in vgchange, lvchange, vgcreate, and lvcreate.
+Display the property with vgs or lvs "-o autoactivation".
+The \fBlvm.conf\fP(5) auto_activation_volume_list includes names of VGs or LVs
+that should be autoactivated, and anything not listed is not autoactivated.
+When auto_activation_volume_list is undefined (the default), it has no effect.
+If auto_activation_volume_list is defined and empty, no LVs are autoactivated.
+Items included by auto_activation_volume_list will not be autoactivated if
+the autoactivation property has been disabled.
+See \fBlvmlockd\fP(8) for more information about activation options \fBey\fP and \fBsy\fP for shared VGs.
+.
+.HP
+\fB--activationmode\fP \fBpartial\fP|\fBdegraded\fP|\fBcomplete\fP
+.br
+Determines if LV activation is allowed when PVs are missing,
+e.g. because of a device failure.
+\fBcomplete\fP only allows LVs with no missing PVs to be activated,
+and is the most restrictive mode.
+\fBdegraded\fP allows RAID LVs with missing PVs to be activated.
+(This does not include the "mirror" type, see "raid1" instead.)
+\fBpartial\fP allows any LV with missing PVs to be activated, and
+should only be used for recovery or repair.
+For default, see \fBlvm.conf\fP(5) activation_mode.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB--addtag\fP \fITag\fP
+.br
+Adds a tag to a PV, VG or LV. This option can be repeated to add
+multiple tags at once. See \fBlvm\fP(8) for information about tags.
+.
+.HP
+.ad l
+\fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.ad b
+.br
+Determines the allocation policy when a command needs to allocate
+Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
+which can be changed with vgchange/lvchange, or overridden on the
+command line.
+\fBnormal\fP applies common sense rules such as not placing parallel stripes
+on the same PV.
+\fBinherit\fP applies the VG policy to an LV.
+\fBcontiguous\fP requires new PEs be placed adjacent to existing PEs.
+\fBcling\fP places new PEs on the same PV as existing PEs in the same
+stripe of the LV.
+If there are sufficient PEs for an allocation, but normal does not
+use them, \fBanywhere\fP will use them even if it reduces performance,
+e.g. by placing two stripes on the same PV.
+Optional positional PV args on the command line can also be used to limit
+which PVs the command will use for allocation.
+See \fBlvm\fP(8) for more information about allocation.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP
+.br
+Specifies when writes to a cache LV should be considered complete.
+\fBwriteback\fP considers a write complete as soon as it is
+stored in the cache pool.
+\fBwritethough\fP considers a write complete only when it has
+been stored in both the cache pool and on the origin LV.
+While writethrough 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, all reads are served
+from the 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\fP(7) for more information.
+.
+.HP
+\fB--cachepolicy\fP \fIString\fP
+.br
+Specifies the cache policy for a cache LV.
+See \fBlvmcache\fP(7) for more information.
+.
+.HP
+\fB--cachesettings\fP \fIString\fP
+.br
+Specifies tunable kernel options for dm-cache or dm-writecache LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --cachesettings for each option being set.
+These settings override the default kernel behaviors which are
+usually adequate. To remove cachesettings and revert to the default
+kernel behaviors, use --cachesettings 'default' for dm-cache or
+an empty string --cachesettings '' for dm-writecache.
+See \fBlvmcache\fP(7) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--compression\fP \fBy\fP|\fBn\fP
+.br
+Controls whether compression is enabled or disable for VDO volume.
+See \fBlvmvdo\fP(7) for more information about VDO usage.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-C\fP|\fB--contiguous\fP \fBy\fP|\fBn\fP
+.br
+Sets or resets the contiguous allocation policy for LVs.
+Default is no contiguous allocation based on a next free principle.
+It is only possible to change a non-contiguous allocation policy
+to contiguous if all of the allocated physical extents in the LV
+are already contiguous.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--deduplication\fP \fBy\fP|\fBn\fP
+.br
+Controls whether deduplication is enabled or disable for VDO volume.
+See \fBlvmvdo\fP(7) for more information about VDO usage.
+.
+.HP
+\fB--deltag\fP \fITag\fP
+.br
+Deletes a tag from a PV, VG or LV. This option can be repeated to delete
+multiple tags at once. See \fBlvm\fP(8) for information about tags.
+.
+.HP
+\fB--detachprofile\fP
+.br
+Detaches a metadata profile from a VG or LV.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
+.br
+Specifies how the device-mapper thin pool layer in the kernel should
+handle discards.
+\fBignore\fP causes the thin pool to ignore discards.
+\fBnopassdown\fP causes the thin pool to process discards itself to
+allow reuse of unneeded extents in the thin pool.
+\fBpassdown\fP causes the thin pool to process discards itself
+(like nopassdown) and pass the discards to the underlying device.
+See \fBlvmthin\fP(7) for more information.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--errorwhenfull\fP \fBy\fP|\fBn\fP
+.br
+Specifies thin pool behavior when data space is exhausted.
+When yes, device-mapper will immediately return an error
+when a thin pool is full and an I/O request requires space.
+When no, device-mapper will queue these I/O requests for a
+period of time to allow the thin pool to be extended.
+Errors are returned if no space is available after the timeout.
+(Also see dm-thin-pool kernel module option no_space_timeout.)
+See \fBlvmthin\fP(7) for more information.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB-K\fP|\fB--ignoreactivationskip\fP
+.br
+Ignore the "activation skip" LV flag during activation
+to allow LVs with the flag set to be activated.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--ignoremonitoring\fP
+.br
+Do not interact with dmeventd unless --monitor is specified.
+Do not use this if dmeventd is already monitoring a device.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-j\fP|\fB--major\fP \fINumber\fP
+.br
+Sets the major number of an LV block device.
+.
+.HP
+\fB--\fP[\fBraid\fP]\fBmaxrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+Sets the maximum recovery rate for a RAID LV. The rate value
+is an amount of data per second for each device in the array.
+Setting the rate to 0 means it will be unbounded.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB--metadataprofile\fP \fIString\fP
+.br
+The metadata profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--minor\fP \fINumber\fP
+.br
+Sets the minor number of an LV block device.
+.
+.HP
+\fB--\fP[\fBraid\fP]\fBminrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+Sets the minimum recovery rate for a RAID LV. The rate value
+is an amount of data per second for each device in the array.
+Setting the rate to 0 means it will be unbounded.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB--monitor\fP \fBy\fP|\fBn\fP
+.br
+Start (yes) or stop (no) monitoring an LV with dmeventd.
+dmeventd monitors kernel events for an LV, and performs
+automated maintenance for the LV in response to specific events.
+See \fBdmeventd\fP(8) for more information.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB-P\fP|\fB--partial\fP
+.br
+Commands will do their best to activate LVs with missing PV extents.
+Missing extents may be replaced with error or zero segments
+according to the missing_stripe_filler setting.
+Metadata may not be changed with this option.
+.
+.HP
+\fB-p\fP|\fB--permission\fP \fBrw\fP|\fBr\fP
+.br
+Set access permission to read only \fBr\fP or read and write \fBrw\fP.
+.
+.HP
+\fB-M\fP|\fB--persistent\fP \fBy\fP|\fBn\fP
+.br
+When yes, makes the specified minor number persistent.
+.
+.HP
+\fB--poll\fP \fBy\fP|\fBn\fP
+.br
+When yes, start the background transformation of an LV.
+An incomplete transformation, e.g. pvmove or lvconvert interrupted
+by reboot or crash, can be restarted from the last checkpoint with --poll y.
+When no, background transformation of an LV will not occur, and the
+transformation will not complete. It may not be appropriate to immediately
+poll an LV after activation, in which case --poll n can be used to defer
+polling until a later --poll y command.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP
+.br
+Sets read ahead sector count of an LV.
+\fBauto\fP is the default which allows the kernel to choose
+a suitable value automatically.
+\fBnone\fP is equivalent to zero.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB--rebuild\fP \fIPV\fP
+.br
+Selects a PV to rebuild in a raid LV. Multiple PVs can be rebuilt by
+repeating this option.
+Use this option in place of --resync or --syncaction repair when the
+PVs with corrupted data are known, and their data should be reconstructed
+rather than reconstructing default (rotating) data.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB--refresh\fP
+.br
+If the LV is active, reload its metadata.
+This is not necessary in normal operation, but may be useful
+if something has gone wrong, or if some form of manual LV
+sharing is being used.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB--resync\fP
+.br
+Initiates mirror synchronization. Synchronization generally happens
+automatically, but this option forces it to run.
+Also see --rebuild to synchronize a specific PV.
+During synchronization, data is read from the primary mirror device
+and copied to the others. This can take considerable time, during
+which the LV is without a complete redundant copy of the data.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB-k\fP|\fB--setactivationskip\fP \fBy\fP|\fBn\fP
+.br
+Persistently sets (yes) or clears (no) the "activation skip" flag on an LV.
+An LV with this flag set is not activated unless the
+--ignoreactivationskip option is used by the activation command.
+This flag is set by default on new thin snapshot LVs.
+The flag is not applied to deactivation.
+The current value of the flag is indicated in the lvs lv_attr bits.
+.
+.HP
+\fB--setautoactivation\fP \fBy\fP|\fBn\fP
+.br
+Set the autoactivation property on a VG or LV.
+Display the property with vgs or lvs "-o autoactivation".
+When the autoactivation property is disabled, the VG or LV
+will not be activated by a command doing autoactivation
+(vgchange, lvchange, or pvscan using -aay.)
+If autoactivation is disabled on a VG, no LVs will be autoactivated
+in that VG, and the LV autoactivation property has no effect.
+If autoactivation is enabled on a VG, autoactivation can be disabled
+for individual LVs.
+.
+.HP
+\fB--\fP[\fBraid\fP]\fBsyncaction\fP \fBcheck\fP|\fBrepair\fP
+.br
+Initiate different types of RAID synchronization.
+This causes the RAID LV to read all data and parity
+blocks in the array and check for discrepancies
+(mismatches between mirrors or incorrect parity values).
+\fBcheck\fP will count but not correct discrepancies.
+\fBrepair\fP will correct discrepancies.
+See \fBlvs\fP(8) for reporting discrepancies found or repaired.
+.
+.HP
+\fB--sysinit\fP
+.br
+Indicates that vgchange/lvchange is being invoked from early system initialisation
+scripts (e.g. rc.sysinit or an initrd), before writable 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 --ignorelockingfailure, --ignoremonitoring,
+--poll n, and setting env var LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES.
+vgchange/lvchange skip autoactivation, and defer to pvscan autoactivation.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--vdosettings\fP \fIString\fP
+.br
+Specifies tunable VDO options for VDO LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --vdosettings for each option being set.
+These settings override the default VDO behaviors.
+To remove vdosettings and revert to the default
+VDO behaviors, use --vdosettings 'default'.
+See \fBlvmvdo\fP(7) for more information.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB--\fP[\fBraid\fP]\fBwritebehind\fP \fINumber\fP
+.br
+The maximum number of outstanding writes that are allowed to
+devices in a RAID1 LV that is marked 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
+\fB--\fP[\fBraid\fP]\fBwritemostly\fP \fIPV\fP[\fB:t\fP|\fBn\fP|\fBy\fP]
+.br
+Mark a device in a RAID1 LV 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 PV.
+It is also possible to remove the write-mostly flag by adding the
+suffix \fB:n\fP at the end of the PV name, or to toggle the value with
+the suffix \fB:t\fP. Repeat this option to change the attribute on
+multiple PVs.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.HP
+\fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
+.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 y.
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+LV1 indicates the LV must have a specific type, where the
+accepted LV types are listed. (raid represents raid<N> type).
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I Select
+Select indicates that a required positional parameter can
+be omitted if the \fB--select\fP option is used.
+No arg appears in this position.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvconvert.8.in b/man/lvconvert.8.in
deleted file mode 100644
index 2659719..0000000
--- a/man/lvconvert.8.in
+++ /dev/null
@@ -1,307 +0,0 @@
-.TH LVCONVERT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc" \" -*- nroff -*-
-.SH NAME
-lvconvert \- convert a logical volume from linear to mirror or snapshot
-.SH SYNOPSIS
-.B lvconvert
-.BR \-m | \-\-mirrors
-.I Mirrors
-.RB [ \-\-mirrorlog
-.RI { disk | core | mirrored }]
-.RB [ \-\-corelog ]
-.RB [ \-R | \-\-regionsize
-.IR MirrorLogRegionSize ]
-.RB [ \-\-type
-.IR SegmentType ]
-.RB [ \-A | \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-b | \-\-background ]
-.RB [ \-f | \-\-force ]
-.RB [ \-i | \-\-interval
-.IR Seconds ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-stripes
-.I Stripes
-.RB [ \-I | \-\-stripesize
-.IR StripeSize ]]
-.RB [ \-\-noudevsync ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-y | \-\-yes ]
-.RB [ \-\-version ]
-.IR LogicalVolume [ Path ]
-.RI [ PhysicalVolume [ Path ][ :PE [ -PE ]]...]
-.sp
-.B lvconvert \-\-splitmirrors \fIImages
-.RB [ \-\-name
-.IR SplitLogicalVolumeName ]
-.RB [ \-\-trackchanges ]
-.IR MirrorLogicalVolume [ Path ]
-.RI [ SplittablePhysicalVolume [ Path ][ :PE [ -PE ]]...]
-.sp
-.B lvconvert
-.BR \-s | \-\-snapshot
-.RB [ \-c | \-\-chunksize
-.IR ChunkSize ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-noudevsync ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-Z | \-\-zero
-.RI { y | n }]
-.RB [ \-\-version ]
-.IR OriginalLogicalVolume [ Path ]
-.IR SnapshotLogicalVolume [ Path ]
-.sp
-.B lvconvert \-\-merge
-.RB [ \-b | \-\-background ]
-.RB [ \-i | \-\-interval
-.IR Seconds ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.IR LogicalVolume [ Path ]...
-.sp
-.B lvconvert \-\-thinpool
-.IR ThinPoolLogicalVolume { Name | Path }
-.RB [ \-c | \-\-chunksize
-.IR ChunkSize ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-Z | \-\-zero
-.RI { y | n }]
-.IR ThinMetadataLogicalVolume { Name | Path }
-.sp
-.B lvconvert \-\-repair
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.IR LogicalVolume [ Path ]
-.RI [ PhysicalVolume [ Path ]...]
-.sp
-.B lvconvert \-\-replace \fIPhysicalVolume
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.IR LogicalVolume [ Path ]
-.RI [ PhysicalVolume [ Path ]...]
-
-.SH DESCRIPTION
-lvconvert is used to change the segment type (i.e. linear, mirror, etc) or
-characteristics of a logical volume. For example, it can add or remove the
-redundant images of a logical volume, change the log type of a mirror, or
-designate a logical volume as a snapshot repository.
-.br
-If the conversion requires allocation of physical extents (for
-example, when converting from linear to mirror) and you specify
-one or more PhysicalVolumes (optionally with ranges of physical
-extents), allocation of physical extents will be restricted to
-these physical extents. If the conversion frees physical extents
-(for example, when converting from a mirror to a linear, or reducing
-mirror legs) and you specify one or more PhysicalVolumes,
-the freed extents come first from the specified PhysicalVolumes.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.br
-Exactly one of
-.BR \-\-splitmirrors ", " \-\-mirrors ", " \-\-repair ", " \-\-snapshot
-or \fB\-\-merge\fP arguments is required.
-.TP
-.BR \-m ", " \-\-mirrors " " \fIMirrors
-Specifies the degree of the mirror you wish to create.
-For example, "\fB-m 1\fP" would convert the original logical
-volume to a mirror volume with 2-sides; that is, a
-linear volume plus one copy.
-.TP
-.IR \fB\-\-mirrorlog " {" disk | core | mirrored }
-Specifies the type of log to use.
-The default is disk, which is persistent and requires
-a small amount of storage space, usually on a separate device
-from the data being mirrored.
-Core 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 - perhaps, for example, after every reboot.
-Using "mirrored" will create a persistent log that is itself mirrored.
-.TP
-.B \-\-corelog
-The optional argument \fB--corelog\fP is the same as specifying
-\fB--mirrorlog core\fP.
-.TP
-.BR \-R ", " \-\-regionsize " " \fIMirrorLogRegionSize
-A mirror is divided into regions of this size (in MB), and the mirror log
-uses this granularity to track which regions are in sync.
-.TP
-.B \-\-type \fISegmentType
-Used to convert a logical volume to another segment type or to explicitly state
-the desired RAID1 segment type (\fImirror\fP or \fIraid1\fP) when converting
-a linear logical volume to a mirror with the \fB-m\fP argument.
-.TP
-.BR \-b ", " \-\-background
-Run the daemon in the background.
-.TP
-.BR \-i ", " \-\-interval " " \fISeconds
-Report progress as a percentage at regular intervals.
-.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
-.B \-\-splitmirrors \fIImages
-The number of redundant Images of a mirror to be split off and used
-to form a new logical volume. A name must be supplied for the
-newly-split-off logical volume using the \fB\-\-name\fP argument, unless
-the \fB\-\-trackchanges\fP argument is given.
-.TP
-.B \-n \fIName
-The name to apply to a logical volume which has been split off from
-a mirror logical volume.
-.TP
-.B \-\-trackchanges
-Used with \fB\-\-splitmirrors\fP on a raid1 device, this tracks changes so
-that the read-only detached image can be merged efficiently back into
-the mirror later. Only the regions of the detatched device where
-the data changed get resynchronized.
-
-Please note that this feature is only supported with the new md-based mirror
-implementation and not with the original device-mapper mirror implementation.
-.TP
-.B \-s, \-\-snapshot
-Create a snapshot from existing logical volume using another
-existing logical volume as its origin.
-.TP
-.BR \-c ", " \-\-chunksize " " \fIChunkSize
-Power of 2 chunk size for the snapshot logical volume between 4KiB and 512KiB.
-.TP
-.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
-Controls zeroing of the first KB of data in the snapshot.
-If the volume is read-only the snapshot will not be zeroed.
-.TP
-.B \-\-merge
-Merges a snapshot into its origin volume or merges a raid1 image that has
-been split from its mirror with \fB\-\-trackchanges\fP back into its mirror.
-
-To check if your kernel supports the snapshot merge feature, look
-for 'snapshot-merge' in the output
-of \fBdmsetup targets\fP. If both the origin and snapshot volume are not
-open the merge will start immediately. Otherwise, the merge will start
-the first time either the origin or snapshot 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 logical volume will have the origin's name,
-minor number and UUID. While the merge is in progress, reads or writes to the
-origin appear as they were directed to the snapshot being merged. When the
-merge finishes, the merged snapshot is removed. Multiple snapshots may
-be specified on the commandline or a @tag may be used to specify
-multiple snapshots be merged to their respective origin.
-.TP
-.B \-\-repair
-Repair a mirror after suffering a disk failure. The mirror will be brought back
-into a consistent state. By default, the original number of mirrors 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.
-Additionally, you may use \fB\-\-use-policies\fP to use the device
-replacement policy specified in \fBlvm.conf\fP(5),
-viz. activation/mirror_log_fault_policy or
-activation/mirror_device_fault_policy.
-.TP
-.B \-\-replace \fIPhysicalVolume
-Remove the specified device (\fIPhysicalVolume\fP) and replace it with one
-that is available in the volume group or from the specific list provided.
-This option is only available to RAID segment types
-(e.g. "raid1", "raid5", etc).
-
-.SH Examples
-Converts the linear logical volume "vg00/lvol1" to a two-way mirror
-logical volume:
-.sp
-.B lvconvert \-m1 vg00/lvol1
-
-Converts the linear logical volume "vg00/lvol1" to a two-way RAID1
-logical volume:
-.sp
-.B lvconvert \-\-type raid1 \-m1 vg00/lvol1
-
-Converts a mirror with a disk log to a mirror with an in-memory log:
-.sp
-.B lvconvert \-\-mirrorlog core vg00/lvol1
-
-Converts a mirror with an in-memory log to a mirror with a disk log:
-.sp
-.B lvconvert \-\-mirrorlog disk vg00/lvol1
-
-Converts a mirror logical volume to a linear logical volume:
-.sp
-.B lvconvert \-m0 vg00/lvol1
-
-Converts a mirror logical volume to a RAID1 logical volume with the same
-number of images:
-.sp
-.B lvconvert \-\-type raid1 vg00/mirror_lv
-
-Converts logical volume "vg00/lvol2" to snapshot of original volume
-"vg00/lvol1":
-.sp
-.B lvconvert \-s vg00/lvol1 vg00/lvol2
-
-Converts linear logical volume "vg00/lvol1" to a two-way mirror,
-using physical extents /dev/sda:0-15 and /dev/sdb:0-15 for allocation
-of new extents:
-.sp
-.B lvconvert \-m1 vg00/lvol1 /dev/sda:0-15 /dev/sdb:0-15
-
-Converts mirror logical volume "vg00/lvmirror1" to linear, freeing physical
-extents from /dev/sda:
-.sp
-.B lvconvert \-m0 vg00/lvmirror1 /dev/sda
-
-Merges "vg00/lvol1_snap" into its origin:
-.sp
-.B lvconvert \-\-merge vg00/lvol1_snap
-
-If "vg00/lvol1", "vg00/lvol2" and "vg00/lvol3" are all tagged with "some_tag"
-each snapshot logical volume will be merged serially,
-e.g.: "vg00/lvol1", then "vg00/lvol2", then "vg00/lvol3".
-If \-\-background were used it would start
-all snapshot logical volume merges in parallel.
-.sp
-.B lvconvert \-\-merge @some_tag
-
-Extracts one image from the mirror, making it a new logical volume named
-"lv_split". The mirror the image is extracted from is reduced accordingly.
-If it was a 2-way mirror (created with '-m 1'), then the resulting original
-volume will be linear.
-.sp
-.B lvconvert \-\-splitmirrors 1 \-\-name lv_split vg00/lvmirror1
-
-A mirrored logical volume created with \-\-type raid1 can use the
-\-\-trackchanges argument when splitting off an image.
-Detach one image from the mirrored logical volume lv_raid1 as a separate
-read-only device and track the changes made to the mirror while it is detached.
-The split-off device has a name of the form lv_raid1_rimage_N, where N is
-a number, and it cannot be renamed.
-.sp
-.B lvconvert \-\-splitmirrors 1 \-\-trackchanges vg00/lv_raid1
-
-Merge an image that was detached temporarily from its mirror with
-the \-\-trackchanges argument back into its original mirror and
-bring its contents back up-to-date.
-.sp
-.B lvconvert \-\-merge vg00/lv_raid1_rimage_1
-
-Replaces the physical volume "/dev/sdb1" in the RAID1 logical volume "my_raid1"
-with the specified physical volume "/dev/sdf1". Had the argument "/dev/sdf1"
-been left out, lvconvert would attempt to find a suitable device from those
-available in the volume group.
-.sp
-.B lvconvert \-\-replace /dev/sdb1 vg00/my_raid1 /dev/sdf1
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgcreate (8),
-.BR lvremove (8),
-.BR lvrename (8),
-.BR lvextend (8),
-.BR lvreduce (8),
-.BR lvdisplay (8),
-.BR lvscan (8)
diff --git a/man/lvconvert.8_des b/man/lvconvert.8_des
new file mode 100644
index 0000000..1bc3dfa
--- /dev/null
+++ b/man/lvconvert.8_des
@@ -0,0 +1,71 @@
+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.
+.P
+To display the current LV type, run the command:
+.P
+.B lvs -o name,segtype
+.I LV
+.P
+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.
+.P
+Sub LVs can be displayed with the command:
+.P
+.B lvs -a
+.P
+The
+.B linear
+type is equivalent to the
+.B striped
+type when one stripe exists.
+In that case, the types can sometimes be used interchangeably.
+.P
+In most cases, the
+.B mirror
+type is deprecated and the
+.B raid1
+type should be used. They are both implementations of mirroring.
+.P
+Striped raid types are
+\fBraid0/raid0_meta\fP,
+\fBraid5\fP (an alias for raid5_ls),
+\fBraid6\fP (an alias for raid6_zr) and
+\fBraid10\fP (an alias for raid10_near).
+.P
+As opposed to mirroring, raid5 and raid6 stripe data and calculate parity
+blocks. The parity blocks can be used for data block recovery in case
+devices fail. A maximum number of one device in a raid5 LV may fail, and
+two in case of raid6. Striped raid types typically rotate the parity and
+data blocks for performance reasons, thus avoiding contention on a single
+device. Specific arrangements of parity and data blocks (layouts) can be
+used to optimize I/O performance, or to convert between raid levels. See
+\fBlvmraid\fP(7) for more information.
+.P
+Layouts of raid5 rotating parity blocks can be: left-asymmetric
+(raid5_la), left-symmetric (raid5_ls with alias raid5), right-asymmetric
+(raid5_ra), right-symmetric (raid5_rs) and raid5_n, which doesn't rotate
+parity blocks. Layouts of raid6 are: zero-restart (raid6_zr with alias
+raid6), next-restart (raid6_nr), and next-continue (raid6_nc).
+.P
+Layouts including _n allow for conversion between raid levels (raid5_n to
+raid6 or raid5_n to striped/raid0/raid0_meta). Additionally, special raid6
+layouts for raid level conversions between raid5 and raid6 are:
+raid6_ls_6, raid6_rs_6, raid6_la_6 and raid6_ra_6. Those correspond to
+their raid5 counterparts (e.g. raid5_rs can be directly converted to
+raid6_rs_6 and vice-versa).
+.P
+raid10 (an alias for raid10_near) is currently limited to one data copy
+and even number of sub LVs. This is a mirror group layout, thus a single
+sub LV may fail per mirror group without data loss.
+.P
+Striped raid types support converting the layout, their stripesize and
+their number of stripes.
+.P
+The striped raid types combined with raid1 allow for conversion from
+linear \[->] striped/raid0/raid0_meta and vice-versa by e.g. linear \[<>] raid1
+\[<>] raid5_n (then adding stripes) \[<>] striped/raid0/raid0_meta.
diff --git a/man/lvconvert.8_end b/man/lvconvert.8_end
new file mode 100644
index 0000000..6fe32fd
--- /dev/null
+++ b/man/lvconvert.8_end
@@ -0,0 +1,121 @@
+.
+.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.)
+.P
+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.
+.br
+.B lvconvert --type mirror --mirrors 1 vg/lvol1
+.P
+Convert a linear LV to a two-way RAID1 LV.
+.br
+.B lvconvert --type raid1 --mirrors 1 vg/lvol1
+.P
+Convert a mirror LV to use an in-memory log.
+.br
+.B lvconvert --mirrorlog core vg/lvol1
+.P
+Convert a mirror LV to use a disk log.
+.br
+.B lvconvert --mirrorlog disk vg/lvol1
+.P
+Convert a mirror or raid1 LV to a linear LV.
+.br
+.B lvconvert --type linear vg/lvol1
+.P
+Convert a mirror LV to a raid1 LV with the same number of images.
+.br
+.B lvconvert --type raid1 vg/lvol1
+.P
+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
+.P
+Convert a mirror LV to a linear LV, freeing physical extents from a specific PV.
+.br
+.B lvconvert --type linear vg/lvol1 /dev/sda
+.P
+Split one image from a mirror or raid1 LV, making it a new LV.
+.br
+.B lvconvert --splitmirrors 1 --name lv_split vg/lvol1
+.P
+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
+.P
+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
+.P
+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
+.P
+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
+.P
+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
+.P
+Convert a thick LV into a thin-pool data volume and continue using this LV
+through thinLV and for the conversion set the pool metadata size to 1GiB.
+.br
+.B lvconvert --type thin --poolmetadatasize 1G vg/lvol1
+.P
+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
+.P
+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
+.P
+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
+.P
+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
+.P
+Detach and keep the cache pool from a cache LV.
+.br
+.B lvconvert --splitcache vg/lvol1
+.P
+Detach and remove the cache pool from a cache LV.
+.br
+.B lvconvert --uncache vg/lvol1
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
new file mode 100644
index 0000000..20d9421
--- /dev/null
+++ b/man/lvconvert.8_pregen
@@ -0,0 +1,2040 @@
+.TH LVCONVERT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvconvert \(em Change logical volume layout
+.
+.SH SYNOPSIS
+.
+\fBlvconvert\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.P
+.ad l
+ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.br
+ \fB-b\fP|\fB--background\fP
+.br
+ \fB-H\fP|\fB--cache\fP
+.br
+ \fB--cachedevice\fP \fIPV\fP
+.br
+ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP
+.br
+ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP
+.br
+ \fB--cachepolicy\fP \fIString\fP
+.br
+ \fB--cachepool\fP \fILV\fP
+.br
+ \fB--cachesettings\fP \fIString\fP
+.br
+ \fB--cachesize\fP \fISize\fP[m|UNIT]
+.br
+ \fB--cachevol\fP \fILV\fP
+.br
+ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT]
+.br
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--compression\fP \fBy\fP|\fBn\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--deduplication\fP \fBy\fP|\fBn\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP
+.br
+ \fB-f\fP|\fB--force\fP
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB-i\fP|\fB--interval\fP \fINumber\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB--merge\fP
+.br
+ \fB--mergemirrors\fP
+.br
+ \fB--mergesnapshot\fP
+.br
+ \fB--mergethin\fP
+.br
+ \fB--metadataprofile\fP \fIString\fP
+.br
+ \fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP
+.br
+ \fB-m\fP|\fB--mirrors\fP [\fB+\fP|\fB-\fP]\fINumber\fP
+.br
+ \fB-n\fP|\fB--name\fP \fIString\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--noudevsync\fP
+.br
+ \fB--originname\fP \fILV\fP
+.br
+ \fB--poolmetadata\fP \fILV\fP
+.br
+ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT]
+.br
+ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB--raidintegrity\fP \fBy\fP|\fBn\fP
+.br
+ \fB--raidintegrityblocksize\fP \fINumber\fP
+.br
+ \fB--raidintegritymode\fP \fIString\fP
+.br
+ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP
+.br
+ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT]
+.br
+ \fB--repair\fP
+.br
+ \fB--replace\fP \fIPV\fP
+.br
+ \fB-k\fP|\fB--setactivationskip\fP \fBy\fP|\fBn\fP
+.br
+ \fB-s\fP|\fB--snapshot\fP
+.br
+ \fB--splitcache\fP
+.br
+ \fB--splitmirrors\fP \fINumber\fP
+.br
+ \fB--splitsnapshot\fP
+.br
+ \fB--startpoll\fP
+.br
+ \fB--stripes\fP \fINumber\fP
+.br
+ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
+.br
+ \fB--swapmetadata\fP
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB-T\fP|\fB--thin\fP
+.br
+ \fB--thinpool\fP \fILV\fP
+.br
+ \fB--trackchanges\fP
+.br
+ \fB--type\fP \c
+.nh
+\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
+.hy
+.br
+ \fB--uncache\fP
+.br
+ \fB--usepolicies\fP
+.br
+ \fB--vdopool\fP \fILV\fP
+.br
+ \fB--vdosettings\fP \fIString\fP
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
+.br
+ \fB-y\fP|\fB--yes\fP
+.br
+ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+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.
+.P
+To display the current LV type, run the command:
+.P
+.B lvs -o name,segtype
+.I LV
+.P
+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.
+.P
+Sub LVs can be displayed with the command:
+.P
+.B lvs -a
+.P
+The
+.B linear
+type is equivalent to the
+.B striped
+type when one stripe exists.
+In that case, the types can sometimes be used interchangeably.
+.P
+In most cases, the
+.B mirror
+type is deprecated and the
+.B raid1
+type should be used. They are both implementations of mirroring.
+.P
+Striped raid types are
+\fBraid0/raid0_meta\fP,
+\fBraid5\fP (an alias for raid5_ls),
+\fBraid6\fP (an alias for raid6_zr) and
+\fBraid10\fP (an alias for raid10_near).
+.P
+As opposed to mirroring, raid5 and raid6 stripe data and calculate parity
+blocks. The parity blocks can be used for data block recovery in case
+devices fail. A maximum number of one device in a raid5 LV may fail, and
+two in case of raid6. Striped raid types typically rotate the parity and
+data blocks for performance reasons, thus avoiding contention on a single
+device. Specific arrangements of parity and data blocks (layouts) can be
+used to optimize I/O performance, or to convert between raid levels. See
+\fBlvmraid\fP(7) for more information.
+.P
+Layouts of raid5 rotating parity blocks can be: left-asymmetric
+(raid5_la), left-symmetric (raid5_ls with alias raid5), right-asymmetric
+(raid5_ra), right-symmetric (raid5_rs) and raid5_n, which doesn't rotate
+parity blocks. Layouts of raid6 are: zero-restart (raid6_zr with alias
+raid6), next-restart (raid6_nr), and next-continue (raid6_nc).
+.P
+Layouts including _n allow for conversion between raid levels (raid5_n to
+raid6 or raid5_n to striped/raid0/raid0_meta). Additionally, special raid6
+layouts for raid level conversions between raid5 and raid6 are:
+raid6_ls_6, raid6_rs_6, raid6_la_6 and raid6_ra_6. Those correspond to
+their raid5 counterparts (e.g. raid5_rs can be directly converted to
+raid6_rs_6 and vice-versa).
+.P
+raid10 (an alias for raid10_near) is currently limited to one data copy
+and even number of sub LVs. This is a mirror group layout, thus a single
+sub LV may fail per mirror group without data loss.
+.P
+Striped raid types support converting the layout, their stripesize and
+their number of stripes.
+.P
+The striped raid types combined with raid1 allow for conversion from
+linear \[->] striped/raid0/raid0_meta and vice-versa by e.g. linear \[<>] raid1
+\[<>] raid5_n (then adding stripes) \[<>] striped/raid0/raid0_meta.
+.
+.SH USAGE
+.
+Convert LV to linear.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBlinear\fP \fILV\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Convert LV to striped.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBstriped\fP \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ \fB--stripes\fP \fINumber\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Convert LV to type mirror (also see type raid1),
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBmirror\fP \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-m\fP|\fB--mirrors\fP [\fB+\fP|\fB-\fP]\fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ \fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Convert LV to raid or change raid layout
+.br
+(a specific raid level must be used, e.g. raid1).
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBraid\fP \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-m\fP|\fB--mirrors\fP [\fB+\fP|\fB-\fP]\fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ \fB--stripes\fP \fINumber\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Convert LV to raid1 or mirror, or change number of mirror images.
+.br
+.P
+\fBlvconvert\fP \fB-m\fP|\fB--mirrors\fP [\fB+\fP|\fB-\fP]\fINumber\fP \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ \fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Convert raid LV to change number of stripe images.
+.br
+.P
+\fBlvconvert\fP \fB--stripes\fP \fINumber\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: raid
+.RE
+.P
+\(em
+.P
+Convert raid LV to change the stripe size.
+.br
+.P
+\fBlvconvert\fP \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: raid
+.RE
+.P
+\(em
+.P
+Split images from a raid1 or mirror LV and use them to create a new LV.
+.br
+.P
+\fBlvconvert\fP \fB--splitmirrors\fP \fINumber\fP \fB-n\fP|\fB--name\fP \fILV\fP\fI_new\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: cache mirror raid1
+.RE
+.P
+\(em
+.P
+Split images from a raid1 LV and track changes to origin for later merge.
+.br
+.P
+\fBlvconvert\fP \fB--splitmirrors\fP \fINumber\fP \fB--trackchanges\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: cache raid1
+.RE
+.P
+\(em
+.P
+Merge LV images that were split from a raid1 LV.
+.br
+.P
+\fBlvconvert\fP \fB--mergemirrors\fP \fIVG\fP|\fILV1\fP|\fITag\fP ...
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear raid
+.RE
+.P
+\(em
+.P
+Convert LV to a thin LV, using the original LV as an external origin.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBthin\fP \fB--thinpool\fP \fILV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--originname\fP \fILV\fP\fI_new\fP ]
+.br
+[ \fB--poolmetadata\fP \fILV\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped thin cache raid error zero
+.RE
+.P
+\(em
+.P
+Convert LV to a thin LV, using LV as thin-pool data volume.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBthin\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadata\fP \fILV\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped cache vdo raid error zero writecache
+.RE
+.P
+\(em
+.P
+Attach a cache pool to an LV, converts the LV to type cache.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBcache\fP \fB--cachepool\fP \fILV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-H\fP|\fB--cache\fP ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--poolmetadata\fP \fILV\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped thin thinpool vdo vdopool vdopooldata raid error zero
+.RE
+.P
+\(em
+.P
+Attach a writecache to an LV, converts the LV to type writecache.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBwritecache\fP \fB--cachevol\fP \fILV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped thinpool raid
+.RE
+.P
+\(em
+.P
+Attach a cache to an LV, converts the LV to type cache.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBcache\fP \fB--cachevol\fP \fILV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-H\fP|\fB--cache\fP ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped thinpool raid
+.RE
+.P
+\(em
+.P
+Add a writecache to an LV, using a specified cache device.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBwritecache\fP \fB--cachedevice\fP \fIPV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--cachesize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped thinpool raid
+.RE
+.P
+\(em
+.P
+Add a cache to an LV, using a specified cache device.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBcache\fP \fB--cachedevice\fP \fIPV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachesize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped thinpool raid
+.RE
+.P
+\(em
+.P
+Convert LV to type thin-pool.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBthin-pool\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP ]
+.br
+[ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadata\fP \fILV\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: linear striped cache raid error zero writecache
+.RE
+.P
+\(em
+.P
+Convert LV to type cache-pool.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBcache-pool\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--poolmetadata\fP \fILV\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: linear striped raid error zero
+.RE
+.P
+\(em
+.P
+Convert LV to type vdopool.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBvdo-pool\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-n\fP|\fB--name\fP \fILV\fP\fI_new\fP ]
+.br
+[ \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ \fB--compression\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--deduplication\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--vdosettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped cache raid
+.RE
+.P
+\(em
+.P
+Detach a cache from an LV.
+.br
+.P
+\fBlvconvert\fP \fB--splitcache\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: thinpool cache cachepool vdopool writecache
+.RE
+.P
+\(em
+.P
+Merge thin LV into its origin LV.
+.br
+.P
+\fBlvconvert\fP \fB--mergethin\fP \fILV1\fP ...
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: thin
+.RE
+.P
+\(em
+.P
+Merge COW snapshot LV into its origin.
+.br
+.P
+\fBlvconvert\fP \fB--mergesnapshot\fP \fILV1\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: snapshot
+.RE
+.P
+\(em
+.P
+Combine a former COW snapshot (second arg) with a former
+.br
+origin LV (first arg) to reverse a splitsnapshot command.
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBsnapshot\fP \fILV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-s\fP|\fB--snapshot\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped
+.RE
+.P
+\(em
+.P
+Replace failed PVs in a raid or mirror LV.
+.br
+Repair a thin pool.
+.br
+Repair a cache pool.
+.br
+.P
+\fBlvconvert\fP \fB--repair\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ \fB-k\fP|\fB--setactivationskip\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--usepolicies\fP ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: thinpool cache cachepool mirror raid
+.RE
+.P
+\(em
+.P
+Replace specific PV(s) in a raid LV with another PV.
+.br
+.P
+\fBlvconvert\fP \fB--replace\fP \fIPV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: raid
+.RE
+.P
+\(em
+.P
+Poll LV to continue conversion.
+.br
+.P
+\fBlvconvert\fP \fB--startpoll\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: mirror raid
+.RE
+.P
+\(em
+.P
+Add or remove data integrity checksums to raid images.
+.br
+.P
+\fBlvconvert\fP \fB--raidintegrity\fP \fBy\fP|\fBn\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--raidintegritymode\fP \fIString\fP ]
+.br
+[ \fB--raidintegrityblocksize\fP \fINumber\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: raid
+.RE
+.P
+\(em
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-b\fP|\fB--background\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+]
+.br
+[ \fB--noudevsync\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+.ad l
+\fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.ad b
+.br
+Determines the allocation policy when a command needs to allocate
+Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
+which can be changed with vgchange/lvchange, or overridden on the
+command line.
+\fBnormal\fP applies common sense rules such as not placing parallel stripes
+on the same PV.
+\fBinherit\fP applies the VG policy to an LV.
+\fBcontiguous\fP requires new PEs be placed adjacent to existing PEs.
+\fBcling\fP places new PEs on the same PV as existing PEs in the same
+stripe of the LV.
+If there are sufficient PEs for an allocation, but normal does not
+use them, \fBanywhere\fP will use them even if it reduces performance,
+e.g. by placing two stripes on the same PV.
+Optional positional PV args on the command line can also be used to limit
+which PVs the command will use for allocation.
+See \fBlvm\fP(8) for more information about allocation.
+.
+.HP
+\fB-b\fP|\fB--background\fP
+.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
+\fB-H\fP|\fB--cache\fP
+.br
+Specifies the command is handling a cache LV or cache pool.
+See --type cache and --type cache-pool.
+See \fBlvmcache\fP(7) for more information about LVM caching.
+.
+.HP
+\fB--cachedevice\fP \fIPV\fP
+.br
+The name of a device to use for a cache.
+.
+.HP
+\fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP
+.br
+Specifies the cache metadata format used by cache target.
+.
+.HP
+\fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP
+.br
+Specifies when writes to a cache LV should be considered complete.
+\fBwriteback\fP considers a write complete as soon as it is
+stored in the cache pool.
+\fBwritethough\fP considers a write complete only when it has
+been stored in both the cache pool and on the origin LV.
+While writethrough 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, all reads are served
+from the 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\fP(7) for more information.
+.
+.HP
+\fB--cachepolicy\fP \fIString\fP
+.br
+Specifies the cache policy for a cache LV.
+See \fBlvmcache\fP(7) for more information.
+.
+.HP
+\fB--cachepool\fP \fILV\fP
+.br
+The name of a cache pool.
+.
+.HP
+\fB--cachesettings\fP \fIString\fP
+.br
+Specifies tunable kernel options for dm-cache or dm-writecache LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --cachesettings for each option being set.
+These settings override the default kernel behaviors which are
+usually adequate. To remove cachesettings and revert to the default
+kernel behaviors, use --cachesettings 'default' for dm-cache or
+an empty string --cachesettings '' for dm-writecache.
+See \fBlvmcache\fP(7) for more information.
+.
+.HP
+\fB--cachesize\fP \fISize\fP[m|UNIT]
+.br
+The size of cache to use.
+.
+.HP
+\fB--cachevol\fP \fILV\fP
+.br
+The name of a cache volume.
+.
+.HP
+\fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT]
+.br
+The size of chunks in a snapshot, cache pool or thin pool.
+For snapshots, the value must be a power of 2 between 4 KiB and 512 KiB
+and the default value is 4.
+For a cache pool the value must be between 32 KiB and 1 GiB
+and the default value is 64.
+For a thin pool the value must be between 64 KiB and 1 GiB
+and the default value starts with 64 and scales up to fit the
+pool metadata size within 128 MiB, if the pool metadata size is not specified.
+The value must be a multiple of 64 KiB.
+See \fBlvmthin\fP(7) and \fBlvmcache\fP(7) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--compression\fP \fBy\fP|\fBn\fP
+.br
+Controls whether compression is enabled or disable for VDO volume.
+See \fBlvmvdo\fP(7) for more information about VDO usage.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--deduplication\fP \fBy\fP|\fBn\fP
+.br
+Controls whether deduplication is enabled or disable for VDO volume.
+See \fBlvmvdo\fP(7) for more information about VDO usage.
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
+.br
+Specifies how the device-mapper thin pool layer in the kernel should
+handle discards.
+\fBignore\fP causes the thin pool to ignore discards.
+\fBnopassdown\fP causes the thin pool to process discards itself to
+allow reuse of unneeded extents in the thin pool.
+\fBpassdown\fP causes the thin pool to process discards itself
+(like nopassdown) and pass the discards to the underlying device.
+See \fBlvmthin\fP(7) for more information.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--errorwhenfull\fP \fBy\fP|\fBn\fP
+.br
+Specifies thin pool behavior when data space is exhausted.
+When yes, device-mapper will immediately return an error
+when a thin pool is full and an I/O request requires space.
+When no, device-mapper will queue these I/O requests for a
+period of time to allow the thin pool to be extended.
+Errors are returned if no space is available after the timeout.
+(Also see dm-thin-pool kernel module option no_space_timeout.)
+See \fBlvmthin\fP(7) for more information.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB-i\fP|\fB--interval\fP \fINumber\fP
+.br
+Report progress at regular intervals.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--merge\fP
+.br
+An alias for --mergethin, --mergemirrors, or --mergesnapshot,
+depending on the type of LV.
+.
+.HP
+\fB--mergemirrors\fP
+.br
+Merge LV images that were split from a raid1 LV.
+See --splitmirrors with --trackchanges.
+.
+.HP
+\fB--mergesnapshot\fP
+.br
+Merge COW snapshot LV into its origin.
+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
+\fB--mergethin\fP
+.br
+Merge thin LV into its origin LV.
+The origin thin LV takes the content of the thin snapshot,
+and the thin snapshot LV is removed.
+See \fBlvmthin\fP(7) for more information.
+.
+.HP
+\fB--metadataprofile\fP \fIString\fP
+.br
+The metadata profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP
+.br
+Specifies the type of mirror log for LVs with the "mirror" type
+(does not apply to the "raid1" type.)
+\fBdisk\fP is a persistent log and requires a small amount of
+storage space, usually on a separate device from the data being mirrored.
+\fBcore\fP is not persistent; the log is kept only in memory.
+In this case, the mirror must be synchronized (by copying LV data from
+the first device to others) each time the LV is activated, e.g. after reboot.
+\fBmirrored\fP is a persistent log that is itself mirrored, but
+should be avoided. Instead, use the raid1 type for log redundancy.
+.
+.HP
+\fB-m\fP|\fB--mirrors\fP [\fB+\fP|\fB-\fP]\fINumber\fP
+.br
+Specifies the number of mirror images in addition to the original LV
+image, e.g. --mirrors 1 means there are two images of the data, the
+original and one mirror image.
+Optional positional PV args on the command line can specify the devices
+the images should be placed on.
+There are two mirroring implementations: "raid1" and "mirror".
+These are the names of the corresponding LV types, or "segment types".
+Use the --type option to specify which to use (raid1 is default,
+and mirror is legacy)
+Use \fBlvm.conf\fP(5) \fBglobal/mirror_segtype_default\fP and
+global/raid10_segtype_default to configure the default types.
+The plus prefix \fB+\fP can be used, in which case
+the number is added to the current number of images,
+or the minus prefix \fB-\fP can be used, in which case
+the number is subtracted from the current number of images.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB-n\fP|\fB--name\fP \fIString\fP
+.br
+Specifies the name of a new LV.
+When unspecified, a default name of "lvol#" is
+generated, where # is a number generated by LVM.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB--originname\fP \fILV\fP
+.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.
+.
+.HP
+\fB--poolmetadata\fP \fILV\fP
+.br
+The name of a an LV to use for storing pool metadata.
+.
+.HP
+\fB--poolmetadatasize\fP \fISize\fP[m|UNIT]
+.br
+Specifies the size of the new pool metadata LV.
+.
+.HP
+\fB--poolmetadataspare\fP \fBy\fP|\fBn\fP
+.br
+Enable or disable the automatic creation and management of a
+spare pool metadata LV in the VG. A spare metadata LV is reserved
+space that can be used when repairing a pool.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--raidintegrity\fP \fBy\fP|\fBn\fP
+.br
+Enable or disable data integrity checksums for raid images.
+.
+.HP
+\fB--raidintegrityblocksize\fP \fINumber\fP
+.br
+The block size to use for dm-integrity on raid images.
+The integrity block size should usually match the device
+logical block size, or the file system block size.
+It may be less than the file system block size, but not
+less than the device logical block size.
+Possible values: 512, 1024, 2048, 4096.
+.
+.HP
+\fB--raidintegritymode\fP \fIString\fP
+.br
+Use a journal (default) or bitmap for keeping integrity checksums consistent
+in case of a crash. The bitmap areas are recalculated after a crash, so corruption
+in those areas would not be detected. A journal does not have this problem.
+The journal mode doubles writes to storage, but can improve performance for
+scattered writes packed into a single journal write.
+bitmap mode can in theory achieve full write throughput of the device,
+but would not benefit from the potential scattered write optimization.
+.
+.HP
+\fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP
+.br
+Sets read ahead sector count of an LV.
+\fBauto\fP is the default which allows the kernel to choose
+a suitable value automatically.
+\fBnone\fP is equivalent to zero.
+.
+.HP
+\fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT]
+.br
+Size of each raid or mirror synchronization region.
+\fBlvm.conf\fP(5) \fBactivation/raid_region_size\fP can be used to
+configure a default.
+.
+.HP
+\fB--repair\fP
+.br
+Replace failed PVs in a raid or mirror LV, or run a repair
+utility on a thin pool. See \fBlvmraid\fP(7) and \fBlvmthin\fP(7)
+for more information.
+.
+.HP
+\fB--replace\fP \fIPV\fP
+.br
+Replace a specific PV in a raid LV with another PV.
+The new PV to use can be optionally specified after the LV.
+Multiple PVs can be replaced by repeating this option.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB-k\fP|\fB--setactivationskip\fP \fBy\fP|\fBn\fP
+.br
+Persistently sets (yes) or clears (no) the "activation skip" flag on an LV.
+An LV with this flag set is not activated unless the
+--ignoreactivationskip option is used by the activation command.
+This flag is set by default on new thin snapshot LVs.
+The flag is not applied to deactivation.
+The current value of the flag is indicated in the lvs lv_attr bits.
+.
+.HP
+\fB-s\fP|\fB--snapshot\fP
+.br
+Combine a former COW snapshot LV with a former origin LV to reverse
+a previous --splitsnapshot command.
+.
+.HP
+\fB--splitcache\fP
+.br
+Separates a cache pool from a cache LV, and keeps the unused cache pool LV.
+Before the separation, the cache is flushed. Also see --uncache.
+.
+.HP
+\fB--splitmirrors\fP \fINumber\fP
+.br
+Splits the specified number of images from a raid1 or mirror LV
+and uses them to create a new LV. If --trackchanges is also specified,
+changes to the raid1 LV are tracked while the split LV remains detached.
+If --name is specified, then the images are permanently split from the
+original LV and changes are not tracked.
+.
+.HP
+\fB--splitsnapshot\fP
+.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.
+.
+.HP
+\fB--startpoll\fP
+.br
+Start polling an LV to continue processing a conversion.
+.
+.HP
+\fB--stripes\fP \fINumber\fP
+.br
+Specifies the number of stripes in a striped LV. This is the number of
+PVs (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 --stripesize). This does not apply to
+existing allocated space, only newly allocated space can be striped.
+.
+.HP
+\fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
+.br
+The amount of data that is written to one device before
+moving to the next in a striped LV.
+.
+.HP
+\fB--swapmetadata\fP
+.br
+Extracts the metadata LV from a pool and replaces it with another specified LV.
+The extracted LV is preserved and given the name of the LV that replaced it.
+Use for repair only. When the metadata LV is swapped out of the pool, it can
+be activated directly and used with thin provisioning tools:
+\fBcache_dump\fP(8), \fBcache_repair\fP(8), \fBcache_restore\fP(8),
+\fBthin_dump\fP(8), \fBthin_repair\fP(8), \fBthin_restore\fP(8).
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-T\fP|\fB--thin\fP
+.br
+Specifies the command is handling a thin LV or thin pool.
+See --type thin, --type thin-pool, and --virtualsize.
+See \fBlvmthin\fP(7) for more information about LVM thin provisioning.
+.
+.HP
+\fB--thinpool\fP \fILV\fP
+.br
+The name of a thin pool LV.
+.
+.HP
+\fB--trackchanges\fP
+.br
+Can be used with --splitmirrors on a raid1 LV. This causes
+changes to the original raid1 LV to be tracked while the split images
+remain detached. This is a temporary state that allows the read-only
+detached image to be merged efficiently back into the raid1 LV later.
+Only the regions with changed data are resynchronized during merge.
+While a raid1 LV is tracking changes, operations on it are limited to
+merging the split image (see --mergemirrors) or permanently splitting
+the image (see --splitmirrors with --name.
+.
+.HP
+.ad l
+\fB--type\fP \c
+.nh
+\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
+.hy
+.ad b
+.br
+The LV type, also known as "segment type" or "segtype".
+See usage descriptions for the specific ways to use these types.
+For more information about redundancy and performance (\fBraid\fP<N>, \fBmirror\fP, \fBstriped\fP, \fBlinear\fP) see \fBlvmraid\fP(7).
+For thin provisioning (\fBthin\fP, \fBthin-pool\fP) see \fBlvmthin\fP(7).
+For performance caching (\fBcache\fP, \fBcache-pool\fP) see \fBlvmcache\fP(7).
+For copy-on-write snapshots (\fBsnapshot\fP) see usage definitions.
+For VDO (\fBvdo\fP) see \fBlvmvdo\fP(7).
+Several commands omit an explicit type option because the type
+is inferred from other options or shortcuts
+(e.g. --stripes, --mirrors, --snapshot, --virtualsize, --thin, --cache, --vdo).
+Use inferred types with care because it can lead to unexpected results.
+.
+.HP
+\fB--uncache\fP
+.br
+Separates a cache pool from a cache LV, and deletes the unused cache pool LV.
+Before the separation, the cache is flushed. Also see --splitcache.
+.
+.HP
+\fB--usepolicies\fP
+.br
+Perform an operation according to the policy configured in \fBlvm.conf\fP(5)
+or a profile.
+.
+.HP
+\fB--vdopool\fP \fILV\fP
+.br
+The name of a VDO pool LV.
+See \fBlvmvdo\fP(7) for more information about VDO usage.
+.
+.HP
+\fB--vdosettings\fP \fIString\fP
+.br
+Specifies tunable VDO options for VDO LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --vdosettings for each option being set.
+These settings override the default VDO behaviors.
+To remove vdosettings and revert to the default
+VDO behaviors, use --vdosettings 'default'.
+See \fBlvmvdo\fP(7) for more information.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
+.br
+The virtual size of a new thin LV.
+See \fBlvmthin\fP(7) for more information about LVM thin provisioning.
+Using virtual size (-V) and actual size (-L) together creates
+a sparse LV.
+\fBlvm.conf\fP(5) \fBglobal/sparse_segtype_default\fP determines the
+default segment type used to create a sparse LV.
+Anything written to a sparse LV will be returned when reading from it.
+Reading from other areas of the LV will return blocks of zeros.
+When using a snapshot to create a sparse LV, a hidden virtual device
+is created using the zero target, and the LV has the suffix _vorigin.
+Snapshots are less efficient than thin provisioning when creating
+large sparse LVs (GiB).
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.HP
+\fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
+.br
+For snapshots, this controls zeroing of the first 4 KiB 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.
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+LV1 indicates the LV must have a specific type, where the
+accepted LV types are listed. (raid represents raid<N> type).
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
+.
+.SH ADVANCED USAGE
+.
+Alternate command forms, advanced command usage, and listing of all valid syntax for completeness.
+.P
+Change the region size of an LV.
+.br
+.P
+\fBlvconvert\fP \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] \fILV1\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: raid
+.RE
+.P
+\(em
+.P
+Change the type of mirror log used by a mirror LV.
+.br
+.P
+\fBlvconvert\fP \fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: mirror
+.RE
+.P
+\(em
+.P
+Convert LV to a thin LV, using the original LV as an external origin.
+.br
+.P
+\fBlvconvert\fP \fB-T\fP|\fB--thin\fP \fB--thinpool\fP \fILV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--type thin\fP ] (implied)
+.br
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--originname\fP \fILV\fP\fI_new\fP ]
+.br
+[ \fB--poolmetadata\fP \fILV\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped thin cache raid error zero
+.RE
+.P
+\(em
+.P
+Convert LV to a thin LV, using LV as thin-pool data volume.
+.br
+.P
+\fBlvconvert\fP \fB-T\fP|\fB--thin\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--type thin\fP ] (implied)
+.br
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadata\fP \fILV\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped cache vdo raid error zero writecache
+.RE
+.P
+\(em
+.P
+Attach a cache pool to an LV.
+.br
+.P
+\fBlvconvert\fP \fB-H\fP|\fB--cache\fP \fB--cachepool\fP \fILV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--type cache\fP ] (implied)
+.br
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--poolmetadata\fP \fILV\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped thin thinpool vdo vdopool vdopooldata raid error zero
+.RE
+.P
+\(em
+.P
+Attach a cache to an LV, converts the LV to type cache.
+.br
+.P
+\fBlvconvert\fP \fB-H\fP|\fB--cache\fP \fB--cachevol\fP \fILV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped thinpool raid
+.RE
+.P
+\(em
+.P
+Convert LV to type vdopool.
+.br
+.P
+\fBlvconvert\fP \fB--vdopool\fP \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB--type vdo-pool\fP ] (implied)
+.br
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-n\fP|\fB--name\fP \fILV\fP\fI_new\fP ]
+.br
+[ \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ \fB--compression\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--deduplication\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--vdosettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Detach and delete a cache from an LV.
+.br
+.P
+\fBlvconvert\fP \fB--uncache\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: thinpool cache vdopool writecache
+.RE
+.P
+\(em
+.P
+Swap metadata LV in a thin pool or cache pool (for repair only).
+.br
+.P
+\fBlvconvert\fP \fB--swapmetadata\fP \fB--poolmetadata\fP \fILV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: thinpool cachepool
+.RE
+.P
+\(em
+.P
+Merge LV that was split from a mirror (variant, use --mergemirrors).
+.br
+Merge thin LV into its origin LV (variant, use --mergethin).
+.br
+Merge COW snapshot LV into its origin (variant, use --mergesnapshot).
+.br
+.P
+\fBlvconvert\fP \fB--merge\fP \fIVG\fP|\fILV1\fP|\fITag\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped snapshot thin raid
+.RE
+.P
+\(em
+.P
+Separate a COW snapshot from its origin LV.
+.br
+.P
+\fBlvconvert\fP \fB--splitsnapshot\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: snapshot
+.RE
+.P
+\(em
+.P
+Combine a former COW snapshot (second arg) with a former
+.br
+origin LV (first arg) to reverse a splitsnapshot command.
+.br
+.P
+\fBlvconvert\fP \fB-s\fP|\fB--snapshot\fP \fILV\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--type snapshot\fP ] (implied)
+.br
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: linear striped
+.RE
+.P
+\(em
+.P
+Poll LV to continue conversion (also see --startpoll)
+.br
+or waits till conversion/mirror syncing is finished
+.br
+.P
+\fBlvconvert\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: mirror raid
+.RE
+.P
+\(em
+.P
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in
deleted file mode 100644
index fb54cc6..0000000
--- a/man/lvcreate.8.in
+++ /dev/null
@@ -1,381 +0,0 @@
-.TH LVCREATE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvcreate \- create a logical volume in an existing volume group
-.SH SYNOPSIS
-.B lvcreate
-.RB [ \-\-addtag
-.IR Tag ]
-.RB [ \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-a | \-\-activate
-.RI [ a | e | l ]{ y | n }]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-C | \-\-contiguous
-.RI { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-noudevsync ]
-.RB [ \-\-ignoremonitoring ]
-.RB [ \-\-monitor
-.RI { y | n }]
-.RB [ \-i | \-\-stripes
-.IR Stripes
-.RB [ \-I | \-\-stripesize
-.IR StripeSize ]]
-.RB {[ \-l | \-\-extents
-.IR LogicalExtentsNumber [ % { VG | PVS | FREE }]
-|
-.BR \-L | \-\-size
-.IR LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]]
-|
-.BR \-V | \-\-virtualsize
-.IR VirtualSize [ bBsSkKmMgGtTpPeE ]}
-.RB [ \-M | \-\-persistent
-.RI { y | n }]
-.RB [ \-\-minor
-.IR minor ]
-.RB [ \-m | \-\-mirrors
-.IR Mirrors
-.RB [ \-\-nosync ]
-.RB [ \-\-mirrorlog
-.RI { disk | core | mirrored }
-|
-.BR \-\-corelog ]
-.RB [ \-R | \-\-regionsize
-.IR MirrorLogRegionSize ]]
-.RB [ \-n | \-\-name
-.IR LogicalVolume { Name | Path }]
-.RB [ \-p | \-\-permission
-.RI { r | rw }]
-.RB [ \-r | \-\-readahead
-.RI { ReadAheadSectors | auto | none }]
-.RB [ \-t | \-\-test ]
-.RB [ \-T | \-\-thin
-.RB [ \-c | \-\-chunksize
-.IR ChunkSize ]
-.RB [ \-\-discards
-.RI { ignore | nopassdown | passdown }]
-.RB [ \-\-poolmetadatasize
-.IR MetadataSize [ bBsSkKmMgG ]]]
-.RB [ \-\-thinpool
-.IR ThinPoolLogicalVolume { Name | Path }]
-.RB [ \-\-type
-.IR SegmentType ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-Z | \-\-zero
-.RI { y | n }]
-.IR VolumeGroup { Name | Path }[/ ThinPoolLogicalVolumeName ]
-.RI [ PhysicalVolumePath [ :PE [ -PE ]]...]
-.br
-
-.B lvcreate
-.RB [ \-l | \-\-extents
-.IR LogicalExtentsNumber [ % { VG | FREE | ORIGIN }]
-|
-.BR \-L | \-\-size
-.IR LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]]
-.RB [ \-c | \-\-chunksize
-.IR ChunkSize ]
-.RB [ \-\-noudevsync ]
-.RB [ \-\-ignoremonitoring ]
-.RB [ \-\-monitor " {" \fIy | \fIn }]
-.RB [ \-n | \-\-name
-.IR SnapshotLogicalVolume { Name | Path }]
-.BR \-s | \-\-snapshot
-.RI {[ VolumeGroup { Name | Path }/] OriginalLogicalVolumeName
-.BR \-V | \-\-virtualsize
-.IR VirtualSize [ bBsSkKmMgGtTpPeE ]}
-.br
-
-.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.
-.TP
-.IR \fB\-a ", " \fB\-\-activate " {" y | ay | n | ey | en | ly | ln }
-Controls the availability of the Logical Volumes for immediate use after
-the command finishes running.
-By default, new Logical Volumes are activated (\fB-a\fIy\fR).
-If it is possible technically, \fB-a\fIn\fR will leave the new Logical
-Volume inactive. But for example, snapshots can only be created
-in the active state so \fB\-a\fIn\fR cannot be used with \fB\-\-snapshot\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\-a\fIay\fR), the logical volume is
-activated only if it matches an item in the activation/auto_activation_volume_list
-set in lvm.conf. For autoactivated logical volumes, \fB\-\-zero n\fP is
-always assumed and it can't be overridden. If clustered locking is enabled,
-\fB\-a\fIey\fR will activate exclusively on one node and \fB\-a\fIly\fR will
-activate only on the local node.
-.TP
-.BR \-c ", " \-\-chunksize " " \fIChunkSize
-Gives the size of chunk for snapshot and thin pool logical volumes.
-For snapshots the value must be power of 2 between 4KiB and 512KiB
-and the default value is 4.
-For thin pools the value must be between 64KiB and
-1048576KiB and the default value starts with 64 and scales
-up to fit the pool metadata size within 128MB,
-if the poolmetadata size is not specified.
-Older dm thin pool target version (<1.4) requires the value to be power of 2.
-The newer version requires to be the multiple of 64KiB, however discard is
-not supported for non power of 2 values.
-Default unit is in kilobytes.
-.TP
-.BR \-C ", " \-\-contiguous " {" \fIy | \fIn }
-Sets or resets the contiguous allocation policy for
-logical volumes. Default is no contiguous allocation based
-on a next free principle.
-.TP
-.BR \-\-discards " {" \fIignore | \fInopassdown | \fIpassdown }
-Set discards behavior.
-Default is \fIpassdown\fP.
-.TP
-.BR \-i ", " \-\-stripes " " \fIStripes
-Gives the number of stripes.
-This is equal to the number of physical volumes to scatter
-the logical volume.
-.TP
-.BR \-I ", " \-\-stripesize " " \fIStripeSize
-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.
-.TP
-.IR \fB\-l ", " \fB\-\-extents " " LogicalExtentsNumber [ % { VG | PVS | FREE | ORIGIN }]
-Gives the number of logical extents to allocate for the new
-logical volume.
-The number can also be expressed as a percentage of the total space
-in the Volume Group with the suffix \fI%VG\fR, as a percentage of the
-remaining free space in the Volume Group with the suffix \fI%FREE\fR, as a
-percentage of the remaining free space for the specified
-PhysicalVolume(s) with the suffix \fI%PVS\fR, or (for a snapshot) as a
-percentage of the total space in the Origin Logical Volume with the
-suffix \fI%ORIGIN\fR.
-.TP
-.IR \fB\-L ", " \fB\-\-size " " LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]
-Gives the size to allocate for the new logical volume.
-A size suffix of \fIK\fR for kilobytes, \fIM\fR for megabytes,
-\fIG\fR for gigabytes, \fIT\fR for terabytes, \fIP\fR for petabytes
-or \fIE\fR for exabytes is optional.
-.br
-Default unit is megabytes.
-.TP
-.B \-\-minor \fIminor
-Set the minor number.
-.TP
-.IR \fB\-M ", " \fB\-\-persistent " {" y | n }
-Set to y to make the minor number specified persistent.
-.TP
-.BR \-m ", " \-\-mirrors " " \fIMirrors
-Creates a mirrored logical volume with Mirrors copies. For example,
-specifying "-m 1" would result in a mirror with two-sides; that is, a
-linear volume plus one copy.
-
-Specifying the optional argument --nosync will cause the creation
-of the mirror 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 device.
-
-The optional argument --mirrorlog specifies the type of log to be used.
-The default is disk, which is persistent and requires
-a small amount of storage space, usually on a separate device from the
-data being mirrored. Using core means the mirror is regenerated
-by copying the data from the first device again each time the
-device is activated, for example, after every reboot. Using "mirrored"
-will create a persistent log that is itself mirrored.
-
-The optional argument --corelog is equivalent to --mirrorlog core.
-
-.TP
-.IR \fB\-n ", " \fB\-\-name " " LogicalVolume { Name | Path }
-The name for the new logical volume.
-.br
-Without this option a default names of "lvol#" will be generated where
-# is the LVM internal number of the logical 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 \-\-monitor " {" \fIy | \fIn }
-Start or avoid 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.
-.TP
-.B \-\-ignoremonitoring
-Make no attempt to interact with dmeventd unless \-\-monitor
-is specified.
-.TP
-.BR \-p ", " \-\-permission " {" \fIr | \fIrw }
-Set access permissions to read only or read and write.
-.br
-Default is read and write.
-.TP
-.IR \fB\-\-poolmetadatasize " " MetadataSize [ bBsSkKmMgG ]
-Set the size of thin pool's metadata logical volume.
-Supported value is in range between 2MiB and 16GiB.
-Default value is (Pool_LV_size / Pool_LV_chunk_size * 64b).
-Default unit is megabytes.
-.TP
-.IR \fB\-r ", " \fB\-\-readahead " {" ReadAheadSectors | auto | none }
-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.
-The default value is "auto" which allows the kernel to choose
-a suitable value automatically.
-"None" is equivalent to specifying zero.
-.TP
-.BR \-R ", " \-\-regionsize " " \fIMirrorLogRegionSize
-A mirror is divided into regions of this size (in MB), and the mirror log
-uses this granularity to track which regions are in sync.
-.TP
-.IR \fB\-s ", " \fB\-\-snapshot " " OriginalLogicalVolume { Name | Path }
-Create 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.
-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 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 lvdisplay (8)
-on the snapshot in order to check how much data is allocated to it.
-Note that 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 the
-rate at which the snapshot data is growing so you can avoid running out
-of space.
-.TP
-.IR \fB\-T ", " \fB\-\-thin ", " \fB\-\-thinpool " " ThinPoolLogicalVolume { Name | Path }
-Creates thin pool or thin logical volume or both.
-Specifying the optional argument \fB\-\-size\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.
-Requires device mapper kernel driver for thin provisioning
-from kernel 3.2 or newer.
-.TP
-.B \-\-type \fISegmentType
-Create a logical volume that uses the specified segment type
-(e.g. "raid5", "mirror", "snapshot", "thin", "thin-pool").
-Many segment types have a
-commandline switch alias that will enable their use
-(\fB\-s\fP is an alias for \fB\-\-type snapshot\fP).
-However, this argument must be used when no existing
-commandline switch alias is available for the desired type,
-as is the case with
-.IR error ", " zero ", " raid1 ", " raid4 ", " raid5 " or " raid6 .
-.TP
-.BR \-V ", " \-\-virtualsize " " \fIVirtualSize [ \fIbBsSkKmMgGtTpPeE ]
-Create a sparse device of the given size (in MB by default) using a snapshot
-or thinly provisioned device when thin pool is specified.
-Anything written to the device will be returned when reading from it.
-Reading from other areas of the device will return blocks of zeros.
-Virtual 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.
-.TP
-.BR \-Z ", " \-\-zero " {" \fIy | \fIn }
-Controls zeroing of the first KB of data in the new logical volume.
-.br
-Default is yes.
-.br
-Volume will not be zeroed if read only flag is set.
-.br
-Snapshot volumes are zeroed always.
-
-.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 stripesize of 8KB
-and a size of 100MB 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 --alloc anywhere) - 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 /dev/vg00/snap which has access to the
-contents of the original logical volume named /dev/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 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 100MiB pool logical volume for thin provisioning
-build with 2 stripes 64KiB and chunk size 128KiB 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
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgcreate (8),
-.BR lvchange (8),
-.BR lvremove (8),
-.BR lvrename (8)
-.BR lvextend (8),
-.BR lvreduce (8),
-.BR lvdisplay (8),
-.BR lvscan (8)
diff --git a/man/lvcreate.8_des b/man/lvcreate.8_des
new file mode 100644
index 0000000..4f7e712
--- /dev/null
+++ b/man/lvcreate.8_des
@@ -0,0 +1,46 @@
+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, the VG can be extended with other PVs
+(\fBvgextend\fP(8)), or existing LVs can be reduced or removed
+(\fBlvremove\fP(8), \fBlvreduce\fP(8)).
+.P
+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.
+.P
+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.
+.P
+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.
+.P
+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 as references to the pools.
+.P
+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.
+.P
+VDO LVs are also provisioned volumes from a VDO pool, and are created with a
+virtual size rather than a physical size (see \fBlvmvdo\fP(7)).
+.P
+.SS Usage notes
+In the usage section below, \fB--size\fP \fISize\fP can be replaced
+with \fB--extents\fP \fINumber\fP. See descriptions in the options section.
+.P
+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.
+.P
+In the usage section below, when creating a pool and the name is omitted
+the new LV pool name is generated with the
+"vpool" for vdo-pools for prefix and a unique numeric suffix.
+.P
+Pool name can be specified together with \fIVG\fP name i.e.:
+vg00/mythinpool.
diff --git a/man/lvcreate.8_end b/man/lvcreate.8_end
new file mode 100644
index 0000000..0d257d7
--- /dev/null
+++ b/man/lvcreate.8_end
@@ -0,0 +1,107 @@
+.
+.SH EXAMPLES
+.
+.P
+Create a striped LV with 3 stripes, a stripe size of 8 KiB and a size of 100 MiB.
+The LV name is chosen by lvcreate.
+.br
+.B lvcreate -i 3 -I 8 -L 100m vg00
+.P
+Create a raid1 LV with two images, and a usable 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
+.P
+Create a mirror LV with two images, and a usable 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
+.P
+Create a mirror LV with 2 images, and a usable 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
+.P
+Create a copy-on-write snapshot of an LV:
+.br
+.B lvcreate --snapshot --size 100m --name mysnap vg00/mylv
+.P
+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
+.P
+Create a sparse LV with 1 TiB of virtual space, and actual space just under
+100 MiB.
+.br
+.B lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
+.P
+Create a linear LV with a usable size of 64 MiB on specific physical extents.
+.br
+.B lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
+.P
+Create a RAID5 LV with a usable size of 5 GiB, 3 stripes, a stripe size of
+64 KiB, using a total of 4 devices (including one for parity).
+.br
+.B lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
+.P
+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
+.P
+Create RAID10 LV with a usable size of 5 GiB, 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
+.P
+Create a 1 TiB thin LV mythin, with 256 GiB thinpool tpool0 in vg00.
+.br
+.B lvcreate -T -V 1T --size 256G --name mythin vg00/tpool0
+.P
+Create a 1 TiB thin LV, first creating a new thin pool for it, where
+the thin pool has 100 MiB of space, uses 2 stripes, has a 64 KiB stripe
+size, and 256 KiB 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
+.P
+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
+.P
+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
+.P
+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
+.P
+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
+.P
+Create a VDO LV vdo0 with VDOPoolLV size of 10 GiB and name vpool1.
+.br
+.B lvcreate --vdo --size 10G --name vdo0 vg00/vpool1
diff --git a/man/lvcreate.8_pregen b/man/lvcreate.8_pregen
new file mode 100644
index 0000000..99e90fc
--- /dev/null
+++ b/man/lvcreate.8_pregen
@@ -0,0 +1,2377 @@
+.TH LVCREATE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvcreate \(em Create a logical volume
+.
+.SH SYNOPSIS
+.
+\fBlvcreate\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.P
+.ad l
+ \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
+.br
+ \fB--addtag\fP \fITag\fP
+.br
+ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.br
+ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+ \fB-H\fP|\fB--cache\fP
+.br
+ \fB--cachedevice\fP \fIPV\fP
+.br
+ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP
+.br
+ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP
+.br
+ \fB--cachepolicy\fP \fIString\fP
+.br
+ \fB--cachepool\fP \fILV\fP
+.br
+ \fB--cachesettings\fP \fIString\fP
+.br
+ \fB--cachesize\fP \fISize\fP[m|UNIT]
+.br
+ \fB--cachevol\fP \fILV\fP
+.br
+ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT]
+.br
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--compression\fP \fBy\fP|\fBn\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-C\fP|\fB--contiguous\fP \fBy\fP|\fBn\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--deduplication\fP \fBy\fP|\fBn\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP
+.br
+ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT]
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB-K\fP|\fB--ignoreactivationskip\fP
+.br
+ \fB--ignoremonitoring\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB-j\fP|\fB--major\fP \fINumber\fP
+.br
+ \fB--\fP[\fBraid\fP]\fBmaxrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+ \fB--metadataprofile\fP \fIString\fP
+.br
+ \fB--minor\fP \fINumber\fP
+.br
+ \fB--\fP[\fBraid\fP]\fBminrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+ \fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP
+.br
+ \fB-m\fP|\fB--mirrors\fP \fINumber\fP
+.br
+ \fB--monitor\fP \fBy\fP|\fBn\fP
+.br
+ \fB-n\fP|\fB--name\fP \fIString\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--nosync\fP
+.br
+ \fB--noudevsync\fP
+.br
+ \fB-p\fP|\fB--permission\fP \fBrw\fP|\fBr\fP
+.br
+ \fB-M\fP|\fB--persistent\fP \fBy\fP|\fBn\fP
+.br
+ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT]
+.br
+ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB--raidintegrity\fP \fBy\fP|\fBn\fP
+.br
+ \fB--raidintegrityblocksize\fP \fINumber\fP
+.br
+ \fB--raidintegritymode\fP \fIString\fP
+.br
+ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP
+.br
+ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT]
+.br
+ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+ \fB-k\fP|\fB--setactivationskip\fP \fBy\fP|\fBn\fP
+.br
+ \fB--setautoactivation\fP \fBy\fP|\fBn\fP
+.br
+ \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
+.br
+ \fB-s\fP|\fB--snapshot\fP
+.br
+ \fB-i\fP|\fB--stripes\fP \fINumber\fP
+.br
+ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB-T\fP|\fB--thin\fP
+.br
+ \fB--thinpool\fP \fILV\fP
+.br
+ \fB--type\fP \c
+.nh
+\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
+.hy
+.br
+ \fB--vdo\fP
+.br
+ \fB--vdopool\fP \fILV\fP
+.br
+ \fB--vdosettings\fP \fIString\fP
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
+.br
+ \fB-W\fP|\fB--wipesignatures\fP \fBy\fP|\fBn\fP
+.br
+ \fB-y\fP|\fB--yes\fP
+.br
+ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+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, the VG can be extended with other PVs
+(\fBvgextend\fP(8)), or existing LVs can be reduced or removed
+(\fBlvremove\fP(8), \fBlvreduce\fP(8)).
+.P
+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.
+.P
+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.
+.P
+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.
+.P
+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 as references to the pools.
+.P
+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.
+.P
+VDO LVs are also provisioned volumes from a VDO pool, and are created with a
+virtual size rather than a physical size (see \fBlvmvdo\fP(7)).
+.P
+.SS Usage notes
+In the usage section below, \fB--size\fP \fISize\fP can be replaced
+with \fB--extents\fP \fINumber\fP. See descriptions in the options section.
+.P
+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.
+.P
+In the usage section below, when creating a pool and the name is omitted
+the new LV pool name is generated with the
+"vpool" for vdo-pools for prefix and a unique numeric suffix.
+.P
+Pool name can be specified together with \fIVG\fP name i.e.:
+vg00/mythinpool.
+.
+.SH USAGE
+.
+Create a linear LV.
+.br
+.P
+\fBlvcreate\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--type linear\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a striped LV.
+.br
+.P
+\fBlvcreate\fP \fB-i\fP|\fB--stripes\fP \fINumber\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--type striped\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a raid1 or mirror LV.
+.br
+.P
+\fBlvcreate\fP \fB-m\fP|\fB--mirrors\fP \fINumber\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--type raid1\fP|\fBmirror\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP ]
+.br
+[ \fB--\fP[\fBraid\fP]\fBminrecoveryrate\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--\fP[\fBraid\fP]\fBmaxrecoveryrate\fP \fISize\fP[k|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a raid LV (a specific raid level must be used, e.g. raid1).
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBraid\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-m\fP|\fB--mirrors\fP \fINumber\fP ]
+.br
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--\fP[\fBraid\fP]\fBminrecoveryrate\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--\fP[\fBraid\fP]\fBmaxrecoveryrate\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--raidintegrity\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--raidintegritymode\fP \fIString\fP ]
+.br
+[ \fB--raidintegrityblocksize\fP \fINumber\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a raid10 LV.
+.br
+.P
+\fBlvcreate\fP \fB-m\fP|\fB--mirrors\fP \fINumber\fP \fB-i\fP|\fB--stripes\fP \fINumber\fP
+.RS 5
+ \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB--type raid10\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--\fP[\fBraid\fP]\fBminrecoveryrate\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--\fP[\fBraid\fP]\fBmaxrecoveryrate\fP \fISize\fP[k|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a COW snapshot LV of an origin LV.
+.br
+.P
+\fBlvcreate\fP \fB-s\fP|\fB--snapshot\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB--type snapshot\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a thin pool.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBthin-pool\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--thinpool\fP \fILV\fP\fI_new\fP ]
+.br
+[ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP ]
+.br
+[ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a cache pool.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBcache-pool\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-H\fP|\fB--cache\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a thin LV in a thin pool.
+.br
+.P
+\fBlvcreate\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] \fB--thinpool\fP \fILV\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--type thin\fP ] (implied)
+.br
+.br
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Create a thin LV that is a snapshot of an existing thin LV.
+.br
+.P
+\fBlvcreate\fP \fB-s\fP|\fB--snapshot\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--type thin\fP ] (implied)
+.br
+.br
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: thin
+.RE
+.P
+\(em
+.P
+Create a thin LV that is a snapshot of an external origin LV.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBthin\fP \fB--thinpool\fP \fILV\fP \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Create a LV that returns VDO when used.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBvdo\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--vdo\fP ]
+.br
+[ \fB--vdopool\fP \fILV\fP\fI_new\fP ]
+.br
+[ \fB--compression\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--deduplication\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--vdosettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a new LV, then attach the specified cachepool
+.br
+which converts the new LV to type cache.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBcache\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB--cachepool\fP \fILV\fP \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-H\fP|\fB--cache\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a new LV, then attach the specified cachevol
+.br
+which converts the new LV to type cache.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBcache\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB--cachevol\fP \fILV\fP \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a new LV, then attach a cachevol created from
+.br
+the specified cache device, which converts the
+.br
+new LV to type cache.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBcache\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB--cachedevice\fP \fIPV\fP \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachesize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a new LV, then attach the specified cachevol
+.br
+which converts the new LV to type writecache.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBwritecache\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB--cachevol\fP \fILV\fP \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a new LV, then attach a cachevol created from
+.br
+the specified cache device, which converts the
+.br
+new LV to type writecache.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBwritecache\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB--cachedevice\fP \fIPV\fP \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachesize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP ]
+.br
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-C\fP|\fB--contiguous\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-K\fP|\fB--ignoreactivationskip\fP ]
+.br
+[ \fB-j\fP|\fB--major\fP \fINumber\fP ]
+.br
+[ \fB-n\fP|\fB--name\fP \fIString\fP ]
+.br
+[ \fB-p\fP|\fB--permission\fP \fBrw\fP|\fBr\fP ]
+.br
+[ \fB-M\fP|\fB--persistent\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP ]
+.br
+[ \fB-k\fP|\fB--setactivationskip\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-W\fP|\fB--wipesignatures\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--addtag\fP \fITag\fP ]
+.br
+[ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+]
+.br
+[ \fB--ignoremonitoring\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ \fB--minor\fP \fINumber\fP ]
+.br
+[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--nosync\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--setautoactivation\fP \fBy\fP|\fBn\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
+.br
+Controls the active state of the new LV.
+\fBy\fP makes the LV active, or available.
+New LVs are made active by default.
+\fBn\fP makes the LV inactive, or unavailable, only when possible.
+In some cases, creating an LV requires it to be active.
+For example, COW snapshots of an active origin LV can only
+be created in the active state (this does not apply to thin snapshots).
+The --zero option normally requires the LV to be active.
+If autoactivation \fBay\fP is used, the LV is only activated
+if it matches an item in \fBlvm.conf\fP(5) \fBactivation/auto_activation_volume_list\fP.
+\fBay\fP implies --zero n and --wipesignatures n.
+See \fBlvmlockd\fP(8) for more information about activation options for shared VGs.
+.
+.HP
+\fB--addtag\fP \fITag\fP
+.br
+Adds a tag to a PV, VG or LV. This option can be repeated to add
+multiple tags at once. See \fBlvm\fP(8) for information about tags.
+.
+.HP
+.ad l
+\fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.ad b
+.br
+Determines the allocation policy when a command needs to allocate
+Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
+which can be changed with vgchange/lvchange, or overridden on the
+command line.
+\fBnormal\fP applies common sense rules such as not placing parallel stripes
+on the same PV.
+\fBinherit\fP applies the VG policy to an LV.
+\fBcontiguous\fP requires new PEs be placed adjacent to existing PEs.
+\fBcling\fP places new PEs on the same PV as existing PEs in the same
+stripe of the LV.
+If there are sufficient PEs for an allocation, but normal does not
+use them, \fBanywhere\fP will use them even if it reduces performance,
+e.g. by placing two stripes on the same PV.
+Optional positional PV args on the command line can also be used to limit
+which PVs the command will use for allocation.
+See \fBlvm\fP(8) for more information about allocation.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB-H\fP|\fB--cache\fP
+.br
+Specifies the command is handling a cache LV or cache pool.
+See --type cache and --type cache-pool.
+See \fBlvmcache\fP(7) for more information about LVM caching.
+.
+.HP
+\fB--cachedevice\fP \fIPV\fP
+.br
+The name of a device to use for a cache.
+.
+.HP
+\fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP
+.br
+Specifies the cache metadata format used by cache target.
+.
+.HP
+\fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP
+.br
+Specifies when writes to a cache LV should be considered complete.
+\fBwriteback\fP considers a write complete as soon as it is
+stored in the cache pool.
+\fBwritethough\fP considers a write complete only when it has
+been stored in both the cache pool and on the origin LV.
+While writethrough 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, all reads are served
+from the 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\fP(7) for more information.
+.
+.HP
+\fB--cachepolicy\fP \fIString\fP
+.br
+Specifies the cache policy for a cache LV.
+See \fBlvmcache\fP(7) for more information.
+.
+.HP
+\fB--cachepool\fP \fILV\fP
+.br
+The name of a cache pool.
+.
+.HP
+\fB--cachesettings\fP \fIString\fP
+.br
+Specifies tunable kernel options for dm-cache or dm-writecache LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --cachesettings for each option being set.
+These settings override the default kernel behaviors which are
+usually adequate. To remove cachesettings and revert to the default
+kernel behaviors, use --cachesettings 'default' for dm-cache or
+an empty string --cachesettings '' for dm-writecache.
+See \fBlvmcache\fP(7) for more information.
+.
+.HP
+\fB--cachesize\fP \fISize\fP[m|UNIT]
+.br
+The size of cache to use.
+.
+.HP
+\fB--cachevol\fP \fILV\fP
+.br
+The name of a cache volume.
+.
+.HP
+\fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT]
+.br
+The size of chunks in a snapshot, cache pool or thin pool.
+For snapshots, the value must be a power of 2 between 4 KiB and 512 KiB
+and the default value is 4.
+For a cache pool the value must be between 32 KiB and 1 GiB
+and the default value is 64.
+For a thin pool the value must be between 64 KiB and 1 GiB
+and the default value starts with 64 and scales up to fit the
+pool metadata size within 128 MiB, if the pool metadata size is not specified.
+The value must be a multiple of 64 KiB.
+See \fBlvmthin\fP(7) and \fBlvmcache\fP(7) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--compression\fP \fBy\fP|\fBn\fP
+.br
+Controls whether compression is enabled or disable for VDO volume.
+See \fBlvmvdo\fP(7) for more information about VDO usage.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-C\fP|\fB--contiguous\fP \fBy\fP|\fBn\fP
+.br
+Sets or resets the contiguous allocation policy for LVs.
+Default is no contiguous allocation based on a next free principle.
+It is only possible to change a non-contiguous allocation policy
+to contiguous if all of the allocated physical extents in the LV
+are already contiguous.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--deduplication\fP \fBy\fP|\fBn\fP
+.br
+Controls whether deduplication is enabled or disable for VDO volume.
+See \fBlvmvdo\fP(7) for more information about VDO usage.
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
+.br
+Specifies how the device-mapper thin pool layer in the kernel should
+handle discards.
+\fBignore\fP causes the thin pool to ignore discards.
+\fBnopassdown\fP causes the thin pool to process discards itself to
+allow reuse of unneeded extents in the thin pool.
+\fBpassdown\fP causes the thin pool to process discards itself
+(like nopassdown) and pass the discards to the underlying device.
+See \fBlvmthin\fP(7) for more information.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--errorwhenfull\fP \fBy\fP|\fBn\fP
+.br
+Specifies thin pool behavior when data space is exhausted.
+When yes, device-mapper will immediately return an error
+when a thin pool is full and an I/O request requires space.
+When no, device-mapper will queue these I/O requests for a
+period of time to allow the thin pool to be extended.
+Errors are returned if no space is available after the timeout.
+(Also see dm-thin-pool kernel module option no_space_timeout.)
+See \fBlvmthin\fP(7) for more information.
+.
+.HP
+\fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT]
+.br
+Specifies the size of the new LV in logical extents.
+The --size and --extents options are alternate methods of specifying size.
+The total number of physical extents used will be
+greater when redundant data is needed for RAID levels.
+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 PVs. For a snapshot, the size
+can be expressed as a percentage of the total size of the origin LV
+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
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB-K\fP|\fB--ignoreactivationskip\fP
+.br
+Ignore the "activation skip" LV flag during activation
+to allow LVs with the flag set to be activated.
+.
+.HP
+\fB--ignoremonitoring\fP
+.br
+Do not interact with dmeventd unless --monitor is specified.
+Do not use this if dmeventd is already monitoring a device.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-j\fP|\fB--major\fP \fINumber\fP
+.br
+Sets the major number of an LV block device.
+.
+.HP
+\fB--\fP[\fBraid\fP]\fBmaxrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+Sets the maximum recovery rate for a RAID LV. The rate value
+is an amount of data per second for each device in the array.
+Setting the rate to 0 means it will be unbounded.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB--metadataprofile\fP \fIString\fP
+.br
+The metadata profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--minor\fP \fINumber\fP
+.br
+Sets the minor number of an LV block device.
+.
+.HP
+\fB--\fP[\fBraid\fP]\fBminrecoveryrate\fP \fISize\fP[k|UNIT]
+.br
+Sets the minimum recovery rate for a RAID LV. The rate value
+is an amount of data per second for each device in the array.
+Setting the rate to 0 means it will be unbounded.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP
+.br
+Specifies the type of mirror log for LVs with the "mirror" type
+(does not apply to the "raid1" type.)
+\fBdisk\fP is a persistent log and requires a small amount of
+storage space, usually on a separate device from the data being mirrored.
+\fBcore\fP is not persistent; the log is kept only in memory.
+In this case, the mirror must be synchronized (by copying LV data from
+the first device to others) each time the LV is activated, e.g. after reboot.
+\fBmirrored\fP is a persistent log that is itself mirrored, but
+should be avoided. Instead, use the raid1 type for log redundancy.
+.
+.HP
+\fB-m\fP|\fB--mirrors\fP \fINumber\fP
+.br
+Specifies the number of mirror images in addition to the original LV
+image, e.g. --mirrors 1 means there are two images of the data, the
+original and one mirror image.
+Optional positional PV args on the command line can specify the devices
+the images should be placed on.
+There are two mirroring implementations: "raid1" and "mirror".
+These are the names of the corresponding LV types, or "segment types".
+Use the --type option to specify which to use (raid1 is default,
+and mirror is legacy)
+Use \fBlvm.conf\fP(5) \fBglobal/mirror_segtype_default\fP and
+global/raid10_segtype_default to configure the default types.
+See the --nosync option for avoiding initial image synchronization.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB--monitor\fP \fBy\fP|\fBn\fP
+.br
+Start (yes) or stop (no) monitoring an LV with dmeventd.
+dmeventd monitors kernel events for an LV, and performs
+automated maintenance for the LV in response to specific events.
+See \fBdmeventd\fP(8) for more information.
+.
+.HP
+\fB-n\fP|\fB--name\fP \fIString\fP
+.br
+Specifies the name of a new LV.
+When unspecified, a default name of "lvol#" is
+generated, where # is a number generated by LVM.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--nosync\fP
+.br
+Causes the creation of mirror, raid1, raid4, raid5 and raid10 to skip the
+initial synchronization. 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.
+This is useful for skipping a potentially long and resource intensive initial
+sync of an empty mirror/raid1/raid4/raid5 and raid10 LV.
+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 do not provide any data copies or parity support
+and thus do not support initial synchronization.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB-p\fP|\fB--permission\fP \fBrw\fP|\fBr\fP
+.br
+Set access permission to read only \fBr\fP or read and write \fBrw\fP.
+.
+.HP
+\fB-M\fP|\fB--persistent\fP \fBy\fP|\fBn\fP
+.br
+When yes, makes the specified minor number persistent.
+.
+.HP
+\fB--poolmetadatasize\fP \fISize\fP[m|UNIT]
+.br
+Specifies the size of the new pool metadata LV.
+.
+.HP
+\fB--poolmetadataspare\fP \fBy\fP|\fBn\fP
+.br
+Enable or disable the automatic creation and management of a
+spare pool metadata LV in the VG. A spare metadata LV is reserved
+space that can be used when repairing a pool.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--raidintegrity\fP \fBy\fP|\fBn\fP
+.br
+Enable or disable data integrity checksums for raid images.
+.
+.HP
+\fB--raidintegrityblocksize\fP \fINumber\fP
+.br
+The block size to use for dm-integrity on raid images.
+The integrity block size should usually match the device
+logical block size, or the file system block size.
+It may be less than the file system block size, but not
+less than the device logical block size.
+Possible values: 512, 1024, 2048, 4096.
+.
+.HP
+\fB--raidintegritymode\fP \fIString\fP
+.br
+Use a journal (default) or bitmap for keeping integrity checksums consistent
+in case of a crash. The bitmap areas are recalculated after a crash, so corruption
+in those areas would not be detected. A journal does not have this problem.
+The journal mode doubles writes to storage, but can improve performance for
+scattered writes packed into a single journal write.
+bitmap mode can in theory achieve full write throughput of the device,
+but would not benefit from the potential scattered write optimization.
+.
+.HP
+\fB-r\fP|\fB--readahead\fP \fBauto\fP|\fBnone\fP|\fINumber\fP
+.br
+Sets read ahead sector count of an LV.
+\fBauto\fP is the default which allows the kernel to choose
+a suitable value automatically.
+\fBnone\fP is equivalent to zero.
+.
+.HP
+\fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT]
+.br
+Size of each raid or mirror synchronization region.
+\fBlvm.conf\fP(5) \fBactivation/raid_region_size\fP can be used to
+configure a default.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-k\fP|\fB--setactivationskip\fP \fBy\fP|\fBn\fP
+.br
+Persistently sets (yes) or clears (no) the "activation skip" flag on an LV.
+An LV with this flag set is not activated unless the
+--ignoreactivationskip option is used by the activation command.
+This flag is set by default on new thin snapshot LVs.
+The flag is not applied to deactivation.
+The current value of the flag is indicated in the lvs lv_attr bits.
+.
+.HP
+\fB--setautoactivation\fP \fBy\fP|\fBn\fP
+.br
+Set the autoactivation property on a VG or LV.
+Display the property with vgs or lvs "-o autoactivation".
+When the autoactivation property is disabled, the VG or LV
+will not be activated by a command doing autoactivation
+(vgchange, lvchange, or pvscan using -aay.)
+If autoactivation is disabled on a VG, no LVs will be autoactivated
+in that VG, and the LV autoactivation property has no effect.
+If autoactivation is enabled on a VG, autoactivation can be disabled
+for individual LVs.
+.
+.HP
+\fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
+.br
+Specifies the size of the new LV.
+The --size and --extents options are alternate methods of specifying size.
+The total number of physical extents used will be
+greater when redundant data is needed for RAID levels.
+.
+.HP
+\fB-s\fP|\fB--snapshot\fP
+.br
+Create a snapshot. Snapshots provide a "frozen image" of an origin LV.
+The snapshot LV can be used, e.g. for backups, while the origin LV
+continues to be used.
+This option can create a COW (copy on write) snapshot,
+or a thin snapshot (in a thin pool.)
+Thin snapshots are created when the origin is a thin LV and
+the size option is NOT specified. Thin snapshots share the same blocks
+in the thin pool, and do not allocate new space from the VG.
+Thin snapshots are created with the "activation skip" flag,
+see --setactivationskip.
+A thin snapshot of a non-thin "external origin" LV is created
+when a thin pool is specified. Unprovisioned blocks in the thin snapshot
+LV are read from the external origin LV. The external origin LV must
+be read-only.
+See \fBlvmthin\fP(7) for more information about LVM thin provisioning.
+COW snapshots are created when a size is specified. The size is allocated
+from space in the VG, and is the amount of space that can be used
+for saving COW blocks as writes occur to the origin or snapshot.
+The size chosen should depend upon the amount of writes that are expected;
+often 20% of the origin LV is enough. If COW space runs low, it can
+be extended with lvextend (shrinking is also allowed with lvreduce.)
+A small amount of the COW snapshot LV size is used to track COW block
+locations, so the full size is not available for COW data blocks.
+Use lvs to check how much space is used, and see --monitor to
+to automatically extend the size to avoid running out of space.
+.
+.HP
+\fB-i\fP|\fB--stripes\fP \fINumber\fP
+.br
+Specifies the number of stripes in a striped LV. This is the number of
+PVs (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 --stripesize). This does not change existing
+allocated space, but only applies to space being allocated by the command.
+When creating a RAID 4/5/6 LV, this number does not include the extra
+devices that are required for parity. The largest number depends on
+the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and
+when unspecified, the default depends on the RAID type
+(raid0: 2, raid10: 2, raid4/5: 3, raid6: 5.)
+To stripe a new raid LV across all PVs by default,
+see \fBlvm.conf\fP(5) \fBallocation/raid_stripe_all_devices\fP.
+.
+.HP
+\fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
+.br
+The amount of data that is written to one device before
+moving to the next in a striped LV.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-T\fP|\fB--thin\fP
+.br
+Specifies the command is handling a thin LV or thin pool.
+See --type thin, --type thin-pool, and --virtualsize.
+See \fBlvmthin\fP(7) for more information about LVM thin provisioning.
+.
+.HP
+\fB--thinpool\fP \fILV\fP
+.br
+The name of a thin pool LV.
+.
+.HP
+.ad l
+\fB--type\fP \c
+.nh
+\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
+.hy
+.ad b
+.br
+The LV type, also known as "segment type" or "segtype".
+See usage descriptions for the specific ways to use these types.
+For more information about redundancy and performance (\fBraid\fP<N>, \fBmirror\fP, \fBstriped\fP, \fBlinear\fP) see \fBlvmraid\fP(7).
+For thin provisioning (\fBthin\fP, \fBthin-pool\fP) see \fBlvmthin\fP(7).
+For performance caching (\fBcache\fP, \fBcache-pool\fP) see \fBlvmcache\fP(7).
+For copy-on-write snapshots (\fBsnapshot\fP) see usage definitions.
+For VDO (\fBvdo\fP) see \fBlvmvdo\fP(7).
+Several commands omit an explicit type option because the type
+is inferred from other options or shortcuts
+(e.g. --stripes, --mirrors, --snapshot, --virtualsize, --thin, --cache, --vdo).
+Use inferred types with care because it can lead to unexpected results.
+.
+.HP
+\fB--vdo\fP
+.br
+Specifies the command is handling VDO LV.
+See --type vdo.
+See \fBlvmvdo\fP(7) for more information about VDO usage.
+.
+.HP
+\fB--vdopool\fP \fILV\fP
+.br
+The name of a VDO pool LV.
+See \fBlvmvdo\fP(7) for more information about VDO usage.
+.
+.HP
+\fB--vdosettings\fP \fIString\fP
+.br
+Specifies tunable VDO options for VDO LVs.
+Use the form 'option=value' or 'option1=value option2=value', or
+repeat --vdosettings for each option being set.
+These settings override the default VDO behaviors.
+To remove vdosettings and revert to the default
+VDO behaviors, use --vdosettings 'default'.
+See \fBlvmvdo\fP(7) for more information.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
+.br
+The virtual size of a new thin LV.
+See \fBlvmthin\fP(7) for more information about LVM thin provisioning.
+Using virtual size (-V) and actual size (-L) together creates
+a sparse LV.
+\fBlvm.conf\fP(5) \fBglobal/sparse_segtype_default\fP determines the
+default segment type used to create a sparse LV.
+Anything written to a sparse LV will be returned when reading from it.
+Reading from other areas of the LV will return blocks of zeros.
+When using a snapshot to create a sparse LV, a hidden virtual device
+is created using the zero target, and the LV has the suffix _vorigin.
+Snapshots are less efficient than thin provisioning when creating
+large sparse LVs (GiB).
+.
+.HP
+\fB-W\fP|\fB--wipesignatures\fP \fBy\fP|\fBn\fP
+.br
+Controls detection and subsequent wiping of signatures on new LVs.
+There is a prompt for each signature detected to confirm its wiping
+(unless --yes is used to override confirmations.)
+When not specified, signatures are wiped whenever zeroing is done
+(see --zero). This behaviour can be configured with
+\fBlvm.conf\fP(5) \fBallocation/wipe_signatures_when_zeroing_new_lvs\fP.
+If blkid wiping is used (\fBlvm.conf\fP(5) \fBallocation/use_blkid_wiping\fP)
+and LVM is compiled with blkid wiping support, then the blkid(8)
+library is used to detect the signatures (use blkid -k to list the
+signatures that are recognized).
+Otherwise, native LVM code is used to detect signatures
+(only MD RAID, swap and LUKS signatures are detected in this case.)
+The LV is not wiped if the read only flag is set.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.HP
+\fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
+.br
+Controls zeroing of the first 4 KiB of data in the new LV.
+Default is \fBy\fP.
+Snapshot COW volumes are always zeroed.
+For thin pools, this controls zeroing of provisioned blocks.
+LV is not zeroed if the read only flag is set.
+Warning: trying to mount an unzeroed LV can cause the system to hang.
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+For lvcreate, the required VG positional arg may be
+omitted when the VG name is included in another option,
+e.g. --name VG/LV.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+LV1 indicates the LV must have a specific type, where the
+accepted LV types are listed. (raid represents raid<N> type).
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
+.
+.SH ADVANCED USAGE
+.
+Alternate command forms, advanced command usage, and listing of all valid syntax for completeness.
+.P
+Create an LV that returns errors when used.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBerror\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Create an LV that returns zeros when read.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBzero\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Create a linear LV.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBlinear\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a striped LV (also see lvcreate --stripes).
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBstriped\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a mirror LV (also see --type raid1).
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBmirror\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-m\fP|\fB--mirrors\fP \fINumber\fP ]
+.br
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a COW snapshot LV of an origin LV
+.br
+(also see --snapshot).
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBsnapshot\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-s\fP|\fB--snapshot\fP ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a sparse COW snapshot LV of a virtual origin LV
+.br
+(also see --snapshot).
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBsnapshot\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-s\fP|\fB--snapshot\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a thin pool.
+.br
+.P
+\fBlvcreate\fP \fB-T\fP|\fB--thin\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--type thin-pool\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP ]
+.br
+[ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a thin pool named in --thinpool.
+.br
+.P
+\fBlvcreate\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fB--thinpool\fP \fILV\fP\fI_new\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--type thin-pool\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP ]
+.br
+[ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a cache pool named by the --cachepool arg
+.br
+(variant, uses --cachepool in place of --name).
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBcache-pool\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB--cachepool\fP \fILV\fP\fI_new\fP \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-H\fP|\fB--cache\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a thin LV in a thin pool.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBthin\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB--thinpool\fP \fILV\fP \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Create a thin LV in a thin pool named in the first arg
+.br
+(variant, also see --thinpool for naming pool).
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBthin\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: thinpool
+.RE
+.P
+\(em
+.P
+Create a thin LV in the thin pool named in the first arg
+.br
+(also see --thinpool for naming pool.)
+.br
+.P
+\fBlvcreate\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--type thin\fP ] (implied)
+.br
+.br
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: thinpool
+.RE
+.P
+\(em
+.P
+Create a thin LV that is a snapshot of an existing thin LV.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBthin\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ \fB-s\fP|\fB--snapshot\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: thin
+.RE
+.P
+\(em
+.P
+Create a thin LV that is a snapshot of an existing thin LV.
+.br
+.P
+\fBlvcreate\fP \fB-T\fP|\fB--thin\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB--type thin\fP ] (implied)
+.br
+.br
+[ \fB-s\fP|\fB--snapshot\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+.RS 4
+LV1 types: thin
+.RE
+.P
+\(em
+.P
+Create a thin LV that is a snapshot of an external origin LV.
+.br
+.P
+\fBlvcreate\fP \fB-s\fP|\fB--snapshot\fP \fB--thinpool\fP \fILV\fP \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB--type thin\fP ] (implied)
+.br
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Create a VDO LV with VDO pool.
+.br
+.P
+\fBlvcreate\fP \fB--vdo\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--type vdo\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--vdopool\fP \fILV\fP\fI_new\fP ]
+.br
+[ \fB--compression\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--deduplication\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--vdosettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a VDO LV with VDO pool.
+.br
+.P
+\fBlvcreate\fP \fB--vdopool\fP \fILV\fP\fI_new\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--type vdo\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--compression\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--deduplication\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--vdosettings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a thin LV, first creating a thin pool for it,
+.br
+where the new thin pool is named by the --thinpool arg.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBthin\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fB--thinpool\fP \fILV\fP\fI_new\fP \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP ]
+.br
+[ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a thin LV, first creating a thin pool for it,
+.br
+where the new thin pool is named by --thinpool.
+.br
+.P
+\fBlvcreate\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB--thinpool\fP \fILV\fP\fI_new\fP \fIVG\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB--type thin\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP ]
+.br
+[ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a thin LV, first creating a thin pool for it,
+.br
+where the new thin pool is named in the first arg,
+.br
+or the new thin pool name is generated when the first
+.br
+arg is a VG name.
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBthin\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP|\fILV\fP\fI_new\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP ]
+.br
+[ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a thin LV, first creating a thin pool for it,
+.br
+where the new thin pool is named in the first arg,
+.br
+or the new thin pool name is generated when the first
+.br
+arg is a VG name.
+.br
+.P
+\fBlvcreate\fP \fB-T\fP|\fB--thin\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
+.RS 5
+ \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP|\fILV\fP\fI_new\fP
+.RE
+.br
+.RS 4
+.ad l
+[ \fB--type thin\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP ]
+.br
+[ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a thin LV, first creating a thin pool for it.
+.br
+Create a sparse snapshot of a virtual origin LV
+.br
+Chooses type thin or snapshot according to
+.br
+config setting sparse_segtype_default.
+.br
+.P
+\fBlvcreate\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--type thin\fP|\fBsnapshot\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-s\fP|\fB--snapshot\fP ]
+.br
+[ \fB-T\fP|\fB--thin\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP ]
+.br
+[ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a new LV, then attach the specified cachepool
+.br
+which converts the new LV to type cache.
+.br
+.P
+\fBlvcreate\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fB--cachepool\fP \fILV\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--type cache\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-H\fP|\fB--cache\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Create a new LV, then attach the specified cachepool
+.br
+which converts the new LV to type cache.
+.br
+(variant, also use --cachepool).
+.br
+.P
+\fBlvcreate\fP \fB--type\fP \fBcache\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-H\fP|\fB--cache\fP ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: cachepool
+.RE
+.P
+\(em
+.P
+When the LV arg is a cachepool, then create a new LV and
+.br
+attach the cachepool arg to it.
+.br
+(variant, use --type cache and --cachepool.)
+.br
+When the LV arg is not a cachepool, then create a new cachepool
+.br
+and attach it to the LV arg (alternative, use lvconvert.)
+.br
+.P
+\fBlvcreate\fP \fB-H\fP|\fB--cache\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB--type cache\fP ] (implied)
+.br
+[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
+.br
+[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--cachemode\fP \fBwritethrough\fP|\fBwriteback\fP|\fBpassthrough\fP ]
+.br
+[ \fB--cachepolicy\fP \fIString\fP ]
+.br
+[ \fB--cachesettings\fP \fIString\fP ]
+.br
+[ \fB--cachemetadataformat\fP \fBauto\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
diff --git a/man/lvdisplay.8.in b/man/lvdisplay.8.in
deleted file mode 100644
index 9999849..0000000
--- a/man/lvdisplay.8.in
+++ /dev/null
@@ -1,116 +0,0 @@
-.TH LVDISPLAY 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvdisplay \- display attributes of a logical volume
-.SH SYNOPSIS
-.B lvdisplay
-.RB [ \-a | \-\-all ]
-.RB [ \-c | \-\-colon ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-maps ]
-.RB [ \-\-nosuffix ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RI [ LogicalVolumePath
-.RI [ LogicalVolumePath ...]]
-.br
-
-.B lvdisplay
-.BR \-\-columns | \-C
-.RB [ \-\-aligned ]
-.RB [ \-a | \-\-all ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-o | \-\-options
-.RI [ + ] Field [ ,Field ...]]
-.RB [ \-O | \-\-sort
-.RI [ + | - ] Key1 [ , [ + | - ] Key2 ...]]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-segments ]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RI [ LogicalVolumePath
-.RI [ LogicalVolumePath ...]]
-.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 ", " \-\-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:
-
-* logical volume name
-* volume group name
-* logical volume access
-* logical volume status
-* internal logical volume number
-* open count of logical volume
-* logical volume size in sectors
-* current logical extents associated to logical volume
-* allocated logical extents of logical volume
-* allocation policy of logical volume
-* read ahead sectors of logical volume
-* major device number of logical volume
-* 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
-.TP
-.BR \-\-columns ", " \-C
-Display output in columns, the equivalent of \fBlvs\fP. Options listed
-are the same as options given in \fBlvs\fP(8).
-.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 /dev/vg00/lvol2
-
-Shows the attributes of this snapshot logical volume and also which
-original logical volume it is associated with:
-.sp
-.B lvdisplay /dev/vg00/snapshot
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvcreate (8),
-.BR lvscan (8),
-.BR pvs (8)
diff --git a/man/lvdisplay.8_des b/man/lvdisplay.8_des
new file mode 100644
index 0000000..ee004b1
--- /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.
+.P
+\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_end b/man/lvdisplay.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/lvdisplay.8_end
diff --git a/man/lvdisplay.8_pregen b/man/lvdisplay.8_pregen
new file mode 100644
index 0000000..b89d188
--- /dev/null
+++ b/man/lvdisplay.8_pregen
@@ -0,0 +1,460 @@
+.TH LVDISPLAY 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvdisplay \(em Display information about a logical volume
+.
+.SH SYNOPSIS
+.
+\fBlvdisplay\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+lvdisplay shows the attributes of LVs, like size, read/write status,
+snapshot information, etc.
+.P
+\fBlvs\fP(8) is a preferred alternative that shows the same information
+and more, using a more compact and configurable output format.
+.
+.SH USAGE
+.
+\fBlvdisplay\fP
+.br
+.RS 4
+.ad l
+[ \fB-a\fP|\fB--all\fP ]
+.br
+[ \fB-c\fP|\fB--colon\fP ]
+.br
+[ \fB-C\fP|\fB--columns\fP ]
+.br
+[ \fB-H\fP|\fB--history\fP ]
+.br
+[ \fB-m\fP|\fB--maps\fP ]
+.br
+[ \fB-o\fP|\fB--options\fP \fIString\fP ]
+.br
+[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB--aligned\fP ]
+.br
+[ \fB--binary\fP ]
+.br
+[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
+.br
+[ \fB--foreign\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--logonly\fP ]
+.br
+[ \fB--noheadings\fP ]
+.br
+[ \fB--nosuffix\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ \fB--segments\fP ]
+.br
+[ \fB--separator\fP \fIString\fP ]
+.br
+[ \fB--shared\fP ]
+.br
+[ \fB--unbuffered\fP ]
+.br
+[ \fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fILV\fP|\fITag\fP ... ]
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--aligned\fP
+.br
+Use with --separator to align the output columns
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+Show information about internal LVs.
+These are components of normal LVs, such as mirrors,
+which are not independently accessible, e.g. not mountable.
+.
+.HP
+\fB--binary\fP
+.br
+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).
+.
+.HP
+\fB-c\fP|\fB--colon\fP
+.br
+Generate colon separated output for easier parsing in scripts or programs.
+Also see \fBvgs\fP(8) which provides considerably more control over the output.
+.
+.HP
+\fB-C\fP|\fB--columns\fP
+.br
+Display output in columns, the equivalent of \fBvgs\fP(8).
+Options listed are the same as options given in \fBvgs\fP(8).
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
+.br
+See \fBlvmreport\fP(7).
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--foreign\fP
+.br
+Report/display foreign VGs that would otherwise be skipped.
+See \fBlvmsystemid\fP(7) for more information about foreign VGs.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB-H\fP|\fB--history\fP
+.br
+Include historical LVs in the output.
+(This has no effect unless LVs were removed while
+\fBlvm.conf\fP(5) \fBmetadata/record_lvs_history\fP was enabled.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--logonly\fP
+.br
+Suppress command report and display only log report.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-m\fP|\fB--maps\fP
+.br
+Display the mapping of logical extents to PVs and physical extents.
+To map physical extents to logical extents use:
+pvs --segments -o+lv_name,seg_start_pe,segtype
+.
+.HP
+\fB--noheadings\fP
+.br
+Suppress the headings line that is normally the first line of output.
+Useful if grepping the output.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--nosuffix\fP
+.br
+Suppress the suffix on output sizes. Use with --units
+(except h and H) if processing the output.
+.
+.HP
+\fB-o\fP|\fB--options\fP \fIString\fP
+.br
+Comma-separated, ordered list of fields to display in columns.
+String arg syntax is: [\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
+The prefix \fB+\fP will append the specified fields to the default fields,
+\fB-\fP will remove the specified fields from the default fields, and
+\fB#\fP will compact specified fields (removing them when empty for all rows.)
+Use \fB-o help\fP to view the list of all available fields.
+Use separate lists of fields to add, remove or compact by repeating the -o option:
+-o+field1,field2 -o-field3,field4 -o#field5.
+These lists are evaluated from left to right.
+Use field name \fBlv_all\fP to view all LV fields,
+\fBvg_all\fP all VG fields,
+\fBpv_all\fP all PV fields,
+\fBpvseg_all\fP all PV segment fields,
+\fBseg_all\fP all LV segment fields, and
+\fBpvseg_all\fP all PV segment columns.
+See the \fBlvm.conf\fP(5) report section for more config options.
+See \fBlvmreport\fP(7) for more information about reporting.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB--segments\fP
+.br
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB--separator\fP \fIString\fP
+.br
+String to use to separate each column. Useful if grepping the output.
+.
+.HP
+\fB--shared\fP
+.br
+Report/display shared VGs that would otherwise be skipped when
+lvmlockd is not being used on the host.
+See \fBlvmlockd\fP(8) for more information about shared VGs.
+.
+.HP
+\fB-O\fP|\fB--sort\fP \fIString\fP
+.br
+Comma-separated ordered list of columns to sort by. Replaces the default
+selection. Precede any column with \fB-\fP for a reverse sort on that column.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--unbuffered\fP
+.br
+Produce output immediately without sorting or aligning the columns properly.
+.
+.HP
+.ad l
+\fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+.ad b
+.br
+All sizes are output in these units:
+human-(r)eadable with '<' rounding indicator,
+(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.
+Custom units can be specified, e.g. --units 3M.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvextend.8.in b/man/lvextend.8.in
deleted file mode 100644
index ee62a2f..0000000
--- a/man/lvextend.8.in
+++ /dev/null
@@ -1,116 +0,0 @@
-.TH LVEXTEND 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvextend \- extend the size of a logical volume
-.SH SYNOPSIS
-.B lvextend
-.RB [ \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-noudevsync]
-.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 [ \-f | \-\-force ]
-.RB [ \-n | \-\-nofsck ]
-.RB [ \-r | \-\-resizefs ]
-.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
-.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
-.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 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.
-.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 \-f ", " \-\-force
-Proceed with size extension without prompting.
-.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
-.BR \-r ", " \-\-resizefs
-Resize underlying filesystem together with the logical volume using
-\fBfsadm\fR(8).
-.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 lvcreate (8),
-.BR lvconvert (8),
-.BR lvreduce (8),
-.BR lvresize (8),
-.BR lvchange (8)
diff --git a/man/lvextend.8_des b/man/lvextend.8_des
new file mode 100644
index 0000000..6fc6a8d
--- /dev/null
+++ b/man/lvextend.8_des
@@ -0,0 +1,12 @@
+lvextend extends the size of an LV. This requires allocating logical
+extents from the VG's free physical extents. If the extension adds a new
+LV segment, the new segment will use the existing segment type of the LV.
+.P
+Extending a copy-on-write snapshot LV adds space for COW blocks.
+.P
+Use \fBlvconvert\fP(8) to change the number of data images in a RAID or
+mirrored LV.
+.P
+In the usage section below, \fB--size\fP \fISize\fP can be replaced
+with \fB--extents\fP \fINumber\fP. See both descriptions
+the options section.
diff --git a/man/lvextend.8_end b/man/lvextend.8_end
new file mode 100644
index 0000000..4b25c2c
--- /dev/null
+++ b/man/lvextend.8_end
@@ -0,0 +1,22 @@
+.
+.SH EXAMPLES
+.
+Extend the size of an LV by 54MiB, using a specific PV.
+.br
+.B lvextend -L +54 vg01/lvol10 /dev/sdk3
+.P
+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
+.P
+Extend an LV by 16MiB using specific physical extents.
+.br
+.B lvextend -L+16m vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9
+.P
+Extend an LV to use all remaining free space in volume group
+and all resize its filesystem with
+.BR fsadm (8).
+.br
+.B lvextend -l+100%FREE -r vg01/lvol01
diff --git a/man/lvextend.8_pregen b/man/lvextend.8_pregen
new file mode 100644
index 0000000..7e9654a
--- /dev/null
+++ b/man/lvextend.8_pregen
@@ -0,0 +1,672 @@
+.TH LVEXTEND 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvextend \(em Add space to a logical volume
+.
+.SH SYNOPSIS
+.
+\fBlvextend\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.P
+.ad l
+ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.br
+ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB-l\fP|\fB--extents\fP [\fB+\fP]\fINumber\fP[PERCENT]
+.br
+ \fB-f\fP|\fB--force\fP
+.br
+ \fB--fs\fP \fIString\fP
+.br
+ \fB--fsmode\fP \fIString\fP
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB-m\fP|\fB--mirrors\fP \fINumber\fP
+.br
+ \fB-n\fP|\fB--nofsck\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--nosync\fP
+.br
+ \fB--noudevsync\fP
+.br
+ \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT]
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+ \fB-r\fP|\fB--resizefs\fP
+.br
+ \fB-L\fP|\fB--size\fP [\fB+\fP]\fISize\fP[m|UNIT]
+.br
+ \fB-i\fP|\fB--stripes\fP \fINumber\fP
+.br
+ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB--type\fP \c
+.nh
+\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
+.hy
+.br
+ \fB--usepolicies\fP
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB-y\fP|\fB--yes\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+lvextend extends the size of an LV. This requires allocating logical
+extents from the VG's free physical extents. If the extension adds a new
+LV segment, the new segment will use the existing segment type of the LV.
+.P
+Extending a copy-on-write snapshot LV adds space for COW blocks.
+.P
+Use \fBlvconvert\fP(8) to change the number of data images in a RAID or
+mirrored LV.
+.P
+In the usage section below, \fB--size\fP \fISize\fP can be replaced
+with \fB--extents\fP \fINumber\fP. See both descriptions
+the options section.
+.
+.SH USAGE
+.
+Extend an LV by a specified size.
+.br
+.P
+\fBlvextend\fP \fB-L\fP|\fB--size\fP [\fB+\fP]\fISize\fP[m|UNIT] \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP [\fB+\fP]\fINumber\fP[PERCENT] ]
+.br
+[ \fB-r\fP|\fB--resizefs\fP ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] ]
+.br
+[ \fB--fs\fP \fIString\fP ]
+.br
+[ \fB--fsmode\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Extend an LV by specified PV extents.
+.br
+.P
+\fBlvextend\fP \fILV\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-r\fP|\fB--resizefs\fP ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--fs\fP \fIString\fP ]
+.br
+[ \fB--fsmode\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Extend a pool metadata SubLV by a specified size.
+.br
+.P
+\fBlvextend\fP \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: linear thinpool
+.RE
+.P
+\(em
+.P
+Extend an LV according to a predefined policy.
+.br
+.P
+\fBlvextend\fP \fB--usepolicies\fP \fILV1\fP
+.br
+.RS 4
+.ad l
+[ \fB-r\fP|\fB--resizefs\fP ]
+.br
+[ \fB--fs\fP \fIString\fP ]
+.br
+[ \fB--fsmode\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: snapshot thinpool vdopool
+.RE
+.P
+\(em
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-m\fP|\fB--mirrors\fP \fINumber\fP ]
+.br
+[ \fB-n\fP|\fB--nofsck\fP ]
+.br
+[ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+]
+.br
+[ \fB--nosync\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--type\fP \c
+.nh
+\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
+.hy
+]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+.ad l
+\fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.ad b
+.br
+Determines the allocation policy when a command needs to allocate
+Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
+which can be changed with vgchange/lvchange, or overridden on the
+command line.
+\fBnormal\fP applies common sense rules such as not placing parallel stripes
+on the same PV.
+\fBinherit\fP applies the VG policy to an LV.
+\fBcontiguous\fP requires new PEs be placed adjacent to existing PEs.
+\fBcling\fP places new PEs on the same PV as existing PEs in the same
+stripe of the LV.
+If there are sufficient PEs for an allocation, but normal does not
+use them, \fBanywhere\fP will use them even if it reduces performance,
+e.g. by placing two stripes on the same PV.
+Optional positional PV args on the command line can also be used to limit
+which PVs the command will use for allocation.
+See \fBlvm\fP(8) for more information about allocation.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-l\fP|\fB--extents\fP [\fB+\fP]\fINumber\fP[PERCENT]
+.br
+Specifies the new size of the LV in logical extents.
+The --size and --extents options are alternate methods of specifying size.
+The total number of physical extents used will be
+greater when redundant data is needed for RAID levels.
+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 PVs. For a snapshot, the size
+can be expressed as a percentage of the total size of the origin LV
+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.
+When the plus \fB+\fP or minus \fB-\fP prefix is used,
+the value is not an absolute size, but is relative and added or subtracted
+from the current size.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB--fs\fP \fIString\fP
+.br
+Control file system resizing when resizing an LV.
+\fBchecksize\fP: Check the fs size and reduce the LV if the fs is not
+using the reduced space (fs reduce is not needed.) If the reduced space
+is used by the fs, then do not resize the fs or LV, and return an error.
+(checksize only applies when reducing, and does nothing for extend.)
+\fBresize\fP: Resize the fs by calling the fs-specific resize command.
+This may also include mounting, unmounting, or running fsck. See --fsmode to
+control mounting behavior, and --nofsck to disable fsck.
+\fBresize_fsadm\fP: Use the old method of calling fsadm to handle the fs
+(deprecated.) Warning: this option does not prevent lvreduce from destroying
+file systems that are unmounted (or mounted if prompts are skipped.)
+\fBignore\fP: Resize the LV without checking for or handling a file system.
+Warning: using ignore when reducing the LV size may destroy the file system.
+.
+.HP
+\fB--fsmode\fP \fIString\fP
+.br
+Control file system mounting behavior for fs resize.
+\fBmanage\fP: Mount or unmount the fs as needed to resize the fs,
+and attempt to restore the original mount state at the end.
+\fBnochange\fP: Do not mount or unmount the fs. If mounting or unmounting
+is required to resize the fs, then do not resize the fs or the LV and fail
+the command.
+\fBoffline\fP: Unmount the fs if it is mounted, and resize the fs while it
+is unmounted. If mounting is required to resize the fs, then do not resize
+the fs or the LV and fail the command.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-m\fP|\fB--mirrors\fP \fINumber\fP
+.br
+Not used.
+.
+.HP
+\fB-n\fP|\fB--nofsck\fP
+.br
+Do not perform fsck when resizing the file system with --resizefs.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--nosync\fP
+.br
+Causes the creation of mirror, raid1, raid4, raid5 and raid10 to skip the
+initial synchronization. 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.
+This is useful for skipping a potentially long and resource intensive initial
+sync of an empty mirror/raid1/raid4/raid5 and raid10 LV.
+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 do not provide any data copies or parity support
+and thus do not support initial synchronization.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT]
+.br
+Specifies the new size of the pool metadata LV.
+The plus prefix \fB+\fP can be used, in which case
+the value is added to the current size.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-r\fP|\fB--resizefs\fP
+.br
+Resize the fs using the fs-specific resize command.
+May include mounting, unmounting, or running fsck. See --fsmode to control
+mounting behavior, and --nofsck to disable fsck. See --fs for more options
+(--resizefs is equivalent to --fs resize.)
+.
+.HP
+\fB-L\fP|\fB--size\fP [\fB+\fP]\fISize\fP[m|UNIT]
+.br
+Specifies the new size of the LV.
+The --size and --extents options are alternate methods of specifying size.
+The total number of physical extents used will be
+greater when redundant data is needed for RAID levels.
+When the plus \fB+\fP or minus \fB-\fP prefix is used,
+the value is not an absolute size, but is relative and added or subtracted
+from the current size.
+.
+.HP
+\fB-i\fP|\fB--stripes\fP \fINumber\fP
+.br
+Specifies the number of stripes in a striped LV. This is the number of
+PVs (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 --stripesize). This does not change existing
+allocated space, but only applies to space being allocated by the command.
+When creating a RAID 4/5/6 LV, this number does not include the extra
+devices that are required for parity. The largest number depends on
+the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and
+when unspecified, the default depends on the RAID type
+(raid0: 2, raid10: 2, raid4/5: 3, raid6: 5.)
+To stripe a new raid LV across all PVs by default,
+see \fBlvm.conf\fP(5) \fBallocation/raid_stripe_all_devices\fP.
+.
+.HP
+\fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
+.br
+The amount of data that is written to one device before
+moving to the next in a striped LV.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+.ad l
+\fB--type\fP \c
+.nh
+\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
+.hy
+.ad b
+.br
+The LV type, also known as "segment type" or "segtype".
+See usage descriptions for the specific ways to use these types.
+For more information about redundancy and performance (\fBraid\fP<N>, \fBmirror\fP, \fBstriped\fP, \fBlinear\fP) see \fBlvmraid\fP(7).
+For thin provisioning (\fBthin\fP, \fBthin-pool\fP) see \fBlvmthin\fP(7).
+For performance caching (\fBcache\fP, \fBcache-pool\fP) see \fBlvmcache\fP(7).
+For copy-on-write snapshots (\fBsnapshot\fP) see usage definitions.
+For VDO (\fBvdo\fP) see \fBlvmvdo\fP(7).
+Several commands omit an explicit type option because the type
+is inferred from other options or shortcuts
+(e.g. --stripes, --mirrors, --snapshot, --virtualsize, --thin, --cache, --vdo).
+Use inferred types with care because it can lead to unexpected results.
+.
+.HP
+\fB--usepolicies\fP
+.br
+Perform an operation according to the policy configured in \fBlvm.conf\fP(5)
+or a profile.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+LV1 indicates the LV must have a specific type, where the
+accepted LV types are listed. (raid represents raid<N> type).
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvm-fullreport.8_des b/man/lvm-fullreport.8_des
new file mode 100644
index 0000000..741cd12
--- /dev/null
+++ b/man/lvm-fullreport.8_des
@@ -0,0 +1,5 @@
+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_end b/man/lvm-fullreport.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/lvm-fullreport.8_end
diff --git a/man/lvm-fullreport.8_pregen b/man/lvm-fullreport.8_pregen
new file mode 100644
index 0000000..7e9348e
--- /dev/null
+++ b/man/lvm-fullreport.8_pregen
@@ -0,0 +1,447 @@
+.TH LVM FULLREPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvm fullreport \(em Display full report
+.
+.SH SYNOPSIS
+.
+\fBlvm fullreport\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+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.
+.
+.SH USAGE
+.
+\fBlvm fullreport\fP
+.br
+.RS 4
+.ad l
+[ \fB-a\fP|\fB--all\fP ]
+.br
+[ \fB-o\fP|\fB--options\fP \fIString\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
+.br
+[ \fB--aligned\fP ]
+.br
+[ \fB--binary\fP ]
+.br
+[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
+.br
+[ \fB--foreign\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--logonly\fP ]
+.br
+[ \fB--nameprefixes\fP ]
+.br
+[ \fB--noheadings\fP ]
+.br
+[ \fB--nosuffix\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--rows\fP ]
+.br
+[ \fB--separator\fP \fIString\fP ]
+.br
+[ \fB--shared\fP ]
+.br
+[ \fB--unbuffered\fP ]
+.br
+[ \fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+]
+.br
+[ \fB--unquoted\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP ... ]
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--aligned\fP
+.br
+Use with --separator to align the output columns
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+.
+.HP
+\fB--binary\fP
+.br
+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).
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
+.br
+See \fBlvmreport\fP(7).
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--foreign\fP
+.br
+Report/display foreign VGs that would otherwise be skipped.
+See \fBlvmsystemid\fP(7) for more information about foreign VGs.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--logonly\fP
+.br
+Suppress command report and display only log report.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nameprefixes\fP
+.br
+Add an "LVM2_" prefix plus the field name to the output. Useful
+with --noheadings to produce a list of field=value pairs that can
+be used to set environment variables (for example, in udev rules).
+.
+.HP
+\fB--noheadings\fP
+.br
+Suppress the headings line that is normally the first line of output.
+Useful if grepping the output.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--nosuffix\fP
+.br
+Suppress the suffix on output sizes. Use with --units
+(except h and H) if processing the output.
+.
+.HP
+\fB-o\fP|\fB--options\fP \fIString\fP
+.br
+Comma-separated, ordered list of fields to display in columns.
+String arg syntax is: [\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
+The prefix \fB+\fP will append the specified fields to the default fields,
+\fB-\fP will remove the specified fields from the default fields, and
+\fB#\fP will compact specified fields (removing them when empty for all rows.)
+Use \fB-o help\fP to view the list of all available fields.
+Use separate lists of fields to add, remove or compact by repeating the -o option:
+-o+field1,field2 -o-field3,field4 -o#field5.
+These lists are evaluated from left to right.
+Use field name \fBlv_all\fP to view all LV fields,
+\fBvg_all\fP all VG fields,
+\fBpv_all\fP all PV fields,
+\fBpvseg_all\fP all PV segment fields,
+\fBseg_all\fP all LV segment fields, and
+\fBpvseg_all\fP all PV segment columns.
+See the \fBlvm.conf\fP(5) report section for more config options.
+See \fBlvmreport\fP(7) for more information about reporting.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB--rows\fP
+.br
+Output columns as rows.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB--separator\fP \fIString\fP
+.br
+String to use to separate each column. Useful if grepping the output.
+.
+.HP
+\fB--shared\fP
+.br
+Report/display shared VGs that would otherwise be skipped when
+lvmlockd is not being used on the host.
+See \fBlvmlockd\fP(8) for more information about shared VGs.
+.
+.HP
+\fB-O\fP|\fB--sort\fP \fIString\fP
+.br
+Comma-separated ordered list of columns to sort by. Replaces the default
+selection. Precede any column with \fB-\fP for a reverse sort on that column.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--unbuffered\fP
+.br
+Produce output immediately without sorting or aligning the columns properly.
+.
+.HP
+.ad l
+\fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+.ad b
+.br
+All sizes are output in these units:
+human-(r)eadable with '<' rounding indicator,
+(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.
+Custom units can be specified, e.g. --units 3M.
+.
+.HP
+\fB--unquoted\fP
+.br
+When used with --nameprefixes, output values in the field=value
+pairs are not quoted.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
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..6706a3e
--- /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
+.P
+Abort a pvmove operation.
+.br
+.B lvm lvpoll --polloperation pvmove --abort vg00/pvmove0
+.P
+Continue polling a mirror conversion.
+.br
+.B lvm lvpoll --polloperation convert vg00/lvmirror
+.P
+Continue mirror repair.
+.br
+.B lvm lvpoll --polloperation convert vg/damaged_mirror --handlemissingpvs
+.P
+Continue snapshot merge.
+.br
+.B lvm lvpoll --polloperation merge vg/snapshot_old
+.P
+Continue thin snapshot merge.
+.br
+.B lvm lvpoll --polloperation merge_thin vg/thin_snapshot
diff --git a/man/lvm-lvpoll.8_pregen b/man/lvm-lvpoll.8_pregen
new file mode 100644
index 0000000..bfdfafa
--- /dev/null
+++ b/man/lvm-lvpoll.8_pregen
@@ -0,0 +1,270 @@
+.TH LVM LVPOLL 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvm lvpoll \(em Continue already initiated poll operation on a logical volume
+.
+.SH SYNOPSIS
+.
+\fBlvm lvpoll\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+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.
+.
+.SH USAGE
+.
+\fBlvm lvpoll\fP \fB--polloperation\fP \fBpvmove\fP|\fBconvert\fP|\fBmerge\fP|\fBmerge_thin\fP \fILV\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ \fB--abort\fP ]
+.br
+[ \fB--handlemissingpvs\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--abort\fP
+.br
+Stop processing a poll operation in lvmpolld.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--handlemissingpvs\fP
+.br
+Allows a polling operation to continue when PVs are missing,
+e.g. for repairs due to faulty devices.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB-i\fP|\fB--interval\fP \fINumber\fP
+.br
+Report progress at regular intervals.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--polloperation\fP \fBpvmove\fP|\fBconvert\fP|\fBmerge\fP|\fBmerge_thin\fP
+.br
+The command to perform from lvmpolld.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvm.8.in b/man/lvm.8.in
deleted file mode 100644
index 2ce0065..0000000
--- a/man/lvm.8.in
+++ /dev/null
@@ -1,402 +0,0 @@
-.TH LVM 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvm \- LVM2 tools
-.SH SYNOPSIS
-.B lvm
-[command | file]
-.SH DESCRIPTION
-lvm provides the command-line tools for LVM2. A separate
-manual page describes each command in detail.
-.LP
-If \fBlvm\fP is invoked with no arguments it presents a readline prompt
-(assuming it was compiled with readline support).
-LVM commands may be entered interactively at this prompt with
-readline facilities including history and command name and option
-completion. Refer to \fBreadline\fP(3) for details.
-.LP
-If \fBlvm\fP is invoked with argv[0] set to the name of a specific
-LVM command (for example by using a hard or soft link) it acts as
-that command.
-.LP
-On invocation, \fBlvm\fP requires that only the standard file descriptors
-stdin, stdout and stderr are available. If others are found, they
-get closed and messages are issued warning about the leak.
-.LP
-Where commands take VG or LV names as arguments, the full path name is
-optional. An LV called "lvol0" in a VG called "vg0" can be specified
-as "vg0/lvol0". Where a list of VGs is required but is left empty,
-a list of all VGs will be substituted. Where a list of LVs is required
-but a VG is given, a list of all the LVs in that VG will be substituted.
-So \fBlvdisplay vg0\fP will display all the LVs in "vg0".
-Tags can also be used - see \fB\-\-addtag\fP below.
-.LP
-One advantage of using the built-in shell is that configuration
-information gets cached internally between commands.
-.LP
-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.
-.SH BUILT-IN COMMANDS
-The following commands are built into lvm without links normally
-being created in the filesystem for them.
-.TP
-\fBdumpconfig\fP \(em Display the configuration information after
-loading \fBlvm.conf\fP(5) and any other configuration files.
-.TP
-\fBformats\fP \(em Display recognised metadata formats.
-.TP
-\fBhelp\fP \(em Display the help text.
-.TP
-\fBpvdata\fP \(em Not implemented in LVM2.
-.TP
-\fBsegtypes\fP \(em Display recognised Logical Volume segment types.
-.TP
-\fBversion\fP \(em Display version information.
-.LP
-.SH COMMANDS
-The following commands implement the core LVM functionality.
-.TP
-\fBpvchange\fP \(em Change attributes of a Physical Volume.
-.TP
-\fBpvck\fP \(em Check Physical Volume metadata.
-.TP
-\fBpvcreate\fP \(em Initialize a disk or partition for use by LVM.
-.TP
-\fBpvdisplay\fP \(em Display attributes of a Physical Volume.
-.TP
-\fBpvmove\fP \(em Move Physical Extents.
-.TP
-\fBpvremove\fP \(em Remove a Physical Volume.
-.TP
-\fBpvresize\fP \(em Resize a disk or partition in use by LVM2.
-.TP
-\fBpvs\fP \(em Report information about Physical Volumes.
-.TP
-\fBpvscan\fP \(em Scan all disks for Physical Volumes.
-.TP
-\fBvgcfgbackup\fP \(em Backup Volume Group descriptor area.
-.TP
-\fBvgcfgrestore\fP \(em Restore Volume Group descriptor area.
-.TP
-\fBvgchange\fP \(em Change attributes of a Volume Group.
-.TP
-\fBvgck\fP \(em Check Volume Group metadata.
-.TP
-\fBvgconvert\fP \(em Convert Volume Group metadata format.
-.TP
-\fBvgcreate\fP \(em Create a Volume Group.
-.TP
-\fBvgdisplay\fP \(em Display attributes of Volume Groups.
-.TP
-\fBvgexport\fP \(em Make volume Groups unknown to the system.
-.TP
-\fBvgextend\fP \(em Add Physical Volumes to a Volume Group.
-.TP
-\fBvgimport\fP \(em Make exported Volume Groups known to the system.
-.TP
-\fBvgimportclone\fP \(em Import and rename duplicated Volume Group (e.g. a hardware snapshot).
-.TP
-\fBvgmerge\fP \(em Merge two Volume Groups.
-.TP
-\fBvgmknodes\fP \(em Recreate Volume Group directory and Logical Volume special files
-.TP
-\fBvgreduce\fP \(em Reduce a Volume Group by removing one or more
-Physical Volumes.
-.TP
-\fBvgremove\fP \(em Remove a Volume Group.
-.TP
-\fBvgrename\fP \(em Rename a Volume Group.
-.TP
-\fBvgs\fP \(em Report information about Volume Groups.
-.TP
-\fBvgscan\fP \(em Scan all disks for Volume Groups and rebuild caches.
-.TP
-\fBvgsplit\fP \(em Split a Volume Group into two, moving any logical
-volumes from one Volume Group to another by moving entire Physical
-Volumes.
-.TP
-\fBlvchange\fP \(em Change attributes of a Logical Volume.
-.TP
-\fBlvconvert\fP \(em Convert a Logical Volume from linear to mirror or snapshot.
-.TP
-\fBlvcreate\fP \(em Create a Logical Volume in an existing Volume Group.
-.TP
-\fBlvdisplay\fP \(em Display attributes of a Logical Volume.
-.TP
-\fBlvextend\fP \(em Extend the size of a Logical Volume.
-.TP
-\fBlvmchange\fP \(em Change attributes of the Logical Volume Manager.
-.TP
-\fBlvmdiskscan\fP \(em Scan for all devices visible to LVM2.
-.TP
-\fBlvmdump\fP \(em Create lvm2 information dumps for diagnostic purposes.
-.TP
-\fBlvreduce\fP \(em Reduce the size of a Logical Volume.
-.TP
-\fBlvremove\fP \(em Remove a Logical Volume.
-.TP
-\fBlvrename\fP \(em Rename a Logical Volume.
-.TP
-\fBlvresize\fP \(em Resize a Logical Volume.
-.TP
-\fBlvs\fP \(em Report information about Logical Volumes.
-.TP
-\fBlvscan\fP \(em Scan (all disks) for Logical Volumes.
-.TP
-The following commands are not implemented in LVM2 but might be in the future: 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.
-.TP
-.BR \-h ", " \-\-help
-Display the help text.
-.TP
-.B \-\-version
-Display version information.
-.TP
-.BR \-v ", " \-\-verbose
-Set verbose level. Repeat from 1 to 3 times to increase the detail
-of messages sent to stdout and stderr. Overrides config file setting.
-.TP
-.BR \-d ", " \-\-debug
-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.
-.TP
-.BR \-q ", " \-\-quiet
-Suppress output and log messages.
-Overrides \fB\-d\fP and \fB\-v\fP.
-.TP
-.BR \-t ", " \-\-test
-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.
-.TP
-.BR \-\-driverloaded " {" \fIy | \fIn }
-Whether or not the device-mapper kernel driver is loaded.
-If you set this to \fIn\fP, no attempt will be made to contact the driver.
-.TP
-.BR \-A ", " \-\-autobackup " {" \fIy | \fIn }
-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).
-.TP
-.BR \-P ", " \-\-partial
-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, \fB/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).
-.TP
-.BR \-M ", " \-\-metadatatype " " \fIType
-Specifies which type of on-disk metadata to use, such as \fIlvm1\fP
-or \fIlvm2\fP, which can be abbreviated to \fI1\fP or \fI2\fP respectively.
-The default (\fIlvm2\fP) can be changed by setting \fBformat\fP
-in the \fBglobal\fP section of the config file.
-.TP
-.B \-\-ignorelockingfailure
-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.
-.TP
-.B \-\-addtag \fITag
-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:
-.B A-Z a-z 0-9 _ + . -
-and as of version 2.02.78 the following characters are also accepted:
-.B / = ! : # &
-.TP
-.B \-\-deltag \fITag
-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.
-.TP
-.B \-\-alloc \fIAllocationPolicy
-The allocation policy to use:
-.IR contiguous ,
-.IR cling ,
-.IR normal ,
-.IR anywhere " or"
-.IR inherit .
-When a command needs to allocate Physical Extents from the Volume Group,
-the allocation policy controls how they are chosen.
-Each Volume Group and Logical Volume has an allocation policy defined.
-The default for a Volume Group is \fInormal\fP which applies
-common-sense rules such as not placing parallel stripes on the same
-Physical Volume. The default for a Logical Volume is \fIinherit\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 \fIcontiguous\fP policy requires that new Physical Extents be placed adjacent
-to existing Physical Extents.
-The \fIcling\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 \fInormal\fP doesn't use them,
-\fIanywhere\fP will - even if that reduces performance by
-placing two stripes on the same Physical Volume.
-.SH ENVIRONMENT VARIABLES
-.TP
-.B HOME
-Directory containing \fI.lvm_history\fP if the internal readline
-shell is invoked.
-.TP
-.B LVM_SYSTEM_DIR
-Directory containing \fBlvm.conf\fP(5) and other LVM system files.
-Defaults to "#DEFAULT_SYS_DIR#".
-.TP
-.B LVM_VG_NAME
-The Volume Group name that is assumed for
-any reference to a Logical Volume that doesn't specify a path.
-Not set by default.
-.SH VALID NAMES
-The following characters are valid for VG and LV names:
-.B a-z A-Z 0-9 + _ . -
-.LP
-VG and LV names cannot begin with a hyphen.
-There are also various reserved names that are used internally by lvm that can not be used as LV or VG names.
-A VG cannot be called anything that exists in /dev/ at the time of creation, nor can it be called '.' or '..'.
-A LV cannot be called '.' '..' 'snapshot' or 'pvmove'. The LV name may also not contain
-the strings '_mlog', '_mimage', '_rimage', '_tdata', '_tmeta'.
-.SH ALLOCATION
-When an operation needs to allocate Physical Extents for one or more
-Logical Volumes, the tools proceed as follows:
-
-First of all, they generate the complete set of unallocated Physical Extents
-in the Volume Group. If any ranges of Physical Extents are supplied at
-the end of the command line, only unallocated Physical Extents within
-those ranges on the specified Physical Volumes are considered.
-
-Then they try each allocation policy in turn, starting with the strictest
-policy (\fIcontiguous\fP) and ending with the allocation policy specified
-using \fB\-\-alloc\fP or set as the default for the particular Logical
-Volume or Volume Group concerned. For each policy, working from the
-lowest-numbered Logical Extent of the empty Logical Volume space that
-needs to be filled, they allocate as much space as possible according to
-the restrictions imposed by the policy. If more space is needed,
-they move on to the next policy.
-
-The restrictions are as follows:
-
-\fIContiguous\fP requires that the physical location of any Logical
-Extent that is not the first Logical Extent of a Logical Volume is
-adjacent to the physical location of the Logical Extent immediately
-preceding it.
-
-\fICling\fP requires that the Physical Volume used for any Logical
-Extent to be added to an existing Logical Volume is already in use by at
-least one Logical Extent earlier in that Logical Volume. If the
-configuration parameter allocation/cling_tag_list is defined, then two
-Physical Volumes are considered to match if any of the listed tags is
-present on both Physical Volumes. This allows groups of Physical
-Volumes with similar properties (such as their physical location) to be
-tagged and treated as equivalent for allocation purposes.
-
-When a Logical Volume is striped or mirrored, the above restrictions are
-applied independently to each stripe or mirror image (leg) that needs
-space.
-
-\fINormal\fP will not choose a Physical Extent that shares the same Physical
-Volume as a Logical Extent already allocated to a parallel Logical
-Volume (i.e. a different stripe or mirror image/leg) at the same offset
-within that parallel Logical Volume.
-
-When allocating a mirror log at the same time as Logical Volumes to hold
-the mirror data, Normal will first try to select different Physical
-Volumes for the log and the data. If that's not possible and the
-allocation/mirror_logs_require_separate_pvs configuration parameter is
-set to 0, it will then allow the log to share Physical Volume(s) with
-part of the data.
-
-When allocating thin pool metadata, similar considerations to those of a
-mirror log in the last paragraph apply based on the value of the
-allocation/thin_pool_metadata_require_separate_pvs configuration
-parameter.
-
-If you rely upon any layout behaviour beyond that documented here, be
-aware that it might change in future versions of the code.
-
-For example, if you supply on the command line two empty Physical
-Volumes that have an identical number of free Physical Extents available for
-allocation, the current code considers using each of them in the order
-they are listed, but there is no guarantee that future releases will
-maintain that property. If it is important to obtain a specific layout
-for a particular Logical Volume, then you should build it up through a
-sequence of \fBlvcreate\fP(8) and \fBlvconvert\fP(8) steps such that the
-restrictions described above applied to each step leave the tools no
-discretion over the layout.
-
-To view the way the allocation process currently works in any specific
-case, read the debug logging output, for example by adding \-vvvv to
-a command.
-.SH DIAGNOSTICS
-All tools return a status code of zero on success or non-zero on failure.
-.SH FILES
-.I #DEFAULT_SYS_DIR#/lvm.conf
-.br
-.I $HOME/.lvm_history
-.SH SEE ALSO
-.BR clvmd (8),
-.BR lvchange (8),
-.BR lvcreate (8),
-.BR lvdisplay (8),
-.BR lvextend (8),
-.BR lvmchange (8),
-.BR lvmdiskscan (8),
-.BR lvreduce (8),
-.BR lvremove (8),
-.BR lvrename (8),
-.BR lvresize (8),
-.BR lvs (8),
-.BR lvscan (8),
-.BR pvchange (8),
-.BR pvck (8),
-.BR pvcreate (8),
-.BR pvdisplay (8),
-.BR pvmove (8),
-.BR pvremove (8),
-.BR pvs (8),
-.BR pvscan (8),
-.BR vgcfgbackup (8),
-.BR vgchange (8),
-.BR vgck (8),
-.BR vgconvert (8),
-.BR vgcreate (8),
-.BR vgdisplay (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 readline (3),
-.BR lvm.conf (5)
diff --git a/man/lvm.8_main b/man/lvm.8_main
new file mode 100644
index 0000000..4710963
--- /dev/null
+++ b/man/lvm.8_main
@@ -0,0 +1,589 @@
+.TH LVM 8 "LVM TOOLS #VERSION#" "Red Hat, Inc." \" -*- nroff -*-
+.
+.SH NAME
+.
+lvm \(em LVM2 tools
+.
+.SH SYNOPSIS
+.
+.B lvm
+.RI [ command | file ]
+.
+.SH DESCRIPTION
+.
+The Logical Volume Manager (LVM) provides tools to create virtual block
+devices from physical devices. Virtual devices may be easier to manage
+than physical devices, and can have capabilities beyond what the physical
+devices provide themselves. A Volume Group (VG) is a collection of one or
+more physical devices, each called a Physical Volume (PV). A Logical
+Volume (LV) is a virtual block device that can be used by the system or
+applications. Each block of data in an LV is stored on one or more PV in
+the VG, according to algorithms implemented by Device Mapper (DM) in the
+kernel.
+.P
+The lvm command, and other commands listed below, are the command-line
+tools for LVM. A separate manual page describes each command in detail.
+.P
+If \fBlvm\fP is invoked with no arguments it presents a #DEFAULT_LIBLINE# prompt
+(assuming it was compiled with #DEFAULT_LIBLINE# support).
+LVM commands may be entered interactively at this prompt with
+#DEFAULT_LIBLINE# facilities including history and command name and option
+completion. Refer to \fB#DEFAULT_LIBLINE#\fP(3) for details.
+.P
+If \fBlvm\fP is invoked with argv[0] set to the name of a specific
+LVM command (for example by using a hard or soft link) it acts as
+that command.
+.P
+On invocation, \fBlvm\fP requires that only the standard file descriptors
+stdin, stdout and stderr are available. If others are found, they
+get closed and messages are issued warning about the leak.
+This warning can be suppressed by setting the environment variable
+.BR LVM_SUPPRESS_FD_WARNINGS .
+.P
+Where commands take VG or LV names as arguments, the full path name is
+optional. An LV called "lvol0" in a VG called "vg0" can be specified
+as "vg0/lvol0". Where a list of VGs is required but is left empty,
+a list of all VGs will be substituted. Where a list of LVs is required
+but a VG is given, a list of all the LVs in that VG will be substituted.
+So \fBlvdisplay vg0\fP will display all the LVs in "vg0".
+Tags can also be used - see \fB--addtag\fP below.
+.P
+One advantage of using the built-in shell is that configuration
+information gets cached internally between commands.
+.P
+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
+.
+The following commands are built into lvm without links
+normally being created in the filesystem for them.
+.sp
+.PD 0
+.TP 16
+.B config
+The same as \fBlvmconfig\fP(8) below.
+.TP
+.B devtypes
+Display the recognised built-in block device types.
+.TP
+.B dumpconfig
+The same as \fBlvmconfig\fP(8) below.
+.TP
+.B formats
+Display recognised metadata formats.
+.TP
+.B fullreport
+Report information about PVs, PV segments, VGs, LVs and LV segments,
+all at once.
+.TP
+.B help
+Display the help text.
+.TP
+.B lastlog
+Display log report of last command run in LVM shell
+if command log reporting is enabled.
+.TP
+.B lvpoll
+Complete lvmpolld operations (Internal command).
+.TP
+.B segtypes
+Display recognised Logical Volume segment types.
+.TP
+.B systemid
+Display any system ID currently set on this host.
+.TP
+.B tags
+Display any tags defined on this host.
+.TP
+.B version
+Display version information.
+.PD
+.
+.SH COMMANDS
+.
+The following commands implement the core LVM functionality.
+.sp
+.PD 0
+.TP 16
+.B pvchange
+Change attributes of a Physical Volume.
+.TP
+.B pvck
+Check Physical Volume metadata.
+.TP
+.B pvcreate
+Initialize a disk or partition for use by LVM.
+.TP
+.B pvdisplay
+Display attributes of a Physical Volume.
+.TP
+.B pvmove
+Move Physical Extents.
+.TP
+.B pvremove
+Remove a Physical Volume.
+.TP
+.B pvresize
+Resize a disk or partition in use by LVM2.
+.TP
+.B pvs
+Report information about Physical Volumes.
+.TP
+.B pvscan
+Scan all disks for Physical Volumes.
+.TP
+.B vgcfgbackup
+Backup Volume Group descriptor area.
+.TP
+.B vgcfgrestore
+Restore Volume Group descriptor area.
+.TP
+.B vgchange
+Change attributes of a Volume Group.
+.TP
+.B vgck
+Check Volume Group metadata.
+.TP
+.B vgconvert
+Convert Volume Group metadata format.
+.TP
+.B vgcreate
+Create a Volume Group.
+.TP
+.B vgdisplay
+Display attributes of Volume Groups.
+.TP
+.B vgexport
+Make volume Groups unknown to the system.
+.TP
+.B vgextend
+Add Physical Volumes to a Volume Group.
+.TP
+.B vgimport
+Make exported Volume Groups known to the system.
+.TP
+.B vgimportclone
+Import and rename duplicated Volume Group (e.g. a hardware snapshot).
+.TP
+.B vgimportdevices
+Add PVs from a VG to the devices file.
+.TP
+.B vgmerge
+Merge two Volume Groups.
+.TP
+.B vgmknodes
+Recreate Volume Group directory and Logical Volume special files
+.TP
+.B vgreduce
+Reduce a Volume Group by removing one or more Physical Volumes.
+.TP
+.B vgremove
+Remove a Volume Group.
+.TP
+.B vgrename
+Rename a Volume Group.
+.TP
+.B vgs
+Report information about Volume Groups.
+.TP
+.B vgscan
+Scan all disks for Volume Groups.
+.TP
+.B vgsplit
+Split a Volume Group into two, moving any logical
+volumes from one Volume Group to another by moving entire Physical
+Volumes.
+.TP
+.B lvchange
+Change attributes of a Logical Volume.
+.TP
+.B lvconvert
+Convert a Logical Volume from linear to mirror or snapshot.
+.TP
+.B lvcreate
+Create a Logical Volume in an existing Volume Group.
+.TP
+.B lvdisplay
+Display attributes of a Logical Volume.
+.TP
+.B lvextend
+Extend the size of a Logical Volume.
+.TP
+.B lvmconfig
+Display the configuration information after
+loading \fBlvm.conf\fP(5) and any other configuration files.
+.TP
+.B lvmdevices
+Manage the devices file.
+.TP
+.B lvmdiskscan
+Scan for all devices visible to LVM2.
+.TP
+.B lvmdump
+Create lvm2 information dumps for diagnostic purposes.
+.TP
+.B lvreduce
+Reduce the size of a Logical Volume.
+.TP
+.B lvremove
+Remove a Logical Volume.
+.TP
+.B lvrename
+Rename a Logical Volume.
+.TP
+.B lvresize
+Resize a Logical Volume.
+.TP
+.B lvs
+Report information about Logical Volumes.
+.TP
+.B lvscan
+Scan (all disks) for Logical Volumes.
+.PD
+.P
+The following LVM1 commands are not implemented in LVM2:
+.BR lvmchange ", " lvmsadc ", " lvmsar ", " pvdata .
+For performance metrics, use \fBdmstats\fP(8) or to manipulate the kernel
+device-mapper driver used by LVM2 directly, use \fBdmsetup\fP(8).
+.
+.SH VALID NAMES
+.
+The valid characters for VG and LV names are:
+.BR a - z
+.BR A - Z
+.BR 0 - 9
+.B + _ . -
+.P
+VG names cannot begin with a hyphen.
+The name of a new LV also cannot begin with a hyphen. However, if the
+configuration setting \fBmetadata/record_lvs_history\fP is enabled then an LV
+name with a hyphen as a prefix indicates that, although the LV was
+removed, it is still being tracked because it forms part of the history of at
+least one LV that is still present. This helps to record the ancestry of
+thin snapshots even after some links in the chain have been removed.
+A reference to the historical LV 'lvol1' in VG 'vg00' would be 'vg00/-lvol1'
+or just '-lvol1' if the VG is already set. (The latter form must be preceded
+by '--' to terminate command line option processing before reaching this
+argument.)
+.P
+There are also various reserved names that are used internally by lvm that can
+not be used as LV or VG names. A VG cannot be called anything that exists in
+\fI/dev/\fP at the time of creation, nor can it be called
+.RB ' . '
+or
+.RB ' .. '.
+An LV cannot be called
+.RB ' . ',
+.RB ' .. ',
+.RB ' snapshot '
+or
+.RB ' pvmove '.
+The LV name may also not contain any of the following strings:
+.RB ' _cdata ',
+.RB ' _cmeta ',
+.RB ' _corig ',
+.RB ' _iorig ',
+.RB ' _mimage ',
+.RB ' _mlog ',
+.RB ' _pmspare ',
+.RB ' _rimage ',
+.RB ' _rmeta ',
+.RB ' _tdata ',
+.RB ' _tmeta ',
+.RB ' _vdata ',
+.RB ' _vorigin '
+or
+.RB ' _wcorig '.
+A directory bearing the name of each Volume Group is created under
+\fI/dev\fP when any of its Logical Volumes are activated.
+Each active Logical Volume is accessible from this directory as a symbolic
+link leading to a device node.
+Links or nodes in \fI/dev/mapper\fP are intended only for internal use and
+the precise format and escaping might change between releases and distributions.
+Other software and scripts should use the
+\fI/dev/VolumeGroupName/LogicalVolumeName\fP format to reduce the chance of needing
+amendment when the software is updated. Should you need to process the node
+names in /dev/mapper, you may use \fBdmsetup splitname\fP to separate out the
+original VG, LV and internal layer names.
+.P
+.
+.SH UNIQUE NAMES
+.
+VG names should be unique. vgcreate will produce an error if the
+specified VG name matches an existing VG name. However, there are cases
+where different VGs with the same name can appear to LVM, e.g. after
+moving disks or changing filters.
+.P
+When VGs with the same name exist, commands operating on all VGs will
+include all of the VGs with the same name. If the ambiguous VG name is
+specified on the command line, the command will produce an error. The
+error states that multiple VGs exist with the specified name. To process
+one of the VGs specifically, the --select option should be used with the
+UUID of the intended VG: --select vg_uuid=<uuid>
+.P
+An exception is if all but one of the VGs with the shared name is foreign
+(see
+.BR lvmsystemid (7)).
+In this case, the one VG that is not foreign is assumed to be the intended
+VG and is processed.
+.P
+LV names are unique within a VG. The name of an historical LV cannot be
+reused until the historical LV has itself been removed or renamed.
+.
+.SH ALLOCATION
+.
+When an operation needs to allocate Physical Extents for one or more
+Logical Volumes, the tools proceed as follows:
+.P
+First of all, they generate the complete set of unallocated Physical Extents
+in the Volume Group. If any ranges of Physical Extents are supplied at
+the end of the command line, only unallocated Physical Extents within
+those ranges on the specified Physical Volumes are considered.
+.P
+Then they try each allocation policy in turn, starting with the strictest
+policy (\fBcontiguous\fP) and ending with the allocation policy specified
+using \fB--alloc\fP or set as the default for the particular Logical
+Volume or Volume Group concerned. For each policy, working from the
+lowest-numbered Logical Extent of the empty Logical Volume space that
+needs to be filled, they allocate as much space as possible according to
+the restrictions imposed by the policy. If more space is needed,
+they move on to the next policy.
+.P
+The restrictions are as follows:
+.P
+\fBContiguous\fP requires that the physical location of any Logical
+Extent that is not the first Logical Extent of a Logical Volume is
+adjacent to the physical location of the Logical Extent immediately
+preceding it.
+.P
+\fBCling\fP requires that the Physical Volume used for any Logical
+Extent to be added to an existing Logical Volume is already in use by at
+least one Logical Extent earlier in that Logical Volume. If the
+configuration parameter \fBallocation/cling_tag_list\fP is defined, then two
+Physical Volumes are considered to match if any of the listed tags is
+present on both Physical Volumes. This allows groups of Physical
+Volumes with similar properties (such as their physical location) to be
+tagged and treated as equivalent for allocation purposes.
+.P
+When a Logical Volume is striped or mirrored, the above restrictions are
+applied independently to each stripe or mirror image (leg) that needs
+space.
+.P
+\fBNormal\fP will not choose a Physical Extent that shares the same Physical
+Volume as a Logical Extent already allocated to a parallel Logical
+Volume (i.e. a different stripe or mirror image/leg) at the same offset
+within that parallel Logical Volume.
+.P
+When allocating a mirror log at the same time as Logical Volumes to hold
+the mirror data, Normal will first try to select different Physical
+Volumes for the log and the data. If that's not possible and the
+.B allocation/mirror_logs_require_separate_pvs
+configuration parameter is set to 0, it will then allow the log
+to share Physical Volume(s) with part of the data.
+.P
+When allocating thin pool metadata, similar considerations to those of a
+mirror log in the last paragraph apply based on the value of the
+.B allocation/thin_pool_metadata_require_separate_pvs
+configuration parameter.
+.P
+If you rely upon any layout behaviour beyond that documented here, be
+aware that it might change in future versions of the code.
+.P
+For example, if you supply on the command line two empty Physical
+Volumes that have an identical number of free Physical Extents available for
+allocation, the current code considers using each of them in the order
+they are listed, but there is no guarantee that future releases will
+maintain that property. If it is important to obtain a specific layout
+for a particular Logical Volume, then you should build it up through a
+sequence of \fBlvcreate\fP(8) and \fBlvconvert\fP(8) steps such that the
+restrictions described above applied to each step leave the tools no
+discretion over the layout.
+.P
+To view the way the allocation process currently works in any specific
+case, read the debug logging output, for example by adding \fB-vvvv\fP to
+a command.
+.
+.SH LOGICAL VOLUME TYPES
+.
+Some logical volume types are simple to create and can be done with a
+single \fBlvcreate\fP(8) command. The linear and striped logical
+volume types are an example of this. Other logical volume types may
+require more than one command to create. The cache (\fBlvmcache\fP(7))
+and thin provisioning (\fBlvmthin\fP(7)) types are examples of this.
+.
+.SH DIAGNOSTICS
+.
+All tools return a status code of zero on success or non-zero on failure.
+The non-zero codes distinguish only between the broad categories of
+unrecognised commands, problems processing the command line arguments
+and any other failures. As LVM remains under active development, the
+code used in a specific case occasionally changes between releases.
+Message text may also change.
+.
+.SH ENVIRONMENT VARIABLES
+.
+.TP
+.B HOME
+Directory containing \fI.lvm_history\fP if the internal #DEFAULT_LIBLINE#
+shell is invoked.
+.TP
+.B LVM_OUT_FD
+File descriptor to use for common output from LVM commands.
+.TP
+.B LVM_ERR_FD
+File descriptor to use for error output from LVM commands.
+.TP
+.B LVM_REPORT_FD
+File descriptor to use for report output from LVM commands.
+.TP
+.B LVM_COMMAND_PROFILE
+Name of default command profile to use for LVM commands. This profile
+is overridden by direct use of \fB--commandprofile\fP command line option.
+.TP
+.B LVM_RUN_BY_DMEVENTD
+This variable is normally set by dmeventd plugin to inform lvm2 command
+it is running from dmeventd plugin so lvm2 takes some extra action
+to avoid communication and deadlocks with dmeventd.
+.TP
+.B LVM_SYSTEM_DIR
+Directory containing \fBlvm.conf\fP(5) and other LVM system files.
+Defaults to "\fI#DEFAULT_SYS_DIR#\fP".
+.TP
+.B LVM_SUPPRESS_FD_WARNINGS
+Suppress warnings about unexpected file descriptors passed into LVM.
+.TP
+.B LVM_SUPPRESS_SYSLOG
+Suppress contacting syslog.
+.TP
+.B LVM_VG_NAME
+The Volume Group name that is assumed for
+any reference to a Logical Volume that doesn't specify a path.
+Not set by default.
+.TP
+.B LVM_LVMPOLLD_PIDFILE
+Path to the file that stores the lvmpolld process ID.
+.TP
+.B LVM_LVMPOLLD_SOCKET
+Path to the socket used to communicate with lvmpolld..
+.TP
+.B LVM_LOG_FILE_EPOCH
+A string of up to 32 letters appended to the log filename and
+followed by the process ID and a startup timestamp using
+this format string "_%s_%d_%llu". When set, each process logs to a
+separate file.
+.TP
+.B LVM_LOG_FILE_MAX_LINES
+If more than this number of lines are sent to the log file, the command gets
+aborted. Automated tests use this to terminate looping commands.
+.TP
+.B LVM_EXPECTED_EXIT_STATUS
+The status anticipated when the process exits. Use ">N" to match any
+status greater than N. If the actual exit status matches and a log
+file got produced, it is deleted.
+.B LVM_LOG_FILE_EPOCH
+and
+.B LVM_EXPECTED_EXIT_STATUS
+together allow automated test scripts to discard uninteresting log data.
+.TP
+.B LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES
+Used to suppress warning messages when the configured locking is known
+to be unavailable.
+.TP
+.B DM_ABORT_ON_INTERNAL_ERRORS
+Abort processing if the code detects a non-fatal internal error.
+.TP
+.B DM_DISABLE_UDEV
+Avoid interaction with udev. LVM will manage the relevant nodes in /dev
+directly.
+.TP
+.B DM_DEBUG_WITH_LINE_NUMBERS
+Prepends source file name and code line number with libdm debugging.
+.
+.SH FILES
+.
+.I #DEFAULT_SYS_DIR#/lvm.conf
+.br
+.I $HOME/.lvm_history
+.
+.SH SEE ALSO
+.
+.nh
+.ad l
+.BR lvm (8),
+.BR lvm.conf (5),
+.BR lvmconfig (8),
+.BR lvmdevices (8),
+.P
+.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),
+.P
+.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 vgimportdevices (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),
+.P
+.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),
+.P
+.BR lvm-fullreport (8),
+.BR lvm-lvpoll (8),
+.BR blkdeactivate (8),
+.BR lvmdump (8),
+.P
+.BR dmeventd (8),
+.BR lvmpolld (8),
+.BR lvmlockd (8),
+.BR lvmlockctl (8),
+.BR cmirrord (8),
+.BR lvmdbusd (8),
+.BR fsadm (8),
+.P
+.BR lvmsystemid (7),
+.BR lvmreport (7),
+.BR lvmcache (7),
+.BR lvmraid (7),
+.BR lvmthin (7),
+.BR lvmvdo (7),
+.BR lvmautoactivation (7),
+.P
+.BR dmsetup (8),
+.BR dmstats (8),
+.BR #DEFAULT_LIBLINE# (3)
diff --git a/man/lvm.conf.5.in b/man/lvm.conf.5.in
deleted file mode 100644
index 79044fc..0000000
--- a/man/lvm.conf.5.in
+++ /dev/null
@@ -1,548 +0,0 @@
-.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvm.conf \- Configuration file for LVM2
-.SH SYNOPSIS
-.B #DEFAULT_SYS_DIR#/lvm.conf
-.SH DESCRIPTION
-lvm.conf is loaded during the initialisation phase of
-\fBlvm\fP(8). This file can in turn lead to other files
-being loaded - settings read in later override earlier
-settings. File timestamps are checked between commands and if
-any have changed, all the files are reloaded.
-.LP
-Use \fBlvm dumpconfig\fP to check what settings are in use.
-.SH SYNTAX
-.LP
-This section describes the configuration file syntax.
-.LP
-Whitespace is not significant unless it is within quotes.
-This provides a wide choice of acceptable indentation styles.
-Comments begin with # and continue to the end of the line.
-They are treated as whitespace.
-.LP
-Here is an informal grammar:
-.TP
-.BR file " = " value *
-.br
-A configuration file consists of a set of values.
-.TP
-.BR value " = " section " | " assignment
-.br
-A value can either be a new section, or an assignment.
-.TP
-.BR section " = " identifier " '" { "' " value "* '" } '
-.br
-A section is groups associated values together.
-.br
-It is denoted by a name and delimited by curly brackets.
-.br
-e.g. backup {
-.br
- ...
-.br
- }
-.TP
-.BR assignment " = " identifier " '" = "' ( " array " | " type " )"
-.br
-An assignment associates a type with an identifier.
-.br
-e.g. max_archives = 42
-.br
-.TP
-.BR array " = '" [ "' ( " type " '" , "')* " type " '" ] "' | '" [ "' '" ] '
-.br
-Inhomogeneous arrays are supported.
-.br
-Elements must be separated by commas.
-.br
-An empty array is acceptable.
-.TP
-.BR type " = " integer " | " float " | " string
-.BR integer " = [0-9]*"
-.br
-.BR float " = [0-9]*'" . '[0-9]*
-.br
-.B string \fR= '\fB"\fR'.*'\fB"\fR'
-.IP
-Strings must be enclosed in double quotes.
-
-.SH SECTIONS
-.LP
-The sections that may be present in the file are:
-.TP
-\fBdevices\fP \(em Device settings
-.IP
-\fBdir\fP \(em Directory in which to create volume group device nodes.
-Defaults to "/dev". Commands also accept this as a prefix on volume
-group names.
-.IP
-\fBscan\fP \(em List of directories to scan recursively for
-LVM physical volumes.
-Devices in directories outside this hierarchy will be ignored.
-Defaults to "/dev".
-.IP
-\fBpreferred_names\fP \(em List of patterns compared in turn against
-all the pathnames referencing the same device in in the scanned directories.
-The pathname that matches the earliest pattern in the list is the
-one used in any output. As an example, if device-mapper multipathing
-is used, the following will select multipath device names:
-.br
-\fBdevices { preferred_names = [ "^/dev/mapper/mpath" ] }\fP
-.IP
-\fBfilter\fP \(em List of patterns to apply to devices found by a scan.
-Patterns are regular expressions delimited by any character and preceded
-by \fBa\fP (for accept) or \fBr\fP (for reject). The list is traversed
-in order, and the first regex that matches determines if the device
-will be accepted or rejected (ignored). Devices that don't match
-any patterns are accepted. If you want to reject patterns that
-don't match, end the list with "r/.*/".
-If there are several names for the same device (e.g. symbolic links
-in /dev), if the first matching pattern in the list for any of the names is an
-\fBa\fP pattern, the device is accepted; otherwise if the first matching
-pattern in the list for any of the names is an \fBr\fP pattern it is rejected;
-otherwise it is accepted. As an example, to ignore /dev/cdrom you could use:
-.br
-\fBdevices { filter=["r|cdrom|"] }\fP
-.IP
-\fBcache_dir\fP \(em Persistent filter cache file directory.
-Defaults to "#DEFAULT_CACHE_DIR#".
-.IP
-\fBwrite_cache_state\fP \(em Set to 0 to disable the writing out of the
-persistent filter cache file when \fBlvm\fP exits.
-Defaults to 1.
-.IP
-\fBtypes\fP \(em List of pairs of additional acceptable block device types
-found in /proc/devices together with maximum (non-zero) number of
-partitions (normally 16). By default, LVM2 supports ide, sd, md, loop,
-dasd, dac960, nbd, ida, cciss, ubd, ataraid, drbd, power2, i2o_block
-and iseries/vd. Block devices with major
-numbers of different types are ignored by LVM2.
-Example: \fBtypes = ["fd", 16]\fP.
-To create physical volumes on device-mapper volumes
-created outside LVM2, perhaps encrypted ones from \fBcryptsetup\fP,
-you'll need \fBtypes = ["device-mapper", 16]\fP. But if you do this,
-be careful to avoid recursion within LVM2. The figure for number
-of partitions is not currently used in LVM2 - and might never be.
-.IP
-\fBsysfs_scan\fP \(em If set to 1 and your kernel supports sysfs and
-it is mounted, sysfs will be used as a quick way of filtering out
-block devices that are not present.
-.IP
-\fBmd_component_detection\fP \(em If set to 1, LVM2 will ignore devices
-used as components of software RAID (md) devices by looking for md
-superblocks. This doesn't always work satisfactorily e.g. if a device
-has been reused without wiping the md superblocks first.
-.IP
-\fBmd_chunk_alignment\fP \(em If set to 1, and a Physical Volume is placed
-directly upon an md device, LVM2 will align its data blocks with the
-md device's stripe-width.
-.IP
-\fBdata_alignment_detection\fP \(em If set to 1, and your kernel provides
-topology information in sysfs for the Physical Volume, the start of data
-area will be aligned on a multiple of the ’minimum_io_size’ or
-’optimal_io_size’ exposed in sysfs. minimum_io_size is the smallest
-request the device can perform without incurring a read-modify-write
-penalty (e.g. MD's chunk size). optimal_io_size is the device's
-preferred unit of receiving I/O (e.g. MD's stripe width). minimum_io_size
-is used if optimal_io_size is undefined (0). If both \fBmd_chunk_alignment\fP
-and \fBdata_alignment_detection\fP are enabled the result of
-\fBdata_alignment_detection\fP is used.
-.IP
-\fBdata_alignment\fP \(em Default alignment (in KB) of start of data area
-when creating a new Physical Volume using the \fBlvm2\fP format.
-If a Physical Volume is placed directly upon an md device and
-\fBmd_chunk_alignment\fP or \fBdata_alignment_detection\fP is enabled
-this parameter is ignored. Set to 0 to use the default alignment of
-64KB or the page size, if larger.
-.IP
-\fBdata_alignment_offset_detection\fP \(em If set to 1, and your kernel
-provides topology information in sysfs for the Physical Volume, the
-start of the aligned data area of the Physical Volume will be shifted
-by the alignment_offset exposed in sysfs.
-.sp
-To see the location of the first Physical Extent of an existing Physical Volume
-use \fBpvs -o +pe_start\fP . It will be a multiple of the requested
-\fBdata_alignment\fP plus the alignment_offset from
-\fBdata_alignment_offset_detection\fP (if enabled) or the pvcreate
-commandline.
-.IP
-\fBdisable_after_error_count\fP \(em During each LVM operation errors received
-from each device are counted. If the counter of a particular device exceeds
-the limit set here, no further I/O is sent to that device for the remainder of
-the respective operation. Setting the parameter to 0 disables the counters
-altogether.
-.IP
-\fBpv_min_size\fP \(em
-Minimal size (in KB) of the block device which can be used as a PV.
-In clustered environment all nodes have to use the same value.
-Any value smaller than 512KB is ignored. Up to and include version 2.02.84
-the default was 512KB. From 2.02.85 onwards it was changed to 2MB to
-avoid floppy drives by default.
-.IP
-\fBissue_discards\fP \(em
-Issue discards to a logical volumes's underlying physical volume(s) when the
-logical volume is no longer using the physical volumes' space (e.g. lvremove,
-lvreduce, etc). Discards inform the storage that a region is no longer in use.
-Storage that supports discards advertise the protocol specific way discards
-should be issued by the kernel (TRIM, UNMAP, or WRITE SAME with UNMAP bit set).
-Not all storage will support or benefit from discards but SSDs and thinly
-provisioned LUNs generally do. If set to 1, discards will only be issued if
-both the storage and kernel provide support.
-.IP
-.TP
-\fBallocation\fP \(em Space allocation policies
-.IP
-\fBcling_tag_list\fP \(em List of PV tags matched by the \fBcling\fP allocation policy.
-.IP
-When searching for free space to extend an LV, the \fBcling\fP
-allocation policy will choose space on the same PVs as the last
-segment of the existing LV. If there is insufficient space and a
-list of tags is defined here, it will check whether any of them are
-attached to the PVs concerned and then seek to match those PV tags
-between existing extents and new extents.
-.IP
-The @ prefix for tags is required.
-Use the special tag "@*" as a wildcard to match any PV tag and so use
-all PV tags for this purpose.
-.IP
-For example, LVs are mirrored between two sites within a single VG.
-PVs are tagged with either @site1 or @site2 to indicate where
-they are situated and these two PV tags are selected for use with this
-allocation policy:
-.IP
-cling_tag_list = [ "@site1", "@site2" ]
-.TP
-\fBlog\fP \(em Default log settings
-.IP
-\fBfile\fP \(em Location of log file. If this entry is not present, no
-log file is written.
-.IP
-\fBoverwrite\fP \(em Set to 1 to overwrite the log file each time a tool
-is invoked. By default tools append messages to the log file.
-.IP
-\fBlevel\fP \(em Log level (0-9) of messages to write to the file.
-9 is the most verbose; 0 should produce no output.
-.IP
-\fBverbose\fP \(em Default level (0-3) of messages sent to stdout or stderr.
-3 is the most verbose; 0 should produce the least output.
-.IP
-\fBsilent\fP \(em Set to 1 to suppress all non-essential tool output.
-When set, display and reporting tools will still write the requested
-device properties to standard output, but messages confirming that
-something was or wasn't changed will be reduced to the 'verbose' level
-and not appear unless -v is supplied.
-.IP
-\fBsyslog\fP \(em Set to 1 (the default) to send log messages through syslog.
-Turn off by setting to 0. If you set to an integer greater than one,
-this is used - unvalidated - as the facility. The default is LOG_USER.
-See /usr/include/sys/syslog.h for safe facility values to use.
-For example, LOG_LOCAL0 might be 128.
-.IP
-\fBindent\fP \(em When set to 1 (the default) messages are indented
-according to their severity, two spaces per level.
-Set to 0 to turn off indentation.
-.IP
-\fBcommand_names\fP \(em When set to 1, the command name is used as a
-prefix for each message.
-Default is 0 (off).
-.IP
-\fBprefix\fP \(em Prefix used for all messages (after the command name).
-Default is two spaces.
-.IP
-\fBactivation\fP \(em Set to 1 to log messages while
-devices are suspended during activation.
-Only set this temporarily while debugging a problem because
-in low memory situations this setting can cause your machine to lock up.
-.TP
-\fBbackup\fP \(em Configuration for metadata backups.
-.IP
-\fBarchive_dir\fP \(em Directory used for automatic metadata archives.
-Backup copies of former metadata for each volume group are archived here.
-Defaults to "#DEFAULT_ARCHIVE_DIR#".
-.IP
-\fBbackup_dir\fP \(em Directory used for automatic metadata backups.
-A single backup copy of the current metadata for each volume group
-is stored here.
-Defaults to "#DEFAULT_BACKUP_DIR#".
-.IP
-\fBarchive\fP \(em Whether or not tools automatically archive existing
-metadata into \fBarchive_dir\fP before making changes to it.
-Default is 1 (automatic archives enabled).
-Set to 0 to disable.
-Disabling this might make metadata recovery difficult or impossible
-if something goes wrong.
-.IP
-\fBbackup\fP \(em Whether or not tools make an automatic backup
-into \fBbackup_dir\fP after changing metadata.
-Default is 1 (automatic backups enabled). Set to 0 to disable.
-Disabling this might make metadata recovery difficult or impossible
-if something goes wrong.
-.IP
-\fBretain_min\fP \(em Minimum number of archives to keep.
-Defaults to 10.
-.IP
-\fBretain_days\fP \(em Minimum number of days to keep archive files.
-Defaults to 30.
-.TP
-\fBshell\fP \(em LVM2 built-in readline shell settings
-.IP
-\fBhistory_size\fP \(em Maximum number of lines of shell history to retain (default 100) in $HOME/.lvm_history
-.TP
-\fBglobal\fP \(em Global settings
-.IP
-\fBtest\fP \(em If set to 1, run tools in test mode i.e. no changes to
-the on-disk metadata will get made. It's equivalent to having the
--t option on every command.
-.IP
-\fBactivation\fP \(em Set to 0 to turn off all communication with
-the device-mapper driver. Useful if you want to manipulate logical
-volumes while device-mapper is not present in your kernel.
-.IP
-\fBproc\fP \(em Mount point of proc filesystem.
-Defaults to /proc.
-.IP
-\fBumask\fP \(em File creation mask for any files and directories created.
-Interpreted as octal if the first digit is zero.
-Defaults to 077.
-Use 022 to allow other users to read the files by default.
-.IP
-\fBformat\fP \(em The default value of \fB--metadatatype\fP used
-to determine which format of metadata to use when creating new
-physical volumes and volume groups. \fBlvm1\fP or \fBlvm2\fP.
-.IP
-\fBfallback_to_lvm1\fP \(em Set this to 1 if you need to
-be able to switch between 2.4 kernels using LVM1 and kernels
-including device-mapper.
-The LVM2 tools should be installed as normal and
-the LVM1 tools should be installed with a .lvm1 suffix e.g.
-vgscan.lvm1.
-If an LVM2 tool is then run but unable to communicate
-with device-mapper, it will automatically invoke the equivalent LVM1
-version of the tool. Note that for LVM1 tools to
-manipulate physical volumes and volume groups created by LVM2 you
-must use \fB--metadataformat lvm1\fP when creating them.
-.IP
-\fBlibrary_dir\fP \(em A directory searched for LVM2's shared libraries
-ahead of the places \fBdlopen\fP (3) searches.
-.IP
-\fBformat_libraries\fP \(em A list of shared libraries to load that contain
-code to process different formats of metadata. For example, liblvm2formatpool.so
-is needed to read GFS pool metadata if LVM2 was configured \fB--with-pool=shared\fP.
-.IP
-\fBlocking_type\fP \(em What type of locking to use.
-1 is the default, which use flocks on files in \fBlocking_dir\fP
-(see below) to
-avoid conflicting LVM2 commands running concurrently on a single
-machine. 0 disables locking and risks corrupting your metadata.
-If set to 2, the tools will load the external \fBlocking_library\fP
-(see below).
-If the tools were configured \fB--with-cluster=internal\fP
-(the default) then 3 means to use built-in cluster-wide locking.
-Type 4 enforces read-only metadata and forbids any operations that
-might want to modify Volume Group metadata.
-All changes to logical volumes and their states are communicated
-using locks.
-.IP
-\fBwait_for_locks\fP \(em When set to 1, the default, the tools
-wait if a lock request cannot be satisfied immediately.
-When set to 0, the operation is aborted instead.
-.IP
-\fBlocking_dir\fP \(em The directory LVM2 places its file locks
-if \fBlocking_type\fP is set to 1. The default is \fB/var/lock/lvm\fP.
-.IP
-\fBlocking_library\fP \(em The name of the external locking
-library to load if \fBlocking_type\fP is set to 2.
-The default is \fBliblvm2clusterlock.so\fP. If you need to write
-such a library, look at the lib/locking source code directory.
-.TP
-\fBtags\fP \(em Host tag settings
-.IP
-\fBhosttags\fP \(em If set to 1, create a host tag with the machine name.
-Setting this to 0 does nothing, neither creating nor destroying any tag.
-The machine name used is the nodename as returned by \fBuname\fP (2).
-.IP
-Additional host tags to be set can be listed here as subsections.
-The @ prefix for tags is optional.
-Each of these host tag subsections can contain a \fBhost_list\fP
-array of host names. If any one of these entries matches the machine
-name exactly then the host tag gets defined on this particular host,
-otherwise it doesn't.
-.IP
-After lvm.conf has been processed, LVM2 works through each host
-tag that has been defined in turn, and if there is a configuration
-file called lvm_\fB<host_tag>\fP.conf it attempts to load it.
-Any settings read in override settings found in earlier files.
-Any additional host tags defined get appended to the search list,
-so in turn they can lead to further configuration files being processed.
-Use \fBlvm dumpconfig\fP to check the result of config
-file processing.
-.IP
-The following example always sets host tags \fBtag1\fP and
-sets \fBtag2\fP on machines fs1 and fs2:
-.IP
-tags { tag1 { } tag2 { host_list = [ "fs1", "fs2" ] } }
-.IP
-These options are useful if you are replicating configuration files
-around a cluster. Use of \fBhosttags = 1\fP means every machine
-can have static and identical local configuration files yet use
-different settings and activate different logical volumes by
-default. See also \fBvolume_list\fP below and \fB--addtag\fP
-in \fBlvm\fP (8).
-.TP
-\fBactivation\fP \(em Settings affecting device-mapper activation
-.IP
-\fBmissing_stripe_filler\fP \(em When activating an incomplete logical
-volume in partial mode, this option dictates how the missing data is
-replaced. A value of "error" will cause activation to create error
-mappings for the missing data, meaning that read access to missing
-portions of the volume will result in I/O errors. You can instead also
-use a device path, and in that case this device will be used in place of
-missing stripes. However, note that using anything other than
-"error" with mirrored or snapshotted volumes is likely to result in data
-corruption. For instructions on how to create a device that always
-returns zeros, see \fBlvcreate\fP (8).
-.IP
-\fBmirror_region_size\fP \(em Unit size in KB for copy operations
-when mirroring.
-.IP
-\fBreadahead\fP \(em Used when there is no readahead value stored
-in the volume group metadata. Set to \fBnone\fP to disable
-readahead in these circumstances or \fBauto\fP to use the default
-value chosen by the kernel.
-.IP
-\fBreserved_memory\fP, \fBreserved_stack\fP \(em How many KB to reserve
-for LVM2 to use while logical volumes are suspended. If insufficient
-memory is reserved before suspension, there is a risk of machine deadlock.
-.IP
-\fBprocess_priority\fP \(em The nice value to use while devices are
-suspended. This is set to a high priority so that logical volumes
-are suspended (with I/O generated by other processes to those
-logical volumes getting queued) for the shortest possible time.
-.IP
-\fBvolume_list\fP \(em This acts as a filter through which
-all requests to activate a logical volume on this machine
-are passed. A logical volume is only activated if it matches
-an item in the list. Tags must be preceded by @ and are checked
-against all tags defined in the logical volume and volume group
-metadata for a match.
-@* is short-hand to check every tag set on the host machine (see
-\fBtags\fP above).
-Logical volume and volume groups can also be included in the list
-by name e.g. vg00, vg00/lvol1.
-.IP
-\fBauto_activation_volume_list\fP \(em This acts as a filter through
-which all requests to autoactivate a logical volume on this machine
-are passed. A logical volume is autoactivated if it matches
-an item in the list. Volumes must also pass the \fBvolume_list\fP
-filter, if present. Tags must be preceded by @ and are checked against
-all tags defined in the logical volume and volume group metadata for
-a match. @* is short-hand to check every tag set on the host machine
-(see \fBtags\fP above).
-Logical volume and volume groups can also be included in the list
-by name e.g. vg00, vg00/lvol1.
-.IP
-\fBread_only_volume_list\fP \(em This acts as a filter through
-which all requests to activate a logical volume on this machine
-are passed. A logical volume is activated in read-only mode (instead
-of read-write) if it matches an item in the list. Volumes must first
-pass the \fBvolume_list\fP filter, if present. Tags must be preceded
-by @ and are checked against all tags defined in the logical volume
-and volume group metadata for a match.
-@* is short-hand to check every tag set on the host machine (see
-\fBtags\fP above).
-Logical volume and volume groups can also be included in the list
-by name e.g. vg00, vg00/lvol1.
-.TP
-\fBmetadata\fP \(em Advanced metadata settings
-.IP
-\fBpvmetadatacopies\fP \(em When creating a physical volume using the
-LVM2 metadata format, this is the default number of copies of metadata
-to store on each physical volume.
-Currently it can be set to 0, 1 or 2. The default is 1.
-If set to 2, one copy is placed at the beginning of the disk
-and the other is placed at the end.
-It can be overridden on the command line with \fB--pvmetadatacopies\fP
-(see \fBpvcreate\fP).
-If creating a volume group with just one physical volume, it's a
-good idea to have 2 copies. If creating a large volume group with
-many physical volumes, you may decide that 3 copies of the metadata
-is sufficient, i.e. setting it to 1 on three of the physical volumes,
-and 0 on the rest. Every volume group must contain at least one
-physical volume with at least 1 copy of the metadata (unless using
-the text files described below). The disadvantage of having lots
-of copies is that every time the tools access the volume group, every
-copy of the metadata has to be accessed, and this slows down the
-tools.
-.IP
-\fBpvmetadatasize\fP \(em Approximate number of sectors to set aside
-for each copy of the metadata. Volume groups with large numbers of
-physical or logical volumes, or volumes groups containing complex
-logical volume structures will need additional space for their metadata.
-The metadata areas are treated as circular buffers, so
-unused space becomes filled with an archive of the most recent
-previous versions of the metadata.
-.IP
-\fBpvmetadataignore\fP When creating a physical volume using the LVM2
-metadata format, this states whether metadata areas should be ignored.
-The default is "n". If metadata areas on a physical volume are ignored,
-LVM will not not store metadata in the metadata areas present on newly
-created Physical Volumes. The option can be overridden on the command
-line with \fB--metadataignore\fP (See \fBpvcreate\fP and \fBpvchange\fP).
-Metadata areas cannot be created or extended after Logical Volumes have
-been allocated on the device.
-If you do not want to store metadata on this device, it is still wise
-always to allocate a metadata area (use a non-zero value for
-\fB--pvmetadatacopies\fP) in case you need it in the future and to use
-this option to instruct LVM2 to ignore it.
-.IP
-\fBvgmetadatacopies\fP \(em When creating a volume group using the
-LVM2 metadata format, this is the default number of copies of metadata
-desired across all the physical volumes in the volume group. If set to
-a non-zero value, LVM will automatically set or clear the metadataignore
-flag on the physical volumes (see \fBpvcreate\fP and \fBpvchange\fP
-\fB--metadataignore\fP) in order to achieve the desired number of metadata
-copies. An LVM command that adds or removes physical volumes (for example,
-\fBvgextend\fP, \fBvgreduce\fP, \fBvgsplit\fP, or \fBvgmerge\fP), may cause
-LVM to automatically set or clear the metadataignore flags. Also, if
-physical volumes go missing or reappear, or a new number of copies is
-explicitly set (see \fBvgchange --vgmetadatacopies\fP), LVM may adjust
-the metadataignore flags.
-Set \fBvgmetadatacopies\fP to 0 instructs LVM not to set or clear the
-metadataignore flags automatically. You may set a value larger than the
-sum of all metadata areas on all physical volumes. The value can
-be overridden on the command line with \fB--vgmetadatacopies\fP for various
-commands (for example, \fBvgcreate\fP and \fBvgchange\fP), and can be
-queryied with the \fBvg_mda_copies\fP field of \fBvgs\fP. This option
-is useful for volume groups containing large numbers of physical volumes
-with metadata as it may be used to minimize metadata read and write overhead.
-.IP
-\fBdirs\fP \(em List of directories holding live copies of LVM2
-metadata as text files. These directories must not be on logical
-volumes. It is possible to use LVM2 with a couple of directories
-here, preferably on different (non-logical-volume) filesystems
-and with no other on-disk metadata, \fBpvmetadatacopies = 0\fP.
-Alternatively these directories can be in addition to the
-on-disk metadata areas. This feature was created during the
-development of the LVM2 metadata before the new on-disk metadata
-areas were designed and no longer gets tested.
-It is not supported under low-memory conditions, and it is
-important never to edit these metadata files unless you fully
-understand how things work: to make changes you should always use
-the tools as normal, or else vgcfgbackup, edit backup, vgcfgrestore.
-.SH FILES
-.I #DEFAULT_SYS_DIR#/lvm.conf
-.br
-.I #DEFAULT_ARCHIVE_DIR#
-.br
-.I #DEFAULT_BACKUP_DIR#
-.br
-.I #DEFAULT_CACHE_DIR#/.cache
-.br
-.I #DEFAULT_LOCK_DIR#
-.SH SEE ALSO
-.BR lvm (8),
-.BR umask (2),
-.BR uname (2),
-.BR dlopen (3),
-.BR syslog (3),
-.BR syslog.conf (5)
diff --git a/man/lvm.conf.5_main b/man/lvm.conf.5_main
new file mode 100644
index 0000000..4289a94
--- /dev/null
+++ b/man/lvm.conf.5_main
@@ -0,0 +1,224 @@
+.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvm.conf \(em Configuration file for LVM2
+.
+.SH SYNOPSIS
+.
+.I #DEFAULT_SYS_DIR#/lvm.conf
+.
+.SH DESCRIPTION
+.
+\fBlvm.conf\fP is loaded during the initialisation phase of
+\fBlvm\fP(8). This file can in turn lead to other files
+being loaded - settings read in later override earlier
+settings. File timestamps are checked between commands and if
+any have changed, all the files are reloaded.
+.P
+For a description of each \fBlvm.conf\fP(5) setting, run:
+.P
+.B lvmconfig --typeconfig default --withcomments --withspaces
+.P
+The settings defined in lvm.conf can be overridden by any
+of these extended configuration methods:
+.
+.TP
+.B direct config override on command line
+The \fB--config ConfigurationString\fP command line option takes 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.
+.
+.TP
+.B profile config
+.br
+A profile is a set of selected customizable configuration settings
+that are aimed to achieve a certain characteristics in various
+environments or uses. It's used to override existing configuration.
+Normally, the name of the profile should reflect that environment or use.
+.P
+There are two groups of profiles recognised: \fBcommand profiles\fP and
+\fBmetadata profiles\fP.
+.P
+The \fBcommand profile\fP is used to override selected configuration
+settings at global LVM command level - it is applied at the very beginning
+of LVM command execution and it is used throughout the whole time of LVM
+command execution. The command profile is applied by using the
+\fB--commandprofile ProfileName\fP command line option that is recognised by
+all LVM2 commands.
+.P
+The \fBmetadata profile\fP is used to override selected configuration
+settings at Volume Group/Logical Volume level - it is applied independently
+for each Volume Group/Logical Volume that is being processed. As such,
+each Volume Group/Logical Volume can store the profile name used
+in its metadata so next time the Volume Group/Logical Volume is
+processed, the profile is applied automatically. If Volume Group and
+any of its Logical Volumes have different profiles defined, the profile
+defined for the Logical Volume is preferred. The metadata profile can be
+attached/detached by using the \fBlvchange\fP and \fBvgchange\fP commands
+and their \fB--metadataprofile ProfileName\fP and
+\fB--detachprofile\fP options or the \fB--metadataprofile\fP
+option during creation when using \fBvgcreate\fP or \fBlvcreate\fP command.
+The \fBvgs\fP and \fBlvs\fP reporting commands provide \fB-o vg_profile\fP
+and \fB-o lv_profile\fP output options to show the metadata profile
+currently attached to a Volume Group or a Logical Volume.
+.P
+The set of options allowed for command profiles is mutually exclusive
+when compared to the set of options allowed for metadata profiles. The
+settings that belong to either of these two sets can't be mixed together
+and LVM tools will reject such profiles.
+.P
+LVM itself provides a few predefined configuration profiles.
+Users are allowed to add more profiles with different values if needed.
+For this purpose, there's the \fBcommand_profile_template.profile\fP
+(for command profiles) and \fBmetadata_profile_template.profile\fP
+(for metadata profiles) which contain all settings that are customizable
+by profiles of certain type. Users are encouraged to copy these template
+profiles and edit them as needed. Alternatively, the
+\fBlvmconfig --file <ProfileName.profile> --type profilable-command <section>\fP
+or \fBlvmconfig --file <ProfileName.profile> --type profilable-metadata <section>\fP
+can be used to generate a configuration with profilable settings in either
+of the type for given section and save it to new ProfileName.profile
+(if the section is not specified, all profilable settings are reported).
+.P
+The profiles are stored in \fI#DEFAULT_PROFILE_DIR#\fP directory by default.
+This location can be changed by using the \fBconfig/profile_dir\fP setting.
+Each profile configuration is stored in \fBProfileName.profile\fP file
+in the profile directory. When referencing the profile, the \fB.profile\fP
+suffix is left out.
+.
+.TP
+.B tag config
+.br
+See \fBtags\fP configuration setting description below.
+.P
+When several configuration methods are used at the same time
+and when LVM looks for the value of a particular setting, it traverses
+this \fBconfig cascade\fP from left to right:
+.P
+\fBdirect config override on command line\fP \[->]
+\fBcommand profile config\fP \[->]
+\fBmetadata profile config\fP \[->]
+\fBtag config\fP \[->]
+\fBlvmlocal.conf\fP \[->]
+\fBlvm.conf\fP
+.P
+No part of this cascade is compulsory. If there's no setting value found at
+the end of the cascade, a default value is used for that setting.
+Use \fBlvmconfig\fP to check what settings are in use and what
+the default values are.
+.
+.SH SYNTAX
+.
+This section describes the configuration file syntax.
+.LP
+Whitespace is not significant unless it is within quotes.
+This provides a wide choice of acceptable indentation styles.
+Comments begin with # and continue to the end of the line.
+They are treated as whitespace.
+.LP
+Here is an informal grammar:
+.TP
+.BR file " = " value *
+A configuration file consists of a set of values.
+.TP
+.BR value " = " section " | " assignment
+A value can either be a new section, or an assignment.
+.TP
+.BR section " = " identifier " '" { "' " value "* '" } '
+A section groups associated values together. If the same section is
+encountered multiple times, the contents of all instances are concatenated
+together in the order of appearance.
+.br
+It is denoted by a name and delimited by curly brackets.
+.br
+e.g. backup {
+.br
+ ...
+.br
+ }
+.TP
+.BR assignment " = " identifier " '" = "' ( " array " | " type " )"
+.br
+An assignment associates a type with an identifier. If the identifier contains
+forward slashes, those are interpreted as path delimiters. The statement
+\fBsection/key = value\fP is equivalent to \fBsection { key = value }\fP. If
+multiple instances of the same key are encountered, only the last value is used
+(and a warning is issued).
+.br
+e.g. \fBlevel = 7\fP
+.br
+.TP
+.BR array " = '" [ "' ( " type " '" , "')* " type " '" ] "' | '" [ "' '" ] '
+Inhomogeneous arrays are supported.
+.br
+Elements must be separated by commas.
+.br
+An empty array is acceptable.
+.TP
+.BR type " = " integer | float | string
+.BR integer " = [" 0 - 9 "]*"
+.br
+.BR float " = [" 0 - 9 "]*'" . "'[" 0 - 9 ]*
+.br
+.BR string " = '" \(dq "' .* '" \(dq '
+.IP
+Strings with spaces must be enclosed in double quotes, single words that start
+with a letter can be left unquoted.
+.
+.SH SETTINGS
+.
+The
+.B lvmconfig
+command prints the LVM configuration settings in various ways.
+See the man page
+.BR lvmconfig (8).
+.P
+Command to print a list of all possible config settings, with their
+default values:
+.br
+.B lvmconfig --type default
+.P
+Command to print a list of all possible config settings, with their
+default values, and a full description of each as a comment:
+.br
+.B lvmconfig --type default --withcomments
+.P
+Command to print a list of all possible config settings, with their
+current values (configured, non-default values are shown):
+.br
+.B lvmconfig --type current
+.P
+Command to print all config settings that have been configured with a
+different value than the default (configured, non-default values are
+shown):
+.br
+.B lvmconfig --type diff
+.P
+Command to print a single config setting, with its default value,
+and a full description, where "Section" refers to the config section,
+e.g. global, and "Setting" refers to the name of the specific setting,
+e.g. umask:
+.br
+.B lvmconfig --type default --withcomments Section/Setting
+.
+.SH FILES
+.I #DEFAULT_SYS_DIR#/lvm.conf
+.br
+.I #DEFAULT_SYS_DIR#/lvmlocal.conf
+.br
+.I #DEFAULT_ARCHIVE_DIR#
+.br
+.I #DEFAULT_BACKUP_DIR#
+.br
+.I #DEFAULT_CACHE_DIR#/.cache
+.br
+.I #DEFAULT_PROFILE_DIR#
+.br
+.I #DEFAULT_LOCK_DIR#
+.
+.SH SEE ALSO
+.
+.BR lvm (8),
+.BR lvmconfig (8)
diff --git a/man/lvm_import_vdo.8_main b/man/lvm_import_vdo.8_main
new file mode 100644
index 0000000..20be684
--- /dev/null
+++ b/man/lvm_import_vdo.8_main
@@ -0,0 +1,117 @@
+.TH "FSADM" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH "NAME"
+.
+lvm_import_vdo \(em utility to import VDO volumes into a new volume group.
+.
+.SH SYNOPSIS
+.
+.PD 0
+.ad l
+.TP 10
+.B lvm_import_vdo
+.RI [ options ]
+.IR device
+.
+.PD
+.
+.SH DESCRIPTION
+.
+lvm_import_vdo utility imports VDO volumes created and managed by
+.BR vdo (8)
+manager into
+.BR lvm2 (8)
+managed VDO LV. This is realized by moving VDO superblock by 2MiB
+and creating lvm2 metadata at the front of this device. The operation is not reversible,
+thus after conversion to lvm2 the access to VDO data is only possible with
+.BR lvm2 (8)
+commands,
+.BR vdo (8)
+manager no longer control such volume.
+.
+.SH OPTIONS
+.
+.TP
+.BR -f | --force
+Bypass some sanity checks.
+.
+.TP
+.BR -h | --help
+Display the help text.
+.
+.TP
+.BR -n | --name
+Specifies the name of converted VDO LV. When the name is not specified,
+some automatic name is selected. In case the converted VDO volume is
+already using LV a backend device, the name of this LV is used for VDO LV.
+In this case also the of volume group must stay same.
+Automatic name may change between releases and currently selects
+"vdolv" as LV name and VG name is selected from sequence
+"vdovg", "vdovg1", ...
+.
+.TP
+.BR -v | --verbose
+Be more verbose.
+.
+.TP
+.BR -y | --yes
+Answer "yes" at any prompts.
+.
+.TP
+.BR --dry-run
+Print verbosely commands without running them.
+.
+.TP
+.BR --no-snapshot
+With this option conversion tool will not use snapshot (COW storage) for conversion
+in your $TMPDIR filesystem and it will directly manipulate with VDO device in-place.
+Warning: the snapshot usage makes the whole conversion transactional and
+the snapshot can be just simply merged once the whole conversion
+has successfully proceeded. In the case of error the snapshot is just removed.
+Without the use of snapshot there is higher risk of problems with recoverability in
+case some unexpected error occurs.
+.
+.TP
+.BR --vdo-config
+Configuration file for VDO manager. Can be used to specify configuration for vdo manager.
+.
+.
+.SH DIAGNOSTICS
+.
+On successful completion, the status code is 0.
+A status code of 1 is used for failure.
+.
+.SH EXAMPLES
+.
+Convert VDO volume created by vdo manager into logical volume LV1 with within volume group VG1.
+.P
+#
+.B lvm_import_vdo --name VG1/LV1 /dev/mapper/vdo-volume
+.
+.SH ENVIRONMENT VARIABLES
+.
+.TP
+.B TMPDIR
+The temporary directory name for mount points. Defaults to "\fI/tmp\fP".
+.TP
+.B DM_DEV_DIR
+The device directory name.
+Defaults to "\fI/dev\fP" and must be an absolute path.
+.TP
+.B DM_UUID_PREFIX
+Specify uuid prefix for snapshot volume used during vdo conversion.
+.TP
+.B LVM_BINARY
+Allow to overide command called from lvm. Defaults to "\fIlvm\fP".
+.TP
+.B VDO_BINARY
+Allow to overide command called from vdo. Defaults to "\fIvdo\fP".
+.
+.SH SEE ALSO
+.
+.nh
+.ad l
+.BR lvm (8),
+.BR lvm.conf (5),
+.P
+.BR vdo (8),
diff --git a/man/lvmautoactivation.7_main b/man/lvmautoactivation.7_main
new file mode 100644
index 0000000..0f77345
--- /dev/null
+++ b/man/lvmautoactivation.7_main
@@ -0,0 +1,302 @@
+.TH "LVMAUTOACTIVATION" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH NAME
+.
+lvmautoactivation \(em LVM autoactivation
+.
+.SH DESCRIPTION
+.
+Autoactivation is the activation of LVs performed automatically by the
+system in response to LVM devices being attached to the machine. When all
+PVs in a VG have been attached, the VG is complete, and LVs in the VG are
+activated.
+.P
+Autoactivation of VGs, or specific LVs, can be prevented using vgchange or
+lvchange --setautoactivation n. The lvm.conf auto_activation_volume_list
+is another way to limit autoactivation.
+.
+.SS event autoactivation
+.P
+LVM autoactivation is "event based", in which complete VGs are activated
+in response to uevents which occur during system startup or at any time
+after the system has started. An old form of autoactivation was "static"
+in which complete VGs are activated at a fixed point during system startup
+by a systemd service, and not in response to events.
+.P
+Event based autoactivation is driven by udev, udev rules, and systemd.
+When a device is attached to a machine, a uevent is generated by the
+kernel to notify userspace of the new device. systemd-udev runs udev
+rules to process the new device. Udev rules use blkid to identify the
+device as an LVM PV and then execute the lvm-specific udev rule for the
+device, which triggers autoactivation.
+.P
+There are two variations of event based autoactivation that may be used on
+a system, depending on the LVM udev rule that is installed (found in
+/lib/udev/rules.d/.) The following summarizes the steps in each rule
+which lead to autoactivation:
+.P
+.B 69-dm-lvm-metad.rules
+.
+.IP \[bu] 2
+device /dev/name with major:minor X:Y is attached to the machine
+.
+.IP \[bu] 2
+systemd/udev runs blkid to identify /dev/name as an LVM PV
+.
+.IP \[bu] 2
+udev rule 69-dm-lvm-metad.rules is run for /dev/name
+.
+.IP \[bu] 2
+the lvm udev rule runs the systemd service lvm2-pvscan@X:Yservice
+.
+.IP \[bu] 2
+the lvm2-pvscan service runs:
+.br
+pvscan --cache -aay --major X --minor Y
+.
+.IP \[bu] 2
+pvscan reads the device, records that the PV is online
+(see pvs_online), and checks if the VG is complete.
+.
+.IP \[bu] 2
+if the VG is complete, pvscan creates the vgs_online temp file,
+and activates the VG.
+.
+.IP \[bu] 2
+the activation command output can be seen from
+systemctl status lvm2-pvscan*
+.P
+.B 69-dm-lvm.rules
+.
+.IP \[bu] 2
+device /dev/name with major:minor X:Y is attached to the machine
+.
+.IP \[bu] 2
+systemd/udev runs blkid to identify /dev/name as an LVM PV
+.
+.IP \[bu] 2
+udev rule 69-dm-lvm.rules is run for /dev/name
+.
+.IP \[bu] 2
+the lvm udev rule runs:
+.br
+pvscan --cache --listvg --checkcomplete --vgonline
+.br
+--autoactivation event --udevoutput --journal=output /dev/name
+.
+.IP \[bu] 2
+pvscan reads the device, records that the PV is online
+(see pvs_online), and checks if the VG is complete.
+.
+.IP \[bu] 2
+if the VG is complete, pvscan creates the vgs_online temp file,
+and prints the name of the VG for the udev rule to import:
+LVM_VG_NAME_COMPLETE='vgname'
+.
+.IP \[bu] 2
+if the lvm udev rule sees LVM_VG_NAME_COMPLETE from pvscan,
+it activates the VG using a transient systemd service named
+lvm-activate-<vgname>.
+.
+.IP \[bu] 2
+the lvm-activate-<vgname> service runs
+.br
+vgchange -aay --autoactivation event <vgname>
+.
+.IP \[bu] 2
+the activation command output can be seen from
+journalctl -u lvm-activate-<vgname>
+.P
+.
+.SS pvscan options
+.P
+.B --cache
+.br
+Read the <device> arg (and only that device), and record that
+the PV is online by creating the /run/lvm/pvs_online/<pvid>
+file containing the name of the VG and the device for the PV.
+.P
+.B -aay
+.br
+Activate the VG from the pvscan command
+(includes implicit --checkcomplete and --vgonline.)
+.P
+.B --checkcomplete
+.br
+Check if the VG is complete, i.e. all PVs are present on
+the system, by checking /run/lvm/pvs_online/<pvid> files.
+.P
+.B --vgonline
+.br
+Create /run/lvm/vgs_online/<vgname> if the VG is complete
+(used to ensure only one command performs activation.)
+.P
+.B --autoactivation event
+.br
+Inform the command it is used for event based autoactivation.
+.P
+.B --listvg
+.br
+Print the name of the VG using the device.
+.P
+.B --udevoutput
+.br
+Only print output that can be imported to the udev rule,
+using the udev environment key format, i.e. NAME='value'.
+.P
+.B --journal=output
+.br
+Send standard command output to the journal (when stdout
+is reserved for udev output.)
+.P
+.SS run files
+.P
+Autoactivation commands use a number of temp files in /run/lvm (with the
+expectation that /run is cleared between boots.)
+.P
+.B pvs_online
+.br
+pvscan --cache creates a file here for each PV that is attached. The file
+is named with the PVID and contains the VG name and device information.
+The existence of the file is used to determine when all PVs for a given VG
+are present. The device information in these files is also used to
+optimize locating devices for a VG when the VG is activated.
+.P
+.B pvs_lookup
+.br
+pvscan --cache creates a file here named for a VG (if one doesn't already
+exist.) The file contains a list of PVIDs in the VG. This is needed when
+a PV is processed which has no VG metadata, in which case the list of
+PVIDs from the lookup file is used to check if the VG is complete.
+.P
+.B vgs_online
+.br
+The first activation command (pvscan or vgchange) to create a file here,
+named for the VG, will activate the VG. This resolves a race when
+concurrent commands attempt to activate a VG at once.
+.
+.SS static autoactivation
+.P
+A static autoactivation method is no longer provided by lvm.
+Setting event_activation=0 still disables event based autoactivation.
+WARNING: disabling event activation without an alternative may prevent a
+system from booting. A custom systemd service could be written to run
+autoactivation during system startup, in which case disabling event
+autoactivation may be useful.
+.
+.SS lvm.conf filter
+.P
+Device symlinks from /dev/disk/ can be used in the lvm.conf filter to
+guard against changes in kernel device names. The /dev/disk/by-path/ or
+/dev/disk/by-id/ prefixes should be included in the filter names; these
+prefixes help lvm detect that symlink names are used. Filters containing
+symlinks require special matching by commands run in the lvm udev rule.
+.P
+Common symlinks, e.g. beginning with wwn-, scsi-, pci-, or lvm-pv-uuid-,
+are recommended. Uncommon or custom symlinks created by custom udev rules
+may be less reliable. If a custom udev rule creates symlinks used in the
+lvm filter, then the udev rule should be started prior to the lvm rule.
+.
+.SH EXAMPLES
+.P
+VG "vg" contains two PVs:
+.nf
+$ pvs -o name,vgname,uuid /dev/sdb /dev/sdc
+ PV VG PV UUID
+ /dev/sdb vg 1uKpaT-lFOZ-NLHX-j4jI-OBi1-QpdE-HZ5hZY
+ /dev/sdc vg 5J3tM8-aIPe-2vbd-DBe7-bvRq-TGj0-DaKV2G
+.fi
+.P
+use of --cache:
+.nf
+$ pvscan --cache /dev/sdb
+ pvscan[12922] PV /dev/sdb online.
+$ pvscan --cache /dev/sdc
+ pvscan[12923] PV /dev/sdc online.
+
+$ cat /run/lvm/pvs_online/1uKpaTlFOZNLHXj4jIOBi1QpdEHZ5hZY
+8:16
+vg:vg
+dev:/dev/sdb
+$ cat /run/lvm/pvs_online/5J3tM8aIPe2vbdDBe7bvRqTGj0DaKV2G
+8:32
+vg:vg
+dev:/dev/sdc
+.fi
+.P
+use of -aay:
+.nf
+$ pvscan --cache -aay /dev/sdb
+ pvscan[12935] PV /dev/sdb online, VG vg incomplete (need 1).
+$ pvscan --cache -aay /dev/sdc
+ pvscan[12936] PV /dev/sdc online, VG vg is complete.
+ pvscan[12936] VG vg run autoactivation.
+ 1 logical volume(s) in volume group "vg" now active
+
+$ cat /run/lvm/pvs_online/1uKpaTlFOZNLHXj4jIOBi1QpdEHZ5hZY
+8:16
+vg:vg
+dev:/dev/sdb
+$ cat /run/lvm/pvs_online/5J3tM8aIPe2vbdDBe7bvRqTGj0DaKV2G
+8:32
+vg:vg
+dev:/dev/sdc
+$ ls /run/lvm/vgs_online/vg
+/run/lvm/vgs_online/vg
+.fi
+.P
+use of --listvg:
+.nf
+$ pvscan --cache --listvg /dev/sdb
+ VG vg
+$ pvscan --cache --listvg /dev/sdc
+ VG vg
+
+$ cat /run/lvm/pvs_online/1uKpaTlFOZNLHXj4jIOBi1QpdEHZ5hZY
+8:16
+vg:vg
+dev:/dev/sdb
+$ cat /run/lvm/pvs_online/5J3tM8aIPe2vbdDBe7bvRqTGj0DaKV2G
+8:32
+vg:vg
+dev:/dev/sdc
+.fi
+.P
+use of --checkcomplete:
+.nf
+$ pvscan --cache --listvg --checkcomplete --vgonline /dev/sdb
+ pvscan[12996] PV /dev/sdb online, VG vg incomplete (need 1).
+ VG vg incomplete
+$ pvscan --cache --listvg --checkcomplete --vgonline /dev/sdc
+ pvscan[12997] PV /dev/sdc online, VG vg is complete.
+ VG vg complete
+.fi
+.P
+use of --udevoutput:
+.nf
+$ pvscan --cache --listvg --checkcomplete --vgonline --udevoutput /dev/sdb
+LVM_VG_NAME_INCOMPLETE='vg'
+$ pvscan --cache --listvg --checkcomplete --vgonline --udevoutput /dev/sdc
+LVM_VG_NAME_COMPLETE='vg'
+.fi
+.P
+use of --listlvs:
+.nf
+$ lvs -o name,devices vg
+ LV Devices
+ lvol0 /dev/sdb(0)
+ lvol1 /dev/sdc(0)
+ lvol2 /dev/sdb(1),/dev/sdc(1)
+
+$ pvscan --cache --listlvs --checkcomplete /dev/sdb
+ pvscan[13288] PV /dev/sdb online, VG vg incomplete (need 1).
+ VG vg incomplete
+ LV vg/lvol0 complete
+ LV vg/lvol2 incomplete
+$ pvscan --cache --listlvs --checkcomplete /dev/sdc
+ pvscan[13289] PV /dev/sdc online, VG vg is complete.
+ VG vg complete
+ LV vg/lvol1 complete
+ LV vg/lvol2 complete
+.fi
+
diff --git a/man/lvmcache.7_main b/man/lvmcache.7_main
new file mode 100644
index 0000000..3beb8de
--- /dev/null
+++ b/man/lvmcache.7_main
@@ -0,0 +1,701 @@
+.TH "LVMCACHE" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH NAME
+.
+lvmcache \(em LVM caching
+.
+.SH DESCRIPTION
+.
+\fBlvm\fP(8) includes two kinds of caching that can be used to improve the
+performance of a Logical Volume (LV). When caching, varying subsets of an
+LV's data are temporarily stored on a smaller, faster device (e.g. an SSD)
+to improve the performance of the LV.
+.P
+To do this with lvm, a new special LV is first created from the faster
+device. This LV will hold the cache. Then, the new fast LV is attached to
+the main LV by way of an lvconvert command. lvconvert inserts one of the
+device mapper caching targets into the main LV's i/o path. The device
+mapper target combines the main LV and fast LV into a hybrid device that looks
+like the main LV, but has better performance. While the main LV is being
+used, portions of its data will be temporarily and transparently stored on
+the special fast LV.
+.P
+The two kinds of caching are:
+.P
+.IP \[bu] 2
+A read and write hot-spot cache, using the dm-cache kernel module.
+This cache tracks access patterns and adjusts its content deliberately so
+that commonly used parts of the main LV are likely to be found on the fast
+storage. LVM refers to this using the LV type \fBcache\fP.
+.
+.IP \[bu]
+A write cache, using the dm-writecache kernel module. This cache can be
+used with SSD or PMEM devices to speed up all writes to the main LV. Data
+read from the main LV is not stored in the cache, only newly written data.
+LVM refers to this using the LV type \fBwritecache\fP.
+.
+.SH USAGE
+.
+.SS 1. Identify main LV that needs caching
+.
+The main LV may already exist, and is located on larger, slower devices.
+A main LV would be created with a command like:
+.P
+# lvcreate -n main -L Size vg /dev/slow_hhd
+.
+.SS 2. Identify fast LV to use as the cache
+.
+A fast LV is created using one or more fast devices, like an SSD. This
+special LV will be used to hold the cache:
+.P
+# lvcreate -n fast -L Size vg /dev/fast_ssd
+.P
+# lvs -a
+ LV Attr Type Devices
+ fast -wi------- linear /dev/fast_ssd
+ main -wi------- linear /dev/slow_hhd
+.fi
+.
+.SS 3. Start caching the main LV
+.
+To start caching the main LV, convert the main LV to the desired caching
+type, and specify the fast LV to use as the cache:
+.P
+using dm-cache (with cachepool):
+.P
+# lvconvert --type cache --cachepool fast vg/main
+.P
+using dm-cache (with cachevol):
+.P
+# lvconvert --type cache --cachevol fast vg/main
+.P
+using dm-writecache (with cachevol):
+.P
+# lvconvert --type writecache --cachevol fast vg/main
+.P
+For more alternatives see:
+.br
+dm-cache command shortcut
+.br
+dm-cache with separate data and metadata LVs
+.
+.SS 4. Display LVs
+.
+Once the fast LV has been attached to the main LV, lvm reports the main LV
+type as either \fBcache\fP or \fBwritecache\fP depending on the type used.
+While attached, the fast LV is hidden, and renamed with a _cvol or _cpool
+suffix. It is displayed by lvs -a. The _corig or _wcorig LV represents
+the original LV without the cache.
+.sp
+using dm-cache (with cachepool):
+.P
+# lvs -ao+devices
+.nf
+ LV Pool Type Devices
+ main [fast_cpool] cache main_corig(0)
+ [fast_cpool] cache-pool fast_pool_cdata(0)
+ [fast_cpool_cdata] linear /dev/fast_ssd
+ [fast_cpool_cmeta] linear /dev/fast_ssd
+ [main_corig] linear /dev/slow_hhd
+.fi
+.sp
+using dm-cache (with cachevol):
+.P
+# lvs -ao+devices
+.P
+.nf
+ LV Pool Type Devices
+ main [fast_cvol] cache main_corig(0)
+ [fast_cvol] linear /dev/fast_ssd
+ [main_corig] linear /dev/slow_hhd
+.fi
+.sp
+using dm-writecache (with cachevol):
+.P
+# lvs -ao+devices
+.P
+.nf
+ LV Pool Type Devices
+ main [fast_cvol] writecache main_wcorig(0)
+ [fast_cvol] linear /dev/fast_ssd
+ [main_wcorig] linear /dev/slow_hhd
+.fi
+.
+.SS 5. Use the main LV
+.
+Use the LV until the cache is no longer wanted, or needs to be changed.
+.
+.SS 6. Stop caching
+.
+To stop caching the main LV and also remove unneeded cache pool,
+use the --uncache:
+.P
+# lvconvert --uncache vg/main
+.P
+# lvs -a
+.nf
+ LV VG Attr Type Devices
+ main vg -wi------- linear /dev/slow_hhd
+.fi
+.P
+To stop caching the main LV, separate the fast LV from the main LV. This
+changes the type of the main LV back to what it was before the cache was
+attached.
+.P
+# lvconvert --splitcache vg/main
+.P
+# lvs -a
+.nf
+ LV VG Attr Type Devices
+ fast vg -wi------- linear /dev/fast_ssd
+ main vg -wi------- linear /dev/slow_hhd
+.fi
+.
+.SS 7. Create a new LV with caching
+.
+A new LV can be created with caching attached at the time of creation
+using the following command:
+.P
+.nf
+# lvcreate --type cache|writecache -n Name -L Size
+ --cachedevice /dev/fast_ssd vg /dev/slow_hhd
+.fi
+.P
+The main LV is created with the specified Name and Size from the slow_hhd.
+A hidden fast LV is created on the fast_ssd and is then attached to the
+new main LV. If the fast_ssd is unused, the entire disk will be used as
+the cache unless the --cachesize option is used to specify a size for the
+fast LV. The --cachedevice option can be repeated to use multiple disks
+for the fast LV.
+.
+.SH OPTIONS
+.
+.SS option args
+.
+.B --cachepool
+.IR CachePoolLV | LV
+.P
+Pass this option a cachepool LV or a standard LV. When using a cache
+pool, lvm places cache data and cache metadata on different LVs. The two
+LVs together are called a cache pool. This has a bit better performance
+for dm-cache and permits specific placement and segment type selection
+for data and metadata volumes.
+A cache pool is represented as a special type of LV
+that cannot be used directly. If a standard LV is passed with this
+option, lvm will first convert it to a cache pool by combining it with
+another LV to use for metadata. This option can be used with dm-cache.
+.P
+.B --cachevol
+.I LV
+.P
+Pass this option a fast LV that should be used to hold the cache. With a
+cachevol, cache data and metadata are stored in different parts of the
+same fast LV. This option can be used with dm-writecache or dm-cache.
+.P
+.B --cachedevice
+.I PV
+.P
+This option can be used in place of --cachevol, in which case a cachevol
+LV will be created using the specified device. This option can be
+repeated to create a cachevol using multiple devices, or a tag name can be
+specified in which case the cachevol will be created using any of the
+devices with the given tag. If a named cache device is unused, the entire
+device will be used to create the cachevol. To create a cachevol of a
+specific size from the cache devices, include the --cachesize option.
+.
+.SS dm-cache block size
+.
+A cache pool will have a logical block size of 4096 bytes if it is created
+on a device with a logical block size of 4096 bytes.
+.P
+If a main LV has logical block size 512 (with an existing xfs file system
+using that size), then it cannot use a cache pool with a 4096 logical
+block size. If the cache pool is attached, the main LV will likely fail
+to mount.
+.P
+To avoid this problem, use a mkfs option to specify a 4096 block size for
+the file system, or attach the cache pool before running mkfs.
+.
+.SS dm-writecache block size
+.
+The dm-writecache block size can be 4096 bytes (the default), or 512
+bytes. The default 4096 has better performance and should be used except
+when 512 is necessary for compatibility. The dm-writecache block size is
+specified with --cachesettings block_size=4096|512 when caching is started.
+.P
+When a file system like xfs already exists on the main LV prior to
+caching, and the file system is using a block size of 512, then the
+writecache block size should be set to 512. (The file system will likely
+fail to mount if writecache block size of 4096 is used in this case.)
+.P
+Check the xfs sector size while the fs is mounted:
+.P
+# xfs_info /dev/vg/main
+.nf
+Look for sectsz=512 or sectsz=4096
+.fi
+.P
+The writecache block size should be chosen to match the xfs sectsz value.
+.P
+It is also possible to specify a sector size of 4096 to mkfs.xfs when
+creating the file system. In this case the writecache block size of 4096
+can be used.
+.P
+The writecache block size is displayed by the command:
+.br
+lvs -o writecacheblocksize VG/LV
+.P
+.SS dm-writecache memory usage
+.P
+The amount of main system memory used by dm-writecache can be a factor
+when selecting the writecache cachevol size and the writecache block size.
+.P
+.IP \[bu] 2
+writecache block size 4096: each 100 GiB of writecache cachevol uses
+slightly over 2 GiB of system memory.
+.IP \[bu] 2
+writecache block size 512: each 100 GiB of writecache cachevol uses
+a little over 16 GiB of system memory.
+.
+.SS dm-writecache settings
+.
+To specify dm-writecache tunable settings on the command line, use:
+.br
+--cachesettings 'option=N' or
+.br
+--cachesettings 'option1=N option2=N ...'
+.P
+For example, --cachesettings 'high_watermark=90 writeback_jobs=4'.
+.P
+To include settings when caching is started, run:
+.P
+.nf
+# lvconvert --type writecache --cachevol fast \\
+ --cachesettings 'option=N' vg/main
+.fi
+.P
+To change settings for an existing writecache, run:
+.P
+.nf
+# lvchange --cachesettings 'option=N' vg/main
+.fi
+.P
+To clear all settings that have been applied, run:
+.P
+.nf
+# lvchange --cachesettings '' vg/main
+.fi
+.P
+To view the settings that are applied to a writecache LV, run:
+.P
+.nf
+# lvs -o cachesettings vg/main
+.fi
+.P
+Tunable settings are:
+.
+.TP
+high_watermark = <percent>
+Start writeback when the writecache usage reaches this percent (0-100).
+.
+.TP
+low_watermark = <percent>
+Stop writeback when the writecache usage reaches this percent (0-100).
+.
+.TP
+writeback_jobs = <count>
+Limit the number of blocks that are in flight during writeback. Setting
+this value reduces writeback throughput, but it may improve latency of
+read requests.
+.
+.TP
+autocommit_blocks = <count>
+When the application writes this amount of blocks without issuing the
+FLUSH request, the blocks are automatically committed.
+.
+.TP
+autocommit_time = <milliseconds>
+The data is automatically committed if this time passes and no FLUSH
+request is received.
+.
+.TP
+fua = 0|1
+Use the FUA flag when writing data from persistent memory back to the
+underlying device.
+Applicable only to persistent memory.
+.
+.TP
+nofua = 0|1
+Don't use the FUA flag when writing back data and send the FLUSH request
+afterwards. Some underlying devices perform better with fua, some with
+nofua. Testing is necessary to determine which.
+Applicable only to persistent memory.
+.
+.TP
+cleaner = 0|1
+Setting cleaner=1 enables the writecache cleaner mode in which data is
+gradually flushed from the cache. If this is done prior to detaching the
+writecache, then the splitcache command will have little or no flushing to
+perform. If not done beforehand, the splitcache command enables the
+cleaner mode and waits for flushing to complete before detaching the
+writecache. Adding cleaner=0 to the splitcache command will skip the
+cleaner mode, and any required flushing is performed in device suspend.
+.
+.TP
+max_age = <milliseconds>
+Specifies the maximum age of a block in milliseconds. If a block is stored in
+the cache for too long, it will be written to the underlying device and cleaned up.
+.
+.TP
+metadata_only = 0|1
+Only metadata is promoted to the cache. This option improves performance for
+heavier REQ_META workloads.
+.
+.TP
+pause_writeback = <milliseconds>
+Pause writeback if there was some write I/O redirected to the origin volume in
+the last number of milliseconds.
+
+.SS dm-writecache using metadata profiles
+.
+In addition to specifying writecache settings on the command line, they
+can also be set in lvm.conf, or in a profile file, using the
+allocation/cache_settings/writecache config structure shown below.
+.P
+It's possible to prepare a number of different profile files in the
+\fI#DEFAULT_SYS_DIR#/profile\fP directory and specify the file name
+of the profile when starting writecache.
+.P
+.I Example
+.nf
+# cat <<EOF > #DEFAULT_SYS_DIR#/profile/cache_writecache.profile
+allocation {
+.RS
+cache_settings {
+.RS
+writecache {
+.RS
+high_watermark=60
+writeback_jobs=1024
+.RE
+}
+.RE
+}
+.RE
+}
+EOF
+.P
+
+# lvcreate -an -L10G --name fast vg /dev/fast_ssd
+# lvcreate --type writecache -L10G --name main --cachevol fast \\
+ --metadataprofile cache_writecache vg /dev/slow_hdd
+.fi
+.
+.SS dm-cache with separate data and metadata LVs
+.
+Preferred way of using dm-cache is to place the cache metadata and cache data
+on separate LVs. To do this, a "cache pool" is created, which is a special
+LV that references two sub LVs, one for data and one for metadata.
+.P
+To create a cache pool of given data size and let lvm2 calculate appropriate
+metadata size:
+.P
+# lvcreate --type cache-pool -L DataSize -n fast vg /dev/fast_ssd1
+.P
+To create a cache pool from separate LV and let lvm2 calculate
+appropriate cache metadata size:
+.P
+# lvcreate -n fast -L DataSize vg /dev/fast_ssd1
+.br
+# lvconvert --type cache-pool vg/fast /dev/fast_ssd1
+.br
+.P
+To create a cache pool from two separate LVs:
+.P
+# lvcreate -n fast -L DataSize vg /dev/fast_ssd1
+.br
+# lvcreate -n fastmeta -L MetadataSize vg /dev/fast_ssd2
+.br
+# lvconvert --type cache-pool --poolmetadata fastmeta vg/fast
+.P
+Then use the cache pool LV to start caching the main LV:
+.P
+# lvconvert --type cache --cachepool fast vg/main
+.P
+A variation of the same procedure automatically creates a cache pool when
+caching is started. To do this, use a standard LV as the --cachepool
+(this will hold cache data), and use another standard LV as the
+--poolmetadata (this will hold cache metadata). LVM will create a
+cache pool LV from the two specified LVs, and use the cache pool to start
+caching the main LV.
+.P
+.nf
+# lvcreate -n fast -L DataSize vg /dev/fast_ssd1
+# lvcreate -n fastmeta -L MetadataSize vg /dev/fast_ssd2
+# lvconvert --type cache --cachepool fast \\
+ --poolmetadata fastmeta vg/main
+.fi
+.
+.SS dm-cache cache modes
+.
+The default dm-cache cache mode is "writethrough". Writethrough ensures
+that any data written will be stored both in the cache and on the origin
+LV. The loss of a device associated with the cache in this case would not
+mean the loss of any data.
+.P
+A second cache mode is "writeback". Writeback delays writing data blocks
+from the cache back to the origin LV. This mode will increase
+performance, but the loss of a cache device can result in lost data.
+.P
+With the --cachemode option, the cache mode can be set when caching is
+started, or changed on an LV that is already cached. The current cache
+mode can be displayed with the cache_mode reporting option:
+.P
+.B lvs -o+cache_mode VG/LV
+.P
+.BR lvm.conf (5)
+.B allocation/cache_mode
+.br
+defines the default cache mode.
+.P
+.nf
+# lvconvert --type cache --cachemode writethrough \\
+ --cachepool fast vg/main
+.P
+# lvconvert --type cache --cachemode writethrough \\
+ --cachevol fast vg/main
+.nf
+.
+.SS dm-cache chunk size
+.
+The size of data blocks managed by dm-cache can be specified with the
+--chunksize option when caching is started. The default unit is KiB. The
+value must be a multiple of 32 KiB between 32 KiB and 1 GiB. Cache chunks
+bigger then 512KiB shall be only used when necessary.
+.P
+Using a chunk size that is too large can result in wasteful use of the
+cache, in which small reads and writes cause large sections of an LV to be
+stored in the cache. It can also require increasing migration threshold
+which defaults to 2048 sectors (1 MiB). Lvm2 ensures migration threshold is
+at least 8 chunks in size. This may in some cases result in very
+high bandwidth load of transferring data between the cache LV and its
+cache origin LV. However, choosing a chunk size that is too small
+can result in more overhead trying to manage the numerous chunks that
+become mapped into the cache. Overhead can include both excessive CPU
+time searching for chunks, and excessive memory tracking chunks.
+.P
+Command to display the chunk size:
+.P
+.B lvs -o+chunksize VG/LV
+.P
+.BR lvm.conf (5)
+.B allocation/cache_pool_chunk_size
+.P
+controls the default chunk size.
+.P
+The default value is shown by:
+.P
+.B lvmconfig --type default allocation/cache_pool_chunk_size
+.P
+Checking migration threshold (in sectors) of running cached LV:
+.br
+.B lvs -o+kernel_cache_settings VG/LV
+.
+.SS dm-cache cache settings
+.
+To set dm-cache cache setting use:
+.P
+--cachesettings 'option1=N option2=N ...'
+.P
+To unset/drop cache setting and restore its default kernel value
+use special keyword 'default' as option parameter:
+.P
+--cachesettings 'option1=default option2=default ...'
+.
+.SS dm-cache migration threshold cache setting
+.
+Migrating data between the origin and cache LV uses bandwidth.
+The user can set a throttle to prevent more than a certain amount of
+migration occurring at any one time. Currently dm-cache is not taking any
+account of normal io traffic going to the devices.
+.P
+User can set migration threshold via cache policy settings as
+"migration_threshold=<#sectors>" to set the maximum number
+of sectors being migrated, the default being 2048 sectors (1 MiB)
+or 8 cache chunks whichever of those two values is larger.
+.P
+Command to set migration threshold to 2 MiB (4096 sectors):
+.P
+.B lvcreate --cachesettings 'migration_threshold=4096' VG/LV
+.P
+Command to display the migration threshold:
+.P
+.B lvs -o+kernel_cache_settings,cache_settings VG/LV
+.br
+.B lvs -o+chunksize VG/LV
+.P
+Command to restore/revert to default value:
+.P
+.B lvchange --cachesettings 'migration_threshold=default' VG/LV
+.
+.SS dm-cache cache policy
+.
+The dm-cache subsystem has additional per-LV parameters: the cache policy
+to use, and possibly tunable parameters for the cache policy. Three
+policies are currently available: "smq" is the default policy, "mq" is an
+older implementation, and "cleaner" is used to force the cache to write
+back (flush) all cached writes to the origin LV.
+.P
+The older "mq" policy has a number of tunable parameters. The defaults are
+chosen to be suitable for the majority of systems, but in special
+circumstances, changing the settings can improve performance.
+Newer kernels however alias this policy with "smq" policy. Cache settings
+used to configure "mq" policy [random_threshold, sequential_threshold,
+discard_promote_adjustment, read_promote_adjustment,
+write_promote_adjustment] are thus silently ignored also performance
+matches "smq".
+.P
+With the --cachepolicy and --cachesettings options, the cache policy and
+settings can be set when caching is started, or changed on an existing
+cached LV (both options can be used together). The current cache policy
+and settings can be displayed with the cache_policy and cache_settings
+reporting options:
+.P
+.B lvs -o+cache_policy,cache_settings VG/LV
+.P
+Change the cache policy and settings of an existing LV.
+.nf
+# lvchange --cachepolicy mq --cachesettings \\
+ \(aqmigration_threshold=2048 random_threshold=4\(aq vg/main
+.fi
+.P
+.BR lvm.conf (5)
+.B allocation/cache_policy
+.br
+defines the default cache policy.
+.P
+.BR lvm.conf (5)
+.B allocation/cache_settings
+.br
+defines the default cache settings.
+.
+.SS dm-cache using metadata profiles
+.
+Cache pools allows to set a variety of options. Lots of these settings
+can be specified in lvm.conf or profile settings. You can prepare
+a number of different profiles in the \fI#DEFAULT_SYS_DIR#/profile\fP directory
+and just specify the metadata profile file name when caching LV or creating cache-pool.
+Check the output of \fBlvmconfig --type default --withcomments\fP
+for a detailed description of all individual cache settings.
+.P
+.I Example
+.nf
+# cat <<EOF > #DEFAULT_SYS_DIR#/profile/cache_big_chunk.profile
+allocation {
+.RS
+cache_pool_metadata_require_separate_pvs=0
+cache_pool_chunk_size=512
+cache_metadata_format=2
+cache_mode="writethrough"
+cache_policy="smq"
+cache_settings {
+.RS
+smq {
+.RS
+migration_threshold=8192
+.RE
+}
+.RE
+}
+.RE
+}
+EOF
+.P
+
+# lvcreate --cache -L10G --metadataprofile cache_big_chunk vg/main \\
+ /dev/fast_ssd
+# lvcreate --cache -L10G vg/main --config \\
+ 'allocation/cache_pool_chunk_size=512' /dev/fast_ssd
+.fi
+.
+.SS dm-cache spare metadata LV
+.
+See
+.BR lvmthin (7)
+for a description of the "pool metadata spare" LV.
+The same concept is used for cache pools.
+.
+.SS dm-cache metadata formats
+.
+There are two disk formats for dm-cache metadata. The metadata format can
+be specified with --cachemetadataformat when caching is started, and
+cannot be changed. Format \fB2\fP has better performance; it is more
+compact, and stores dirty bits in a separate btree, which improves the
+speed of shutting down the cache. With \fBauto\fP, lvm selects the best
+option provided by the current dm-cache kernel module.
+.
+.SS RAID1 cache device
+.
+RAID1 can be used to create the fast LV holding the cache so that it can
+tolerate a device failure. (When using dm-cache with separate data
+and metadata LVs, each of the sub-LVs can use RAID1.)
+.P
+.nf
+# lvcreate -n main -L Size vg /dev/slow
+# lvcreate --type raid1 -m 1 -n fast -L Size vg /dev/ssd1 /dev/ssd2
+# lvconvert --type cache --cachevol fast vg/main
+.fi
+.
+.SS dm-cache command shortcut
+.
+A single command can be used to cache main LV with automatic
+creation of a cache-pool:
+.P
+.nf
+# lvcreate --cache --size CacheDataSize VG/LV [FastPVs]
+.fi
+.P
+or the longer variant
+.P
+.nf
+# lvcreate --type cache --size CacheDataSize \\
+ --name NameCachePool VG/LV [FastPVs]
+.fi
+.P
+In this command, the specified LV already exists, and is the main LV to be
+cached. The command creates a new cache pool with size and given name
+or the name is automatically selected from a sequence lvolX_cpool,
+using the optionally specified fast PV(s) (typically an ssd). Then it
+attaches the new cache pool to the existing main LV to begin caching.
+.P
+(Note: ensure that the specified main LV is a standard LV. If a cache
+pool LV is mistakenly specified, then the command does something
+different.)
+.P
+(Note: the type option is interpreted differently by this command than by
+normal lvcreate commands in which --type specifies the type of the newly
+created LV. In this case, an LV with type cache-pool is being created,
+and the existing main LV is being converted to type cache.)
+.
+.SH SEE ALSO
+.
+.nh
+.ad l
+.BR lvm.conf (5),
+.BR lvchange (8),
+.BR lvcreate (8),
+.BR lvdisplay (8),
+.BR lvextend (8),
+.BR lvremove (8),
+.BR lvrename (8),
+.BR lvresize (8),
+.BR lvs (8),
+.br
+.BR vgchange (8),
+.BR vgmerge (8),
+.BR vgreduce (8),
+.BR vgsplit (8),
+.P
+.BR cache_check (8),
+.BR cache_dump (8),
+.BR cache_repair (8)
diff --git a/man/lvmchange.8.in b/man/lvmchange.8.in
deleted file mode 100644
index 0d58813..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 \- 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/lvmconf.8.in b/man/lvmconf.8.in
deleted file mode 100644
index 0722e22..0000000
--- a/man/lvmconf.8.in
+++ /dev/null
@@ -1,43 +0,0 @@
-.TH "LVMCONF" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
-
-.SH "NAME"
-.B lvmconf
-\- LVM configuration modifier
-
-.SH "SYNOPSIS"
-.B lvmconf
-.RB [ \-\-disable-cluster ]
-.RB [ \-\-enable-cluster ]
-.RB [ \-\-file
-.RI < configfile >]
-.RB [ \-\-lockinglib
-.RI < lib >]
-.RB [ \-\-lockinglibdir
-.RI < dir >]
-
-.SH "DESCRIPTION"
-lvmconf is a script that modifies the locking configuration in
-an lvm configuration file. See \fBlvm.conf\fP(5).
-
-.SH "OPTIONS"
-.TP
-.BR \-\-disable-cluster
-Set \fBlocking_type\fR to the default non-clustered type.
-.TP
-.BR \-\-enable-cluster
-Set \fBlocking_type\fR to the default clustered type on this system.
-.TP
-.BR \-\-file " <" \fIconfigfile >
-Apply the changes to \fIconfigfile\fP instead of the default
-\fI#DEFAULT_SYS_DIR#/lvm.conf\fP.
-.TP
-.BR \-\-lockinglib " <" \fIlib >
-Set external \fBlocking_library\fR locking library to load if an external locking type is used.
-.TP
-.BR \-\-lockinglibdir " <" \fIdir >
-.SH FILES
-.I #DEFAULT_SYS_DIR#/lvm.conf
-
-.SH "SEE ALSO"
-.BR lvm (8),
-.BR lvm.conf (5)
diff --git a/man/lvmconfig.8_des b/man/lvmconfig.8_des
new file mode 100644
index 0000000..826888d
--- /dev/null
+++ b/man/lvmconfig.8_des
@@ -0,0 +1,4 @@
+lvmconfig, lvm config, lvm dumpconfig (for compatibility reasons, to be phased out) produce
+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_end b/man/lvmconfig.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/lvmconfig.8_end
diff --git a/man/lvmconfig.8_pregen b/man/lvmconfig.8_pregen
new file mode 100644
index 0000000..5279fa4
--- /dev/null
+++ b/man/lvmconfig.8_pregen
@@ -0,0 +1,463 @@
+.TH LVMCONFIG 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvmconfig \(em Display and manipulate configuration information
+.
+.SH SYNOPSIS
+.
+\fBlvmconfig\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+lvmconfig, lvm config, lvm dumpconfig (for compatibility reasons, to be phased out) produce
+formatted output from the LVM configuration tree. The
+sources of the configuration data include \fBlvm.conf\fP(5) and command
+line settings from --config.
+.
+.SH USAGE
+.
+\fBlvmconfig\fP
+.br
+.RS 4
+.ad l
+[ \fB-f\fP|\fB--file\fP \fIString\fP ]
+.br
+[ \fB-l\fP|\fB--list\fP ]
+.br
+[ \fB--atversion\fP \fIString\fP ]
+.br
+[ \fB--typeconfig\fP \c
+.nh
+\%\fBcurrent\fP|\:\fBdefault\fP|\:\fBdiff\fP|\:\fBfull\fP|\:\fBlist\fP|\:\fBmissing\fP|\:\fBnew\fP|\:\fBprofilable\fP|\:\fBprofilable-command\fP|\:\fBprofilable-metadata\fP
+.hy
+]
+.br
+[ \fB--ignoreadvanced\fP ]
+.br
+[ \fB--ignoreunsupported\fP ]
+.br
+[ \fB--ignorelocal\fP ]
+.br
+[ \fB--mergedconfig\fP ]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ \fB--sinceversion\fP \fIString\fP ]
+.br
+[ \fB--showdeprecated\fP ]
+.br
+[ \fB--showunsupported\fP ]
+.br
+[ \fB--validate\fP ]
+.br
+[ \fB--valuesonly\fP ]
+.br
+[ \fB--withsummary\fP ]
+.br
+[ \fB--withcomments\fP ]
+.br
+[ \fB--withgeneralpreamble\fP ]
+.br
+[ \fB--withlocalpreamble\fP ]
+.br
+[ \fB--withspaces\fP ]
+.br
+[ \fB--unconfigured\fP ]
+.br
+[ \fB--withversions\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIString\fP ... ]
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--atversion\fP \fIString\fP
+.br
+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.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--file\fP \fIString\fP
+.br
+Write output to the named file.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignoreadvanced\fP
+.br
+Exclude advanced configuration settings from the output.
+.
+.HP
+\fB--ignorelocal\fP
+.br
+Ignore the local section. The local section should be defined in
+the lvmlocal.conf file, and should contain config settings
+specific to the local host which should not be copied to
+other hosts.
+.
+.HP
+\fB--ignoreunsupported\fP
+.br
+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.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB-l\fP|\fB--list\fP
+.br
+List config settings with summarizing comment. This is the same as using
+options --typeconfig list --withsummary.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--mergedconfig\fP
+.br
+When the command is run with --config
+and/or --commandprofile (or using LVM_COMMAND_PROFILE
+environment variable), --profile, or --metadataprofile,
+merge all the contents of the "config cascade" before displaying it.
+Without merging, only the configuration at the front of the
+cascade is displayed.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--metadataprofile\fP \fIString\fP
+.br
+The metadata profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--showdeprecated\fP
+.br
+Include deprecated configuration settings in the output. These settings
+are deprecated after a certain version. If a concrete version is specified
+with --atversion, deprecated settings are automatically included
+if the specified version is lower than the version in which the settings were
+deprecated. The current and diff types include deprecated settings
+in their output by default, all the other types ignore deprecated settings.
+.
+.HP
+\fB--showunsupported\fP
+.br
+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
+current and diff types include unsupported settings in their
+output by default, all the other types ignore unsupported settings.
+.
+.HP
+\fB--sinceversion\fP \fIString\fP
+.br
+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 --typeconfig new
+to display all configuration settings introduced since given version.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+.ad l
+\fB--typeconfig\fP \c
+.nh
+\%\fBcurrent\fP|\:\fBdefault\fP|\:\fBdiff\fP|\:\fBfull\fP|\:\fBlist\fP|\:\fBmissing\fP|\:\fBnew\fP|\:\fBprofilable\fP|\:\fBprofilable-command\fP|\:\fBprofilable-metadata\fP
+.hy
+.ad b
+.br
+\fBcurrent\fP prints the config settings that would be applied
+to an lvm command (assuming the command does not override them
+on the command line.) This includes:
+settings that have been modified in lvm config files,
+settings that get their default values from config files,
+and default settings that have been uncommented in config files.
+\fBdefault\fP prints all settings with their default values.
+Changes made in lvm config files are not reflected in the output.
+Some settings get their default values internally,
+and these settings are printed as comments.
+Other settings get their default values from config files,
+and these settings are not printed as comments.
+\fBdiff\fP prints only config settings that have been modified
+from their default values in config files (the difference between
+current and default.)
+\fBfull\fP prints every setting uncommented and set to the
+current value, i.e. how it would be used by an lvm command.
+This includes settings modified in config files, settings that usually
+get defaults internally, and settings that get defaults from config files.
+\fBlist\fP prints all config names without values.
+\fBmissing\fP prints settings that are missing from the
+lvm config files. A missing setting that usually gets its default
+from config files is printed uncommented and set to the internal default.
+Settings that get their default internally and are not set in config files
+are printed commented with the internal default.
+\fBnew\fP prints config settings that have been added since
+the lvm version specified by --sinceversion. They are printed
+with their default values.
+\fBprofilable\fP prints settings with their default values that can be set from a profile.
+\fBprofilable-command\fP prints settings with their default values that can be set from a command profile.
+\fBprofilable-metadata\fP prints settings with their default values that can be set from a metadata profile.
+Also see \fBlvm.conf\fP(5).
+.
+.HP
+\fB--unconfigured\fP
+.br
+Internal option used for generating config file during build.
+.
+.HP
+\fB--validate\fP
+.br
+Validate current configuration used and exit with appropriate
+return code. The validation is done only for the configuration
+at the front of the "config cascade". To validate the whole
+merged configuration tree, also use --mergedconfig.
+The validation is done even if \fBlvm.conf\fP(5) \fBconfig/checks\fP is disabled.
+.
+.HP
+\fB--valuesonly\fP
+.br
+When printing config settings, print only values without keys.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB--withcomments\fP
+.br
+Display a full comment for each configuration node. For deprecated
+settings, also display comments about deprecation.
+.
+.HP
+\fB--withgeneralpreamble\fP
+.br
+Include general config file preamble.
+.
+.HP
+\fB--withlocalpreamble\fP
+.br
+Include local config file preamble.
+.
+.HP
+\fB--withspaces\fP
+.br
+Where appropriate, add more spaces in output for better readability.
+.
+.HP
+\fB--withsummary\fP
+.br
+Display a one line comment for each configuration node.
+.
+.HP
+\fB--withversions\fP
+.br
+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.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvmdbusd.8_main b/man/lvmdbusd.8_main
new file mode 100644
index 0000000..3990a02
--- /dev/null
+++ b/man/lvmdbusd.8_main
@@ -0,0 +1,35 @@
+.TH LVMDBUSD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
+.
+.SH NAME
+.
+lvmdbusd \(em LVM D-Bus daemon
+.
+.SH SYNOPSIS
+.
+.ad l
+.B lvmdbusd
+.RB [ --debug ]
+.RB [ --udev ]
+.ad b
+.
+.SH DESCRIPTION
+.
+lvmdbusd is a service which provides a D-Bus API to the logical volume manager (LVM).
+Run
+.BR lvmdbusd (8)
+as root.
+.
+.SH OPTIONS
+.
+.TP 8
+.B --debug
+Enable debug statements
+.
+.TP
+.B --udev
+Use udev events to trigger updates
+.
+.SH SEE ALSO
+.
+.BR dbus-send (1),
+.BR lvm (8)
diff --git a/man/lvmdevices.8_des b/man/lvmdevices.8_des
new file mode 100644
index 0000000..4e7e39a
--- /dev/null
+++ b/man/lvmdevices.8_des
@@ -0,0 +1,102 @@
+The LVM devices file lists devices that lvm can use. The default file is
+\fI#DEFAULT_SYS_DIR#/devices/system.devices\fP, and the \fBlvmdevices\fP(8) command is used to
+add or remove device entries. If the file does not exist, or if lvm.conf
+includes use_devicesfile=0, then lvm will not use a devices file.
+.P
+To use a device with lvm, add it to the devices file with the command
+lvmdevices --adddev, and to prevent lvm from seeing or using a device,
+remove it from the devices file with lvmdevices --deldev. The
+vgimportdevices(8) command adds all PVs from a VG to the devices file,
+and updates the VG metadata to include device IDs of the PVs.
+.P
+Commands that add new devices to the devices file necessarily look outside
+the existing devices file to find the devices being added. pvcreate,
+vgcreate, and vgextend also look outside the devices file to create new
+PVs and add those PVs to the devices file.
+.P
+LVM records devices in the devices file using hardware-specific IDs, such
+as the WWID, and attempts to use subsystem-specific IDs for virtual device
+types (which also aim to be as unique and stable as possible.) These
+device IDs are also written in the VG metadata. When no hardware or
+virtual ID is available, lvm falls back using the unstable device name as
+the device ID. When devnames are used as IDs, lvm performs extra scanning
+to find devices if their devname changes, e.g. after reboot.
+.P
+When proper device IDs are used, an lvm command will not look at devices
+outside the devices file, but when devnames are used as a fallback, lvm
+will scan devices outside the devices file to locate PVs on renamed
+devices. A config setting search_for_devnames can be used to control the
+scanning for renamed devname entries.
+.P
+Related to the devices file, the new command option --devices <devnames>
+allows a list of devices to be specified for the command to use,
+overriding the devices file. The listed devices act as a sort of devices
+file in terms of limiting which devices lvm will see and use. Devices
+that are not listed will appear to be missing to the lvm command.
+.P
+Multiple devices files can be kept \fI#DEFAULT_SYS_DIR#/devices\fP, which
+allows lvm to be used with different sets of devices. For example, system
+devices do not need to be exposed to a specific application, and the
+application can use lvm on its own devices that are not exposed to the
+system. The option --devicesfile <filename> is used to select the devices
+file to use with the command. Without the option set, the default system
+devices file is used.
+.P
+Setting --devicesfile "" causes lvm to not use a devices file.
+.P
+With no devices file, lvm will use any device on the system, and applies
+the filter to limit the full set of system devices. With a devices file,
+the regex filter is not used, and the filter settings in lvm.conf or the
+command line are ignored. The vgimportdevices command is one exception
+which does apply the regex filter when looking for a VG to import.
+.P
+If a devices file exists, lvm will use it, even if it's empty. An empty
+devices file means lvm will see no devices.
+.P
+If the system devices file does not yet exist, the pvcreate or vgcreate
+commands will create it if they see no existing VGs on the system.
+lvmdevices --addev and vgimportdevices will always create a new devices file
+if it does not yet exist.
+.P
+It is recommended to use lvm commands to make changes to the devices file to
+ensure proper updates.
+.P
+The device ID and device ID type are included in the VG metadata and can
+be reported with pvs -o deviceid,deviceidtype. (Note that the lvmdevices
+command does not update VG metadata, but subsequent lvm commands modifying
+the metadata will include the device ID.)
+.P
+Possible device ID types are:
+.br
+.IP \[bu] 2
+.B sys_wwid
+uses the wwid reported by sysfs. This is the first choice for non-virtual
+devices.
+.IP \[bu] 2
+.B sys_serial
+uses the serial number reported by sysfs. This is the second choice for
+non-virtual devices.
+.IP \[bu] 2
+.B mpath_uuid
+is used for dm multipath devices, reported by sysfs.
+.IP \[bu] 2
+.B crypt_uuid
+is used for dm crypt devices, reported by sysfs.
+.IP \[bu] 2
+.B md_uuid
+is used for md devices, reported by sysfs.
+.IP \[bu] 2
+.B lvmlv_uuid
+is used if a PV is placed on top of an lvm LV, reported by sysfs.
+.IP \[bu] 2
+.B loop_file
+is used for loop devices, the backing file name repored by sysfs.
+.IP \[bu] 2
+.B devname
+the device name is used if no other type applies.
+.P
+
+The default choice for device ID type can be overridden using lvmdevices
+--addev --deviceidtype <type>. If the specified type is available for the
+device it will be used, otherwise the device will be added using the type
+that would otherwise be chosen.
diff --git a/man/lvmdevices.8_end b/man/lvmdevices.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/lvmdevices.8_end
diff --git a/man/lvmdevices.8_pregen b/man/lvmdevices.8_pregen
new file mode 100644
index 0000000..608893d
--- /dev/null
+++ b/man/lvmdevices.8_pregen
@@ -0,0 +1,519 @@
+.TH LVMDEVICES 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvmdevices \(em Manage the devices file
+.
+.SH SYNOPSIS
+.
+\fBlvmdevices\fP \fIoption_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.P
+.ad l
+ \fB--adddev\fP \fIPV\fP
+.br
+ \fB--addpvid\fP \fIString\fP
+.br
+ \fB--check\fP
+.br
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--deldev\fP \fIString\fP
+.br
+ \fB--delnotfound\fP
+.br
+ \fB--delpvid\fP \fIString\fP
+.br
+ \fB--deviceidtype\fP \fIString\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB--update\fP
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB-y\fP|\fB--yes\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+The LVM devices file lists devices that lvm can use. The default file is
+\fI#DEFAULT_SYS_DIR#/devices/system.devices\fP, and the \fBlvmdevices\fP(8) command is used to
+add or remove device entries. If the file does not exist, or if lvm.conf
+includes use_devicesfile=0, then lvm will not use a devices file.
+.P
+To use a device with lvm, add it to the devices file with the command
+lvmdevices --adddev, and to prevent lvm from seeing or using a device,
+remove it from the devices file with lvmdevices --deldev. The
+vgimportdevices(8) command adds all PVs from a VG to the devices file,
+and updates the VG metadata to include device IDs of the PVs.
+.P
+Commands that add new devices to the devices file necessarily look outside
+the existing devices file to find the devices being added. pvcreate,
+vgcreate, and vgextend also look outside the devices file to create new
+PVs and add those PVs to the devices file.
+.P
+LVM records devices in the devices file using hardware-specific IDs, such
+as the WWID, and attempts to use subsystem-specific IDs for virtual device
+types (which also aim to be as unique and stable as possible.) These
+device IDs are also written in the VG metadata. When no hardware or
+virtual ID is available, lvm falls back using the unstable device name as
+the device ID. When devnames are used as IDs, lvm performs extra scanning
+to find devices if their devname changes, e.g. after reboot.
+.P
+When proper device IDs are used, an lvm command will not look at devices
+outside the devices file, but when devnames are used as a fallback, lvm
+will scan devices outside the devices file to locate PVs on renamed
+devices. A config setting search_for_devnames can be used to control the
+scanning for renamed devname entries.
+.P
+Related to the devices file, the new command option --devices <devnames>
+allows a list of devices to be specified for the command to use,
+overriding the devices file. The listed devices act as a sort of devices
+file in terms of limiting which devices lvm will see and use. Devices
+that are not listed will appear to be missing to the lvm command.
+.P
+Multiple devices files can be kept \fI#DEFAULT_SYS_DIR#/devices\fP, which
+allows lvm to be used with different sets of devices. For example, system
+devices do not need to be exposed to a specific application, and the
+application can use lvm on its own devices that are not exposed to the
+system. The option --devicesfile <filename> is used to select the devices
+file to use with the command. Without the option set, the default system
+devices file is used.
+.P
+Setting --devicesfile "" causes lvm to not use a devices file.
+.P
+With no devices file, lvm will use any device on the system, and applies
+the filter to limit the full set of system devices. With a devices file,
+the regex filter is not used, and the filter settings in lvm.conf or the
+command line are ignored. The vgimportdevices command is one exception
+which does apply the regex filter when looking for a VG to import.
+.P
+If a devices file exists, lvm will use it, even if it's empty. An empty
+devices file means lvm will see no devices.
+.P
+If the system devices file does not yet exist, the pvcreate or vgcreate
+commands will create it if they see no existing VGs on the system.
+lvmdevices --addev and vgimportdevices will always create a new devices file
+if it does not yet exist.
+.P
+It is recommended to use lvm commands to make changes to the devices file to
+ensure proper updates.
+.P
+The device ID and device ID type are included in the VG metadata and can
+be reported with pvs -o deviceid,deviceidtype. (Note that the lvmdevices
+command does not update VG metadata, but subsequent lvm commands modifying
+the metadata will include the device ID.)
+.P
+Possible device ID types are:
+.br
+.IP \[bu] 2
+.B sys_wwid
+uses the wwid reported by sysfs. This is the first choice for non-virtual
+devices.
+.IP \[bu] 2
+.B sys_serial
+uses the serial number reported by sysfs. This is the second choice for
+non-virtual devices.
+.IP \[bu] 2
+.B mpath_uuid
+is used for dm multipath devices, reported by sysfs.
+.IP \[bu] 2
+.B crypt_uuid
+is used for dm crypt devices, reported by sysfs.
+.IP \[bu] 2
+.B md_uuid
+is used for md devices, reported by sysfs.
+.IP \[bu] 2
+.B lvmlv_uuid
+is used if a PV is placed on top of an lvm LV, reported by sysfs.
+.IP \[bu] 2
+.B loop_file
+is used for loop devices, the backing file name repored by sysfs.
+.IP \[bu] 2
+.B devname
+the device name is used if no other type applies.
+.P
+
+The default choice for device ID type can be overridden using lvmdevices
+--addev --deviceidtype <type>. If the specified type is available for the
+device it will be used, otherwise the device will be added using the type
+that would otherwise be chosen.
+.
+.SH USAGE
+.
+Print devices in the devices file.
+.br
+.P
+\fBlvmdevices\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Check the devices file and report incorrect values.
+.br
+.P
+\fBlvmdevices\fP \fB--check\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Update the devices file to fix incorrect values.
+.br
+.P
+\fBlvmdevices\fP \fB--update\fP
+.br
+.RS 4
+.ad l
+[ \fB--delnotfound\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Add a device to the devices file.
+.br
+.P
+\fBlvmdevices\fP \fB--adddev\fP \fIPV\fP
+.br
+.RS 4
+.ad l
+[ \fB--deviceidtype\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Remove a device from the devices file.
+.br
+.P
+\fBlvmdevices\fP \fB--deldev\fP \fIString\fP|\fIPV\fP
+.br
+.RS 4
+.ad l
+[ \fB--deviceidtype\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Find the device with the given PVID and add it to the devices file.
+.br
+.P
+\fBlvmdevices\fP \fB--addpvid\fP \fIString\fP
+.br
+.RS 4
+.ad l
+[ \fB--deviceidtype\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Remove the devices file entry for the given PVID.
+.br
+.P
+\fBlvmdevices\fP \fB--delpvid\fP \fIString\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--adddev\fP \fIPV\fP
+.br
+Add a device to the devices file.
+.
+.HP
+\fB--addpvid\fP \fIString\fP
+.br
+Find a device with the PVID and add the device to the devices file.
+.
+.HP
+\fB--check\fP
+.br
+Checks the content of the devices file.
+Reports incorrect device names or PVIDs for entries.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--deldev\fP \fIString\fP
+.br
+Remove a device from the devices file.
+When used alone, --deldev specifies a device name.
+When used with --deviceidtype, --deldev specifies a device id.
+.
+.HP
+\fB--delnotfound\fP
+.br
+Remove devices file entries with no matching device.
+.
+.HP
+\fB--delpvid\fP \fIString\fP
+.br
+Remove a device with the PVID from the devices file.
+.
+.HP
+\fB--deviceidtype\fP \fIString\fP
+.br
+The type of device ID to use for the device.
+If the specified type is available for the device,
+then it will override the default type that lvm would use.
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--update\fP
+.br
+Update the content of the devices file.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvmdiskscan.8.in b/man/lvmdiskscan.8.in
deleted file mode 100644
index 7b3e08b..0000000
--- a/man/lvmdiskscan.8.in
+++ /dev/null
@@ -1,25 +0,0 @@
-.TH LVMDISKSCAN 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvmdiskscan \- scan for all devices visible to LVM2
-.SH SYNOPSIS
-.B lvmdiskscan
-.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/lvmdiskscan.8_des b/man/lvmdiskscan.8_des
new file mode 100644
index 0000000..70df55d
--- /dev/null
+++ b/man/lvmdiskscan.8_des
@@ -0,0 +1,6 @@
+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.
+.P
+This command is deprecated, use \fBpvs\fP instead.
diff --git a/man/lvmdiskscan.8_end b/man/lvmdiskscan.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/lvmdiskscan.8_end
diff --git a/man/lvmdiskscan.8_pregen b/man/lvmdiskscan.8_pregen
new file mode 100644
index 0000000..4db9c20
--- /dev/null
+++ b/man/lvmdiskscan.8_pregen
@@ -0,0 +1,252 @@
+.TH LVMDISKSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvmdiskscan \(em List devices that may be used as physical volumes
+.
+.SH SYNOPSIS
+.
+\fBlvmdiskscan\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+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.
+.P
+This command is deprecated, use \fBpvs\fP instead.
+.
+.SH USAGE
+.
+\fBlvmdiskscan\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--lvmpartition\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-l\fP|\fB--lvmpartition\fP
+.br
+Only report PVs.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvmdump.8.in b/man/lvmdump.8.in
deleted file mode 100644
index 3d53420..0000000
--- a/man/lvmdump.8.in
+++ /dev/null
@@ -1,74 +0,0 @@
-.TH LVMDUMP 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
-.SH NAME
-lvmdump - create lvm2 information dumps for diagnostic purposes
-.SH SYNOPSIS
-.B lvmdump
-.RB [ \-a ]
-.RB [ \-c ]
-.RB [ \-d
-.IR directory ]
-.RB [ \-h ]
-.RB [ \-m ]
-.SH DESCRIPTION
-lvmdump is a tool to dump various information concerning LVM2.
-By default, it creates a tarball suitable for submission along
-with a problem report.
-.PP
-The content of the tarball is as follows:
-.br
-- dmsetup info
-.br
-- table of currently running processes
-.br
-- recent entries from /var/log/messages (containing system messages)
-.br
-- complete lvm configuration and cache (content of /etc/lvm)
-.br
-- list of device nodes present under /dev
-.br
-- list of files present /sys/block
-.br
-- list of files present /sys/devices/virtual/block
-.br
-- if enabled with \-m, metadata dump will be also included
-.br
-- if enabled with \-a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included
-.br
-- if enabled with \-c, cluster status info
-.SH OPTIONS
-.TP
-.B \-a
-Advanced collection.
-\fBWARNING\fR: if lvm is already hung, then this script may hang as well
-if \fB\-a\fR is used.
-.TP
-.B \-c
-If clvmd is running, gather cluster data as well.
-.TP
-.B \-d \fIdirectory
-Dump into a directory instead of tarball
-By default, lvmdump will produce a single compressed tarball containing
-all the information. Using this option, it can be instructed to only
-produce the raw dump tree, rooted in \fIdirectory\fP.
-.TP
-.B \-h
-Print help message
-.TP
-.B \-m
-Gather LVM metadata from the PVs
-This option generates a 1:1 dump of the metadata area from all PVs visible
-to the system, which can cause the dump to increase in size considerably.
-However, the metadata dump may represent a valuable diagnostic resource.
-.SH ENVIRONMENT VARIABLES
-.TP
-\fBLVM_BINARY\fP
-The LVM2 binary to use.
-Defaults to "lvm".
-Sometimes you might need to set this to "/sbin/lvm.static", for example.
-.TP
-\fBDMSETUP_BINARY\fP
-The dmsetup binary to use.
-Defaults to "dmsetup".
-.PP
-.SH SEE ALSO
-.BR lvm (8)
diff --git a/man/lvmdump.8_main b/man/lvmdump.8_main
new file mode 100644
index 0000000..2267590
--- /dev/null
+++ b/man/lvmdump.8_main
@@ -0,0 +1,126 @@
+.TH LVMDUMP 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvmdump \(em create lvm2 information dumps for diagnostic purposes
+.
+.SH SYNOPSIS
+.
+.B lvmdump
+.RB [ -a ]
+.RB [ -c ]
+.RB [ -d
+.IR directory ]
+.RB [ -h ]
+.RB [ -l ]
+.RB [ -m ]
+.RB [ -p ]
+.RB [ -s ]
+.RB [ -u ]
+.
+.SH DESCRIPTION
+.
+lvmdump is a tool to dump various information concerning LVM2.
+By default, it creates a tarball suitable for submission along
+with a problem report.
+.P
+The content of the tarball is as follows:
+.ad l
+.PD 0
+.IP \[bu] 2
+dmsetup info
+.IP \[bu]
+table of currently running processes
+.IP \[bu]
+recent entries from \fI/var/log/messages\fP (containing system messages)
+.IP \[bu]
+complete lvm configuration and cache (content of \fI#DEFAULT_SYS_DIR#\fP)
+.IP \[bu]
+list of device nodes present under \fI/dev\fP
+.IP \[bu]
+list of files present \fI/sys/block\fP
+.IP \[bu]
+list of files present \fI/sys/devices/virtual/block\fP
+.IP \[bu]
+if enabled with -m, metadata dump will be also included
+.IP \[bu]
+if enabled with -a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included
+.IP \[bu]
+if enabled with -l, lvmetad state if running
+.IP \[bu]
+if enabled with -p, lvmpolld state if running
+.IP \[bu]
+if enabled with -s, system info and context
+.IP \[bu]
+if enabled with -u, udev info and context
+.PD
+.ad b
+.
+.SH OPTIONS
+.
+.TP
+.B -a
+Advanced collection.
+\fBWARNING\fR: if lvm is already hung, then this script may hang as well
+if \fB-a\fR is used.
+.TP
+.B -d \fIdirectory
+Dump into a directory instead of tarball
+By default, lvmdump will produce a single compressed tarball containing
+all the information. Using this option, it can be instructed to only
+produce the raw dump tree, rooted in \fIdirectory\fP.
+.TP
+.B -h
+Print help message
+.TP
+.B -l
+Include \fBlvmetad\fP(8) daemon dump if it is running. The dump contains
+cached information that is currently stored in lvmetad: VG metadata,
+PV metadata and various mappings in between these metadata for quick
+access.
+.TP
+.B -m
+Gather LVM metadata from the PVs
+This option generates a 1:1 dump of the metadata area from all PVs visible
+to the system, which can cause the dump to increase in size considerably.
+However, the metadata dump may represent a valuable diagnostic resource.
+.TP
+.B -p
+Include \fBlvmpolld\fP(8) daemon dump if it is running. The dump contains
+all in-progress operation currently monitored by the daemon and partial
+history for all yet uncollected results of polling operations already finished
+including reason.
+.TP
+.B -s
+Gather system info and context. Currently, this encompasses info gathered
+by calling lsblk command and various systemd info and context: overall state
+of systemd units present in the system, more detailed status of units
+controlling LVM functionality and the content of systemd journal for
+current boot.
+.TP
+.B -u
+Gather udev info and context: \fI/etc/udev/udev.conf\fP file, udev daemon version
+(output of 'udevadm info --version' command), udev rules currently used in the system
+(content of \fI/lib/udev/rules.d\fP and \fI/etc/udev/rules.d\fP directory),
+list of files in /lib/udev directory and dump of current udev
+database content (the output of 'udevadm info --export-db' command).
+.
+.SH ENVIRONMENT VARIABLES
+.
+.TP
+.B LVM_BINARY
+The LVM2 binary to use.
+Defaults to "\fBlvm\fP".
+Sometimes you might need to set this to "\fI#LVM_PATH#.static\fP", for example.
+.TP
+.B DMSETUP_BINARY
+The dmsetup binary to use.
+Defaults to "\fBdmsetup\fP".
+.
+.SH SEE ALSO
+.
+.BR lvm (8),
+.BR lvmpolld (8),
+.P
+.BR udev (8),
+.BR udevadm (8)
diff --git a/man/lvmetad.8.in b/man/lvmetad.8.in
deleted file mode 100644
index ef1096d..0000000
--- a/man/lvmetad.8.in
+++ /dev/null
@@ -1,51 +0,0 @@
-.TH LVMETAD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
-.SH NAME
-lvmetad \- LVM metadata cache daemon
-.SH SYNOPSIS
-.B lvmetad
-.RB [ \-l
-.RI {all|wire|debug}
-.RB ]
-.RB [ \-s
-.RI path
-.RB ]
-.RB [ \-f ]
-.RB [ \-h ]
-.RB [ \-V ]
-.RB [ \-? ]
-.SH DESCRIPTION
-lvmetad is a metadata caching daemon for LVM. The daemon receives notifications
-from udev rules (which must be installed for LVM to work correctly when lvmetad
-is in use). Through these notifications, lvmetad has an up-to-date and
-consistent image of the volume groups available in the system.
-
-By default, lvmetad, even if running, is not used by LVM. See \fBlvm.conf\fP(5).
-.SH OPTIONS
-.TP
-.BR \-l " {" \fIall | \fIwire | \fIdebug }
-Select the type of log messages to generate.
-Messages are logged by syslog.
-Additionally, when -f is given they are also sent to standard error.
-Since release 2.02.98, there are two classes of messages: wire and debug.
-Selecting 'all' supplies both and is equivalent to a comma-separated list
--l wire,debug.
-Prior to release 2.02.98, repeating -d from 1 to 3 times, viz. -d, -dd, -ddd,
-increased the detail of messages.
-.TP
-.B \-f
-Don't fork, run in the foreground.
-.TP
-.BR \-h ", " \-?
-Show help information.
-.TP
-.B \-s \fIpath
-Path to the socket file to use. The option overrides both the built-in default
-(#DEFAULT_RUN_DIR#/lvmetad.socket) and the environment variable
-LVM_LVMETAD_SOCKET.
-.TP
-.B \-V
-Show version of dmeventd.
-
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvm.conf (5)
diff --git a/man/lvmlockctl.8_main b/man/lvmlockctl.8_main
new file mode 100644
index 0000000..d5b9e92
--- /dev/null
+++ b/man/lvmlockctl.8_main
@@ -0,0 +1,119 @@
+.TH "LVMLOCKCTL" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH NAME
+.
+lvmlockctl \(em Control for lvmlockd
+.
+.SH SYNOPSIS
+.
+.BR lvmlockctl " [" \fIoptions ]
+.
+.SH DESCRIPTION
+.
+This command interacts with
+.BR lvmlockd (8).
+.
+.SH OPTIONS
+.
+.TP
+.BR -h | --help
+Show this help information.
+.
+.TP
+.BR -q | --quit
+Tell lvmlockd to quit.
+.
+.TP
+.BR -i | --info
+Print lock state information from lvmlockd.
+.
+.TP
+.BR -d | --dump
+Print log buffer from lvmlockd.
+.
+.TP
+.BR -w | --wait\ 0 | 1
+Wait option for other commands.
+.
+.TP
+.BR -f | --force\ 0 | 1
+Force option for other commands.
+.
+.TP
+.BR -k | --kill " " \fIvgname
+Kill access to the VG when sanlock cannot renew lease.
+.
+.TP
+.BR -r | --drop " " \fIvgname
+Clear locks for the VG when it is unused after kill (-k).
+.
+.TP
+.BR -E | --gl-enable " " \fIvgname
+Tell lvmlockd to enable the global lock in a sanlock VG.
+.
+.TP
+.BR -D | --gl-disable " " \fIvgname
+Tell lvmlockd to disable the global lock in a sanlock VG.
+.
+.TP
+.BR -S | --stop-lockspaces
+Stop all lockspaces.
+.
+.SH USAGE
+.
+.TP
+.B --info
+This collects and displays lock state from lvmlockd. The display is
+primitive, incomplete and will change in future version. To print the raw
+lock state from lvmlockd, combine this option with --dump|-d.
+.
+.TP
+.B --dump
+This collects the circular log buffer of debug statements from lvmlockd
+and prints it.
+.
+.TP
+.B --kill
+This is run by sanlock when it loses access to the storage holding leases
+for a VG. It runs the command specified in lvm.conf
+lvmlockctl_kill_command to deactivate LVs in the VG. If the specified
+command is successful, locks will be dropped for the VG in lvmlockd
+(the equivalent of \fBlvmlockctl --drop\fP will be run.) If no command
+is specified, or the command fails, then the user must intervene
+to forcefully deactivate LVs in the VG, and if successful, run
+\fBlvmlockctl --drop\fP. For more, see
+.BR lvmlockd (8).
+.
+.TP
+.B --drop
+This should only be run after a VG has been successfully deactivated
+following an lvmlockctl --kill command. It clears the stale lockspace
+from lvmlockd. When lvmlockctl_kill_command is used, the --kill
+command may run drop automatically. For more, see
+.BR lvmlockd (8).
+.
+.TP
+.B --gl-enable
+This enables the global lock in a sanlock VG. This is necessary if the VG
+that previously held the global lock is removed. For more, see
+.BR lvmlockd (8).
+.
+.TP
+.B --gl-disable
+This disables the global lock in a sanlock VG. This is necessary if the
+global lock has mistakenly been enabled in more than one VG. The global
+lock should be disabled in all but one sanlock VG. For more, see
+.BR lvmlockd (8).
+.
+.TP
+.B --stop-lockspaces
+This tells lvmlockd to stop all lockspaces. It can be useful to stop
+lockspaces for VGs that the \fBvgchange --lock-stop\fP command can no longer
+see, or to stop the dlm global lockspace which is not directly stopped by
+the vgchange command. The wait and force options can be used with this
+command.
+.
+.SH SEE ALSO
+.
+.BR lvm (8),
+.BR lvmlockd (8)
diff --git a/man/lvmlockd.8_main b/man/lvmlockd.8_main
new file mode 100644
index 0000000..7fa11df
--- /dev/null
+++ b/man/lvmlockd.8_main
@@ -0,0 +1,888 @@
+.TH "LVMLOCKD" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH NAME
+.
+lvmlockd \(em LVM locking daemon
+.
+.SH SYNOPSIS
+.
+.BR lvmlockd " [" \fIoptions ]
+.
+.SH DESCRIPTION
+.
+LVM commands use lvmlockd to coordinate access to shared storage.
+.br
+When LVM is used on devices shared by multiple hosts, locks will:
+.br
+\[bu]
+coordinate reading and writing of LVM metadata
+.br
+\[bu]
+validate caching of LVM metadata
+.br
+\[bu]
+prevent conflicting activation of logical volumes
+.br
+lvmlockd uses an external lock manager to perform basic locking.
+.P
+Lock manager (lock type) options are:
+.br
+\[bu]
+sanlock: places locks on disk within LVM storage.
+.br
+\[bu]
+dlm: uses network communication and a cluster manager.
+.br
+.
+.SH OPTIONS
+.
+.TP
+.BR -h | --help
+Show this help information.
+.
+.TP
+.BR -V | --version
+Show version of lvmlockd.
+.
+.TP
+.BR -T | --test
+Test mode, do not call lock manager.
+.
+.TP
+.BR -f | --foreground
+Don't fork.
+.
+.TP
+.BR -D | --daemon-debug
+Don't fork and print debugging to stdout.
+.
+.TP
+.BR -p | --pid-file " " \fIpath
+Set path to the pid file.
+.
+.TP
+.BR -s | --socket-path " " \fIpath
+Set path to the socket to listen on.
+.
+.TP
+.B --adopt-file \fIpath
+Set path to the adopt file.
+.
+.TP
+.BR -S | --syslog-priority " " err | warning | debug
+Write log messages from this level up to syslog.
+.
+.TP
+.BR -g | --gl-type " " sanlock | dlm
+Set global lock type to be sanlock or dlm.
+.
+.TP
+.BR -i | --host-id " " \fInum
+Set the local sanlock host id.
+.
+.TP
+.BR -F | --host-id-file " " \fIpath
+A file containing the local sanlock host_id.
+.
+.TP
+.BR -o | --sanlock-timeout " " \fIseconds
+Override the default sanlock I/O timeout.
+.
+.TP
+.BR -A | --adopt " " 0 | 1
+Enable (1) or disable (0) lock adoption.
+.
+.SH USAGE
+.
+.SS Initial set up
+.
+Setting up LVM to use lvmlockd and a shared VG for the first time includes
+some one time set up steps:
+.
+.SS 1. choose a lock manager
+.
+.I dlm
+.br
+If dlm (or corosync) are already being used by other cluster
+software, then select dlm. dlm uses corosync which requires additional
+configuration beyond the scope of this document. See corosync and dlm
+documentation for instructions on configuration, set up and usage.
+.P
+.I sanlock
+.br
+Choose sanlock if dlm/corosync are not otherwise required.
+sanlock does not depend on any clustering software or configuration.
+.
+.SS 2. configure hosts to use lvmlockd
+.
+On all hosts running lvmlockd, configure lvm.conf:
+.nf
+use_lvmlockd = 1
+.fi
+.P
+.I sanlock
+.br
+Assign each host a unique host_id in the range 1-2000 by setting
+.br
+#DEFAULT_SYS_DIR#/lvmlocal.conf local/host_id
+.
+.SS 3. start lvmlockd
+.
+Start the lvmlockd daemon.
+.br
+Use systemctl, a cluster resource agent, or run directly, e.g.
+.br
+systemctl start lvmlockd
+.
+.SS 4. start lock manager
+.
+.I sanlock
+.br
+Start the sanlock and wdmd daemons.
+.br
+Use systemctl or run directly, e.g.
+.br
+systemctl start wdmd sanlock
+.P
+.I dlm
+.br
+Start the dlm and corosync daemons.
+.br
+Use systemctl, a cluster resource agent, or run directly, e.g.
+.br
+systemctl start corosync dlm
+.
+.SS 5. create VG on shared devices
+.
+vgcreate --shared <vgname> <devices>
+.P
+The shared option sets the VG lock type to sanlock or dlm depending on
+which lock manager is running. LVM commands acquire locks from lvmlockd,
+and lvmlockd uses the chosen lock manager.
+.
+.SS 6. start VG on all hosts
+.
+vgchange --lock-start
+.P
+Shared VGs must be started before they are used. Starting the VG performs
+lock manager initialization that is necessary to begin using locks (i.e.
+creating and joining a lockspace). Starting the VG may take some time,
+and until the start completes the VG may not be modified or activated.
+.
+.SS 7. create and activate LVs
+.
+Standard lvcreate and lvchange commands are used to create and activate
+LVs in a shared VG.
+.P
+An LV activated exclusively on one host cannot be activated on another.
+When multiple hosts need to use the same LV concurrently, the LV can be
+activated with a shared lock (see lvchange options -aey vs -asy.)
+(Shared locks are disallowed for certain LV types that cannot be used from
+multiple hosts.)
+.
+.SS Normal start up and shut down
+.
+After initial set up, start up and shut down include the following steps.
+They can be performed directly or may be automated using systemd or a
+cluster resource manager/agents.
+.P
+\[bu]
+start lvmlockd
+.br
+\[bu]
+start lock manager
+.br
+\[bu]
+vgchange --lock-start
+.br
+\[bu]
+activate LVs in shared VGs
+.br
+.P
+The shut down sequence is the reverse:
+.P
+\[bu]
+deactivate LVs in shared VGs
+.br
+\[bu]
+vgchange --lock-stop
+.br
+\[bu]
+stop lock manager
+.br
+\[bu]
+stop lvmlockd
+.
+.SH TOPICS
+.
+.SS Protecting VGs on shared devices
+.
+The following terms are used to describe the different ways of accessing
+VGs on shared devices.
+.P
+.I "shared VG"
+.P
+A shared VG exists on shared storage that is visible to multiple hosts.
+LVM acquires locks through lvmlockd to coordinate access to shared VGs.
+A shared VG has lock_type "dlm" or "sanlock", which specifies the lock
+manager lvmlockd will use.
+.P
+When the lock manager for the lock type is not available (e.g. not started
+or failed), lvmlockd is unable to acquire locks for LVM commands. In this
+situation, LVM commands are only allowed to read and display the VG;
+changes and activation will fail.
+.P
+.I "local VG"
+.P
+A local VG is meant to be used by a single host. It has no lock type or
+lock type "none". A local VG typically exists on local (non-shared)
+devices and cannot be used concurrently from different hosts.
+.P
+If a local VG does exist on shared devices, it should be owned by a single
+host by having the system ID set, see
+.BR lvmsystemid (7).
+The host with a matching system ID can use the local VG and other hosts
+will ignore it. A VG with no lock type and no system ID should be
+excluded from all but one host using lvm.conf filters. Without any of
+these protections, a local VG on shared devices can be easily damaged or
+destroyed.
+.P
+.I "clvm VG"
+.P
+A clvm VG (or clustered VG) is a VG on shared storage (like a shared VG)
+that requires clvmd for clustering and locking. See below for converting
+a clvm/clustered VG to a shared VG.
+.
+.SS Shared VGs from hosts not using lvmlockd
+.
+Hosts that do not use shared VGs will not be running lvmlockd. In this
+case, shared VGs that are still visible to the host will be ignored
+(like foreign VGs, see
+.BR lvmsystemid (7)).
+.P
+The --shared option for reporting and display commands causes shared VGs
+to be displayed on a host not using lvmlockd, like the --foreign option
+does for foreign VGs.
+.
+.SS Creating the first sanlock VG
+.
+When use_lvmlockd is first enabled in lvm.conf, and before the first
+sanlock VG is created, no global lock will exist. In this initial state,
+LVM commands try and fail to acquire the global lock, producing a warning,
+and some commands are disallowed. Once the first sanlock VG is created,
+the global lock will be available, and LVM will be fully operational.
+.P
+When a new sanlock VG is created, its lockspace is automatically started on
+the host that creates it. Other hosts need to run 'vgchange --lock-start'
+to start the new VG before they can use it.
+.P
+Creating the first sanlock VG is not protected by locking, so it requires
+special attention. This is because sanlock locks exist on storage within
+the VG, so they are not available until after the VG is created. The
+first sanlock VG that is created will automatically contain the "global
+lock". Be aware of the following special considerations:
+.P
+.IP \[bu] 2
+The first vgcreate command needs to be given the path to a device that has
+not yet been initialized with pvcreate. The pvcreate initialization will
+be done by vgcreate. This is because the pvcreate command requires the
+global lock, which will not be available until after the first sanlock VG
+is created.
+.IP \[bu]
+Because the first sanlock VG will contain the global lock, this VG needs
+to be accessible to all hosts that will use sanlock shared VGs. All hosts
+will need to use the global lock from the first sanlock VG.
+.IP \[bu]
+The device and VG name used by the initial vgcreate will not be protected
+from concurrent use by another vgcreate on another host.
+.P
+See below for more information about managing the sanlock global lock.
+.
+.SS Using shared VGs
+.
+In the 'vgs' command, shared VGs are indicated by "s" (for shared) in
+the sixth attr field, and by "shared" in the "--options shared" report
+field. The specific lock type and lock args for a shared VG can be
+displayed with 'vgs -o+locktype,lockargs'.
+.P
+Shared VGs need to be "started" and "stopped", unlike other types of VGs.
+See the following section for a full description of starting and stopping.
+.P
+Removing a shared VG will fail if other hosts have the VG started. Run
+vgchange --lock-stop <vgname> on all other hosts before vgremove. (It may
+take several seconds before vgremove recognizes that all hosts have
+stopped a sanlock VG.)
+.
+.SS Starting and stopping VGs
+.
+Starting a shared VG (vgchange --lock-start) causes the lock manager to
+start (join) the lockspace for the VG on the host where it is run. This
+makes locks for the VG available to LVM commands on the host. Before a VG
+is started, only LVM commands that read/display the VG are allowed to
+continue without locks (and with a warning).
+.P
+Stopping a shared VG (vgchange --lock-stop) causes the lock manager to
+stop (leave) the lockspace for the VG on the host where it is run. This
+makes locks for the VG inaccessible to the host. A VG cannot be stopped
+while it has active LVs.
+.P
+When using the lock type sanlock, starting a VG can take a long time
+(potentially minutes if the host was previously shut down without cleanly
+stopping the VG.)
+.P
+A shared VG can be started after all the following are true:
+.P
+\[bu]
+lvmlockd is running
+.br
+\[bu]
+the lock manager is running
+.br
+\[bu]
+the VG's devices are visible on the system
+.P
+A shared VG can be stopped if all LVs are deactivated.
+.P
+All shared VGs can be started/stopped using:
+.br
+vgchange --lock-start
+.br
+vgchange --lock-stop
+.P
+Individual VGs can be started/stopped using:
+.br
+vgchange --lock-start <vgname> ...
+.br
+vgchange --lock-stop <vgname> ...
+.P
+To make vgchange not wait for start to complete:
+.br
+vgchange --lock-start --lock-opt nowait ...
+.P
+lvmlockd can be asked directly to stop all lockspaces:
+.br
+lvmlockctl -S|--stop-lockspaces
+.P
+To start only selected shared VGs, use the lvm.conf
+activation/lock_start_list. When defined, only VG names in this list are
+started by vgchange. If the list is not defined (the default), all
+visible shared VGs are started. To start only "vg1", use the following
+lvm.conf configuration:
+.P
+.nf
+activation {
+ lock_start_list = [ "vg1" ]
+ ...
+}
+.fi
+.
+.SS Internal command locking
+.
+To optimize the use of LVM with lvmlockd, be aware of the three kinds of
+locks and when they are used:
+.P
+.I Global lock
+.P
+The global lock is associated with global information, which is
+information not isolated to a single VG. This includes:
+.P
+\[bu]
+The global VG namespace.
+.br
+\[bu]
+The set of orphan PVs and unused devices.
+.br
+\[bu]
+The properties of orphan PVs, e.g. PV size.
+.P
+The global lock is acquired in shared mode by commands that read this
+information, or in exclusive mode by commands that change it. For
+example, the command 'vgs' acquires the global lock in shared mode because
+it reports the list of all VG names, and the vgcreate command acquires the
+global lock in exclusive mode because it creates a new VG name, and it
+takes a PV from the list of unused PVs.
+.P
+When an LVM command is given a tag argument, or uses select, it must read
+all VGs to match the tag or selection, which causes the global lock to be
+acquired.
+.P
+.I VG lock
+.P
+A VG lock is associated with each shared VG. The VG lock is acquired in
+shared mode to read the VG and in exclusive mode to change the VG or
+activate LVs. This lock serializes access to a VG with all other LVM
+commands accessing the VG from all hosts.
+.P
+The command 'vgs <vgname>' does not acquire the global lock (it does not
+need the list of all VG names), but will acquire the VG lock on each VG
+name argument.
+.P
+.I LV lock
+.P
+An LV lock is acquired before the LV is activated, and is released after
+the LV is deactivated. If the LV lock cannot be acquired, the LV is not
+activated. (LV locks are persistent and remain in place when the
+activation command is done. Global and VG locks are transient, and are
+held only while an LVM command is running.)
+.P
+.I lock retries
+.P
+If a request for a global or VG lock fails due to a lock conflict with
+another host, lvmlockd automatically retries for a short time before
+returning a failure to the LVM command. If those retries are
+insufficient, the LVM command will retry the entire lock request a number
+of times specified by global/lvmlockd_lock_retries before failing. If a
+request for an LV lock fails due to a lock conflict, the command fails
+immediately.
+.
+.SS Managing the global lock in sanlock VGs
+.
+The global lock exists in one of the sanlock VGs. The first sanlock VG
+created will contain the global lock. Subsequent sanlock VGs will each
+contain a disabled global lock that can be enabled later if necessary.
+.P
+The VG containing the global lock must be visible to all hosts using
+sanlock VGs. For this reason, it can be useful to create a small sanlock
+VG, visible to all hosts, and dedicated to just holding the global lock.
+While not required, this strategy can help to avoid difficulty in the
+future if VGs are moved or removed.
+.P
+The vgcreate command typically acquires the global lock, but in the case
+of the first sanlock VG, there will be no global lock to acquire until the
+first vgcreate is complete. So, creating the first sanlock VG is a
+special case that skips the global lock.
+.P
+vgcreate determines that it's creating the first sanlock VG when no other
+sanlock VGs are visible on the system. It is possible that other sanlock
+VGs do exist, but are not visible when vgcreate checks for them. In this
+case, vgcreate will create a new sanlock VG with the global lock enabled.
+When the another VG containing a global lock appears, lvmlockd will then
+see more than one VG with a global lock enabled. LVM commands will report
+that there are duplicate global locks.
+.P
+If the situation arises where more than one sanlock VG contains a global
+lock, the global lock should be manually disabled in all but one of them
+with the command:
+.P
+lvmlockctl --gl-disable <vgname>
+.P
+(The one VG with the global lock enabled must be visible to all hosts.)
+.P
+An opposite problem can occur if the VG holding the global lock is
+removed. In this case, no global lock will exist following the vgremove,
+and subsequent LVM commands will fail to acquire it. In this case, the
+global lock needs to be manually enabled in one of the remaining sanlock
+VGs with the command:
+.P
+lvmlockctl --gl-enable <vgname>
+.P
+(Using a small sanlock VG dedicated to holding the global lock can avoid
+the case where the global lock must be manually enabled after a vgremove.)
+.
+.SS Internal lvmlock LV
+.
+A sanlock VG contains a hidden LV called "lvmlock" that holds the sanlock
+locks. vgreduce cannot yet remove the PV holding the lvmlock LV. To
+remove this PV, change the VG lock type to "none", run vgreduce, then
+change the VG lock type back to "sanlock". Similarly, pvmove cannot be
+used on a PV used by the lvmlock LV.
+.P
+To place the lvmlock LV on a specific device, create the VG with only that
+device, then use vgextend to add other devices.
+.
+.SS LV activation
+.
+In a shared VG, LV activation involves locking through lvmlockd, and the
+following values are possible with lvchange/vgchange -a:
+.P
+.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.
+.
+.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 Manually repairing a shared VG
+.
+Some failure conditions may not be repairable while the VG has a shared
+lock type. In these cases, it may be possible to repair the VG by
+forcibly changing the lock type to "none". This is done by adding
+"--lock-opt force" to the normal command for changing the lock type:
+vgchange --lock-type none VG. The VG lockspace should first be stopped on
+all hosts, and be certain that no hosts are using the VG before this is
+done.
+.
+.SS Recover from lost PV holding sanlock locks
+.
+In a sanlock VG, the sanlock locks are held on the hidden "lvmlock" LV.
+If the PV holding this LV is lost, a new lvmlock LV needs to be created.
+To do this, ensure no hosts are using the VG, then forcibly change the
+lock type to "none" (see above). Then change the lock type back to
+"sanlock" with the normal command for changing the lock type: vgchange
+--lock-type sanlock VG. This recreates the internal lvmlock LV with the
+necessary locks.
+.
+.SS Locking system failures
+.
+.B lvmlockd failure
+.P
+If lvmlockd fails or is killed while holding locks, the locks are orphaned
+in the lock manager. Orphaned locks must be cleared or adopted before the
+associated resources can be accessed normally. If lock adoption is
+enabled, lvmlockd keeps a record of locks in the adopt-file. A subsequent
+instance of lvmlockd will then adopt locks orphaned by the previous
+instance. Adoption must be enabled in both instances (--adopt|-A 1).
+Without adoption, the lock manager or host would require a reset to clear
+orphaned lock state.
+.P
+.B dlm/corosync failure
+.P
+If dlm or corosync fail, the clustering system will fence the host using a
+method configured within the dlm/corosync clustering environment.
+.P
+LVM commands on other hosts will be blocked from acquiring any locks until
+the dlm/corosync recovery process is complete.
+.P
+.B sanlock lease storage failure
+.P
+If the PV under a sanlock VG's lvmlock LV is disconnected, unresponsive or
+too slow, sanlock cannot renew the lease for the VG's locks. After some
+time, the lease will expire, and locks that the host owns in the VG can be
+acquired by other hosts. The VG must be forcibly deactivated on the host
+with the expiring lease before other hosts can acquire its locks. This is
+necessary for data protection.
+.P
+When the sanlock daemon detects that VG storage is lost and the VG lease
+is expiring, it runs the command lvmlockctl --kill <vgname>. This command
+emits a syslog message stating that storage is lost for the VG, and that
+LVs in the VG must be immediately deactivated.
+.P
+If no LVs are active in the VG, then the VG lockspace will be removed, and
+errors will be reported when trying to use the VG. Use the lvmlockctl
+--drop command to clear the stale lockspace from lvmlockd.
+.P
+If the VG has active LVs, they must be quickly deactivated before the
+locks expire. After all LVs are deactivated, run lvmlockctl --drop
+<vgname> to clear the expiring lockspace from lvmlockd.
+.P
+If all LVs in the VG are not deactivated within about 40 seconds, sanlock
+uses wdmd and the local watchdog to reset the host. The machine reset is
+effectively a severe form of "deactivating" LVs before they can be
+activated on other hosts. The reset is considered a better alternative
+than having LVs used by multiple hosts at once, which could easily damage
+or destroy their content.
+.P
+.B sanlock lease storage failure automation
+.P
+When the sanlock daemon detects that the lease storage is lost, it runs
+the command lvmlockctl --kill <vgname>. This lvmlockctl command can be
+configured to run another command to forcibly deactivate LVs, taking the
+place of the manual process described above. The other command is
+configured in the lvm.conf lvmlockctl_kill_command setting. The VG name
+is appended to the end of the command specified.
+.P
+The lvmlockctl_kill_command should forcibly deactivate LVs in the VG,
+ensuring that existing writes to LVs in the VG are complete and that
+further writes to the LVs in the VG will be rejected. If it is able to do
+this successfully, it should exit with success, otherwise it should exit
+with an error. If lvmlockctl --kill gets a successful result from
+lvmlockctl_kill_command, it tells lvmlockd to drop locks for the VG (the
+equivalent of running lvmlockctl --drop). If this completes in time, a
+machine reset can be avoided.
+.P
+One possible option is to create a script my_vg_kill_script.sh:
+.nf
+ #!/bin/bash
+ VG=$1
+ # replace dm table with the error target for top level LVs
+ dmsetup wipe_table -S "uuid=~LVM && vgname=$VG && lv_layer=\\"\\""
+ # check that the error target is in place
+ dmsetup table -c -S "uuid=~LVM && vgname=$VG && lv_layer=\\"\\"" |grep -vw error
+ if [[ $? -ne 0 ]] ; then
+ exit 0
+ fi
+ exit 1
+.fi
+.P
+Set in lvm.conf:
+.nf
+ lvmlockctl_kill_command="/usr/sbin/my_vg_kill_script.sh"
+.fi
+.P
+(The script and dmsetup commands should be tested with the actual VG to
+ensure that all top level LVs are properly disabled.)
+.P
+If the lvmlockctl_kill_command is not configured, or fails, lvmlockctl
+--kill will emit syslog messages as described in the previous section,
+notifying the user to manually deactivate the VG before sanlock resets the
+machine.
+.P
+.B sanlock daemon failure
+.P
+If the sanlock daemon fails or exits while a lockspace is started, the
+local watchdog will reset the host. This is necessary to protect any
+application resources that depend on sanlock leases.
+.
+.SS Changing dlm cluster name
+.
+When a dlm VG is created, the cluster name is saved in the VG metadata.
+To use the VG, a host must be in the named dlm cluster. If the dlm
+cluster name changes, or the VG is moved to a new cluster, the dlm cluster
+name saved in the VG must also be changed.
+.P
+To see the dlm cluster name saved in the VG, use the command:
+.br
+vgs -o+locktype,lockargs <vgname>
+.P
+To change the dlm cluster name in the VG when the VG is still used by the
+original cluster:
+.P
+.IP \[bu] 2
+Start the VG on the host changing the lock type
+.br
+vgchange --lock-start <vgname>
+.
+.IP \[bu]
+Stop the VG on all other hosts:
+.br
+vgchange --lock-stop <vgname>
+.
+.IP \[bu]
+Change the VG lock type to none on the host where the VG is started:
+.br
+vgchange --lock-type none <vgname>
+.
+.IP \[bu]
+Change the dlm cluster name on the hosts or move the VG to the new
+cluster. The new dlm cluster must now be running on the host. Verify the
+new name by:
+.br
+cat /sys/kernel/config/dlm/cluster/cluster_name
+.
+.IP \[bu]
+Change the VG lock type back to dlm which sets the new cluster name:
+.br
+vgchange --lock-type dlm <vgname>
+.
+.IP \[bu]
+Start the VG on hosts to use it:
+.br
+vgchange --lock-start <vgname>
+.P
+To change the dlm cluster name in the VG when the dlm cluster name has
+already been changed on the hosts, or the VG has already moved to a
+different cluster:
+.
+.IP \[bu] 2
+Ensure the VG is not being used by any hosts.
+.
+.IP \[bu]
+The new dlm cluster must be running on the host making the change.
+The current dlm cluster name can be seen by:
+.br
+cat /sys/kernel/config/dlm/cluster/cluster_name
+.
+.IP \[bu]
+Change the VG lock type to none:
+.br
+vgchange --lock-type none --lock-opt force <vgname>
+.
+.IP \[bu]
+Change the VG lock type back to dlm which sets the new cluster name:
+.br
+vgchange --lock-type dlm <vgname>
+.
+.IP \[bu]
+Start the VG on hosts to use it:
+.br
+vgchange --lock-start <vgname>
+.
+.SS Changing a local VG to a shared VG
+.
+All LVs must be inactive to change the lock type.
+.P
+lvmlockd must be configured and running as described in USAGE.
+.
+.IP \[bu] 2
+Change a local VG to a shared VG with the command:
+.br
+vgchange --lock-type sanlock|dlm <vgname>
+.
+.IP \[bu]
+Start the VG on hosts to use it:
+.br
+vgchange --lock-start <vgname>
+.
+.SS Changing a shared VG to a local VG
+.
+All LVs must be inactive to change the lock type.
+.P
+.IP \[bu] 2
+Start the VG on the host making the change:
+.br
+vgchange --lock-start <vgname>
+.
+.IP \[bu]
+Stop the VG on all other hosts:
+.br
+vgchange --lock-stop <vgname>
+.
+.IP \[bu]
+Change the VG lock type to none on the host where the VG is started:
+.br
+vgchange --lock-type none <vgname>
+.P
+If the VG cannot be started with the previous lock type, then the lock
+type can be forcibly changed to none with:
+.br
+vgchange --lock-type none --lock-opt force <vgname>
+.P
+To change a VG from one lock type to another (i.e. between sanlock and
+dlm), first change it to a local VG, then to the new type.
+.
+.SS Changing a clvm/clustered VG to a shared VG
+.
+All LVs must be inactive to change the lock type.
+.P
+First change the clvm/clustered VG to a local VG. Within a running clvm
+cluster, change a clustered VG to a local VG with the command:
+.P
+vgchange -cn <vgname>
+.P
+If the clvm cluster is no longer running on any nodes, then extra options
+can be used to forcibly make the VG local. Caution: this is only safe if
+all nodes have stopped using the VG:
+.P
+vgchange --lock-type none --lock-opt force <vgname>
+.P
+After the VG is local, follow the steps described in "changing a local VG
+to a shared VG".
+.
+.SS Extending an LV active on multiple hosts
+.
+With lvmlockd and dlm, a special clustering procedure is used to refresh a
+shared LV on remote cluster nodes after it has been extended on one node.
+.P
+When an LV holding gfs2 or ocfs2 is active on multiple hosts with a shared
+lock, lvextend is permitted to run with an existing shared LV lock in
+place of the normal exclusive LV lock.
+.P
+After lvextend has finished extending the LV, it sends a remote request to
+other nodes running the dlm to run 'lvchange --refresh' on the LV. This
+uses dlm_controld and corosync features.
+.P
+Some special --lockopt values can be used to modify this process.
+"shupdate" permits the lvextend update with an existing shared lock if it
+isn't otherwise permitted. "norefresh" prevents the remote refresh
+operation.
+.
+.SS Limitations of shared VGs
+.
+Things that do not yet work in shared VGs:
+.br
+\[bu]
+using external origins for thin LVs
+.br
+\[bu]
+splitting snapshots from LVs
+.br
+\[bu]
+splitting mirrors in sanlock VGs
+.br
+\[bu]
+pvmove of entire PVs, or under LVs activated with shared locks
+.br
+\[bu]
+vgsplit and vgmerge (convert to a local VG to do this)
+.
+.SS lvmlockd changes from clvmd
+.
+(See above for converting an existing clvm VG to a shared VG.)
+.P
+While lvmlockd and clvmd are entirely different systems, LVM command usage
+remains similar. Differences are more notable when using lvmlockd's
+sanlock option.
+.P
+Visible usage differences between shared VGs (using lvmlockd) and
+clvm/clustered VGs (using clvmd):
+.
+.IP \[bu] 2
+lvm.conf is configured to use lvmlockd by setting use_lvmlockd=1.
+clvmd used locking_type=3.
+.
+.IP \[bu]
+vgcreate --shared creates a shared VG. vgcreate --clustered y
+created a clvm/clustered VG.
+.
+.IP \[bu]
+lvmlockd adds the option of using sanlock for locking, avoiding the
+need for network clustering.
+.
+.IP \[bu]
+lvmlockd defaults to the exclusive activation mode whenever the activation
+mode is unspecified, i.e. -ay means -aey, not -asy.
+.
+.IP \[bu]
+lvmlockd commands always apply to the local host, and never have an effect
+on a remote host. (The activation option 'l' is not used.)
+.
+.IP \[bu]
+lvmlockd saves the cluster name for a shared VG using dlm. Only hosts in
+the matching cluster can use the VG.
+.
+.IP \[bu]
+lvmlockd requires starting/stopping shared VGs with vgchange --lock-start
+and --lock-stop.
+.
+.IP \[bu]
+vgremove of a sanlock VG may fail indicating that all hosts have not
+stopped the VG lockspace. Stop the VG on all hosts using vgchange
+--lock-stop.
+.
+.IP \[bu]
+vgreduce or pvmove of a PV in a sanlock VG will fail if it holds the
+internal "lvmlock" LV that holds the sanlock locks.
+.
+.IP \[bu]
+lvmlockd uses lock retries instead of lock queueing, so high lock
+contention may require increasing global/lvmlockd_lock_retries to
+avoid transient lock failures.
+.
+.IP \[bu]
+lvmlockd includes VG reporting options lock_type and lock_args, and LV
+reporting option lock_args to view the corresponding metadata fields.
+.
+.IP \[bu]
+In the 'vgs' command's sixth VG attr field, "s" for "shared" is displayed
+for shared VGs.
+.
+.IP \[bu]
+If lvmlockd fails or is killed while in use, locks it held remain but are
+orphaned in the lock manager. lvmlockd can be restarted with an option to
+adopt the orphan locks from the previous instance of lvmlockd.
+.
+.IP \[bu]
+The 'lvs' command does not report any remote state, because lvmlockd is
+unable to passively check the remote active or lock state of an LV.
+.
+.SH SEE ALSO
+.
+.BR lvm (8),
+.BR lvmlockctl (8)
diff --git a/man/lvmpolld.8_main b/man/lvmpolld.8_main
new file mode 100644
index 0000000..a8d99c9
--- /dev/null
+++ b/man/lvmpolld.8_main
@@ -0,0 +1,112 @@
+.TH LVMPOLLD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
+.
+.SH NAME
+.
+lvmpolld \(em LVM poll daemon
+.
+.SH SYNOPSIS
+.
+.B lvmpolld
+.nh
+.ad l
+.RB [ -l | --log
+.BR all | wire | debug ]
+.RB [ -p | --pidfile
+.IR pidfile_path ]
+.RB [ -s | --socket
+.IR socket_path ]
+.RB [ -B | --binary
+.IR lvm_binary_path ]
+.RB [ -t | --timeout
+.IR timeout_value ]
+.RB [ -f | --foreground ]
+.RB [ -h | --help ]
+.RB [ -V | --version ]
+.ad b
+.hy
+.P
+.B lvmpolld
+.RB [ --dump ]
+.
+.SH DESCRIPTION
+.
+lvmpolld is polling daemon for LVM. The daemon receives requests for polling
+of already initialised operations originating in LVM2 command line tool.
+The requests for polling originate in the \fBlvconvert\fP, \fBpvmove\fP,
+\fBlvchange\fP or \fBvgchange\fP LVM2 commands.
+.P
+The purpose of lvmpolld is to reduce the number of spawned background processes
+per otherwise unique polling operation. There should be only one. It also
+eliminates the possibility of unsolicited termination of background process by
+external factors.
+.P
+lvmpolld is used by LVM only if it is enabled in \fBlvm.conf\fP(5) by
+specifying the \fBglobal/use_lvmpolld\fP setting. If this is not defined in the
+LVM configuration explicitly then default setting is used instead (see the
+output of \fBlvmconfig --type default global/use_lvmpolld\fP command).
+.
+.SH OPTIONS
+.
+To run the daemon in a test environment both the pidfile_path and the
+socket_path should be changed from the defaults.
+.
+.TP
+.BR -f | --foreground
+Don't fork, but run in the foreground.
+.TP
+.BR -h | --help
+Show help information.
+.
+.TP
+.BR -l | --log " " all | wire | debug
+Select the type of log messages to generate.
+Messages are logged by syslog.
+Additionally, when \fB-f\fP is given they are also sent to standard error.
+There are two classes of messages: wire and debug. Selecting '\fBall\fP' supplies both
+and is equivalent to a comma-separated list \fB-l wire,debug\fP.
+.
+.TP
+.BR -p | --pidfile " " \fIpidfile_path
+Path to the pidfile. This overrides both the built-in default
+(\fI#DEFAULT_PID_DIR#/lvmpolld.pid\fP) and the environment variable
+\fBLVM_LVMPOLLD_PIDFILE\fP. This file is used to prevent more
+than one instance of the daemon running simultaneously.
+.
+.TP
+.BR -s | --socket " " \fIsocket_path
+Path to the socket file. This overrides both the built-in default
+(\fI#DEFAULT_RUN_DIR#/lvmpolld.socket\fP) and the environment variable
+\fBLVM_LVMPOLLD_SOCKET\fP.
+.
+.TP
+.BR -t | --timeout " " \fItimeout_value
+The daemon may shutdown after being idle for the given time (in seconds). When the
+option is omitted or the value given is zero the daemon never shutdowns on idle.
+.
+.TP
+.BR -B | --binary " " \fIlvm_binary_path
+Optional path to alternative LVM binary (default: \fI#LVM_PATH#\fP). Use for
+testing purposes only.
+.
+.TP
+.BR -V | --version
+Display the version of lvmpolld daemon.
+.TP
+.B --dump
+Contact the running lvmpolld daemon to obtain the complete state and print it
+out in a raw format.
+.
+.SH ENVIRONMENT VARIABLES
+.
+.TP
+.B LVM_LVMPOLLD_PIDFILE
+Path for the pid file.
+.
+.TP
+.B LVM_LVMPOLLD_SOCKET
+Path for the socket file.
+.
+.SH SEE ALSO
+.
+.BR lvm (8),
+.BR lvm.conf (5)
diff --git a/man/lvmraid.7_main b/man/lvmraid.7_main
new file mode 100644
index 0000000..086f534
--- /dev/null
+++ b/man/lvmraid.7_main
@@ -0,0 +1,1867 @@
+.TH "LVMRAID" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.de ipbu
+.PD 0
+.IP " \[bu]"
+.PD
+..
+.
+.de ipbu_npd
+.IP " \[bu]"
+..
+.
+.SH NAME
+.
+lvmraid \(em LVM RAID
+.
+.SH DESCRIPTION
+.
+\fBlvm\fP(8) RAID is a way to create a Logical Volume (LV) that uses
+multiple physical devices to improve performance or tolerate device
+failures. In LVM, the physical devices are Physical Volumes (PVs) in a
+single Volume Group (VG).
+.P
+How LV data blocks are placed onto PVs is determined by the RAID level.
+RAID levels are commonly referred to as 'raid' followed by a number, e.g.
+raid1, raid5 or raid6. Selecting a RAID level involves making tradeoffs
+among: physical device requirements, fault tolerance, and performance. A
+description of the RAID levels can be found at
+.br
+.I www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf
+.P
+LVM RAID uses both Device Mapper (DM) and Multiple Device (MD) drivers
+from the Linux kernel. DM is used to create and manage visible LVM
+devices, and MD is used to place data on physical devices.
+.P
+LVM creates hidden LVs (dm devices) layered between the visible LV and
+physical devices. LVs in the middle layers are called sub LVs.
+For LVM raid, a sub LV pair to store data and metadata (raid superblock
+and write intent bitmap) is created per raid image/leg (see lvs command examples below).
+.
+.SH USAGE
+.
+To create a RAID LV, use lvcreate and specify an LV type.
+The LV type corresponds to a RAID level.
+The basic RAID levels that can be used are:
+.BR raid0 ", " raid1 ", " raid4 ", " raid5 ", " raid6 ", " raid10 .
+.P
+.B lvcreate --type
+.I RaidLevel
+.RI [ OPTIONS ]
+.B --name
+.I Name
+.B --size
+.I Size
+.I VG
+.RI [ PVs ]
+.P
+To display the LV type of an existing LV, run:
+.P
+.B lvs -o name,segtype \fILV
+.P
+(The LV type is also referred to as "segment type" or "segtype".)
+.P
+LVs can be created with the following types:
+.
+.SS raid0
+.
+Also called striping, raid0 spreads LV data across multiple devices in
+units of stripe size. This is used to increase performance. LV data will
+be lost if any of the devices fail.
+.P
+.B lvcreate --type raid0
+.RB [ --stripes
+.I Number
+.B --stripesize
+.IR Size ]
+.I VG
+.RI [ PVs ]
+.
+.TP
+.B --stripes \fINumber
+specifies the \fINumber\fP of devices to spread the LV across.
+.
+.TP
+.B --stripesize \fISize
+specifies the \fISize\fP of each stripe in kilobytes. This is the amount of
+data that is written to one device before moving to the next.
+.P
+\fIPVs\fP specifies the devices to use. If not specified, lvm will choose
+\fINumber\fP devices, one for each stripe based on the number of PVs
+available or supplied.
+.
+.SS raid1
+.
+Also called mirroring, raid1 uses multiple devices to duplicate LV data.
+The LV data remains available if all but one of the devices fail.
+The minimum number of devices (i.e. sub LV pairs) required is 2.
+.P
+.B lvcreate --type raid1
+[\fB--mirrors\fP \fINumber\fP]
+\fIVG\fP
+[\fIPVs\fP]
+.
+.TP
+.B --mirrors \fINumber
+specifies the \fINumber\fP of mirror images in addition to the original LV
+image, e.g. --mirrors 1 means there are two images of the data, the
+original and one mirror image.
+.P
+\fIPVs\fP specifies the devices to use. If not specified, lvm will choose
+\fINumber\fP devices, one for each image.
+.
+.SS raid4
+.
+raid4 is a form of striping that uses an extra, first device dedicated to
+storing parity blocks. The LV data remains available if one device fails. The
+parity is used to recalculate data that is lost from a single device. The
+minimum number of devices required is 3.
+.P
+.B lvcreate --type raid4
+[\fB--stripes\fP \fINumber\fP \fB--stripesize\fP \fISize\fP]
+\fIVG\fP
+[\fIPVs\fP]
+.
+.TP
+.B --stripes \fINumber
+specifies the \fINumber\fP of devices to use for LV data. This does not include
+the extra device lvm adds for storing parity blocks. A raid4 LV with
+\fINumber\fP stripes requires \fINumber\fP+1 devices. \fINumber\fP must
+be 2 or more.
+.
+.TP
+.B --stripesize \fISize
+specifies the \fISize\fP of each stripe in kilobytes. This is the amount of
+data that is written to one device before moving to the next.
+.P
+\fIPVs\fP specifies the devices to use. If not specified, lvm will choose
+\fINumber\fP+1 separate devices.
+.P
+raid4 is called non-rotating parity because the parity blocks are always
+stored on the same device.
+.
+.SS raid5
+.
+raid5 is a form of striping that uses an extra device for storing parity
+blocks. LV data and parity blocks are stored on each device, typically in
+a rotating pattern for performance reasons. The LV data remains available
+if one device fails. The parity is used to recalculate data that is lost
+from a single device. The minimum number of devices required is 3 (unless
+converting from 2 legged raid1 to reshape to more stripes; see reshaping).
+.P
+.B lvcreate --type raid5
+[\fB--stripes\fP \fINumber\fP \fB--stripesize\fP \fISize\fP]
+\fIVG\fP
+[\fIPVs\fP]
+.
+.TP
+.B --stripes \fINumber
+specifies the \fINumber\fP of devices to use for LV data. This does not include
+the extra device lvm adds for storing parity blocks. A raid5 LV with
+\fINumber\fP stripes requires \fINumber\fP+1 devices. \fINumber\fP must
+be 2 or more.
+.
+.TP
+.B --stripesize \fISize
+specifies the \fISize\fP of each stripe in kilobytes. This is the amount of
+data that is written to one device before moving to the next.
+.P
+\fIPVs\fP specifies the devices to use. If not specified, lvm will choose
+\fINumber\fP+1 separate devices.
+.P
+raid5 is called rotating parity because the parity blocks are placed on
+different devices in a round-robin sequence. There are variations of
+raid5 with different algorithms for placing the parity blocks. The
+default variant is raid5_ls (raid5 left symmetric, which is a rotating
+parity 0 with data restart.) See \fBRAID5 VARIANTS\fP below.
+.
+.SS raid6
+.
+raid6 is a form of striping like raid5, but uses two extra devices for
+parity blocks. LV data and parity blocks are stored on each device, typically
+in a rotating pattern for performance reasons. The
+LV data remains available if up to two devices fail. The parity is used
+to recalculate data that is lost from one or two devices. The minimum
+number of devices required is 5.
+.P
+.B lvcreate --type raid6
+[\fB--stripes\fP \fINumber\fP \fB--stripesize\fP \fISize\fP]
+\fIVG\fP
+[\fIPVs\fP]
+.
+.TP
+.B --stripes \fINumber
+specifies the \fINumber\fP of devices to use for LV data. This does not include
+the extra two devices lvm adds for storing parity blocks. A raid6 LV with
+\fINumber\fP stripes requires \fINumber\fP+2 devices. \fINumber\fP must be
+3 or more.
+.
+.TP
+.B --stripesize \fISize
+specifies the \fISize\fP of each stripe in kilobytes. This is the amount of
+data that is written to one device before moving to the next.
+.P
+\fIPVs\fP specifies the devices to use. If not specified, lvm will choose
+\fINumber\fP+2 separate devices.
+.P
+Like raid5, there are variations of raid6 with different algorithms for
+placing the parity blocks. The default variant is raid6_zr (raid6 zero
+restart, aka left symmetric, which is a rotating parity 0 with data
+restart.) See \fBRAID6 VARIANTS\fP below.
+.
+.SS raid10
+.
+raid10 is a combination of raid1 and raid0, striping data across mirrored
+devices. LV data remains available if one or more devices remains in each
+mirror set. The minimum number of devices required is 4.
+.TP
+.B lvcreate --type raid10
+[\fB--mirrors\fP \fINumberMirrors\fP]
+.br
+[\fB--stripes\fP \fINumberStripes\fP \fB--stripesize\fP \fISize\fP]
+.br
+\fIVG\fP
+[\fIPVs\fP]
+.
+.TP
+.B --mirrors \fINumberMirrors
+specifies the number of mirror images within each stripe. e.g.
+--mirrors 1 means there are two images of the data, the original and one
+mirror image.
+.
+.TP
+.B --stripes \fINumberStripes
+specifies the total number of devices to use in all raid1 images (not the
+number of raid1 devices to spread the LV across, even though that is the
+effective result). The number of devices in each raid1 mirror will be
+\fINumberStripes\fP/(\fINumberMirrors\fP+1), e.g. mirrors 1 and stripes 4 will stripe
+data across two raid1 mirrors, where each mirror is devices.
+.
+.TP
+.B --stripesize \fISize
+specifies the \fISize\fP of each stripe in kilobytes. This is the amount of
+data that is written to one device before moving to the next.
+.P
+\fIPVs\fP specifies the devices to use. If not specified, lvm will choose
+the necessary devices. Devices are used to create mirrors in the
+order listed, e.g. for mirrors 1, stripes 2, listing PV1 PV2 PV3 PV4
+results in mirrors PV1/PV2 and PV3/PV4.
+.P
+RAID10 is not mirroring on top of stripes, which would be RAID01, which is
+less tolerant of device failures.
+.
+.SS Configuration Options
+.
+There are a number of options in the LVM configuration file that affect
+the behavior of RAID LVs. The tunable options are listed
+below. A detailed description of each can be found in the LVM
+configuration file itself.
+.RS
+mirror_segtype_default
+.br
+raid10_segtype_default
+.br
+raid_region_size
+.br
+raid_fault_policy
+.br
+activation_mode
+.RE
+.
+.SS Monitoring
+.
+When a RAID LV is activated the \fBdmeventd\fP(8) process is started to
+monitor the health of the LV. Various events detected in the kernel can
+cause a notification to be sent from device-mapper to the monitoring
+process, including device failures and synchronization completion (e.g.
+for initialization or scrubbing).
+.P
+The LVM configuration file contains options that affect how the monitoring
+process will respond to failure events (e.g. raid_fault_policy). It is
+possible to turn on and off monitoring with lvchange, but it is not
+recommended to turn this off unless you have a thorough knowledge of the
+consequences.
+.
+.SS Synchronization
+.
+Synchronization is the process that makes all the devices in a RAID LV
+consistent with each other.
+.P
+In a RAID1 LV, all mirror images should have the same data. When a new
+mirror image is added, or a mirror image is missing data, then images need
+to be synchronized. Data blocks are copied from an existing image to a
+new or outdated image to make them match.
+.P
+In a RAID 4/5/6 LV, parity blocks and data blocks should match based on
+the parity calculation. When the devices in a RAID LV change, the data
+and parity blocks can become inconsistent and need to be synchronized.
+Correct blocks are read, parity is calculated, and recalculated blocks are
+written.
+.P
+The RAID implementation keeps track of which parts of a RAID LV are
+synchronized. When a RAID LV is first created and activated the first
+synchronization is called initialization. A pointer stored in the raid
+metadata keeps track of the initialization process thus allowing it to be
+restarted after a deactivation of the RaidLV or a crash. Any writes to
+the RaidLV dirties the respective region of the write intent bitmap which
+allow for fast recovery of the regions after a crash. Without this, the
+entire LV would need to be synchronized every time it was activated.
+.P
+Automatic synchronization happens when a RAID LV is activated, but it is
+usually partial because the bitmaps reduce the areas that are checked.
+A full sync becomes necessary when devices in the RAID LV are replaced.
+.P
+The synchronization status of a RAID LV is reported by the
+following command, where "Cpy%Sync" = "100%" means sync is complete:
+.P
+.B lvs -a -o name,sync_percent
+.
+.SS Scrubbing
+.
+Scrubbing is a full scan of the RAID LV requested by a user.
+Scrubbing can find problems that are missed by partial synchronization.
+.P
+Scrubbing assumes that RAID metadata and bitmaps may be inaccurate, so it
+verifies all RAID metadata, LV data, and parity blocks. Scrubbing can
+find inconsistencies caused by hardware errors or degradation. These
+kinds of problems may be undetected by automatic synchronization which
+excludes areas outside of the RAID write-intent bitmap.
+.P
+The command to scrub a RAID LV can operate in two different modes:
+.P
+.B lvchange --syncaction
+.BR check | repair
+.I LV
+.
+.TP
+.B check
+Check mode is read-only and only detects inconsistent areas in the RAID
+LV, it does not correct them.
+.
+.TP
+.B repair
+Repair mode checks and writes corrected blocks to synchronize any
+inconsistent areas.
+.P
+Scrubbing can consume a lot of bandwidth and slow down application I/O on
+the RAID LV. To control the I/O rate used for scrubbing, use:
+.
+.TP
+.BR --maxrecoveryrate " " \fISize [k|UNIT]
+Sets the maximum recovery rate for a RAID LV. \fISize\fP is specified as
+an amount per second for each device in the array. If no suffix is given,
+then KiB/sec/device is used. Setting the recovery rate to \fB0\fP
+means it will be unbounded.
+.
+.TP
+.BR --minrecoveryrate " " \fISize [k|UNIT]
+Sets the minimum recovery rate for a RAID LV. \fISize\fP is specified as
+an amount per second for each device in the array. If no suffix is given,
+then KiB/sec/device is used. Setting the recovery rate to \fB0\fP
+means it will be unbounded.
+.P
+To display the current scrubbing in progress on an LV, including
+the syncaction mode and percent complete, run:
+.P
+.B lvs -a -o name,raid_sync_action,sync_percent
+.P
+After scrubbing is complete, to display the number of inconsistent blocks
+found, run:
+.P
+.B lvs -o name,raid_mismatch_count
+.P
+Also, if mismatches were found, the lvs attr field will display the letter
+"m" (mismatch) in the 9th position, e.g.
+.P
+.nf
+# lvs -o name,vgname,segtype,attr vg/lv
+ LV VG Type Attr
+ lv vg raid1 Rwi-a-r-m-
+.fi
+.
+.SS Scrubbing Limitations
+.
+The \fBcheck\fP mode can only report the number of inconsistent blocks, it
+cannot report which blocks are inconsistent. This makes it impossible to
+know which device has errors, or if the errors affect file system data,
+metadata or nothing at all.
+.P
+The \fBrepair\fP mode can make the RAID LV data consistent, but it does
+not know which data is correct. The result may be consistent but
+incorrect data. When two different blocks of data must be made
+consistent, it chooses the block from the device that would be used during
+RAID initialization. However, if the PV holding corrupt data is known,
+lvchange --rebuild can be used in place of scrubbing to reconstruct the
+data on the bad device.
+.P
+Future developments might include:
+.P
+Allowing a user to choose the correct version of data during repair.
+.P
+Using a majority of devices to determine the correct version of data to
+use in a 3-way RAID1 or RAID6 LV.
+.P
+Using a checksumming device to pin-point when and where an error occurs,
+allowing it to be rewritten.
+.
+.SS SubLVs
+.
+An LV is often a combination of other hidden LVs called SubLVs. The
+SubLVs either use physical devices, or are built from other SubLVs
+themselves. SubLVs hold LV data blocks, RAID parity blocks, and RAID
+metadata. SubLVs are generally hidden, so the lvs -a option is required
+to display them:
+.P
+.B lvs -a -o name,segtype,devices
+.P
+SubLV names begin with the visible LV name, and have an automatic suffix
+indicating its role:
+.
+.ipbu_npd
+SubLVs holding LV data or parity blocks have the suffix _rimage_#.
+.br
+These SubLVs are sometimes referred to as DataLVs.
+.
+.ipbu_npd
+SubLVs holding RAID metadata have the suffix _rmeta_#. RAID metadata
+includes superblock information, RAID type, bitmap, and device health
+information.
+.br
+These SubLVs are sometimes referred to as MetaLVs.
+.P
+SubLVs are an internal implementation detail of LVM. The way they are
+used, constructed and named may change.
+.P
+The following examples show the SubLV arrangement for each of the basic
+RAID LV types, using the fewest number of devices allowed for each.
+.P
+.I Examples
+.P
+.B raid0
+.br
+Each rimage SubLV holds a portion of LV data. No parity is used.
+No RAID metadata is used.
+.P
+.nf
+# lvcreate --type raid0 --stripes 2 --name lvr0 ...
+.P
+# lvs -a -o name,segtype,devices
+ lvr0 raid0 lvr0_rimage_0(0),lvr0_rimage_1(0)
+ [lvr0_rimage_0] linear /dev/sda(...)
+ [lvr0_rimage_1] linear /dev/sdb(...)
+.fi
+.P
+.B raid1
+.br
+Each rimage SubLV holds a complete copy of LV data. No parity is used.
+Each rmeta SubLV holds RAID metadata.
+.P
+.nf
+# lvcreate --type raid1 --mirrors 1 --name lvr1 ...
+.P
+# lvs -a -o name,segtype,devices
+ lvr1 raid1 lvr1_rimage_0(0),lvr1_rimage_1(0)
+ [lvr1_rimage_0] linear /dev/sda(...)
+ [lvr1_rimage_1] linear /dev/sdb(...)
+ [lvr1_rmeta_0] linear /dev/sda(...)
+ [lvr1_rmeta_1] linear /dev/sdb(...)
+.fi
+.P
+.B raid4
+.br
+At least three rimage SubLVs each hold a portion of LV data and one rimage SubLV
+holds parity. Each rmeta SubLV holds RAID metadata.
+.P
+.nf
+# lvcreate --type raid4 --stripes 2 --name lvr4 ...
+.P
+# lvs -a -o name,segtype,devices
+ lvr4 raid4 lvr4_rimage_0(0),\\
+ lvr4_rimage_1(0),\\
+ lvr4_rimage_2(0)
+ [lvr4_rimage_0] linear /dev/sda(...)
+ [lvr4_rimage_1] linear /dev/sdb(...)
+ [lvr4_rimage_2] linear /dev/sdc(...)
+ [lvr4_rmeta_0] linear /dev/sda(...)
+ [lvr4_rmeta_1] linear /dev/sdb(...)
+ [lvr4_rmeta_2] linear /dev/sdc(...)
+.fi
+.P
+.B raid5
+.br
+At least three rimage SubLVs each typically hold a portion of LV data and parity
+(see section on raid5)
+Each rmeta SubLV holds RAID metadata.
+.P
+.nf
+# lvcreate --type raid5 --stripes 2 --name lvr5 ...
+.P
+# lvs -a -o name,segtype,devices
+ lvr5 raid5 lvr5_rimage_0(0),\\
+ lvr5_rimage_1(0),\\
+ lvr5_rimage_2(0)
+ [lvr5_rimage_0] linear /dev/sda(...)
+ [lvr5_rimage_1] linear /dev/sdb(...)
+ [lvr5_rimage_2] linear /dev/sdc(...)
+ [lvr5_rmeta_0] linear /dev/sda(...)
+ [lvr5_rmeta_1] linear /dev/sdb(...)
+ [lvr5_rmeta_2] linear /dev/sdc(...)
+.fi
+.P
+.B raid6
+.br
+At least five rimage SubLVs each typically hold a portion of LV data and parity.
+(see section on raid6)
+Each rmeta SubLV holds RAID metadata.
+.P
+.nf
+# lvcreate --type raid6 --stripes 3 --name lvr6
+.P
+# lvs -a -o name,segtype,devices
+ lvr6 raid6 lvr6_rimage_0(0),\\
+ lvr6_rimage_1(0),\\
+ lvr6_rimage_2(0),\\
+ lvr6_rimage_3(0),\\
+ lvr6_rimage_4(0),\\
+ lvr6_rimage_5(0)
+ [lvr6_rimage_0] linear /dev/sda(...)
+ [lvr6_rimage_1] linear /dev/sdb(...)
+ [lvr6_rimage_2] linear /dev/sdc(...)
+ [lvr6_rimage_3] linear /dev/sdd(...)
+ [lvr6_rimage_4] linear /dev/sde(...)
+ [lvr6_rimage_5] linear /dev/sdf(...)
+ [lvr6_rmeta_0] linear /dev/sda(...)
+ [lvr6_rmeta_1] linear /dev/sdb(...)
+ [lvr6_rmeta_2] linear /dev/sdc(...)
+ [lvr6_rmeta_3] linear /dev/sdd(...)
+ [lvr6_rmeta_4] linear /dev/sde(...)
+ [lvr6_rmeta_5] linear /dev/sdf(...)
+.fi
+.P
+.B raid10
+.br
+At least four rimage SubLVs each hold a portion of LV data. No parity is used.
+Each rmeta SubLV holds RAID metadata.
+.P
+.nf
+# lvcreate --type raid10 --stripes 2 --mirrors 1 --name lvr10
+.P
+# lvs -a -o name,segtype,devices
+ lvr10 raid10 lvr10_rimage_0(0),\\
+ lvr10_rimage_1(0),\\
+ lvr10_rimage_2(0),\\
+ lvr10_rimage_3(0)
+ [lvr10_rimage_0] linear /dev/sda(...)
+ [lvr10_rimage_1] linear /dev/sdb(...)
+ [lvr10_rimage_2] linear /dev/sdc(...)
+ [lvr10_rimage_3] linear /dev/sdd(...)
+ [lvr10_rmeta_0] linear /dev/sda(...)
+ [lvr10_rmeta_1] linear /dev/sdb(...)
+ [lvr10_rmeta_2] linear /dev/sdc(...)
+ [lvr10_rmeta_3] linear /dev/sdd(...)
+.fi
+.
+.SH DEVICE FAILURE
+.
+Physical devices in a RAID LV can fail or be lost for multiple reasons.
+A device could be disconnected, permanently failed, or temporarily
+disconnected. The purpose of RAID LVs (levels 1 and higher) is to
+continue operating in a degraded mode, without losing LV data, even after
+a device fails. The number of devices that can fail without the loss of
+LV data depends on the RAID level:
+.
+.ipbu
+RAID0 (striped) LVs cannot tolerate losing any devices. LV data will be
+lost if any devices fail.
+.
+.ipbu
+RAID1 LVs can tolerate losing all but one device without LV data loss.
+.
+.ipbu
+RAID4 and RAID5 LVs can tolerate losing one device without LV data loss.
+.
+.ipbu
+RAID6 LVs can tolerate losing two devices without LV data loss.
+.
+.ipbu
+RAID10 is variable, and depends on which devices are lost. It stripes
+across multiple mirror groups with raid1 layout thus it can tolerate
+losing all but one device in each of these groups without LV data loss.
+.P
+If a RAID LV is missing devices, or has other device-related problems, lvs
+reports this in the health_status (and attr) fields:
+.P
+.B lvs -o name,lv_health_status
+.
+.TP
+.B partial
+Devices are missing from the LV. This is also indicated by the letter "p"
+(partial) in the 9th position of the lvs attr field.
+.
+.TP
+.B refresh needed
+A device was temporarily missing but has returned. The LV needs to be
+refreshed to use the device again (which will usually require
+partial synchronization). This is also indicated by the letter "r" (refresh
+needed) in the 9th position of the lvs attr field. See
+\fBRefreshing an LV\fP. This could also indicate a problem with the
+device, in which case it should be be replaced, see
+\fBReplacing Devices\fP.
+.
+.TP
+.B mismatches exist
+See
+.BR Scrubbing .
+.P
+Most commands will also print a warning if a device is missing, e.g.
+.br
+.nf
+WARNING: Device for PV uItL3Z-wBME-DQy0-... not found or rejected ...
+.fi
+.P
+This warning will go away if the device returns or is removed from the
+VG (see \fBvgreduce --removemissing\fP).
+.
+.SS Activating an LV with missing devices
+.
+A RAID LV that is missing devices may be activated or not, depending on
+the "activation mode" used in lvchange:
+.P
+.B lvchange -ay --activationmode
+.BR complete | degraded | partial
+.I LV
+.
+.TP
+.B complete
+The LV is only activated if all devices are present.
+.
+.TP
+.B degraded
+The LV is activated with missing devices if the RAID level can
+tolerate the number of missing devices without LV data loss.
+.
+.TP
+.B partial
+The LV is always activated, even if portions of the LV data are missing
+because of the missing device(s). This should only be used to perform
+extreme recovery or repair operations.
+.P
+Default activation mode when not specified by the command:
+.br
+.BR lvm.conf (5)
+.B activation/activation_mode
+.P
+The default value is printed by:
+.br
+# lvmconfig --type default activation/activation_mode
+.
+.SS Replacing Devices
+.
+Devices in a RAID LV can be replaced by other devices in the VG. When
+replacing devices that are no longer visible on the system, use lvconvert
+--repair. When replacing devices that are still visible, use lvconvert
+--replace. The repair command will attempt to restore the same number
+of data LVs that were previously in the LV. The replace option can be
+repeated to replace multiple PVs. Replacement devices can be optionally
+listed with either option.
+.P
+.B lvconvert --repair
+.I LV
+[\fINewPVs\fP]
+.P
+.B lvconvert --replace
+\fIOldPV\fP
+.I LV
+[\fINewPV\fP]
+.P
+.B lvconvert
+.B --replace
+\fIOldPV1\fP
+.B --replace
+\fIOldPV2\fP
+...
+.I LV
+[\fINewPVs\fP]
+.P
+New devices require synchronization with existing devices.
+.br
+See
+.BR Synchronization .
+.
+.SS Refreshing an LV
+.
+Refreshing a RAID LV clears any transient device failures (device was
+temporarily disconnected) and returns the LV to its fully redundant mode.
+Restoring a device will usually require at least partial synchronization
+(see \fBSynchronization\fP). Failure to clear a transient failure results
+in the RAID LV operating in degraded mode until it is reactivated. Use
+the lvchange command to refresh an LV:
+.P
+.B lvchange --refresh
+.I LV
+.P
+.nf
+# lvs -o name,vgname,segtype,attr,size vg
+ LV VG Type Attr LSize
+ lv vg raid1 Rwi-a-r-r- 100.00g
+.P
+# lvchange --refresh vg/lv
+.P
+# lvs -o name,vgname,segtype,attr,size vg
+ LV VG Type Attr LSize
+ lv vg raid1 Rwi-a-r--- 100.00g
+.fi
+.
+.SS Automatic repair
+.
+If a device in a RAID LV fails, device-mapper in the kernel notifies the
+.BR dmeventd (8)
+monitoring process (see \fBMonitoring\fP).
+dmeventd can be configured to automatically respond using:
+.br
+.BR lvm.conf (5)
+.B activation/raid_fault_policy
+.P
+Possible settings are:
+.
+.TP
+.B warn
+A warning is added to the system log indicating that a device has
+failed in the RAID LV. It is left to the user to repair the LV, e.g.
+replace failed devices.
+.
+.TP
+.B allocate
+dmeventd automatically attempts to repair the LV using spare devices
+in the VG. Note that even a transient failure is treated as a permanent
+failure under this setting. A new device is allocated and full
+synchronization is started.
+.P
+The specific command run by \fBdmeventd\fP(8) to warn or repair is:
+.br
+.B lvconvert --repair --use-policies
+.I LV
+.
+.SS Corrupted Data
+.
+Data on a device can be corrupted due to hardware errors without the
+device ever being disconnected or there being any fault in the software.
+This should be rare, and can be detected (see \fBScrubbing\fP).
+.
+.SS Rebuild specific PVs
+.
+If specific PVs in a RAID LV are known to have corrupt data, the data on
+those PVs can be reconstructed with:
+.P
+.B lvchange --rebuild
+.I PV
+.I LV
+.P
+The rebuild option can be repeated with different PVs to replace the data
+on multiple PVs.
+.
+.SH DATA INTEGRITY
+.
+The device mapper integrity target can be used in combination with RAID
+levels 1,4,5,6,10 to detect and correct data corruption in RAID images. A
+dm-integrity layer is placed above each RAID image, and an extra sub LV is
+created to hold integrity metadata (data checksums) for each RAID image.
+When data is read from an image, integrity checksums are used to detect
+corruption. If detected, dm-raid reads the data from another (good) image
+to return to the caller. dm-raid will also automatically write the good
+data back to the image with bad data to correct the corruption.
+.P
+When creating a RAID LV with integrity, or adding integrity, space is
+required for integrity metadata. Every 500MB of LV data requires an
+additional 4MB to be allocated for integrity metadata, for each RAID
+image.
+.P
+Create a RAID LV with integrity:
+.br
+.B lvcreate --type raidN --raidintegrity y
+.P
+Add integrity to an existing RAID LV:
+.br
+.B lvconvert --raidintegrity y \fILV
+.P
+Remove integrity from a RAID LV:
+.br
+.B lvconvert --raidintegrity n \fILV
+.
+.SS Integrity options
+.
+.TP
+.BR --raidintegritymode " " journal | bitmap
+Use a journal (default) or bitmap for keeping integrity checksums
+consistent in case of a crash. The bitmap areas are recalculated after a
+crash, so corruption in those areas would not be detected. A journal does
+not have this problem. The journal mode doubles writes to storage, but
+can improve performance for scattered writes packed into a single journal
+write. bitmap mode can in theory achieve full write throughput of the
+device, but would not benefit from the potential scattered write
+optimization.
+.
+.TP
+.BR --raidintegrityblocksize " " 512 | 1024 | 2048 | 4096
+The block size to use for dm-integrity on raid images. The integrity
+block size should usually match the device logical block size, or the file
+system sector/block sizes. It may be less than the file system
+sector/block size, but not less than the device logical block size.
+Possible values: 512, 1024, 2048, 4096.
+.
+.SS Integrity initialization
+.
+When integrity is added to an LV, the kernel needs to initialize the
+integrity metadata (checksums) for all blocks in the LV. The data
+corruption checking performed by dm-integrity will only operate on areas
+of the LV that are already initialized. The progress of integrity
+initialization is reported by the "syncpercent" LV reporting field (and
+under the Cpy%Sync lvs column.)
+.
+.SS Integrity limitations
+.
+To work around some limitations, it is possible to remove integrity from
+the LV, make the change, then add integrity again. (Integrity metadata
+would need to initialized when added again.)
+.P
+LVM must be able to allocate the integrity metadata sub LV on a single PV
+that is already in use by the associated RAID image. This can potentially
+cause a problem during lvextend if the original PV holding the image and
+integrity metadata is full. To work around this limitation, remove
+integrity, extend the LV, and add integrity again.
+.P
+Additional RAID images can be added to raid1 LVs, but not to other raid
+levels.
+.P
+A raid1 LV with integrity cannot be converted to linear (remove integrity
+to do this.)
+.P
+RAID LVs with integrity cannot yet be used as sub LVs with other LV types.
+.P
+The following are not yet permitted on RAID LVs with integrity: lvreduce,
+pvmove, lvconvert --splitmirrors, lvchange --syncaction, lvchange --rebuild.
+.
+.SH RAID1 TUNING
+.
+A RAID1 LV can be tuned so that certain devices are avoided for reading
+while all devices are still written to.
+.P
+.B lvchange
+.BR -- [ raid ] writemostly
+\fIPV\fP[\fB:y\fP|\fBn\fP|\fBt\fP]
+.I LV
+.P
+The specified device will be marked as "write mostly", which means that
+reading from this device will be avoided, and other devices will be
+preferred for reading (unless no other devices are available.) This
+minimizes the I/O to the specified device.
+.P
+If the PV name has no suffix, the write mostly attribute is set. If the
+PV name has the suffix \fB:n\fP, the write mostly attribute is cleared,
+and the suffix \fB:t\fP toggles the current setting.
+.P
+The write mostly option can be repeated on the command line to change
+multiple devices at once.
+.P
+To report the current write mostly setting, the lvs attr field will show
+the letter "w" in the 9th position when write mostly is set:
+.P
+.B lvs -a -o name,attr
+.P
+When a device is marked write mostly, the maximum number of outstanding
+writes to that device can be configured. Once the maximum is reached,
+further writes become synchronous. When synchronous, a write to the LV
+will not complete until writes to all the mirror images are complete.
+.P
+.B lvchange
+.BR -- [ raid ] writebehind
+.I Number
+.I LV
+.P
+To report the current write behind setting, run:
+.P
+.B lvs -o name,raid_write_behind
+.P
+When write behind is not configured, or set to 0, all LV writes are
+synchronous.
+.
+.SH RAID TAKEOVER
+.
+RAID takeover is converting a RAID LV from one RAID level to another, e.g.
+raid5 to raid6. Changing the RAID level is usually done to increase or
+decrease resilience to device failures or to restripe LVs. This is done
+using lvconvert and specifying the new RAID level as the LV type:
+.P
+.B lvconvert --type
+.I RaidLevel
+.I LV
+[\fIPVs\fP]
+.P
+The most common and recommended RAID takeover conversions are:
+.
+.TP
+.BR linear " to " raid1
+Linear is a single image of LV data, and
+converting it to raid1 adds a mirror image which is a direct copy of the
+original linear image.
+.
+.TP
+.BR striped / raid0 " to " raid4 / 5 / 6
+Adding parity devices to a
+striped volume results in raid4/5/6.
+.P
+Unnatural conversions that are not recommended include converting between
+striped and non-striped types. This is because file systems often
+optimize I/O patterns based on device striping values. If those values
+change, it can decrease performance.
+.P
+Converting to a higher RAID level requires allocating new SubLVs to hold
+RAID metadata, and new SubLVs to hold parity blocks for LV data.
+Converting to a lower RAID level removes the SubLVs that are no longer
+needed.
+.P
+Conversion often requires full synchronization of the RAID LV (see
+\fBSynchronization\fP). Converting to RAID1 requires copying all LV data
+blocks to N new images on new devices. Converting to a parity RAID level
+requires reading all LV data blocks, calculating parity, and writing the
+new parity blocks. Synchronization can take a long time depending on the
+throughpout of the devices used and the size of the RaidLV. It can degrade
+performance. Rate controls also apply to conversion; see
+\fB--minrecoveryrate\fP and \fB--maxrecoveryrate\fP.
+.P
+Warning: though it is possible to create \fBstriped\fP LVs with up to 128 stripes,
+a maximum of 64 stripes can be converted to \fBraid0\fP, 63 to \fBraid4/5\fP and
+62 to \fBraid6\fP because of the added parity SubLVs.
+A \fBstriped\fP LV with a maximum of 32 stripes can be converted to \fBraid10\fP.
+.
+.P
+.
+The following takeover conversions are currently possible:
+.br
+.ipbu
+between striped and raid0.
+.ipbu
+between linear and raid1.
+.ipbu
+between mirror and raid1.
+.ipbu
+between raid1 with two images and raid4/5.
+.ipbu
+between striped/raid0 and raid4.
+.ipbu
+between striped/raid0 and raid5.
+.ipbu
+between striped/raid0 and raid6.
+.ipbu
+between raid4 and raid5.
+.ipbu
+between raid4/raid5 and raid6.
+.ipbu
+between striped/raid0 and raid10.
+.ipbu
+between striped and raid4.
+.PD
+.
+.SS Indirect conversions
+.
+Converting from one raid level to another may require multiple steps,
+converting first to intermediate raid levels.
+.P
+.BR linear " to " raid6
+.P
+To convert an LV from linear to raid6:
+.br
+1. convert to raid1 with two images
+.br
+2. convert to raid5 (internally raid5_ls) with two images
+.br
+3. convert to raid5 with three or more stripes (reshape)
+.br
+4. convert to raid6 (internally raid6_ls_6)
+.br
+5. convert to raid6 (internally raid6_zr, reshape)
+.P
+The commands to perform the steps above are:
+.br
+1. lvconvert --type raid1 --mirrors 1 LV
+.br
+2. lvconvert --type raid5 LV
+.br
+3. lvconvert --stripes 3 LV
+.br
+4. lvconvert --type raid6 LV
+.br
+5. lvconvert --type raid6 LV
+.P
+The final conversion from raid6_ls_6 to raid6_zr is done to avoid the
+potential write/recovery performance reduction in raid6_ls_6 because of
+the dedicated parity device. raid6_zr rotates data and parity blocks to
+avoid this.
+.P
+.BR linear " to " striped
+.P
+To convert an LV from linear to striped:
+.br
+1. convert to raid1 with two images
+.br
+2. convert to raid5_n
+.br
+3. convert to raid5_n with five 128k stripes (reshape)
+.br
+4. convert raid5_n to striped
+.P
+The commands to perform the steps above are:
+.br
+1. lvconvert --type raid1 --mirrors 1 LV
+.br
+2. lvconvert --type raid5_n LV
+.br
+3. lvconvert --stripes 5 --stripesize 128k LV
+.br
+4. lvconvert --type striped LV
+.P
+The raid5_n type in step 2 is used because it has dedicated parity SubLVs
+at the end, and can be converted to striped directly. The stripe size is
+increased in step 3 to add extra space for the conversion process. This
+step grows the LV size by a factor of five. After conversion, this extra
+space can be reduced (or used to grow the file system using the LV).
+.P
+Reversing these steps will convert a striped LV to linear.
+.P
+.BR raid6 " to " striped
+.P
+To convert an LV from raid6_nr to striped:
+.br
+1. convert to raid6_n_6
+.br
+2. convert to striped
+.P
+The commands to perform the steps above are:
+.br
+1. lvconvert --type raid6_n_6 LV
+.br
+2. lvconvert --type striped LV
+.P
+.I Examples
+.P
+Converting an LV from \fBlinear\fP to \fBraid1\fP.
+.P
+.nf
+# lvs -a -o name,segtype,size vg
+ LV Type LSize
+ lv linear 300.00g
+.P
+# lvconvert --type raid1 --mirrors 1 vg/lv
+.P
+# lvs -a -o name,segtype,size vg
+ LV Type LSize
+ lv raid1 300.00g
+ [lv_rimage_0] linear 300.00g
+ [lv_rimage_1] linear 300.00g
+ [lv_rmeta_0] linear 3.00m
+ [lv_rmeta_1] linear 3.00m
+.fi
+.P
+Converting an LV from \fBmirror\fP to \fBraid1\fP.
+.P
+.nf
+# lvs -a -o name,segtype,size vg
+ LV Type LSize
+ lv mirror 100.00g
+ [lv_mimage_0] linear 100.00g
+ [lv_mimage_1] linear 100.00g
+ [lv_mlog] linear 3.00m
+.P
+# lvconvert --type raid1 vg/lv
+.P
+# lvs -a -o name,segtype,size vg
+ LV Type LSize
+ lv raid1 100.00g
+ [lv_rimage_0] linear 100.00g
+ [lv_rimage_1] linear 100.00g
+ [lv_rmeta_0] linear 3.00m
+ [lv_rmeta_1] linear 3.00m
+.fi
+.P
+Converting an LV from \fBlinear\fP to \fBraid1\fP (with 3 images).
+.P
+.nf
+# lvconvert --type raid1 --mirrors 2 vg/lv
+.fi
+.P
+Converting an LV from \fBstriped\fP (with 4 stripes) to \fBraid6_n_6\fP.
+.P
+.nf
+# lvcreate --stripes 4 -L64M -n lv vg
+.P
+# lvconvert --type raid6 vg/lv
+.P
+# lvs -a -o lv_name,segtype,sync_percent,data_copies
+ LV Type Cpy%Sync #Cpy
+ lv raid6_n_6 100.00 3
+ [lv_rimage_0] linear
+ [lv_rimage_1] linear
+ [lv_rimage_2] linear
+ [lv_rimage_3] linear
+ [lv_rimage_4] linear
+ [lv_rimage_5] linear
+ [lv_rmeta_0] linear
+ [lv_rmeta_1] linear
+ [lv_rmeta_2] linear
+ [lv_rmeta_3] linear
+ [lv_rmeta_4] linear
+ [lv_rmeta_5] linear
+.fi
+.P
+This convert begins by allocating MetaLVs (rmeta_#) for each of the
+existing stripe devices. It then creates 2 additional MetaLV/DataLV pairs
+(rmeta_#/rimage_#) for dedicated raid6 parity.
+.P
+If rotating data/parity is required, such as with raid6_nr, it must be
+done by reshaping (see below).
+.
+.SH RAID RESHAPING
+.
+RAID reshaping is changing attributes of a RAID LV while keeping the same
+RAID level. This includes changing RAID layout, stripe size, or number of
+stripes.
+.P
+When changing the RAID layout or stripe size, no new SubLVs (MetaLVs or
+DataLVs) need to be allocated, but DataLVs are extended by a small amount
+(typically 1 extent). The extra space allows blocks in a stripe to be
+updated safely, and not be corrupted in case of a crash. If a crash occurs,
+reshaping can just be restarted.
+.P
+(If blocks in a stripe were updated in place, a crash could leave them
+partially updated and corrupted. Instead, an existing stripe is quiesced,
+read, changed in layout, and the new stripe written to free space. Once
+that is done, the new stripe is unquiesced and used.)
+.P
+.I Examples
+.br
+(Command output shown in examples may change.)
+.P
+Converting raid6_n_6 to raid6_nr with rotating data/parity.
+.P
+This conversion naturally follows a previous conversion from striped/raid0
+to raid6_n_6 (shown above). It completes the transition to a more
+traditional RAID6.
+.P
+.nf
+# lvs -o lv_name,segtype,sync_percent,data_copies
+ LV Type Cpy%Sync #Cpy
+ lv raid6_n_6 100.00 3
+ [lv_rimage_0] linear
+ [lv_rimage_1] linear
+ [lv_rimage_2] linear
+ [lv_rimage_3] linear
+ [lv_rimage_4] linear
+ [lv_rimage_5] linear
+ [lv_rmeta_0] linear
+ [lv_rmeta_1] linear
+ [lv_rmeta_2] linear
+ [lv_rmeta_3] linear
+ [lv_rmeta_4] linear
+ [lv_rmeta_5] linear
+.P
+# lvconvert --type raid6_nr vg/lv
+.P
+# lvs -a -o lv_name,segtype,sync_percent,data_copies
+ LV Type Cpy%Sync #Cpy
+ lv raid6_nr 100.00 3
+ [lv_rimage_0] linear
+ [lv_rimage_0] linear
+ [lv_rimage_1] linear
+ [lv_rimage_1] linear
+ [lv_rimage_2] linear
+ [lv_rimage_2] linear
+ [lv_rimage_3] linear
+ [lv_rimage_3] linear
+ [lv_rimage_4] linear
+ [lv_rimage_5] linear
+ [lv_rmeta_0] linear
+ [lv_rmeta_1] linear
+ [lv_rmeta_2] linear
+ [lv_rmeta_3] linear
+ [lv_rmeta_4] linear
+ [lv_rmeta_5] linear
+.fi
+.P
+The DataLVs are larger (additional segment in each) which provides space
+for out-of-place reshaping. The result is:
+.P
+.nf
+# lvs -a -o lv_name,segtype,seg_pe_ranges,dataoffset
+ LV Type PE Ranges DOff
+ lv raid6_nr lv_rimage_0:0-32 \\
+ lv_rimage_1:0-32 \\
+ lv_rimage_2:0-32 \\
+ lv_rimage_3:0-32
+ [lv_rimage_0] linear /dev/sda:0-31 2048
+ [lv_rimage_0] linear /dev/sda:33-33
+ [lv_rimage_1] linear /dev/sdaa:0-31 2048
+ [lv_rimage_1] linear /dev/sdaa:33-33
+ [lv_rimage_2] linear /dev/sdab:1-33 2048
+ [lv_rimage_3] linear /dev/sdac:1-33 2048
+ [lv_rmeta_0] linear /dev/sda:32-32
+ [lv_rmeta_1] linear /dev/sdaa:32-32
+ [lv_rmeta_2] linear /dev/sdab:0-0
+ [lv_rmeta_3] linear /dev/sdac:0-0
+.fi
+.P
+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.
+.P
+For performance reasons the raid6_nr RaidLV can be restriped.
+Convert it from 3-way striped to 5-way-striped.
+.P
+.nf
+# lvconvert --stripes 5 vg/lv
+ Using default stripesize 64.00 KiB.
+ WARNING: Adding stripes to active logical volume vg/lv will \\
+ grow it from 99 to 165 extents!
+ Run "lvresize -l99 vg/lv" to shrink it or use the additional \\
+ capacity.
+ Logical volume vg/lv successfully converted.
+.P
+# lvs vg/lv
+ LV VG Attr LSize Cpy%Sync
+ lv vg rwi-a-r-s- 652.00m 52.94
+.P
+# lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r--- raid6_nr lv_rimage_0:0-33 \\
+ lv_rimage_1:0-33 \\
+ lv_rimage_2:0-33 ... \\
+ lv_rimage_5:0-33 \\
+ lv_rimage_6:0-33 0
+ [lv_rimage_0] iwi-aor--- linear /dev/sda:0-32 0
+ [lv_rimage_0] iwi-aor--- linear /dev/sda:34-34
+ [lv_rimage_1] iwi-aor--- linear /dev/sdaa:0-32 0
+ [lv_rimage_1] iwi-aor--- linear /dev/sdaa:34-34
+ [lv_rimage_2] iwi-aor--- linear /dev/sdab:0-32 0
+ [lv_rimage_2] iwi-aor--- linear /dev/sdab:34-34
+ [lv_rimage_3] iwi-aor--- linear /dev/sdac:1-34 0
+ [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-34 0
+ [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-34 0
+ [lv_rimage_6] iwi-aor--- linear /dev/sdaf:1-34 0
+ [lv_rmeta_0] ewi-aor--- linear /dev/sda:33-33
+ [lv_rmeta_1] ewi-aor--- linear /dev/sdaa:33-33
+ [lv_rmeta_2] ewi-aor--- linear /dev/sdab:33-33
+ [lv_rmeta_3] ewi-aor--- linear /dev/sdac:0-0
+ [lv_rmeta_4] ewi-aor--- linear /dev/sdad:0-0
+ [lv_rmeta_5] ewi-aor--- linear /dev/sdae:0-0
+ [lv_rmeta_6] ewi-aor--- linear /dev/sdaf:0-0
+.fi
+.P
+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.
+.P
+.nf
+# lvconvert --stripes 4 vg/lv
+ Using default stripesize 64.00 KiB.
+ WARNING: Removing stripes from active logical volume vg/lv will \\
+ shrink it from 660.00 MiB to 528.00 MiB!
+ THIS MAY DESTROY (PARTS OF) YOUR DATA!
+ If that leaves the logical volume larger than 206 extents due \\
+ to stripe rounding,
+ you may want to grow the content afterwards (filesystem etc.)
+ WARNING: to remove freed stripes after the conversion has finished,\\
+ you have to run "lvconvert --stripes 4 vg/lv"
+ Logical volume vg/lv successfully converted.
+.P
+# lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r-s- raid6_nr lv_rimage_0:0-33 \\
+ lv_rimage_1:0-33 \\
+ lv_rimage_2:0-33 ... \\
+ lv_rimage_5:0-33 \\
+ lv_rimage_6:0-33 0
+ [lv_rimage_0] Iwi-aor--- linear /dev/sda:0-32 0
+ [lv_rimage_0] Iwi-aor--- linear /dev/sda:34-34
+ [lv_rimage_1] Iwi-aor--- linear /dev/sdaa:0-32 0
+ [lv_rimage_1] Iwi-aor--- linear /dev/sdaa:34-34
+ [lv_rimage_2] Iwi-aor--- linear /dev/sdab:0-32 0
+ [lv_rimage_2] Iwi-aor--- linear /dev/sdab:34-34
+ [lv_rimage_3] Iwi-aor--- linear /dev/sdac:1-34 0
+ [lv_rimage_4] Iwi-aor--- linear /dev/sdad:1-34 0
+ [lv_rimage_5] Iwi-aor--- linear /dev/sdae:1-34 0
+ [lv_rimage_6] Iwi-aor-R- linear /dev/sdaf:1-34 0
+ [lv_rmeta_0] ewi-aor--- linear /dev/sda:33-33
+ [lv_rmeta_1] ewi-aor--- linear /dev/sdaa:33-33
+ [lv_rmeta_2] ewi-aor--- linear /dev/sdab:33-33
+ [lv_rmeta_3] ewi-aor--- linear /dev/sdac:0-0
+ [lv_rmeta_4] ewi-aor--- linear /dev/sdad:0-0
+ [lv_rmeta_5] ewi-aor--- linear /dev/sdae:0-0
+ [lv_rmeta_6] ewi-aor-R- linear /dev/sdaf:0-0
+.fi
+.P
+The 's' in column 9 of the attribute field shows the RaidLV is still reshaping.
+The 'R' in the same column of the attribute field shows the freed image Sub LVs which will need removing once the reshaping finished.
+.P
+.nf
+# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r-R- raid6_nr lv_rimage_0:0-33 \\
+ lv_rimage_1:0-33 \\
+ lv_rimage_2:0-33 ... \\
+ lv_rimage_5:0-33 \\
+ lv_rimage_6:0-33 8192
+.fi
+.P
+Now that the reshape is finished the 'R' attribute on the RaidLV shows images can be removed.
+.P
+.nf
+# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r-R- raid6_nr lv_rimage_0:0-33 \\
+ lv_rimage_1:0-33 \\
+ lv_rimage_2:0-33 ... \\
+ lv_rimage_5:0-33 \\
+ lv_rimage_6:0-33 8192
+.fi
+.P
+This is achieved by repeating the command ("lvconvert --stripes 4 vg/lv" would be sufficient).
+.P
+.nf
+# lvconvert --stripes 4 vg/lv
+ Using default stripesize 64.00 KiB.
+ Logical volume vg/lv successfully converted.
+.P
+# lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r--- raid6_nr lv_rimage_0:0-33 \\
+ lv_rimage_1:0-33 \\
+ lv_rimage_2:0-33 ... \\
+ lv_rimage_5:0-33 8192
+ [lv_rimage_0] iwi-aor--- linear /dev/sda:0-32 8192
+ [lv_rimage_0] iwi-aor--- linear /dev/sda:34-34
+ [lv_rimage_1] iwi-aor--- linear /dev/sdaa:0-32 8192
+ [lv_rimage_1] iwi-aor--- linear /dev/sdaa:34-34
+ [lv_rimage_2] iwi-aor--- linear /dev/sdab:0-32 8192
+ [lv_rimage_2] iwi-aor--- linear /dev/sdab:34-34
+ [lv_rimage_3] iwi-aor--- linear /dev/sdac:1-34 8192
+ [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-34 8192
+ [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-34 8192
+ [lv_rmeta_0] ewi-aor--- linear /dev/sda:33-33
+ [lv_rmeta_1] ewi-aor--- linear /dev/sdaa:33-33
+ [lv_rmeta_2] ewi-aor--- linear /dev/sdab:33-33
+ [lv_rmeta_3] ewi-aor--- linear /dev/sdac:0-0
+ [lv_rmeta_4] ewi-aor--- linear /dev/sdad:0-0
+ [lv_rmeta_5] ewi-aor--- linear /dev/sdae:0-0
+.P
+# lvs -a -o lv_name,attr,segtype,reshapelen vg
+ LV Attr Type RSize
+ lv rwi-a-r--- raid6_nr 24.00m
+ [lv_rimage_0] iwi-aor--- linear 4.00m
+ [lv_rimage_0] iwi-aor--- linear
+ [lv_rimage_1] iwi-aor--- linear 4.00m
+ [lv_rimage_1] iwi-aor--- linear
+ [lv_rimage_2] iwi-aor--- linear 4.00m
+ [lv_rimage_2] iwi-aor--- linear
+ [lv_rimage_3] iwi-aor--- linear 4.00m
+ [lv_rimage_4] iwi-aor--- linear 4.00m
+ [lv_rimage_5] iwi-aor--- linear 4.00m
+ [lv_rmeta_0] ewi-aor--- linear
+ [lv_rmeta_1] ewi-aor--- linear
+ [lv_rmeta_2] ewi-aor--- linear
+ [lv_rmeta_3] ewi-aor--- linear
+ [lv_rmeta_4] ewi-aor--- linear
+ [lv_rmeta_5] ewi-aor--- linear
+.fi
+.P
+Future developments might include automatic removal of the freed images.
+.P
+If the reshape space shall be removed any lvconvert command not changing the layout can be used:
+.P
+.nf
+# lvconvert --stripes 4 vg/lv
+ Using default stripesize 64.00 KiB.
+ No change in RAID LV vg/lv layout, freeing reshape space.
+ Logical volume vg/lv successfully converted.
+.P
+# lvs -a -o lv_name,attr,segtype,reshapelen vg
+ LV Attr Type RSize
+ lv rwi-a-r--- raid6_nr 0
+ [lv_rimage_0] iwi-aor--- linear 0
+ [lv_rimage_0] iwi-aor--- linear
+ [lv_rimage_1] iwi-aor--- linear 0
+ [lv_rimage_1] iwi-aor--- linear
+ [lv_rimage_2] iwi-aor--- linear 0
+ [lv_rimage_2] iwi-aor--- linear
+ [lv_rimage_3] iwi-aor--- linear 0
+ [lv_rimage_4] iwi-aor--- linear 0
+ [lv_rimage_5] iwi-aor--- linear 0
+ [lv_rmeta_0] ewi-aor--- linear
+ [lv_rmeta_1] ewi-aor--- linear
+ [lv_rmeta_2] ewi-aor--- linear
+ [lv_rmeta_3] ewi-aor--- linear
+ [lv_rmeta_4] ewi-aor--- linear
+ [lv_rmeta_5] ewi-aor--- linear
+.fi
+.P
+In case the RaidLV should be converted to striped:
+.P
+.nf
+# lvconvert --type striped vg/lv
+ Unable to convert LV vg/lv from raid6_nr to striped.
+ Converting vg/lv from raid6_nr is directly possible to the \\
+ following layouts:
+ raid6_nc
+ raid6_zr
+ raid6_la_6
+ raid6_ls_6
+ raid6_ra_6
+ raid6_rs_6
+ raid6_n_6
+.fi
+.P
+A direct conversion isn't possible thus the command informed about the possible ones.
+raid6_n_6 is suitable to convert to striped so convert to it first (this is a reshape
+changing the raid6 layout from raid6_nr to raid6_n_6).
+.P
+.nf
+# lvconvert --type raid6_n_6
+ Using default stripesize 64.00 KiB.
+ Converting raid6_nr LV vg/lv to raid6_n_6.
+Are you sure you want to convert raid6_nr LV vg/lv? [y/n]: y
+ Logical volume vg/lv successfully converted.
+.fi
+.P
+Wait for the reshape to finish.
+.P
+.nf
+# lvconvert --type striped vg/lv
+ Logical volume vg/lv successfully converted.
+.P
+# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
+ LV Attr Type PE Ranges DOff
+ lv -wi-a----- striped /dev/sda:2-32 \\
+ /dev/sdaa:2-32 \\
+ /dev/sdab:2-32 \\
+ /dev/sdac:3-33
+ lv -wi-a----- striped /dev/sda:34-35 \\
+ /dev/sdaa:34-35 \\
+ /dev/sdab:34-35 \\
+ /dev/sdac:34-35
+.fi
+.P
+From striped we can convert to raid10
+.P
+.nf
+# lvconvert --type raid10 vg/lv
+ Using default stripesize 64.00 KiB.
+ Logical volume vg/lv successfully converted.
+.P
+# lvs -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r--- raid10 lv_rimage_0:0-32 \\
+ lv_rimage_4:0-32 \\
+ lv_rimage_1:0-32 ... \\
+ lv_rimage_3:0-32 \\
+ lv_rimage_7:0-32 0
+.P
+# lvs -a -o lv_name,attr,segtype,seg_pe_ranges,dataoffset vg
+ WARNING: Cannot find matching striped segment for vg/lv_rimage_3.
+ LV Attr Type PE Ranges DOff
+ lv rwi-a-r--- raid10 lv_rimage_0:0-32 \\
+ lv_rimage_4:0-32 \\
+ lv_rimage_1:0-32 ... \\
+ lv_rimage_3:0-32 \\
+ lv_rimage_7:0-32 0
+ [lv_rimage_0] iwi-aor--- linear /dev/sda:2-32 0
+ [lv_rimage_0] iwi-aor--- linear /dev/sda:34-35
+ [lv_rimage_1] iwi-aor--- linear /dev/sdaa:2-32 0
+ [lv_rimage_1] iwi-aor--- linear /dev/sdaa:34-35
+ [lv_rimage_2] iwi-aor--- linear /dev/sdab:2-32 0
+ [lv_rimage_2] iwi-aor--- linear /dev/sdab:34-35
+ [lv_rimage_3] iwi-XXr--- linear /dev/sdac:3-35 0
+ [lv_rimage_4] iwi-aor--- linear /dev/sdad:1-33 0
+ [lv_rimage_5] iwi-aor--- linear /dev/sdae:1-33 0
+ [lv_rimage_6] iwi-aor--- linear /dev/sdaf:1-33 0
+ [lv_rimage_7] iwi-aor--- linear /dev/sdag:1-33 0
+ [lv_rmeta_0] ewi-aor--- linear /dev/sda:0-0
+ [lv_rmeta_1] ewi-aor--- linear /dev/sdaa:0-0
+ [lv_rmeta_2] ewi-aor--- linear /dev/sdab:0-0
+ [lv_rmeta_3] ewi-aor--- linear /dev/sdac:0-0
+ [lv_rmeta_4] ewi-aor--- linear /dev/sdad:0-0
+ [lv_rmeta_5] ewi-aor--- linear /dev/sdae:0-0
+ [lv_rmeta_6] ewi-aor--- linear /dev/sdaf:0-0
+ [lv_rmeta_7] ewi-aor--- linear /dev/sdag:0-0
+.fi
+.P
+raid10 allows to add stripes but can't remove them.
+.P
+A more elaborate example to convert from linear to striped
+with interim conversions to raid1 then raid5 followed
+by restripe (4 steps).
+.P
+We start with the linear LV.
+.P
+.nf
+# lvs -a -o name,size,segtype,syncpercent,datastripes,\\
+ stripesize,reshapelenle,devices vg
+ LV LSize Type Cpy%Sync #DStr Stripe RSize Devices
+ lv 128.00m linear 1 0 /dev/sda(0)
+.fi
+.P
+Then convert it to a 2-way raid1.
+.P
+.nf
+# lvconvert --mirrors 1 vg/lv
+ Logical volume vg/lv successfully converted.
+.P
+# lvs -a -o name,size,segtype,datastripes,\\
+ stripesize,reshapelenle,devices vg
+ LV LSize Type #DStr Stripe RSize Devices
+ lv 128.00m raid1 2 0 lv_rimage_0(0),\\
+ lv_rimage_1(0)
+ [lv_rimage_0] 128.00m linear 1 0 /dev/sda(0)
+ [lv_rimage_1] 128.00m linear 1 0 /dev/sdhx(1)
+ [lv_rmeta_0] 4.00m linear 1 0 /dev/sda(32)
+ [lv_rmeta_1] 4.00m linear 1 0 /dev/sdhx(0)
+.fi
+.P
+Once the raid1 LV is fully synchronized we convert it to raid5_n (only 2-way raid1
+LVs can be converted to raid5). We select raid5_n here because it has dedicated parity
+SubLVs at the end and can be converted to striped directly without any additional
+conversion.
+.P
+.nf
+# lvconvert --type raid5_n vg/lv
+ Using default stripesize 64.00 KiB.
+ Logical volume vg/lv successfully converted.
+.P
+# lvs -a -o name,size,segtype,syncpercent,datastripes,\\
+ stripesize,reshapelenle,devices vg
+ LV LSize Type #DStr Stripe RSize Devices
+ lv 128.00m raid5_n 1 64.00k 0 lv_rimage_0(0),\\
+ lv_rimage_1(0)
+ [lv_rimage_0] 128.00m linear 1 0 0 /dev/sda(0)
+ [lv_rimage_1] 128.00m linear 1 0 0 /dev/sdhx(1)
+ [lv_rmeta_0] 4.00m linear 1 0 /dev/sda(32)
+ [lv_rmeta_1] 4.00m linear 1 0 /dev/sdhx(0)
+.fi
+.P
+Now we'll change the number of data stripes from 1 to 5 and request 128K stripe size
+in one command. This will grow the size of the LV by a factor of 5 (we add 4 data stripes
+to the one given). That additional space can be used by e.g. growing any contained filesystem
+or the LV can be reduced in size after the reshaping conversion has finished.
+.P
+.nf
+# lvconvert --stripesize 128k --stripes 5 vg/lv
+ Converting stripesize 64.00 KiB of raid5_n LV vg/lv to 128.00 KiB.
+ WARNING: Adding stripes to active logical volume vg/lv will grow \\
+ it from 32 to 160 extents!
+ Run "lvresize -l32 vg/lv" to shrink it or use the additional capacity.
+ Logical volume vg/lv successfully converted.
+.P
+# lvs -a -o name,size,segtype,datastripes,\\
+ stripesize,reshapelenle,devices
+ LV LSize Type #DStr Stripe RSize Devices
+ lv 640.00m raid5_n 5 128.00k 6 lv_rimage_0(0),\\
+ lv_rimage_1(0),\\
+ lv_rimage_2(0),\\
+ lv_rimage_3(0),\\
+ lv_rimage_4(0),\\
+ lv_rimage_5(0)
+ [lv_rimage_0] 132.00m linear 1 0 1 /dev/sda(33)
+ [lv_rimage_0] 132.00m linear 1 0 /dev/sda(0)
+ [lv_rimage_1] 132.00m linear 1 0 1 /dev/sdhx(33)
+ [lv_rimage_1] 132.00m linear 1 0 /dev/sdhx(1)
+ [lv_rimage_2] 132.00m linear 1 0 1 /dev/sdhw(33)
+ [lv_rimage_2] 132.00m linear 1 0 /dev/sdhw(1)
+ [lv_rimage_3] 132.00m linear 1 0 1 /dev/sdhv(33)
+ [lv_rimage_3] 132.00m linear 1 0 /dev/sdhv(1)
+ [lv_rimage_4] 132.00m linear 1 0 1 /dev/sdhu(33)
+ [lv_rimage_4] 132.00m linear 1 0 /dev/sdhu(1)
+ [lv_rimage_5] 132.00m linear 1 0 1 /dev/sdht(33)
+ [lv_rimage_5] 132.00m linear 1 0 /dev/sdht(1)
+ [lv_rmeta_0] 4.00m linear 1 0 /dev/sda(32)
+ [lv_rmeta_1] 4.00m linear 1 0 /dev/sdhx(0)
+ [lv_rmeta_2] 4.00m linear 1 0 /dev/sdhw(0)
+ [lv_rmeta_3] 4.00m linear 1 0 /dev/sdhv(0)
+ [lv_rmeta_4] 4.00m linear 1 0 /dev/sdhu(0)
+ [lv_rmeta_5] 4.00m linear 1 0 /dev/sdht(0)
+.fi
+.P
+Once the conversion has finished we can can convert to striped.
+.P
+.nf
+# lvconvert --type striped vg/lv
+ Logical volume vg/lv successfully converted.
+.P
+# lvs -a -o name,size,segtype,datastripes,\\
+ stripesize,reshapelenle,devices vg
+ LV LSize Type #DStr Stripe RSize Devices
+ lv 640.00m striped 5 128.00k /dev/sda(33),\\
+ /dev/sdhx(33),\\
+ /dev/sdhw(33),\\
+ /dev/sdhv(33),\\
+ /dev/sdhu(33)
+ lv 640.00m striped 5 128.00k /dev/sda(0),\\
+ /dev/sdhx(1),\\
+ /dev/sdhw(1),\\
+ /dev/sdhv(1),\\
+ /dev/sdhu(1)
+.fi
+.P
+Reversing these steps will convert a given striped LV to linear.
+.P
+Mind the facts that stripes are removed thus the capacity of the RaidLV will shrink
+and that changing the RaidLV layout will influence its performance.
+.P
+"lvconvert --stripes 1 vg/lv" for converting to 1 stripe will inform upfront about
+the reduced size to allow for resizing the content or growing the RaidLV before
+actually converting to 1 stripe. The \fB--force\fP option is needed to
+allow stripe removing conversions to prevent data loss.
+.P
+Of course any interim step can be the intended last one (e.g. striped \[->] raid1).
+.
+.SH RAID5 VARIANTS
+.
+.TP
+raid5_ls
+.ipbu
+RAID5 left symmetric
+.ipbu
+Rotating parity N with data restart
+.
+.TP
+raid5_la
+.ipbu
+RAID5 left asymmetric
+.ipbu
+Rotating parity N with data continuation
+.
+.TP
+raid5_rs
+.ipbu
+RAID5 right symmetric
+.ipbu
+Rotating parity 0 with data restart
+.
+.TP
+raid5_ra
+.ipbu
+RAID5 right asymmetric
+.ipbu
+Rotating parity 0 with data continuation
+.
+.TP
+raid5_n
+.ipbu
+RAID5 parity n
+.ipbu
+Dedicated parity device n used for striped/raid0 conversions
+.ipbu
+Used for RAID Takeover
+.
+.SH RAID6 VARIANTS
+.
+.TP
+.RB raid6\ \ " "
+.ipbu
+RAID6 zero restart (aka left symmetric)
+.ipbu
+Rotating parity 0 with data restart
+.ipbu
+Same as raid6_zr
+.
+.TP
+raid6_zr
+.ipbu
+RAID6 zero restart (aka left symmetric)
+.ipbu
+Rotating parity 0 with data restart
+.
+.TP
+raid6_nr
+.ipbu
+RAID6 N restart (aka right symmetric)
+.ipbu
+Rotating parity N with data restart
+.
+.TP
+raid6_nc
+.ipbu
+RAID6 N continue
+.ipbu
+Rotating parity N with data continuation
+.
+.TP
+raid6_n_6
+.ipbu
+RAID6 last parity devices
+.ipbu
+Fixed dedicated last devices (P-Syndrome N-1 and Q-Syndrome N)
+with striped data used for striped/raid0 conversions
+.ipbu
+Used for RAID Takeover
+.
+.TP
+raid6_{ls,rs,la,ra}_6
+.ipbu
+RAID6 last parity device
+.ipbu
+Dedicated last parity device used for conversions from/to
+raid5_{ls,rs,la,ra}
+.
+.TP
+raid6_ls_6
+.ipbu
+RAID6 N continue
+.ipbu
+Same as raid5_ls for N-1 devices with fixed Q-Syndrome N
+.ipbu
+Used for RAID Takeover
+.
+.TP
+raid6_la_6
+.ipbu
+RAID6 N continue
+.ipbu
+Same as raid5_la for N-1 devices with fixed Q-Syndrome N
+.ipbu
+Used forRAID Takeover
+.
+.TP
+raid6_rs_6
+.ipbu
+RAID6 N continue
+.ipbu
+Same as raid5_rs for N-1 devices with fixed Q-Syndrome N
+.ipbu
+Used for RAID Takeover
+.
+.TP
+raid6_ra_6
+.ipbu
+RAID6 N continue
+.ipbu
+Same as raid5_ra for N-1 devices with fixed Q-Syndrome N
+.ipbu
+Used for RAID Takeover
+.
+.
+.ig
+.
+.SH RAID DUPLICATION
+.
+RAID LV conversion (takeover or reshaping) can be done out-of-place by
+copying the LV data onto new devices while changing the RAID properties.
+Copying avoids modifying the original LV but requires additional devices.
+Once the LV data has been copied/converted onto the new devices, there are
+multiple options:
+.P
+1. The RAID LV can be switched over to run from just the new devices, and
+the original copy of the data removed. The converted LV then has the new
+RAID properties, and exists on new devices. The old devices holding the
+original data can be removed or reused.
+.P
+2. The new copy of the data can be dropped, leaving the original RAID LV
+unchanged and using its original devices.
+.P
+3. The new copy of the data can be separated and used as a new independent
+LV, leaving the original RAID LV unchanged on its original devices.
+.P
+The command to start duplication is:
+.P
+.B lvconvert --type
+.I RaidLevel
+[\fB--stripes\fP \fINumber\fP \fB--stripesize\fP \fISize\fP]
+.RS
+.B --duplicate
+.I LV
+[\fIPVs\fP]
+.RE
+.P
+.TP
+.B --duplicate
+.br
+Specifies that the LV conversion should be done out-of-place, copying
+LV data to new devices while converting.
+.P
+.TP
+.BR --type , --stripes , --stripesize
+.br
+Specifies the RAID properties to use when creating the copy.
+.P
+\fIPVs\fP specifies the new devices to use.
+.P
+The steps in the duplication process:
+.P
+.ipbu
+LVM creates a new LV on new devices using the specified RAID properties
+(type, stripes, etc) and optionally specified devices.
+.P
+.ipbu
+LVM changes the visible RAID LV to type raid1, making the original LV the
+first raid1 image (SubLV 0), and the new LV the second raid1 image
+(SubLV 1).
+.P
+.ipbu
+The RAID1 synchronization process copies data from the original LV
+image (SubLV 0) to the new LV image (SubLV 1).
+.P
+.ipbu
+When synchronization is complete, the original and new LVs are
+mirror images of each other and can be separated.
+.P
+The duplication process retains both the original and new LVs (both
+SubLVs) until an explicit unduplicate command is run to separate them. The
+unduplicate command specifies if the original LV should use the old
+devices (SubLV 0) or the new devices (SubLV 1).
+.P
+To make the RAID LV use the data on the old devices, and drop the copy on
+the new devices, specify the name of SubLV 0 (suffix _dup_0):
+.P
+.B lvconvert --unduplicate
+.BI --name
+.IB LV _dup_0
+.I LV
+.P
+To make the RAID LV use the data copy on the new devices, and drop the old
+devices, specify the name of SubLV 1 (suffix _dup_1):
+.P
+.B lvconvert --unduplicate
+.BI --name
+.IB LV _dup_1
+.I LV
+.P
+FIXME: To make the LV use the data on the original devices, but keep the
+data copy as a new LV, ...
+.P
+FIXME: include how splitmirrors can be used.
+.
+.SS RAID1E
+.
+TODO
+..
+.
+.SH HISTORY
+.
+The 2.6.38-rc1 version of the Linux kernel introduced a device-mapper
+target to interface with the software RAID (MD) personalities. This
+provided device-mapper with RAID 4/5/6 capabilities and a larger
+development community. Later, support for RAID1, RAID10, and RAID1E (RAID
+10 variants) were added. Support for these new kernel RAID targets was
+added to LVM version 2.02.87. The capabilities of the LVM \fBraid1\fP
+type have surpassed the old \fBmirror\fP type. raid1 is now recommended
+instead of mirror. raid1 became the default for mirroring in LVM version
+2.02.100.
+.
+.SH SEE ALSO
+.
+.nh
+.ad l
+.BR lvm (8),
+.BR lvm.conf (5),
+.BR lvcreate (8),
+.BR lvconvert (8),
+.BR lvchange (8),
+.BR lvextend (8),
+.BR dmeventd (8)
diff --git a/man/lvmreport.7_main b/man/lvmreport.7_main
new file mode 100644
index 0000000..49c2548
--- /dev/null
+++ b/man/lvmreport.7_main
@@ -0,0 +1,1882 @@
+.TH "LVMREPORT" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH NAME
+.
+lvmreport \(em LVM reporting and related features
+.
+.SH DESCRIPTION
+.
+LVM uses single reporting infrastructure that sets standard on LVM command's
+output and it provides wide range of configuration settings and command line
+options to customize report and filter the report's output.
+.
+.SH USAGE
+.
+.SS Categorization based on reporting facility
+.
+Based on functionality, commands which make use of the reporting infrastructure
+are divided in two groups:
+.
+.TP
+.B Report-oriented commands
+These commands inform about current LVM state and their primary role is to
+display this information in compendious way. To make a distinction, we will
+name this report as \fBmain report\fP. The set of report-only commands include:
+pvs, vgs, lvs, pvdisplay, vgdisplay, lvdisplay, lvm devtypes, lvm fullreport.
+For further information about main report, see \fBMain report specifics\fP.
+.
+.TP
+.B Processing-oriented commands
+These commands are responsible for changing LVM state and they do not contain
+any main report as identified for report-oriented commands, they only perform
+some kind of processing. The set of processing-oriented commands includes:
+pvcreate, vgcreate, lvcreate, pvchange, vgchange, lvchange, pvremove, vgremove,
+lvremove, pvresize, vgextend, vgreduce, lvextend, lvreduce, lvresize, lvrename,
+pvscan, vgscan, lvscan, pvmove, vgcfgbackup, vgck, vgconvert, vgexport,
+vgimport, vgmknodes.
+.P
+.RE
+If enabled, so called \fBlog report\fP is either displayed solely
+(for processing-oriented commands) or in addition to main report
+(for report-oriented commands). The log report contains a log of operations,
+messages and per-object status with complete object identification collected
+during LVM command execution. See \fBLog report specifics\fP for more
+information about this report type.
+.
+.SS Terms
+.
+When describing reporting functionality and features in this text, we will
+use terms \fBrow\fP and \fBcolumn\fP. By row we mean series of values reported
+for single entity (for example single PV, VG or LV). Each value from the row
+then belongs to a column of certain type. The columns have \fBcolumn headings\fP
+which are short descriptions for the columns. The columns are referenced by
+\fBcolumn names\fP. Please note that this text is also using term \fBfield\fP
+interchangeably with the term \fBcolumn\fP. Most of the time the term columns
+is abbreviated as \fBcol\fP in configuration.
+.
+.SS Common report configuration settings and command line options
+.
+There are common configuration settings and command line options which apply
+to both \fBmain report\fP and \fBlog report\fP. Following lists contain all
+of them, separated into groups based on their use.
+.
+.SS Common configuration settings
+.
+.ad l
+.TP
+Changing report output format, composition and other output modifiers:
+- global/suffix
+.br
+- global/units
+.br
+- report/aligned
+.br
+- report/binary_values_as_numeric
+.br
+- report/columns_as_rows
+.br
+- report/compact_output
+.br
+- report/compact_output_cols
+.br
+- report/headings
+.br
+- report/list_item_separator
+.br
+- report/mark_hidden_devices
+.br
+- report/output_format
+.br
+- report/prefixes
+.br
+- report/quoted
+.br
+- report/separator
+.br
+- report/time_format
+.br
+- report/two_word_unknown_device
+.
+.TP
+Special settings
+- report/buffered
+.ad b
+.P
+This document does not describe these settings in more detail - if you need
+detailed information, including values which are accepted for the settings,
+please run \fBlvmconfig --type default --withcomments <setting>\fP. There are
+more configuration settings in addition to the common set listed above, but
+they are specific to either \fBmain report\fP or \fBlog report\fP,
+see \fBmain report specifics\fP and \fBlog report specifics\fP for
+these settings. Besides configuring reports globally by using configuration
+settings, there are also command line options you can use to extend, override
+or further specify the report configuration.
+.
+.SS Common command line options
+.
+.TP
+Definition of the set of fields to use
+.RS
+.
+.TP
+.BR -o | --options " " \fIFieldSet
+Field set to use. See \fBmain report specifics\fP and
+\fBlog report specifics\fP for information about field sets configured with
+global configuration settings that this option overrides.
+.
+.TP
+.BR -o | --options " " +\fIFieldSet
+Fields to include to current field set. See \fBmain report specifics\fP\ and
+\fBlog report specifics\fP for information about field sets configured with
+global configuration settings that this option extends.
+.
+.TP
+.BR -o | --options " " -\fIFieldSet
+Fields to exclude from current field set. See \fBmain report specifics\fP and
+\fBlog report specifics\fP for information about field sets configured with
+global configuration settings that this option reduces.
+.
+.TP
+.BR -o | --options " " # \fIFieldSet
+Compaction of unused fields. Overrides report/compact_output_cols configuration
+setting.
+.RE
+.
+.TP
+Sorting
+.RS
+.
+.TP
+.BR -O | --sort " " +\fIFieldSet
+Fields to sort by in ascending order. See \fBmain report specifics\fP and
+\fBlog report specifics\fP for information about field sets configured with
+global configuration settings that this option overrides.
+.
+.TP
+.BR -O | --sort " " -\fIFieldSet
+Fields to sort by in descending order. See \fBmain report specifics\fP and
+\fBlog report specifics\fP for information about fields sets configured with
+global configuration settings that this options overrides.
+.RE
+.
+.TP
+Selection
+.RS
+.TP
+.BR -S | --select " " \fISelection
+Define selection criteria for report output. For \fBlog report\fP, this also
+overrides log/command_log_selection configuration setting, see also
+\fBlog report specifics\fP.
+.RE
+.
+.TP
+Changing output format and composition
+.RS
+.TP
+.B --reportformat
+Overrides report/output_format configuration setting.
+.TP
+.B --aligned
+Overrides report/aligned configuration setting.
+.TP
+.B --binary
+Overrides report/binary_values_as_numeric configuration setting.
+.TP
+.B --nameprefixes
+Overrides report/prefixes configuration setting.
+.TP
+.B --noheadings
+Overrides report/noheadings configuration setting.
+.TP
+.B --nosuffix
+Overrides global/suffix configuration setting.
+.TP
+.B --rows
+Overrides report/columns_as_rows configuration setting.
+.TP
+.B --separator
+Overrides report/separator configuration setting.
+.TP
+.B --units
+Overrides global/units configuration setting.
+.TP
+.B --unquoted
+Overrides report/quoted configuration setting.
+.RE
+.
+.TP
+Special options
+.RS
+.
+.TP
+.B --configreport \fIReportName
+This defines the \fIReportName\fP for which any subsequent
+.BR -o | --columns ,
+.BR -O | --sort
+or
+.BR -S | --select
+applies to. See also
+.B Main report specifics
+and
+.B Log report specifics
+for possible \fIReportName\fP values.
+.
+.TP
+.B --logonly
+When an LVM command contains both \fBmain report\fP and \fBlog report\fP,
+this option suppresses the \fBmain report\fP output and it causes the
+\fBlog report\fP output to be displayed only.
+.
+.TP
+.B --unbuffered
+Overrides report/buffered configuration setting.
+.RE
+.P
+The \fIFieldSet\fP mentioned in the lists above is a set of field names where
+each field name is delimited by "\fB,\fP" character. Field set definition, sorting
+and selection may be repeated on command line (\fB-o\fP\fB+\fP/\fB-o\fP\fB-\fP
+includes/excludes fields
+to/from current list, for all the other repeatable options, the last value
+typed for the option on the command line is used). The \fBSelection\fP
+is a string with \fBselection criteria\fP, see also \fBSelection\fP paragraph
+below for more information about constructing these criteria.
+.
+.SS Main report specifics
+.
+The \fBmain report\fP currently encompasses these distinct subtypes, referenced
+by their name - \fIReportName\fP as listed below. The command in parenthesis is
+representative command that uses the main report subtype by default.
+Each subtype has its own configuration setting for global field set definition
+as well as sort field definition (listed below each individual \fIReportName\fP):
+.
+.ad l
+.nh
+.RS
+.TP
+.B pv
+representing report about Physical Volumes
+(pvs)
+.RS
+- report/pvs_cols
+.br
+- report/pvs_sort
+.br
+.RE
+.
+.TP
+.B pvseg
+representing report about Physical Volume Segments
+(pvs\ --segments)
+.RS
+- report/pvseg_cols
+.br
+- report/pvseg_sort
+.br
+.RE
+.
+.TP
+.B vg
+representing report about Volume Groups (vgs)
+.RS
+- report/vgs_cols
+.br
+- report/vgs_sort
+.RE
+.
+.TP
+.B lv
+representing report about Logical Volumes (lvs)
+.RS
+- report/lvs_cols
+.br
+- report/lvs_sort
+.RE
+.
+.TP
+.B seg
+representing report about Logical Volume Segments
+(lvs\ --segments)
+.RS
+- report/segs_cols
+.br
+- report/segs_sort
+.RE
+.
+.TP
+.B full
+representing report combining all of the above as a whole
+(lvm\ fullreport)
+.RS
+- report/pvs_cols_full
+.br
+- report/pvs_sort_full
+.br
+- report/pvsegs_cols_full
+.br
+- report/pvseg_sort_full
+.br
+- report/vgs_cols_full
+.br
+- report/vgs_sort_full
+.br
+- report/lvs_cols_full
+.br
+- report/lvs_sort_full
+.br
+- report/segs_cols_full
+.br
+- report/segs_sort_full
+.RE
+.
+.TP
+.B devtype
+representing report about device types
+(lvm\ devtypes)
+.RS
+- report/devtypes_cols
+.br
+- report/devtypes_sort
+.RE
+.RE
+.ad b
+.hy
+.P
+Use \fBpvs, vgs, lvs -o help\fP or \fBlvm devtypes -o help\fP to get complete
+list of fields that you can use for main report. The list of fields in the
+help output is separated in groups based on which report type they belong to.
+Note that LVM can change final report type used if fields from different
+groups are combined together. Some of these combinations are not allowed in
+which case LVM will issue an error.
+.P
+For all main report subtypes except \fBfull\fP, it's not necessary to use
+\fB--configreport\fP \fIReportName\fP to denote which report any subsequent
+.BR -o ", " -O
+or \fB-S\fP option applies to as they always apply to the single main
+report type. Currently, \fBlvm fullreport\fP is the only command that
+includes more than one \fBmain report\fP subtype. Therefore, the \fB--configreport\fP
+is particularly suitable for the full report if you need to configure each of
+its subreports in a different way.
+.
+.SS Log report specifics
+.
+You can enable log report with \fBlog/report_command_log\fP configuration
+setting - this functionality is disabled by default. The \fBlog report\fP
+contains a log collected during LVM command execution and then the log is
+displayed just like any other report known from main report. There is only one
+log report subtype as shown below together with related configuration settings
+for fields, sorting and selection:
+.
+.RS
+.
+.TP
+.B log
+representing log report
+.br
+- log/command_log_cols
+.br
+- log/command_log_sort
+.br
+- log/command_log_selection
+.RE
+.P
+You always need to use \fB--configreport log\fP together with
+.BR -o | --options ", " -O | --sort
+or
+.BR -S | --selection
+to override configuration settings directly on
+command line for \fBlog report\fP. When compared to \fBmain report\fP, in
+addition to usual configuration settings for report fields and sorting, the
+\fBlog report\fP has also configuration option for selection -
+\fBreport/command_log_selection\fP. This configuration setting is provided for
+convenience so it's not necessary to use
+.BR -S | --select
+on command line
+each time an LVM command is executed and we need the same selection criteria
+to be applied for \fBlog report\fP. Default selection criteria used for
+\fBlog report\fP are
+\fBlog/command_log_selection="!(log_type=status && message=success)"\fP.
+This means that, by default, \fBlog report\fP doesn't display status messages
+about successful operation and it displays only rows with error, warning,
+print-type messages and messages about failure states (for more information,
+see \fBlog report content\fP below).
+.P
+.B Log report coverage
+.br
+Currently, when running LVM commands directly (not in LVM shell), the log
+report covers command's \fBprocessing stage\fP which is the moment when LVM
+entities are iterated and processed one by one. It does not cover any command
+initialization nor command finalization stage. If there is any message issued
+out of log report's coverage range, such message goes directly to output,
+bypassing the \fBlog report\fP. By default, that is \fBstandard error output\fP
+for error and warning messages and \fBstandard output\fP for common print-like
+messages.
+.P
+When running LVM commands in \fBLVM shell\fP, the log report covers the whole
+LVM command's execution, including command's \fBprocessing\fP as well as
+\fBinitialization\fP and \fBfinalization stage\fP. So from this point of view,
+the log report coverage is complete for executed LVM commands. Note that there
+are still a few moments when LVM shell needs to initialize itself before it
+even enters the main loop in which it executes LVM commands. Also, there is a
+moment when \fBLVM shell\fP needs to prepare \fBlog report\fP properly for
+next command executed in the shell and then, after the command's run, the shell
+needs to display the log report for that recently executed command. If there
+is a failure or any other message issued during this time, the LVM will bypass
+\fBlog report\fP and display messages on output directly.
+.P
+For these reasons and for completeness, it's not possible to rely fully on
+\fBlog report\fP as the only indicator of LVM command's status and the only
+place where all messages issued during LVM command execution are collected.
+You always need to check whether the command has not failed out of log
+report's range by checking the non-report output too.
+.P
+To help with this, LVM can separate output which you can then redirect to
+any \fBcustom file descriptor\fP that you prepare before running an LVM
+command or LVM shell and then you make LVM to use these file descriptors
+for different kinds of output by defining environment variables with file
+descriptor numbers. See also \fBLVM_OUT_FD\fP, \fBLVM_ERR_FD\fP and
+\fBLVM_REPORT_FD\fP environment variable description in \fBlvm\fP(8)
+man page.
+.P
+Also note that, by default, reports use the same file descriptor as
+common print-like messages, which is \fBstandard output\fP. If you plan to
+use \fBlog report\fP in your scripts or any external tool, you should use
+\fBLVM_OUT_FD\fP, \fBLVM_ERR_FD\fP and \fBLVM_REPORT_FD\fP to separate all
+output types to different file descriptors. For example, with bash, that
+would be:
+.P
+.RS
+LVM_OUT_FD=3 LVM_ERR_FD=4 LVM_REPORT_FD=5 <lvm command> 3>out_file 4>err_file 5>report_file
+.RE
+.P
+Where the <lvm_command> is either direct LVM command or LVM shell.
+You can collect all three types of output in particular files then.
+.P
+.B Log report content
+.P
+Each item in the log report consists of these set of fields providing various
+information:
+.
+.TP
+Basic information (mandatory):
+.RS
+.TP
+.I log_seq_num
+Item sequence number. The sequence number is unique for each log item and it
+increases in the order of the log items as they appeared during LVM command
+execution.
+.
+.TP
+.I log_type
+Type of log for the item. Currently, these types are used:
+.RS
+.
+.TP
+.B status
+for any status information that is logged
+.
+.TP
+.B print
+for any common message printed while the log is collected
+.
+.TP
+.B error
+for any error message printed while the log is collected
+.
+.TP
+.B warn
+for any warning message printed while the log is collected
+.RE
+.
+.TP
+.I log_context
+Context of the log for the item. Currently, two contexts are identified:
+.RS
+.
+.TP
+.B shell
+for the log collected in the outermost code before and after
+executing concrete LVM commands
+.
+.TP
+.B processing
+for the log collected while processing LVM entities during
+LVM command execution
+.RE
+.RE
+.
+.TP
+Message (mandatory):
+.RS
+.
+.TP
+.I log_message
+Any message associated with current item. For \fBstatus\fP log type,
+the message contains either \fBsuccess\fP or \fBfailure\fP denoting
+current state. For \fBprint\fP, \fBerror\fP and \fBwarn\fP log types,
+the message contains the exact message of that type that got issued.
+.RE
+.
+.TP
+Object information (used only if applicable):
+.RS
+.
+.TP
+.I log_object_type field
+Type of the object processed. Currently, these object types are recognized:
+.RS
+.
+.TP
+.B cmd
+for command as a whole
+.
+.TP
+.B orphan
+for processing group of PVs not in any VG yet
+.
+.TP
+.B pv
+for PV processing
+.
+.TP
+.B label
+for direct PV label processing (without VG metadata)
+.
+.TP
+.B vg
+for VG processing
+.
+.TP
+.B lv
+for LV processing
+.RE
+.
+.TP
+.I log_object_name
+Name of the object processed.
+.
+.TP
+.I log_object_id
+ID of the object processed.
+.
+.TP
+.I log_object_group
+A group where the processed object belongs to.
+.
+.TP
+.I log_object_group_id
+An ID of a group where the processed object belongs to.
+.RE
+.
+.TP
+Numeric status (used only if applicable):
+.RS
+.
+.TP
+.I log_errno
+Error number associated with current item.
+.
+.TP
+.I log_ret_code
+Return code associated with current item.
+.RE
+.P
+You can also run \fBlvm --configreport log -o help\fP to
+to display complete list of fields that you may use for the \fBlog report\fP.
+.
+.SS Selection
+.
+Selection is used for a report to display only rows that match
+\fBselection criteria\fP. All rows are displayed with the additional
+\fBselected\fP field (\fB-o selected\fP) displaying 1 if the row matches the
+\fISelection\fP and 0 otherwise. The \fBselection criteria\fP are a set of
+\fBstatements\fP combined by \fBlogical and grouping operators\fP.
+The \fBstatement\fP consists of a \fBfield\fP name for which a set of valid
+\fBvalues\fP is defined using \fBcomparison operators\fP. For complete list
+of fields names that you can use in selection, see the output of
+\fBlvm -S help\fP. The help output also contains type of values
+that each field displays enclosed in brackets.
+.P
+.B List of operators recognized in selection criteria
+.P
+.RS
+.TP
+Comparison operators (\fIcmp_op\fP)
+.PD 0
+.RS
+.TP
+.B =~
+matching regular expression.
+.TP
+.B !~
+not matching regular expression.
+.TP
+.B =
+equal to.
+.TP
+.B !=
+not equal to.
+.TP
+.B >=
+greater than or equal to.
+.TP
+.B >
+greater than
+.TP
+.B <=
+less than or equal to.
+.TP
+.B <
+less than.
+.RE
+.PD
+.
+.TP
+Binary logical operators (\fIcmp_log\fP)
+.PD 0
+.RS
+.TP
+.B &&
+all fields must match
+.TP
+.B ,
+all fields must match
+.TP
+.B ||
+at least one field must match
+.TP
+.B #
+at least one field must match
+.RE
+.PD
+.
+.TP
+Unary logical operators
+.PD 0
+.RS
+.TP
+.B !
+logical negation
+.RE
+.PD
+.
+.TP
+Grouping operators
+.PD 0
+.RS
+.TP
+.B (
+left parenthesis
+.TP
+.B )
+right parenthesis
+.TP
+.B [
+list start
+.TP
+.B ]
+list end
+.TP
+.B {
+list subset start
+.TP
+.B }
+list subset end
+.RE
+.PD
+.RE
+.P
+.B Field types and selection operands
+.P
+Field type restricts the set of operators and values that you may use with
+the field when defining selection criteria. You can see field type for each
+field if you run \fBlvm -S help\fP where you can find the type name
+enclosed in square brackets. Currently, LVM recognizes these field types in
+reports:
+.
+.RS
+.TP
+.B string
+for set of characters (for each string field type, you can use
+either string or regular expression - regex for the value used in selection
+criteria)
+.TP
+.B string list
+for set of strings
+.TP
+.B number
+for integer value
+.TP
+.B size
+for integer or floating point number with size unit suffix
+(see also \fBlvcreate\fP(8) man page and description for "-L|--size"
+option for the list of recognized suffixes)
+.TP
+.B percent\fP for floating point number with or without "%" suffix
+(e.g. 50 or 50%)
+.TP
+.B time
+for time values
+.RE
+.P
+When using \fBstring list\fP in selection criteria, there are several ways
+how LVM can match string list fields from report, depending on what list
+grouping operator is used and what item separator is used within that set
+of items. Also, note that order of items does not matter here.
+.P
+.IP \[bu] 3
+\fBmatching the set strictly\fP where all items must match - use [ ], e.g.
+["a","b","c"]
+.IP \[bu]
+\fBmatching a subset of the set\fP - use { } with "," or "&&" as item
+delimiter, e.g. {"a","b","c"}
+.IP \[bu]
+\fBmatching an intersection with the set\fP - use { } with "#" or
+"||" as item delimiter, e.g. {"a" || "b" || "c"}
+.P
+When using \fBtime\fP in your selection criteria, LVM can recognize various
+time formats using standard, absolute or freeform expressions. For examples
+demonstrating time expressions in selection criteria, see \fBEXAMPLES\fP section.
+.
+.IP \[bu] 3
+.B Standard time format
+.RS
+.IP - 3
+date
+.RS
+.RS
+YYYY-MM-DD
+.br
+YYYY-MM, auto DD=1
+.br
+YYYY, auto MM=01 and DD=01
+.RE
+.RE
+.
+.IP -
+time
+.RS
+.RS
+hh:mm:ss
+.br
+hh:mm, auto ss=0
+.br
+hh, auto mm=0, auto ss=0
+.RE
+.RE
+.
+.IP -
+timezone
+.RS
+.RS
++hh:mm or -hh:mm
+.br
++hh or -hh
+.RE
+.RE
+.P
+The full date/time specification is YYYY-MM-DD hh:mm:ss. Users are able
+to leave date/time parts from right to left. Whenever these parts are left out,
+a range is assumed automatically with second granularity. For example:
+.P
+.nf
+"2015-07-07 9:51" means range of "2015-07-07 9:51:00" - "2015-07-07 9:51:59"
+"2015-07" means range of "2015-07-01 0:00:00" - "2015-07-31 23:59:59"
+"2015" means range of "2015-01-01 0:00:00" - "2015-12-31 23:59:59"
+.fi
+.RE
+.P
+.IP \[bu] 3
+.B Absolute time format
+.br
+Absolute time is defined as number of seconds since the Epoch
+(1970:01:01 00:00 +00:00).
+.RS
+.IP - 3
+@seconds
+.RE
+.IP \[bu] 3
+.B Freeform time format
+.RS
+.PD 0
+.IP - 3
+weekday names ("Sunday" - "Saturday" or abbreviated as "Sun" - "Sat")
+.IP -
+labels for points in time ("noon", "midnight")
+.IP -
+labels for a day relative to current day ("today", "yesterday")
+.IP -
+points back in time with relative offset from today (N is a number)
+.RS
+.IP
+"N" "seconds" / "minutes" / "hours" / "days" / "weeks" / "years" "ago"
+.IP
+"N" "secs" / "mins" / "hrs" ... "ago"
+.IP
+"N" "s" / "m" / "h" ... "ago"
+.RE
+.IP - 3
+time specification either in hh:mm:ss format or with AM/PM suffixes
+.IP -
+month names ("January" - "December" or abbreviated as "Jan" - "Dec")
+.RE
+.PD
+.P
+.B Informal grammar specification
+.IP - 2
+.B STATEMENT = column \fIcmp_op\fP VALUE \fR|
+.B STATEMENT \fIlog_op\fP STATEMENT \fR|
+.B (STATEMENT) \fR|\fP !(STATEMENT)
+.IP -
+.B VALUE = [VALUE \fIlog_op\fP VALUE]
+.br
+For list-based types: string list. Matches strictly.
+The log_op must always be of one type within the whole list value.
+.IP -
+.B VALUE = {VALUE \fIlog_op\fP VALUE}
+.br
+For list-based types: string list. Matches a subset.
+The log_op must always be of one type within the whole list value.
+.IP -
+.BR VALUE " = " value
+.br
+For scalar types: number, size, percent, string (or string regex).
+.
+.SH EXAMPLES
+.
+.SS Basic usage
+.
+We start our examples with default configuration - \fBlvmconfig\fP(8) is
+helpful command to display configuration settings which are currently used,
+including all configuration related to reporting. We will use it throughout
+examples below to display current configuration.
+.P
+.nf
+# lvmconfig --type full global/units global/suffix \\
+ report/output_format report/compact_output \\
+ report/compact_output_cols report/aligned \\
+ report/headings report/separator \\
+ report/list_item_separator report/prefixes \\
+ report/quoted report/columns_as_rows \\
+ report/binary_values_as_numeric report/time_format \\
+ report/mark_hidden_devices report/two_word_unknown_device \\
+ report/buffered
+units="h"
+suffix=1
+output_format="basic"
+compact_output=0
+compact_output_cols=""
+aligned=1
+headings=1
+separator=" "
+list_item_separator=","
+prefixes=0
+quoted=1
+columns_as_rows=0
+binary_values_as_numeric=0
+time_format="%Y-%m-%d %T %z"
+mark_hidden_devices=1
+two_word_unknown_device=0
+buffered=1
+.fi
+.P
+Also, we start with simple LVM layout with two PVs (/dev/sda, /dev/sdb),
+VG (vg) and two LVs (lvol0 and lvol1) in the VG. We display all possible
+reports as single commands here, see also \fBpvs\fP(8), \fBvgs\fP(8),
+\fBlvs\fP(8) man pages for more information. The field set for each report
+type is configured with configuration settings as we already mentioned in
+\fBmain report specifics\fP section in this man page.
+.P
+.nf
+# lvmconfig --type full report/pvs_cols report/pvs_sort \\
+ report/pvsegs_cols report/pvsegs_sort report/vgs_cols \\
+ report/vgs_sort report/lvs_cols report/lvs_sort \\
+ report/segs_cols report/segs_sort
+pvs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
+pvs_sort="pv_name"
+pvsegs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,
+ pvseg_start,pvseg_size"
+pvsegs_sort="pv_name,pvseg_start"
+vgs_cols="vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
+vgs_sort="vg_name"
+lvs_cols="lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,move_pv,
+ mirror_log,copy_percent,convert_lv"
+lvs_sort="vg_name,lv_name"
+segs_cols="lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
+segs_sort="vg_name,lv_name,seg_start"
+.fi
+.P
+.nf
+# pvs
+ PV VG Fmt Attr PSize PFree
+ /dev/sda vg lvm2 a-- 100.00m 88.00m
+ /dev/sdb vg lvm2 a-- 100.00m 92.00m
+.P
+# pvs --segments
+ PV VG Fmt Attr PSize PFree Start SSize
+ /dev/sda vg lvm2 a-- 100.00m 88.00m 0 1
+ /dev/sda vg lvm2 a-- 100.00m 88.00m 1 1
+ /dev/sda vg lvm2 a-- 100.00m 88.00m 2 1
+ /dev/sda vg lvm2 a-- 100.00m 88.00m 3 22
+ /dev/sdb vg lvm2 a-- 100.00m 92.00m 0 1
+ /dev/sdb vg lvm2 a-- 100.00m 92.00m 1 1
+ /dev/sdb vg lvm2 a-- 100.00m 92.00m 2 23
+.P
+# vgs
+ VG #PV #LV #SN Attr VSize VFree
+ vg 2 2 0 wz--n- 200.00m 180.00m
+.P
+# lvs
+ LV VG Attr LSize Pool Origin Move Log Cpy%Sync Convert
+ lvol0 vg -wi-a----- 4.00m
+ lvol1 vg rwi-a-r--- 4.00m 100.00
+.P
+# lvs --segments
+ LV VG Attr #Str Type SSize
+ lvol0 vg -wi-a----- 1 linear 4.00m
+ lvol1 vg rwi-a-r--- 2 raid1 4.00m
+.fi
+.P
+We will use \fBreport/lvs_cols\fP and \fBreport/lvs_sort\fP configuration
+settings to define our own list of fields to use and to sort by that is
+different from defaults. You can do this for other reports in same manner
+with \fBreport/{pvs,pvseg,vgs,seg}_{cols,sort}\fP configuration settings.
+Also note that in the example below, we don't display the "lv_time" field
+even though we're using it for sorting - this is allowed.
+.P
+.nf
+# lvmconfig --type full report/lvs_cols report/lvs_sort
+lvs_cols="lv_name,lv_size,origin,pool_lv,copy_percent"
+lvs_sort="-lv_time"
+.P
+# lvs
+ LV LSize Origin Pool Cpy%Sync
+ lvol1 4.00m 100.00
+ lvol0 4.00m
+.fi
+.P
+You can use
+.BR -o | --options
+command line option to override current
+configuration directly on command line.
+.P
+.nf
+# lvs -o lv_name,lv_size
+ LV LSize
+ lvol1 4.00m
+ lvol0 4.00m
+.P
+# lvs -o+lv_layout
+ LV LSize Origin Pool Cpy%Sync Layout
+ lvol1 4.00m 100.00 raid,raid1
+ lvol0 4.00m linear
+.P
+# lvs -o-origin
+ LV LSize Pool Cpy%Sync
+ lvol1 4.00m 100.00
+ lvol0 4.00m
+.P
+# lvs -o lv_name,lv_size,origin -o+lv_layout -o-origin -O lv_name
+ LV LSize Layout
+ lvol0 4.00m linear
+ lvol1 4.00m raid,raid1
+.fi
+.P
+You can obtain the same information with single command where all the
+information about PVs, PV segments, LVs and LV segments are obtained
+per VG under a single VG lock for consistency, see also \fBlvm fullreport\fP(8)
+man page for more information. The fullreport has its own configuration
+settings to define field sets to use, similar to individual reports as
+displayed above, but configuration settings have "_full" suffix now.
+This way, it's possible to configure different sets of fields to display
+and to sort by for individual reports as well as the full report.
+.P
+.nf
+# lvmconfig --type full report/pvs_cols_full \\
+ report/pvs_sort_full report/pvsegs_cols_full \\
+ report/pvsegs_sort_full report/vgs_cols_full \\
+ report/vgs_sort_full report/lvs_cols_full \\
+ report/lvs_sort_full report/segs_cols_full \\
+ report/segs_sort_full
+pvs_cols_full="pv_name,vg_name"
+pvs_sort_full="pv_name"
+pvsegs_cols_full="pv_name,pvseg_start,pvseg_size"
+pvsegs_sort_full="pv_uuid,pvseg_start"
+vgs_cols_full="vg_name"
+vgs_sort_full="vg_name"
+lvs_cols_full="lv_name,vg_name"
+lvs_sort_full="vg_name,lv_name"
+segs_cols_full="lv_name,seg_start,seg_size"
+segs_sort_full="lv_uuid,seg_start"
+.fi
+.P
+.nf
+# lvm fullreport
+ VG
+ vg
+ PV VG
+ /dev/sda vg
+ /dev/sdb vg
+ LV VG
+ lvol0 vg
+ lvol1 vg
+ PV Start SSize
+ /dev/sda 0 1
+ /dev/sda 1 1
+ /dev/sda 2 1
+ /dev/sda 3 22
+ /dev/sdb 0 1
+ /dev/sdb 1 1
+ /dev/sdb 2 23
+ LV Start SSize
+ lvol0 0 4.00m
+ lvol1 0 4.00m
+.fi
+.
+.SS Automatic output compaction
+.
+If you look at the lvs output above, you can see that the report also contains
+fields for which there is no information to display (e.g. the columns under
+"Origin" and "Pool" heading - the "origin" and "pool_lv" fields). LVM can
+automatically compact report output so such fields are not included in final
+output. To enable this feature and to compact all fields, use
+\fBreport/compact_output=1\fP in your configuration.
+.P
+.nf
+# lvmconfig --type full report/compact_output
+compact_output=1
+.P
+# lvs
+ LV LSize Cpy%Sync
+ lvol1 4.00m 100.00
+ lvol0 4.00m
+.P
+# lvs vg/lvol0
+ LV LSize
+ lvol0 4.00m
+.fi
+.P
+Alternatively, you can define which fields should be compacted by configuring
+\fBreport/compact_output_cols\fP configuration setting (or
+.BR -o | --options " " #
+command line option).
+.P
+.nf
+# lvmconfig --type full report/compact_output report/compact_output_cols
+compact_output=0
+compact_output_cols="origin"
+.P
+# lvs
+ LV LSize Pool Cpy%Sync
+ lvol1 4.00m 100.00
+ lvol0 4.00m
+.P
+# lvs vg/lvol0
+ LV LSize Pool
+ lvol0 4.00m
+.P
+# lvs -o#pool_lv
+ LV LSize Origin Cpy%Sync
+ lvol1 4.00m 100.00
+ lvol0 4.00m
+.fi
+.P
+We will use \fBreport/compact_output=1\fP for subsequent examples.
+.
+.SS Further formatting options
+.
+By default, LVM displays sizes in reports in human-readable form which means
+that the most suitable unit is used so it's easy to read. You can use
+\fBreport/units\fP configuration setting (or \fB--units\fP option directly
+on command line) and \fBreport/suffix\fP
+configuration setting (or \fB--nosuffix\fP command line option) to change this.
+.P
+.nf
+# lvs --units b --nosuffix
+ LV LSize Cpy%Sync
+ lvol1 4194304 100.00
+ lvol0 4194304
+.fi
+.P
+If you want to configure whether report headings are displayed or not, use
+\fBreport/headings\fP configuration settings (or \fB--noheadings\fP command
+line option).
+.P
+.nf
+# lvs --noheadings
+ lvol1 4.00m 100.00
+ lvol0 4.00m
+.fi
+.P
+In some cases, it may be useful to display report content as key=value pairs
+where key here is actually the field name. Use \fBreport/prefixes\fP
+configuration setting (or \fB--nameprefixes\fP command line option) to switch
+between standard output and the key=value output. The key=value pair is the
+output that is suitable for use in scripts and for other tools to parse easily.
+Usually, you also don't want to display headings with the output that has these
+key=value pairs.
+.P
+.nf
+# lvs --noheadings --nameprefixes
+ LVM2_LV_NAME='lvol1' LVM2_LV_SIZE='4.00m' LVM2_COPY_PERCENT='100.00'
+ LVM2_LV_NAME='lvol0' LVM2_LV_SIZE='4.00m' LVM2_COPY_PERCENT=''
+.fi
+.P
+To define whether quotation marks in key=value pairs should be used or not,
+use \fBreport/quoted\fP configuration setting (or \fB--unquoted\fP command
+line option).
+.P
+.nf
+# lvs --noheadings --nameprefixes --unquoted
+ LVM2_LV_NAME=lvol1 LVM2_LV_SIZE=4.00m LVM2_COPY_PERCENT=100.00
+ LVM2_LV_NAME=lvol0 LVM2_LV_SIZE=4.00m LVM2_COPY_PERCENT=
+.fi
+.P
+For easier parsing, you can even transpose the report so each column now
+becomes a row in the output. This is done with \fBreport/output_as_rows\fP
+configuration setting (or \fB--rows\fP command line option).
+.P
+.nf
+# lvs --noheadings --nameprefixes --unquoted --rows
+ LVM2_LV_NAME=lvol1 LVM2_LV_NAME=lvol0
+ LVM2_LV_SIZE=4.00m LVM2_LV_SIZE=4.00m
+ LVM2_COPY_PERCENT=100.00 LVM2_COPY_PERCENT=
+.fi
+.P
+Use \fBreport/separator\fP configuration setting (or \fB--separator\fP command
+line option) to define your own field separator to use.
+.P
+.nf
+# lvs --noheadings --nameprefixes --unquoted --separator " | "
+ LVM2_LV_NAME=lvol1 | LVM2_LV_SIZE=4.00m | LVM2_COPY_PERCENT=100.00
+ LVM2_LV_NAME=lvol0 | LVM2_LV_SIZE=4.00m | LVM2_COPY_PERCENT=
+.fi
+.P
+If you are using your own separator, the columns in the output are not aligned
+by default. Use \fBreport/aligned\fP configuration setting (or \fB--aligned\fP
+command line option) for LVM to add extra spaces in report to align the output
+properly.
+.P
+.nf
+# lvs --separator " | "
+ LV | LSize | Cpy%Sync
+ lvol1 | 4.00m | 100.00
+ lvol0 | 4.00m |
+.P
+# lvs --separator " | " --aligned
+ LV | LSize | Cpy%Sync
+ lvol1 | 4.00m | 100.00
+ lvol0 | 4.00m |
+.fi
+.P
+Let's display one one more field in addition ("lv_tags" in this example)
+for the lvs report output.
+.P
+.nf
+# lvs -o+lv_tags
+ LV LSize Cpy%Sync LV Tags
+ lvol1 4.00m 100.00
+ lvol0 4.00m tagA,tagB
+.fi
+.P
+The "LV Tags" column in the example above displays two list values,
+separated by "," character for LV lvol0. If you need different list item
+separator, use \fBreport/list_item_separator\fP configuration setting its
+definition.
+.P
+.nf
+# lvmconfig --type full report/list_item_separator
+list_item_separator=";"
+.P
+# lvs -o+tags
+ LV LSize Cpy%Sync LV Tags
+ lvol1 4.00m 100.00
+ lvol0 4.00m tagA;tagB
+.fi
+.P
+But let's still use the original "," character for list_item_separator
+for subsequent examples.
+.P
+Format for any of time values displayed in reports can be configured with
+\fBreport/time_format\fP configuration setting. By default complete date
+and time is displayed, including timezone.
+.P
+.nf
+# lvmconfig --type full report/time_format
+time_format="%Y-%m-%d %T %z"
+.P
+# lvs -o+time
+ LV LSize Cpy%Sync CTime
+ lvol1 4.00m 100.00 2016-08-29 12:53:36 +0200
+ lvol0 4.00m 2016-08-29 10:15:17 +0200
+.fi
+.P
+We can change time format in similar way as we do when using \fBdate\fP(1)
+command or \fBstrftime\fP(3) function
+(\fBlvmconfig --type default --withcomments report/time_format\fP will
+give you complete list of available formatting options). In the example
+below, we decided to use %s for number of seconds since Epoch (1970-01-01 UTC).
+.P
+.nf
+# lvmconfig --type full report/time_format
+time_format="%s"
+.P
+# lvs
+ LV Attr LSize Cpy%Sync LV Tags CTime
+ lvol1 rwi-a-r--- 4.00m 100.00 1472468016
+ lvol0 -wi-a----- 4.00m tagA,tagB 1472458517
+.fi
+.P
+The \fBlvs\fP does not display hidden LVs by default - to include these LVs
+in the output, you need to use \fB-a|--all\fP command line option. Names for
+these hidden LVs are displayed within square brackets.
+.P
+.nf
+# lvs -a
+ LV LSize Cpy%Sync
+ lvol1 4.00m 100.00
+ [lvol1_rimage_0] 4.00m
+ [lvol1_rmeta_0] 4.00m
+ [lvol1_rimage_1] 4.00m
+ [lvol1_rmeta_1] 4.00m
+ lvol0 4.00m
+.fi
+.P
+You can configure LVM to display the square brackets for hidden LVs or not with
+\fBreport/mark_hidden_devices\fP configuration setting.
+.P
+.nf
+# lvmconfig --type full report/mark_hidden_devices
+mark_hidden_devices=0
+.P
+# lvs -a
+ LV LSize Cpy%Sync
+ lvol1 4.00m 100.00
+ lvol1_rimage_0 4.00m
+ lvol1_rmeta_0 4.00m
+ lvol1_rimage_1 4.00m
+ lvol1_rmeta_1 4.00m
+ lvol0 4.00m
+.fi
+.P
+It's not recommended to use LV marks for hidden devices to decide whether the
+LV is the one to use by end users or not. Please, use "lv_role" field instead
+which can report whether the LV is "public" or "private". The private LVs are
+used by LVM only and they should not be accessed directly by end users.
+.P
+.nf
+# lvs -a -o+lv_role
+ LV LSize Cpy%Sync Role
+ lvol1 4.00m 100.00 public
+ lvol1_rimage_0 4.00m private,raid,image
+ lvol1_rmeta_0 4.00m private,raid,metadata
+ lvol1_rimage_1 4.00m private,raid,image
+ lvol1_rmeta_1 4.00m private,raid,metadata
+ lvol0 4.00m public
+.fi
+.P
+Some of the reporting fields that LVM reports are of binary nature. For such
+fields, it's either possible to display word representation of the value
+(this is used by default) or numeric value (0/1 or -1 in case the value is
+undefined).
+.P
+.nf
+# lvs -o+lv_active_locally
+ LV LSize Cpy%Sync ActLocal
+ lvol1 4.00m 100.00 active locally
+ lvol0 4.00m active locally
+.fi
+.P
+We can change the way how these binary values are displayed with
+\fBreport/binary_values_as_numeric\fP configuration setting.
+.P
+.nf
+# lvmconfig --type full report/binary_values_as_numeric
+binary_values_as_numeric=1
+.P
+# lvs -o+lv_active_locally
+ LV LSize Cpy%Sync ActLocal
+ lvol1 4.00m 100.00 1
+ lvol0 4.00m 1
+.fi
+.
+.SS Changing output format
+.
+LVM can output reports in different formats - use \fBreport/output_format\fP
+configuration setting (or \fB--reportformat\fP command line option) to switch
+the report output format.
+
+.P
+Currently, LVM supports these output formats:
+.RS
+- \fB"basic"\fP (all the examples we used above used this format),
+.br
+- \fB"json"\fP,
+.br
+- \fB"json_std"\fP.
+.RE
+.P
+For example:
+.nf
+# lvs -o lv_name,lv_size --reportformat json
+ {
+ "report": [
+ {
+ "lv": [
+ {"lv_name":"lvol1", "lv_size":"4.00m"},
+ {"lv_name":"lvol0", "lv_size":"4.00m"}
+ ]
+ }
+ ]
+ }
+.fi
+.P
+The \fBjson_std\fP output format is more compliant with JSON standard and
+compared to the original \fBjson\fP format:
+.RS
+- it does not use double quotes around numeric values,
+.br
+- numeric values are always expressed as numbers, not reserved strings
+ representing them (this also means that report/binary_values_as_numeric=1
+ setting is forced)
+.br
+- it uses 'null' for undefined numeric values,
+.br
+- it prints string list as proper JSON array of strings instead of a single string.
+.RE
+.P
+Note that some configuration settings and command line options have no
+effect with certain report formats. For example, with \fBjson\fP or
+\fBjson_std\fP output, it doesn't have any meaning to use \fBreport/aligned\fP
+(\fB--aligned\fP), \fBreport/noheadings\fP (\fB--noheadings\fP),
+\fBreport/columns_as_rows\fP (\fB--rows\fP) or \fBreport/buffered\fP
+(\fB--unbuffered\fP). All these configuration settings and command line options
+are ignored if using the \fBjson\fP or \fBjson_std\fP report output format.
+.
+.SS Selection
+.
+If you need to select only specific rows from report, you can use LVM's
+report selection feature. If you call \fBlvm -S help\fP, you'll get
+quick help on selection. The help contains list of all fields that LVM
+can use in reports together with its type enclosed in square brackets.
+The example below contains a line from lvs -S help.
+.P
+.nf
+# lvs -S help
+ ...
+ lv_size - Size of LV in current units. [size]
+ ...
+.fi
+.P
+This line tells you you that the "lv_size" field is of "size" type. If you
+look at the bottom of the help output, you can see section about
+"Selection operators" and its "Comparison operators".
+.P
+.nf
+# lvs -S help
+ ...
+Selection operators
+-------------------
+Comparison operators:
+ =~ - Matching regular expression. [regex]
+ !~ - Not matching regular expression. [regex]
+ = - Equal to. [number, size, percent, string, string list, time]
+ != - Not equal to. [number, size, percent, string, string_list, time]
+ >= - Greater than or equal to. [number, size, percent, time]
+ > - Greater than. [number, size, percent, time]
+ <= - Less than or equal to. [number, size, percent, time]
+ < - Less than. [number, size, percent, time]
+since - Since specified time (same as '>='). [time]
+after - After specified time (same as '>'). [time]
+until - Until specified time (same as '<='). [time]
+before - Before specified time (same as '<'). [time]
+ ...
+.fi
+.P
+Here you can match comparison operators that you may use with the "lv_size"
+field which is of type "size" - it's =, !=, >=, >, <= and <. You can find
+applicable comparison operators for other fields and other field types the
+same way.
+.P
+To demonstrate selection functionality in LVM, we will create more LVs in
+addition to lvol0 and lvol1 we used in our previous examples.
+.P
+.nf
+# lvs -o name,size,origin,snap_percent,tags,time
+ LV LSize Origin Snap% LV Tags CTime
+ lvol4 4.00m lvol2 24.61 2016-09-09 16:57:44 +0200
+ lvol3 4.00m lvol2 5.08 2016-09-09 16:56:48 +0200
+ lvol2 8.00m tagA,tagC,tagD 2016-09-09 16:55:12 +0200
+ lvol1 4.00m 2016-08-29 12:53:36 +0200
+ lvol0 4.00m tagA,tagB 2016-08-29 10:15:17 +0200
+.fi
+.P
+When selecting size and percent fields, we don't need to use units.
+For sizes, default "m" (for MiB) is used - this is the same behaviour
+as already used for LVM commands when specifying sizes (e.g. lvcreate -L).
+For percent fields, "%" is assumed automatically if it's not specified.
+The example below also demonstrates how several criteria can be combined
+together.
+.P
+.nf
+# lvs -o name,size,snap_percent -S 'size=8m'
+ LV LSize
+ lvol2 8.00m
+.P
+# lvs -o name,size,snap_percent -S 'size=8'
+ LV LSize
+ lvol2 8.00m
+.P
+# lvs -o name,size,snap_percent -S 'size < 5000k'
+ LV LSize Snap%
+ lvol4 4.00m 24.61
+ lvol3 4.00m 5.08
+ lvol1 4.00m
+ lvol0 4.00m
+.P
+# lvs -o name,size,snap_percent -S 'size < 5000k && snap_percent > 20'
+ LV LSize Snap%
+ lvol4 4.00m 24.61
+.P
+# lvs -o name,size,snap_percent \\
+ -S '(size < 5000k && snap_percent > 20%) || name=lvol2'
+ LV LSize Snap%
+ lvol4 4.00m 24.61
+ lvol2 8.00m
+.fi
+.P
+You can also use selection together with processing-oriented commands.
+.P
+.nf
+# lvchange --addtag test -S 'size < 5000k'
+ Logical volume vg/lvol1 changed.
+ Logical volume vg/lvol0 changed.
+ Logical volume vg/lvol3 changed.
+ Logical volume vg/lvol4 changed.
+.P
+# lvchange --deltag test -S 'tags = test'
+ Logical volume vg/lvol1 changed.
+ Logical volume vg/lvol0 changed.
+ Logical volume vg/lvol3 changed.
+ Logical volume vg/lvol4 changed.
+.fi
+.P
+LVM can recognize more complex values used in selection criteria for
+string list and time field types. For string lists, you can match
+whole list strictly, its subset or intersection. Let's take "lv_tags"
+field as an example - we select only rows which contain "tagA" within
+tags field. We're using { } to denote that we're interested in subset
+that matches. If the subset has only one item, we can leave out { }.
+.P
+.nf
+# lvs -o name,tags -S 'tags={tagA}'
+ LV LV Tags
+ lvol2 tagA,tagC,tagD
+ lvol0 tagA,tagB
+.P
+# lvs -o name,tags -S 'tags=tagA'
+ LV LV Tags
+ lvol2 tagA,tagC,tagD
+ lvol0 tagA,tagB
+.fi
+.P
+Depending on whether we use "&&" (or ",") or "||" ( or "#") as delimiter
+for items in the set we define in selection criterion for string list,
+we either match subset ("&&" or ",") or even intersection ("||" or "#").
+.P
+.nf
+# lvs -o name,tags -S 'tags={tagA,tagC,tagD}'
+ LV LV Tags
+ lvol2 tagA,tagC,tagD
+.P
+# lvs -o name,tags -S 'tags={tagA || tagC || tagD}'
+ LV LV Tags
+ lvol2 tagA,tagC,tagD
+ lvol0 tagA,tagB
+.fi
+.P
+To match the complete set, use [ ] with "&&" (or ",") as delimiter for items.
+Also note that the order in which we define items in the set is not relevant.
+.P
+.nf
+# lvs -o name,tags -S 'tags=[tagA]'
+.P
+# lvs -o name,tags -S 'tags=[tagB,tagA]'
+ LV LV Tags
+ lvol0 tagA,tagB
+.fi
+.P
+If you use [ ] with "||" (or "#"), this is exactly the same as using { }.
+.P
+.nf
+# lvs -o name,tags -S 'tags=[tagA || tagC || tagD]'
+ LV LV Tags
+ lvol2 tagA,tagC,tagD
+ lvol0 tagA,tagB
+.fi
+.P
+To match a set with no items, use "" to denote this (note that we have
+output compaction enabled so the "LV Tags" column is not displayed in
+the example below because it's blank and so it gets compacted).
+.P
+.nf
+# lvs -o name,tags -S 'tags=""'
+ LV
+ lvol4
+ lvol3
+ lvol1
+.P
+# lvs -o name,tags -S 'tags!=""'
+ LV LV Tags
+ lvol2 tagA,tagC,tagD
+ lvol0 tagA,tagB
+.fi
+.P
+When doing selection based on time fields, we can use either standard,
+absolute or freeform time expressions in selection criteria. Examples below
+are using standard forms.
+.P
+.nf
+# lvs -o name,time
+ LV CTime
+ lvol4 2016-09-09 16:57:44 +0200
+ lvol3 2016-09-09 16:56:48 +0200
+ lvol2 2016-09-09 16:55:12 +0200
+ lvol1 2016-08-29 12:53:36 +0200
+ lvol0 2016-08-29 10:15:17 +0200
+.P
+# lvs -o name,time -S 'time since "2016-09-01"'
+ LV CTime
+ lvol4 2016-09-09 16:57:44 +0200
+ lvol3 2016-09-09 16:56:48 +0200
+ lvol2 2016-09-09 16:55:12 +0200
+.P
+# lvs -o name,time -S 'time since "2016-09-09 16:56"'
+ LV CTime
+ lvol4 2016-09-09 16:57:44 +0200
+ lvol3 2016-09-09 16:56:48 +0200
+.P
+# lvs -o name,time -S 'time since "2016-09-09 16:57:30"'
+ LV CTime
+ lvol4 2016-09-09 16:57:44 +0200
+.P
+# lvs -o name,time \\
+ -S 'time since "2016-08-29" && time until "2016-09-09 16:55:12"'
+ LV CTime
+ lvol2 2016-09-09 16:55:12 +0200
+ lvol1 2016-08-29 12:53:36 +0200
+ lvol0 2016-08-29 10:15:17 +0200
+.P
+# lvs -o name,time \\
+ -S 'time since "2016-08-29" && time before "2016-09-09 16:55:12"'
+ LV CTime
+ lvol1 2016-08-29 12:53:36 +0200
+ lvol0 2016-08-29 10:15:17 +0200
+.fi
+.P
+Time operators have synonyms: ">=" for since, "<=" for until,
+">" for "after" and "<" for "before".
+.P
+.nf
+# lvs -o name,time \\
+ -S 'time >= "2016-08-29" && time <= "2016-09-09 16:55:30"'
+ LV CTime
+ lvol2 2016-09-09 16:55:12 +0200
+ lvol1 2016-08-29 12:53:36 +0200
+ lvol0 2016-08-29 10:15:17 +0200
+.P
+# lvs -o name,time \\
+ -S 'time since "2016-08-29" && time < "2016-09-09 16:55:12"'
+ LV CTime
+ lvol1 2016-08-29 12:53:36 +0200
+ lvol0 2016-08-29 10:15:17 +0200
+.fi
+.P
+Example below demonstrates using absolute time expression.
+.P
+.nf
+# lvs -o name,time --config report/time_format="%s"
+ LV CTime
+ lvol4 1473433064
+ lvol3 1473433008
+ lvol2 1473432912
+ lvol1 1472468016
+ lvol0 1472458517
+.P
+# lvs -o name,time -S 'time since @1473433008'
+ LV CTime
+ lvol4 2016-09-09 16:57:44 +0200
+ lvol3 2016-09-09 16:56:48 +0200
+.fi
+.P
+Examples below demonstrates using freeform time expressions.
+.P
+.nf
+# lvs -o name,time -S 'time since "2 weeks ago"'
+ LV CTime
+ lvol4 2016-09-09 16:57:44 +0200
+ lvol3 2016-09-09 16:56:48 +0200
+ lvol2 2016-09-09 16:55:12 +0200
+ lvol1 2016-08-29 12:53:36 +0200
+ lvol0 2016-08-29 10:15:17 +0200
+.P
+# lvs -o name,time -S 'time since "1 week ago"'
+ LV CTime
+ lvol4 2016-09-09 16:57:44 +0200
+ lvol3 2016-09-09 16:56:48 +0200
+ lvol2 2016-09-09 16:55:12 +0200
+.P
+# lvs -o name,time -S 'time since "2 weeks ago"'
+ LV CTime
+ lvol1 2016-08-29 12:53:36 +0200
+ lvol0 2016-08-29 10:15:17 +0200
+.P
+# lvs -o name,time -S 'time before "1 week ago"'
+ LV CTime
+ lvol1 2016-08-29 12:53:36 +0200
+ lvol0 2016-08-29 10:15:17 +0200
+.P
+# lvs -o name,time -S 'time since "68 hours ago"'
+ LV CTime
+ lvol4 2016-09-09 16:57:44 +0200
+ lvol3 2016-09-09 16:56:48 +0200
+ lvol2 2016-09-09 16:55:12 +0200
+.P
+# lvs -o name,time -S 'time since "1 year 3 months ago"'
+ LV CTime
+ lvol4 2016-09-09 16:57:44 +0200
+ lvol3 2016-09-09 16:56:48 +0200
+ lvol2 2016-09-09 16:55:12 +0200
+ lvol1 2016-08-29 12:53:36 +0200
+ lvol0 2016-08-29 10:15:17 +0200
+.fi
+.
+.SS Command log reporting
+.
+As described in \fBcategorization based on reporting facility\fP section
+at the beginning of this document, both \fBreport-oriented\fP and
+\fBprocessing-oriented\fP LVM commands can report the command log if
+this is enabled with \fBlog/report_command_log\fP configuration setting.
+Just like any other report, we can set the set of fields to display
+(\fBlog/command_log_cols\fP) and to sort by (\fBlog/command_log_sort\fP)
+for this report.
+.P
+.nf
+# lvmconfig --type full log/report_command_log log/command_log_cols \\
+ log/command_log_sort log/command_log_selection
+report_command_log=1
+command_log_cols="log_seq_num,log_type,log_context,log_object_type,
+ log_object_name,log_object_group,log_message,
+ log_errno,log_ret_code"
+command_log_sort="log_seq_num"
+command_log_selection="!(log_type=status && message=success)"
+.P
+# lvs
+ Logical Volume
+ ==============
+ LV LSize Cpy%Sync
+ lvol1 4.00m 100.00
+ lvol0 4.00m
+.P
+ Command Log
+ ===========
+ Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode
+.fi
+.P
+As you can see, the command log is empty (it contains only field names).
+By default, LVM uses selection on the command log report and this case
+no row matched the selection criteria, see also \fBlog report specifics\fP
+section in this document for more information. We're displaying complete
+log report in the example below where we can see that both LVs lvol0 and
+lvol1 were successfully processed as well as the VG vg they are part of.
+.P
+.nf
+# lvmconfig --type full log/command_log_selection
+command_log_selection="all"
+.P
+# lvs
+ Logical Volume
+ ==============
+ LV LSize Cpy%Sync
+ lvol1 4.00m 100.00
+ lvol0 4.00m
+.P
+ Command Log
+ ===========
+ Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode
+ 1 status processing lv lvol0 vg success 0 1
+ 2 status processing lv lvol1 vg success 0 1
+ 3 status processing vg vg success 0 1
+.P
+# lvchange -an vg/lvol1
+ Command Log
+ ===========
+ Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode
+ 1 status processing lv lvol1 vg success 0 1
+ 2 status processing vg vg success 0 1
+.fi
+.
+.SS Handling multiple reports per single command
+.
+To configure the log report directly on command line, we need to use
+\fB--configreport\fP option before we start any
+.BR -o | --options ,
+.BR -O | --sort
+or
+.BR -S | --select
+that is targeted for log report.
+.P
+.nf
+# lvs -o lv_name,lv_size --configreport log -o log_object_type, \\
+ log_object_name,log_message,log_ret_code
+ Logical Volume
+ ==============
+ LV LSize
+ lvol1 4.00m
+ lvol0 4.00m
+.P
+ Command Log
+ ===========
+ ObjType ObjName Msg RetCode
+ lv lvol0 success 1
+ lv lvol1 success 1
+ vg vg success 1
+.fi
+.P
+The \fBlvm fullreport\fP, with or without log report, consists of several
+reports - the \fB--configreport\fP is also used to target particular
+subreport here.
+.P
+Below is an extended example with \fBlvm fullreport\fP to illustrate
+combination of various options. The report output is in JSON format.
+Also, we configure "vg", "pvseg", "seg" and "log" subreport to contain
+only specified fields. For the "pvseg" subreport, we're interested only
+in PV names having "sda" in their name. For the "log" subreport we're
+interested only in log lines related to either "lvol0" object or object
+having "sda" in its name. Also, for the log subreport we define ordering
+to be based on "log_object_type" field.
+.P
+.nf
+# lvm fullreport --reportformat json \\
+ --configreport vg -o vg_name,vg_size \\
+ --configreport pvseg -o pv_name,pvseg_start \\
+ -S 'pv_name=~sda' \\
+ --configreport seg -o lv_name,seg_start \\
+ --configreport log -o log_object_type,log_object_name \\
+ -O log_object_type \\
+ -S 'log_object_name=lvol0 || \\
+ log_object_name=~sda'
+ {
+ "report": [
+ {
+ "vg": [
+ {"vg_name":"vg", "vg_size":"200.00m"}
+ ]
+ ,
+ "pv": [
+ {"pv_name":"/dev/sda", "vg_name":"vg"},
+ {"pv_name":"/dev/sdb", "vg_name":"vg"}
+ ]
+ ,
+ "lv": [
+ {"lv_name":"lvol0", "vg_name":"vg"},
+ {"lv_name":"lvol1", "vg_name":"vg"}
+ ]
+ ,
+ "pvseg": [
+ {"pv_name":"/dev/sda", "pvseg_start":"0"},
+ {"pv_name":"/dev/sda", "pvseg_start":"1"},
+ {"pv_name":"/dev/sda", "pvseg_start":"2"},
+ {"pv_name":"/dev/sda", "pvseg_start":"3"}
+ ]
+ ,
+ "seg": [
+ {"lv_name":"lvol0", "seg_start":"0 "},
+ {"lv_name":"lvol1", "seg_start":"0 "}
+ ]
+ }
+ ]
+ ,
+ "log": [
+ {"log_object_type":"lv", "log_object_name":"lvol0"},
+ {"log_object_type":"lv", "log_object_name":"lvol0"},
+ {"log_object_type":"pv", "log_object_name":"/dev/sda"},
+ {"log_object_type":"pv", "log_object_name":"/dev/sda"},
+ ]
+ }
+.fi
+.
+.SS Report extensions for LVM shell
+.
+As already stated in \fBlog report coverage\fP paragraph under
+\fBlog report specifics\fP in this documentation, when using \fBLVM shell\fP
+the \fBlog report\fP coverage is wider. There's also special command
+designed to query last command's log report in the \fBLVM shell\fP -
+the \fBlastlog\fP command.
+.P
+The example below illustrates a situation where we called lvs command.
+After that, we inspected the log report with the \fBlastlog\fP, without
+any selection so all the log report is displayed on output. Then we called
+\fBlastlog\fP further, giving various selection criteria. Then we ran
+unknown LVM command "abc" for which the log report displays appropriate
+failure state.
+.P
+.nf
+# lvm
+lvm> lvs
+ Logical Volume
+ ==============
+ LV LSize Cpy%Sync
+ lvol1 4.00m 100.00
+ lvol0 4.00m
+.P
+ Command Log
+ ===========
+ Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode
+ 1 status processing lv lvol0 vg success 0 1
+ 2 status processing lv lvol1 vg success 0 1
+ 3 status processing vg vg success 0 1
+ 4 status shell cmd lvs success 0 1
+.P
+lvm> lastlog
+ Command Log
+ ===========
+ Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode
+ 1 status processing lv lvol0 vg success 0 1
+ 2 status processing lv lvol1 vg success 0 1
+ 3 status processing vg vg success 0 1
+ 4 status shell cmd lvs success 0 1
+.P
+lvm> lastlog -S log_object_type=lv
+ Command Log
+ ===========
+ Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode
+ 1 status processing lv lvol0 vg success 0 1
+ 2 status processing lv lvol1 vg success 0 1
+.P
+lvm> lastlog -S log_context=shell
+ Command Log
+ ===========
+ Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode
+ 4 status shell cmd lvs success 0 1
+.P
+lvm> abc
+ Command Log
+ ===========
+ Seq LogType Context ObjType ObjName ObjGrp Msg Errno RetCode
+ 1 error shell cmd abc No such command 'abc'. Try 'help'. -1 0
+ 2 status shell cmd abc failure -1 2
+.fi
+.
+.SH SEE ALSO
+.
+.BR lvm (8),
+.BR lvmconfig (8),
+.BR "lvm fullreport" (8),
+.BR lvcreate (8),
+.br
+.BR lvs (8),
+.BR pvs (8),
+.BR vgs (8),
+.P
+.BR date (1),
+.BR strftime (3)
diff --git a/man/lvmsadc.8.in b/man/lvmsadc.8.in
deleted file mode 100644
index e0af210..0000000
--- a/man/lvmsadc.8.in
+++ /dev/null
@@ -1,13 +0,0 @@
-.TH "LVMSADC" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
-
-.SH "NAME"
-lvmsadc \- LVM system activity data collector
-
-.SH "SYNOPSIS"
-.B lvmsadc
-
-.SH "DESCRIPTION"
-lvmsadc is not currently supported under LVM2.
-
-.SH "SEE ALSO"
-.BR lvm (8)
diff --git a/man/lvmsadc.8_main b/man/lvmsadc.8_main
new file mode 100644
index 0000000..039ff7b
--- /dev/null
+++ b/man/lvmsadc.8_main
@@ -0,0 +1,20 @@
+.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 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
deleted file mode 100644
index 29de791..0000000
--- a/man/lvmsar.8.in
+++ /dev/null
@@ -1,13 +0,0 @@
-.TH "LVMSAR" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
-
-.SH "NAME"
-lvmsar \- LVM system activity reporter
-
-.SH "SYNOPSIS"
-.B lvmsar
-
-.SH "DESCRIPTION"
-lvmsar is not currently supported under LVM2.
-
-.SH "SEE ALSO"
-.BR lvm (8)
diff --git a/man/lvmsar.8_main b/man/lvmsar.8_main
new file mode 100644
index 0000000..4c3f14b
--- /dev/null
+++ b/man/lvmsar.8_main
@@ -0,0 +1,20 @@
+.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 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/lvmsystemid.7_main b/man/lvmsystemid.7_main
new file mode 100644
index 0000000..06e7f34
--- /dev/null
+++ b/man/lvmsystemid.7_main
@@ -0,0 +1,383 @@
+.TH "LVMSYSTEMID" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH NAME
+.
+lvmsystemid \(em LVM system ID
+.
+.SH DESCRIPTION
+.
+The \fBlvm\fP(8) system ID restricts Volume Group (VG) access to one host.
+This is useful when a VG is placed on shared storage devices, or when
+local devices are visible to both host and guest operating systems. In
+cases like these, a VG can be visible to multiple hosts at once, and some
+mechanism is needed to protect it from being used by more than one host at
+a time.
+.P
+A VG's system ID identifies one host as the VG owner. The host with a
+matching system ID can use the VG and its LVs, while LVM on other hosts
+will ignore it. This protects the VG from being accidentally used from
+other hosts.
+.P
+The system ID is a string that uniquely identifies a host. It can be
+configured as a custom value, or it can be assigned automatically by LVM
+using some unique identifier already available on the host, e.g.
+machine-id or uname.
+.P
+When a new VG is created, the system ID of the local host is recorded in
+the VG metadata. The creating host then owns the new VG, and LVM on other
+hosts will ignore it. When an existing, exported VG is imported
+(vgimport), the system ID of the local host is saved in the VG metadata,
+and the importing host owns the VG.
+.P
+A VG without a system ID can be used by LVM on any host where the VG's
+devices are visible. When system IDs are not used, device filters should
+be configured on all hosts to exclude the VG's devices from all but one
+host.
+.P
+A
+.B foreign VG
+is a VG seen by a host with an unmatching system ID, i.e. the system ID
+in the VG metadata does not match the system ID configured on the host.
+If the host has no system ID, and the VG does, the VG is foreign and LVM
+will ignore it. If the VG has no system ID, access is unrestricted, and
+LVM can access it from any host, whether the host has a system ID or not.
+.P
+Changes to a host's system ID and a VG's system ID can be made in limited
+circumstances (see vgexport and vgimport). Improper changes can result in
+a host losing access to its VG, or a VG being accidentally damaged by
+access from an unintended host. Even limited changes to the VG system ID
+may not be perfectly reflected across hosts. A more coherent view of
+shared storage requires an inter-host locking system to coordinate access.
+.P
+Valid system ID characters are the same as valid VG name characters. If a
+system ID contains invalid characters, those characters are omitted and
+remaining characters are used. If a system ID is longer than the maximum
+name length, the characters up to the maximum length are used. The
+maximum length of a system ID is 128 characters.
+.P
+Print the system ID of a VG to check if it is set:
+.P
+.B vgs -o systemid
+.I VG
+.P
+Print the system ID of the local host to check if it is configured:
+.P
+.B lvm systemid
+.
+.SS Limitations and warnings
+.
+To benefit fully from system ID, all hosts should have a system ID
+configured, and all VGs should have a system ID set. Without any method
+to restrict access, e.g. system ID or device filters, a VG that is visible
+to multiple hosts can be accidentally damaged or destroyed.
+.
+.IP \[bu] 2
+A VG without a system ID can be used without restriction from any host
+where it is visible, even from hosts that have a system ID.
+.
+.IP \[bu]
+Many VGs will not have a system ID set because LVM has not enabled it by
+default, and even when enabled, many VGs were created before the feature
+was added to LVM or enabled. A system ID can be assigned to these VGs by
+using vgchange --systemid (see below).
+.
+.IP \[bu]
+Two hosts should not be assigned the same system ID. Doing so defeats
+the purpose of distinguishing different hosts with this value.
+.
+.IP \[bu]
+Orphan PVs (or unused devices) on shared storage are unprotected by the
+system ID feature. Commands that use these PVs, such as vgcreate or
+vgextend, are not prevented from performing conflicting operations and
+corrupting the PVs. See the
+.B orphans
+section for more information.
+.
+.IP \[bu]
+The system ID does not protect devices in a VG from programs other than LVM.
+.
+.IP \[bu]
+A host using an old LVM version (without the system ID feature) will not
+recognize a system ID set in VGs. The old LVM can read a VG with a
+system ID, but is prevented from writing to the VG (or its LVs).
+The system ID feature changes the write mode of a VG, making it appear
+read-only to previous versions of LVM.
+.sp
+This also means that if a host downgrades to the old LVM version, it would
+lose access to any VGs it had created with a system ID. To avoid this,
+the system ID should be removed from local VGs before downgrading LVM to a
+version without the system ID feature.
+.
+.SS Types of VG access
+.
+A local VG is meant to be used by a single host.
+.P
+A shared or clustered VG is meant to be used by multiple hosts.
+.P
+These can be further distinguished as:
+.
+.TP
+.B Unrestricted:
+A local VG that has no system ID. This VG type is unprotected and
+accessible to any host.
+.
+.TP
+.B Owned:
+A local VG that has a system ID set, as viewed from the host with a
+matching system ID (the owner). This VG type is accessible to the host.
+.
+.TP
+.B Foreign:
+A local VG that has a system ID set, as viewed from any host with an
+unmatching system ID (or no system ID). It is owned by another host.
+This VG type is not accessible to the host.
+.
+.TP
+.B Exported:
+A local VG that has been exported with vgexport and has no system ID.
+This VG type can only be accessed by vgimport which will change it to
+owned.
+.
+.TP
+.B Shared:
+A shared or "lockd" VG has the lock_type set and has no system ID.
+A shared VG is meant to be used on shared storage from multiple hosts,
+and is only accessible to hosts using lvmlockd. Applicable only if LVM
+is compiled with lvmlockd support.
+.
+.TP
+.B Clustered:
+A clustered or "clvm" VG has the clustered flag set and has no system ID.
+A clustered VG is meant to be used on shared storage from multiple hosts,
+and is only accessible to hosts using clvmd. Applicable only if LVM
+is compiled with clvm support.
+.
+.SS Host system ID configuration
+.
+A host's own system ID can be defined in a number of ways. lvm.conf
+global/system_id_source defines the method LVM will use to find the local
+system ID:
+.
+.TP
+.B none
+.br
+LVM will not use a system ID. LVM is allowed to access VGs without a
+system ID, and will create new VGs without a system ID. An undefined
+system_id_source is equivalent to none.
+.sp
+.I lvm.conf
+.nf
+global {
+ system_id_source = "none"
+}
+.fi
+.
+.TP
+.B appmachineid
+.br
+
+An LVM-specific derivation of /etc/machine-id is used as the system ID.
+See
+.BR machine-id (5)
+to check if machine-id is available on the host.
+
+.I lvm.conf
+.nf
+global {
+ system_id_source = "appmachineid"
+}
+.fi
+
+.TP
+.B machineid
+.br
+The content of /etc/machine-id is used as the system ID if available.
+See
+.BR machine-id (5)
+and
+.BR systemd-machine-id-setup (1)
+to check if machine-id is available on the host.
+(appmachineid is recommended in place of machineid.)
+.sp
+.I lvm.conf
+.nf
+global {
+ system_id_source = "machineid"
+}
+.fi
+.
+.TP
+.B uname
+.br
+The string utsname.nodename from
+.BR uname (2)
+is used as the system ID. A uname beginning with "localhost"
+is ignored and equivalent to none.
+.sp
+.I lvm.conf
+.nf
+global {
+ system_id_source = "uname"
+}
+.fi
+.
+.TP
+.B lvmlocal
+.br
+The system ID is defined in lvmlocal.conf local/system_id.
+.sp
+.I lvm.conf
+.nf
+global {
+ system_id_source = "lvmlocal"
+}
+.fi
+.sp
+.I lvmlocal.conf
+.nf
+local {
+ system_id = "example_name"
+}
+.fi
+.
+.TP
+.B file
+.br
+The system ID is defined in a file specified by lvm.conf
+global/system_id_file.
+.sp
+.I lvm.conf
+.nf
+global {
+ system_id_source = "file"
+ system_id_file = "/path/to/file"
+}
+.fi
+.LP
+Changing system_id_source will likely cause the system ID of the host to
+change, which will prevent the host from using VGs that it previously used
+(see extra_system_ids below to handle this.)
+.P
+If a system_id_source other than none fails to produce a system ID value,
+it is the equivalent of having none. The host will be allowed to access
+VGs with no system ID, but will not be allowed to access VGs with a system
+ID set.
+.
+.SS Overriding system ID
+.
+In some cases, it may be necessary for a host to access VGs with different
+system IDs, e.g. if a host's system ID changes, and it wants to use VGs
+that it created with its old system ID. To allow a host to access VGs
+with other system IDs, those other system IDs can be listed in
+lvmlocal.conf local/extra_system_ids.
+.P
+.I lvmlocal.conf
+.nf
+local {
+ extra_system_ids = [ "my_other_name" ]
+}
+.fi
+.P
+A safer option may be configuring the extra values as needed on the
+command line as:
+.br
+\fB--config 'local/extra_system_ids=["\fP\fIid\fP\fB"]'\fP
+.
+.SS vgcreate
+.
+In vgcreate, the host running the command assigns its own system ID to the
+new VG. To override this and set another system ID:
+.P
+.B vgcreate --systemid
+.I SystemID VG PVs
+.P
+Overriding the host's system ID makes it possible for a host to create a
+VG that it may not be able to use. Another host with a system ID matching
+the one specified may not recognize the new VG without manually rescanning
+devices.
+.P
+If the --systemid argument is an empty string (""), the VG is created with
+no system ID, making it accessible to other hosts (see warnings above.)
+.
+.SS report/display
+.
+The system ID of a VG is displayed with the "systemid" reporting option.
+.P
+Report/display commands ignore foreign VGs by default. To report foreign
+VGs, the --foreign option can be used. This causes the VGs to be read
+from disk.
+.P
+.B vgs --foreign -o +systemid
+.P
+When a host with no system ID sees foreign VGs, it warns about them as
+they are skipped. The host should be assigned a system ID, after which
+standard reporting commands will silently ignore foreign VGs.
+.
+.SS vgexport/vgimport
+.
+vgexport clears the VG system ID when exporting the VG.
+.P
+vgimport sets the VG system ID to the system ID of the host doing the
+import.
+.
+.SS vgchange
+.
+A host can change the system ID of its own VGs, but the command requires
+confirmation because the host may lose access to the VG being changed:
+.P
+.B vgchange --systemid
+.I SystemID VG
+.P
+The system ID can be removed from a VG by specifying an empty string ("")
+as the new system ID. This makes the VG accessible to other hosts (see
+warnings above.)
+.P
+A host cannot directly change the system ID of a foreign VG.
+.P
+To move a VG from one host to another, vgexport and vgimport should be
+used.
+.P
+To forcibly gain ownership of a foreign VG, a host can temporarily add the
+foreign system ID to its extra_system_ids list, and change the system ID
+of the foreign VG to its own. See Overriding system ID above.
+.
+.SS shared VGs
+.
+A shared VG has no system ID set, allowing multiple hosts to use it
+via lvmlockd. Changing a VG to shared will clear the existing
+system ID. Applicable only if LVM is compiled with lvmlockd support.
+.
+.SS clustered VGs
+.
+A clustered/clvm VG has no system ID set, allowing multiple hosts to use
+it via clvmd. Changing a VG to clustered will clear the existing system
+ID. Changing a VG to not clustered will set the system ID to the host
+running the vgchange command.
+.
+.SS creation_host
+.
+In vgcreate, the VG metadata field creation_host is set by default to the
+host's uname. The creation_host cannot be changed, and is not used to
+control access. When system_id_source is "uname", the system_id and
+creation_host fields will be the same.
+.
+.SS orphans
+.
+Orphan PVs are unused devices; they are not currently used in any VG.
+Because of this, they are not protected by a system ID, and any host can
+use them. Coordination of changes to orphan PVs is beyond the scope of
+system ID. The same is true of any block device that is not a PV.
+.
+.SH SEE ALSO
+.
+.nh
+.ad l
+.BR vgcreate (8),
+.BR vgchange (8),
+.BR vgimport (8),
+.BR vgexport (8),
+.BR vgs (8),
+.BR lvmlockd (8),
+.BR lvm.conf (5),
+.BR machine-id (5),
+.BR uname (2)
diff --git a/man/lvmthin.7_main b/man/lvmthin.7_main
new file mode 100644
index 0000000..d77f3b6
--- /dev/null
+++ b/man/lvmthin.7_main
@@ -0,0 +1,1365 @@
+.TH "LVMTHIN" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH NAME
+.
+lvmthin \(em LVM thin provisioning
+.
+.SH DESCRIPTION
+.
+Blocks in a standard \fBlvm\fP(8) Logical Volume (LV) are allocated when
+the LV is created, but blocks in a thin provisioned LV are allocated as
+they are written. Because of this, a thin provisioned LV is given a
+virtual size, and can then be much larger than physically available
+storage. The amount of physical storage provided for thin provisioned LVs
+can be increased later as the need arises.
+.P
+Blocks in a standard LV are allocated (during creation) from the Volume
+Group (VG), but blocks in a thin LV are allocated (during use) from a
+special "thin pool LV". The thin pool LV contains blocks of physical
+storage, and blocks in thin LVs just reference blocks in the thin pool LV.
+.P
+A thin pool LV must be created before thin LVs can be created within it.
+A thin pool LV is created by combining two standard LVs: a large data LV
+that will hold blocks for thin LVs, and a metadata LV that will hold
+metadata. The metadata tracks which data blocks belong to each thin LV.
+.P
+Snapshots of thin LVs are efficient because the data blocks common to a
+thin LV and any of its snapshots are shared. Snapshots may be taken of
+thin LVs or of other thin snapshots. Blocks common to recursive snapshots
+are also shared in the thin pool. There is no limit to or degradation
+from sequences of snapshots.
+.P
+As thin LVs or snapshot LVs are written to, they consume data blocks in
+the thin pool. As free data blocks in the pool decrease, more free blocks
+may need to be supplied. This is done by extending the thin pool data LV
+with additional physical space from the VG. Removing thin LVs or
+snapshots from the thin pool can also free blocks in the thin pool.
+However, removing LVs is not always an effective way of freeing space in a
+thin pool because the amount is limited to the number of blocks not shared
+with other LVs in the pool.
+.P
+Incremental block allocation from thin pools can cause thin LVs to become
+fragmented. Standard LVs generally avoid this problem by allocating all
+the blocks at once during creation.
+.
+.SH THIN TERMS
+.
+.TP
+ThinDataLV
+.br
+thin data LV
+.br
+large LV created in a VG
+.br
+used by thin pool to store ThinLV blocks
+.
+.TP
+ThinMetaLV
+.br
+thin metadata LV
+.br
+small LV created in a VG
+.br
+used by thin pool to track data block usage
+.
+.TP
+ThinPoolLV
+.br
+thin pool LV
+.br
+combination of ThinDataLV and ThinMetaLV
+.br
+contains ThinLVs and SnapLVs
+.
+.TP
+ThinLV
+.br
+thin LV
+.br
+created from ThinPoolLV
+.br
+appears blank after creation
+.
+.TP
+SnapLV
+.br
+snapshot LV
+.br
+created from ThinPoolLV
+.br
+appears as a snapshot of another LV after creation
+.
+.SH THIN USAGE
+.
+The primary method for using lvm thin provisioning:
+.nr step 1 1
+.
+.SS \n[step]. Create ThinDataLV
+.
+Create an LV that will hold thin pool data.
+.P
+.B lvcreate -n ThinDataLV -L LargeSize VG
+.P
+.I Example
+.br
+# lvcreate -n pool0 -L 10G vg
+.
+.SS \n+[step]. Create ThinMetaLV
+.
+Create an LV that will hold thin pool metadata.
+.P
+.B lvcreate -n ThinMetaLV -L SmallSize VG
+.P
+.I Example
+.br
+# lvcreate -n pool0meta -L 1G vg
+.P
+# lvs
+ LV VG Attr LSize
+ pool0 vg -wi-a----- 10.00g
+ pool0meta vg -wi-a----- 1.00g
+.
+.SS \n+[step]. Create ThinPoolLV
+.
+.nf
+Combine the data and metadata LVs into a thin pool LV.
+ThinDataLV is renamed to hidden ThinPoolLV_tdata.
+ThinMetaLV is renamed to hidden ThinPoolLV_tmeta.
+The new ThinPoolLV takes the previous name of ThinDataLV.
+.fi
+.P
+.B lvconvert --type thin-pool --poolmetadata VG/ThinMetaLV VG/ThinDataLV
+.P
+.I Example
+.br
+# lvconvert --type thin-pool --poolmetadata vg/pool0meta vg/pool0
+.P
+# lvs vg/pool0
+ LV VG Attr LSize Pool Origin Data% Meta%
+ pool0 vg twi-a-tz-- 10.00g 0.00 0.00
+.P
+# lvs -a
+ LV VG Attr LSize
+ pool0 vg twi-a-tz-- 10.00g
+ [pool0_tdata] vg Twi-ao---- 10.00g
+ [pool0_tmeta] vg ewi-ao---- 1.00g
+.
+.SS \n+[step]. Create ThinLV
+.
+.nf
+Create a new thin LV from the thin pool LV.
+The thin LV is created with a virtual size.
+Multiple new thin LVs may be created in the thin pool.
+Thin LV names must be unique in the VG.
+The '--type thin' option is inferred from the virtual size option.
+The --thinpool argument specifies which thin pool will
+contain the ThinLV.
+.fi
+.P
+.B lvcreate -n ThinLV -V VirtualSize --thinpool ThinPoolLV VG
+.P
+.I Example
+.br
+Create a thin LV in a thin pool:
+.br
+# lvcreate -n thin1 -V 1T --thinpool pool0 vg
+.P
+Create another thin LV in the same thin pool:
+.br
+# lvcreate -n thin2 -V 1T --thinpool pool0 vg
+.P
+# lvs vg/thin1 vg/thin2
+ LV VG Attr LSize Pool Origin Data%
+ thin1 vg Vwi-a-tz-- 1.00t pool0 0.00
+ thin2 vg Vwi-a-tz-- 1.00t pool0 0.00
+.
+.SS \n+[step]. Create SnapLV
+.
+Create snapshots of an existing ThinLV or SnapLV.
+.br
+Do not specify
+.BR -L ", " --size
+when creating a thin snapshot.
+.br
+A size argument will cause an old COW snapshot to be created.
+.P
+.B lvcreate -n SnapLV --snapshot VG/ThinLV
+.br
+.B lvcreate -n SnapLV --snapshot VG/PrevSnapLV
+.P
+.I Example
+.br
+Create first snapshot of an existing ThinLV:
+.br
+# lvcreate -n thin1s1 -s vg/thin1
+.P
+Create second snapshot of the same ThinLV:
+.br
+# lvcreate -n thin1s2 -s vg/thin1
+.P
+Create a snapshot of the first snapshot:
+.br
+# lvcreate -n thin1s1s1 -s vg/thin1s1
+.P
+# lvs vg/thin1s1 vg/thin1s2 vg/thin1s1s1
+ LV VG Attr LSize Pool Origin
+ thin1s1 vg Vwi---tz-k 1.00t pool0 thin1
+ thin1s2 vg Vwi---tz-k 1.00t pool0 thin1
+ thin1s1s1 vg Vwi---tz-k 1.00t pool0 thin1s1
+.
+.SS \n+[step]. Create ThinLV with ThinPoolLV
+.
+Create a new thin LV together with thin pool LV and let lvm2
+to allocate data and metadata volume.
+.P
+.B lvcreate -T -n ThinLV -V VirtualSize -L PoolSize VG/ThinPoolLV
+.P
+.I Example
+.br
+Create a 50MiB thin LV and 10MiB thin pool:
+.br
+# lvcreate -T -n thin -V 52M -L 12M vg/pool
+.P
+# lvs -a vg
+ LV VG Attr LSize Pool Origin Data% Meta%
+ [lvol0_pmspare] vg ewi------- 4,00m
+ pool vg twi-aotz-- 12,00m 0,00 10,94
+ [pool_tdata] vg Twi-ao---- 12,00m
+ [pool_tmeta] vg ewi-ao---- 4,00m
+ thin vg Vwi-a-tz-- 52,00m pool 0,00
+.
+.SS \n+[step]. Activate SnapLV
+.
+Thin snapshots are created with the persistent "activation skip"
+flag, indicated by the "k" attribute. Use -K with lvchange
+or vgchange to activate thin snapshots with the "k" attribute.
+User can preset default behavior with
+.BR lvm.conf (5)
+.BR auto_set_activation_skip .
+.P
+.B lvchange -ay -K VG/SnapLV
+.P
+.I Example
+.br
+# lvchange -ay -K vg/thin1s1
+.P
+# lvs vg/thin1s1
+ LV VG Attr LSize Pool Origin
+ thin1s1 vg Vwi-a-tz-k 1.00t pool0 thin1
+.
+.SS \n+[step]. Convert thick LV to thin LV
+.
+Convert existing thick LV (linear, stripe,...) to thin LV with move of
+existing data to thin pool and using thin LV from such thin pool.
+Once the volume is converted, user is using it like ordinary thin-pool.
+Note: Conversion cannot be reverted and thin volume cannot be reverted
+back to thick LV type.
+.P
+.B lvconvert --type thin VG/ThickLV
+.P
+.I Example
+.br
+Create thick 12MiB LV.
+.br
+# lvcreate -L 12M -n thick vg
+.P
+Convert LV to a thin pool with chunk size 256KiB.
+.br
+# lvconvert --thin --chunksize 256K vg/thick
+.P
+# lvs -o+chunksize vg
+ LV VG Attr LSize Pool Origin Data% Meta% Chunk
+ thick vg Vwi-a-tz-- 12,00m thick_tpool0 100,00 0
+ thick_tpool0 vg twi---tz-- 12,00m 100,00 10,94 256,00k
+.
+.SH THIN TOPICS
+.
+.B Automatic pool metadata LV
+.br
+.B Specify devices for data and metadata LVs
+.br
+.B Tolerate device failures using raid
+.br
+.B Spare metadata LV
+.br
+.B Metadata check and repair
+.br
+.B Activation of thin snapshots
+.br
+.B Removing thin pool LVs, thin LVs and snapshots
+.br
+.B Manually manage free data space of thin pool LV
+.br
+.B Manually manage free metadata space of a thin pool LV
+.br
+.B Using fstrim to increase free space in a thin pool LV
+.br
+.B Automatically extend thin pool LV
+.br
+.B Data space exhaustion
+.br
+.B Metadata space exhaustion
+.br
+.B Automatic extend settings
+.br
+.B Zeroing
+.br
+.B Discard
+.br
+.B Chunk size
+.br
+.B Size of pool metadata LV
+.br
+.B Create a thin snapshot of an external, read only LV
+.br
+.B Convert a standard LV to a thin LV with an external origin
+.br
+.B Single step thin pool LV creation
+.br
+.B Single step thin pool LV and thin LV creation
+.br
+.B Merge thin snapshots
+.br
+.B XFS on snapshots
+.
+.SS Automatic pool metadata LV
+.
+A thin data LV can be converted to a thin pool LV without specifying a
+thin pool metadata LV. LVM automatically creates a metadata LV from the
+same VG.
+.P
+.B lvcreate -n ThinDataLV -L LargeSize VG
+.br
+.B lvconvert --type thin-pool VG/ThinDataLV
+.P
+.I Example
+.br
+.nf
+# lvcreate -n pool0 -L 10G vg
+# lvconvert --type thin-pool vg/pool0
+.P
+# lvs -a
+ pool0 vg twi-a-tz-- 10.00g
+ [pool0_tdata] vg Twi-ao---- 10.00g
+ [pool0_tmeta] vg ewi-ao---- 16.00m
+.fi
+.
+.SS Specify devices for data and metadata LVs
+.
+The data and metadata LVs in a thin pool are best created on
+separate physical devices. To do that, specify the device name(s)
+at the end of the lvcreate line. It can be especially helpful
+to use fast devices for the metadata LV.
+.P
+.B lvcreate -n ThinDataLV -L LargeSize VG LargePV
+.br
+.B lvcreate -n ThinMetaLV -L SmallSize VG FastPV
+.br
+.B lvconvert --type thin-pool --poolmetadata VG/ThinMetaLV VG/ThinDataLV
+.P
+.I Example
+.nf
+# lvcreate -n pool0 -L 10G vg /dev/sdA
+# lvcreate -n pool0meta -L 1G vg /dev/sdB
+# lvconvert --type thin-pool --poolmetadata vg/pool0meta vg/pool0
+.fi
+.P
+.BR lvm.conf (5)
+.B thin_pool_metadata_require_separate_pvs
+.br
+controls the default PV usage for thin pool creation.
+.
+.SS Tolerate device failures using raid
+.
+To tolerate device failures, use raid for the pool data LV and
+pool metadata LV. This is especially recommended for pool metadata LVs.
+.P
+.B lvcreate --type raid1 -m 1 -n ThinMetaLV -L SmallSize VG PVA PVB
+.br
+.B lvcreate --type raid1 -m 1 -n ThinDataLV -L LargeSize VG PVC PVD
+.br
+.B lvconvert --type thin-pool --poolmetadata VG/ThinMetaLV VG/ThinDataLV
+.P
+.I Example
+.nf
+# lvcreate --type raid1 -m 1 -n pool0 -L 10G vg /dev/sdA /dev/sdB
+# lvcreate --type raid1 -m 1 -n pool0meta -L 1G vg /dev/sdC /dev/sdD
+# lvconvert --type thin-pool --poolmetadata vg/pool0meta vg/pool0
+.fi
+.
+.SS Spare metadata LV
+.
+The first time a thin pool LV is created, lvm will create a spare
+metadata LV in the VG. This behavior can be controlled with the
+option --poolmetadataspare y|n. (Future thin pool creations will
+also attempt to create the pmspare LV if none exists.)
+.P
+To create the pmspare ("pool metadata spare") LV, lvm first creates
+an LV with a default name, e.g. lvol0, and then converts this LV to
+a hidden LV with the _pmspare suffix, e.g. lvol0_pmspare.
+.P
+One pmspare LV is kept in a VG to be used for any thin pool.
+.P
+The pmspare LV cannot be created explicitly, but may be removed
+explicitly.
+.P
+.I Example
+.nf
+# lvcreate -n pool0 -L 10G vg
+# lvcreate -n pool0meta -L 1G vg
+# lvconvert --type thin-pool --poolmetadata vg/pool0meta vg/pool0
+.P
+# lvs -a
+ [lvol0_pmspare] vg ewi-------
+ pool0 vg twi---tz--
+ [pool0_tdata] vg Twi-------
+ [pool0_tmeta] vg ewi-------
+.fi
+.P
+The "Metadata check and repair" section describes the use of
+the pmspare LV.
+.
+.SS Metadata check and repair
+.
+If thin pool metadata is damaged, it may be repairable.
+Checking and repairing thin pool metadata is analogous to
+running fsck/repair on a file system.
+.P
+When a thin pool LV is activated, lvm runs the
+.BR thin_check (8)
+command to check the correctness of the metadata on the pool metadata LV.
+.P
+.BR lvm.conf (5)
+.B thin_check_executable
+.br
+can be set to an empty string ("") to disable the
+.BR thin_check (8)
+step. This is not recommended.
+.P
+.BR lvm.conf (5)
+.B thin_check_options
+.br
+controls the command options used for the
+.BR thin_check (8)
+command.
+.P
+If the
+.BR thin_check (8)
+command finds a problem with the metadata,
+the thin pool LV is not activated, and the thin pool metadata needs
+to be repaired.
+.P
+Simple repair commands are not always successful. Advanced repair may
+require editing thin pool metadata and lvm metadata. Newer versions of
+the kernel and lvm tools may be more successful at repair. Report the
+details of damaged thin metadata to get the best advice on recovery.
+.P
+Command to repair a thin pool:
+.br
+.B lvconvert --repair VG/ThinPoolLV
+.P
+Repair performs the following steps:
+.P
+.nr step 1 1
+.IP \n[step] 3
+Creates a new, repaired copy of the metadata.
+.br
+lvconvert runs the
+.BR thin_repair (8)
+command to read damaged metadata
+from the existing pool metadata LV, and writes a new repaired
+copy to the VG's pmspare LV.
+.IP \n+[step] 3
+Replaces the thin pool metadata LV.
+.br
+If step 1 is successful, the thin pool metadata LV is replaced
+with the pmspare LV containing the corrected metadata.
+The previous thin pool metadata LV, containing the damaged metadata,
+becomes visible with the new name ThinPoolLV_metaN (where N is 0,1,...).
+.P
+If the repair works, the thin pool LV and its thin LVs can be activated.
+User should manually check if repaired thin pool kernel metadata
+has all data for all lvm2 known LVs by individual activation of
+every thin LV. When all works, user should continue with fsck of
+all filesystems present on these volumes.
+Once the thin pool is considered fully functional user may remove ThinPoolLV_metaN
+(the LV containing the damaged thin pool metadata) for possible
+space reuse.
+For a better performance it may be useful to pvmove the new repaired metadata LV
+(written to previous pmspare volume) to a faster PV, e.g. SSD.
+.P
+If the repair operation fails, the thin pool LV and its thin LVs
+are not accessible and it may be necessary to restore their content
+from a backup. In such case the content of unmodified original damaged
+ThinPoolLV_metaN volume can be used by your support for more
+advanced recovery methods.
+.P
+If metadata is manually restored with
+.BR thin_repair (8)
+directly, the pool metadata LV can be manually swapped with another LV
+containing new metadata:
+.P
+.B lvconvert --thinpool VG/ThinPoolLV --poolmetadata VG/NewThinMetaLV
+.P
+Note: Thin pool metadata is compact so even small corruptions
+in them may result in significant portions of mappings to be lost.
+It is recommended to use fast resilient storage for them.
+.
+.SS Activation of thin snapshots
+.
+When a thin snapshot LV is created, it is by default given the
+"activation skip" flag. This flag is indicated by the "k" attribute
+displayed by lvs:
+.P
+.nf
+# lvs vg/thin1s1
+ LV VG Attr LSize Pool Origin
+ thin1s1 vg Vwi---tz-k 1.00t pool0 thin1
+.fi
+.P
+This flag causes the snapshot LV to be skipped, i.e. not activated,
+by normal activation commands. The skipping behavior does not
+apply to deactivation commands.
+.P
+A snapshot LV with the "k" attribute can be activated using
+the -K (or --ignoreactivationskip) option in addition to the
+standard -ay (or --activate y) option.
+.P
+Command to activate a thin snapshot LV:
+.br
+.B lvchange -ay -K VG/SnapLV
+.P
+The persistent "activation skip" flag can be turned off during
+lvcreate, or later with lvchange using the -kn
+(or --setactivationskip n) option.
+It can be turned on again with -ky (or --setactivationskip y).
+.P
+When the "activation skip" flag is removed, normal activation
+commands will activate the LV, and the -K activation option is
+not needed.
+.P
+Command to create snapshot LV without the activation skip flag:
+.br
+.B lvcreate -kn -n SnapLV -s VG/ThinLV
+.P
+Command to remove the activation skip flag from a snapshot LV:
+.br
+.B lvchange -kn VG/SnapLV
+.P
+.BR lvm.conf (5)
+.B auto_set_activation_skip
+.br
+controls the default activation skip setting used by lvcreate.
+.
+.SS Removing thin pool LVs, thin LVs and snapshots
+.
+Removing a thin LV and its related snapshots returns the blocks it
+used to the thin pool LV. These blocks will be reused for other
+thin LVs and snapshots.
+.P
+Removing a thin pool LV removes both the data LV and metadata LV
+and returns the space to the VG.
+.P
+lvremove of thin pool LVs, thin LVs and snapshots cannot be
+reversed with vgcfgrestore.
+.P
+vgcfgbackup does not back up thin pool metadata.
+.
+.SS Manually manage free data space of thin pool LV
+.
+The available free space in a thin pool LV can be displayed
+with the lvs command. Free space can be added by extending
+the thin pool LV.
+.P
+Command to extend thin pool data space:
+.br
+.B lvextend -L Size VG/ThinPoolLV
+.P
+.I Example
+.br
+.nf
+1. A thin pool LV is using 26.96% of its data blocks.
+# lvs
+ LV VG Attr LSize Pool Origin Data%
+ pool0 vg twi-a-tz-- 10.00g 26.96
+.P
+2. Double the amount of physical space in the thin pool LV.
+# lvextend -L+10G vg/pool0
+.P
+3. The percentage of used data blocks is half the previous value.
+# lvs
+ LV VG Attr LSize Pool Origin Data%
+ pool0 vg twi-a-tz-- 20.00g 13.48
+.fi
+.P
+Other methods of increasing free data space in a thin pool LV
+include removing a thin LV and its related snapshots, or running
+fstrim on the file system using a thin LV.
+.
+.SS Manually manage free metadata space of a thin pool LV
+.
+The available metadata space in a thin pool LV can be displayed
+with the lvs -o+metadata_percent command.
+.P
+Command to extend thin pool metadata space:
+.br
+.B lvextend --poolmetadatasize Size VG/ThinPoolLV
+.P
+.I Example
+.br
+1. A thin pool LV is using 12.40% of its metadata blocks.
+.nf
+# lvs -oname,size,data_percent,metadata_percent vg/pool0
+ LV LSize Data% Meta%
+ pool0 20.00g 13.48 12.40
+.fi
+.P
+2. Display a thin pool LV with its component thin data LV and thin metadata LV.
+.nf
+# lvs -a -oname,attr,size vg
+ LV Attr LSize
+ pool0 twi-a-tz-- 20.00g
+ [pool0_tdata] Twi-ao---- 20.00g
+ [pool0_tmeta] ewi-ao---- 12.00m
+.fi
+.P
+3. Double the amount of physical space in the thin metadata LV.
+.nf
+# lvextend --poolmetadatasize +12M vg/pool0
+.fi
+.P
+4. The percentage of used metadata blocks is half the previous value.
+.nf
+# lvs -a -oname,size,data_percent,metadata_percent vg
+ LV LSize Data% Meta%
+ pool0 20.00g 13.48 6.20
+ [pool0_tdata] 20.00g
+ [pool0_tmeta] 24.00m
+.fi
+.
+.SS Using fstrim to increase free space in a thin pool LV
+.
+Removing files in a file system on top of a thin LV does not
+generally add free space back to the thin pool. Manually running
+the fstrim command can return space back to the thin pool that had
+been used by removed files. fstrim uses discards and will not work
+if the thin pool LV has discards mode set to ignore.
+.P
+.I Example
+.br
+A thin pool has 10G of physical data space, and a thin LV has a virtual
+size of 100G. Writing a 1G file to the file system reduces the
+free space in the thin pool by 10% and increases the virtual usage
+of the file system by 1%. Removing the 1G file restores the virtual
+1% to the file system, but does not restore the physical 10% to the
+thin pool. The fstrim command restores the physical space to the thin pool.
+.P
+.nf
+# lvs -a -oname,attr,size,pool_lv,origin,data_percent,metadata_percent vg
+ LV Attr LSize Pool Origin Data% Meta%
+ pool0 twi-a-tz-- 10.00g 47.01 21.03
+ thin1 Vwi-aotz-- 100.00g pool0 2.70
+.P
+# df -h /mnt/X
+Filesystem Size Used Avail Use% Mounted on
+/dev/mapper/vg-thin1 99G 1.1G 93G 2% /mnt/X
+.P
+# dd if=/dev/zero of=/mnt/X/1Gfile bs=4096 count=262144; sync
+.P
+# lvs
+ pool0 vg twi-a-tz-- 10.00g 57.01 25.26
+ thin1 vg Vwi-aotz-- 100.00g pool0 3.70
+.P
+# df -h /mnt/X
+/dev/mapper/vg-thin1 99G 2.1G 92G 3% /mnt/X
+.P
+# rm /mnt/X/1Gfile
+.P
+# lvs
+ pool0 vg twi-a-tz-- 10.00g 57.01 25.26
+ thin1 vg Vwi-aotz-- 100.00g pool0 3.70
+.P
+# df -h /mnt/X
+/dev/mapper/vg-thin1 99G 1.1G 93G 2% /mnt/X
+.P
+# fstrim -v /mnt/X
+.P
+# lvs
+ pool0 vg twi-a-tz-- 10.00g 47.01 21.03
+ thin1 vg Vwi-aotz-- 100.00g pool0 2.70
+.fi
+.P
+The "Discard" section covers an option for automatically freeing data
+space in a thin pool.
+.
+.SS Automatically extend thin pool LV
+.
+The lvm daemon dmeventd (lvm2-monitor) monitors the data usage of thin
+pool LVs and extends them when the usage reaches a certain level. The
+necessary free space must exist in the VG to extend thin pool LVs.
+Monitoring and extension of thin pool LVs are controlled independently.
+.P
+\(em Monitoring \(em
+.P
+When a thin pool LV is activated, dmeventd will begin monitoring it by
+default.
+.sp
+Command to start or stop dmeventd monitoring a thin pool LV:
+.br
+.B lvchange --monitor y|n VG/ThinPoolLV
+.sp
+The current dmeventd monitoring status of a thin pool LV can be displayed
+with the command lvs -o+seg_monitor.
+.P
+\(em Autoextending \(em
+.P
+dmeventd should be configured to extend thin pool LVs before all data
+space is used. Warnings are emitted through syslog when the use of a thin
+pool reaches 80%, 85%, 90% and 95%. (See the section "Data space
+exhaustion" for the effects of not extending a thin pool LV.) The point
+at which dmeventd extends thin pool LVs, and the amount are controlled
+with two configuration settings:
+.P
+.BR lvm.conf (5)
+.B thin_pool_autoextend_threshold
+.br
+is a percentage full value that defines when the thin pool LV should be
+extended. Setting this to 100 disables automatic extension. The minimum
+value is 50.
+.P
+.BR lvm.conf (5)
+.B thin_pool_autoextend_percent
+.br
+defines how much extra data space should be added to the thin pool LV from
+the VG, in percent of its current size.
+.P
+\(em Disabling \(em
+.P
+There are multiple ways that extension of thin pools could be prevented:
+.IP \[bu] 2
+If the dmeventd daemon is not running, no monitoring or automatic
+extension will occur.
+.
+.IP \[bu]
+Even when dmeventd is running, all monitoring can be disabled with the
+lvm.conf monitoring setting.
+.
+.IP \[bu]
+To activate or create a thin pool LV without interacting with dmeventd,
+the --ignoremonitoring option can be used. With this option, the command
+will not ask dmeventd to monitor the thin pool LV.
+.
+.IP \[bu]
+Setting thin_pool_autoextend_threshold to 100 disables automatic
+extension of thin pool LVs, even if they are being monitored by dmeventd.
+.P
+.I Example
+.br
+If thin_pool_autoextend_threshold is 70 and thin_pool_autoextend_percent is 20,
+whenever a pool exceeds 70% usage, it will be extended by another 20%.
+For a 1G pool, using 700M will trigger a resize to 1.2G. When the usage exceeds
+840M, the pool will be extended to 1.44G, and so on.
+.
+.SS Data space exhaustion
+.
+When properly managed, thin pool data space should be extended before it
+is all used (see the section "Automatically extend thin pool LV"). If
+thin pool data space is already exhausted, it can still be extended (see
+the section "Manually manage free data space of thin pool LV".)
+.P
+The behavior of a full thin pool is configurable with the --errorwhenfull
+y|n option to lvcreate or lvchange. The errorwhenfull setting applies
+only to writes; reading thin LVs can continue even when data space is
+exhausted.
+.P
+Command to change the handling of a full thin pool:
+.br
+.B lvchange --errorwhenfull y|n VG/ThinPoolLV
+.P
+.BR lvm.conf (5)
+.B error_when_full
+.br
+controls the default error when full behavior.
+.P
+The current setting of a thin pool LV can be displayed with the command:
+lvs -o+lv_when_full.
+.P
+The errorwhenfull setting does not effect the monitoring and autoextend
+settings, and the monitoring/autoextend settings do not effect the
+errorwhenfull setting. It is only when monitoring/autoextend are not
+effective that the thin pool becomes full and the errorwhenfull setting is
+applied.
+.P
+\(em errorwhenfull n \(em
+.P
+This is the default. Writes to thin LVs are accepted and queued, with the
+expectation that pool data space will be extended soon. Once data space
+is extended, the queued writes will be processed, and the thin pool will
+return to normal operation.
+.P
+While waiting to be extended, the thin pool will queue writes for up to 60
+seconds (the default). If data space has not been extended after this
+time, the queued writes will return an error to the caller, e.g. the file
+system. This can result in file system corruption for non-journaled file
+systems that may require repair. When a thin pool returns errors for writes
+to a thin LV, any file system is subject to losing unsynced user data.
+.P
+The 60 second timeout can be changed or disabled with the dm-thin-pool
+kernel module option
+.B no_space_timeout.
+This option sets the number of seconds that thin pools will queue writes.
+If set to 0, writes will not time out. Disabling timeouts can result in
+the system running out of resources, memory exhaustion, hung tasks, and
+deadlocks. (The timeout applies to all thin pools on the system.)
+.P
+\(em errorwhenfull y \(em
+.P
+Writes to thin LVs immediately return an error, and no writes are queued.
+In the case of a file system, this can result in corruption that may
+require fs repair (the specific consequences depend on the thin LV user.)
+.P
+\(em data percent \(em
+.P
+When data space is exhausted, the lvs command displays 100 under Data% for
+the thin pool LV:
+.P
+.nf
+# lvs vg/pool0
+ LV VG Attr LSize Pool Origin Data%
+ pool0 vg twi-a-tz-- 512.00m 100.00
+.fi
+.P
+\(em causes \(em
+.P
+A thin pool may run out of data space for any of the following reasons:
+.
+.IP \[bu] 2
+Automatic extension of the thin pool is disabled, and the thin pool is not
+manually extended. (Disabling automatic extension is not recommended.)
+.
+.IP \[bu]
+The dmeventd daemon is not running and the thin pool is not manually
+extended. (Disabling dmeventd is not recommended.)
+.
+.IP \[bu]
+Automatic extension of the thin pool is too slow given the rate of writes
+to thin LVs in the pool. (This can be addressed by tuning the
+thin_pool_autoextend_threshold and thin_pool_autoextend_percent.
+See "Automatic extend settings".)
+.
+.IP \[bu]
+The VG does not have enough free blocks to extend the thin pool.
+.
+.SS Metadata space exhaustion
+.
+If thin pool metadata space is exhausted (or a thin pool metadata
+operation fails), errors will be returned for IO operations on thin LVs.
+.P
+When metadata space is exhausted, the lvs command displays 100 under Meta%
+for the thin pool LV:
+.P
+.nf
+# lvs -o lv_name,size,data_percent,metadata_percent vg/pool0
+ LV LSize Data% Meta%
+ pool0 100.00
+.fi
+.P
+The same reasons for thin pool data space exhaustion apply to thin pool
+metadata space.
+.P
+Metadata space exhaustion can lead to inconsistent thin pool metadata and
+inconsistent file systems, so the response requires offline checking and
+repair.
+.TP 4
+1.
+Deactivate the thin pool LV, or reboot the system if this is not possible.
+.TP
+2.
+Repair thin pool with lvconvert --repair.
+.br
+See "Metadata check and repair".
+.TP
+3.
+Extend pool metadata space with lvextend --poolmetadatasize.
+.br
+See "Manually manage free metadata space of a thin pool LV".
+.TP
+4.
+Check and repair file system.
+.
+.SS Automatic extend settings
+.
+Thin pool LVs can be extended according to preset values. The presets
+determine if the LV should be extended based on how full it is, and if so
+by how much. When dmeventd monitors thin pool LVs, it uses lvextend with
+these presets. (See "Automatically extend thin pool LV".)
+.P
+Command to extend a thin pool data LV using presets:
+.br
+.B lvextend --use-policies VG/ThinPoolLV
+.P
+The command uses these settings:
+.P
+.BR lvm.conf (5)
+.B thin_pool_autoextend_threshold
+.br
+autoextend the LV when its usage exceeds this percent.
+.P
+.BR lvm.conf (5)
+.B thin_pool_autoextend_percent
+.br
+autoextend the LV by this much additional space.
+.P
+To see the default values of these settings, run:
+.P
+.B lvmconfig --type default --withcomment
+.RS
+.B activation/thin_pool_autoextend_threshold
+.RE
+.P
+.B lvmconfig --type default --withcomment
+.RS
+.B activation/thin_pool_autoextend_percent
+.RE
+.P
+To change these values globally, edit
+.BR lvm.conf (5).
+.P
+To change these values on a per-VG or per-LV basis, attach a "profile" to
+the VG or LV. A profile is a collection of config settings, saved in a
+local text file (using the lvm.conf format). lvm looks for profiles in
+the profile_dir directory, e.g. \fI#DEFAULT_SYS_DIR#/profile/\fP. Once attached to a VG
+or LV, lvm will process the VG or LV using the settings from the attached
+profile. A profile is named and referenced by its file name.
+.P
+To use a profile to customize the lvextend settings for an LV:
+.
+.IP \[bu] 2
+Create a file containing settings, saved in profile_dir.
+.br
+For the profile_dir location, run:
+.br
+.B lvmconfig config/profile_dir
+.
+.IP \[bu]
+Attach the profile to an LV, using the command:
+.br
+.B lvchange --metadataprofile ProfileName VG/ThinPoolLV
+.
+.IP \[bu]
+Extend the LV using the profile settings:
+.br
+.B lvextend --use-policies VG/ThinPoolLV
+.P
+.I Example
+.br
+.nf
+# lvmconfig config/profile_dir
+profile_dir="#DEFAULT_SYS_DIR#/profile"
+.P
+# cat #DEFAULT_SYS_DIR#/profile/pool0extend.profile
+activation {
+.RS
+thin_pool_autoextend_threshold=50
+thin_pool_autoextend_percent=10
+.RE
+}
+.P
+# lvchange --metadataprofile pool0extend vg/pool0
+.P
+# lvextend --use-policies vg/pool0
+.fi
+.P
+Notes
+.
+.IP \[bu] 2
+A profile is attached to a VG or LV by name, where the name references a
+local file in profile_dir. If the VG is moved to another machine, the
+file with the profile also needs to be moved.
+.
+.IP \[bu]
+Only certain settings can be used in a VG or LV profile, see:
+.br
+.B lvmconfig --type profilable-metadata.
+.
+.IP \[bu]
+An LV without a profile of its own will inherit the VG profile.
+.
+.IP \[bu]
+Remove a profile from an LV using the command:
+.br
+.B lvchange --detachprofile VG/ThinPoolLV.
+.
+.IP \[bu]
+Commands can also have profiles applied to them. The settings that can be
+applied to a command are different than the settings that can be applied
+to a VG or LV. See lvmconfig --type profilable-command. To apply a
+profile to a command, write a profile, save it in the profile directory,
+and run the command using the option: --commandprofile ProfileName.
+.
+.SS Zeroing
+.
+When a thin pool provisions a new data block for a thin LV, the
+new block is first overwritten with zeros. The zeroing mode is
+indicated by the "z" attribute displayed by lvs. The option -Z
+(or --zero) can be added to commands to specify the zeroing mode.
+.P
+Command to set the zeroing mode when creating a thin pool LV:
+.P
+.B lvconvert --type thin-pool -Z y|n
+.RS
+.B --poolmetadata VG/ThinMetaLV VG/ThinDataLV
+.RE
+.P
+Command to change the zeroing mode of an existing thin pool LV:
+.P
+.B lvchange -Z y|n VG/ThinPoolLV
+.P
+If zeroing mode is changed from "n" to "y", previously provisioned
+blocks are not zeroed.
+.P
+Provisioning of large zeroed chunks impacts performance.
+.P
+.BR lvm.conf (5)
+.B thin_pool_zero
+.br
+controls the default zeroing mode used when creating a thin pool.
+.
+.SS Discard
+.
+The discard behavior of a thin pool LV determines how discard requests are
+handled. Enabling discard under a file system may adversely affect the
+file system performance (see the section on fstrim for an alternative.)
+Possible discard behaviors:
+.P
+.B ignore:
+Ignore any discards that are received.
+.P
+.B nopassdown:
+Process any discards in the thin pool itself and allow
+the no longer needed extents to be overwritten by new data.
+.P
+.B passdown:
+Process discards in the thin pool (as with nopassdown), and
+pass the discards down the the underlying device. This is the default
+mode.
+.P
+Command to display the current discard mode of a thin pool LV:
+.br
+.B lvs -o+discards VG/ThinPoolLV
+.P
+Command to set the discard mode when creating a thin pool LV:
+.br
+.B lvconvert --discards ignore|nopassdown|passdown
+.RS
+.B --type thin-pool --poolmetadata VG/ThinMetaLV VG/ThinDataLV
+.RE
+.P
+Command to change the discard mode of an existing thin pool LV:
+.br
+.B lvchange --discards ignore|nopassdown|passdown VG/ThinPoolLV
+.P
+.I Example
+.nf
+# lvs -o name,discards vg/pool0
+ pool0 passdown
+.P
+# lvchange --discards ignore vg/pool0
+.fi
+.P
+.BR lvm.conf (5)
+.B thin_pool_discards
+.br
+controls the default discards mode used when creating a thin pool.
+.
+.SS Chunk size
+.
+The size of data blocks managed by a thin pool can be specified with the
+--chunksize option when the thin pool LV is created. The default unit
+is KiB. The value must be a multiple of 64KiB between 64KiB and 1GiB.
+.P
+When a thin pool is used primarily for the thin provisioning feature, a
+larger value is optimal. To optimize for many snapshots, a smaller value
+reduces copying time and consumes less space.
+.P
+Command to display the thin pool LV chunk size:
+.P
+.B lvs -o+chunksize VG/ThinPoolLV
+.P
+.I Example
+.nf
+# lvs -o name,chunksize
+ pool0 64.00k
+.fi
+.P
+.BR lvm.conf (5)
+.B thin_pool_chunk_size
+.br
+controls the default chunk size used when creating a thin pool.
+.P
+The default value is shown by:
+.br
+.B lvmconfig --type default allocation/thin_pool_chunk_size
+.P
+.
+.SS Size of pool metadata LV
+.
+The amount of thin metadata depends on how many blocks are shared between
+thin LVs (i.e. through snapshots). A thin pool with many snapshots may
+need a larger metadata LV. Thin pool metadata LV sizes can be from 2MiB
+to approximately 16GiB.
+.P
+When using lvcreate to create what will become a thin metadata LV, the
+size is specified with the -L|--size option.
+.P
+When an LVM command automatically creates a thin metadata LV, the size is
+specified with the --poolmetadatasize option. When this option is not
+given, LVM automatically chooses a size based on the data size and chunk
+size.
+.P
+It can be hard to predict the amount of metadata space that will be
+needed, so it is recommended to start with a size of 1GiB which should be
+enough for all practical purposes. A thin pool metadata LV can later be
+manually or automatically extended if needed.
+.P
+Configurable setting
+.BR lvm.conf (5)
+.BR allocation / thin_pool_crop_metadata
+gives control over cropping to 15.81GiB to stay backward compatible with older
+versions of lvm2. With enabled cropping there can be observed some problems when
+using volumes above this size with thin tools (i.e.
+.BR thin_repair (8)).
+Cropping should be enabled only when compatibility is required.
+.
+.SS Create a thin snapshot of an external, read only LV
+.
+Thin snapshots are typically taken of other thin LVs or other
+thin snapshot LVs within the same thin pool. It is also possible
+to take thin snapshots of external, read only LVs. Writes to the
+snapshot are stored in the thin pool, and the external LV is used
+to read unwritten parts of the thin snapshot.
+.P
+.B lvcreate -n SnapLV -s VG/ExternalOriginLV --thinpool VG/ThinPoolLV
+.P
+.I Example
+.nf
+# lvchange -an vg/lve
+# lvchange --permission r vg/lve
+# lvcreate -n snaplve -s vg/lve --thinpool vg/pool0
+.P
+# lvs vg/lve vg/snaplve
+ LV VG Attr LSize Pool Origin Data%
+ lve vg ori------- 10.00g
+ snaplve vg Vwi-a-tz-- 10.00g pool0 lve 0.00
+.fi
+.
+.SS Convert a standard LV to a thin LV with an external origin
+.
+A new thin LV can be created and given the name of an existing
+standard LV. At the same time, the existing LV is converted to a
+read only external LV with a new name. Unwritten portions of the
+thin LV are read from the external LV.
+The new name given to the existing LV can be specified with
+--originname, otherwise the existing LV will be given a default
+name, e.g. lvol#.
+.P
+Convert ExampleLV into a read only external LV with the new name
+NewExternalOriginLV, and create a new thin LV that is given the previous
+name of ExampleLV.
+.P
+.B lvconvert --type thin --thinpool VG/ThinPoolLV
+.RS
+.B --originname NewExternalOriginLV VG/ExampleLV
+.RE
+.P
+.I Example
+.nf
+# lvcreate -n lv_example -L 10G vg
+.P
+# lvs
+ lv_example vg -wi-a----- 10.00g
+.P
+# lvconvert --type thin --thinpool vg/pool0
+ --originname lv_external --thin vg/lv_example
+.P
+# lvs
+ LV VG Attr LSize Pool Origin
+ lv_example vg Vwi-a-tz-- 10.00g pool0 lv_external
+ lv_external vg ori------- 10.00g
+.fi
+.
+.SS Single step thin pool LV creation
+.
+A thin pool LV can be created with a single lvcreate command,
+rather than using lvconvert on existing LVs.
+This one command creates a thin data LV, a thin metadata LV,
+and combines the two into a thin pool LV.
+.P
+.B lvcreate --type thin-pool -L LargeSize -n ThinPoolLV VG
+.P
+.I Example
+.nf
+# lvcreate --type thin-pool -L8M -n pool0 vg
+.P
+# lvs vg/pool0
+ LV VG Attr LSize Pool Origin Data%
+ pool0 vg twi-a-tz-- 8.00m 0.00
+.P
+# lvs -a
+ pool0 vg twi-a-tz-- 8.00m
+ [pool0_tdata] vg Twi-ao---- 8.00m
+ [pool0_tmeta] vg ewi-ao---- 8.00m
+.fi
+.
+.SS Single step thin pool LV and thin LV creation
+.
+A thin pool LV and a thin LV can be created with a single
+lvcreate command. This one command creates a thin data LV,
+a thin metadata LV, combines the two into a thin pool LV,
+and creates a thin LV in the new pool.
+.br
+-L LargeSize specifies the physical size of the thin pool LV.
+.br
+-V VirtualSize specifies the virtual size of the thin LV.
+.P
+.B lvcreate --type thin -V VirtualSize -L LargeSize
+.RS
+.B -n ThinLV --thinpool VG/ThinPoolLV
+.RE
+.P
+Equivalent to:
+.br
+.B lvcreate --type thin-pool -L LargeSize VG/ThinPoolLV
+.br
+.B lvcreate -n ThinLV -V VirtualSize --thinpool VG/ThinPoolLV
+.P
+.I Example
+.nf
+# lvcreate -L8M -V2G -n thin1 --thinpool vg/pool0
+.P
+# lvs -a
+ pool0 vg twi-a-tz-- 8.00m
+ [pool0_tdata] vg Twi-ao---- 8.00m
+ [pool0_tmeta] vg ewi-ao---- 8.00m
+ thin1 vg Vwi-a-tz-- 2.00g pool0
+.fi
+.
+.SS Merge thin snapshots
+.
+A thin snapshot can be merged into its origin thin LV using the lvconvert
+--merge command. The result of a snapshot merge is that the origin thin
+LV takes the content of the snapshot LV, and the snapshot LV is removed.
+Any content that was unique to the origin thin LV is lost after the merge.
+.P
+Because a merge changes the content of an LV, it cannot be done while the
+LVs are open, e.g. mounted. If a merge is initiated while the LVs are open,
+the effect of the merge is delayed until the origin thin LV is next
+activated.
+.P
+.B lvconvert --merge VG/SnapLV
+.P
+.I Example
+.nf
+# lvs vg
+ LV VG Attr LSize Pool Origin
+ pool0 vg twi-a-tz-- 10.00g
+ thin1 vg Vwi-a-tz-- 100.00g pool0
+ thin1s1 vg Vwi-a-tz-k 100.00g pool0 thin1
+.P
+# lvconvert --merge vg/thin1s1
+.P
+# lvs vg
+ LV VG Attr LSize Pool Origin
+ pool0 vg twi-a-tz-- 10.00g
+ thin1 vg Vwi-a-tz-- 100.00g pool0
+.fi
+.P
+.I Example
+.nf
+Delayed merging of open LVs.
+.P
+# lvs vg
+ LV VG Attr LSize Pool Origin
+ pool0 vg twi-a-tz-- 10.00g
+ thin1 vg Vwi-aotz-- 100.00g pool0
+ thin1s1 vg Vwi-aotz-k 100.00g pool0 thin1
+.P
+# df
+/dev/mapper/vg-thin1 100G 33M 100G 1% /mnt/X
+/dev/mapper/vg-thin1s1 100G 33M 100G 1% /mnt/Xs
+.P
+# ls /mnt/X
+file1 file2 file3
+# ls /mnt/Xs
+file3 file4 file5
+.P
+# lvconvert --merge vg/thin1s1
+Logical volume vg/thin1s1 contains a filesystem in use.
+Delaying merge since snapshot is open.
+Merging of thin snapshot thin1s1 will occur on next activation.
+.P
+# umount /mnt/X
+# umount /mnt/Xs
+.P
+# lvs -a vg
+ LV VG Attr LSize Pool Origin
+ pool0 vg twi-a-tz-- 10.00g
+ [pool0_tdata] vg Twi-ao---- 10.00g
+ [pool0_tmeta] vg ewi-ao---- 1.00g
+ thin1 vg Owi-a-tz-- 100.00g pool0
+ [thin1s1] vg Swi-a-tz-k 100.00g pool0 thin1
+.P
+# lvchange -an vg/thin1
+# lvchange -ay vg/thin1
+.P
+# mount /dev/vg/thin1 /mnt/X
+.P
+# ls /mnt/X
+file3 file4 file5
+.fi
+.
+.SS XFS on snapshots
+.
+Mounting an XFS file system on a new snapshot LV requires attention to the
+file system's log state and uuid. On the snapshot LV, the xfs log will
+contain a dummy transaction, and the xfs uuid will match the uuid from the
+file system on the origin LV.
+.P
+If the snapshot LV is writable, mounting will recover the log to clear the
+dummy transaction, but will require skipping the uuid check:
+.P
+# mount /dev/VG/SnapLV /mnt -o nouuid
+.P
+After the first mount with the above approach, the UUID can subsequently be
+changed using:
+.P
+# xfs_admin -U generate /dev/VG/SnapLV
+.br
+# mount /dev/VG/SnapLV /mnt
+.P
+Once the UUID has been changed, the mount command will no longer require
+the nouuid option.
+.br
+If the snapshot LV is readonly, the log recovery and uuid check need to be
+skipped while mounting readonly:
+.P
+# mount /dev/VG/SnapLV /mnt -o ro,nouuid,norecovery
+.
+.SH SEE ALSO
+.
+.nh
+.ad l
+.BR lvm (8),
+.BR lvm.conf (5),
+.BR lvmconfig (8),
+.BR lvcreate (8),
+.BR lvconvert (8),
+.BR lvchange (8),
+.BR lvextend (8),
+.BR lvremove (8),
+.BR lvs (8),
+.P
+.BR thin_check (8),
+.BR thin_dump (8),
+.BR thin_repair (8),
+.BR thin_restore (8)
diff --git a/man/lvmvdo.7_main b/man/lvmvdo.7_main
new file mode 100644
index 0000000..931c461
--- /dev/null
+++ b/man/lvmvdo.7_main
@@ -0,0 +1,448 @@
+.TH "LVMVDO" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
+.
+.SH NAME
+.
+lvmvdo \(em Support for Virtual Data Optimizer in LVM
+.
+.SH DESCRIPTION
+.
+VDO is software that provides inline
+block-level deduplication, compression, and thin provisioning capabilities
+for primary storage.
+.P
+Deduplication is a technique for reducing the consumption of storage
+resources by eliminating multiple copies of duplicate blocks. Compression
+takes the individual unique blocks and shrinks them.
+These reduced blocks are then efficiently packed together into
+physical blocks. Thin provisioning manages the mapping from logical blocks
+presented by VDO to where the data has actually been physically stored,
+and also eliminates any blocks of all zeroes.
+.P
+With deduplication, instead of writing the same data more than once, VDO detects and records each
+duplicate block as a reference to the original
+block. VDO maintains a mapping from Logical Block Addresses (LBA) (used by the
+storage layer above VDO) to physical block addresses (used by the storage
+layer under VDO). After deduplication, multiple logical block addresses
+may be mapped to the same physical block address; these are called shared
+blocks and are reference-counted by the software.
+.P
+With compression, VDO compresses multiple blocks (or shared blocks)
+with the fast LZ4 algorithm, and bins them together where possible so that
+multiple compressed blocks fit within a 4 KB block on the underlying
+storage. Mapping from LBA is to a physical block address and index within
+it for the desired compressed data. All compressed blocks are individually
+reference counted for correctness.
+.P
+Block sharing and block compression are invisible to applications using
+the storage, which read and write blocks as they would if VDO were not
+present. When a shared block is overwritten, a new physical block is
+allocated for storing the new block data to ensure that other logical
+block addresses that are mapped to the shared physical block are not
+modified.
+.P
+To use VDO with \fBlvm\fP(8), you must install the standard VDO user-space tools
+\fBvdoformat\fP(8) and the currently non-standard kernel VDO module
+"\fIkvdo\fP".
+.P
+The "\fIkvdo\fP" module implements fine-grained storage virtualization,
+thin provisioning, block sharing, and compression.
+The "\fIuds\fP" module provides memory-efficient duplicate
+identification. The user-space tools include \fBvdostats\fP(8)
+for extracting statistics from VDO volumes.
+.
+.SH VDO TERMS
+.
+.TP
+VDODataLV
+.br
+VDO data LV
+.br
+A large hidden LV with the _vdata suffix. It is created in a VG
+.br
+used by the VDO kernel target to store all data and metadata blocks.
+.
+.TP
+VDOPoolLV
+.br
+VDO pool LV
+.br
+A pool for virtual VDOLV(s), which are the size of used VDODataLV.
+.br
+Only a single VDOLV is currently supported.
+.
+.TP
+VDOLV
+.br
+VDO LV
+.br
+Created from VDOPoolLV.
+.br
+Appears blank after creation.
+.
+.SH VDO USAGE
+.
+The primary methods for using VDO with lvm2:
+.nr step 1 1
+.
+.SS \n[step]. Create a VDOPoolLV and a VDOLV
+.
+Create a VDOPoolLV that will hold VDO data, and a
+virtual size VDOLV that the user can use. If you do not specify the virtual size,
+then the VDOLV is created with the maximum size that
+always fits into data volume even if no
+deduplication or compression can happen
+(i.e. it can hold the incompressible content of /dev/urandom).
+If you do not specify the name of VDOPoolLV, it is taken from
+the sequence of vpool0, vpool1 ...
+.P
+Note: The performance of TRIM/Discard operations is slow for large
+volumes of VDO type. Please try to avoid sending discard requests unless
+necessary because it might take considerable amount of time to finish the discard
+operation.
+.P
+.nf
+.B lvcreate --type vdo -n VDOLV -L DataSize -V LargeVirtualSize VG/VDOPoolLV
+.B lvcreate --vdo -L DataSize VG
+.fi
+.P
+.I Example
+.nf
+# lvcreate --type vdo -n vdo0 -L 10G -V 100G vg/vdopool0
+# mkfs.ext4 -E nodiscard /dev/vg/vdo0
+.fi
+.
+.SS \n+[step]. Convert an existing LV into VDOPoolLV
+.
+Convert an already created or existing LV into a VDOPoolLV, which is a volume
+that can hold data and metadata.
+You will be prompted to confirm such conversion because it \fBIRREVERSIBLY
+DESTROYS\fP the content of such volume and the volume is immediately
+formatted by \fBvdoformat\fP(8) as a VDO pool data volume. You can
+specify the virtual size of the VDOLV associated with this VDOPoolLV.
+If you do not specify the virtual size, it will be set to the maximum size
+that can keep 100% incompressible data there.
+.P
+.nf
+.B lvconvert --type vdo-pool -n VDOLV -V VirtualSize VG/VDOPoolLV
+.B lvconvert --vdopool VG/VDOPoolLV
+.fi
+.P
+.I Example
+.nf
+# lvconvert --type vdo-pool -n vdo0 -V10G vg/ExistingLV
+.fi
+.
+.SS \n+[step]. Change the compression and deduplication of a VDOPoolLV
+.
+Disable or enable the compression and deduplication for VDOPoolLV
+(the volume that maintains all VDO LV(s) associated with it).
+.P
+.B lvchange --compression y|n --deduplication y|n VG/VDOPoolLV
+.P
+.I Example
+.nf
+# lvchange --compression n vg/vdopool0
+# lvchange --deduplication y vg/vdopool1
+.fi
+.
+.SS \n+[step]. Change the default settings used for creating a VDOPoolLV
+.
+VDO allows to set a large variety of options. Lots of these settings
+can be specified in lvm.conf or profile settings. You can prepare
+a number of different profiles in the \fI#DEFAULT_SYS_DIR#/profile\fP directory
+and just specify the profile file name.
+Check the output of \fBlvmconfig --type default --withcomments\fP
+for a detailed description of all individual VDO settings.
+.P
+.I Example
+.nf
+# cat <<EOF > #DEFAULT_SYS_DIR#/profile/vdo_create.profile
+allocation {
+.RS
+vdo_use_compression=1
+vdo_use_deduplication=1
+vdo_use_metadata_hints=1
+vdo_minimum_io_size=4096
+vdo_block_map_cache_size_mb=128
+vdo_block_map_period=16380
+vdo_use_sparse_index=0
+vdo_index_memory_size_mb=256
+vdo_slab_size_mb=2048
+vdo_ack_threads=1
+vdo_bio_threads=1
+vdo_bio_rotation=64
+vdo_cpu_threads=2
+vdo_hash_zone_threads=1
+vdo_logical_threads=1
+vdo_physical_threads=1
+vdo_write_policy="auto"
+vdo_max_discard=1
+.RE
+}
+EOF
+.P
+# lvcreate --vdo -L10G --metadataprofile vdo_create vg/vdopool0
+# lvcreate --vdo -L10G --config 'allocation/vdo_cpu_threads=4' vg/vdopool1
+.fi
+.
+.SS \n+[step]. Set or change VDO settings with option --vdosettings
+.
+Use the form 'option=value' or 'option1=value option2=value',
+or repeat --vdosettings for each option being set.
+Options are listed in the Example section above, for the full description see
+.BR lvm.conf (5).
+Options can omit 'vdo_' and 'vdo_use_' prefixes and all its underscores.
+So i.e. vdo_use_metadata_hints=1 and metadatahints=1 are equivalent.
+To change the option for an already existing VDOPoolLV use
+.BR lvchange (8)
+command. However not all option can be changed.
+Only compression and deduplication options can be also changed for an active VDO LV.
+Lowest priority options are specified with configuration file,
+then with --vdosettings and highest are expliction option --compression
+and --deduplication.
+.P
+.I Example
+.P
+.nf
+# lvcreate --vdo -L10G --vdosettings 'ack_threads=1 hash_zone_threads=2' vg/vdopool0
+# lvchange --vdosettings 'bio_threads=2 deduplication=1' vg/vdopool0
+.fi
+.
+.SS \n+[step]. Checking the usage of VDOPoolLV
+.
+To quickly check how much data on a VDOPoolLV is already consumed,
+use \fBlvs\fP(8). The Data% field reports how much data is occupied
+in the content of the virtual data for the VDOLV and how much space is already
+consumed with all the data and metadata blocks in the VDOPoolLV.
+For a detailed description, use the \fBvdostats\fP(8) command.
+.P
+Note: \fBvdostats\fP(8) currently understands only \fI/dev/mapper\fP device names.
+.P
+.I Example
+.nf
+# lvcreate --type vdo -L10G -V20G -n vdo0 vg/vdopool0
+# mkfs.ext4 -E nodiscard /dev/vg/vdo0
+# lvs -a vg
+.P
+ LV VG Attr LSize Pool Origin Data%
+ vdo0 vg vwi-a-v--- 20.00g vdopool0 0.01
+ vdopool0 vg dwi-ao---- 10.00g 30.16
+ [vdopool0_vdata] vg Dwi-ao---- 10.00g
+.P
+# vdostats --all /dev/mapper/vg-vdopool0-vpool
+/dev/mapper/vg-vdopool0 :
+ version : 30
+ release version : 133524
+ data blocks used : 79
+ ...
+.fi
+.
+.SS \n+[step]. Extending the VDOPoolLV size
+.
+You can add more space to hold VDO data and metadata by
+extending the VDODataLV using the commands
+\fBlvresize\fP(8) and \fBlvextend\fP(8).
+The extension needs to add at least one new VDO slab. You can configure
+the slab size with the \fB\%allocation/\:vdo_slab_size_mb\fP setting.
+.P
+You can also enable automatic size extension of a monitored VDOPoolLV
+with the \fBactivation/vdo_pool_autoextend_percent\fP and
+\fB\%activation/\:vdo_pool_autoextend_threshold\fP settings.
+.P
+Note: You cannot reduce the size of a VDOPoolLV.
+.P
+.B lvextend -L+AddingSize VG/VDOPoolLV
+.P
+.I Example
+.nf
+# lvextend -L+50G vg/vdopool0
+# lvresize -L300G vg/vdopool1
+.fi
+.
+.SS \n+[step]. Extending or reducing the VDOLV size
+.
+You can extend or reduce a virtual VDO LV as a standard LV with the
+\fBlvresize\fP(8), \fBlvextend\fP(8), and \fBlvreduce\fP(8) commands.
+.P
+Note: The reduction needs to process TRIM for reduced disk area
+to unmap used data blocks from the VDOPoolLV, which might take
+a long time.
+.P
+.B lvextend -L+AddingSize VG/VDOLV
+.br
+.B lvreduce -L-ReducingSize VG/VDOLV
+.P
+.I Example
+.nf
+# lvextend -L+50G vg/vdo0
+# lvreduce -L-50G vg/vdo1
+# lvresize -L200G vg/vdo2
+.fi
+.
+.SS \n+[step]. Component activation of a VDODataLV
+.
+You can activate a VDODataLV separately as a component LV for examination
+purposes. The activation of the VDODataLV activates the data LV in read-only mode,
+and the data LV cannot be modified.
+If the VDODataLV is active as a component, any upper LV using this volume CANNOT
+be activated. You have to deactivate the VDODataLV first to continue to use the VDOPoolLV.
+.P
+.I Example
+.nf
+# lvchange -ay vg/vpool0_vdata
+# lvchange -an vg/vpool0_vdata
+.fi
+.
+.SH VDO TOPICS
+.
+.nr step 1 1
+.
+.SS \n[step]. Stacking VDO
+.
+You can convert or stack a VDOPooLV with these currently supported
+volume types: linear, stripe, raid and cache with cachepool.
+.
+.SS \n[step]. Using multiple volumes using same VDOPoolLV
+.
+You can convert existing VDO LV into a thin volume. After this conversion
+you can create a thin snapshot or you can add more thin volumes
+with thin-pool named after orignal LV name LV_tpool0.
+.P
+.I Example
+.nf
+# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vdopool
+# lvconvert --type thin vg/vdo1
+# lvcreate -V20 vg/vdo1_tpool0
+.fi
+.
+.SS \n+[step]. VDOPoolLV on top of raid
+.
+Using a raid type LV for a VDODataLV.
+.P
+.I Example
+.nf
+# lvcreate --type raid1 -L 5G -n vdopool vg
+# lvconvert --type vdo-pool -V 10G vg/vdopool
+.fi
+.
+.SS \n+[step]. Caching a VDOPoolLV
+.
+VDOPoolLV (accepts also VDODataLV volume name) caching provides a mechanism
+to accelerate reads and writes of already compressed and deduplicated
+data blocks together with VDO metadata.
+.P
+.I Example
+.nf
+# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vdopool
+# lvcreate --type cache-pool -L 1G -n cachepool vg
+# lvconvert --cache --cachepool vg/cachepool vg/vdopool
+# lvconvert --uncache vg/vdopool
+.fi
+.
+.SS \n+[step]. Caching a VDOLV
+.
+VDO LV cache allow you to 'cache' a device for better performance before
+it hits the processing of the VDO Pool LV layer.
+.P
+.I Example
+.nf
+# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vdopool
+# lvcreate --type cache-pool -L 1G -n cachepool vg
+# lvconvert --cache --cachepool vg/cachepool vg/vdo1
+# lvconvert --uncache vg/vdo1
+.fi
+.
+.SS \n+[step]. Usage of Discard/TRIM with a VDOLV
+.
+You can discard data on a VDO LV and reduce used blocks on a VDOPoolLV.
+However, the current performance of discard operations is still not optimal
+and takes a considerable amount of time and CPU.
+Unless you really need it, you should avoid using discard.
+.P
+When a block device is going to be rewritten,
+its blocks will be automatically reused for new data.
+Discard is useful in situations when user knows that the given portion of a VDO LV
+is not going to be used and the discarded space can be used for block
+provisioning in other regions of the VDO LV.
+For the same reason, you should avoid using mkfs with discard for
+a freshly created VDO LV to save a lot of time that this operation would
+take otherwise as device is already expected to be empty.
+.
+.SS \n+[step]. Memory usage
+.
+The VDO target requires 38 MiB of RAM and several variable amounts:
+.IP \(bu 2
+1.15 MiB of RAM for each 1 MiB of configured block map cache size.
+The block map cache requires a minimum of 150 MiB RAM.
+.br
+.IP \(bu
+1.6 MiB of RAM for each 1 TiB of logical space.
+.br
+.IP \(bu
+268 MiB of RAM for each 1 TiB of physical storage managed by the volume.
+.br
+.P
+UDS requires a minimum of 250 MiB of RAM,
+which is also the default amount that deduplication uses.
+.P
+The memory required for the UDS index is determined by the index type
+and the required size of the deduplication window and
+is controlled by the \fBallocation/vdo_use_sparse_index\fP setting.
+.P
+With enabled UDS sparse indexing, it relies on the temporal locality of data
+and attempts to retain only the most relevant index entries in memory and
+can maintain a deduplication window that is ten times larger
+than with dense while using the same amount of memory.
+.P
+Although the sparse index provides the greatest coverage,
+the dense index provides more deduplication advice.
+For most workloads, given the same amount of memory,
+the difference in deduplication rates between dense
+and sparse indexes is negligible.
+.P
+A dense index with 1 GiB of RAM maintains a 1 TiB deduplication window,
+while a sparse index with 1 GiB of RAM maintains a 10 TiB deduplication window.
+In general, 1 GiB is sufficient for 4 TiB of physical space with
+a dense index and 40 TiB with a sparse index.
+.
+.SS \n+[step]. Storage space requirements
+.
+You can configure a VDOPoolLV to use up to 256 TiB of physical storage.
+Only a certain part of the physical storage is usable to store data.
+This section provides the calculations to determine the usable size
+of a VDO-managed volume.
+.P
+The VDO target requires storage for two types of VDO metadata and for the UDS index:
+.IP \(bu 2
+The first type of VDO metadata uses approximately 1 MiB for each 4 GiB
+of physical storage plus an additional 1 MiB per slab.
+.IP \(bu
+The second type of VDO metadata consumes approximately 1.25 MiB
+for each 1 GiB of logical storage, rounded up to the nearest slab.
+.IP \(bu
+The amount of storage required for the UDS index depends on the type of index
+and the amount of RAM allocated to the index. For each 1 GiB of RAM,
+a dense UDS index uses 17 GiB of storage and a sparse UDS index will use
+170 GiB of storage.
+.
+.SH SEE ALSO
+.
+.nh
+.ad l
+.BR lvm (8),
+.BR lvm.conf (5),
+.BR lvmconfig (8),
+.BR lvcreate (8),
+.BR lvconvert (8),
+.BR lvchange (8),
+.BR lvextend (8),
+.BR lvreduce (8),
+.BR lvresize (8),
+.BR lvremove (8),
+.BR lvs (8),
+.P
+.BR vdo (8),
+.BR vdoformat (8),
+.BR vdostats (8),
+.P
+.BR mkfs (8)
diff --git a/man/lvreduce.8.in b/man/lvreduce.8.in
deleted file mode 100644
index dabdc88..0000000
--- a/man/lvreduce.8.in
+++ /dev/null
@@ -1,99 +0,0 @@
-.TH LVREDUCE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvreduce \- reduce the size of a logical volume
-.SH SYNOPSIS
-.B lvreduce
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.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 [ \-L | \-\-size
-.RI [ \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]}
-.RB [ \-n | \-\-nofsck ]
-.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 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 substraction is rounded downward, for the absolute
-size it is rounded upward.
-.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/lvreduce.8_des b/man/lvreduce.8_des
new file mode 100644
index 0000000..5a7d4e9
--- /dev/null
+++ b/man/lvreduce.8_des
@@ -0,0 +1,18 @@
+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.
+.P
+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.
+.P
+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.
+.P
+In the usage section below, \fB--size\fP \fISize\fP can be replaced
+with \fB--extents\fP \fINumber\fP. See both descriptions
+the options section.
diff --git a/man/lvreduce.8_end b/man/lvreduce.8_end
new file mode 100644
index 0000000..a92e772
--- /dev/null
+++ b/man/lvreduce.8_end
@@ -0,0 +1,6 @@
+.
+.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_pregen b/man/lvreduce.8_pregen
new file mode 100644
index 0000000..ec9a17d
--- /dev/null
+++ b/man/lvreduce.8_pregen
@@ -0,0 +1,375 @@
+.TH LVREDUCE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvreduce \(em Reduce the size of a logical volume
+.
+.SH SYNOPSIS
+.
+\fBlvreduce\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+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.
+.P
+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.
+.P
+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.
+.P
+In the usage section below, \fB--size\fP \fISize\fP can be replaced
+with \fB--extents\fP \fINumber\fP. See both descriptions
+the options section.
+.
+.SH USAGE
+.
+\fBlvreduce\fP \fB-L\fP|\fB--size\fP [\fB-\fP]\fISize\fP[m|UNIT] \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP [\fB-\fP]\fINumber\fP[PERCENT] ]
+.br
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-n\fP|\fB--nofsck\fP ]
+.br
+[ \fB-r\fP|\fB--resizefs\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--fs\fP \fIString\fP ]
+.br
+[ \fB--fsmode\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-l\fP|\fB--extents\fP [\fB-\fP]\fINumber\fP[PERCENT]
+.br
+Specifies the new size of the LV in logical extents.
+The --size and --extents options are alternate methods of specifying size.
+The total number of physical extents used will be
+greater when redundant data is needed for RAID levels.
+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 PVs. For a snapshot, the size
+can be expressed as a percentage of the total size of the origin LV
+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.
+When the plus \fB+\fP or minus \fB-\fP prefix is used,
+the value is not an absolute size, but is relative and added or subtracted
+from the current size.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB--fs\fP \fIString\fP
+.br
+Control file system resizing when resizing an LV.
+\fBchecksize\fP: Check the fs size and reduce the LV if the fs is not
+using the reduced space (fs reduce is not needed.) If the reduced space
+is used by the fs, then do not resize the fs or LV, and return an error.
+(checksize only applies when reducing, and does nothing for extend.)
+\fBresize\fP: Resize the fs by calling the fs-specific resize command.
+This may also include mounting, unmounting, or running fsck. See --fsmode to
+control mounting behavior, and --nofsck to disable fsck.
+\fBresize_fsadm\fP: Use the old method of calling fsadm to handle the fs
+(deprecated.) Warning: this option does not prevent lvreduce from destroying
+file systems that are unmounted (or mounted if prompts are skipped.)
+\fBignore\fP: Resize the LV without checking for or handling a file system.
+Warning: using ignore when reducing the LV size may destroy the file system.
+.
+.HP
+\fB--fsmode\fP \fIString\fP
+.br
+Control file system mounting behavior for fs resize.
+\fBmanage\fP: Mount or unmount the fs as needed to resize the fs,
+and attempt to restore the original mount state at the end.
+\fBnochange\fP: Do not mount or unmount the fs. If mounting or unmounting
+is required to resize the fs, then do not resize the fs or the LV and fail
+the command.
+\fBoffline\fP: Unmount the fs if it is mounted, and resize the fs while it
+is unmounted. If mounting is required to resize the fs, then do not resize
+the fs or the LV and fail the command.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-n\fP|\fB--nofsck\fP
+.br
+Do not perform fsck when resizing the file system with --resizefs.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-r\fP|\fB--resizefs\fP
+.br
+Resize the fs using the fs-specific resize command.
+May include mounting, unmounting, or running fsck. See --fsmode to control
+mounting behavior, and --nofsck to disable fsck. See --fs for more options
+(--resizefs is equivalent to --fs resize.)
+.
+.HP
+\fB-L\fP|\fB--size\fP [\fB-\fP]\fISize\fP[m|UNIT]
+.br
+Specifies the new size of the LV.
+The --size and --extents options are alternate methods of specifying size.
+The total number of physical extents used will be
+greater when redundant data is needed for RAID levels.
+When the plus \fB+\fP or minus \fB-\fP prefix is used,
+the value is not an absolute size, but is relative and added or subtracted
+from the current size.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvremove.8.in b/man/lvremove.8.in
deleted file mode 100644
index 1d48a11..0000000
--- a/man/lvremove.8.in
+++ /dev/null
@@ -1,55 +0,0 @@
-.TH LVREMOVE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvremove \- remove a logical volume
-.SH SYNOPSIS
-.B lvremove
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-f | \-\-force ]
-.RB [ \-\-noudevsync ]
-.IR LogicalVolume { Name | Path }
-.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.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-f ", " \-\-force
-Remove active logical volumes without confirmation.
-.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/lvremove.8_des b/man/lvremove.8_des
new file mode 100644
index 0000000..9e8f78d
--- /dev/null
+++ b/man/lvremove.8_des
@@ -0,0 +1,26 @@
+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.
+.P
+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.
+.P
+When a single force option is used, LVs are removed without confirmation,
+and the command will try to deactivate unused LVs.
+.P
+To remove damaged LVs, two force options may be required (\fB-ff\fP).
+.P
+\fBHistorical LVs\fP
+.P
+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..1f0c801
--- /dev/null
+++ b/man/lvremove.8_end
@@ -0,0 +1,10 @@
+.
+.SH EXAMPLES
+.
+Remove an active LV without asking for confirmation.
+.br
+.B lvremove -f vg00/lvol1
+.P
+Remove all LVs the specified VG.
+.br
+.B lvremove vg00
diff --git a/man/lvremove.8_pregen b/man/lvremove.8_pregen
new file mode 100644
index 0000000..9f34365
--- /dev/null
+++ b/man/lvremove.8_pregen
@@ -0,0 +1,332 @@
+.TH LVREMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvremove \(em Remove logical volume(s) from the system
+.
+.SH SYNOPSIS
+.
+\fBlvremove\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+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.
+.P
+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.
+.P
+When a single force option is used, LVs are removed without confirmation,
+and the command will try to deactivate unused LVs.
+.P
+To remove damaged LVs, two force options may be required (\fB-ff\fP).
+.P
+\fBHistorical LVs\fP
+.P
+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.
+.
+.SH USAGE
+.
+\fBlvremove\fP \fIVG\fP|\fILV\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB--nohistory\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nohistory\fP
+.br
+Do not record history of LVs being removed.
+This has no effect unless the configuration setting
+metadata/record_lvs_history is enabled.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I Select
+Select indicates that a required positional parameter can
+be omitted if the \fB--select\fP option is used.
+No arg appears in this position.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvrename.8.in b/man/lvrename.8.in
deleted file mode 100644
index ea640ae..0000000
--- a/man/lvrename.8.in
+++ /dev/null
@@ -1,46 +0,0 @@
-.TH LVRENAME 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvrename \- rename a logical volume
-.SH SYNOPSIS
-.B lvrename
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-f | \-\-force ]
-.RB [ \-\-noudevsync ]
-.RI { OldLogicalVolume { Name | Path }
-.IR NewLogicalVolume { Name | Path }
-|
-.I VolumeGroupName OldLogicalVolumeName NewLogicalVolumeName\fR}
-.SH DESCRIPTION
-lvrename renames an existing 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/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..386faab
--- /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
+.P
+An alternate syntax to rename "lvold" to "lvnew":
+.br
+.B lvrename vg02 lvold lvnew
diff --git a/man/lvrename.8_pregen b/man/lvrename.8_pregen
new file mode 100644
index 0000000..fa48161
--- /dev/null
+++ b/man/lvrename.8_pregen
@@ -0,0 +1,282 @@
+.TH LVRENAME 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvrename \(em Rename a logical volume
+.
+.SH SYNOPSIS
+.
+\fBlvrename\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+lvrename renames an existing LV or a historical LV (see \fBlvremove\fP for
+historical LV information.)
+.
+.SH USAGE
+.
+\fBlvrename\fP \fIVG\fP \fILV\fP \fILV\fP\fI_new\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\fBlvrename\fP \fILV\fP \fILV\fP\fI_new\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvresize.8.in b/man/lvresize.8.in
deleted file mode 100644
index 7e85993..0000000
--- a/man/lvresize.8.in
+++ /dev/null
@@ -1,102 +0,0 @@
-.TH LVRESIZE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvresize \- resize a logical volume
-.SH SYNOPSIS
-.B lvresize
-.RB [ \-\-alloc " " \fIAllocationPolicy ]
-.RB [ \-\-noudevsync ]
-.RB [ \-i | \-\-stripes " " \fIStripes
-.RB [ \-I | \-\-stripesize " " \fIStripeSize ]]
-.RB {[ \-l | \-\-extents
-.RI [ + | \- ] LogicalExtentsNumber [ % { VG | LV | PVS | FREE | ORIGIN "}] |"
-.RB [ \-L | \-\-size
-.RI [ + | \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]}
-.RB [ \-f | \-\-force ]
-.RB [ \-n | \-\-nofsck ]
-.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 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 substraction otherwise
-it is rounded upward.
-.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
-.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).
-.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/lvresize.8_des b/man/lvresize.8_des
new file mode 100644
index 0000000..2ff5e56
--- /dev/null
+++ b/man/lvresize.8_des
@@ -0,0 +1,6 @@
+lvresize resizes an LV in the same way as lvextend and lvreduce. See
+\fBlvextend\fP(8) and \fBlvreduce\fP(8) for more information.
+.P
+In the usage section below, \fB--size\fP \fISize\fP can be replaced
+with \fB--extents\fP \fINumber\fP. See both descriptions
+the options section.
diff --git a/man/lvresize.8_end b/man/lvresize.8_end
new file mode 100644
index 0000000..d16248c
--- /dev/null
+++ b/man/lvresize.8_end
@@ -0,0 +1,10 @@
+.
+.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
+.P
+Resize an LV to use 50% of the size volume group.
+.br
+.B lvresize -l50%VG vg1/lv1
diff --git a/man/lvresize.8_pregen b/man/lvresize.8_pregen
new file mode 100644
index 0000000..622846c
--- /dev/null
+++ b/man/lvresize.8_pregen
@@ -0,0 +1,615 @@
+.TH LVRESIZE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvresize \(em Resize a logical volume
+.
+.SH SYNOPSIS
+.
+\fBlvresize\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.P
+.ad l
+ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.br
+ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB-l\fP|\fB--extents\fP [\fB+\fP|\fB-\fP]\fINumber\fP[PERCENT]
+.br
+ \fB-f\fP|\fB--force\fP
+.br
+ \fB--fs\fP \fIString\fP
+.br
+ \fB--fsmode\fP \fIString\fP
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB-n\fP|\fB--nofsck\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--nosync\fP
+.br
+ \fB--noudevsync\fP
+.br
+ \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT]
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+ \fB-r\fP|\fB--resizefs\fP
+.br
+ \fB-L\fP|\fB--size\fP [\fB+\fP|\fB-\fP]\fISize\fP[m|UNIT]
+.br
+ \fB-i\fP|\fB--stripes\fP \fINumber\fP
+.br
+ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB--type\fP \c
+.nh
+\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
+.hy
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB-y\fP|\fB--yes\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+lvresize resizes an LV in the same way as lvextend and lvreduce. See
+\fBlvextend\fP(8) and \fBlvreduce\fP(8) for more information.
+.P
+In the usage section below, \fB--size\fP \fISize\fP can be replaced
+with \fB--extents\fP \fINumber\fP. See both descriptions
+the options section.
+.
+.SH USAGE
+.
+Resize an LV by a specified size.
+.br
+.P
+\fBlvresize\fP \fB-L\fP|\fB--size\fP [\fB+\fP|\fB-\fP]\fISize\fP[m|UNIT] \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-l\fP|\fB--extents\fP [\fB+\fP|\fB-\fP]\fINumber\fP[PERCENT] ]
+.br
+[ \fB-r\fP|\fB--resizefs\fP ]
+.br
+[ \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] ]
+.br
+[ \fB--fs\fP \fIString\fP ]
+.br
+[ \fB--fsmode\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Resize an LV by specified PV extents.
+.br
+.P
+\fBlvresize\fP \fILV\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-r\fP|\fB--resizefs\fP ]
+.br
+[ \fB--fs\fP \fIString\fP ]
+.br
+[ \fB--fsmode\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Resize a pool metadata SubLV by a specified size.
+.br
+.P
+\fBlvresize\fP \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] \fILV1\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+.RS 4
+LV1 types: thinpool
+.RE
+.P
+\(em
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-n\fP|\fB--nofsck\fP ]
+.br
+[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
+.br
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+]
+.br
+[ \fB--nosync\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--type\fP \c
+.nh
+\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
+.hy
+]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+.ad l
+\fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.ad b
+.br
+Determines the allocation policy when a command needs to allocate
+Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
+which can be changed with vgchange/lvchange, or overridden on the
+command line.
+\fBnormal\fP applies common sense rules such as not placing parallel stripes
+on the same PV.
+\fBinherit\fP applies the VG policy to an LV.
+\fBcontiguous\fP requires new PEs be placed adjacent to existing PEs.
+\fBcling\fP places new PEs on the same PV as existing PEs in the same
+stripe of the LV.
+If there are sufficient PEs for an allocation, but normal does not
+use them, \fBanywhere\fP will use them even if it reduces performance,
+e.g. by placing two stripes on the same PV.
+Optional positional PV args on the command line can also be used to limit
+which PVs the command will use for allocation.
+See \fBlvm\fP(8) for more information about allocation.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-l\fP|\fB--extents\fP [\fB+\fP|\fB-\fP]\fINumber\fP[PERCENT]
+.br
+Specifies the new size of the LV in logical extents.
+The --size and --extents options are alternate methods of specifying size.
+The total number of physical extents used will be
+greater when redundant data is needed for RAID levels.
+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 PVs. For a snapshot, the size
+can be expressed as a percentage of the total size of the origin LV
+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.
+When the plus \fB+\fP or minus \fB-\fP prefix is used,
+the value is not an absolute size, but is relative and added or subtracted
+from the current size.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB--fs\fP \fIString\fP
+.br
+Control file system resizing when resizing an LV.
+\fBchecksize\fP: Check the fs size and reduce the LV if the fs is not
+using the reduced space (fs reduce is not needed.) If the reduced space
+is used by the fs, then do not resize the fs or LV, and return an error.
+(checksize only applies when reducing, and does nothing for extend.)
+\fBresize\fP: Resize the fs by calling the fs-specific resize command.
+This may also include mounting, unmounting, or running fsck. See --fsmode to
+control mounting behavior, and --nofsck to disable fsck.
+\fBresize_fsadm\fP: Use the old method of calling fsadm to handle the fs
+(deprecated.) Warning: this option does not prevent lvreduce from destroying
+file systems that are unmounted (or mounted if prompts are skipped.)
+\fBignore\fP: Resize the LV without checking for or handling a file system.
+Warning: using ignore when reducing the LV size may destroy the file system.
+.
+.HP
+\fB--fsmode\fP \fIString\fP
+.br
+Control file system mounting behavior for fs resize.
+\fBmanage\fP: Mount or unmount the fs as needed to resize the fs,
+and attempt to restore the original mount state at the end.
+\fBnochange\fP: Do not mount or unmount the fs. If mounting or unmounting
+is required to resize the fs, then do not resize the fs or the LV and fail
+the command.
+\fBoffline\fP: Unmount the fs if it is mounted, and resize the fs while it
+is unmounted. If mounting is required to resize the fs, then do not resize
+the fs or the LV and fail the command.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-n\fP|\fB--nofsck\fP
+.br
+Do not perform fsck when resizing the file system with --resizefs.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--nosync\fP
+.br
+Causes the creation of mirror, raid1, raid4, raid5 and raid10 to skip the
+initial synchronization. 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.
+This is useful for skipping a potentially long and resource intensive initial
+sync of an empty mirror/raid1/raid4/raid5 and raid10 LV.
+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 do not provide any data copies or parity support
+and thus do not support initial synchronization.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT]
+.br
+Specifies the new size of the pool metadata LV.
+The plus prefix \fB+\fP can be used, in which case
+the value is added to the current size.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-r\fP|\fB--resizefs\fP
+.br
+Resize the fs using the fs-specific resize command.
+May include mounting, unmounting, or running fsck. See --fsmode to control
+mounting behavior, and --nofsck to disable fsck. See --fs for more options
+(--resizefs is equivalent to --fs resize.)
+.
+.HP
+\fB-L\fP|\fB--size\fP [\fB+\fP|\fB-\fP]\fISize\fP[m|UNIT]
+.br
+Specifies the new size of the LV.
+The --size and --extents options are alternate methods of specifying size.
+The total number of physical extents used will be
+greater when redundant data is needed for RAID levels.
+When the plus \fB+\fP or minus \fB-\fP prefix is used,
+the value is not an absolute size, but is relative and added or subtracted
+from the current size.
+.
+.HP
+\fB-i\fP|\fB--stripes\fP \fINumber\fP
+.br
+Specifies the number of stripes in a striped LV. This is the number of
+PVs (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 --stripesize). This does not change existing
+allocated space, but only applies to space being allocated by the command.
+When creating a RAID 4/5/6 LV, this number does not include the extra
+devices that are required for parity. The largest number depends on
+the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and
+when unspecified, the default depends on the RAID type
+(raid0: 2, raid10: 2, raid4/5: 3, raid6: 5.)
+To stripe a new raid LV across all PVs by default,
+see \fBlvm.conf\fP(5) \fBallocation/raid_stripe_all_devices\fP.
+.
+.HP
+\fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
+.br
+The amount of data that is written to one device before
+moving to the next in a striped LV.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+.ad l
+\fB--type\fP \c
+.nh
+\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
+.hy
+.ad b
+.br
+The LV type, also known as "segment type" or "segtype".
+See usage descriptions for the specific ways to use these types.
+For more information about redundancy and performance (\fBraid\fP<N>, \fBmirror\fP, \fBstriped\fP, \fBlinear\fP) see \fBlvmraid\fP(7).
+For thin provisioning (\fBthin\fP, \fBthin-pool\fP) see \fBlvmthin\fP(7).
+For performance caching (\fBcache\fP, \fBcache-pool\fP) see \fBlvmcache\fP(7).
+For copy-on-write snapshots (\fBsnapshot\fP) see usage definitions.
+For VDO (\fBvdo\fP) see \fBlvmvdo\fP(7).
+Several commands omit an explicit type option because the type
+is inferred from other options or shortcuts
+(e.g. --stripes, --mirrors, --snapshot, --virtualsize, --thin, --cache, --vdo).
+Use inferred types with care because it can lead to unexpected results.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+LV1 indicates the LV must have a specific type, where the
+accepted LV types are listed. (raid represents raid<N> type).
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvs.8.in b/man/lvs.8.in
deleted file mode 100644
index f31256c..0000000
--- a/man/lvs.8.in
+++ /dev/null
@@ -1,194 +0,0 @@
-.TH LVS 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvs \- report information about logical volumes
-.SH SYNOPSIS
-.B lvs
-.RB [ \-\-aligned ]
-.RB [ \-a | \-\-all ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-nameprefixes ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-o | \-\-options
-.RI [ + ] Field [, Field ]]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [,[ + | \- ] Key2 [,...]]]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-rows ]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-segments ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-\-unquoted ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RI [ VolumeGroupName
-.RI [ VolumeGroupName ...]]
-
-.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 \-\-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. Precede the list with '\fI+\fP'
-to append to the default selection of columns instead of replacing it.
-.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_read_ahead,
-lv_size,
-lv_tags,
-lv_time,
-lv_uuid,
-metadata_lv,
-mirror_log,
-modules,
-move_pv,
-origin,
-origin_size,
-pool_lv,
-region_size,
-segtype,
-seg_count,
-seg_pe_ranges,
-seg_size,
-seg_start,
-seg_start_pe,
-seg_tags,
-snap_percent,
-stripes,
-stripe_size,
-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: (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
-thin pool m(e)tadata
-.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, (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
-.IP 6 3
-device (o)pen
-.IP 7 3
-Target type: (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
-(p)artial: One or more of the Physical Volumes this Logical Volume uses is
-missing from the system.
-.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
-.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/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..dc3a274
--- /dev/null
+++ b/man/lvs.8_end
@@ -0,0 +1,83 @@
+.
+.SH NOTES
+.
+The lv_attr bits are:
+.IP 1 3
+Volume type: (\fBC\fP)ache, (\fBm\fP)irrored, (\fBM\fP)irrored without initial sync, (\fBo\fP)rigin,
+(\fBO\fP)rigin with merging snapshot, (\fBr\fP)aid, (\fBR\fP)aid without initial sync,
+(\fBs\fP)napshot, merging (\fBS\fP)napshot, (\fBp\fP)vmove, (\fBv\fP)irtual,
+mirror or raid (\fBi\fP)mage, mirror or raid (\fBI\fP)mage out-of-sync, mirror (\fBl\fP)og device,
+under (\fBc\fP)onversion, thin (\fBV\fP)olume, (\fBt\fP)hin pool, (\fBT\fP)hin pool data,
+v(\fBd\fP)o pool, v(\fBD\fP)o pool data,
+raid or pool m(\fBe\fP)tadata or pool metadata spare.
+.IP 2 3
+Permissions: (\fBw\fP)riteable, (\fBr\fP)ead-only, (\fBR\fP)ead-only activation of non-read-only
+volume
+.IP 3 3
+Allocation policy: (\fBa\fP)nywhere, (\fBc\fP)ontiguous, (\fBi\fP)nherited, c(\fBl\fP)ing, (\fBn\fP)ormal
+This is capitalised if the volume is currently locked against allocation
+changes, for example during
+.BR pvmove (8).
+.IP 4 3
+fixed (\fBm\fP)inor
+.IP 5 3
+State: (\fBa\fP)ctive, (\fBh\fP)istorical, (\fBs\fP)uspended, (\fBI\fP)nvalid snapshot,
+invalid (\fBS\fP)uspended snapshot, snapshot (\fBm\fP)erge failed,
+suspended snapshot (\fBM\fP)erge failed, mapped (\fBd\fP)evice present without tables,
+mapped device present with (\fBi\fP)nactive table, thin-pool (\fBc\fP)heck needed,
+suspended thin-pool (\fBC\fP)heck needed, (\fBX\fP) unknown
+.IP 6 3
+device (\fBo\fP)pen, (\fBX\fP) unknown
+.IP 7 3
+Target type: (\fBC\fP)ache, (\fBm\fP)irror, (\fBr\fP)aid, (\fBs\fP)napshot, (\fBt\fP)hin, (\fBu\fP)nknown, (\fBv\fP)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
+(\fBm\fP) if they use the original device-mapper mirror kernel driver; whereas the raid
+equivalents using the md raid kernel driver all appear as (\fBr\fP).
+Snapshots using the original device-mapper driver appear as (\fBs\fP); whereas
+snapshots of thin volumes using the new thin provisioning driver appear as (\fBt\fP).
+.IP 8 3
+Newly-allocated data blocks are overwritten with blocks of (\fBz\fP)eroes before use.
+.IP 9 3
+Volume Health, where there are currently three groups of attributes identified:
+.IP
+Common ones for all Logical Volumes: (\fBp\fP)artial, (\fBX\fP) unknown.
+.br
+(\fBp\fP)artial signifies that one or more of the Physical Volumes this Logical
+Volume uses is missing from the system. (\fBX\fP) unknown signifies the status
+is unknown.
+.IP
+Related to RAID Logical Volumes: (\fBr\fP)efresh needed, (\fBm\fP)ismatches exist, (\fBw\fP)ritemostly.
+.br
+(\fBr\fP)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. (\fBm\fP)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.) (\fBw\fP)ritemostly signifies the
+devices in a RAID 1 logical volume that have been marked write-mostly.
+Re(\fBs\fP)haping signifies a RAID Logical Volume is either undergoing a stripe
+addition/removal, a stripe size or RAID algorithm change.
+(\fBR\fP)emove after reshape signifies freed striped raid images to be removed.
+.IP
+Related to Thin pool Logical Volumes: (\fBF\fP)ailed, out of (\fBD\fP)ata space,
+(\fBM\fP)etadata read only.
+.br
+(\fBF\fP)ailed is set if thin pool encounters serious failures and hence no further I/O
+is permitted at all. The out of (\fBD\fP)ata space is set if thin pool has run out of
+data space. (\fBM\fP)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: (\fBF\fP)ailed.
+.br
+(\fBF\fP)ailed is set when related thin pool enters Failed state and no further I/O
+is permitted at all.
+.IP
+Related to writecache logical volumes: (\fBE\fP)rror.
+.br
+(\fBE\fP)rror is set dm-writecache reports an error.
+.IP 10 3
+s(\fBk\fP)ip activation: this volume is flagged to be skipped during activation.
diff --git a/man/lvs.8_pregen b/man/lvs.8_pregen
new file mode 100644
index 0000000..3f35dc6
--- /dev/null
+++ b/man/lvs.8_pregen
@@ -0,0 +1,470 @@
+.TH LVS 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvs \(em Display information about logical volumes
+.
+.SH SYNOPSIS
+.
+\fBlvs\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+lvs produces formatted output about LVs.
+.
+.SH USAGE
+.
+\fBlvs\fP
+.br
+.RS 4
+.ad l
+[ \fB-H\fP|\fB--history\fP ]
+.br
+[ \fB-a\fP|\fB--all\fP ]
+.br
+[ \fB-o\fP|\fB--options\fP \fIString\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
+.br
+[ \fB--segments\fP ]
+.br
+[ \fB--aligned\fP ]
+.br
+[ \fB--binary\fP ]
+.br
+[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
+.br
+[ \fB--foreign\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--logonly\fP ]
+.br
+[ \fB--nameprefixes\fP ]
+.br
+[ \fB--noheadings\fP ]
+.br
+[ \fB--nosuffix\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--rows\fP ]
+.br
+[ \fB--separator\fP \fIString\fP ]
+.br
+[ \fB--shared\fP ]
+.br
+[ \fB--unbuffered\fP ]
+.br
+[ \fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+]
+.br
+[ \fB--unquoted\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fILV\fP|\fITag\fP ... ]
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--aligned\fP
+.br
+Use with --separator to align the output columns
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+Show information about internal LVs.
+These are components of normal LVs, such as mirrors,
+which are not independently accessible, e.g. not mountable.
+.
+.HP
+\fB--binary\fP
+.br
+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).
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
+.br
+See \fBlvmreport\fP(7).
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--foreign\fP
+.br
+Report/display foreign VGs that would otherwise be skipped.
+See \fBlvmsystemid\fP(7) for more information about foreign VGs.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB-H\fP|\fB--history\fP
+.br
+Include historical LVs in the output.
+(This has no effect unless LVs were removed while
+\fBlvm.conf\fP(5) \fBmetadata/record_lvs_history\fP was enabled.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--logonly\fP
+.br
+Suppress command report and display only log report.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nameprefixes\fP
+.br
+Add an "LVM2_" prefix plus the field name to the output. Useful
+with --noheadings to produce a list of field=value pairs that can
+be used to set environment variables (for example, in udev rules).
+.
+.HP
+\fB--noheadings\fP
+.br
+Suppress the headings line that is normally the first line of output.
+Useful if grepping the output.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--nosuffix\fP
+.br
+Suppress the suffix on output sizes. Use with --units
+(except h and H) if processing the output.
+.
+.HP
+\fB-o\fP|\fB--options\fP \fIString\fP
+.br
+Comma-separated, ordered list of fields to display in columns.
+String arg syntax is: [\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
+The prefix \fB+\fP will append the specified fields to the default fields,
+\fB-\fP will remove the specified fields from the default fields, and
+\fB#\fP will compact specified fields (removing them when empty for all rows.)
+Use \fB-o help\fP to view the list of all available fields.
+Use separate lists of fields to add, remove or compact by repeating the -o option:
+-o+field1,field2 -o-field3,field4 -o#field5.
+These lists are evaluated from left to right.
+Use field name \fBlv_all\fP to view all LV fields,
+\fBvg_all\fP all VG fields,
+\fBpv_all\fP all PV fields,
+\fBpvseg_all\fP all PV segment fields,
+\fBseg_all\fP all LV segment fields, and
+\fBpvseg_all\fP all PV segment columns.
+See the \fBlvm.conf\fP(5) report section for more config options.
+See \fBlvmreport\fP(7) for more information about reporting.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB--rows\fP
+.br
+Output columns as rows.
+.
+.HP
+\fB--segments\fP
+.br
+Use default columns that emphasize segment information.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB--separator\fP \fIString\fP
+.br
+String to use to separate each column. Useful if grepping the output.
+.
+.HP
+\fB--shared\fP
+.br
+Report/display shared VGs that would otherwise be skipped when
+lvmlockd is not being used on the host.
+See \fBlvmlockd\fP(8) for more information about shared VGs.
+.
+.HP
+\fB-O\fP|\fB--sort\fP \fIString\fP
+.br
+Comma-separated ordered list of columns to sort by. Replaces the default
+selection. Precede any column with \fB-\fP for a reverse sort on that column.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--unbuffered\fP
+.br
+Produce output immediately without sorting or aligning the columns properly.
+.
+.HP
+.ad l
+\fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+.ad b
+.br
+All sizes are output in these units:
+human-(r)eadable with '<' rounding indicator,
+(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.
+Custom units can be specified, e.g. --units 3M.
+.
+.HP
+\fB--unquoted\fP
+.br
+When used with --nameprefixes, output values in the field=value
+pairs are not quoted.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/lvscan.8.in b/man/lvscan.8.in
deleted file mode 100644
index 5102691..0000000
--- a/man/lvscan.8.in
+++ /dev/null
@@ -1,39 +0,0 @@
-.TH LVSCAN 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-lvscan \- scan (all disks) for Logical Volumes
-.SH SYNOPSIS
-.B lvscan
-.RB [ \-a | \-\-all]
-.RB [ \-b | \-\-blockdevice ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-P | \-\-partial ]
-.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.
-.SH SEE ALSO
-.BR lvm (8),
-.BR lvcreate (8),
-.BR lvdisplay (8)
-.BR lvs (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_end b/man/lvscan.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/lvscan.8_end
diff --git a/man/lvscan.8_pregen b/man/lvscan.8_pregen
new file mode 100644
index 0000000..e2938de
--- /dev/null
+++ b/man/lvscan.8_pregen
@@ -0,0 +1,282 @@
+.TH LVSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+lvscan \(em List all logical volumes in all volume groups
+.
+.SH SYNOPSIS
+.
+\fBlvscan\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+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.
+.
+.SH USAGE
+.
+\fBlvscan\fP
+.br
+.RS 4
+.ad l
+[ \fB-a\fP|\fB--all\fP ]
+.br
+[ \fB-b\fP|\fB--blockdevice\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+Show information about internal LVs.
+These are components of normal LVs, such as mirrors,
+which are not independently accessible, e.g. not mountable.
+.
+.HP
+\fB-b\fP|\fB--blockdevice\fP
+.br
+No longer used.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/pvchange.8.in b/man/pvchange.8.in
deleted file mode 100644
index 5e6c15e..0000000
--- a/man/pvchange.8.in
+++ /dev/null
@@ -1,53 +0,0 @@
-.TH PVCHANGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvchange \- change attributes of a physical volume
-.SH SYNOPSIS
-.B pvchange
-.RB [ \-\-addtag
-.IR Tag ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-f | \-\-force ]
-.RB [ \-\-deltag
-.IR Tag ]
-.RB [ \-\-metadataignore
-.RI { y | n }]
-.RB [ \-h | \-? | \-\-help ]
-.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/pvchange.8_des b/man/pvchange.8_des
new file mode 100644
index 0000000..d67bca1
--- /dev/null
+++ b/man/pvchange.8_des
@@ -0,0 +1,4 @@
+pvchange changes PV attributes in the VG.
+.P
+For options listed in parentheses, any one is required, after which the
+others are optional.
diff --git a/man/pvchange.8_end b/man/pvchange.8_end
new file mode 100644
index 0000000..617f828
--- /dev/null
+++ b/man/pvchange.8_end
@@ -0,0 +1,7 @@
+.
+.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_pregen b/man/pvchange.8_pregen
new file mode 100644
index 0000000..0b35a20
--- /dev/null
+++ b/man/pvchange.8_pregen
@@ -0,0 +1,371 @@
+.TH PVCHANGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+pvchange \(em Change attributes of physical volume(s)
+.
+.SH SYNOPSIS
+.
+\fBpvchange\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+pvchange changes PV attributes in the VG.
+.P
+For options listed in parentheses, any one is required, after which the
+others are optional.
+.
+.SH USAGE
+.
+Change properties of all PVs.
+.br
+.P
+\fBpvchange\fP \fB-a\fP|\fB--all\fP
+.RS 4
+( \fB-x\fP|\fB--allocatable\fP \fBy\fP|\fBn\fP
+.br
+ \fB-u\fP|\fB--uuid\fP
+.br
+ \fB--addtag\fP \fITag\fP
+.br
+ \fB--deltag\fP \fITag\fP
+.br
+ \fB--metadataignore\fP \fBy\fP|\fBn\fP )
+.RE
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Change properties of specified PVs.
+.br
+.P
+\fBpvchange\fP
+.RS 4
+( \fB-x\fP|\fB--allocatable\fP \fBy\fP|\fBn\fP
+.br
+ \fB-u\fP|\fB--uuid\fP
+.br
+ \fB--addtag\fP \fITag\fP
+.br
+ \fB--deltag\fP \fITag\fP
+.br
+ \fB--metadataignore\fP \fBy\fP|\fBn\fP )
+.RE
+.RS 4
+ \fIPV\fP|\fISelect\fP ...
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-u\fP|\fB--uuid\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--addtag\fP \fITag\fP
+.br
+Adds a tag to a PV, VG or LV. This option can be repeated to add
+multiple tags at once. See \fBlvm\fP(8) for information about tags.
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+Change all visible PVs.
+.
+.HP
+\fB-x\fP|\fB--allocatable\fP \fBy\fP|\fBn\fP
+.br
+Enable or disable allocation of physical extents on this PV.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--deltag\fP \fITag\fP
+.br
+Deletes a tag from a PV, VG or LV. This option can be repeated to delete
+multiple tags at once. See \fBlvm\fP(8) for information about tags.
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--metadataignore\fP \fBy\fP|\fBn\fP
+.br
+Specifies the metadataignore property of a PV.
+If yes, metadata areas on the PV are ignored, and lvm will
+not store metadata in the metadata areas of the PV.
+If no, lvm will store metadata on the PV.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-u\fP|\fB--uuid\fP
+.br
+Generate new random UUID for specified PVs.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I Select
+Select indicates that a required positional parameter can
+be omitted if the \fB--select\fP option is used.
+No arg appears in this position.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/pvck.8.in b/man/pvck.8.in
deleted file mode 100644
index e6019af..0000000
--- a/man/pvck.8.in
+++ /dev/null
@@ -1,35 +0,0 @@
-.TH PVCK 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvck \- check physical volume metadata
-.SH SYNOPSIS
-.B pvck
-.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/pvck.8_des b/man/pvck.8_des
new file mode 100644
index 0000000..3adda46
--- /dev/null
+++ b/man/pvck.8_des
@@ -0,0 +1,136 @@
+pvck checks and repairs LVM metadata on PVs.
+.P
+.SS Dump options
+.P
+.B headers
+.br
+Print LVM on-disk headers and structures: label_header, pv_header,
+mda_header(s), and metadata text. Warnings are printed if any values are
+incorrect. The label_header and pv_header both exist in a 512 byte
+sector, usually the second sector of the device. An mda_header exists in
+a 512 byte sector at offset 4096 bytes. A second mda_header can
+optionally exist near the end of the device. The metadata text exists in
+an area (about 1MiB by default) immediately following the mda_header
+sector. The metadata text is checked but not printed (see other options).
+.P
+.B metadata
+.br
+Print the current LVM VG metadata text (or save to a file), using headers
+to locate the latest copy of metadata. If headers are damaged, metadata
+may not be found (see metadata_search). Use --settings "mda_num=2" to
+look in mda2 (the second mda at the end of the device, if used). The
+metadata text is printed to stdout or saved to a file with --file.
+.P
+.B metadata_all
+.br
+List all versions of VG metadata found in the metadata area, using headers
+to locate metadata. Full copies of all metadata are saved to a file with
+the --file option. If headers are damaged, metadata may not be found (see
+metadata_search). Use --settings "mda_num=2" as above. Use -v to include
+descriptions and dates when listing metadata versions.
+.P
+.B metadata_search
+.br
+List all versions of VG metadata found in the metadata area, searching
+common locations so metadata can be found if headers are damaged. Full
+copies of all metadata are saved to a file with the --file option. To
+save one specific version of metadata, use --settings
+"metadata_offset=<offset>", where the offset is taken from the list of
+versions found. Use -v to include descriptions and dates when listing
+metadata versions.
+.P
+.B metadata_area
+.br
+Save the entire text metadata area to a file without processing.
+.P
+.SS Repair options
+.P
+.B --repair
+.br
+Repair headers and metadata on a PV. This uses a metadata input file that
+was extracted by --dump, or a backup file (from \fI#DEFAULT_BACKUP_DIR#\fP). When
+possible, use metadata saved by --dump from another PV in the same VG (or
+from a second metadata area on the PV).
+.P
+There are cases where the PV UUID needs to be specified for the PV being
+repaired. It is specified using --settings "pv_uuid=<UUID>". In
+particular, if the device name for the PV being repaired does not match
+the previous device name of the PV, then LVM may not be able to determine
+the correct PV UUID. When headers are damaged on more than one PV in a
+VG, it is important for the user to determine the correct PV UUID and
+specify it in --settings. Otherwise, the wrong PV UUID could be used if
+device names have been swapped since the metadata was last written.
+.P
+If a PV has no metadata areas and the pv_header is damaged, then the
+repair will not know to create no metadata areas during repair. It will
+by default repair metadata in mda1. To repair with no metadata areas, use
+--settings "mda_offset=0 mda_size=0".
+.P
+There are cases where repair should be run on all PVs in the VG (using the
+same metadata file): if all PVs in the VG are damaged, if using an old
+metadata version, or if a backup file is used instead of raw metadata
+(taken from pvck dump.)
+.P
+Using --repair is equivalent to running --repairtype pv_header followed by
+--repairtype metadata.
+.P
+.B --repairtype pv_header
+.br
+Repairs the header sector, containing the pv_header and label_header.
+.P
+.B --repairtype metadata
+.br
+Repairs the mda_header and metadata text. It requires the headers to be
+correct (having been undamaged or already repaired).
+.P
+.B --repairtype label_header
+.br
+Repairs label_header fields, leaving the pv_header (in the same sector)
+unchanged. (repairtype pv_header should usually be used instead.)
+.P
+.SS Settings
+.P
+The --settings option controls or overrides certain dump or repair
+behaviors. All offset and size values in settings are in bytes (units are
+not recognized.) These settings are subject to change.
+.P
+.B mda_num=1|2
+.br
+Select which metadata area should be used. By default the first metadata
+area (1) is used. mda1 is always located at offset 4096. mda2, at the
+end of the device, often does not exist (it's not created by default.) If
+mda1 is erased, mda2, if it exists, will often still have metadata.
+.P
+\fBmetadata_offset=\fP\fIbytes\fP
+.br
+Select metadata text at this offset. Use with metadata_search to
+print/save one instance of metadata text.
+.P
+\fBmda_offset=\fP\fIbytes\fP \fBmda_size=\fP\fIbytes\fP
+.br
+Refers to a metadata area (mda) location and size. An mda includes an
+mda_header and circular metadata text buffer. Setting this forces
+metadata_search look for metadata in the given area instead of the
+standard locations. When set to zero with repair, it indicates no
+metadata areas should exist.
+.P
+\fBmda2_offset=\fP\fIbytes\fP \fBmda2_size=\fP\fIbytes\fP
+.br
+When repairing a pv_header, this forces a specific offset and size for
+mda2 that should be recorded in the pv_header.
+.P
+\fBpv_uuid=\fP\fIuuid\fP
+.br
+Specify the PV UUID of the device being repaired. When not specified,
+repair will attempt to determine the correct PV UUID by matching a device
+name in the metadata.
+.P
+\fBdevice_size=\fP\fIbytes\fP
+.br
+\fBdata_offset=\fP\fIbytes\fP
+.br
+When repairing a pv_header, the device_size, data_offset, and pvid can all
+be specified directly, in which case these values are not taken from a
+metadata file (where they usually come from), and the metadata file can be
+omitted. data_offset is the starting location of the first physical
+extent (data), which follows the first metadata area.
diff --git a/man/pvck.8_end b/man/pvck.8_end
new file mode 100644
index 0000000..2d05dcc
--- /dev/null
+++ b/man/pvck.8_end
@@ -0,0 +1,9 @@
+.
+.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_pregen b/man/pvck.8_pregen
new file mode 100644
index 0000000..156e3b7
--- /dev/null
+++ b/man/pvck.8_pregen
@@ -0,0 +1,552 @@
+.TH PVCK 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+pvck \(em Check metadata on physical volumes
+.
+.SH SYNOPSIS
+.
+\fBpvck\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.P
+.ad l
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB--dump\fP \c
+.nh
+\%\fBheaders\fP|\:\fBmetadata\fP|\:\fBmetadata_all\fP|\:\fBmetadata_search\fP
+.hy
+.br
+ \fB-f\fP|\fB--file\fP \fIString\fP
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB--labelsector\fP \fINumber\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB--\fP[\fBpv\fP]\fBmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB--repair\fP
+.br
+ \fB--repairtype\fP \fBpv_header\fP|\fBmetadata\fP|\fBlabel_header\fP
+.br
+ \fB--settings\fP \fIString\fP
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB-y\fP|\fB--yes\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+pvck checks and repairs LVM metadata on PVs.
+.P
+.SS Dump options
+.P
+.B headers
+.br
+Print LVM on-disk headers and structures: label_header, pv_header,
+mda_header(s), and metadata text. Warnings are printed if any values are
+incorrect. The label_header and pv_header both exist in a 512 byte
+sector, usually the second sector of the device. An mda_header exists in
+a 512 byte sector at offset 4096 bytes. A second mda_header can
+optionally exist near the end of the device. The metadata text exists in
+an area (about 1MiB by default) immediately following the mda_header
+sector. The metadata text is checked but not printed (see other options).
+.P
+.B metadata
+.br
+Print the current LVM VG metadata text (or save to a file), using headers
+to locate the latest copy of metadata. If headers are damaged, metadata
+may not be found (see metadata_search). Use --settings "mda_num=2" to
+look in mda2 (the second mda at the end of the device, if used). The
+metadata text is printed to stdout or saved to a file with --file.
+.P
+.B metadata_all
+.br
+List all versions of VG metadata found in the metadata area, using headers
+to locate metadata. Full copies of all metadata are saved to a file with
+the --file option. If headers are damaged, metadata may not be found (see
+metadata_search). Use --settings "mda_num=2" as above. Use -v to include
+descriptions and dates when listing metadata versions.
+.P
+.B metadata_search
+.br
+List all versions of VG metadata found in the metadata area, searching
+common locations so metadata can be found if headers are damaged. Full
+copies of all metadata are saved to a file with the --file option. To
+save one specific version of metadata, use --settings
+"metadata_offset=<offset>", where the offset is taken from the list of
+versions found. Use -v to include descriptions and dates when listing
+metadata versions.
+.P
+.B metadata_area
+.br
+Save the entire text metadata area to a file without processing.
+.P
+.SS Repair options
+.P
+.B --repair
+.br
+Repair headers and metadata on a PV. This uses a metadata input file that
+was extracted by --dump, or a backup file (from \fI#DEFAULT_BACKUP_DIR#\fP). When
+possible, use metadata saved by --dump from another PV in the same VG (or
+from a second metadata area on the PV).
+.P
+There are cases where the PV UUID needs to be specified for the PV being
+repaired. It is specified using --settings "pv_uuid=<UUID>". In
+particular, if the device name for the PV being repaired does not match
+the previous device name of the PV, then LVM may not be able to determine
+the correct PV UUID. When headers are damaged on more than one PV in a
+VG, it is important for the user to determine the correct PV UUID and
+specify it in --settings. Otherwise, the wrong PV UUID could be used if
+device names have been swapped since the metadata was last written.
+.P
+If a PV has no metadata areas and the pv_header is damaged, then the
+repair will not know to create no metadata areas during repair. It will
+by default repair metadata in mda1. To repair with no metadata areas, use
+--settings "mda_offset=0 mda_size=0".
+.P
+There are cases where repair should be run on all PVs in the VG (using the
+same metadata file): if all PVs in the VG are damaged, if using an old
+metadata version, or if a backup file is used instead of raw metadata
+(taken from pvck dump.)
+.P
+Using --repair is equivalent to running --repairtype pv_header followed by
+--repairtype metadata.
+.P
+.B --repairtype pv_header
+.br
+Repairs the header sector, containing the pv_header and label_header.
+.P
+.B --repairtype metadata
+.br
+Repairs the mda_header and metadata text. It requires the headers to be
+correct (having been undamaged or already repaired).
+.P
+.B --repairtype label_header
+.br
+Repairs label_header fields, leaving the pv_header (in the same sector)
+unchanged. (repairtype pv_header should usually be used instead.)
+.P
+.SS Settings
+.P
+The --settings option controls or overrides certain dump or repair
+behaviors. All offset and size values in settings are in bytes (units are
+not recognized.) These settings are subject to change.
+.P
+.B mda_num=1|2
+.br
+Select which metadata area should be used. By default the first metadata
+area (1) is used. mda1 is always located at offset 4096. mda2, at the
+end of the device, often does not exist (it's not created by default.) If
+mda1 is erased, mda2, if it exists, will often still have metadata.
+.P
+\fBmetadata_offset=\fP\fIbytes\fP
+.br
+Select metadata text at this offset. Use with metadata_search to
+print/save one instance of metadata text.
+.P
+\fBmda_offset=\fP\fIbytes\fP \fBmda_size=\fP\fIbytes\fP
+.br
+Refers to a metadata area (mda) location and size. An mda includes an
+mda_header and circular metadata text buffer. Setting this forces
+metadata_search look for metadata in the given area instead of the
+standard locations. When set to zero with repair, it indicates no
+metadata areas should exist.
+.P
+\fBmda2_offset=\fP\fIbytes\fP \fBmda2_size=\fP\fIbytes\fP
+.br
+When repairing a pv_header, this forces a specific offset and size for
+mda2 that should be recorded in the pv_header.
+.P
+\fBpv_uuid=\fP\fIuuid\fP
+.br
+Specify the PV UUID of the device being repaired. When not specified,
+repair will attempt to determine the correct PV UUID by matching a device
+name in the metadata.
+.P
+\fBdevice_size=\fP\fIbytes\fP
+.br
+\fBdata_offset=\fP\fIbytes\fP
+.br
+When repairing a pv_header, the device_size, data_offset, and pvid can all
+be specified directly, in which case these values are not taken from a
+metadata file (where they usually come from), and the metadata file can be
+omitted. data_offset is the starting location of the first physical
+extent (data), which follows the first metadata area.
+.
+.SH USAGE
+.
+Check for metadata on a device
+.br
+.P
+\fBpvck\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Check and print LVM headers and metadata on a device
+.br
+.P
+\fBpvck\fP \fB--dump\fP \c
+.nh
+\%\fBheaders\fP|\:\fBmetadata\fP|\:\fBmetadata_all\fP|\:\fBmetadata_search\fP
+.hy
+\fIPV\fP
+.br
+.RS 4
+.ad l
+[ \fB-f\fP|\fB--file\fP \fIString\fP ]
+.br
+[ \fB--settings\fP \fIString\fP ]
+.br
+[ \fB--\fP[\fBpv\fP]\fBmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Repair LVM headers or metadata on a device
+.br
+.P
+\fBpvck\fP \fB--repairtype\fP \fBpv_header\fP|\fBmetadata\fP|\fBlabel_header\fP \fIPV\fP
+.br
+.RS 4
+.ad l
+[ \fB-f\fP|\fB--file\fP \fIString\fP ]
+.br
+[ \fB--settings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Repair LVM headers and metadata on a device
+.br
+.P
+\fBpvck\fP \fB--repair\fP \fB-f\fP|\fB--file\fP \fIString\fP \fIPV\fP
+.br
+.RS 4
+.ad l
+[ \fB--settings\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB--labelsector\fP \fINumber\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+.ad l
+\fB--dump\fP \c
+.nh
+\%\fBheaders\fP|\:\fBmetadata\fP|\:\fBmetadata_all\fP|\:\fBmetadata_search\fP
+.hy
+.ad b
+.br
+Dump headers and metadata from a PV for debugging and repair.
+Option values include: \fBheaders\fP to print and check LVM headers,
+\fBmetadata\fP to print or save the current text metadata,
+\fBmetadata_all\fP to list or save all versions of metadata,
+\fBmetadata_search\fP to list or save all versions of metadata,
+searching standard locations in case of damaged headers,
+\fBmetadata_area\fP to save an entire text metadata area to a file.
+.
+.HP
+\fB-f\fP|\fB--file\fP \fIString\fP
+.br
+Metadata file to read or write.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--labelsector\fP \fINumber\fP
+.br
+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.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB--\fP[\fBpv\fP]\fBmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
+.br
+The number of metadata areas to set aside on a PV for storing VG metadata.
+When 2, one copy of the VG metadata is stored at the front of the PV
+and a second copy is stored at the end.
+When 1, one copy of the VG metadata is stored at the front of the PV.
+When 0, no copies of the VG metadata are stored on the given PV.
+This may be useful in VGs containing many PVs (this places limitations
+on the ability to use vgsplit later.)
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--repair\fP
+.br
+Repair headers and metadata on a PV.
+.
+.HP
+\fB--repairtype\fP \fBpv_header\fP|\fBmetadata\fP|\fBlabel_header\fP
+.br
+Repair headers and metadata on a PV. See command description.
+.
+.HP
+\fB--settings\fP \fIString\fP
+.br
+Specifies command specific settings in "Key = Value" form.
+Combine multiple settings in quotes, or repeat the settings
+option for each.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/pvcreate.8.in b/man/pvcreate.8.in
deleted file mode 100644
index 3fec8dc..0000000
--- a/man/pvcreate.8.in
+++ /dev/null
@@ -1,192 +0,0 @@
-.TH PVCREATE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvcreate \- initialize a disk or partition for use by LVM
-.SH SYNOPSIS
-.B pvcreate
-.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 [ \-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 [ \-\-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
-.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 \-\-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/pvcreate.8_des b/man/pvcreate.8_des
new file mode 100644
index 0000000..69bd133
--- /dev/null
+++ b/man/pvcreate.8_des
@@ -0,0 +1,78 @@
+pvcreate initializes a Physical Volume (PV) on a device so the device is
+recognized as belonging to LVM. This allows the PV to be used in a Volume
+Group (VG). An LVM disk label is written to the device, and LVM metadata
+areas are initialized. A PV can be placed on a whole device or partition.
+.P
+Use \fBvgcreate\fP(8) to create a new VG on the PV, or \fBvgextend\fP(8)
+to add the PV to an existing VG. Use \fBpvremove\fP(8) to remove the LVM
+disk label from the device.
+.P
+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.
+.P
+.B Metadata location, size, and alignment
+.P
+The LVM disk label begins 512 bytes from the start of the device, and is
+512 bytes in size.
+.P
+The LVM metadata area begins at an offset (from the start of the device)
+equal to the page size of the machine creating the PV (often 4 KiB.) The
+metadata area contains a 512 byte header and a multi-KiB circular buffer
+that holds text copies of the VG metadata.
+.P
+With default settings, the first physical extent (PE), which contains LV
+data, is 1 MiB from the start of the device. This location is controlled
+by \fBdefault_data_alignment\fP in lvm.conf, which is set to 1 (MiB) by
+default. The pe_start will be a multiple of this many MiB. This location
+can be checked with:
+.br
+.B pvs -o pe_start
+.I PV
+.P
+The size of the LVM metadata area is the space between the the start of
+the metadata area and the first PE. When metadata begins at 4 KiB and the
+first PE is at 1024 KiB, the metadata area size is 1020 KiB. This can be
+checked with:
+.br
+.B pvs -o mda_size
+.I PV
+.P
+The mda_size cannot be increased after pvcreate, so if larger metadata is
+needed, it must be set during pvcreate. Two copies of the VG metadata
+must always fit within the metadata area, so the maximum VG metadata size
+is around half the mda_size. This can be checked with:
+.br
+.B vgs -o mda_free
+.I VG
+.P
+A larger metadata area can be set with --metadatasize. The resulting
+mda_size may be larger than specified due to default_data_alignment
+placing pe_start on a MiB boundary, and the fact that the metadata area
+extends to the first PE. With metadata starting at 4 KiB and
+default_data_alignment 1 (MiB), setting --metadatasize 2048k results in
+pe_start of 3 MiB and mda_size of 3068 KiB. Alternatively, --metadatasize
+2044k results in pe_start at 2 MiB and mda_size of 2044 KiB.
+.P
+The alignment of pe_start described above may be automatically overridden
+based on md device properties or device i/o properties reported in sysfs.
+These automatic adjustments can be enabled/disabled using lvm.conf
+settings md_chunk_alignment and data_alignment_offset_detection.
+.P
+To use a different pe_start alignment, use the --dataalignment option.
+The --metadatasize option would also typically be used in this case
+because the metadata area size also determines the location of pe_start.
+When using these two options together, pe_start is calculated as:
+metadata area start (page size), plus the specified --metadatasize,
+rounded up to the next multiple of --dataalignment.
+With metadata starting at 4 KiB, --metadatasize 2048k, and --dataalignment 128k,
+pe_start is 2176 KiB and mda_size is 2172 KiB.
+The pe_start of 2176 KiB is the nearest even multiple of 128 KiB that
+provides at least 2048 KiB of metadata space.
+Always check the resulting alignment and metadata size when using
+these options.
+.P
+To shift an aligned pe_start value, use the --dataalignmentoffset option.
+The pe_start alignment is calculated as described above, and then the
+value specified with --dataalignmentoffset is added to produce the final
+pe_start value.
diff --git a/man/pvcreate.8_end b/man/pvcreate.8_end
new file mode 100644
index 0000000..7ebf963
--- /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
+.P
+If a device is a 4 KiB sector drive that compensates for windows
+partitioning (sector 7 is the lowest aligned logical block, the 4 KiB
+sectors start at LBA -1, and consequently sector 63 is aligned on a 4 KiB
+boundary) manually account for this when initializing for use by LVM.
+.br
+.B pvcreate --dataalignmentoffset 7s /dev/sdb
diff --git a/man/pvcreate.8_pregen b/man/pvcreate.8_pregen
new file mode 100644
index 0000000..3445898
--- /dev/null
+++ b/man/pvcreate.8_pregen
@@ -0,0 +1,473 @@
+.TH PVCREATE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+pvcreate \(em Initialize physical volume(s) for use by LVM
+.
+.SH SYNOPSIS
+.
+\fBpvcreate\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+pvcreate initializes a Physical Volume (PV) on a device so the device is
+recognized as belonging to LVM. This allows the PV to be used in a Volume
+Group (VG). An LVM disk label is written to the device, and LVM metadata
+areas are initialized. A PV can be placed on a whole device or partition.
+.P
+Use \fBvgcreate\fP(8) to create a new VG on the PV, or \fBvgextend\fP(8)
+to add the PV to an existing VG. Use \fBpvremove\fP(8) to remove the LVM
+disk label from the device.
+.P
+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.
+.P
+.B Metadata location, size, and alignment
+.P
+The LVM disk label begins 512 bytes from the start of the device, and is
+512 bytes in size.
+.P
+The LVM metadata area begins at an offset (from the start of the device)
+equal to the page size of the machine creating the PV (often 4 KiB.) The
+metadata area contains a 512 byte header and a multi-KiB circular buffer
+that holds text copies of the VG metadata.
+.P
+With default settings, the first physical extent (PE), which contains LV
+data, is 1 MiB from the start of the device. This location is controlled
+by \fBdefault_data_alignment\fP in lvm.conf, which is set to 1 (MiB) by
+default. The pe_start will be a multiple of this many MiB. This location
+can be checked with:
+.br
+.B pvs -o pe_start
+.I PV
+.P
+The size of the LVM metadata area is the space between the the start of
+the metadata area and the first PE. When metadata begins at 4 KiB and the
+first PE is at 1024 KiB, the metadata area size is 1020 KiB. This can be
+checked with:
+.br
+.B pvs -o mda_size
+.I PV
+.P
+The mda_size cannot be increased after pvcreate, so if larger metadata is
+needed, it must be set during pvcreate. Two copies of the VG metadata
+must always fit within the metadata area, so the maximum VG metadata size
+is around half the mda_size. This can be checked with:
+.br
+.B vgs -o mda_free
+.I VG
+.P
+A larger metadata area can be set with --metadatasize. The resulting
+mda_size may be larger than specified due to default_data_alignment
+placing pe_start on a MiB boundary, and the fact that the metadata area
+extends to the first PE. With metadata starting at 4 KiB and
+default_data_alignment 1 (MiB), setting --metadatasize 2048k results in
+pe_start of 3 MiB and mda_size of 3068 KiB. Alternatively, --metadatasize
+2044k results in pe_start at 2 MiB and mda_size of 2044 KiB.
+.P
+The alignment of pe_start described above may be automatically overridden
+based on md device properties or device i/o properties reported in sysfs.
+These automatic adjustments can be enabled/disabled using lvm.conf
+settings md_chunk_alignment and data_alignment_offset_detection.
+.P
+To use a different pe_start alignment, use the --dataalignment option.
+The --metadatasize option would also typically be used in this case
+because the metadata area size also determines the location of pe_start.
+When using these two options together, pe_start is calculated as:
+metadata area start (page size), plus the specified --metadatasize,
+rounded up to the next multiple of --dataalignment.
+With metadata starting at 4 KiB, --metadatasize 2048k, and --dataalignment 128k,
+pe_start is 2176 KiB and mda_size is 2172 KiB.
+The pe_start of 2176 KiB is the nearest even multiple of 128 KiB that
+provides at least 2048 KiB of metadata space.
+Always check the resulting alignment and metadata size when using
+these options.
+.P
+To shift an aligned pe_start value, use the --dataalignmentoffset option.
+The pe_start alignment is calculated as described above, and then the
+value specified with --dataalignmentoffset is added to produce the final
+pe_start value.
+.
+.SH USAGE
+.
+\fBpvcreate\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
+.br
+[ \fB-u\fP|\fB--uuid\fP \fIString\fP ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--dataalignment\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--dataalignmentoffset\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--bootloaderareasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--labelsector\fP \fINumber\fP ]
+.br
+[ \fB--\fP[\fBpv\fP]\fBmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--metadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--metadataignore\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--norestorefile\fP ]
+.br
+[ \fB--setphysicalvolumesize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--restorefile\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--bootloaderareasize\fP \fISize\fP[m|UNIT]
+.br
+Reserve space for the bootloader between the LVM metadata area and the first PE.
+The bootloader area is reserved for bootloaders to embed their own data or
+metadata; LVM will not use it.
+The bootloader area begins where the first PE would otherwise be located.
+The first PE is moved out by the size of the bootloader area, and then moved
+out further if necessary to match the data alignment.
+The start of the bootloader area is always aligned, see also --dataalignment
+and --dataalignmentoffset. The bootloader area may be larger than requested
+due to the alignment, but it's never less than the requested size.
+To see the bootloader area start and size of
+an existing PV use pvs -o +pv_ba_start,pv_ba_size.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--dataalignment\fP \fISize\fP[k|UNIT]
+.br
+Align the start of a PV data area with a multiple of this number.
+To see the location of the first Physical Extent (PE) of an existing PV,
+use pvs -o +pe_start. In addition, it may be shifted by an alignment offset,
+see --dataalignmentoffset.
+Also specify an appropriate PE size when creating a VG.
+.
+.HP
+\fB--dataalignmentoffset\fP \fISize\fP[k|UNIT]
+.br
+Shift the start of the PV data area by this additional offset.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--labelsector\fP \fINumber\fP
+.br
+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.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--metadataignore\fP \fBy\fP|\fBn\fP
+.br
+Specifies the metadataignore property of a PV.
+If yes, metadata areas on the PV are ignored, and lvm will
+not store metadata in the metadata areas of the PV.
+If no, lvm will store metadata on the PV.
+.
+.HP
+\fB--metadatasize\fP \fISize\fP[m|UNIT]
+.br
+The approximate amount of space used for each VG metadata area.
+The size may be rounded.
+.
+.HP
+\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
+.br
+Specifies the type of on-disk metadata to use.
+\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
+\fBlvm1\fP (or just \fB1\fP) is no longer used.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--norestorefile\fP
+.br
+In conjunction with --uuid, this allows a uuid to be specified
+without also requiring that a backup of the metadata be provided.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB--\fP[\fBpv\fP]\fBmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
+.br
+The number of metadata areas to set aside on a PV for storing VG metadata.
+When 2, one copy of the VG metadata is stored at the front of the PV
+and a second copy is stored at the end.
+When 1, one copy of the VG metadata is stored at the front of the PV.
+When 0, no copies of the VG metadata are stored on the given PV.
+This may be useful in VGs containing many PVs (this places limitations
+on the ability to use vgsplit later.)
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB--restorefile\fP \fIString\fP
+.br
+In conjunction with --uuid, this reads the file (produced by
+vgcfgbackup), extracts the location and size of the data on the PV,
+and ensures that the metadata produced by the program is consistent
+with the contents of the file, i.e. the physical extents will be in
+the same place and not be overwritten by new metadata. This provides
+a mechanism to upgrade the metadata format or to add/remove metadata
+areas. Use with care.
+.
+.HP
+\fB--setphysicalvolumesize\fP \fISize\fP[m|UNIT]
+.br
+Overrides the automatically detected size of the PV.
+Use with care, or prior to reducing the physical size of the device.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-u\fP|\fB--uuid\fP \fIString\fP
+.br
+Specify a UUID for the device.
+Without this option, a random UUID is generated.
+This option is needed before restoring a backup of LVM metadata
+onto a replacement device; see \fBvgcfgrestore\fP(8). As such, use of
+--restorefile is compulsory unless the --norestorefile is used.
+All PVs must have unique UUIDs, and LVM will prevent certain operations
+if multiple devices are seen with the same UUID.
+See \fBvgimportclone\fP(8) for more information.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.HP
+\fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
+.br
+Controls if the first 4 sectors (2048 bytes) of the device are wiped.
+The default is to wipe these sectors unless either or both of
+--restorefile or --uuid are specified.
+.
+.SH VARIABLES
+.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/pvdisplay.8.in b/man/pvdisplay.8.in
deleted file mode 100644
index 342c45b..0000000
--- a/man/pvdisplay.8.in
+++ /dev/null
@@ -1,94 +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 [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-maps ]
-.RB [ \-\-nosuffix ]
-.RB [ \-s | \-\-short ]
-.RB [ \-\-units
-.IR hsbkmgtHKMGT ]
-.RB [ \-v [ v ]| \-\-verbose
-.RB [ \-\-verbose ]]
-.RB [ \-\-version ]
-.RI [ PhysicalVolumePath
-.RI [ PhysicalVolumePath ...]]
-.br
-
-.br
-.B pvdisplay
-.BR \-\-columns | \-C
-.RB [ \-\-aligned ]
-.RB [ \-a | \-\-all ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-o | \-\-options
-.RI [ + ] Field [ ,Field ...]]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [ , [ + | \- ] Key2 ...
-.RI ]]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-v [ v ]| \-\-verbose
-.RB [ \-\-verbose ]]
-.RB [ \-\-version ]
-.RI [ PhysicalVolumePath
-.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 for common options and \fBpvs\fP for options given with
-\fB\-\-columns\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:
-
-* physical volume device name
-* volume group name
-* physical volume size in kilobytes
-* internal physical volume number (obsolete)
-* physical volume status
-* physical volume (not) allocatable
-* current number of logical volumes on this physical volume
-* physical extent size in kilobytes
-* total number of physical extents
-* free number of physical extents
-* 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.
-.TP
-.BR \-\-columns ", " \-C
-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.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvcreate (8),
-.BR lvcreate (8),
-.BR vgcreate (8)
diff --git a/man/pvdisplay.8_des b/man/pvdisplay.8_des
new file mode 100644
index 0000000..68fe4a8
--- /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.
+.P
+\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_end b/man/pvdisplay.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/pvdisplay.8_end
diff --git a/man/pvdisplay.8_pregen b/man/pvdisplay.8_pregen
new file mode 100644
index 0000000..92dda93
--- /dev/null
+++ b/man/pvdisplay.8_pregen
@@ -0,0 +1,465 @@
+.TH PVDISPLAY 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+pvdisplay \(em Display various attributes of physical volume(s)
+.
+.SH SYNOPSIS
+.
+\fBpvdisplay\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+pvdisplay shows the attributes of PVs, like size, physical extent size,
+space used for the VG descriptor area, etc.
+.P
+\fBpvs\fP(8) is a preferred alternative that shows the same information
+and more, using a more compact and configurable output format.
+.
+.SH USAGE
+.
+\fBpvdisplay\fP
+.br
+.RS 4
+.ad l
+[ \fB-a\fP|\fB--all\fP ]
+.br
+[ \fB-c\fP|\fB--colon\fP ]
+.br
+[ \fB-C\fP|\fB--columns\fP ]
+.br
+[ \fB-m\fP|\fB--maps\fP ]
+.br
+[ \fB-o\fP|\fB--options\fP \fIString\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-s\fP|\fB--short\fP ]
+.br
+[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
+.br
+[ \fB--aligned\fP ]
+.br
+[ \fB--binary\fP ]
+.br
+[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
+.br
+[ \fB--foreign\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--logonly\fP ]
+.br
+[ \fB--noheadings\fP ]
+.br
+[ \fB--nosuffix\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--separator\fP \fIString\fP ]
+.br
+[ \fB--shared\fP ]
+.br
+[ \fB--unbuffered\fP ]
+.br
+[ \fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP|\fITag\fP ... ]
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--aligned\fP
+.br
+Use with --separator to align the output columns
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+Show information about devices that have not been initialized
+by LVM, i.e. they are not PVs.
+.
+.HP
+\fB--binary\fP
+.br
+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).
+.
+.HP
+\fB-c\fP|\fB--colon\fP
+.br
+Generate colon separated output for easier parsing in scripts or programs.
+Also see \fBvgs\fP(8) which provides considerably more control over the output.
+.
+.HP
+\fB-C\fP|\fB--columns\fP
+.br
+Display output in columns, the equivalent of \fBvgs\fP(8).
+Options listed are the same as options given in \fBvgs\fP(8).
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
+.br
+See \fBlvmreport\fP(7).
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--foreign\fP
+.br
+Report/display foreign VGs that would otherwise be skipped.
+See \fBlvmsystemid\fP(7) for more information about foreign VGs.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--logonly\fP
+.br
+Suppress command report and display only log report.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-m\fP|\fB--maps\fP
+.br
+Display the mapping of physical extents to LVs and logical extents.
+.
+.HP
+\fB--noheadings\fP
+.br
+Suppress the headings line that is normally the first line of output.
+Useful if grepping the output.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--nosuffix\fP
+.br
+Suppress the suffix on output sizes. Use with --units
+(except h and H) if processing the output.
+.
+.HP
+\fB-o\fP|\fB--options\fP \fIString\fP
+.br
+Comma-separated, ordered list of fields to display in columns.
+String arg syntax is: [\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
+The prefix \fB+\fP will append the specified fields to the default fields,
+\fB-\fP will remove the specified fields from the default fields, and
+\fB#\fP will compact specified fields (removing them when empty for all rows.)
+Use \fB-o help\fP to view the list of all available fields.
+Use separate lists of fields to add, remove or compact by repeating the -o option:
+-o+field1,field2 -o-field3,field4 -o#field5.
+These lists are evaluated from left to right.
+Use field name \fBlv_all\fP to view all LV fields,
+\fBvg_all\fP all VG fields,
+\fBpv_all\fP all PV fields,
+\fBpvseg_all\fP all PV segment fields,
+\fBseg_all\fP all LV segment fields, and
+\fBpvseg_all\fP all PV segment columns.
+See the \fBlvm.conf\fP(5) report section for more config options.
+See \fBlvmreport\fP(7) for more information about reporting.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB--separator\fP \fIString\fP
+.br
+String to use to separate each column. Useful if grepping the output.
+.
+.HP
+\fB--shared\fP
+.br
+Report/display shared VGs that would otherwise be skipped when
+lvmlockd is not being used on the host.
+See \fBlvmlockd\fP(8) for more information about shared VGs.
+.
+.HP
+\fB-s\fP|\fB--short\fP
+.br
+Only display the size of the given PVs.
+.
+.HP
+\fB-O\fP|\fB--sort\fP \fIString\fP
+.br
+Comma-separated ordered list of columns to sort by. Replaces the default
+selection. Precede any column with \fB-\fP for a reverse sort on that column.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--unbuffered\fP
+.br
+Produce output immediately without sorting or aligning the columns properly.
+.
+.HP
+.ad l
+\fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+.ad b
+.br
+All sizes are output in these units:
+human-(r)eadable with '<' rounding indicator,
+(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.
+Custom units can be specified, e.g. --units 3M.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/pvmove.8.in b/man/pvmove.8.in
deleted file mode 100644
index de20abb..0000000
--- a/man/pvmove.8.in
+++ /dev/null
@@ -1,152 +0,0 @@
-.TH PVMOVE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvmove \- move physical extents
-.SH SYNOPSIS
-.B pvmove
-.RB [ \-\-abort ]
-.RB [ \-\-alloc
-.IR AllocationPolicy ]
-.RB [ \-b | \-\-background ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-i | \-\-interval
-.IR Seconds ]
-.RB [ \-\-noudevsync ]
-.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 them
-at the last checkpoint.
-
-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).
-
-N.B. The moving of mirrors, snapshots and their origins is not yet supported.
-
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.B \-\-abort
-Abort any moves in progress.
-.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
-Any mirrors, snapshots and their origins are left unchanged.
-.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
-To move a range of Physical Extents to a specific location (which must have
-sufficent 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/pvmove.8_des b/man/pvmove.8_des
new file mode 100644
index 0000000..d32a68b
--- /dev/null
+++ b/man/pvmove.8_des
@@ -0,0 +1,15 @@
+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.
+.P
+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.
+.P
+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.
diff --git a/man/pvmove.8_end b/man/pvmove.8_end
new file mode 100644
index 0000000..02f746b
--- /dev/null
+++ b/man/pvmove.8_end
@@ -0,0 +1,93 @@
+.
+.SH NOTES
+.
+pvmove works as follows:
+.P
+1. A temporary 'pvmove' LV is created to store details of all the data
+movements required.
+.P
+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.
+.P
+3. The VG metadata is updated on disk.
+.P
+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.
+.P
+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.
+.P
+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.
+.P
+Note that this new process cannot support the original LVM1
+type of on-disk metadata. Metadata can be converted using
+\fBvgconvert\fP(8).
+.P
+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
+free physical extents elsewhere in the VG.
+.br
+.B pvmove /dev/sdb1
+.P
+Use a specific destination PV when moving physical extents.
+.br
+.B pvmove /dev/sdb1 /dev/sdc1
+.P
+Move extents belonging to a single LV.
+.br
+.B pvmove -n lvol1 /dev/sdb1 /dev/sdc1
+.P
+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
+.P
+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
+.P
+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
+.P
+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
+.P
+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
+.P
+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_pregen b/man/pvmove.8_pregen
new file mode 100644
index 0000000..b3d9c8a
--- /dev/null
+++ b/man/pvmove.8_pregen
@@ -0,0 +1,380 @@
+.TH PVMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+pvmove \(em Move extents from one physical volume to another
+.
+.SH SYNOPSIS
+.
+\fBpvmove\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+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.
+.P
+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.
+.P
+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.
+.
+.SH USAGE
+.
+Move PV extents.
+.br
+.P
+\fBpvmove\fP \fIPV\fP
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-n\fP|\fB--name\fP \fILV\fP ]
+.br
+[ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+]
+.br
+[ \fB--atomic\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+.P
+Continue or abort existing pvmove operations.
+.br
+.P
+\fBpvmove\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-b\fP|\fB--background\fP ]
+.br
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.br
+[ \fB--abort\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--abort\fP
+.br
+Abort any pvmove operations in progress. If a pvmove was started
+with the --atomic option, then all LVs will remain on the source PV.
+Otherwise, segments that have been moved will remain on the
+destination PV, while unmoved segments will remain on the source PV.
+.
+.HP
+.ad l
+\fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.ad b
+.br
+Determines the allocation policy when a command needs to allocate
+Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
+which can be changed with vgchange/lvchange, or overridden on the
+command line.
+\fBnormal\fP applies common sense rules such as not placing parallel stripes
+on the same PV.
+\fBinherit\fP applies the VG policy to an LV.
+\fBcontiguous\fP requires new PEs be placed adjacent to existing PEs.
+\fBcling\fP places new PEs on the same PV as existing PEs in the same
+stripe of the LV.
+If there are sufficient PEs for an allocation, but normal does not
+use them, \fBanywhere\fP will use them even if it reduces performance,
+e.g. by placing two stripes on the same PV.
+Optional positional PV args on the command line can also be used to limit
+which PVs the command will use for allocation.
+See \fBlvm\fP(8) for more information about allocation.
+.
+.HP
+\fB--atomic\fP
+.br
+Makes a pvmove operation atomic, ensuring that all affected LVs are
+moved to the destination PV, or none are if the operation is aborted.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB-b\fP|\fB--background\fP
+.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
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB-i\fP|\fB--interval\fP \fINumber\fP
+.br
+Report progress at regular intervals.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-n\fP|\fB--name\fP \fIString\fP
+.br
+Move only the extents belonging to the named LV.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/pvremove.8.in b/man/pvremove.8.in
deleted file mode 100644
index 5029228..0000000
--- a/man/pvremove.8.in
+++ /dev/null
@@ -1,33 +0,0 @@
-.TH PVREMOVE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvremove \- remove a physical volume
-.SH SYNOPSIS
-.B pvremove
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-f [ f ]| \-\-force
-.RB [ \-\-force ]]
-.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/pvremove.8_des b/man/pvremove.8_des
new file mode 100644
index 0000000..01c75f1
--- /dev/null
+++ b/man/pvremove.8_des
@@ -0,0 +1,7 @@
+pvremove wipes the label on a device so that LVM will no longer recognise
+it as a PV.
+.P
+A PV cannot be removed from a VG while it is used by an active LV.
+.P
+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/pvremove.8_end b/man/pvremove.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/pvremove.8_end
diff --git a/man/pvremove.8_pregen b/man/pvremove.8_pregen
new file mode 100644
index 0000000..0d48021
--- /dev/null
+++ b/man/pvremove.8_pregen
@@ -0,0 +1,265 @@
+.TH PVREMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+pvremove \(em Remove LVM label(s) from physical volume(s)
+.
+.SH SYNOPSIS
+.
+\fBpvremove\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+pvremove wipes the label on a device so that LVM will no longer recognise
+it as a PV.
+.P
+A PV cannot be removed from a VG while it is used by an active LV.
+.P
+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.
+.
+.SH USAGE
+.
+\fBpvremove\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/pvresize.8.in b/man/pvresize.8.in
deleted file mode 100644
index 59539b8..0000000
--- a/man/pvresize.8.in
+++ /dev/null
@@ -1,53 +0,0 @@
-.TH PVRESIZE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvresize \- resize a disk or partition in use by LVM2
-.SH SYNOPSIS
-.B pvresize
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.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 or PVs with extra
-metadata areas.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvmove (8),
-.BR lvresize (8),
-.BR fdisk (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..4831716
--- /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
+.P
+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_pregen b/man/pvresize.8_pregen
new file mode 100644
index 0000000..fda57a2
--- /dev/null
+++ b/man/pvresize.8_pregen
@@ -0,0 +1,260 @@
+.TH PVRESIZE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+pvresize \(em Resize physical volume(s)
+.
+.SH SYNOPSIS
+.
+\fBpvresize\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+pvresize resizes a PV. The PV may already be in a VG and may have active
+LVs allocated on it.
+.
+.SH USAGE
+.
+\fBpvresize\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ \fB--setphysicalvolumesize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB--setphysicalvolumesize\fP \fISize\fP[m|UNIT]
+.br
+Overrides the automatically detected size of the PV.
+Use with care, or prior to reducing the physical size of the device.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/pvs.8.in b/man/pvs.8.in
deleted file mode 100644
index 4bdfa12..0000000
--- a/man/pvs.8.in
+++ /dev/null
@@ -1,106 +0,0 @@
-.TH PVS 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvs \- report information about physical volumes
-.SH SYNOPSIS
-.B pvs
-.RB [ \-a | \-\-all ]
-.RB [ \-\-aligned ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-nameprefixes ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-o | \-\-options
-.RI [ + ] Field [ ,Field ...]]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [ , [ + | \- ] Key2 ...]]
-.RB [ \-P | \-\-partial ]
-.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 \-\-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. Precede the list with '\fI+\fP'
-to append to the default selection of columns.
-.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, 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 and (m)issing.
-.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 \-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/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..3ba3d39
--- /dev/null
+++ b/man/pvs.8_end
@@ -0,0 +1,10 @@
+.
+.SH NOTES
+.
+The pv_attr bits are:
+.IP 1 3
+(\fBd\fP)uplicate, (\fBa\fP)llocatable, (\fBu\fP)sed
+.IP 2 3
+e(\fBx\fP)ported
+.IP 3 3
+(\fBm\fP)issing
diff --git a/man/pvs.8_pregen b/man/pvs.8_pregen
new file mode 100644
index 0000000..d08e928
--- /dev/null
+++ b/man/pvs.8_pregen
@@ -0,0 +1,464 @@
+.TH PVS 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+pvs \(em Display information about physical volumes
+.
+.SH SYNOPSIS
+.
+\fBpvs\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+pvs produces formatted output about PVs.
+.
+.SH USAGE
+.
+\fBpvs\fP
+.br
+.RS 4
+.ad l
+[ \fB-a\fP|\fB--all\fP ]
+.br
+[ \fB-o\fP|\fB--options\fP \fIString\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
+.br
+[ \fB--segments\fP ]
+.br
+[ \fB--aligned\fP ]
+.br
+[ \fB--binary\fP ]
+.br
+[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
+.br
+[ \fB--foreign\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--logonly\fP ]
+.br
+[ \fB--nameprefixes\fP ]
+.br
+[ \fB--noheadings\fP ]
+.br
+[ \fB--nosuffix\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--rows\fP ]
+.br
+[ \fB--separator\fP \fIString\fP ]
+.br
+[ \fB--shared\fP ]
+.br
+[ \fB--unbuffered\fP ]
+.br
+[ \fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+]
+.br
+[ \fB--unquoted\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIPV\fP|\fITag\fP ... ]
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--aligned\fP
+.br
+Use with --separator to align the output columns
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+Show information about devices that have not been initialized
+by LVM, i.e. they are not PVs.
+.
+.HP
+\fB--binary\fP
+.br
+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).
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
+.br
+See \fBlvmreport\fP(7).
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--foreign\fP
+.br
+Report/display foreign VGs that would otherwise be skipped.
+See \fBlvmsystemid\fP(7) for more information about foreign VGs.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--logonly\fP
+.br
+Suppress command report and display only log report.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nameprefixes\fP
+.br
+Add an "LVM2_" prefix plus the field name to the output. Useful
+with --noheadings to produce a list of field=value pairs that can
+be used to set environment variables (for example, in udev rules).
+.
+.HP
+\fB--noheadings\fP
+.br
+Suppress the headings line that is normally the first line of output.
+Useful if grepping the output.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--nosuffix\fP
+.br
+Suppress the suffix on output sizes. Use with --units
+(except h and H) if processing the output.
+.
+.HP
+\fB-o\fP|\fB--options\fP \fIString\fP
+.br
+Comma-separated, ordered list of fields to display in columns.
+String arg syntax is: [\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
+The prefix \fB+\fP will append the specified fields to the default fields,
+\fB-\fP will remove the specified fields from the default fields, and
+\fB#\fP will compact specified fields (removing them when empty for all rows.)
+Use \fB-o help\fP to view the list of all available fields.
+Use separate lists of fields to add, remove or compact by repeating the -o option:
+-o+field1,field2 -o-field3,field4 -o#field5.
+These lists are evaluated from left to right.
+Use field name \fBlv_all\fP to view all LV fields,
+\fBvg_all\fP all VG fields,
+\fBpv_all\fP all PV fields,
+\fBpvseg_all\fP all PV segment fields,
+\fBseg_all\fP all LV segment fields, and
+\fBpvseg_all\fP all PV segment columns.
+See the \fBlvm.conf\fP(5) report section for more config options.
+See \fBlvmreport\fP(7) for more information about reporting.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB--rows\fP
+.br
+Output columns as rows.
+.
+.HP
+\fB--segments\fP
+.br
+Produces one line of output for each contiguous allocation of space on each
+PV, showing the start (pvseg_start) and length (pvseg_size) in units of
+physical extents.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB--separator\fP \fIString\fP
+.br
+String to use to separate each column. Useful if grepping the output.
+.
+.HP
+\fB--shared\fP
+.br
+Report/display shared VGs that would otherwise be skipped when
+lvmlockd is not being used on the host.
+See \fBlvmlockd\fP(8) for more information about shared VGs.
+.
+.HP
+\fB-O\fP|\fB--sort\fP \fIString\fP
+.br
+Comma-separated ordered list of columns to sort by. Replaces the default
+selection. Precede any column with \fB-\fP for a reverse sort on that column.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--unbuffered\fP
+.br
+Produce output immediately without sorting or aligning the columns properly.
+.
+.HP
+.ad l
+\fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+.ad b
+.br
+All sizes are output in these units:
+human-(r)eadable with '<' rounding indicator,
+(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.
+Custom units can be specified, e.g. --units 3M.
+.
+.HP
+\fB--unquoted\fP
+.br
+When used with --nameprefixes, output values in the field=value
+pairs are not quoted.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/pvscan.8.in b/man/pvscan.8.in
deleted file mode 100644
index 1be3109..0000000
--- a/man/pvscan.8.in
+++ /dev/null
@@ -1,61 +0,0 @@
-.TH PVSCAN 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-pvscan \- scan all disks for physical volumes
-.SH SYNOPSIS
-.B pvscan
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-e | \-\-exported ]
-.RB [ \-n | \-\-novolumegroup ]
-.RB [ \-s | \-\-short ]
-.RB [ \-u | \-\-uuid ]
-.BR
-
-.B pvscan
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.B \-\-cache
-.RB [ \-a | \-\-activate " " \fIay ]
-.RB [ \-\-major
-.I major
-.B \-\-minor
-.I minor
-|
-.IR DevicePath ]...
-.SH DESCRIPTION
-pvscan scans all supported LVM block devices in the system for
-physical volumes.
-.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 (Uniform Unique Identifiers) in addition to device special names.
-.TP
-.BR \-a ", " \-\-activate " " \fIay
-Together with the information already cached in lvmetad, automatically activate
-any logical volumes that become activatable after the scan done on one or more devices.
-The logical volume to autoactivate is matched against the
-activation/auto_activation_volume_list set in lvm.conf. Autoactivation is not yet
-supported on logical volumes that are part of partial or clustered volume groups.
-.TP
-.BR \-\-cache " [" \-\-major " " \fImajor " " \-\-minor " " \fIminor " | " \fIDevicePath " ]..."
-Scan one or more devices and instruct the lvmetad daemon to update its cached
-state accordingly. Called internally by udev rules.
-All devices listed explicitly are processed \fBregardless\fP of any device
-filters set in lvm.conf.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvcreate (8),
-.BR pvdisplay (8)
diff --git a/man/pvscan.8_des b/man/pvscan.8_des
new file mode 100644
index 0000000..4c59299
--- /dev/null
+++ b/man/pvscan.8_des
@@ -0,0 +1,50 @@
+When called without the --cache option, pvscan lists PVs on the system,
+like
+.BR pvs (8)
+or
+.BR pvdisplay (8).
+.P
+When --cache is used, pvscan updates runtime lvm state on the system, or
+with -aay performs autoactivation.
+.P
+.B pvscan --cache
+.I device
+.P
+If device is present, lvm records that the PV on device is online.
+If device is not present, lvm removes the online record for the PV.
+pvscan only reads the named device.
+.P
+.B pvscan --cache
+.P
+Updates the runtime state for all lvm devices.
+.P
+.B pvscan --cache -aay
+.I device
+.P
+Performs the --cache steps for the device, then checks if the VG using the
+device is complete. If so, LVs in the VG are autoactivated, the same as
+vgchange -aay vgname would do. (A device name may be replaced with major
+and minor numbers.)
+.P
+.B pvscan --cache -aay
+.P
+Performs the --cache steps for all devices, then autoactivates any complete VGs.
+.P
+.B pvscan --cache --listvg|--listlvs
+.I device
+.P
+Performs the --cache steps for the device, then prints the name of the VG
+using the device, or the names of LVs using the device. --checkcomplete
+is usually included to check if all PVs for the VG or LVs are online.
+When this command is called by a udev rule, the output must conform to
+udev rule specifications (see --udevoutput.) The udev rule will use the
+results to perform autoactivation.
+.P
+Autoactivation of VGs or LVs can be enabled/disabled using vgchange or
+lvchange with --setautoactivation y|n, or by adding names to
+.BR lvm.conf (5)
+.B activation/auto_activation_volume_list
+.P
+See
+.BR lvmautoactivation (7)
+for more information about how pvscan is used for autoactivation.
diff --git a/man/pvscan.8_end b/man/pvscan.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/pvscan.8_end
diff --git a/man/pvscan.8_pregen b/man/pvscan.8_pregen
new file mode 100644
index 0000000..1809b5a
--- /dev/null
+++ b/man/pvscan.8_pregen
@@ -0,0 +1,604 @@
+.TH PVSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+pvscan \(em List all physical volumes
+.
+.SH SYNOPSIS
+.
+\fBpvscan\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.P
+.ad l
+ \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
+.br
+ \fB--autoactivation\fP \fIString\fP
+.br
+ \fB--cache\fP
+.br
+ \fB--checkcomplete\fP
+.br
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB-e\fP|\fB--exported\fP
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB--ignorelockingfailure\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB--listlvs\fP
+.br
+ \fB--listvg\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB-j\fP|\fB--major\fP \fINumber\fP
+.br
+ \fB--minor\fP \fINumber\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--noudevsync\fP
+.br
+ \fB-n\fP|\fB--novolumegroup\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+ \fB-s\fP|\fB--short\fP
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB--udevoutput\fP
+.br
+ \fB-u\fP|\fB--uuid\fP
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB--vgonline\fP
+.br
+ \fB-y\fP|\fB--yes\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+When called without the --cache option, pvscan lists PVs on the system,
+like
+.BR pvs (8)
+or
+.BR pvdisplay (8).
+.P
+When --cache is used, pvscan updates runtime lvm state on the system, or
+with -aay performs autoactivation.
+.P
+.B pvscan --cache
+.I device
+.P
+If device is present, lvm records that the PV on device is online.
+If device is not present, lvm removes the online record for the PV.
+pvscan only reads the named device.
+.P
+.B pvscan --cache
+.P
+Updates the runtime state for all lvm devices.
+.P
+.B pvscan --cache -aay
+.I device
+.P
+Performs the --cache steps for the device, then checks if the VG using the
+device is complete. If so, LVs in the VG are autoactivated, the same as
+vgchange -aay vgname would do. (A device name may be replaced with major
+and minor numbers.)
+.P
+.B pvscan --cache -aay
+.P
+Performs the --cache steps for all devices, then autoactivates any complete VGs.
+.P
+.B pvscan --cache --listvg|--listlvs
+.I device
+.P
+Performs the --cache steps for the device, then prints the name of the VG
+using the device, or the names of LVs using the device. --checkcomplete
+is usually included to check if all PVs for the VG or LVs are online.
+When this command is called by a udev rule, the output must conform to
+udev rule specifications (see --udevoutput.) The udev rule will use the
+results to perform autoactivation.
+.P
+Autoactivation of VGs or LVs can be enabled/disabled using vgchange or
+lvchange with --setautoactivation y|n, or by adding names to
+.BR lvm.conf (5)
+.B activation/auto_activation_volume_list
+.P
+See
+.BR lvmautoactivation (7)
+for more information about how pvscan is used for autoactivation.
+.
+.SH USAGE
+.
+Display PV information.
+.br
+.P
+\fBpvscan\fP
+.br
+.RS 4
+.ad l
+[ \fB-e\fP|\fB--exported\fP ]
+.br
+[ \fB-n\fP|\fB--novolumegroup\fP ]
+.br
+[ \fB-s\fP|\fB--short\fP ]
+.br
+[ \fB-u\fP|\fB--uuid\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Record that a PV is online or offline.
+.br
+.P
+\fBpvscan\fP \fB--cache\fP
+.br
+.RS 4
+.ad l
+[ \fB-j\fP|\fB--major\fP \fINumber\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--minor\fP \fINumber\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIString\fP|\fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Record that a PV is online and autoactivate the VG if complete.
+.br
+.P
+\fBpvscan\fP \fB--cache\fP \fB-a\fP|\fB--activate\fP \fBay\fP
+.br
+.RS 4
+.ad l
+[ \fB-j\fP|\fB--major\fP \fINumber\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--minor\fP \fINumber\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--autoactivation\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIString\fP|\fIPV\fP ... ]
+.RE
+.P
+\(em
+.P
+Record that a PV is online and list the VG using the PV.
+.br
+.P
+\fBpvscan\fP \fB--cache\fP \fB--listvg\fP \fIPV\fP
+.br
+.RS 4
+.ad l
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--checkcomplete\fP ]
+.br
+[ \fB--vgonline\fP ]
+.br
+[ \fB--udevoutput\fP ]
+.br
+[ \fB--autoactivation\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Record that a PV is online and list LVs using the PV.
+.br
+.P
+\fBpvscan\fP \fB--cache\fP \fB--listlvs\fP \fIPV\fP
+.br
+.RS 4
+.ad l
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--checkcomplete\fP ]
+.br
+[ \fB--vgonline\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+List LVs using the PV.
+.br
+.P
+\fBpvscan\fP \fB--listlvs\fP \fIPV\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+List the VG using the PV.
+.br
+.P
+\fBpvscan\fP \fB--listvg\fP \fIPV\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
+.br
+Auto-activate LVs in a VG when the PVs scanned have completed the VG.
+(Only \fBay\fP is applicable.)
+.
+.HP
+\fB--autoactivation\fP \fIString\fP
+.br
+Specify if autoactivation is being used from an event.
+This allows the command to apply settings that are specific
+to event activation, such as device scanning optimizations
+using pvs_online files created by event-based pvscans.
+.
+.HP
+\fB--cache\fP
+.br
+Scan one or more devices and record that they are online.
+.
+.HP
+\fB--checkcomplete\fP
+.br
+Check if all the devices used by a VG or LV are present,
+and print "complete" or "incomplete" for each listed
+VG or LV. This option is used as a part of event-based
+autoactivation, so pvscan will do nothing if this option
+is set and event_activation=0 in the config settings.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-e\fP|\fB--exported\fP
+.br
+Only show PVs belonging to exported VGs.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--listlvs\fP
+.br
+Print a list of LVs that use the device.
+.
+.HP
+\fB--listvg\fP
+.br
+Print the VG that uses the device.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-j\fP|\fB--major\fP \fINumber\fP
+.br
+The major number of a device.
+.
+.HP
+\fB--minor\fP \fINumber\fP
+.br
+The minor number of a device.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB-n\fP|\fB--novolumegroup\fP
+.br
+Only show PVs not belonging to any VG.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-s\fP|\fB--short\fP
+.br
+Short listing format.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--udevoutput\fP
+.br
+Command output is modified to be imported from a udev rule.
+.
+.HP
+\fB-u\fP|\fB--uuid\fP
+.br
+Show UUIDs in addition to device names.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB--vgonline\fP
+.br
+The first command to see a complete VG will report it uniquely.
+Other commands to see the complete VG will report it differently.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/see_also.end b/man/see_also.end
new file mode 100644
index 0000000..723089f
--- /dev/null
+++ b/man/see_also.end
@@ -0,0 +1,74 @@
+.
+.SH SEE ALSO
+.
+.nh
+.ad l
+.BR lvm (8),
+.BR lvm.conf (5),
+.BR lvmconfig (8),
+.BR lvmdevices (8),
+.P
+.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),
+.P
+.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 vgimportdevices (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),
+.P
+.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),
+.P
+.BR lvm-fullreport (8),
+.BR lvm-lvpoll (8),
+.BR blkdeactivate (8),
+.BR lvmdump (8),
+.P
+.BR dmeventd (8),
+.BR lvmpolld (8),
+.BR lvmlockd (8),
+.BR lvmlockctl (8),
+.BR cmirrord (8),
+.BR lvmdbusd (8),
+.BR fsadm (8),
+.P
+.BR lvmsystemid (7),
+.BR lvmreport (7),
+.BR lvmcache (7),
+.BR lvmraid (7),
+.BR lvmthin (7),
+.BR lvmvdo (7),
+.BR lvmautoactivation (7)
+
diff --git a/man/vgcfgbackup.8.in b/man/vgcfgbackup.8.in
deleted file mode 100644
index ce8db8b..0000000
--- a/man/vgcfgbackup.8.in
+++ /dev/null
@@ -1,31 +0,0 @@
-.TH VGCFGBACKUP 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgcfgbackup \- backup volume group descriptor area
-.SH SYNOPSIS
-.B vgcfgbackup
-.RB [ \-d | \-\-debug ]
-.RB [ \-f | \-\-file
-.RI < filename >]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-P | \-\-partial ]
-.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 #DEFAULT_BACKUP_DIR#.
-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 #DEFAULT_SYS_DIR# regularly too.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgcfgrestore (8)
diff --git a/man/vgcfgbackup.8_des b/man/vgcfgbackup.8_des
new file mode 100644
index 0000000..801b506
--- /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.
+.P
+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.
+.P
+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.
+.P
+NB. This DOES NOT back up the data content of LVs.
+.P
+It may also be useful to regularly back up the files in
+\fI#DEFAULT_SYS_DIR#\fP.
diff --git a/man/vgcfgbackup.8_end b/man/vgcfgbackup.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgcfgbackup.8_end
diff --git a/man/vgcfgbackup.8_pregen b/man/vgcfgbackup.8_pregen
new file mode 100644
index 0000000..62707ed
--- /dev/null
+++ b/man/vgcfgbackup.8_pregen
@@ -0,0 +1,302 @@
+.TH VGCFGBACKUP 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgcfgbackup \(em Backup volume group configuration(s)
+.
+.SH SYNOPSIS
+.
+\fBvgcfgbackup\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+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.
+.P
+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.
+.P
+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.
+.P
+NB. This DOES NOT back up the data content of LVs.
+.P
+It may also be useful to regularly back up the files in
+\fI#DEFAULT_SYS_DIR#\fP.
+.
+.SH USAGE
+.
+\fBvgcfgbackup\fP
+.br
+.RS 4
+.ad l
+[ \fB-f\fP|\fB--file\fP \fIString\fP ]
+.br
+[ \fB--foreign\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP ... ]
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--file\fP \fIString\fP
+.br
+Write the backup to the named file.
+When backing up more than one VG, the file name is
+treated as a template, and %s is replaced by the VG name.
+.
+.HP
+\fB--foreign\fP
+.br
+Report/display foreign VGs that would otherwise be skipped.
+See \fBlvmsystemid\fP(7) for more information about foreign VGs.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgcfgrestore.8.in b/man/vgcfgrestore.8.in
deleted file mode 100644
index 3b7b038..0000000
--- a/man/vgcfgrestore.8.in
+++ /dev/null
@@ -1,47 +0,0 @@
-.TH VGCFGRESTORE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgcfgrestore \- restore volume group descriptor area
-.SH SYNOPSIS
-.B vgcfgrestore
-.RB [ \-d | \-\-debug ]
-.RB [ \-f | \-\-file
-.RI < filename >]
-.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.
-.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/vgcfgrestore.8_des b/man/vgcfgrestore.8_des
new file mode 100644
index 0000000..10aa460
--- /dev/null
+++ b/man/vgcfgrestore.8_des
@@ -0,0 +1,11 @@
+vgcfgrestore restores the metadata of a VG from a text back up file
+produced by \fBvgcfgbackup\fP. This writes VG metadata onto the devices
+specified in back up file.
+.P
+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.
+.P
+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/vgcfgrestore.8_end b/man/vgcfgrestore.8_end
new file mode 100644
index 0000000..04e18bd
--- /dev/null
+++ b/man/vgcfgrestore.8_end
@@ -0,0 +1,10 @@
+.
+.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_pregen b/man/vgcfgrestore.8_pregen
new file mode 100644
index 0000000..76be536
--- /dev/null
+++ b/man/vgcfgrestore.8_pregen
@@ -0,0 +1,374 @@
+.TH VGCFGRESTORE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgcfgrestore \(em Restore volume group configuration
+.
+.SH SYNOPSIS
+.
+\fBvgcfgrestore\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.P
+.ad l
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB-f\fP|\fB--file\fP \fIString\fP
+.br
+ \fB--force\fP
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB-l\fP|\fB--list\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB-y\fP|\fB--yes\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+vgcfgrestore restores the metadata of a VG from a text back up file
+produced by \fBvgcfgbackup\fP. This writes VG metadata onto the devices
+specified in back up file.
+.P
+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.
+.P
+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.
+.
+.SH USAGE
+.
+Restore VG metadata from last backup.
+.br
+.P
+\fBvgcfgrestore\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Restore VG metadata from specified file.
+.br
+.P
+\fBvgcfgrestore\fP \fB-f\fP|\fB--file\fP \fIString\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+List all VG metadata backups.
+.br
+.P
+\fBvgcfgrestore\fP \fB-l\fP|\fB--list\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+List one VG metadata backup file.
+.br
+.P
+\fBvgcfgrestore\fP \fB-l\fP|\fB--list\fP \fB-f\fP|\fB--file\fP \fIString\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP ]
+.RE
+.P
+\(em
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
+.br
+[ \fB--force\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--file\fP \fIString\fP
+.br
+Read metadata backup from the named file.
+Usually this file was created by vgcfgbackup.
+.
+.HP
+\fB--force\fP ...
+.br
+Force metadata restore even with thin pool LVs.
+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.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB-l\fP|\fB--list\fP
+.br
+List metadata backup and archive files pertaining to the VG.
+May be used with --file. Does not restore the VG.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
+.br
+Specifies the type of on-disk metadata to use.
+\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
+\fBlvm1\fP (or just \fB1\fP) is no longer used.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgchange.8.in b/man/vgchange.8.in
deleted file mode 100644
index 0f5fc58..0000000
--- a/man/vgchange.8.in
+++ /dev/null
@@ -1,213 +0,0 @@
-.TH VGCHANGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgchange \- 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 | l ]
-.RI { y | n }]
-.RB [ \-\-monitor
-.RI { y | n }]
-.RB [ \-\-poll
-.RI { y | n }]
-.RB [ \-c | \-\-clustered
-.RI { y | n }]
-.RB [ \-u | \-\-uuid ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-\-deltag
-.IR Tag ]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-ignoremonitoring ]
-.RB [ \-\-sysinit ]
-.RB [ \-\-noudevsync ]
-.RB [ \-l | \-\-logicalvolume
-.IR MaxLogicalVolumes ]
-.RB [ -p | \-\-maxphysicalvolumes
-.IR MaxPhysicalVolumes ]
-.RB [ \-\- [ vg ] metadatacopies ]
-.IR NumberOfCopies | unmanaged | all ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-s | \-\-physicalextentsize
-.IR PhysicalExtentSize [ bBsSkKmMgGtTpPeE ]]
-.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 | \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.
-Autoactivation is not yet supported for partial or clustered
-volume groups.
-.IP
-If clustered locking is enabled, add 'e' to activate/deactivate
-exclusively on one node or 'l' to activate/deactivate only
-on the local node.
-Logical volumes with single-host snapshots are always activated
-exclusively because they can only be used on one node at once.
-.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 \-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 \-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 \-\- [ 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.
-The default is 4 MiB and it must be at least 1 KiB and a power of 2.
-
-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 \-\-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/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..dd95d81
--- /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
+.P
+Change the maximum number of LVs for an inactive VG.
+.br
+.B vgchange -l 128 vg00
diff --git a/man/vgchange.8_pregen b/man/vgchange.8_pregen
new file mode 100644
index 0000000..47a4fa1
--- /dev/null
+++ b/man/vgchange.8_pregen
@@ -0,0 +1,951 @@
+.TH VGCHANGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgchange \(em Change volume group attributes
+.
+.SH SYNOPSIS
+.
+\fBvgchange\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.P
+.ad l
+ \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
+.br
+ \fB--activationmode\fP \fBpartial\fP|\fBdegraded\fP|\fBcomplete\fP
+.br
+ \fB--addtag\fP \fITag\fP
+.br
+ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.br
+ \fB--autoactivation\fP \fIString\fP
+.br
+ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--deltag\fP \fITag\fP
+.br
+ \fB--detachprofile\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB-f\fP|\fB--force\fP
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB-K\fP|\fB--ignoreactivationskip\fP
+.br
+ \fB--ignorelockingfailure\fP
+.br
+ \fB--ignoremonitoring\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--lockstart\fP
+.br
+ \fB--lockstop\fP
+.br
+ \fB--locktype\fP \fBsanlock\fP|\fBdlm\fP|\fBnone\fP
+.br
+ \fB-l\fP|\fB--logicalvolume\fP \fINumber\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB--majoritypvs\fP
+.br
+ \fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP
+.br
+ \fB--metadataprofile\fP \fIString\fP
+.br
+ \fB--monitor\fP \fBy\fP|\fBn\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--noudevsync\fP
+.br
+ \fB-P\fP|\fB--partial\fP
+.br
+ \fB-s\fP|\fB--physicalextentsize\fP \fISize\fP[m|UNIT]
+.br
+ \fB--poll\fP \fBy\fP|\fBn\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB--readonly\fP
+.br
+ \fB--refresh\fP
+.br
+ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+ \fB-x\fP|\fB--resizeable\fP \fBy\fP|\fBn\fP
+.br
+ \fB-S\fP|\fB--select\fP \fIString\fP
+.br
+ \fB--setautoactivation\fP \fBy\fP|\fBn\fP
+.br
+ \fB--sysinit\fP
+.br
+ \fB--systemid\fP \fIString\fP
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB-u\fP|\fB--uuid\fP
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB--\fP[\fBvg\fP]\fBmetadatacopies\fP \fBall\fP|\fBunmanaged\fP|\fINumber\fP
+.br
+ \fB-y\fP|\fB--yes\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+vgchange changes VG attributes, changes LV activation in the kernel, and
+includes other utilities for VG maintenance.
+.
+.SH USAGE
+.
+Change a general VG attribute.
+.br
+For options listed in parentheses, any one is
+.br
+required, after which the others are optional.
+.br
+.P
+\fBvgchange\fP
+.RS 4
+( \fB-l\fP|\fB--logicalvolume\fP \fINumber\fP
+.br
+ \fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP
+.br
+ \fB-u\fP|\fB--uuid\fP
+.br
+ \fB-s\fP|\fB--physicalextentsize\fP \fISize\fP[m|UNIT]
+.br
+ \fB-x\fP|\fB--resizeable\fP \fBy\fP|\fBn\fP
+.br
+ \fB--addtag\fP \fITag\fP
+.br
+ \fB--deltag\fP \fITag\fP
+.br
+ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.br
+ \fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
+.br
+ \fB--\fP[\fBvg\fP]\fBmetadatacopies\fP \fBall\fP|\fBunmanaged\fP|\fINumber\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB--detachprofile\fP
+.br
+ \fB--metadataprofile\fP \fIString\fP
+.br
+ \fB--setautoactivation\fP \fBy\fP|\fBn\fP )
+.RE
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB--poll\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--ignoremonitoring\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fITag\fP|\fISelect\fP ... ]
+.RE
+.P
+\(em
+.P
+Start or stop monitoring LVs from dmeventd.
+.br
+.P
+\fBvgchange\fP \fB--monitor\fP \fBy\fP|\fBn\fP
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB--sysinit\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--poll\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--ignoremonitoring\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fITag\fP|\fISelect\fP ... ]
+.RE
+.P
+\(em
+.P
+Start or stop processing LV conversions.
+.br
+.P
+\fBvgchange\fP \fB--poll\fP \fBy\fP|\fBn\fP
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--ignoremonitoring\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fITag\fP|\fISelect\fP ... ]
+.RE
+.P
+\(em
+.P
+Activate or deactivate LVs.
+.br
+.P
+\fBvgchange\fP \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
+.br
+.RS 4
+.ad l
+[ \fB-K\fP|\fB--ignoreactivationskip\fP ]
+.br
+[ \fB-P\fP|\fB--partial\fP ]
+.br
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB--activationmode\fP \fBpartial\fP|\fBdegraded\fP|\fBcomplete\fP ]
+.br
+[ \fB--sysinit\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--poll\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--autoactivation\fP \fIString\fP ]
+.br
+[ \fB--ignoremonitoring\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fITag\fP|\fISelect\fP ... ]
+.RE
+.P
+\(em
+.P
+Reactivate LVs using the latest metadata.
+.br
+.P
+\fBvgchange\fP \fB--refresh\fP
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB--sysinit\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--poll\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--ignoremonitoring\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fITag\fP|\fISelect\fP ... ]
+.RE
+.P
+\(em
+.P
+Change the system ID of a VG.
+.br
+.P
+\fBvgchange\fP \fB--systemid\fP \fIString\fP \fIVG\fP|\fITag\fP|\fISelect\fP
+.br
+.RS 4
+.ad l
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB--majoritypvs\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Start the lockspace of a shared VG in lvmlockd.
+.br
+.P
+\fBvgchange\fP \fB--lockstart\fP
+.br
+.RS 4
+.ad l
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fITag\fP|\fISelect\fP ... ]
+.RE
+.P
+\(em
+.P
+Stop the lockspace of a shared VG in lvmlockd.
+.br
+.P
+\fBvgchange\fP \fB--lockstop\fP
+.br
+.RS 4
+.ad l
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fITag\fP|\fISelect\fP ... ]
+.RE
+.P
+\(em
+.P
+Change the lock type for a shared VG.
+.br
+.P
+\fBvgchange\fP \fB--locktype\fP \fBsanlock\fP|\fBdlm\fP|\fBnone\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
+.br
+Change the active state of LVs.
+An active LV can be used through a block device,
+allowing data on the LV to be accessed.
+\fBy\fP makes LVs active, or available.
+\fBn\fP makes LVs inactive, or unavailable.
+The block device for the LV is added or removed from the system
+using device-mapper in the kernel.
+A symbolic link /dev/VGName/LVName pointing to the device node is also added/removed.
+All software and scripts should access the device through the 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, configuration (e.g. udev), or release version.
+\fBay\fP specifies autoactivation, which is used by system-generated
+activation commands. By default, LVs are autoactivated.
+An autoactivation property can be set on a VG or LV to disable autoactivation,
+see --setautoactivation y|n in vgchange, lvchange, vgcreate, and lvcreate.
+Display the property with vgs or lvs "-o autoactivation".
+The \fBlvm.conf\fP(5) auto_activation_volume_list includes names of VGs or LVs
+that should be autoactivated, and anything not listed is not autoactivated.
+When auto_activation_volume_list is undefined (the default), it has no effect.
+If auto_activation_volume_list is defined and empty, no LVs are autoactivated.
+Items included by auto_activation_volume_list will not be autoactivated if
+the autoactivation property has been disabled.
+See \fBlvmlockd\fP(8) for more information about activation options \fBey\fP and \fBsy\fP for shared VGs.
+.
+.HP
+\fB--activationmode\fP \fBpartial\fP|\fBdegraded\fP|\fBcomplete\fP
+.br
+Determines if LV activation is allowed when PVs are missing,
+e.g. because of a device failure.
+\fBcomplete\fP only allows LVs with no missing PVs to be activated,
+and is the most restrictive mode.
+\fBdegraded\fP allows RAID LVs with missing PVs to be activated.
+(This does not include the "mirror" type, see "raid1" instead.)
+\fBpartial\fP allows any LV with missing PVs to be activated, and
+should only be used for recovery or repair.
+For default, see \fBlvm.conf\fP(5) activation_mode.
+See \fBlvmraid\fP(7) for more information.
+.
+.HP
+\fB--addtag\fP \fITag\fP
+.br
+Adds a tag to a PV, VG or LV. This option can be repeated to add
+multiple tags at once. See \fBlvm\fP(8) for information about tags.
+.
+.HP
+.ad l
+\fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.ad b
+.br
+Determines the allocation policy when a command needs to allocate
+Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
+which can be changed with vgchange/lvchange, or overridden on the
+command line.
+\fBnormal\fP applies common sense rules such as not placing parallel stripes
+on the same PV.
+\fBinherit\fP applies the VG policy to an LV.
+\fBcontiguous\fP requires new PEs be placed adjacent to existing PEs.
+\fBcling\fP places new PEs on the same PV as existing PEs in the same
+stripe of the LV.
+If there are sufficient PEs for an allocation, but normal does not
+use them, \fBanywhere\fP will use them even if it reduces performance,
+e.g. by placing two stripes on the same PV.
+Optional positional PV args on the command line can also be used to limit
+which PVs the command will use for allocation.
+See \fBlvm\fP(8) for more information about allocation.
+.
+.HP
+\fB--autoactivation\fP \fIString\fP
+.br
+Specify if autoactivation is being used from an event.
+This allows the command to apply settings that are specific
+to event activation, such as device scanning optimizations
+using pvs_online files created by event-based pvscans.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--deltag\fP \fITag\fP
+.br
+Deletes a tag from a PV, VG or LV. This option can be repeated to delete
+multiple tags at once. See \fBlvm\fP(8) for information about tags.
+.
+.HP
+\fB--detachprofile\fP
+.br
+Detaches a metadata profile from a VG or LV.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB-K\fP|\fB--ignoreactivationskip\fP
+.br
+Ignore the "activation skip" LV flag during activation
+to allow LVs with the flag set to be activated.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--ignoremonitoring\fP
+.br
+Do not interact with dmeventd unless --monitor is specified.
+Do not use this if dmeventd is already monitoring a device.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--lockstart\fP
+.br
+Start the lockspace of a shared VG in lvmlockd.
+lvmlockd locks becomes available for the VG, allowing LVM to use the VG.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--lockstop\fP
+.br
+Stop the lockspace of a shared VG in lvmlockd.
+lvmlockd locks become unavailable for the VG, preventing LVM from using the VG.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--locktype\fP \fBsanlock\fP|\fBdlm\fP|\fBnone\fP
+.br
+Change the VG lock type to or from a shared lock type used with lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB-l\fP|\fB--logicalvolume\fP \fINumber\fP
+.br
+Sets the maximum number of LVs allowed in a VG.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--majoritypvs\fP
+.br
+Change the VG system ID if the majority of PVs in the VG
+are present (one more than half).
+.
+.HP
+\fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP
+.br
+Sets the maximum number of PVs that can belong to the VG.
+The value 0 removes any limitation.
+For large numbers of PVs, also see options --pvmetadatacopies,
+and --vgmetadatacopies for improving performance.
+.
+.HP
+\fB--metadataprofile\fP \fIString\fP
+.br
+The metadata profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--monitor\fP \fBy\fP|\fBn\fP
+.br
+Start (yes) or stop (no) monitoring an LV with dmeventd.
+dmeventd monitors kernel events for an LV, and performs
+automated maintenance for the LV in response to specific events.
+See \fBdmeventd\fP(8) for more information.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB-P\fP|\fB--partial\fP
+.br
+Commands will do their best to activate LVs with missing PV extents.
+Missing extents may be replaced with error or zero segments
+according to the missing_stripe_filler setting.
+Metadata may not be changed with this option.
+.
+.HP
+\fB-s\fP|\fB--physicalextentsize\fP \fISize\fP[m|UNIT]
+.br
+Sets the physical extent size of PVs in the VG.
+The value must be either 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 at least 128 KiB.
+Once this value has been set, it is difficult to change
+without recreating the VG, unless no extents need moving.
+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 LV must start and end on an extent boundary.
+.
+.HP
+\fB--poll\fP \fBy\fP|\fBn\fP
+.br
+When yes, start the background transformation of an LV.
+An incomplete transformation, e.g. pvmove or lvconvert interrupted
+by reboot or crash, can be restarted from the last checkpoint with --poll y.
+When no, background transformation of an LV will not occur, and the
+transformation will not complete. It may not be appropriate to immediately
+poll an LV after activation, in which case --poll n can be used to defer
+polling until a later --poll y command.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
+.br
+The number of metadata areas to set aside on a PV for storing VG metadata.
+When 2, one copy of the VG metadata is stored at the front of the PV
+and a second copy is stored at the end.
+When 1, one copy of the VG metadata is stored at the front of the PV.
+When 0, no copies of the VG metadata are stored on the given PV.
+This may be useful in VGs containing many PVs (this places limitations
+on the ability to use vgsplit later.)
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB--refresh\fP
+.br
+If the LV is active, reload its metadata.
+This is not necessary in normal operation, but may be useful
+if something has gone wrong, or if some form of manual LV
+sharing is being used.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-x\fP|\fB--resizeable\fP \fBy\fP|\fBn\fP
+.br
+Enables or disables the addition or removal of PVs to/from a VG
+(by vgextend/vgreduce).
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB--setautoactivation\fP \fBy\fP|\fBn\fP
+.br
+Set the autoactivation property on a VG or LV.
+Display the property with vgs or lvs "-o autoactivation".
+When the autoactivation property is disabled, the VG or LV
+will not be activated by a command doing autoactivation
+(vgchange, lvchange, or pvscan using -aay.)
+If autoactivation is disabled on a VG, no LVs will be autoactivated
+in that VG, and the LV autoactivation property has no effect.
+If autoactivation is enabled on a VG, autoactivation can be disabled
+for individual LVs.
+.
+.HP
+\fB--sysinit\fP
+.br
+Indicates that vgchange/lvchange is being invoked from early system initialisation
+scripts (e.g. rc.sysinit or an initrd), before writable 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 --ignorelockingfailure, --ignoremonitoring,
+--poll n, and setting env var LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES.
+vgchange/lvchange skip autoactivation, and defer to pvscan autoactivation.
+.
+.HP
+\fB--systemid\fP \fIString\fP
+.br
+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 \fBlvmsystemid\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-u\fP|\fB--uuid\fP
+.br
+Generate new random UUID for specified VGs.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB--\fP[\fBvg\fP]\fBmetadatacopies\fP \fBall\fP|\fBunmanaged\fP|\fINumber\fP
+.br
+Number of copies of the VG metadata that are kept.
+VG metadata is kept in VG metadata areas on PVs in the VG,
+i.e. reserved space at the start and/or end of the PVs.
+Keeping a copy of the VG metadata on every PV can reduce performance
+in VGs containing a large number of PVs.
+When this number is set to a non-zero value, LVM will automatically
+choose PVs on which to store metadata, using the metadataignore flags
+on PVs to achieve the specified number.
+The number can also be replaced with special string values:
+\fBunmanaged\fP causes LVM to not automatically manage the PV
+metadataignore flags.
+\fBall\fP causes LVM to first clear the metadataignore flags on
+all PVs, and then to become unmanaged.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I Select
+Select indicates that a required positional parameter can
+be omitted if the \fB--select\fP option is used.
+No arg appears in this position.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgck.8.in b/man/vgck.8.in
deleted file mode 100644
index cc6cd57..0000000
--- a/man/vgck.8.in
+++ /dev/null
@@ -1,18 +0,0 @@
-.TH VGCK 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgck \- check volume group metadata
-.SH SYNOPSIS
-.B vgck
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.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/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_end b/man/vgck.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgck.8_end
diff --git a/man/vgck.8_pregen b/man/vgck.8_pregen
new file mode 100644
index 0000000..d0fe040
--- /dev/null
+++ b/man/vgck.8_pregen
@@ -0,0 +1,282 @@
+.TH VGCK 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgck \(em Check the consistency of volume group(s)
+.
+.SH SYNOPSIS
+.
+\fBvgck\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgck checks LVM metadata for consistency.
+.
+.SH USAGE
+.
+Read and display information about a VG.
+.br
+.P
+\fBvgck\fP
+.br
+.RS 4
+.ad l
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fITag\fP ... ]
+.RE
+.P
+Rewrite VG metadata to correct problems.
+.br
+.P
+\fBvgck\fP \fB--updatemetadata\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--updatemetadata\fP
+.br
+Update VG metadata to correct problems.
+If VG metadata was updated while a PV was missing, and the PV
+reappears with an old version of metadata, then this option
+(or any other command that writes metadata) will update the
+metadata on the previously missing PV. If a PV was removed
+from a VG while it was missing, and the PV reappears, using
+this option will clear the outdated metadata from the previously
+missing PV. If metadata text is damaged on one PV, using this
+option will replace the damaged metadata text. For more severe
+damage, e.g. with headers, see \fBpvck\fP(8).
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgconvert.8.in b/man/vgconvert.8.in
deleted file mode 100644
index 95ea41c..0000000
--- a/man/vgconvert.8.in
+++ /dev/null
@@ -1,42 +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 [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-labelsector ]
-.RB [ \-M | \-\-metadatatype
-.IR type ]
-.RB [ \-\-pvmetadatacopies
-.IR NumberOfCopies ]
-.RB [ \-\-metadatasize
-.IR size ]
-.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/vgconvert.8_des b/man/vgconvert.8_des
new file mode 100644
index 0000000..eb5a006
--- /dev/null
+++ b/man/vgconvert.8_des
@@ -0,0 +1,3 @@
+vgconvert is no longer a part of LVM. It was removed along with
+support for the LVM1 format. Use an older version of LVM to
+convert VGs from the LVM1 format to LVM2.
diff --git a/man/vgconvert.8_end b/man/vgconvert.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgconvert.8_end
diff --git a/man/vgconvert.8_pregen b/man/vgconvert.8_pregen
new file mode 100644
index 0000000..41baaf9
--- /dev/null
+++ b/man/vgconvert.8_pregen
@@ -0,0 +1,312 @@
+.TH VGCONVERT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgconvert \(em Change volume group metadata format
+.
+.SH SYNOPSIS
+.
+\fBvgconvert\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgconvert is no longer a part of LVM. It was removed along with
+support for the LVM1 format. Use an older version of LVM to
+convert VGs from the LVM1 format to LVM2.
+.
+.SH USAGE
+.
+\fBvgconvert\fP \fIVG\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
+.br
+[ \fB--labelsector\fP \fINumber\fP ]
+.br
+[ \fB--bootloaderareasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--metadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--bootloaderareasize\fP \fISize\fP[m|UNIT]
+.br
+Reserve space for the bootloader between the LVM metadata area and the first PE.
+The bootloader area is reserved for bootloaders to embed their own data or
+metadata; LVM will not use it.
+The bootloader area begins where the first PE would otherwise be located.
+The first PE is moved out by the size of the bootloader area, and then moved
+out further if necessary to match the data alignment.
+The start of the bootloader area is always aligned, see also --dataalignment
+and --dataalignmentoffset. The bootloader area may be larger than requested
+due to the alignment, but it's never less than the requested size.
+To see the bootloader area start and size of
+an existing PV use pvs -o +pv_ba_start,pv_ba_size.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--labelsector\fP \fINumber\fP
+.br
+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.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--metadatasize\fP \fISize\fP[m|UNIT]
+.br
+The approximate amount of space used for each VG metadata area.
+The size may be rounded.
+.
+.HP
+\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
+.br
+Specifies the type of on-disk metadata to use.
+\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
+\fBlvm1\fP (or just \fB1\fP) is no longer used.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
+.br
+The number of metadata areas to set aside on a PV for storing VG metadata.
+When 2, one copy of the VG metadata is stored at the front of the PV
+and a second copy is stored at the end.
+When 1, one copy of the VG metadata is stored at the front of the PV.
+When 0, no copies of the VG metadata are stored on the given PV.
+This may be useful in VGs containing many PVs (this places limitations
+on the ability to use vgsplit later.)
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgcreate.8.in b/man/vgcreate.8.in
deleted file mode 100644
index 577fee2..0000000
--- a/man/vgcreate.8.in
+++ /dev/null
@@ -1,151 +0,0 @@
-.TH VGCREATE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgcreate \- 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 [ \-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 [ \-s | \-\-physicalextentsize
-.IR PhysicalExtentSize [ bBsSkKmMgGtTpPeE ]]
-.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 \-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.
-The default is 4 MiB and it must be at least 1 KiB and a power of 2.
-
-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.
-
-.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/vgcreate.8_des b/man/vgcreate.8_des
new file mode 100644
index 0000000..6e0d11b
--- /dev/null
+++ b/man/vgcreate.8_des
@@ -0,0 +1,9 @@
+vgcreate creates a new VG on block devices. If the devices were not
+previously initialized as PVs with \fBpvcreate\fP(8), vgcreate will
+inititialize them, making them PVs. The pvcreate options for initializing
+devices are also available with vgcreate.
+.P
+When vgcreate uses an existing PV, that PV's existing values for metadata
+size, PE start, etc, are used, even if different values are specified in
+the vgcreate command. To change these values, first use pvremove on the
+device.
diff --git a/man/vgcreate.8_end b/man/vgcreate.8_end
new file mode 100644
index 0000000..28b87fe
--- /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_pregen b/man/vgcreate.8_pregen
new file mode 100644
index 0000000..07fc9e4
--- /dev/null
+++ b/man/vgcreate.8_pregen
@@ -0,0 +1,495 @@
+.TH VGCREATE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgcreate \(em Create a volume group
+.
+.SH SYNOPSIS
+.
+\fBvgcreate\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgcreate creates a new VG on block devices. If the devices were not
+previously initialized as PVs with \fBpvcreate\fP(8), vgcreate will
+inititialize them, making them PVs. The pvcreate options for initializing
+devices are also available with vgcreate.
+.P
+When vgcreate uses an existing PV, that PV's existing values for metadata
+size, PE start, etc, are used, even if different values are specified in
+the vgcreate command. To change these values, first use pvremove on the
+device.
+.
+.SH USAGE
+.
+\fBvgcreate\fP \fIVG\fP\fI_new\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-c\fP|\fB--clustered\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-l\fP|\fB--maxlogicalvolumes\fP \fINumber\fP ]
+.br
+[ \fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP ]
+.br
+[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
+.br
+[ \fB-s\fP|\fB--physicalextentsize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--addtag\fP \fITag\fP ]
+.br
+[ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+]
+.br
+[ \fB--metadataprofile\fP \fIString\fP ]
+.br
+[ \fB--labelsector\fP \fINumber\fP ]
+.br
+[ \fB--metadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--\fP[\fBvg\fP]\fBmetadatacopies\fP \fBall\fP|\fBunmanaged\fP|\fINumber\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--dataalignment\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--dataalignmentoffset\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--shared\fP ]
+.br
+[ \fB--systemid\fP \fIString\fP ]
+.br
+[ \fB--locktype\fP \fBsanlock\fP|\fBdlm\fP|\fBnone\fP ]
+.br
+[ \fB--setautoactivation\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--addtag\fP \fITag\fP
+.br
+Adds a tag to a PV, VG or LV. This option can be repeated to add
+multiple tags at once. See \fBlvm\fP(8) for information about tags.
+.
+.HP
+.ad l
+\fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.ad b
+.br
+Determines the allocation policy when a command needs to allocate
+Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
+which can be changed with vgchange/lvchange, or overridden on the
+command line.
+\fBnormal\fP applies common sense rules such as not placing parallel stripes
+on the same PV.
+\fBinherit\fP applies the VG policy to an LV.
+\fBcontiguous\fP requires new PEs be placed adjacent to existing PEs.
+\fBcling\fP places new PEs on the same PV as existing PEs in the same
+stripe of the LV.
+If there are sufficient PEs for an allocation, but normal does not
+use them, \fBanywhere\fP will use them even if it reduces performance,
+e.g. by placing two stripes on the same PV.
+Optional positional PV args on the command line can also be used to limit
+which PVs the command will use for allocation.
+See \fBlvm\fP(8) for more information about allocation.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB-c\fP|\fB--clustered\fP \fBy\fP|\fBn\fP
+.br
+This option was specific to clvm and is now replaced by
+the --shared option with \fBlvmlockd\fP(8).
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--dataalignment\fP \fISize\fP[k|UNIT]
+.br
+Align the start of a PV data area with a multiple of this number.
+To see the location of the first Physical Extent (PE) of an existing PV,
+use pvs -o +pe_start. In addition, it may be shifted by an alignment offset,
+see --dataalignmentoffset.
+Also specify an appropriate PE size when creating a VG.
+.
+.HP
+\fB--dataalignmentoffset\fP \fISize\fP[k|UNIT]
+.br
+Shift the start of the PV data area by this additional offset.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--labelsector\fP \fINumber\fP
+.br
+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.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--locktype\fP \fBsanlock\fP|\fBdlm\fP|\fBnone\fP
+.br
+Specify the VG lock type directly in place of using --shared.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-l\fP|\fB--maxlogicalvolumes\fP \fINumber\fP
+.br
+Sets the maximum number of LVs allowed in a VG.
+.
+.HP
+\fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP
+.br
+Sets the maximum number of PVs that can belong to the VG.
+The value 0 removes any limitation.
+For large numbers of PVs, also see options --pvmetadatacopies,
+and --vgmetadatacopies for improving performance.
+.
+.HP
+\fB--metadataprofile\fP \fIString\fP
+.br
+The metadata profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--metadatasize\fP \fISize\fP[m|UNIT]
+.br
+The approximate amount of space used for each VG metadata area.
+The size may be rounded.
+.
+.HP
+\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
+.br
+Specifies the type of on-disk metadata to use.
+\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
+\fBlvm1\fP (or just \fB1\fP) is no longer used.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB-s\fP|\fB--physicalextentsize\fP \fISize\fP[m|UNIT]
+.br
+Sets the physical extent size of PVs in the VG.
+The value must be either 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 at least 128 KiB.
+Once this value has been set, it is difficult to change
+without recreating the VG, unless no extents need moving.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
+.br
+The number of metadata areas to set aside on a PV for storing VG metadata.
+When 2, one copy of the VG metadata is stored at the front of the PV
+and a second copy is stored at the end.
+When 1, one copy of the VG metadata is stored at the front of the PV.
+When 0, no copies of the VG metadata are stored on the given PV.
+This may be useful in VGs containing many PVs (this places limitations
+on the ability to use vgsplit later.)
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB--setautoactivation\fP \fBy\fP|\fBn\fP
+.br
+Set the autoactivation property on a VG or LV.
+Display the property with vgs or lvs "-o autoactivation".
+When the autoactivation property is disabled, the VG or LV
+will not be activated by a command doing autoactivation
+(vgchange, lvchange, or pvscan using -aay.)
+If autoactivation is disabled on a VG, no LVs will be autoactivated
+in that VG, and the LV autoactivation property has no effect.
+If autoactivation is enabled on a VG, autoactivation can be disabled
+for individual LVs.
+.
+.HP
+\fB--shared\fP
+.br
+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 \fBlvmlockd\fP(8) for more information about shared VGs.
+.
+.HP
+\fB--systemid\fP \fIString\fP
+.br
+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 \fBlvmsystemid\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB--\fP[\fBvg\fP]\fBmetadatacopies\fP \fBall\fP|\fBunmanaged\fP|\fINumber\fP
+.br
+Number of copies of the VG metadata that are kept.
+VG metadata is kept in VG metadata areas on PVs in the VG,
+i.e. reserved space at the start and/or end of the PVs.
+Keeping a copy of the VG metadata on every PV can reduce performance
+in VGs containing a large number of PVs.
+When this number is set to a non-zero value, LVM will automatically
+choose PVs on which to store metadata, using the metadataignore flags
+on PVs to achieve the specified number.
+The number can also be replaced with special string values:
+\fBunmanaged\fP causes LVM to not automatically manage the PV
+metadataignore flags.
+\fBall\fP causes LVM to first clear the metadataignore flags on
+all PVs, and then to become unmanaged.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.HP
+\fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
+.br
+Controls if the first 4 sectors (2048 bytes) of the device are wiped.
+The default is to wipe these sectors unless either or both of
+--restorefile or --uuid are specified.
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgdisplay.8.in b/man/vgdisplay.8.in
deleted file mode 100644
index 70c1fa7..0000000
--- a/man/vgdisplay.8.in
+++ /dev/null
@@ -1,106 +0,0 @@
-.TH VGDISPLAY 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgdisplay \- display attributes of volume groups
-.SH SYNOPSIS
-.B vgdisplay
-.RB [ \-A | \-\-activevolumegroups ]
-.RB [ \-c | \-\-colon ]
-.RB [ \-s | \-\-short ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-nosuffix ]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-\-version ]
-.RI [ VolumeGroupName
-.RI [ VolumeGroupName ...]]
-.br
-
-.br
-.B vgdisplay
-.BR \-\-columns | \-C
-.RB [ \-\-aligned ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-o|\-\-options
-.RI [ + ] Field1 [ ,Field2 ...]]
-.RB [ \-O | \-\-sort
-.RI [ + | - ] Key1 [ , [ + | - ] Key2 ...]]
-.RB [ \-P | \-\-partial ]
-.RB [ \-\-separator
-.IR Separator ]
-.RB [ \-\-unbuffered ]
-.RB [ \-\-units
-.IR hHbBsSkKmMgGtTpPeE ]
-.RB [ \-v | \-\-verbose ]
-.RB [ \-\-version ]
-.RI [ VolumeGroupName
-.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 and \fBvgs\fP(8) for options given with
-\fB\-\-columns\fP.
-.TP
-.BR \-A ", " \-\-activevolumegroups
-Only select the active volume groups.
-.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.
-.TP
-.BR \-\-columns | \-C
-Display output in columns, the equivalent of \fBvgs\fP(8).
-Options listed are the same as options given in \fPvgs\fP(8).
-.SH SEE ALSO
-.BR lvm (8),
-.BR vgs (8),
-.BR pvcreate (8),
-.BR vgcreate (8),
-.BR lvcreate (8)
diff --git a/man/vgdisplay.8_des b/man/vgdisplay.8_des
new file mode 100644
index 0000000..fa3d29a
--- /dev/null
+++ b/man/vgdisplay.8_des
@@ -0,0 +1,4 @@
+vgdisplay shows the attributes of VGs, and the associated PVs and LVs.
+.P
+\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_end b/man/vgdisplay.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgdisplay.8_end
diff --git a/man/vgdisplay.8_pregen b/man/vgdisplay.8_pregen
new file mode 100644
index 0000000..db2e48b
--- /dev/null
+++ b/man/vgdisplay.8_pregen
@@ -0,0 +1,437 @@
+.TH VGDISPLAY 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgdisplay \(em Display volume group information
+.
+.SH SYNOPSIS
+.
+\fBvgdisplay\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgdisplay shows the attributes of VGs, and the associated PVs and LVs.
+.P
+\fBvgs\fP(8) is a preferred alternative that shows the same information
+and more, using a more compact and configurable output format.
+.
+.SH USAGE
+.
+\fBvgdisplay\fP
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--activevolumegroups\fP ]
+.br
+[ \fB-c\fP|\fB--colon\fP ]
+.br
+[ \fB-C\fP|\fB--columns\fP ]
+.br
+[ \fB-o\fP|\fB--options\fP \fIString\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-s\fP|\fB--short\fP ]
+.br
+[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
+.br
+[ \fB--aligned\fP ]
+.br
+[ \fB--binary\fP ]
+.br
+[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
+.br
+[ \fB--foreign\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--logonly\fP ]
+.br
+[ \fB--noheadings\fP ]
+.br
+[ \fB--nosuffix\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ \fB--shared\fP ]
+.br
+[ \fB--separator\fP \fIString\fP ]
+.br
+[ \fB--unbuffered\fP ]
+.br
+[ \fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fITag\fP ... ]
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-A\fP|\fB--activevolumegroups\fP
+.br
+Only select active VGs. The VG is considered active
+if at least one of its LVs is active.
+.
+.HP
+\fB--aligned\fP
+.br
+Use with --separator to align the output columns
+.
+.HP
+\fB--binary\fP
+.br
+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).
+.
+.HP
+\fB-c\fP|\fB--colon\fP
+.br
+Generate colon separated output for easier parsing in scripts or programs.
+Also see \fBvgs\fP(8) which provides considerably more control over the output.
+.
+.HP
+\fB-C\fP|\fB--columns\fP
+.br
+Display output in columns, the equivalent of \fBvgs\fP(8).
+Options listed are the same as options given in \fBvgs\fP(8).
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
+.br
+See \fBlvmreport\fP(7).
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--foreign\fP
+.br
+Report/display foreign VGs that would otherwise be skipped.
+See \fBlvmsystemid\fP(7) for more information about foreign VGs.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--logonly\fP
+.br
+Suppress command report and display only log report.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--noheadings\fP
+.br
+Suppress the headings line that is normally the first line of output.
+Useful if grepping the output.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--nosuffix\fP
+.br
+Suppress the suffix on output sizes. Use with --units
+(except h and H) if processing the output.
+.
+.HP
+\fB-o\fP|\fB--options\fP \fIString\fP
+.br
+Comma-separated, ordered list of fields to display in columns.
+String arg syntax is: [\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
+The prefix \fB+\fP will append the specified fields to the default fields,
+\fB-\fP will remove the specified fields from the default fields, and
+\fB#\fP will compact specified fields (removing them when empty for all rows.)
+Use \fB-o help\fP to view the list of all available fields.
+Use separate lists of fields to add, remove or compact by repeating the -o option:
+-o+field1,field2 -o-field3,field4 -o#field5.
+These lists are evaluated from left to right.
+Use field name \fBlv_all\fP to view all LV fields,
+\fBvg_all\fP all VG fields,
+\fBpv_all\fP all PV fields,
+\fBpvseg_all\fP all PV segment fields,
+\fBseg_all\fP all LV segment fields, and
+\fBpvseg_all\fP all PV segment columns.
+See the \fBlvm.conf\fP(5) report section for more config options.
+See \fBlvmreport\fP(7) for more information about reporting.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB--separator\fP \fIString\fP
+.br
+String to use to separate each column. Useful if grepping the output.
+.
+.HP
+\fB--shared\fP
+.br
+Report/display shared VGs that would otherwise be skipped when
+lvmlockd is not being used on the host.
+See \fBlvmlockd\fP(8) for more information about shared VGs.
+.
+.HP
+\fB-s\fP|\fB--short\fP
+.br
+Give a short listing showing the existence of VGs.
+.
+.HP
+\fB-O\fP|\fB--sort\fP \fIString\fP
+.br
+Comma-separated ordered list of columns to sort by. Replaces the default
+selection. Precede any column with \fB-\fP for a reverse sort on that column.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--unbuffered\fP
+.br
+Produce output immediately without sorting or aligning the columns properly.
+.
+.HP
+.ad l
+\fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+.ad b
+.br
+All sizes are output in these units:
+human-(r)eadable with '<' rounding indicator,
+(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.
+Custom units can be specified, e.g. --units 3M.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgexport.8.in b/man/vgexport.8.in
deleted file mode 100644
index 7509170..0000000
--- a/man/vgexport.8.in
+++ /dev/null
@@ -1,29 +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 [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-v | \-\-verbose ]
-.I VolumeGroupName
-.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.
-.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)
diff --git a/man/vgexport.8_des b/man/vgexport.8_des
new file mode 100644
index 0000000..0c6f4af
--- /dev/null
+++ b/man/vgexport.8_des
@@ -0,0 +1,19 @@
+vgexport changes a VG into the exported state, which ensures that the VG
+and its disks are not being used, and cannot be used until the VG is
+imported by \fBvgimport\fP(8). Putting a VG into an unusable, offline
+state can be useful when doing things like moving a VG's disks to another
+system. Exporting a VG provides some protection from its LVs being
+accidentally used, or being used by an automated system before it's ready.
+.P
+A VG cannot be exported until all of its LVs are inactive.
+.P
+LVM commands will ignore an exported VG or report an error if a command
+tries to use it.
+.P
+For an exported VG, the vgs command will display \"x\" in the third VG
+attribute, and the pvs command will display \"x\" in the second PV
+attribute. Both vgs and pvs will display \"exported\" from the export
+report field.
+.P
+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_end b/man/vgexport.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgexport.8_end
diff --git a/man/vgexport.8_pregen b/man/vgexport.8_pregen
new file mode 100644
index 0000000..4fa6ead
--- /dev/null
+++ b/man/vgexport.8_pregen
@@ -0,0 +1,310 @@
+.TH VGEXPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgexport \(em Unregister volume group(s) from the system
+.
+.SH SYNOPSIS
+.
+\fBvgexport\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgexport changes a VG into the exported state, which ensures that the VG
+and its disks are not being used, and cannot be used until the VG is
+imported by \fBvgimport\fP(8). Putting a VG into an unusable, offline
+state can be useful when doing things like moving a VG's disks to another
+system. Exporting a VG provides some protection from its LVs being
+accidentally used, or being used by an automated system before it's ready.
+.P
+A VG cannot be exported until all of its LVs are inactive.
+.P
+LVM commands will ignore an exported VG or report an error if a command
+tries to use it.
+.P
+For an exported VG, the vgs command will display \"x\" in the third VG
+attribute, and the pvs command will display \"x\" in the second PV
+attribute. Both vgs and pvs will display \"exported\" from the export
+report field.
+.P
+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 USAGE
+.
+Export specified VGs.
+.br
+.P
+\fBvgexport\fP \fIVG\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Export all VGs.
+.br
+.P
+\fBvgexport\fP \fB-a\fP|\fB--all\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I Select
+Select indicates that a required positional parameter can
+be omitted if the \fB--select\fP option is used.
+No arg appears in this position.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgextend.8.in b/man/vgextend.8.in
deleted file mode 100644
index ebb642f..0000000
--- a/man/vgextend.8.in
+++ /dev/null
@@ -1,67 +0,0 @@
-.TH VGEXTEND 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgextend \- add physical volumes to a volume group
-.SH SYNOPSIS
-.B vgextend
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.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/vgextend.8_des b/man/vgextend.8_des
new file mode 100644
index 0000000..cf7c661
--- /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.
+.P
+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).
+.P
+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..e63fa13
--- /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_pregen b/man/vgextend.8_pregen
new file mode 100644
index 0000000..a1ed2f3
--- /dev/null
+++ b/man/vgextend.8_pregen
@@ -0,0 +1,365 @@
+.TH VGEXTEND 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgextend \(em Add physical volumes to a volume group
+.
+.SH SYNOPSIS
+.
+\fBvgextend\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgextend adds one or more PVs to a VG. This increases the space available
+for LVs in the VG.
+.P
+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).
+.P
+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.
+.
+.SH USAGE
+.
+\fBvgextend\fP \fIVG\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
+.br
+[ \fB--labelsector\fP \fINumber\fP ]
+.br
+[ \fB--metadatasize\fP \fISize\fP[m|UNIT] ]
+.br
+[ \fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
+.br
+[ \fB--metadataignore\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--dataalignment\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--dataalignmentoffset\fP \fISize\fP[k|UNIT] ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--restoremissing\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--dataalignment\fP \fISize\fP[k|UNIT]
+.br
+Align the start of a PV data area with a multiple of this number.
+To see the location of the first Physical Extent (PE) of an existing PV,
+use pvs -o +pe_start. In addition, it may be shifted by an alignment offset,
+see --dataalignmentoffset.
+Also specify an appropriate PE size when creating a VG.
+.
+.HP
+\fB--dataalignmentoffset\fP \fISize\fP[k|UNIT]
+.br
+Shift the start of the PV data area by this additional offset.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--labelsector\fP \fINumber\fP
+.br
+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.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--metadataignore\fP \fBy\fP|\fBn\fP
+.br
+Specifies the metadataignore property of a PV.
+If yes, metadata areas on the PV are ignored, and lvm will
+not store metadata in the metadata areas of the PV.
+If no, lvm will store metadata on the PV.
+.
+.HP
+\fB--metadatasize\fP \fISize\fP[m|UNIT]
+.br
+The approximate amount of space used for each VG metadata area.
+The size may be rounded.
+.
+.HP
+\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
+.br
+Specifies the type of on-disk metadata to use.
+\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
+\fBlvm1\fP (or just \fB1\fP) is no longer used.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
+.br
+The number of metadata areas to set aside on a PV for storing VG metadata.
+When 2, one copy of the VG metadata is stored at the front of the PV
+and a second copy is stored at the end.
+When 1, one copy of the VG metadata is stored at the front of the PV.
+When 0, no copies of the VG metadata are stored on the given PV.
+This may be useful in VGs containing many PVs (this places limitations
+on the ability to use vgsplit later.)
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB--restoremissing\fP
+.br
+Add a PV back into a VG after the PV was missing and then returned,
+e.g. due to a transient failure. The PV is not reinitialized.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.HP
+\fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
+.br
+Controls if the first 4 sectors (2048 bytes) of the device are wiped.
+The default is to wipe these sectors unless either or both of
+--restorefile or --uuid are specified.
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgimport.8.in b/man/vgimport.8.in
deleted file mode 100644
index dd781de..0000000
--- a/man/vgimport.8.in
+++ /dev/null
@@ -1,27 +0,0 @@
-.TH VGIMPORT 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgimport \- make exported volume groups known to the system
-.SH SYNOPSIS
-.B vgimport
-.RB [ \-a | \-\-all ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-v | \-\-verbose ]
-.I VolumeGroupName
-.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.
-.SH OPTIONS
-See \fBlvm\fP(8) for common options.
-.TP
-.BR \-a ", " \-\-all
-Import all exported Volume Groups.
-.SH SEE ALSO
-.BR lvm (8),
-.BR pvscan (8),
-.BR vgexport (8),
-.BR vgscan (8)
diff --git a/man/vgimport.8_des b/man/vgimport.8_des
new file mode 100644
index 0000000..22d36ce
--- /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.
+.P
+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_end b/man/vgimport.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgimport.8_end
diff --git a/man/vgimport.8_pregen b/man/vgimport.8_pregen
new file mode 100644
index 0000000..f23f8f4
--- /dev/null
+++ b/man/vgimport.8_pregen
@@ -0,0 +1,305 @@
+.TH VGIMPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgimport \(em Register exported volume group with system
+.
+.SH SYNOPSIS
+.
+\fBvgimport\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgimport makes exported VGs known to the system again, perhaps after
+moving the PVs from a different system.
+.P
+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 USAGE
+.
+Import specified VGs.
+.br
+.P
+\fBvgimport\fP \fIVG\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Import all VGs.
+.br
+.P
+\fBvgimport\fP \fB-a\fP|\fB--all\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+Import all visible VGs.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I Select
+Select indicates that a required positional parameter can
+be omitted if the \fB--select\fP option is used.
+No arg appears in this position.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgimportclone.8.in b/man/vgimportclone.8.in
deleted file mode 100644
index 52ff079..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 \- 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/vgimportclone.8_des b/man/vgimportclone.8_des
new file mode 100644
index 0000000..e5d1343
--- /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.
+.P
+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..4a09297
--- /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_pregen b/man/vgimportclone.8_pregen
new file mode 100644
index 0000000..87a8308
--- /dev/null
+++ b/man/vgimportclone.8_pregen
@@ -0,0 +1,268 @@
+.TH VGIMPORTCLONE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgimportclone \(em Import a VG from cloned PVs
+.
+.SH SYNOPSIS
+.
+\fBvgimportclone\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgimportclone imports a VG from duplicated PVs, e.g. created by a hardware
+snapshot of existing PVs.
+.P
+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.
+.
+.SH USAGE
+.
+\fBvgimportclone\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-n\fP|\fB--basevgname\fP \fIVG\fP ]
+.br
+[ \fB-i\fP|\fB--import\fP ]
+.br
+[ \fB--importdevices\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-n\fP|\fB--basevgname\fP \fIString\fP
+.br
+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.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB-i\fP|\fB--import\fP
+.br
+Import exported VGs. Otherwise VGs that have been exported
+will not be changed (nor will their associated PVs).
+.
+.HP
+\fB--importdevices\fP
+.br
+Add devices to the devices file.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgimportdevices.8_des b/man/vgimportdevices.8_des
new file mode 100644
index 0000000..8ad3836
--- /dev/null
+++ b/man/vgimportdevices.8_des
@@ -0,0 +1,10 @@
+vgimportdevices adds PVs from a VG to the devices file. This is similar
+to using using lvmdevices --adddev to add each PV to the devices file
+individually. vgimportdevices will also update the VG metadata to include
+the device IDs of each PV. vgimportdevices will create a new devices file
+if none exists.
+.P
+When a devices file is used, the regex filter is ignored, except in the case
+of vgimportdevices which will apply the regex filter when looking for the VGs
+to import to the devices file. Use vgimportdevices -a to import all VGs on a
+system to the devices file.
diff --git a/man/vgimportdevices.8_end b/man/vgimportdevices.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgimportdevices.8_end
diff --git a/man/vgimportdevices.8_pregen b/man/vgimportdevices.8_pregen
new file mode 100644
index 0000000..1cce857
--- /dev/null
+++ b/man/vgimportdevices.8_pregen
@@ -0,0 +1,309 @@
+.TH VGIMPORTDEVICES 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgimportdevices \(em Add devices for a VG to the devices file.
+.
+.SH SYNOPSIS
+.
+\fBvgimportdevices\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgimportdevices adds PVs from a VG to the devices file. This is similar
+to using using lvmdevices --adddev to add each PV to the devices file
+individually. vgimportdevices will also update the VG metadata to include
+the device IDs of each PV. vgimportdevices will create a new devices file
+if none exists.
+.P
+When a devices file is used, the regex filter is ignored, except in the case
+of vgimportdevices which will apply the regex filter when looking for the VGs
+to import to the devices file. Use vgimportdevices -a to import all VGs on a
+system to the devices file.
+.
+.SH USAGE
+.
+Add devices from specific VGs to the devices file.
+.br
+.P
+\fBvgimportdevices\fP \fIVG\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Add devices from all accessible VGs to the devices file.
+.br
+.P
+\fBvgimportdevices\fP \fB-a\fP|\fB--all\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB--foreign\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--foreign\fP
+.br
+Report/display foreign VGs that would otherwise be skipped.
+See \fBlvmsystemid\fP(7) for more information about foreign VGs.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I Select
+Select indicates that a required positional parameter can
+be omitted if the \fB--select\fP option is used.
+No arg appears in this position.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgmerge.8.in b/man/vgmerge.8.in
deleted file mode 100644
index 70db295..0000000
--- a/man/vgmerge.8.in
+++ /dev/null
@@ -1,39 +0,0 @@
-.TH VGMERGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgmerge \- merge two volume groups
-.SH SYNOPSIS
-.B vgmerge
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.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/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..c64190d
--- /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_pregen b/man/vgmerge.8_pregen
new file mode 100644
index 0000000..b4be7bb
--- /dev/null
+++ b/man/vgmerge.8_pregen
@@ -0,0 +1,257 @@
+.TH VGMERGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgmerge \(em Merge volume groups
+.
+.SH SYNOPSIS
+.
+\fBvgmerge\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+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.
+.
+.SH USAGE
+.
+\fBvgmerge\fP \fIVG\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-l\fP|\fB--list\fP ]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB-l\fP|\fB--list\fP
+.br
+Display merged destination VG like vgdisplay -v.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--poolmetadataspare\fP \fBy\fP|\fBn\fP
+.br
+Enable or disable the automatic creation and management of a
+spare pool metadata LV in the VG. A spare metadata LV is reserved
+space that can be used when repairing a pool.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgmknodes.8.in b/man/vgmknodes.8.in
deleted file mode 100644
index a0d9583..0000000
--- a/man/vgmknodes.8.in
+++ /dev/null
@@ -1,26 +0,0 @@
-.TH VGMKNODES 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgmknodes \- recreate volume group directory and logical volume special files
-.SH SYNOPSIS
-.B vgmknodes
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-\-help ]
-.RB [ \-\-refresh ]
-.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/vgmknodes.8_des b/man/vgmknodes.8_des
new file mode 100644
index 0000000..14c1177
--- /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.
+.P
+This command should not usually be needed if all the system components are
+interoperating correctly.
diff --git a/man/vgmknodes.8_end b/man/vgmknodes.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgmknodes.8_end
diff --git a/man/vgmknodes.8_pregen b/man/vgmknodes.8_pregen
new file mode 100644
index 0000000..60e6935
--- /dev/null
+++ b/man/vgmknodes.8_pregen
@@ -0,0 +1,280 @@
+.TH VGMKNODES 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgmknodes \(em Create the special files for volume group devices in /dev
+.
+.SH SYNOPSIS
+.
+\fBvgmknodes\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgmknodes checks the LVM device nodes in /dev that are needed for active
+LVs and creates any that are missing and removes unused ones.
+.P
+This command should not usually be needed if all the system components are
+interoperating correctly.
+.
+.SH USAGE
+.
+\fBvgmknodes\fP
+.br
+.RS 4
+.ad l
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--refresh\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fILV\fP|\fITag\fP ... ]
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--refresh\fP
+.br
+If the LV is active, reload its metadata.
+This is not necessary in normal operation, but may be useful
+if something has gone wrong, or if some form of manual LV
+sharing is being used.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I LV
+Logical Volume name. See \fBlvm\fP(8) for valid names.
+An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgreduce.8.in b/man/vgreduce.8.in
deleted file mode 100644
index 734f01e..0000000
--- a/man/vgreduce.8.in
+++ /dev/null
@@ -1,45 +0,0 @@
-.TH VGREDUCE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgreduce \- reduce a volume group
-.SH SYNOPSIS
-.B vgreduce
-.RB [ \-a | \-\-all ]
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-removemissing ]
-.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/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_end b/man/vgreduce.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgreduce.8_end
diff --git a/man/vgreduce.8_pregen b/man/vgreduce.8_pregen
new file mode 100644
index 0000000..ca6ab67
--- /dev/null
+++ b/man/vgreduce.8_pregen
@@ -0,0 +1,383 @@
+.TH VGREDUCE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgreduce \(em Remove physical volume(s) from a volume group
+.
+.SH SYNOPSIS
+.
+\fBvgreduce\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.P
+.ad l
+ \fB-a\fP|\fB--all\fP
+.br
+ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+ \fB--commandprofile\fP \fIString\fP
+.br
+ \fB--config\fP \fIString\fP
+.br
+ \fB-d\fP|\fB--debug\fP
+.br
+ \fB--devices\fP \fIPV\fP
+.br
+ \fB--devicesfile\fP \fIString\fP
+.br
+ \fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+ \fB-f\fP|\fB--force\fP
+.br
+ \fB-h\fP|\fB--help\fP
+.br
+ \fB--journal\fP \fIString\fP
+.br
+ \fB--lockopt\fP \fIString\fP
+.br
+ \fB--longhelp\fP
+.br
+ \fB--mirrorsonly\fP
+.br
+ \fB--nohints\fP
+.br
+ \fB--nolocking\fP
+.br
+ \fB--profile\fP \fIString\fP
+.br
+ \fB-q\fP|\fB--quiet\fP
+.br
+ \fB--removemissing\fP
+.br
+ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+ \fB-t\fP|\fB--test\fP
+.br
+ \fB-v\fP|\fB--verbose\fP
+.br
+ \fB--version\fP
+.br
+ \fB-y\fP|\fB--yes\fP
+.ad b
+.
+.SH DESCRIPTION
+.
+vgreduce removes one or more unused PVs from a VG.
+.
+.SH USAGE
+.
+Remove a PV from a VG.
+.br
+.P
+\fBvgreduce\fP \fIVG\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Remove all unused PVs from a VG.
+.br
+.P
+\fBvgreduce\fP \fB-a\fP|\fB--all\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Remove all missing PVs from a VG.
+.br
+.P
+\fBvgreduce\fP \fB--removemissing\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ \fB--mirrorsonly\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+\(em
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+Removes all empty PVs if none are named on the command line.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--mirrorsonly\fP
+.br
+Only remove missing PVs from mirror LVs.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--removemissing\fP
+.br
+Removes all missing PVs from the VG, if there are no LVs allocated
+on them. This resumes normal operation of the VG (new LVs may again
+be created, changed and so on).
+If this is not possible because LVs are referencing the missing PVs,
+this option can be combined with --force to have the command remove
+any partial LVs. In this case, any LVs and dependent snapshots that
+were partly on the missing disks are removed completely, including
+those parts on disks that are still present.
+If LVs spanned several disks, including ones that are lost, salvaging
+some data first may be possible by activating LVs in partial mode.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgremove.8.in b/man/vgremove.8.in
deleted file mode 100644
index c205e8a..0000000
--- a/man/vgremove.8.in
+++ /dev/null
@@ -1,40 +0,0 @@
-.TH VGREMOVE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgremove \- remove a volume group
-.SH SYNOPSIS
-.B vgremove
-.RB [ \-d | \-\-debug ]
-.RB [ \-f | \-\-force ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-noudevsync ]
-.RB [ \-t | \-\-test ]
-.RB [ \-v | \-\-verbose ]
-.I VolumeGroupName
-.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.
-.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/vgremove.8_des b/man/vgremove.8_des
new file mode 100644
index 0000000..3b1c238
--- /dev/null
+++ b/man/vgremove.8_des
@@ -0,0 +1,9 @@
+vgremove removes one or more VGs. If LVs exist in the VG, a prompt is used
+to confirm LV removal.
+.P
+If one or more PVs in the VG are lost, consider
+\fBvgreduce --removemissing\fP to make the VG
+metadata consistent again.
+.P
+Repeat the force option (\fB-ff\fP) to forcibly remove LVs in the VG
+without confirmation.
diff --git a/man/vgremove.8_end b/man/vgremove.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgremove.8_end
diff --git a/man/vgremove.8_pregen b/man/vgremove.8_pregen
new file mode 100644
index 0000000..045eabc
--- /dev/null
+++ b/man/vgremove.8_pregen
@@ -0,0 +1,294 @@
+.TH VGREMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgremove \(em Remove volume group(s)
+.
+.SH SYNOPSIS
+.
+\fBvgremove\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgremove removes one or more VGs. If LVs exist in the VG, a prompt is used
+to confirm LV removal.
+.P
+If one or more PVs in the VG are lost, consider
+\fBvgreduce --removemissing\fP to make the VG
+metadata consistent again.
+.P
+Repeat the force option (\fB-ff\fP) to forcibly remove LVs in the VG
+without confirmation.
+.
+.SH USAGE
+.
+\fBvgremove\fP \fIVG\fP|\fITag\fP|\fISelect\fP ...
+.br
+.RS 4
+.ad l
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB--noudevsync\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--noudevsync\fP
+.br
+Disables udev synchronization. The process will not wait for notification
+from udev. It will continue irrespective of any possible udev processing
+in the background. Only use this if udev is not running or has rules that
+ignore the devices LVM creates.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I Select
+Select indicates that a required positional parameter can
+be omitted if the \fB--select\fP option is used.
+No arg appears in this position.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgrename.8.in b/man/vgrename.8.in
deleted file mode 100644
index 379f697..0000000
--- a/man/vgrename.8.in
+++ /dev/null
@@ -1,54 +0,0 @@
-.TH VGRENAME 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgrename \- rename a volume group
-.SH SYNOPSIS
-.B vgrename
-.RB [ \-A | \-\-autobackup
-.RI { y | n }]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.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/vgrename.8_des b/man/vgrename.8_des
new file mode 100644
index 0000000..7c9802b
--- /dev/null
+++ b/man/vgrename.8_des
@@ -0,0 +1,9 @@
+vgrename renames a VG.
+.P
+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..f66b764
--- /dev/null
+++ b/man/vgrename.8_end
@@ -0,0 +1,10 @@
+.
+.SH EXAMPLES
+.
+Rename VG "vg02" to "myvg":
+.br
+.B vgrename "vg02" "myvg"
+.P
+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_pregen b/man/vgrename.8_pregen
new file mode 100644
index 0000000..d55b6a0
--- /dev/null
+++ b/man/vgrename.8_pregen
@@ -0,0 +1,289 @@
+.TH VGRENAME 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgrename \(em Rename a volume group
+.
+.SH SYNOPSIS
+.
+\fBvgrename\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgrename renames a VG.
+.P
+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.
+.
+.SH USAGE
+.
+Rename a VG.
+.br
+.P
+\fBvgrename\fP \fIVG\fP \fIVG\fP\fI_new\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Rename a VG by specifying the VG UUID.
+.br
+.P
+\fBvgrename\fP \fIString\fP \fIVG\fP\fI_new\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-f\fP|\fB--force\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-f\fP|\fB--force\fP ...
+.br
+Override various checks, confirmations and protections.
+Use with extreme caution.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgs.8.in b/man/vgs.8.in
deleted file mode 100644
index e555898..0000000
--- a/man/vgs.8.in
+++ /dev/null
@@ -1,115 +0,0 @@
-.TH VGS 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgs \- report information about volume groups
-.SH SYNOPSIS
-.B vgs
-.RB [ \-a | \-\-all ]
-.RB [ \-\-aligned ]
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-nameprefixes ]
-.RB [ \-\-noheadings ]
-.RB [ \-\-nosuffix ]
-.RB [ \-o | \-\-options
-.RI [ + ] Field1 [ ,Field2 ...]]
-.RB [ \-O | \-\-sort
-.RI [ + | \- ] Key1 [ , [ + | \- ] Key2 ...]]
-.RB [ \-P | \-\-partial ]
-.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 \-\-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. Precede the list with '+' to append
-to the default selection of columns.
-.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, 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, (i)nherited
-.IP 6 3
-(c)lustered
-.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
-.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/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..19727fa
--- /dev/null
+++ b/man/vgs.8_end
@@ -0,0 +1,17 @@
+.
+.SH NOTES
+.
+The vg_attr bits are:
+.IP 1 3
+Permissions: (\fBw\fP)riteable, (\fBr\fP)ead-only
+.IP 2 3
+Resi(\fBz\fP)eable
+.IP 3 3
+E(\fBx\fP)ported
+.IP 4 3
+(\fBp\fP)artial: one or more physical volumes belonging to the volume group
+are missing from the system
+.IP 5 3
+Allocation policy: (\fBc\fP)ontiguous, c(\fBl\fP)ing, (\fBn\fP)ormal, (\fBa\fP)nywhere
+.IP 6 3
+(\fBc\fP)lustered, (\fBs\fP)hared
diff --git a/man/vgs.8_pregen b/man/vgs.8_pregen
new file mode 100644
index 0000000..8b1f69c
--- /dev/null
+++ b/man/vgs.8_pregen
@@ -0,0 +1,448 @@
+.TH VGS 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgs \(em Display information about volume groups
+.
+.SH SYNOPSIS
+.
+\fBvgs\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+ [ \fIposition_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgs produces formatted output about VGs.
+.
+.SH USAGE
+.
+\fBvgs\fP
+.br
+.RS 4
+.ad l
+[ \fB-a\fP|\fB--all\fP ]
+.br
+[ \fB-o\fP|\fB--options\fP \fIString\fP ]
+.br
+[ \fB-S\fP|\fB--select\fP \fIString\fP ]
+.br
+[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
+.br
+[ \fB--aligned\fP ]
+.br
+[ \fB--binary\fP ]
+.br
+[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
+.br
+[ \fB--foreign\fP ]
+.br
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--logonly\fP ]
+.br
+[ \fB--nameprefixes\fP ]
+.br
+[ \fB--noheadings\fP ]
+.br
+[ \fB--nosuffix\fP ]
+.br
+[ \fB--readonly\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ \fB--rows\fP ]
+.br
+[ \fB--separator\fP \fIString\fP ]
+.br
+[ \fB--shared\fP ]
+.br
+[ \fB--unbuffered\fP ]
+.br
+[ \fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+]
+.br
+[ \fB--unquoted\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.RS 4
+[ \fIVG\fP|\fITag\fP ... ]
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--aligned\fP
+.br
+Use with --separator to align the output columns
+.
+.HP
+\fB-a\fP|\fB--all\fP
+.br
+List all VGs. Equivalent to not specifying any VGs.
+.
+.HP
+\fB--binary\fP
+.br
+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).
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
+.br
+See \fBlvmreport\fP(7).
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB--foreign\fP
+.br
+Report/display foreign VGs that would otherwise be skipped.
+See \fBlvmsystemid\fP(7) for more information about foreign VGs.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--logonly\fP
+.br
+Suppress command report and display only log report.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--nameprefixes\fP
+.br
+Add an "LVM2_" prefix plus the field name to the output. Useful
+with --noheadings to produce a list of field=value pairs that can
+be used to set environment variables (for example, in udev rules).
+.
+.HP
+\fB--noheadings\fP
+.br
+Suppress the headings line that is normally the first line of output.
+Useful if grepping the output.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--nosuffix\fP
+.br
+Suppress the suffix on output sizes. Use with --units
+(except h and H) if processing the output.
+.
+.HP
+\fB-o\fP|\fB--options\fP \fIString\fP
+.br
+Comma-separated, ordered list of fields to display in columns.
+String arg syntax is: [\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
+The prefix \fB+\fP will append the specified fields to the default fields,
+\fB-\fP will remove the specified fields from the default fields, and
+\fB#\fP will compact specified fields (removing them when empty for all rows.)
+Use \fB-o help\fP to view the list of all available fields.
+Use separate lists of fields to add, remove or compact by repeating the -o option:
+-o+field1,field2 -o-field3,field4 -o#field5.
+These lists are evaluated from left to right.
+Use field name \fBlv_all\fP to view all LV fields,
+\fBvg_all\fP all VG fields,
+\fBpv_all\fP all PV fields,
+\fBpvseg_all\fP all PV segment fields,
+\fBseg_all\fP all LV segment fields, and
+\fBpvseg_all\fP all PV segment columns.
+See the \fBlvm.conf\fP(5) report section for more config options.
+See \fBlvmreport\fP(7) for more information about reporting.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--readonly\fP
+.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. No attempt will be made to communicate with the
+device-mapper kernel driver, so this option is unable to report whether
+or not LVs are actually in use.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB--rows\fP
+.br
+Output columns as rows.
+.
+.HP
+\fB-S\fP|\fB--select\fP \fIString\fP
+.br
+Select objects for processing and reporting based on specified criteria.
+The criteria syntax is described by \fB--select help\fP and \fBlvmreport\fP(7).
+For reporting commands, one row is displayed for each object matching the criteria.
+See \fB--options help\fP for selectable object fields.
+Rows can be displayed with an additional "selected" field (-o selected)
+showing 1 if the row matches the selection and 0 otherwise.
+For non-reporting commands which process LVM entities, the selection is
+used to choose items to process.
+.
+.HP
+\fB--separator\fP \fIString\fP
+.br
+String to use to separate each column. Useful if grepping the output.
+.
+.HP
+\fB--shared\fP
+.br
+Report/display shared VGs that would otherwise be skipped when
+lvmlockd is not being used on the host.
+See \fBlvmlockd\fP(8) for more information about shared VGs.
+.
+.HP
+\fB-O\fP|\fB--sort\fP \fIString\fP
+.br
+Comma-separated ordered list of columns to sort by. Replaces the default
+selection. Precede any column with \fB-\fP for a reverse sort on that column.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB--unbuffered\fP
+.br
+Produce output immediately without sorting or aligning the columns properly.
+.
+.HP
+.ad l
+\fB--units\fP \c
+.nh
+\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
+.hy
+.ad b
+.br
+All sizes are output in these units:
+human-(r)eadable with '<' rounding indicator,
+(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.
+Custom units can be specified, e.g. --units 3M.
+.
+.HP
+\fB--unquoted\fP
+.br
+When used with --nameprefixes, output values in the field=value
+pairs are not quoted.
+.
+.HP
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I Tag
+Tag name. See \fBlvm\fP(8) for information about tag names and using tags
+in place of a VG, LV or PV.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgscan.8.in b/man/vgscan.8.in
deleted file mode 100644
index 1cdc8e1..0000000
--- a/man/vgscan.8.in
+++ /dev/null
@@ -1,33 +0,0 @@
-.TH VGSCAN 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgscan \- scan all disks for volume groups and rebuild caches
-.SH SYNOPSIS
-.B vgscan
-.RB [ \-d | \-\-debug ]
-.RB [ \-h | \-? | \-\-help ]
-.RB [ \-\-ignorelockingfailure ]
-.RB [ \-\-mknodes ]
-.RB [ \-P | \-\-partial ]
-.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 \-\-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/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_end b/man/vgscan.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgscan.8_end
diff --git a/man/vgscan.8_pregen b/man/vgscan.8_pregen
new file mode 100644
index 0000000..7b4ffb6
--- /dev/null
+++ b/man/vgscan.8_pregen
@@ -0,0 +1,267 @@
+.TH VGSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgscan \(em Search for all volume groups
+.
+.SH SYNOPSIS
+.
+\fBvgscan\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgscan scans all supported LVM block devices in the system for VGs.
+.
+.SH USAGE
+.
+\fBvgscan\fP
+.br
+.RS 4
+.ad l
+[ \fB--ignorelockingfailure\fP ]
+.br
+[ \fB--mknodes\fP ]
+.br
+[ \fB--notifydbus\fP ]
+.br
+[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
+.br
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--ignorelockingfailure\fP
+.br
+Allows a command to continue with read-only metadata
+operations after locking failures.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB--mknodes\fP
+.br
+Also checks the LVM special files in /dev that are needed for active
+LVs and creates any missing ones and removes unused ones.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--notifydbus\fP
+.br
+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.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
+.br
+Overrides current output format for reports which is defined globally by
+the report/output_format setting in \fBlvm.conf\fP(5).
+\fBbasic\fP is the original format with columns and rows.
+If there is more than one report per command, each report is prefixed
+with the report name for identification. \fBjson\fP produces report
+output in JSON format. \fBjson_std\fP produces report output in
+JSON format which is more compliant with JSON standard.
+See \fBlvmreport\fP(7) for more information.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.
diff --git a/man/vgsplit.8.in b/man/vgsplit.8.in
deleted file mode 100644
index bdcfe3b..0000000
--- a/man/vgsplit.8.in
+++ /dev/null
@@ -1,78 +0,0 @@
-.TH VGSPLIT 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
-.SH NAME
-vgsplit \- 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 [ \-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/man/vgsplit.8_des b/man/vgsplit.8_des
new file mode 100644
index 0000000..8eb5753
--- /dev/null
+++ b/man/vgsplit.8_des
@@ -0,0 +1,14 @@
+vgsplit moves one or more PVs from a source VG (the first VG arg) to a
+destination VG (the second VG arg). The PV(s) to move are named after the
+source and destination VGs, or an LV is named, in which case the PVs
+underlying the LV are moved.
+.P
+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)).
+.P
+LVs cannot be split between VGs; each LV must be entirely on the PVs in
+the source or destination VG.
+.P
+vgsplit can only move complete PVs. (See \fBpvmove\fP(8) for moving part
+of a PV.)
diff --git a/man/vgsplit.8_end b/man/vgsplit.8_end
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/man/vgsplit.8_end
diff --git a/man/vgsplit.8_pregen b/man/vgsplit.8_pregen
new file mode 100644
index 0000000..b128fb8
--- /dev/null
+++ b/man/vgsplit.8_pregen
@@ -0,0 +1,371 @@
+.TH VGSPLIT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
+.
+.SH NAME
+.
+vgsplit \(em Move physical volumes into a new or existing volume group
+.
+.SH SYNOPSIS
+.
+\fBvgsplit\fP \fIoption_args\fP \fIposition_args\fP
+.br
+ [ \fIoption_args\fP ]
+.br
+.
+.SH DESCRIPTION
+.
+vgsplit moves one or more PVs from a source VG (the first VG arg) to a
+destination VG (the second VG arg). The PV(s) to move are named after the
+source and destination VGs, or an LV is named, in which case the PVs
+underlying the LV are moved.
+.P
+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)).
+.P
+LVs cannot be split between VGs; each LV must be entirely on the PVs in
+the source or destination VG.
+.P
+vgsplit can only move complete PVs. (See \fBpvmove\fP(8) for moving part
+of a PV.)
+.
+.SH USAGE
+.
+Split a VG by specified PVs.
+.br
+.P
+\fBvgsplit\fP \fIVG\fP \fIVG\fP \fIPV\fP ...
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Split a VG by PVs in a specified LV.
+.br
+.P
+\fBvgsplit\fP \fB-n\fP|\fB--name\fP \fILV\fP \fIVG\fP \fIVG\fP
+.br
+.RS 4
+.ad l
+[ COMMON_OPTIONS ]
+.ad b
+.RE
+.P
+Common options for command:
+.
+.RS 4
+.ad l
+[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB-l\fP|\fB--maxlogicalvolumes\fP \fINumber\fP ]
+.br
+[ \fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP ]
+.br
+[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
+.br
+[ \fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+]
+.br
+[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--\fP[\fBvg\fP]\fBmetadatacopies\fP \fBall\fP|\fBunmanaged\fP|\fINumber\fP ]
+.ad b
+.RE
+.P
+Common options for lvm:
+.
+.RS 4
+.ad l
+[ \fB-d\fP|\fB--debug\fP ]
+.br
+[ \fB-h\fP|\fB--help\fP ]
+.br
+[ \fB-q\fP|\fB--quiet\fP ]
+.br
+[ \fB-t\fP|\fB--test\fP ]
+.br
+[ \fB-v\fP|\fB--verbose\fP ]
+.br
+[ \fB-y\fP|\fB--yes\fP ]
+.br
+[ \fB--commandprofile\fP \fIString\fP ]
+.br
+[ \fB--config\fP \fIString\fP ]
+.br
+[ \fB--devices\fP \fIPV\fP ]
+.br
+[ \fB--devicesfile\fP \fIString\fP ]
+.br
+[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
+.br
+[ \fB--journal\fP \fIString\fP ]
+.br
+[ \fB--lockopt\fP \fIString\fP ]
+.br
+[ \fB--longhelp\fP ]
+.br
+[ \fB--nohints\fP ]
+.br
+[ \fB--nolocking\fP ]
+.br
+[ \fB--profile\fP \fIString\fP ]
+.br
+[ \fB--version\fP ]
+.ad b
+.RE
+.
+.SH OPTIONS
+.
+.
+.HP
+.ad l
+\fB--alloc\fP \c
+.nh
+\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
+.hy
+.ad b
+.br
+Determines the allocation policy when a command needs to allocate
+Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
+which can be changed with vgchange/lvchange, or overridden on the
+command line.
+\fBnormal\fP applies common sense rules such as not placing parallel stripes
+on the same PV.
+\fBinherit\fP applies the VG policy to an LV.
+\fBcontiguous\fP requires new PEs be placed adjacent to existing PEs.
+\fBcling\fP places new PEs on the same PV as existing PEs in the same
+stripe of the LV.
+If there are sufficient PEs for an allocation, but normal does not
+use them, \fBanywhere\fP will use them even if it reduces performance,
+e.g. by placing two stripes on the same PV.
+Optional positional PV args on the command line can also be used to limit
+which PVs the command will use for allocation.
+See \fBlvm\fP(8) for more information about allocation.
+.
+.HP
+\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
+.br
+Specifies if metadata should be backed up automatically after a change.
+Enabling this is strongly advised! See \fBvgcfgbackup\fP(8) for more information.
+.
+.HP
+\fB--commandprofile\fP \fIString\fP
+.br
+The command profile to use for command configuration.
+See \fBlvm.conf\fP(5) for more information about profiles.
+.
+.HP
+\fB--config\fP \fIString\fP
+.br
+Config settings for the command. These override \fBlvm.conf\fP(5) settings.
+The String arg uses the same format as \fBlvm.conf\fP(5),
+or may use section/field syntax.
+See \fBlvm.conf\fP(5) for more information about config.
+.
+.HP
+\fB-d\fP|\fB--debug\fP ...
+.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).
+.
+.HP
+\fB--devices\fP \fIPV\fP
+.br
+Restricts the devices that are visible and accessible to the command.
+Devices not listed will appear to be missing. This option can be
+repeated, or accepts a comma separated list of devices. This overrides
+the devices file.
+.
+.HP
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
+with the \fBlvmdevices\fP(8) command.
+This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
+\fBdevices/use_devicesfile\fP settings.
+.
+.HP
+\fB--driverloaded\fP \fBy\fP|\fBn\fP
+.br
+If set to no, the command will not attempt to use device-mapper.
+For testing and debugging.
+.
+.HP
+\fB-h\fP|\fB--help\fP
+.br
+Display help text.
+.
+.HP
+\fB--journal\fP \fIString\fP
+.br
+Record information in the systemd journal.
+This information is in addition to information
+enabled by the lvm.conf log/journal setting.
+command: record information about the command.
+output: record the default command output.
+debug: record full command debugging.
+.
+.HP
+\fB--lockopt\fP \fIString\fP
+.br
+Used to pass options for special cases to lvmlockd.
+See \fBlvmlockd\fP(8) for more information.
+.
+.HP
+\fB--longhelp\fP
+.br
+Display long help text.
+.
+.HP
+\fB-l\fP|\fB--maxlogicalvolumes\fP \fINumber\fP
+.br
+Sets the maximum number of LVs allowed in a VG.
+.
+.HP
+\fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP
+.br
+Sets the maximum number of PVs that can belong to the VG.
+The value 0 removes any limitation.
+For large numbers of PVs, also see options --pvmetadatacopies,
+and --vgmetadatacopies for improving performance.
+.
+.HP
+\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
+.br
+Specifies the type of on-disk metadata to use.
+\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
+\fBlvm1\fP (or just \fB1\fP) is no longer used.
+.
+.HP
+\fB-n\fP|\fB--name\fP \fIString\fP
+.br
+Move only PVs used by the named LV.
+.
+.HP
+\fB--nohints\fP
+.br
+Do not use the hints file to locate devices for PVs. A command may read
+more devices to find PVs when hints are not used. The command will still
+perform standard hint file invalidation where appropriate.
+.
+.HP
+\fB--nolocking\fP
+.br
+Disable locking. Use with caution, concurrent commands may produce
+incorrect results.
+.
+.HP
+\fB--poolmetadataspare\fP \fBy\fP|\fBn\fP
+.br
+Enable or disable the automatic creation and management of a
+spare pool metadata LV in the VG. A spare metadata LV is reserved
+space that can be used when repairing a pool.
+.
+.HP
+\fB--profile\fP \fIString\fP
+.br
+An alias for --commandprofile or --metadataprofile, depending
+on the command.
+.
+.HP
+\fB-q\fP|\fB--quiet\fP ...
+.br
+Suppress output and log messages. Overrides --debug and --verbose.
+Repeat once to also suppress any prompts with answer 'no'.
+.
+.HP
+\fB-t\fP|\fB--test\fP
+.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
+\fB-v\fP|\fB--verbose\fP ...
+.br
+Set verbose level. Repeat from 1 to 4 times to increase the detail
+of messages sent to stdout and stderr.
+.
+.HP
+\fB--version\fP
+.br
+Display version information.
+.
+.HP
+\fB--\fP[\fBvg\fP]\fBmetadatacopies\fP \fBall\fP|\fBunmanaged\fP|\fINumber\fP
+.br
+Number of copies of the VG metadata that are kept.
+VG metadata is kept in VG metadata areas on PVs in the VG,
+i.e. reserved space at the start and/or end of the PVs.
+Keeping a copy of the VG metadata on every PV can reduce performance
+in VGs containing a large number of PVs.
+When this number is set to a non-zero value, LVM will automatically
+choose PVs on which to store metadata, using the metadataignore flags
+on PVs to achieve the specified number.
+The number can also be replaced with special string values:
+\fBunmanaged\fP causes LVM to not automatically manage the PV
+metadataignore flags.
+\fBall\fP causes LVM to first clear the metadataignore flags on
+all PVs, and then to become unmanaged.
+.
+.HP
+\fB-y\fP|\fB--yes\fP
+.br
+Do not prompt for confirmation interactively but always assume the
+answer yes. Use with extreme caution.
+(For automatic no, see -qq.)
+.
+.SH VARIABLES
+.
+.TP
+.I VG
+Volume Group name. See \fBlvm\fP(8) for valid names.
+.TP
+.I PV
+Physical Volume name, a device path under /dev.
+For commands managing physical extents, a PV positional arg
+generally accepts a suffix indicating a range (or multiple ranges)
+of physical extents (PEs). When the first PE is omitted, it defaults
+to the start of the device, and when the last PE is omitted it defaults to end.
+Start and end range (inclusive): \fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
+Start and length range (counting from 0): \fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
+.TP
+.I String
+See the option description for information about the string content.
+.TP
+.IR Size [UNIT]
+Size is an input number that accepts an optional unit.
+Input units are always treated as base two values, regardless of
+capitalization, e.g. 'k' and 'K' both refer to 1024.
+The default input unit is specified by letter, followed by |UNIT.
+UNIT represents other possible input units:
+.BR b | B
+is bytes,
+.BR s | S
+is sectors of 512 bytes,
+.BR k | K
+is KiB,
+.BR m | M
+is MiB,
+.BR g | G
+is GiB,
+.BR t | T
+is TiB,
+.BR p | P
+is PiB,
+.BR e | E
+is EiB.
+(This should not be confused with the output control --units, where
+capital letters mean multiple of 1000.)
+.
+.SH ENVIRONMENT VARIABLES
+.
+See \fBlvm\fP(8) for information about environment variables used by lvm.
+For example, LVM_VG_NAME can generally be substituted for a required VG parameter.