From 48432c882ea892b675c36ad73e2feed769ea014d Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Fri, 18 Aug 2006 21:49:19 +0000 Subject: [PATCH] Add mirroring into man pages --- WHATS_NEW | 2 ++ man/Makefile.in | 3 ++- man/lvchange.8 | 6 +++++ man/lvconvert.8 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++ man/lvcreate.8 | 25 ++++++++++++++++++++- man/lvextend.8 | 6 +++++ man/lvreduce.8 | 6 +++++ man/vgchange.8 | 7 ++++++ 8 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 man/lvconvert.8 diff --git a/WHATS_NEW b/WHATS_NEW index e96aaa2ef..648c00793 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,7 @@ Version 2.02.10 - ================================== + Add lvconvert man page. + Add mirror options to man pages. Prevent mirror renames. Move CMDLIB code into separate file and record whether static build. diff --git a/man/Makefile.in b/man/Makefile.in index 4b2e291c2..85a912347 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -17,7 +17,8 @@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ MAN5=lvm.conf.5 -MAN8=lvchange.8 lvcreate.8 lvdisplay.8 lvextend.8 lvm.8 lvmchange.8 \ +MAN8=lvchange.8 lvconvert.8 lvcreate.8 lvdisplay.8 lvextend.8 lvm.8 + lvmchange.8 \ lvmdiskscan.8 lvreduce.8 lvremove.8 lvrename.8 lvresize.8 lvs.8 \ lvscan.8 pvchange.8 pvcreate.8 pvdisplay.8 pvmove.8 pvremove.8 \ pvresize.8 pvs.8 pvscan.8 vgcfgbackup.8 vgcfgrestore.8 vgchange.8 \ diff --git a/man/lvchange.8 b/man/lvchange.8 index 1cdf3e424..bfa688bf9 100644 --- a/man/lvchange.8 +++ b/man/lvchange.8 @@ -9,6 +9,7 @@ lvchange \- change attributes of a logical volume [\-C/\-\-contiguous y/n] [\-d/\-\-debug] [\-\-deltag Tag] [\-h/\-?/\-\-help] [\-\-ignorelockingfailure] +[\-\-monitor {y|n}] [\-M/\-\-persistent y/n] [\-\-minor minor] [\-P/\-\-partial y/n] [\-p/\-\-permission r/w] [\-r/\-\-readahead ReadAheadSectors] @@ -42,6 +43,11 @@ allocated physical extents are already contiguous. .I \-\-minor minor Set the minor number. .TP +.I \-\-monitor y/n +Controls whether the mirrored logical volume is monitored by +dmeventd. If monitored (the default), a failed mirror device +will automatically be removed from the volume group. +.TP .I \-M, \-\-persistent y/n Set to y to make the minor number specified persistent. .TP diff --git a/man/lvconvert.8 b/man/lvconvert.8 new file mode 100644 index 000000000..e744873ab --- /dev/null +++ b/man/lvconvert.8 @@ -0,0 +1,59 @@ +.TH LVCONVERT 8 "LVM TOOLS" "Red Hat, Inc" \" -*- nroff -*- +.SH NAME +lvconvert \- convert a logical volume between linear and mirror +.SH SYNOPSIS +.B lvconvert +[\-m/\-\-mirrors Mirrors [\-\-corelog]] +[\-A/\-\-alloc AllocationPolicy] +[\-h/\-?/\-\-help] +[\-v/\-\-verbose] +[\-\-version] +LogicalVolume[Path] [PhysicalVolume[Path]...] +.br + +.SH DESCRIPTION +lvconvert will change a linear logical volume to a mirror +logical volume or vis versa. It is also used to add and +remove disk logs from mirror devices. +.SH OPTIONS +See \fBlvm\fP for common options. +.TP +.I \-m, \-\-mirrors Mirrors +Specifies the degree of the mirror you wish to create. +For example, "-m 1" would convert the original logical +volume to a mirror volume with 2-sides; that is, a +linear volume plus one copy. +.TP +.I \-\-corelog +This optional argument tells lvconvert to switch the +mirror from using a disk-based (persistent) log to +an in-memory log. You may only specify this option +when the \-\-mirror argument is the same degree of +the mirror you are changing. +.SH Examples +"lvconvert -m1 vg00/lvol1" +.br +converts the linear logical volume "vg00/lvol1" to +a mirror logical volume. This command could also +be used to convert a two-way mirror with an +in-memory log to a two-way mirror with a disk log. + +"lvconvert -m1 --corelog vg00/lvol1" +.br +converts a two-way mirror with a disk log to a +two-way mirror with an in-memory log. + +"lvconvert -m0 vg00/lvol1" +.br +converts a mirror logical volume to a linear logical +volume. + +.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/lvcreate.8 b/man/lvcreate.8 index a3717ab6a..52482990b 100644 --- a/man/lvcreate.8 +++ b/man/lvcreate.8 @@ -11,6 +11,7 @@ lvcreate \- create a logical volume in an existing volume group {\-l/\-\-extents LogicalExtentsNumber | \-L/\-\-size LogicalVolumeSize[kKmMgGtT]} [\-M/\-\-persistent y/n] [\-\-minor minor] +[\-m/\-\-mirrors Mirrors [\-\-nosync] [\-\-corelog]] [\-n/\-\-name LogicalVolumeName] [\-p/\-\-permission r/rw] [\-r/\-\-readahead ReadAheadSectors] [-R|--regionsize MirrorLogRegionSize] @@ -79,6 +80,23 @@ Set the minor number. .I \-M, \-\-persistent y/n Set to y to make the minor number specified persistent. .TP +.I \-m, \-\-mirrors Mirrors +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. + +Specifying the optional argument "--corelog" will create a mirror with +an in-memory log verses a disk-based (persistent) log. While this +removes the need for an extra log device and *may* be slightly faster, +it requires that the entire mirror be resynchronized upon each +instantiation (e.g. a reboot). +.TP .I \-n, \-\-name LogicalVolumeName The name for the new logical volume. .br @@ -122,10 +140,15 @@ Default is yes. Warning: trying to mount an unzeroed logical volume can cause the system to hang. .SH Examples -"lvcreate -i 3 -I 8 -L 100 vg00" tries to create a striped logical +"lvcreate -i 3 -I 8 -L 100M vg00" tries to create 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. +"lvcreate -m1 -L 500M vg00" tries to create a mirror logical volume +with 2 sides with a useable size of 500 MiB. This operation would +require 3 devices - two for the mirror devices and one for the disk +log. + "lvcreate --size 100m --snapshot --name snap /dev/vg00/lvol1" .br creates a snapshot logical volume named /dev/vg00/snap which has access to the diff --git a/man/lvextend.8 b/man/lvextend.8 index c55acec7c..266e9f7dc 100644 --- a/man/lvextend.8 +++ b/man/lvextend.8 @@ -15,6 +15,11 @@ lvextend allows you to extend the size of a logical volume. Extension of snapshot logical volumes (see .B lvcreate(8) for information to create snapshots) is supported as well. + +You can not use lvextend to increase the number of mirrors in a +mirrored logical volume. For that, see +.BR lvconvert (8). + .SH OPTIONS See \fBlvm\fP for common options. .TP @@ -48,6 +53,7 @@ there are enough free physical extents in it. .SH SEE ALSO .BR lvm (8), .BR lvcreate (8), +.BR lvconvert (8), .BR lvreduce (8), .BR lvresize (8), .BR lvchange (8) diff --git a/man/lvreduce.8 b/man/lvreduce.8 index 068494ca1..a3dea7939 100644 --- a/man/lvreduce.8 +++ b/man/lvreduce.8 @@ -25,6 +25,11 @@ for information to create snapshots) is supported as well. 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 +You can not use lvreduce to reduce the number of mirrors in a +mirrored logical volume. For that, see +.BR lvconvert (8). + .SH OPTIONS See \fBlvm\fP for common options. .TP @@ -49,6 +54,7 @@ an absolute size. in volume group vg00 by 3 logical extents. .SH SEE ALSO .BR lvchange (8), +.BR lvconvert (8), .BR lvcreate (8), .BR lvextend (8), .BR lvm (8), diff --git a/man/vgchange.8 b/man/vgchange.8 index fa3d6603b..16240b7d0 100644 --- a/man/vgchange.8 +++ b/man/vgchange.8 @@ -9,6 +9,7 @@ vgchange \- change attributes of a volume group .IR AllocationPolicy ] .RB [ \-A | \-\-autobackup " {" y | n }] .RB [ \-a | \-\-available " [e|l] {" y | n }] +.RB [ \-\-monitor " {" y | n }] .RB [ \-d | \-\-debug] .RB [ \-\-deltag .IR Tag ] @@ -59,6 +60,12 @@ 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 \-\-monitor { y | n } +Controls whether the mirrored logical volumes in the volume +group are monitored by dmeventd. If monitored (the default), +a failed mirror device will automatically be removed from the +volume group. +.TP .BR \-l ", " \-\-logicalvolume " " \fIMaxLogicalVolumes\fR Changes the maximum logical volume number of an existing inactive volume group. -- 2.43.5