1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Update man pages

Use one style for man pages.
This commit is contained in:
Zdenek Kabelac 2012-04-11 12:42:10 +00:00
parent 5dc27b75eb
commit c63b155d16
49 changed files with 1520 additions and 1312 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.96 - Version 2.02.96 -
================================ ================================
Update man pages to give them same look&feel.
Fix lvresize of thin pool for stipped devices. Fix lvresize of thin pool for stipped devices.
For lvresize round upward when specifying number of extents. For lvresize round upward when specifying number of extents.
For lvcreate with %FREE support rounding downward strip alignment. For lvcreate with %FREE support rounding downward strip alignment.

View File

@ -3,63 +3,102 @@
clvmd \- cluster LVM daemon clvmd \- cluster LVM daemon
.SH SYNOPSIS .SH SYNOPSIS
.B clvmd .B clvmd
[\-d[<value>]] [\-C] [\-h] .RB [ \-d
[\-E <lock uuid>] .RI [< value >]
[\-R] .RB [ \-C ]]
[\-S] .RB [ \-E
[\-t <timeout>] .RI < "lock uuid" >]
[\-T <start timeout>] .RB [ \-f ]
[\-V] .RB [ \-h ]
.RB [ \-I
.IR "cluster_manager" ]
.RB [ \-R ]
.RB [ \-S ]
.RB [ \-t
.RI < timeout >]
.RB [ \-T
.RI < "start timeout" >]
.RB [ \-V ]
.SH DESCRIPTION .SH DESCRIPTION
clvmd is the daemon that distributes LVM metadata updates around a cluster. 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 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. if a node in the cluster does not have this daemon running.
.SH OPTIONS .SH OPTIONS
.TP .TP
.I \-d[<value>] .BR \-d [< \fIvalue >]
Enable debug logging. Value can be 0, 1 or 2. Enable debug logging. Value can be 0, 1 or 2.
.br .br
0 disables debug logging 0 disables debug logging
.br .br
1 sends debug logs to stderr (implies -f option) 1 sends debug logs to stderr (implies \fB\-f\fP option)
.br .br
2 sends debug logs to syslog 2 sends debug logs to syslog
.br .br
If If
.B -d .B \-d
is specified without a value then 1 is assumed. is specified without a value then 1 is assumed.
.TP .TP
.I \-C .B \-C
Only valid if Only valid if
.B -d .B \-d
is also specified. Tells all clvmds in a cluster to enable/disable debug logging. 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 Without this switch, only the local clvmd will change its debug level to that
given with given with
.B -d. .B \-d
.
.br .br
This does not work correctly if specified on the command-line that starts clvmd. This does not work correctly if specified on the command-line that starts clvmd.
If you want to start clvmd If you want to start clvmd
.B and .B and
enable cluster-wide logging then the command needs to be issued twice, eg: enable cluster-wide logging then the command needs to be issued twice, eg:
.br .br
clvmd .B clvmd
.br .br
clvmd -d2 .B clvmd -d2
.br .br
.TP .TP
.I \-t <timeout> .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 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 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. may need to increase this on systems with very large disk farms.
The default is 30 seconds. The default is 30 seconds.
.TP .TP
.I \-T <start timeout> .BR \-T < "\fIstart timeout" >
Specifies the timeout for clvmd daemon startup. If the daemon does not report 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 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 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 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 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 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 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 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. to exit in a timely fashion even if the cluster is stalled for some reason.
@ -70,30 +109,7 @@ sensible.
.br .br
This timeout will be ignored if you start clvmd with the -d switch. This timeout will be ignored if you start clvmd with the -d switch.
.TP .TP
.I \-E <lock uuid> .B \-V
Pass lock uuid to be reacquired exclusively when clvmd is restarted.
.TP
.I \-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
.I \-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
.I \-I
Selects the cluster manager to use for locking and internal communications,
the available managers will be listed as part of the 'clvmd -h' 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
.I \-V
Display the version of the cluster LVM daemon. Display the version of the cluster LVM daemon.
.SH ENVIRONMENT VARIABLES .SH ENVIRONMENT VARIABLES

View File

@ -14,28 +14,27 @@ fsadm \- utility to resize or check filesystem on a device
.RI [ new_size [ BKMGTEP ]] .RI [ new_size [ BKMGTEP ]]
.sp .sp
.SH DESCRIPTION .SH DESCRIPTION
.B fsadm fsadm utility checks or resizes the filesystem on a device.
utility checks or resizes the filesystem on a device.
It tries to use the same API for It tries to use the same API for
.IR ext2 , ext3 , ext4 , ReiserFS .IR ext2 ", " ext3 ", " ext4 ", " ReiserFS " and " XFS
and \fIXFS\fP filesystem. filesystem.
.SH OPTIONS .SH OPTIONS
.TP .TP
.BR \-h ", " \-\-help
Display the help text.
.TP
.BR \-v ", " \-\-verbose
Be more verbose.
.TP
.BR \-e ", " \-\-ext\-offline .BR \-e ", " \-\-ext\-offline
Unmount ext2/ext3/ext4 filesystem before doing resize. Unmount ext2/ext3/ext4 filesystem before doing resize.
.TP .TP
.BR \-f ", " \-\-force .BR \-f ", " \-\-force
Bypass some sanity checks. Bypass some sanity checks.
.TP .TP
.BR \-h ", " \-\-help
Display the help text.
.TP
.BR \-n ", " \-\-dry\-run .BR \-n ", " \-\-dry\-run
Print commands without running them. Print commands without running them.
.TP .TP
.BR \-v ", " \-\-verbose
Be more verbose.
.TP
.BR \-y ", " \-\-yes .BR \-y ", " \-\-yes
Answer "yes" at any prompts. Answer "yes" at any prompts.
.TP .TP

View File

@ -3,49 +3,68 @@
lvchange \- change attributes of a logical volume lvchange \- change attributes of a logical volume
.SH SYNOPSIS .SH SYNOPSIS
.B lvchange .B lvchange
[\-\-addtag Tag] .RB [ \-\-addtag
[\-A|\-\-autobackup y|n] [\-a|\-\-available y|n|ey|en|ly|ln] .IR Tag ]
[\-\-alloc AllocationPolicy] .RB [ \-A | \-\-autobackup
[\-C|\-\-contiguous y|n] [\-d|\-\-debug] [\-\-deltag Tag] .RI { y | n }]
[\-\-resync] .RB [ \-a | \-\-available
[\-h|\-?|\-\-help] .RI [ e | l ]{ y | n }]
[\-\-ignorelockingfailure] .RB [ \-\-alloc
[\-\-ignoremonitoring] .IR AllocationPolicy ]
[\-\-monitor {y|n}] .RB [ \-C | \-\-contiguous
[\-\-poll {y|n}] .RI { y | n }]
[\-\-sysinit] .RB [ \-d | \-\-debug ]
[\-\-noudevsync] .RB [ \-\-deltag
[\-M|\-\-persistent y|n] [\-\-minor minor] .IR Tag ]
[\-P|\-\-partial] .RB [ \-\-resync ]
[\-p|\-\-permission r|rw] [\-r/\-\-readahead ReadAheadSectors|auto|none] .RB [ \-h | \-? | \-\-help ]
[\-\-refresh] .RB [ \-\-ignorelockingfailure ]
[\-t|\-\-test] .RB [ \-\-ignoremonitoring ]
[\-v|\-\-verbose] LogicalVolumePath [LogicalVolumePath...] .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]
.I LogicalVolumePath
.RI [ LogicalVolumePath ...]
.SH DESCRIPTION .SH DESCRIPTION
lvchange allows you to change the attributes of a logical volume lvchange allows you to change the attributes of a logical volume
including making them known to the kernel ready for use. including making them known to the kernel ready for use.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.I \-a, \-\-available y|n|ey|en|ly|ln .BR \-a ", " \-\-available " [" \fIe | \fIl ]{ \fIy | \fIn }
Controls the availability of the logical volumes for use. Controls the availability of the logical volumes for use.
Communicates with the kernel device-mapper driver via Communicates with the kernel device-mapper driver via
libdevmapper to activate (-ay) or deactivate (-an) the libdevmapper to activate (\-ay) or deactivate (\-an) the
logical volumes. logical volumes.
.IP .IP
If clustered locking is enabled, -aey will activate exclusively If clustered locking is enabled, -aey will activate exclusively
on one node and -aly will activate only on the local node. on one node and -aly will activate only on the local node.
To deactivate only on the local node use -aln. To deactivate only on the local node use -aln.
Logical volumes with single-host snapshots are always activated Logical volumes with single-host snapshots are always activated
exclusively because they can only be used on one node at once. exclusively because they can only be used on one node at once.
.TP .TP
.I \-C, \-\-contiguous y|n .BR \-C ", " \-\-contiguous " {" \fIy | \fIn }
Tries to set or reset the contiguous allocation policy for Tries to set or reset the contiguous allocation policy for
logical volumes. It's only possible to change a non-contiguous logical volumes. It's only possible to change a non-contiguous
logical volume's allocation policy to contiguous, if all of the logical volume's allocation policy to contiguous, if all of the
allocated physical extents are already contiguous. allocated physical extents are already contiguous.
.TP .TP
.I \-\-resync .B \-\-resync
Forces the complete resynchronization of a mirror. In normal Forces the complete resynchronization of a mirror. In normal
circumstances you should not need this option because synchronization circumstances you should not need this option because synchronization
happens automatically. Data is read from the primary mirror device happens automatically. Data is read from the primary mirror device
@ -53,53 +72,55 @@ 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 time - and during this time you are without a complete redundant copy
of your data. of your data.
.TP .TP
.I \-\-minor minor .B \-\-minor \fIminor
Set the minor number. Set the minor number.
.TP .TP
.I \-\-monitor y|n .BR \-\-monitor " {" \fIy | \fIn }
Start or stop monitoring a mirrored or snapshot logical volume with Start or stop monitoring a mirrored or snapshot logical volume with
dmeventd, if it is installed. dmeventd, if it is installed.
If a device used by a monitored mirror reports an I/O error, If a device used by a monitored mirror reports an I/O error,
the failure is handled according to the failure is handled according to
\fBmirror_image_fault_policy\fP and \fBmirror_log_fault_policy\fP \fBmirror_image_fault_policy\fP and \fBmirror_log_fault_policy\fP
set in \fBlvm.conf\fP. set in \fBlvm.conf\fP.
.TP .TP
.I \-\-poll y|n .BR \-\-poll " {" \fIy | \fIn }
Without polling a logical volume's backgrounded transformation process Without polling a logical volume's backgrounded transformation process
will never complete. If there is an incomplete pvmove or lvconvert (for 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 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 process from its last checkpoint. However, it may not be appropriate to
immediately poll a logical volume when it is activated, use \fB--poll immediately poll a logical volume when it is activated, use
n\fP to defer and then \fB--poll y\fP to restart the process. \fB\-\-poll n\fP to defer and then \fB\-\-poll y\fP to restart the process.
.TP .TP
.I \-\-sysinit .B \-\-sysinit
Indicates that lvchange(8) is being invoked from early system initialisation Indicates that \fBlvchange\fP(8) is being invoked from early system
scripts (e.g. rc.sysinit or an initrd), before writeable filesystems are initialisation scripts (e.g. rc.sysinit or an initrd),
available. As such, some functionality needs to be disabled and this option 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 acts as a shortcut which selects an appropriate set of options. Currently
this is equivalent to using \fB--ignorelockingfailure\fP, \fB--ignoremonitoring\fP, this is equivalent to using \fB\-\-ignorelockingfailure\fP,
\fB--poll n\fP and setting \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP \fB\-\-ignoremonitoring\fP, \fB\-\-poll n\fP and setting
\fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
environment variable. environment variable.
.TP .TP
.I \-\-noudevsync .B \-\-noudevsync
Disable udev synchronisation. The Disable udev synchronisation. The
process will not wait for notification from udev. process will not wait for notification from udev.
It will continue irrespective of any possible udev processing It will continue irrespective of any possible udev processing
in the background. You should only use this if udev is not running in the background. You should only use this if udev is not running
or has rules that ignore the devices LVM2 creates. or has rules that ignore the devices LVM2 creates.
.TP .TP
.I \-\-ignoremonitoring .B \-\-ignoremonitoring
Make no attempt to interact with dmeventd unless \-\-monitor Make no attempt to interact with dmeventd unless \fB\-\-monitor\fP
is specified. is specified.
Do not use this if dmeventd is already monitoring a device. Do not use this if dmeventd is already monitoring a device.
.TP .TP
.I \-M, \-\-persistent y|n .BR \-M ", " \-\-persistent " {" \fIy | \fIn }
Set to y to make the minor number specified persistent. Set to y to make the minor number specified persistent.
.TP .TP
.I \-p, \-\-permission r|rw .BR \-p ", " \-\-permission " {" \fIr | \fIrw }
Change access permission to read-only or read/write. Change access permission to read-only or read/write.
.TP .TP
.I \-r, \-\-readahead ReadAheadSectors|auto|none .BR \-r ", " \-\-readahead " {" \fIReadAheadSectors | \fIauto | \fInone }
Set read ahead sector count of this logical volume. Set read ahead sector count of this logical volume.
For volume groups with metadata in lvm1 format, this must For volume groups with metadata in lvm1 format, this must
be a value between 2 and 120 sectors. be a value between 2 and 120 sectors.
@ -107,16 +128,16 @@ The default value is "auto" which allows the kernel to choose
a suitable value automatically. a suitable value automatically.
"None" is equivalent to specifying zero. "None" is equivalent to specifying zero.
.TP .TP
.I \-\-refresh .B \-\-refresh
If the logical volume is active, reload its metadata. If the logical volume is active, reload its metadata.
This is not necessary in normal operation, but may be useful This is not necessary in normal operation, but may be useful
if something has gone wrong or if you're doing clustering if something has gone wrong or if you're doing clustering
manually without a clustered lock manager. manually without a clustered lock manager.
.SH Examples .SH Examples
"lvchange -pr vg00/lvol1" changes the permission on Changes the permission on volume lvol1 in volume group vg00 to be read-only:
volume lvol1 in volume group vg00 to be read-only. .sp
.B lvchange -pr vg00/lvol1
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR lvcreate (8), .BR lvcreate (8),
.BR vgchange (8) .BR vgchange (8)

View File

@ -3,62 +3,75 @@
lvconvert \- convert a logical volume from linear to mirror or snapshot lvconvert \- convert a logical volume from linear to mirror or snapshot
.SH SYNOPSIS .SH SYNOPSIS
.B lvconvert .B lvconvert
\-m|\-\-mirrors Mirrors [\-\-mirrorlog {disk|core|mirrored}] [\-\-corelog] [\-R|\-\-regionsize MirrorLogRegionSize] .BR \-m | \-\-mirrors
[\-\-type SegmentType] .I Mirrors
[\-A|\-\-alloc AllocationPolicy] .RB [ \-\-mirrorlog
[\-b|\-\-background] [\-f|\-\-force] [\-i|\-\-interval Seconds] .RI { disk | core | mirrored }]
[\-h|\-?|\-\-help] .RB [ \-\-corelog ]
[\-\-stripes Stripes [\-I|\-\-stripesize StripeSize]] .RB [ \-R | \-\-regionsize
[\-\-noudevsync] .IR MirrorLogRegionSize ]
[\-v|\-\-verbose] [\-y|\-\-yes] .RB [ \-\-type
[\-\-version] .IR SegmentType ]
.br .RB [ \-A | \-\-alloc
LogicalVolume[Path] [PhysicalVolume[Path][:PE[-PE]]...] .IR AllocationPolicy ]
.br .RB [ \-b | \-\-background ]
.RB [ \-f | \-\-force ]
.br .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 .B lvconvert
\-\-splitmirrors Images [\-\-name SplitLogicalVolumeName] [\-\-trackchanges] .BR \-s | \-\-snapshot
.br .RB [ \-c | \-\-chunksize
MirrorLogicalVolume[Path] [SplittablePhysicalVolume[Path][:PE[-PE]]...] .IR ChunkSize ]
.br .RB [ \-h | \-? | \-\-help ]
.RB [ \-\-noudevsync ]
.br .RB [ \-v | \-\-verbose ]
.B lvconvert .RB [ \-Z | \-\-zero
\-s|\-\-snapshot [\-c|\-\-chunksize ChunkSize] .RI { y | n }]
[\-h|\-?|\-\-help] .RB [ \-\-version ]
[\-\-noudevsync] .IR OriginalLogicalVolume [ Path ]
[\-v|\-\-verbose] .IR SnapshotLogicalVolume [ Path ]
[\-Z|\-\-zero y|n] .sp
[\-\-version] .B lvconvert \-\-merge
.br .RB [ \-b | \-\-background ]
OriginalLogicalVolume[Path] SnapshotLogicalVolume[Path] .RB [ \-i | \-\-interval
.br .IR Seconds ]
.RB [ \-h | \-? | \-\-help ]
.br .RB [ \-v | \-\-verbose ]
.B lvconvert .RB [ \-\-version ]
\-\-merge [\-b|\-\-background] [\-i|\-\-interval Seconds] .IR LogicalVolume [ Path ]...
[\-h|\-?|\-\-help] .sp
[\-v|\-\-verbose] .B lvconvert \-\-repair
[\-\-version] .RB [ \-h | \-? | \-\-help ]
LogicalVolume[Path]... .RB [ \-v | \-\-verbose ]
.br .RB [ \-\-version ]
.IR LogicalVolume [ Path ]
.br .RI [ PhysicalVolume [ Path ]...]
.B lvconvert .sp
\-\-repair .B lvconvert \-\-replace \fIPhysicalVolume
[\-h|\-?|\-\-help] .RB [ \-h | \-? | \-\-help ]
[\-v|\-\-verbose] .RB [ \-v | \-\-verbose ]
[\-\-version] .RB [ \-\-version ]
LogicalVolume[Path] [PhysicalVolume[Path]...] .IR LogicalVolume [ Path ]
.RI [ PhysicalVolume [ Path ]...]
.br
.B lvconvert
\-\-replace PhysicalVolume
[\-h|\-?|\-\-help]
[\-v|\-\-verbose]
[\-\-version]
LogicalVolume[Path] [PhysicalVolume[Path]...]
.SH DESCRIPTION .SH DESCRIPTION
lvconvert is used to change the segment type (i.e. linear, mirror, etc) or lvconvert is used to change the segment type (i.e. linear, mirror, etc) or
@ -75,19 +88,19 @@ these physical extents. If the conversion frees physical extents
mirror legs) and you specify one or more PhysicalVolumes, mirror legs) and you specify one or more PhysicalVolumes,
the freed extents come first from the specified PhysicalVolumes. the freed extents come first from the specified PhysicalVolumes.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.br
Exactly one of \-\-splitmirrors, \-\-mirrors, \-\-repair, \-\-snapshot
or \-\-merge arguments is required.
.br .br
Exactly one of
.BR \-\-splitmirrors ", " \-\-mirrors ", " \-\-repair ", " \-\-snapshot
or \fB\-\-merge\fP arguments is required.
.TP .TP
.I \-m, \-\-mirrors Mirrors .BR \-m ", " \-\-mirrors " " \fIMirrors
Specifies the degree of the mirror you wish to create. Specifies the degree of the mirror you wish to create.
For example, "-m 1" would convert the original logical For example, "\fB-m 1\fP" would convert the original logical
volume to a mirror volume with 2-sides; that is, a volume to a mirror volume with 2-sides; that is, a
linear volume plus one copy. linear volume plus one copy.
.TP .TP
.I \-\-mirrorlog {disk|core|mirrored} .IR \fB\-\-mirrorlog " {" disk | core | mirrored }
Specifies the type of log to use. Specifies the type of log to use.
The default is disk, which is persistent and requires The default is disk, which is persistent and requires
a small amount of storage space, usually on a separate device a small amount of storage space, usually on a separate device
@ -97,76 +110,69 @@ regenerated by copying the data from the first device again every
time the device is activated - perhaps, for example, after every reboot. time the device is activated - perhaps, for example, after every reboot.
Using "mirrored" will create a persistent log that is itself mirrored. Using "mirrored" will create a persistent log that is itself mirrored.
.TP .TP
.I \-\-corelog .B \-\-corelog
The optional argument "--corelog" is the same as specifying "--mirrorlog core". The optional argument \fB--corelog\fP is the same as specifying
\fB--mirrorlog core\fP.
.TP .TP
.I \-R, \-\-regionsize MirrorLogRegionSize .BR \-R ", " \-\-regionsize " " \fIMirrorLogRegionSize
A mirror is divided into regions of this size (in MB), and the mirror log 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. uses this granularity to track which regions are in sync.
.TP .TP
.I \-\-type SegmentType .B \-\-type \fISegmentType
Used to convert a logical volume to another segment type or to explicitly state Used to convert a logical volume to another segment type or to explicitly state
the desired RAID1 segment type ("mirror" or "raid1") when converting a linear the desired RAID1 segment type (\fImirror\fP or \fIraid1\fP) when converting
logical volume to a mirror with the '-m' argument. a linear logical volume to a mirror with the \fB-m\fP argument.
.TP .TP
.I \-b, \-\-background .BR \-b ", " \-\-background
Run the daemon in the background. Run the daemon in the background.
.TP .TP
.I \-i, \-\-interval Seconds .BR \-i ", " \-\-interval " " \fISeconds
Report progress as a percentage at regular intervals. Report progress as a percentage at regular intervals.
.br
.TP .TP
.I \-\-noudevsync .B \-\-noudevsync
Disable udev synchronisation. The Disable udev synchronisation. The
process will not wait for notification from udev. process will not wait for notification from udev.
It will continue irrespective of any possible udev processing It will continue irrespective of any possible udev processing
in the background. You should only use this if udev is not running in the background. You should only use this if udev is not running
or has rules that ignore the devices LVM2 creates. or has rules that ignore the devices LVM2 creates.
.br
.TP .TP
.I \-\-splitmirrors Images .B \-\-splitmirrors \fIImages
The number of redundant Images of a mirror to be split off and used 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 to form a new logical volume. A name must be supplied for the
newly-split-off logical volume using the \-\-name argument, unless newly-split-off logical volume using the \fB\-\-name\fP argument, unless
the \-\-trackchanges argument is given. the \fB\-\-trackchanges\fP argument is given.
.TP .TP
.I \-n Name .B \-n \fIName
The name to apply to a logical volume which has been split off from The name to apply to a logical volume which has been split off from
a mirror logical volume. a mirror logical volume.
.br
.TP .TP
.I \-\-trackchanges .B \-\-trackchanges
Used with \-\-splitmirrors on a raid1 device, this tracks changes so that the Used with \fB\-\-splitmirrors\fP on a raid1 device, this tracks changes so
read-only detached image can be merged efficiently back into the mirror later. that the read-only detached image can be merged efficiently back into
Only the regions of the detatched device where the data changed get resynchronized. 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 Please note that this feature is only supported with the new md-based mirror
implementation and not with the original device-mapper mirror implementation. implementation and not with the original device-mapper mirror implementation.
.br
.TP .TP
.I \-s, \-\-snapshot .B \-s, \-\-snapshot
Create a snapshot from existing logical volume using another Create a snapshot from existing logical volume using another
existing logical volume as its origin. existing logical volume as its origin.
.TP .TP
.I \-c, \-\-chunksize ChunkSize .BR \-c ", " \-\-chunksize " " \fIChunkSize
Power of 2 chunk size for the snapshot logical volume between 4k and 512k. Power of 2 chunk size for the snapshot logical volume between 4KiB and 512KiB.
.TP .TP
.I \-Z, \-\-zero y|n .BR \-Z ", " \-\-zero " {" \fIy | \fIn }
Controls zeroing of the first KB of data in the snapshot. Controls zeroing of the first KB of data in the snapshot.
If the volume is read-only the snapshot will not be zeroed. If the volume is read-only the snapshot will not be zeroed.
.TP .TP
.I \-\-merge .B \-\-merge
Merges a snapshot into its origin volume or merges a raid1 image that has Merges a snapshot into its origin volume or merges a raid1 image that has
been split from its mirror with \-\-trackchanges back into its mirror. been split from its mirror with \fB\-\-trackchanges\fP back into its mirror.
To check if your kernel supports the snapshot merge feature, look To check if your kernel supports the snapshot merge feature, look
for 'snapshot-merge' in the output for 'snapshot-merge' in the output
of 'dmsetup targets'. If both the origin and snapshot volume are not of \fBdmsetup targets\fP. If both the origin and snapshot volume are not
open the merge will start immediately. Otherwise, the merge will start 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. 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 Merging a snapshot into an origin that cannot be closed, for example a root
@ -177,122 +183,107 @@ origin appear as they were directed to the snapshot being merged. When the
merge finishes, the merged snapshot is removed. Multiple snapshots may merge finishes, the merged snapshot is removed. Multiple snapshots may
be specified on the commandline or a @tag may be used to specify be specified on the commandline or a @tag may be used to specify
multiple snapshots be merged to their respective origin. multiple snapshots be merged to their respective origin.
.br
.TP .TP
.I \-\-repair .B \-\-repair
Repair a mirror after suffering a disk failure. The mirror will be brought back 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 into a consistent state. By default, the original number of mirrors will be
restored if possible. Specify \-y on the command line to skip the prompts. restored if possible. Specify \fB\-y\fP on the command line to skip
Use \-f if you do not want any replacement. Additionally, you may use the prompts. Use \fB\-f\fP if you do not want any replacement.
\-\-use-policies to use the device replacement policy specified in lvm.conf, 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 viz. activation/mirror_log_fault_policy or
activation/mirror_device_fault_policy. activation/mirror_device_fault_policy.
.br
.TP .TP
.I \-\-replace PhysicalVolume .B \-\-replace \fIPhysicalVolume
Remove the specified device (PhysicalVolume) and replace it with one that is Remove the specified device (\fIPhysicalVolume\fP) and replace it with one
available in the volume group or from the specific list provided. This option that is available in the volume group or from the specific list provided.
is only available to RAID segment types (e.g. "raid1", "raid5", etc). This option is only available to RAID segment types
.br (e.g. "raid1", "raid5", etc).
.SH Examples .SH Examples
"lvconvert -m1 vg00/lvol1" Converts the linear logical volume "vg00/lvol1" to a two-way mirror
.br logical volume:
converts the linear logical volume "vg00/lvol1" to .sp
a two-way mirror logical volume. .B lvconvert \-m1 vg00/lvol1
.br
.SH Examples
"lvconvert --type raid1 -m1 vg00/lvol1"
.br
converts the linear logical volume "vg00/lvol1" to a two-way RAID1
logical volume.
"lvconvert --mirrorlog core vg00/lvol1" Converts the linear logical volume "vg00/lvol1" to a two-way RAID1
.br logical volume:
converts a mirror with a disk log to a .sp
mirror with an in-memory log. .B lvconvert \-\-type raid1 \-m1 vg00/lvol1
"lvconvert --mirrorlog disk vg00/lvol1" Converts a mirror with a disk log to a mirror with an in-memory log:
.br .sp
converts a mirror with an in-memory log .B lvconvert \-\-mirrorlog core vg00/lvol1
to a mirror with a disk log.
"lvconvert -m0 vg00/lvol1" Converts a mirror with an in-memory log to a mirror with a disk log:
.br .sp
converts a mirror logical volume to a linear logical .B lvconvert \-\-mirrorlog disk vg00/lvol1
volume.
.br
"lvconvert --type raid1 vg00/mirror_lv"
.br
converts a mirror logical volume to a RAID1 logical volume with the same
number of images.
.br
.br Converts a mirror logical volume to a linear logical volume:
"lvconvert -s vg00/lvol1 vg00/lvol2" .sp
.br .B lvconvert \-m0 vg00/lvol1
converts logical volume "vg00/lvol2" to snapshot of original volume "vg00/lvol1"
.br Converts a mirror logical volume to a RAID1 logical volume with the same
"lvconvert -m1 vg00/lvol1 /dev/sda:0-15 /dev/sdb:0-15" number of images:
.br .sp
converts linear logical volume "vg00/lvol1" to a two-way mirror, using physical .B lvconvert \-\-type raid1 vg00/mirror_lv
extents /dev/sda:0-15 and /dev/sdb:0-15 for allocation of new extents.
.br Converts logical volume "vg00/lvol2" to snapshot of original volume
"lvconvert -m0 vg00/lvmirror1 /dev/sda" "vg00/lvol1":
.br .sp
converts mirror logical volume "vg00/lvmirror1" to linear, freeing physical .B lvconvert \-s vg00/lvol1 vg00/lvol2
extents from /dev/sda.
.br Converts linear logical volume "vg00/lvol1" to a two-way mirror,
"lvconvert --merge vg00/lvol1_snap" using physical extents /dev/sda:0-15 and /dev/sdb:0-15 for allocation
.br of new extents:
merges "vg00/lvol1_snap" into its origin. .sp
.B lvconvert \-m1 vg00/lvol1 /dev/sda:0-15 /dev/sdb:0-15
.br Converts mirror logical volume "vg00/lvmirror1" to linear, freeing physical
"lvconvert --merge @some_tag" extents from /dev/sda:
.br .sp
If vg00/lvol1, vg00/lvol2, and vg00/lvol3 are all tagged with "some_tag" .B lvconvert \-m0 vg00/lvmirror1 /dev/sda
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 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. all snapshot logical volume merges in parallel.
.sp
.B lvconvert \-\-merge @some_tag
.br Extracts one image from the mirror, making it a new logical volume named
"lvconvert --splitmirrors 1 --name lv_split vg00/lvmirror1"
.br
Extract one image from the mirror, making it a new logical volume named
"lv_split". The mirror the image is extracted from is reduced accordingly. "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 If it was a 2-way mirror (created with '-m 1'), then the resulting original
volume will be linear. volume will be linear.
.sp
.B lvconvert \-\-splitmirrors 1 \-\-name lv_split vg00/lvmirror1
.br A mirrored logical volume created with \-\-type raid1 can use the
"lvconvert --splitmirrors 1 --trackchanges vg00/lv_raid1" \-\-trackchanges argument when splitting off an image.
.br
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 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. 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 The split-off device has a name of the form lv_raid1_rimage_N, where N is
a number, and it cannot be renamed. a number, and it cannot be renamed.
.sp
.B lvconvert \-\-splitmirrors 1 \-\-trackchanges vg00/lv_raid1
.br Merge an image that was detached temporarily from its mirror with
"lvconvert --merge vg00/lv_raid1_rimage_1" the \-\-trackchanges argument back into its original mirror and
.br
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. bring its contents back up-to-date.
.sp
.B lvconvert \-\-merge vg00/lv_raid1_rimage_1
.br Replaces the physical volume "/dev/sdb1" in the RAID1 logical volume "my_raid1"
"lvconvert --replace /dev/sdb1 vg00/my_raid1 /dev/sdf1"
.br
Replace the physical volume "/dev/sdb1" in the RAID1 logical volume "my_raid1"
with the specified physical volume "/dev/sdf1". Had the argument "/dev/sdf1" 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 been left out, lvconvert would attempt to find a suitable device from those
available in the volume group. available in the volume group.
.sp
.B lvconvert \-\-replace /dev/sdb1 vg00/my_raid1 /dev/sdf1
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),

View File

@ -8,7 +8,7 @@ lvcreate \- create a logical volume in an existing volume group
.RB [ \-\-alloc .RB [ \-\-alloc
.IR AllocationPolicy ] .IR AllocationPolicy ]
.RB [ \-a | \-\-available .RB [ \-a | \-\-available
.RI { y | n | ey | en | ly | ln }] .RI [ e | l ]{ y | n }]
.RB [ \-A | \-\-autobackup .RB [ \-A | \-\-autobackup
.RI { y | n }] .RI { y | n }]
.RB [ \-C | \-\-contiguous .RB [ \-C | \-\-contiguous
@ -87,20 +87,20 @@ lvcreate \- create a logical volume in an existing volume group
.br .br
.SH DESCRIPTION .SH DESCRIPTION
lvcreate creates a new logical volume in a volume group ( see lvcreate creates a new logical volume in a volume group (see
.BR vgcreate "(8), " vgchange (8) .BR vgcreate "(8), " vgchange (8))
) by allocating logical extents from the free physical extent pool by allocating logical extents from the free physical extent pool
of that volume group. If there are not enough free physical extents then of that volume group. If there are not enough free physical extents then
the volume group can be extended ( see the volume group can be extended (see
.BR vgextend (8) .BR vgextend (8))
) with other physical volumes or by reducing existing logical volumes with other physical volumes or by reducing existing logical volumes
of this volume group in size ( see of this volume group in size (see
.BR lvreduce (8) .BR lvreduce (8)).
). If you specify one or more PhysicalVolumes, allocation of physical If you specify one or more PhysicalVolumes, allocation of physical
extents will be restricted to these volumes. extents will be restricted to these volumes.
.br .br
.br .br
The second form supports the creation of snapshot logical volumes which The second form supports the creation of snapshot logical volumes which
keep the contents of the original logical volume for backup purposes. keep the contents of the original logical volume for backup purposes.
.SH OPTIONS .SH OPTIONS
See See
@ -108,16 +108,16 @@ See
for common options. for common options.
.TP .TP
.IR \fB\-a ", " \fB\-\-available " {" y | n | ey | en | ly | ln } .IR \fB\-a ", " \fB\-\-available " {" y | n | ey | en | ly | ln }
Controls the availability of the Logical Volumes for immediate use after Controls the availability of the Logical Volumes for immediate use after
the command finishes running. the command finishes running.
By default, new Logical Volumes are activated automatically (\fB-a\fIy\fR). By default, new Logical Volumes are activated automatically (\fB-a\fIy\fR).
If it is possible technically, \fB-a\fIn\fR will leave the new Logical Volume inactive. If it is possible technically, \fB-a\fIn\fR will leave the new Logical
But for example, snapshots can only be created Volume inactive. But for example, snapshots can only be created
in the active state so \fB-a\fIn\fR cannot be used with --snapshot. in the active state so \fB\-a\fIn\fR cannot be used with \fB\-\-snapshot\fP.
Normally the --zero n argument has to be supplied too because zeroing (the Normally the \fB\-\-zero n\fP argument has to be supplied too because
default behaviour) also requires activation. zeroing (the default behaviour) also requires activation.
If clustered locking is enabled, \fB-a\fIey\fR will activate exclusively 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. on one node and \fB\-a\fIly\fR will activate only on the local node.
.TP .TP
.BR \-c ", " \-\-chunksize " " \fIChunkSize .BR \-c ", " \-\-chunksize " " \fIChunkSize
Gives the size of chunk for snapshot and thin pool logical volumes. Gives the size of chunk for snapshot and thin pool logical volumes.
@ -125,7 +125,7 @@ For snapshots the value must be power of 2 between 4KiB and 512KiB
and the default value is 4. and the default value is 4.
For thin pools the value must be power of 2 between 64KiB and For thin pools the value must be power of 2 between 64KiB and
1048576KiB and the default value starts with 64 and scales 1048576KiB and the default value starts with 64 and scales
up to fit the pool metadata size within 128MB, up to fit the pool metadata size within 128MB,
if the poolmetadata size is not specified. if the poolmetadata size is not specified.
Default unit is in kilobytes. Default unit is in kilobytes.
.TP .TP
@ -208,9 +208,9 @@ or has rules that ignore the devices LVM2 creates.
.TP .TP
.BR \-\-monitor " {" \fIy | \fIn } .BR \-\-monitor " {" \fIy | \fIn }
Start or avoid monitoring a mirrored or snapshot logical volume with Start or avoid monitoring a mirrored or snapshot logical volume with
dmeventd, if it is installed. dmeventd, if it is installed.
If a device used by a monitored mirror reports an I/O error, If a device used by a monitored mirror reports an I/O error,
the failure is handled according to the failure is handled according to
\fBmirror_image_fault_policy\fP and \fBmirror_log_fault_policy\fP \fBmirror_image_fault_policy\fP and \fBmirror_log_fault_policy\fP
set in \fBlvm.conf\fP. set in \fBlvm.conf\fP.
.TP .TP
@ -228,7 +228,6 @@ Set the size of thin pool's metadata logical volume.
Supported value is in range between 2MiB and 16GiB. Supported value is in range between 2MiB and 16GiB.
Default value is (Pool_LV_size / Pool_LV_chunk_size * 64b). Default value is (Pool_LV_size / Pool_LV_chunk_size * 64b).
Default unit is megabytes. Default unit is megabytes.
.TP .TP
.IR \fB\-r ", " \fB\-\-readahead " {" ReadAheadSectors | auto | none } .IR \fB\-r ", " \fB\-\-readahead " {" ReadAheadSectors | auto | none }
Set read ahead sector count of this logical volume. Set read ahead sector count of this logical volume.
@ -239,11 +238,10 @@ a suitable value automatically.
"None" is equivalent to specifying zero. "None" is equivalent to specifying zero.
.TP .TP
.BR \-R ", " \-\-regionsize " " \fIMirrorLogRegionSize .BR \-R ", " \-\-regionsize " " \fIMirrorLogRegionSize
A mirror is divided into regions of this size (in MB), and the mirror log 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. uses this granularity to track which regions are in sync.
.TP .TP
.IR \fB\-s ", " \fB\-\-snapshot " " OriginalLogicalVolume { Name | Path } .IR \fB\-s ", " \fB\-\-snapshot " " OriginalLogicalVolume { Name | Path }
Create a snapshot logical volume (or snapshot) for an existing, so called Create a snapshot logical volume (or snapshot) for an existing, so called
original logical volume (or origin). original logical volume (or origin).
Snapshots provide a 'frozen image' of the contents of the origin Snapshots provide a 'frozen image' of the contents of the origin
@ -269,10 +267,10 @@ of space.
.TP .TP
.IR \fB\-T ", " \fB\-\-thin ", " \fB\-\-thinpool " " ThinPoolLogicalVolume { Name | Path } .IR \fB\-T ", " \fB\-\-thin ", " \fB\-\-thinpool " " ThinPoolLogicalVolume { Name | Path }
Creates thin pool or thin logical volume or both. Creates thin pool or thin logical volume or both.
Specifying the optional argument --size will cause the creation of Specifying the optional argument \fB\-\-size\fP will cause the creation of
the thin pool logical volume. the thin pool logical volume.
Specifying the optional argument --virtualsize will cause the creation of Specifying the optional argument \fB\-\-virtualsize\fP will cause
the thin logical volume from given thin pool volume. the creation of the thin logical volume from given thin pool volume.
Specifying both arguments will cause the creation of both Specifying both arguments will cause the creation of both
thin pool and thin volume using this pool. thin pool and thin volume using this pool.
Requires device mapper kernel driver for thin provisioning Requires device mapper kernel driver for thin provisioning
@ -282,12 +280,14 @@ from kernel 3.2 or newer.
Create a logical volume that uses the specified segment type Create a logical volume that uses the specified segment type
(e.g. "raid5", "mirror", "snapshot", "thin", "thin-pool"). (e.g. "raid5", "mirror", "snapshot", "thin", "thin-pool").
Many segment types have a Many segment types have a
commandline switch alias that will enable their use (-s is an alias for commandline switch alias that will enable their use
--type snapshot). However, this argument must be used when no existing (\fB\-s\fP is an alias for \fB\-\-type snapshot\fP).
commandline switch alias is available for the desired type, as is the case However, this argument must be used when no existing
with "error", "zero", "raid1", "raid4", "raid5", or "raid6". commandline switch alias is available for the desired type,
as is the case with
.IR error ", " zero ", " raid1 ", " raid4 ", " raid5 " or " raid6 .
.TP .TP
.IR \fB\-V ", " \fB\-\-virtualsize " " VirtualSize [ bBsSkKmMgGtTpPeE ] .BR \-V ", " \-\-virtualsize " " \fIVirtualSize [ \fIbBsSkKmMgGtTpPeE ]
Create a sparse device of the given size (in MB by default) using a snapshot Create a sparse device of the given size (in MB by default) using a snapshot
or thinly provisioned device when thin pool is specified. or thinly provisioned device when thin pool is specified.
Anything written to the device will be returned when reading from it. Anything written to the device will be returned when reading from it.
@ -309,59 +309,60 @@ Snapshot volumes are zeroed always.
Warning: trying to mount an unzeroed logical volume can cause the system to Warning: trying to mount an unzeroed logical volume can cause the system to
hang. hang.
.SH Examples .SH Examples
Creates a striped logical volume with 3 stripes, a stripesize of 8KB Creates a striped logical volume with 3 stripes, a stripesize of 8KB
and a size of 100MB in the volume group named vg00. and a size of 100MB in the volume group named vg00.
The logical volume name will be chosen by lvcreate: The logical volume name will be chosen by lvcreate:
.sp .sp
.B lvcreate -i 3 -I 8 -L 100M vg00 .B lvcreate \-i 3 \-I 8 \-L 100M vg00
Creates a mirror logical volume with 2 sides with a useable size of 500 MiB. 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 This operation would require 3 devices (or option --alloc anywhere) - two
for the mirror devices and one for the disk log. for the mirror devices and one for the disk log:
.sp .sp
.B lvcreate -m1 -L 500M vg00 .B lvcreate \-m1 \-L 500M vg00
Creates a mirror logical volume with 2 sides with a useable size of 500 MiB. 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". This operation would require 2 devices - the log is "in-memory":
.sp .sp
.B lvcreate -m1 --mirrorlog core -L 500M vg00 .B lvcreate \-m1 \-\-mirrorlog core \-L 500M vg00
Creates a snapshot logical volume named /dev/vg00/snap which has access to the Creates a snapshot logical volume named /dev/vg00/snap which has access to the
contents of the original logical volume named /dev/vg00/lvol1 contents of the original logical volume named /dev/vg00/lvol1
at snapshot logical volume creation time. If the original logical volume at snapshot logical volume creation time. If the original logical volume
contains a file system, you can mount the snapshot logical volume on an 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 arbitrary directory in order to access the contents of the filesystem to run
a backup while the original filesystem continues to get updated. a backup while the original filesystem continues to get updated:
.sp .sp
.B lvcreate --size 100m --snapshot --name snap /dev/vg00/lvol1 .B lvcreate \-\-size 100m \-\-snapshot \-\-name snap /dev/vg00/lvol1
Creates a sparse device named /dev/vg1/sparse of size 1TB with space for just Creates a sparse device named /dev/vg1/sparse of size 1TiB with space for just
under 100MB of actual data on it. under 100MiB of actual data on it:
.sp .sp
.B lvcreate --virtualsize 1T --size 100M --snapshot --name sparse vg1 .B lvcreate \-\-virtualsize 1T \-\-size 100M \-\-snapshot \-\-name sparse vg1
Creates a linear logical volume "vg00/lvol1" using physical extents Creates a linear logical volume "vg00/lvol1" using physical extents
/dev/sda:0-7 and /dev/sdb:0-7 for allocation of extents. /dev/sda:0-7 and /dev/sdb:0-7 for allocation of extents:
.sp .sp
.B lvcreate -L 64M -n lvol1 vg00 /dev/sda:0-7 /dev/sdb:0-7 .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 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. a parity drive for a total of 4 devices) and a stripesize of 64KiB:
.sp .sp
.B lvcreate --type raid5 -L 5G -i 3 -I 64 -n my_lv vg00 .B lvcreate \-\-type raid5 \-L 5G \-i 3 \-I 64 \-n my_lv vg00
Creates 100MiB pool logical volume for thin provisioning Creates 100MiB pool logical volume for thin provisioning
build with 2 stripes 64KiB and chunk size 128KiB together with build with 2 stripes 64KiB and chunk size 128KiB together with
1TiB thin provisioned logical volume "vg00/thin_lv". 1TiB thin provisioned logical volume "vg00/thin_lv":
.sp .sp
.B lvcreate -i 2 -I 64 -c 256 -L100M -T vg00/pool -V 1T --name thin_lv .B lvcreate \-i 2 \-I 64 \-c 256 \-L100M \-T vg00/pool \-V 1T \-\-name thin_lv
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgcreate (8), .BR vgcreate (8),
.BR lvremove (8), .BR lvchange (8),
.BR lvremove (8),
.BR lvrename (8) .BR lvrename (8)
.BR lvextend (8), .BR lvextend (8),
.BR lvreduce (8), .BR lvreduce (8),
.BR lvdisplay (8), .BR lvdisplay (8),
.BR lvscan (8) .BR lvscan (8)

View File

@ -3,57 +3,70 @@
lvdisplay \- display attributes of a logical volume lvdisplay \- display attributes of a logical volume
.SH SYNOPSIS .SH SYNOPSIS
.B lvdisplay .B lvdisplay
[\-a|\-\-all] .RB [ \-a | \-\-all ]
[\-c|\-\-colon] [\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-c | \-\-colon ]
[\-\-ignorelockingfailure] .RB [ \-d | \-\-debug ]
[\-\-maps] .RB [ \-h | \-? | \-\-help ]
[\-\-nosuffix] .RB [ \-\-ignorelockingfailure ]
[\-P|\-\-partial] .RB [ \-\-maps ]
[\-\-units hHbBsSkKmMgGtTpPeE] .RB [ \-\-nosuffix ]
[\-v|\-\-verbose] .RB [ \-P | \-\-partial ]
[\-\-version] [LogicalVolumePath [LogicalVolumePath...]] .RB [ \-\-units
.IR hHbBsSkKmMgGtTpPeE ]
.RB [ \-v | \-\-verbose ]
.RB [ \-\-version ]
.RI [ LogicalVolumePath
.RI [ LogicalVolumePath ...]]
.br .br
.br .B lvdisplay
.B lvdisplay \-\-columns | \-C .BR \-\-columns | \-C
[\-\-aligned] .RB [ \-\-aligned ]
[\-a|\-\-all] .RB [ \-a | \-\-all ]
[\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-d | \-\-debug ]
[\-\-ignorelockingfailure] .RB [ \-h | \-? | \-\-help ]
[\-\-noheadings] .RB [ \-\-ignorelockingfailure ]
[\-\-nosuffix] .RB [ \-\-noheadings ]
[\-o|\-\-options [+]Field[,Field]] .RB [ \-\-nosuffix ]
[\-O|\-\-sort [+|-]Key1[,[+|-]Key2[,...]]] .RB [ \-o | \-\-options
[\-P|\-\-partial] .RI [ + ] Field [ ,Field ...]]
[\-\-segments] .RB [ \-O | \-\-sort
[\-\-separator Separator] .RI [ + | - ] Key1 [ , [ + | - ] Key2 ...]]
[\-\-unbuffered] .RB [ \-P | \-\-partial ]
[\-\-units hHbBsSkKmMgGtTpPeE] .RB [ \-\-segments ]
[\-v|\-\-verbose] .RB [ \-\-separator
[\-\-version] [LogicalVolumePath [LogicalVolumePath...]] .IR Separator ]
.RB [ \-\-unbuffered ]
.RB [ \-\-units
.IR hHbBsSkKmMgGtTpPeE ]
.RB [ \-v | \-\-verbose ]
.RB [ \-\-version ]
.RI [ LogicalVolumePath
.RI [ LogicalVolumePath ...]]
.SH DESCRIPTION .SH DESCRIPTION
lvdisplay allows you to see the attributes of a logical volume lvdisplay allows you to see the attributes of a logical volume
like size, read/write status, snapshot information etc. like size, read/write status, snapshot information etc.
.P .P
\fBlvs\fP (8) is an alternative that provides the same information \fBlvs\fP(8) is an alternative that provides the same information
in the style of \fBps\fP (1). \fBlvs\fP is recommended over in the style of \fBps\fP(1).
\fBlvdisplay\fP. \fBlvs\fP(8) is recommended over \fBlvdisplay\fP.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options and \fBlvs\fP for options given with See \fBlvm\fP(8) for common options and \fBlvs\fP for options given with
\fB\-\-columns\fP. \fB\-\-columns\fP.
.TP .TP
.I \-\-all .B \-\-all
Include information in the output about internal Logical Volumes that Include information in the output about internal Logical Volumes that
are components of normally-accessible Logical Volumes, such as mirrors, are components of normally-accessible Logical Volumes, such as mirrors,
but which are not independently accessible (e.g. not mountable). but which are not independently accessible (e.g. not mountable).
For example, after creating a mirror using 'lvcreate -m1 --mirrorlog disk', For example, after creating a mirror using
\fBlvcreate \-m1 \-\-mirrorlog disk\fP,
this option will reveal three internal Logical Volumes, with suffixes this option will reveal three internal Logical Volumes, with suffixes
mimage_0, mimage_1, and mlog. mimage_0, mimage_1, and mlog.
.TP .TP
.I \-c, \-\-colon .BR \-c ", " \-\-colon
Generate colon separated output for easier parsing in scripts or programs. Generate colon separated output for easier parsing in scripts or programs.
N.B. \fBlvs\fP (8) provides considerably more control over the output. N.B. \fBlvs\fP(8) provides considerably more control over the output.
.nf .nf
The values are: The values are:
@ -74,29 +87,30 @@ The values are:
.fi .fi
.TP .TP
.I \-m, \-\-maps .BR \-m ", " \-\-maps
Display the mapping of logical extents to physical volumes and Display the mapping of logical extents to physical volumes and
physical extents. To map physical extents physical extents. To map physical extents
to logical extents use to logical extents use:
.BR .B pvs \-\-segments \-o+lv_name,seg_start_pe,segtype
\fBpvs --segments -o+lv_name,seg_start_pe,segtype\fP.
.TP .TP
.I \-\-columns | \-C .BR \-\-columns ", " \-C
Display output in columns, the equivalent of \fBlvs\fP. Options listed Display output in columns, the equivalent of \fBlvs\fP. Options listed
are the same as options given in \fBlvs (8)\fP. are the same as options given in \fBlvs\fP(8).
.SH Examples .SH Examples
"lvdisplay -v /dev/vg00/lvol2" shows attributes of that logical volume. Shows attributes of that logical volume. If snapshot
If snapshot
logical volumes have been created for this original logical volume, logical volumes have been created for this original logical volume,
this command shows a list of all snapshot logical volumes and their this command shows a list of all snapshot logical volumes and their
status (active or inactive) as well. status (active or inactive) as well:
.sp
.B lvdisplay \-v /dev/vg00/lvol2
"lvdisplay /dev/vg00/snapshot" shows the attributes of this snapshot Shows the attributes of this snapshot logical volume and also which
logical volume and also which original logical volume original logical volume it is associated with:
it is associated with. .sp
.B lvdisplay /dev/vg00/snapshot
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR lvcreate (8), .BR lvcreate (8),
.BR lvscan (8), .BR lvscan (8),
.BR pvs (8) .BR pvs (8)

View File

@ -3,100 +3,114 @@
lvextend \- extend the size of a logical volume lvextend \- extend the size of a logical volume
.SH SYNOPSIS .SH SYNOPSIS
.B lvextend .B lvextend
[\-\-alloc AllocationPolicy] .RB [ \-\-alloc
[\-A|\-\-autobackup y|n] [\-d|\-\-debug] [\-h|\-?|\-\-help] .IR AllocationPolicy ]
[\-\-noudevsync] .RB [ \-A | \-\-autobackup
[\-i|\-\-stripes Stripes [\-I|\-\-stripesize StripeSize]] .RI { y | n }]
{\-l|\-\-extents [+]LogicalExtentsNumber[%{VG|LV|PVS|FREE|ORIGIN}] | .RB [ \-d | \-\-debug ]
\-L|\-\-size [+]LogicalVolumeSize[bBsSkKmMgGtTpPeE]} .RB [ \-h | \-? | \-\-help ]
[\-f|\-\-force] .RB [ \-\-noudevsync]
[\-n|\-\-nofsck] .RB [ \-i | \-\-stripes
[\-r|\-\-resizefs] .I Stripes
[\-t|\-\-test] .RB [ \-I | \-\-stripesize
[\-v|\-\-verbose] LogicalVolumePath [PhysicalVolumePath[:PE[-PE]]...] .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 .SH DESCRIPTION
lvextend allows you to extend the size of a logical volume. lvextend allows you to extend the size of a logical volume.
Extension of snapshot logical volumes (see Extension of snapshot logical volumes (see
.B lvcreate(8) .BR lvcreate (8)
for information to create snapshots) is supported as well. for information to create snapshots) is supported as well.
But to change the number of copies in a mirrored logical But to change the number of copies in a mirrored logical
volume use volume use
.BR lvconvert (8). .BR lvconvert (8).
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.I \-\-noudevsync .B \-\-noudevsync
Disable udev synchronisation. The Disable udev synchronisation. The
process will not wait for notification from udev. process will not wait for notification from udev.
It will continue irrespective of any possible udev processing It will continue irrespective of any possible udev processing
in the background. You should only use this if udev is not running in the background. You should only use this if udev is not running
or has rules that ignore the devices LVM2 creates. or has rules that ignore the devices LVM2 creates.
.TP .TP
.I \-l, \-\-extents [+]LogicalExtentsNumber[%{VG|LV|PVS|FREE|ORIGIN}] .IR \fB\-l ", " \fB\-\-extents " [" + ] LogicalExtentsNumber [ % { VG | LV | PVS | FREE | ORIGIN }]
Extend or set the logical volume size in units of logical extents. Extend or set the logical volume size in units of logical extents.
With the + sign the value is added to the actual size 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. 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 The number can also be expressed as a percentage of the total space
in the Volume Group with the suffix %VG, relative to the existing in the Volume Group with the suffix \fI%VG\fP, relative to the existing
size of the Logical Volume with the suffix %LV, of the remaining size of the Logical Volume with the suffix \fI%LV\fP, of the remaining
free space for the specified PhysicalVolume(s) with the suffix %PVS, 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 as a percentage of the remaining free space in the Volume Group
with the suffix %FREE, or (for a snapshot) as a percentage of the total 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 %ORIGIN. space in the Origin Logical Volume with the suffix \fI%ORIGIN\fP.
The resulting value is rounded upward. The resulting value is rounded upward.
.TP .TP
.I \-L, \-\-size [+]LogicalVolumeSize[bBsSkKmMgGtTpPeE] .IR \fB\-L ", " \fB\-\-size " [" + ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]
Extend or set the logical volume size in units of megabytes. Extend or set the logical volume size in units of megabytes.
A size suffix of M for megabytes, A size suffix of M for megabytes,
G for gigabytes, T for terabytes, P for petabytes G for gigabytes, T for terabytes, P for petabytes
or E for exabytes is optional. or E for exabytes is optional.
With the + sign the value is added to the actual size 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. of the logical volume and without it, the value is taken as an absolute one.
.TP .TP
.I \-i, \-\-stripes Stripes .BR \-i ", " \-\-stripes " " \fIStripes
Gives the number of stripes for the extension. Gives the number of stripes for the extension.
Not applicable to LVs using the original metadata LVM format, which must Not applicable to LVs using the original metadata LVM format, which must
use a single value throughout. use a single value throughout.
.TP .TP
.I \-I, \-\-stripesize StripeSize .BR \-I ", " \-\-stripesize " " \fIStripeSize
Gives the number of kilobytes for the granularity of the stripes. Gives the number of kilobytes for the granularity of the stripes.
Not applicable to LVs using the original metadata LVM format, which must Not applicable to LVs using the original metadata LVM format, which must
use a single value throughout. use a single value throughout.
.br .br
StripeSize must be 2^n (n = 2 to 9) StripeSize must be 2^n (n = 2 to 9)
.TP .TP
.I \-f, \-\-force .BR \-f ", " \-\-force
Proceed with size extension without prompting. Proceed with size extension without prompting.
.TP .TP
.I \-n, \-\-nofsck .BR \-n ", " \-\-nofsck
Do not perform fsck before extending filesystem when filesystem Do not perform fsck before extending filesystem when filesystem
requires it. You may need to use \fB--force\fR to proceed with requires it. You may need to use \fB\-\-force\fR to proceed with
this option. this option.
.TP .TP
.I \-r, \-\-resizefs .BR \-r ", " \-\-resizefs
Resize underlying filesystem together with the logical volume using Resize underlying filesystem together with the logical volume using
\fBfsadm\fR(8). \fBfsadm\fR(8).
.SH Examples .SH Examples
"lvextend -L +54 /dev/vg01/lvol10 /dev/sdk3" tries to extend the size of Extends the size of the logical volume "vg01/lvol10" by 54MiB on physical
that logical volume by 54MB on physical volume /dev/sdk3. volume /dev/sdk3. This is only possible if /dev/sdk3 is a member of
This is only possible if /dev/sdk3 is a member of volume group vg01 and volume group vg01 and there are enough free physical extents in it:
there are enough free physical extents in it. .sp
.B lvextend -L +54 /dev/vg01/lvol10 /dev/sdk3
"lvextend /dev/vg01/lvol01 /dev/sdk3" tries to extend the size of that Extends the size of logical volume "vg01/lvol01" by the amount of free
logical volume by the amount of free space on physical volume /dev/sdk3. space on physical volume /dev/sdk3. This is equivalent to specifying
This is equivalent to specifying "-l +100%PVS" on the command line. "-l +100%PVS" on the command line:
.sp
.B lvextend /dev/vg01/lvol01 /dev/sdk3
.br Extends a logical volume "vg01/lvol01" by 16MiB using physical extents
"lvextend -L+16M vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9" /dev/sda:8-9 and /dev/sdb:8-9 for allocation of extents:
.br .sp
tries to extend a logical volume "vg01/lvol01" by 16MB using physical extents .B lvextend -L+16M vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9
/dev/sda:8-9 and /dev/sdb:8-9 for allocation of extents.
.SH SEE ALSO .SH SEE ALSO
.BR fsadm (8), .BR fsadm (8),
.BR lvm (8), .BR lvm (8),
.BR lvcreate (8), .BR lvcreate (8),
.BR lvconvert (8), .BR lvconvert (8),
.BR lvreduce (8), .BR lvreduce (8),
.BR lvresize (8), .BR lvresize (8),
.BR lvchange (8) .BR lvchange (8)

View File

@ -5,18 +5,18 @@ lvm \- LVM2 tools
.B lvm .B lvm
[command | file] [command | file]
.SH DESCRIPTION .SH DESCRIPTION
\fBlvm\fP provides the command-line tools for LVM2. A separate lvm provides the command-line tools for LVM2. A separate
manual page describes each command in detail. manual page describes each command in detail.
.LP .LP
If \fBlvm\fP is invoked with no arguments it presents a readline prompt If \fBlvm\fP is invoked with no arguments it presents a readline prompt
(assuming it was compiled with readline support). (assuming it was compiled with readline support).
LVM commands may be entered interactively at this prompt with LVM commands may be entered interactively at this prompt with
readline facilities including history and command name and option readline facilities including history and command name and option
completion. Refer to \fBreadline\fP(3) for details. completion. Refer to \fBreadline\fP(3) for details.
.LP .LP
If \fBlvm\fP is invoked with argv[0] set to the name of a specific 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 LVM command (for example by using a hard or soft link) it acts as
that command. that command.
.LP .LP
On invocation, \fBlvm\fP requires that only the standard file descriptors On invocation, \fBlvm\fP requires that only the standard file descriptors
stdin, stdout and stderr are available. If others are found, they stdin, stdout and stderr are available. If others are found, they
@ -24,16 +24,16 @@ get closed and messages are issued warning about the leak.
.LP .LP
Where commands take VG or LV names as arguments, the full path name is 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 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, 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 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. but a VG is given, a list of all the LVs in that VG will be substituted.
So "lvdisplay vg0" will display all the LVs in "vg0". So \fBlvdisplay vg0\fP will display all the LVs in "vg0".
Tags can also be used - see \fBaddtag\fP below. Tags can also be used - see \fB\-\-addtag\fP below.
.LP .LP
One advantage of using the built-in shell is that configuration One advantage of using the built-in shell is that configuration
information gets cached internally between commands. information gets cached internally between commands.
.LP .LP
A file containing a simple script with one command per line A file containing a simple script with one command per line
can also be given on the command line. The script can also be can also be given on the command line. The script can also be
executed directly if the first line is #! followed by the absolute executed directly if the first line is #! followed by the absolute
path of \fBlvm\fP. path of \fBlvm\fP.
@ -41,8 +41,8 @@ path of \fBlvm\fP.
The following commands are built into lvm without links normally The following commands are built into lvm without links normally
being created in the filesystem for them. being created in the filesystem for them.
.TP .TP
\fBdumpconfig\fP \(em Display the configuration information after \fBdumpconfig\fP \(em Display the configuration information after
loading \fBlvm.conf\fP (5) and any other configuration files. loading \fBlvm.conf\fP(5) and any other configuration files.
.TP .TP
\fBformats\fP \(em Display recognised metadata formats. \fBformats\fP \(em Display recognised metadata formats.
.TP .TP
@ -143,111 +143,119 @@ The following commands implement the core LVM functionality.
.TP .TP
The following commands are not implemented in LVM2 but might be in the future: lvmsadc, lvmsar, pvdata. The following commands are not implemented in LVM2 but might be in the future: lvmsadc, lvmsar, pvdata.
.SH OPTIONS .SH OPTIONS
The following options are available for many of the commands. The following options are available for many of the commands.
They are implemented generically and documented here rather They are implemented generically and documented here rather
than repeated on individual manual pages. than repeated on individual manual pages.
.TP .TP
\fB-h | --help\fP \(em Display the help text. .BR \-h ", " \-\-help
Display the help text.
.TP .TP
\fB--version\fP \(em Display version information. .B \-\-version
Display version information.
.TP .TP
\fB-v | --verbose\fP \(em Set verbose level. .BR \-v ", " \-\-verbose
Repeat from 1 to 3 times to increase the detail of messages Set verbose level. Repeat from 1 to 3 times to increase the detail
sent to stdout and stderr. Overrides config file setting. of messages sent to stdout and stderr. Overrides config file setting.
.TP .TP
\fB-d | --debug\fP \(em Set debug level. .BR \-d ", " \-\-debug
Repeat from 1 to 6 times to increase the detail of messages sent Set debug level. Repeat from 1 to 6 times to increase the detail of
to the log file and/or syslog (if configured). messages sent to the log file and/or syslog (if configured).
Overrides config file setting. Overrides config file setting.
.TP .TP
\fB--quiet\fP \(em Suppress output and log messages. .B \-\-quiet
Overrides -d and -v. Suppress output and log messages.
Overrides \fB\-d\fP and \fB\-v\fP.
.TP .TP
\fB-t | --test\fP \(em Run in test mode. .BR \-t ", " \-\-test
Commands will not update metadata. Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't. back metadata it believes has changed but hasn't.
.TP .TP
\fB--driverloaded\fP { \fBy\fP | \fBn\fP } .BR \-\-driverloaded " {" \fIy | \fIn }
Whether or not the device-mapper kernel driver is loaded. Whether or not the device-mapper kernel driver is loaded.
If you set this to \fBn\fP, no attempt will be made to contact the driver. If you set this to \fIn\fP, no attempt will be made to contact the driver.
.TP .TP
\fB-A | --autobackup\fP { \fBy\fP | \fBn\fP } .BR \-A ", " \-\-autobackup " {" \fIy | \fIn }
Whether or not to metadata should be backed up automatically after a change. Whether or not to metadata should be backed up automatically after a change.
You are strongly advised not to disable this! You are strongly advised not to disable this!
See See \fBvgcfgbackup\fP(8).
.B vgcfgbackup (8).
.TP .TP
\fB-P | --partial\fP .BR \-P ", " \-\-partial
When set, the tools will do their best to provide access to volume groups 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 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 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 volume is missing, \fB/dev/ioerror\fP will be substituted, and you could use
\fBdmsetup (8)\fP to set this up to return I/O errors when accessed, \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 or create it as a large block device of nulls. Metadata may not be
changed with this option. To insert a replacement physical volume 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 of the same or large size use \fBpvcreate \-u\fP to set the uuid to
match the original followed by \fBvgcfgrestore (8)\fP. match the original followed by \fBvgcfgrestore\fP(8).
.TP .TP
\fB-M | --metadatatype type\fP .BR \-M ", " \-\-metadatatype " " \fIType
Specifies which type of on-disk metadata to use, such as \fBlvm1\fP Specifies which type of on-disk metadata to use, such as \fIlvm1\fP
or \fBlvm2\fP, which can be abbreviated to \fB1\fP or \fB2\fP respectively. or \fIlvm2\fP, which can be abbreviated to \fI1\fP or \fI2\fP respectively.
The default (lvm2) can be changed by setting \fBformat\fP in the \fBglobal\fP The default (\fIlvm2\fP) can be changed by setting \fBformat\fP
section of the config file. in the \fBglobal\fP section of the config file.
.TP .TP
\fB--ignorelockingfailure\fP .B \-\-ignorelockingfailure
This lets you proceed with read-only metadata operations such as This lets you proceed with read-only metadata operations such as
\fBlvchange -ay\fP and \fBvgchange -ay\fP even if the locking module fails. \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 One use for this is in a system init script if the lock directory
is mounted read-only when the script runs. is mounted read-only when the script runs.
.TP .TP
\fB--addtag tag\fP .B \-\-addtag \fITag
Add the tag \fBtag\fP to a PV, VG or LV. Add the tag \fITag\fP to a PV, VG or LV.
Supply this argument multiple times to add more than one tag at once. 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 A tag is a word that can be used to group LVM2 objects of the same type
together. together.
Tags can be given on the command line in place of PV, VG or LV Tags can be given on the command line in place of PV, VG or LV
arguments. Tags should be prefixed with @ to avoid ambiguity. arguments. Tags should be prefixed with @ to avoid ambiguity.
Each tag is expanded by replacing it with all objects possessing 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. 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: 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. 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 an example, you could tag some LVs as \fBdatabase\fP and others
as \fBuserdata\fP and then activate the database ones as \fBuserdata\fP and then activate the database ones
with \fBlvchange -ay @database\fP. with \fBlvchange \-ay @database\fP.
Objects can possess multiple tags simultaneously. Objects can possess multiple tags simultaneously.
Only the new LVM2 metadata format supports tagging: objects using the Only the new LVM2 metadata format supports tagging: objects using the
LVM1 metadata format cannot be tagged because the on-disk format does not LVM1 metadata format cannot be tagged because the on-disk format does not
support it. support it.
Snapshots cannot be tagged. Snapshots cannot be tagged.
Characters allowed in tags are: A-Z a-z 0-9 _ + . - and Characters allowed in tags are:
as of version 2.02.78 the following characters are also .B A-Z a-z 0-9 _ + . -
accepted: / = ! : # & and as of version 2.02.78 the following characters are also accepted:
.B / = ! : # &
.TP .TP
\fB--deltag tag\fP .B \-\-deltag \fITag
Delete the tag \fBtag\fP from a PV, VG or LV, if it's present. 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. Supply this argument multiple times to remove more than one tag at once.
.TP .TP
\fB--alloc AllocationPolicy\fP .B \-\-alloc \fIAllocationPolicy
The allocation policy to use: \fBcontiguous\fP, \fBcling\fP, \fBnormal\fP, \fBanywhere\fP or \fBinherit\fP. 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, When a command needs to allocate physical extents from the volume group,
the allocation policy controls how they are chosen. the allocation policy controls how they are chosen.
Each volume group and logical volume has an allocation policy. Each volume group and logical volume has an allocation policy.
The default for a volume group is \fBnormal\fP which applies The default for a volume group is \fInormal\fP which applies
common-sense rules such as not placing parallel stripes on the same common-sense rules such as not placing parallel stripes on the same
physical volume. The default for a logical volume is \fBinherit\fP physical volume. The default for a logical volume is \fIinherit\fP
which applies the same policy as for the volume group. These policies can which applies the same policy as for the volume group. These policies can
be changed using \fBlvchange\fP (8) and \fBvgchange\fP (8) or over-ridden be changed using \fBlvchange\fP(8) and \fBvgchange\fP(8) or over-ridden
on the command line of any command that performs allocation. on the command line of any command that performs allocation.
The \fBcontiguous\fP policy requires that new extents be placed adjacent The \fIcontiguous\fP policy requires that new extents be placed adjacent
to existing extents. to existing extents.
The \fBcling\fP policy places new extents on the same physical The \fIcling\fP policy places new extents on the same physical
volume as existing extents in the same stripe of the Logical Volume. volume as existing extents in the same stripe of the Logical Volume.
If there are sufficient free extents to satisfy If there are sufficient free extents to satisfy
an allocation request but \fBnormal\fP doesn't use them, an allocation request but \fInormal\fP doesn't use them,
\fBanywhere\fP will - even if that reduces performance by \fIanywhere\fP will - even if that reduces performance by
placing two stripes on the same physical volume. placing two stripes on the same physical volume.
.IP .IP
N.B. The policies described above are not implemented fully yet. N.B. The policies described above are not implemented fully yet.
@ -255,22 +263,21 @@ In particular, contiguous free space cannot be broken up to
satisfy allocation attempts. satisfy allocation attempts.
.SH ENVIRONMENT VARIABLES .SH ENVIRONMENT VARIABLES
.TP .TP
\fBLVM_SYSTEM_DIR\fP .B HOME
Directory containing lvm.conf and other LVM Directory containing \fI.lvm_history\fP if the internal readline
system files. shell is invoked.
.TP
.B LVM_SYSTEM_DIR
Directory containing \fBlvm.conf\fP(5) and other LVM system files.
Defaults to "#DEFAULT_SYS_DIR#". Defaults to "#DEFAULT_SYS_DIR#".
.TP .TP
\fBHOME\fP .B LVM_VG_NAME
Directory containing .lvm_history if the internal readline shell The volume group name that is assumed for
is invoked.
.TP
\fBLVM_VG_NAME\fP
The volume group name that is assumed for
any reference to a logical volume that doesn't specify a path. any reference to a logical volume that doesn't specify a path.
Not set by default. Not set by default.
.SH VALID NAMES .SH VALID NAMES
The following characters are valid for VG and LV names: The following characters are valid for VG and LV names:
\fBa-z A-Z 0-9 + _ . -\fP .B a-z A-Z 0-9 + _ . -
.LP .LP
VG and LV names cannot begin with a hyphen. 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. There are also various reserved names that are used internally by lvm that can not be used as LV or VG names.
@ -326,4 +333,3 @@ All tools return a status code of zero on success or non-zero on failure.
.BR vgsplit (8), .BR vgsplit (8),
.BR readline (3), .BR readline (3),
.BR lvm.conf (5) .BR lvm.conf (5)

View File

@ -4,35 +4,35 @@ lvm.conf \- Configuration file for LVM2
.SH SYNOPSIS .SH SYNOPSIS
.B #DEFAULT_SYS_DIR#/lvm.conf .B #DEFAULT_SYS_DIR#/lvm.conf
.SH DESCRIPTION .SH DESCRIPTION
lvm.conf is loaded during the initialisation phase of lvm.conf is loaded during the initialisation phase of
\fBlvm\fP (8). This file can in turn lead to other files \fBlvm\fP(8). This file can in turn lead to other files
being loaded - settings read in later override earlier being loaded - settings read in later override earlier
settings. File timestamps are checked between commands and if settings. File timestamps are checked between commands and if
any have changed, all the files are reloaded. any have changed, all the files are reloaded.
.LP .LP
Use \fBlvm dumpconfig\fP to check what settings are in use. Use \fBlvm dumpconfig\fP to check what settings are in use.
.SH SYNTAX .SH SYNTAX
.LP .LP
This section describes the configuration file syntax. This section describes the configuration file syntax.
.LP .LP
Whitespace is not significant unless it is within quotes. Whitespace is not significant unless it is within quotes.
This provides a wide choice of acceptable indentation styles. This provides a wide choice of acceptable indentation styles.
Comments begin with # and continue to the end of the line. Comments begin with # and continue to the end of the line.
They are treated as whitespace. They are treated as whitespace.
.LP .LP
Here is an informal grammar: Here is an informal grammar:
.TP .TP
\fBfile = value*\fP .BR file " = " value *
.br .br
A configuration file consists of a set of values. A configuration file consists of a set of values.
.TP .TP
\fBvalue = section | assignment\fP .BR value " = " section " | " assignment
.br .br
A value can either be a new section, or an assignment. A value can either be a new section, or an assignment.
.TP .TP
\fBsection = identifier '{' value* '}'\fP .BR section " = " identifier " '" { "' " value "* '" } '
.br .br
A section is groups associated values together. A section is groups associated values together.
.br .br
It is denoted by a name and delimited by curly brackets. It is denoted by a name and delimited by curly brackets.
.br .br
@ -42,27 +42,27 @@ e.g. backup {
.br .br
} }
.TP .TP
\fBassignment = identifier '=' (array | type)\fP .BR assignment " = " identifier " '" = "' ( " array " | " type " )"
.br .br
An assignment associates a type with an identifier. An assignment associates a type with an identifier.
.br .br
e.g. max_archives = 42 e.g. max_archives = 42
.br .br
.TP .TP
\fBarray = '[' (type ',')* type ']' | '[' ']'\fP .BR array " = '" [ "' ( " type " '" , "')* " type " '" ] "' | '" [ "' '" ] '
.br .br
Inhomogeneous arrays are supported. Inhomogeneous arrays are supported.
.br .br
Elements must be separated by commas. Elements must be separated by commas.
.br .br
An empty array is acceptable. An empty array is acceptable.
.TP .TP
\fBtype = integer | float | string\fP .BR type " = " integer " | " float " | " string
\fBinteger = [0-9]*\fP .BR integer " = [0-9]*"
.br .br
\fBfloat = [0-9]*\.[0-9]*\fP .BR float " = [0-9]*'" . '[0-9]*
.br .br
\fBstring = '"' .* '"'\fP .B string \fR= '\fB"\fR'.*'\fB"\fR'
.IP .IP
Strings must be enclosed in double quotes. Strings must be enclosed in double quotes.
@ -73,10 +73,10 @@ The sections that may be present in the file are:
\fBdevices\fP \(em Device settings \fBdevices\fP \(em Device settings
.IP .IP
\fBdir\fP \(em Directory in which to create volume group device nodes. \fBdir\fP \(em Directory in which to create volume group device nodes.
Defaults to "/dev". Commands also accept this as a prefix on volume Defaults to "/dev". Commands also accept this as a prefix on volume
group names. group names.
.IP .IP
\fBscan\fP \(em List of directories to scan recursively for \fBscan\fP \(em List of directories to scan recursively for
LVM physical volumes. LVM physical volumes.
Devices in directories outside this hierarchy will be ignored. Devices in directories outside this hierarchy will be ignored.
Defaults to "/dev". Defaults to "/dev".
@ -102,35 +102,35 @@ in /dev), if the first matching pattern in the list for any of the names is an
pattern in the list for any of the names is an \fBr\fP pattern it is rejected; 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: otherwise it is accepted. As an example, to ignore /dev/cdrom you could use:
.br .br
\fBdevices { filter=["r|cdrom|"] }\fP \fBdevices { filter=["r|cdrom|"] }\fP
.IP .IP
\fBcache_dir\fP \(em Persistent filter cache file directory. \fBcache_dir\fP \(em Persistent filter cache file directory.
Defaults to "#DEFAULT_CACHE_DIR#". Defaults to "#DEFAULT_CACHE_DIR#".
.IP .IP
\fBwrite_cache_state\fP \(em Set to 0 to disable the writing out of the \fBwrite_cache_state\fP \(em Set to 0 to disable the writing out of the
persistent filter cache file when \fBlvm\fP exits. persistent filter cache file when \fBlvm\fP exits.
Defaults to 1. Defaults to 1.
.IP .IP
\fBtypes\fP \(em List of pairs of additional acceptable block device types \fBtypes\fP \(em List of pairs of additional acceptable block device types
found in /proc/devices together with maximum (non-zero) number of found in /proc/devices together with maximum (non-zero) number of
partitions (normally 16). By default, LVM2 supports ide, sd, md, loop, partitions (normally 16). By default, LVM2 supports ide, sd, md, loop,
dasd, dac960, nbd, ida, cciss, ubd, ataraid, drbd, power2, i2o_block dasd, dac960, nbd, ida, cciss, ubd, ataraid, drbd, power2, i2o_block
and iseries/vd. Block devices with major and iseries/vd. Block devices with major
numbers of different types are ignored by LVM2. numbers of different types are ignored by LVM2.
Example: \fBtypes = ["fd", 16]\fP. Example: \fBtypes = ["fd", 16]\fP.
To create physical volumes on device-mapper volumes To create physical volumes on device-mapper volumes
created outside LVM2, perhaps encrypted ones from \fBcryptsetup\fP, created outside LVM2, perhaps encrypted ones from \fBcryptsetup\fP,
you'll need \fBtypes = ["device-mapper", 16]\fP. But if you do this, you'll need \fBtypes = ["device-mapper", 16]\fP. But if you do this,
be careful to avoid recursion within LVM2. The figure for number be careful to avoid recursion within LVM2. The figure for number
of partitions is not currently used in LVM2 - and might never be. of partitions is not currently used in LVM2 - and might never be.
.IP .IP
\fBsysfs_scan\fP \(em If set to 1 and your kernel supports sysfs and \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 it is mounted, sysfs will be used as a quick way of filtering out
block devices that are not present. block devices that are not present.
.IP .IP
\fBmd_component_detection\fP \(em If set to 1, LVM2 will ignore devices \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 used as components of software RAID (md) devices by looking for md
superblocks. This doesn't always work satisfactorily e.g. if a device superblocks. This doesn't always work satisfactorily e.g. if a device
has been reused without wiping the md superblocks first. has been reused without wiping the md superblocks first.
.IP .IP
\fBmd_chunk_alignment\fP \(em If set to 1, and a Physical Volume is placed \fBmd_chunk_alignment\fP \(em If set to 1, and a Physical Volume is placed
@ -187,7 +187,7 @@ 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). 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 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 provisioned LUNs generally do. If set to 1, discards will only be issued if
both the storage and kernel provide support. both the storage and kernel provide support.
.IP .IP
.TP .TP
\fBallocation\fP \(em Space allocation policies \fBallocation\fP \(em Space allocation policies
@ -200,9 +200,9 @@ 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 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 attached to the PVs concerned and then seek to match those PV tags
between existing extents and new extents. between existing extents and new extents.
.IP .IP
The @ prefix for tags is required. The @ prefix for tags is required.
Use the special tag "@*" as a wildcard to match any PV tag and so use Use the special tag "@*" as a wildcard to match any PV tag and so use
all PV tags for this purpose. all PV tags for this purpose.
.IP .IP
For example, LVs are mirrored between two sites within a single VG. For example, LVs are mirrored between two sites within a single VG.
@ -228,12 +228,12 @@ is invoked. By default tools append messages to the log file.
.IP .IP
\fBsyslog\fP \(em Set to 1 (the default) to send log messages through syslog. \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, 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. this is used - unvalidated - as the facility. The default is LOG_USER.
See /usr/include/sys/syslog.h for safe facility values to use. See /usr/include/sys/syslog.h for safe facility values to use.
For example, LOG_LOCAL0 might be 128. For example, LOG_LOCAL0 might be 128.
.IP .IP
\fBindent\fP \(em When set to 1 (the default) messages are indented \fBindent\fP \(em When set to 1 (the default) messages are indented
according to their severity, two spaces per level. according to their severity, two spaces per level.
Set to 0 to turn off indentation. Set to 0 to turn off indentation.
.IP .IP
\fBcommand_names\fP \(em When set to 1, the command name is used as a \fBcommand_names\fP \(em When set to 1, the command name is used as a
@ -244,7 +244,7 @@ Default is 0 (off).
Default is two spaces. Default is two spaces.
.IP .IP
\fBactivation\fP \(em Set to 1 to log messages while \fBactivation\fP \(em Set to 1 to log messages while
devices are suspended during activation. devices are suspended during activation.
Only set this temporarily while debugging a problem because Only set this temporarily while debugging a problem because
in low memory situations this setting can cause your machine to lock up. in low memory situations this setting can cause your machine to lock up.
.TP .TP
@ -255,21 +255,21 @@ Backup copies of former metadata for each volume group are archived here.
Defaults to "#DEFAULT_ARCHIVE_DIR#". Defaults to "#DEFAULT_ARCHIVE_DIR#".
.IP .IP
\fBbackup_dir\fP \(em Directory used for automatic metadata backups. \fBbackup_dir\fP \(em Directory used for automatic metadata backups.
A single backup copy of the current metadata for each volume group A single backup copy of the current metadata for each volume group
is stored here. is stored here.
Defaults to "#DEFAULT_BACKUP_DIR#". Defaults to "#DEFAULT_BACKUP_DIR#".
.IP .IP
\fBarchive\fP \(em Whether or not tools automatically archive existing \fBarchive\fP \(em Whether or not tools automatically archive existing
metadata into \fBarchive_dir\fP before making changes to it. metadata into \fBarchive_dir\fP before making changes to it.
Default is 1 (automatic archives enabled). Default is 1 (automatic archives enabled).
Set to 0 to disable. Set to 0 to disable.
Disabling this might make metadata recovery difficult or impossible Disabling this might make metadata recovery difficult or impossible
if something goes wrong. if something goes wrong.
.IP .IP
\fBbackup\fP \(em Whether or not tools make an automatic backup \fBbackup\fP \(em Whether or not tools make an automatic backup
into \fBbackup_dir\fP after changing metadata. into \fBbackup_dir\fP after changing metadata.
Default is 1 (automatic backups enabled). Set to 0 to disable. Default is 1 (automatic backups enabled). Set to 0 to disable.
Disabling this might make metadata recovery difficult or impossible Disabling this might make metadata recovery difficult or impossible
if something goes wrong. if something goes wrong.
.IP .IP
\fBretain_min\fP \(em Minimum number of archives to keep. \fBretain_min\fP \(em Minimum number of archives to keep.
@ -297,23 +297,23 @@ Defaults to /proc.
.IP .IP
\fBumask\fP \(em File creation mask for any files and directories created. \fBumask\fP \(em File creation mask for any files and directories created.
Interpreted as octal if the first digit is zero. Interpreted as octal if the first digit is zero.
Defaults to 077. Defaults to 077.
Use 022 to allow other users to read the files by default. Use 022 to allow other users to read the files by default.
.IP .IP
\fBformat\fP \(em The default value of \fB--metadatatype\fP used \fBformat\fP \(em The default value of \fB--metadatatype\fP used
to determine which format of metadata to use when creating new to determine which format of metadata to use when creating new
physical volumes and volume groups. \fBlvm1\fP or \fBlvm2\fP. physical volumes and volume groups. \fBlvm1\fP or \fBlvm2\fP.
.IP .IP
\fBfallback_to_lvm1\fP \(em Set this to 1 if you need to \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 be able to switch between 2.4 kernels using LVM1 and kernels
including device-mapper. including device-mapper.
The LVM2 tools should be installed as normal and The LVM2 tools should be installed as normal and
the LVM1 tools should be installed with a .lvm1 suffix e.g. the LVM1 tools should be installed with a .lvm1 suffix e.g.
vgscan.lvm1. vgscan.lvm1.
If an LVM2 tool is then run but unable to communicate If an LVM2 tool is then run but unable to communicate
with device-mapper, it will automatically invoke the equivalent LVM1 with device-mapper, it will automatically invoke the equivalent LVM1
version of the tool. Note that for LVM1 tools to version of the tool. Note that for LVM1 tools to
manipulate physical volumes and volume groups created by LVM2 you manipulate physical volumes and volume groups created by LVM2 you
must use \fB--metadataformat lvm1\fP when creating them. must use \fB--metadataformat lvm1\fP when creating them.
.IP .IP
\fBlibrary_dir\fP \(em A directory searched for LVM2's shared libraries \fBlibrary_dir\fP \(em A directory searched for LVM2's shared libraries
@ -330,7 +330,7 @@ avoid conflicting LVM2 commands running concurrently on a single
machine. 0 disables locking and risks corrupting your metadata. machine. 0 disables locking and risks corrupting your metadata.
If set to 2, the tools will load the external \fBlocking_library\fP If set to 2, the tools will load the external \fBlocking_library\fP
(see below). (see below).
If the tools were configured \fB--with-cluster=internal\fP If the tools were configured \fB--with-cluster=internal\fP
(the default) then 3 means to use built-in cluster-wide locking. (the default) then 3 means to use built-in cluster-wide locking.
Type 4 enforces read-only metadata and forbids any operations that Type 4 enforces read-only metadata and forbids any operations that
might want to modify Volume Group metadata. might want to modify Volume Group metadata.
@ -355,11 +355,11 @@ such a library, look at the lib/locking source code directory.
Setting this to 0 does nothing, neither creating nor destroying any tag. 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). The machine name used is the nodename as returned by \fBuname\fP (2).
.IP .IP
Additional host tags to be set can be listed here as subsections. Additional host tags to be set can be listed here as subsections.
The @ prefix for tags is optional. The @ prefix for tags is optional.
Each of these host tag subsections can contain a \fBhost_list\fP 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 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, name exactly then the host tag gets defined on this particular host,
otherwise it doesn't. otherwise it doesn't.
.IP .IP
After lvm.conf has been processed, LVM2 works through each host After lvm.conf has been processed, LVM2 works through each host
@ -378,9 +378,9 @@ tags { tag1 { } tag2 { host_list = [ "fs1", "fs2" ] } }
.IP .IP
These options are useful if you are replicating configuration files These options are useful if you are replicating configuration files
around a cluster. Use of \fBhosttags = 1\fP means every machine around a cluster. Use of \fBhosttags = 1\fP means every machine
can have static and identical local configuration files yet use can have static and identical local configuration files yet use
different settings and activate different logical volumes by different settings and activate different logical volumes by
default. See also \fBvolume_list\fP below and \fB--addtag\fP default. See also \fBvolume_list\fP below and \fB--addtag\fP
in \fBlvm\fP (8). in \fBlvm\fP (8).
.TP .TP
\fBactivation\fP \(em Settings affecting device-mapper activation \fBactivation\fP \(em Settings affecting device-mapper activation
@ -399,13 +399,13 @@ returns zeros, see \fBlvcreate\fP (8).
\fBmirror_region_size\fP \(em Unit size in KB for copy operations \fBmirror_region_size\fP \(em Unit size in KB for copy operations
when mirroring. when mirroring.
.IP .IP
\fBreadahead\fP \(em Used when there is no readahead value stored \fBreadahead\fP \(em Used when there is no readahead value stored
in the volume group metadata. Set to \fBnone\fP to disable in the volume group metadata. Set to \fBnone\fP to disable
readahead in these circumstances or \fBauto\fP to use the default readahead in these circumstances or \fBauto\fP to use the default
value chosen by the kernel. value chosen by the kernel.
.IP .IP
\fBreserved_memory\fP, \fBreserved_stack\fP \(em How many KB to reserve \fBreserved_memory\fP, \fBreserved_stack\fP \(em How many KB to reserve
for LVM2 to use while logical volumes are suspended. If insufficient for LVM2 to use while logical volumes are suspended. If insufficient
memory is reserved before suspension, there is a risk of machine deadlock. memory is reserved before suspension, there is a risk of machine deadlock.
.IP .IP
\fBprocess_priority\fP \(em The nice value to use while devices are \fBprocess_priority\fP \(em The nice value to use while devices are
@ -417,7 +417,7 @@ logical volumes getting queued) for the shortest possible time.
all requests to activate a logical volume on this machine all requests to activate a logical volume on this machine
are passed. A logical volume is only activated if it matches are passed. A logical volume is only activated if it matches
an item in the list. Tags must be preceded by @ and are checked an item in the list. Tags must be preceded by @ and are checked
against all tags defined in the logical volume and volume group against all tags defined in the logical volume and volume group
metadata for a match. metadata for a match.
@* is short-hand to check every tag set on the host machine (see @* is short-hand to check every tag set on the host machine (see
\fBtags\fP above). \fBtags\fP above).
@ -440,8 +440,8 @@ by name e.g. vg00, vg00/lvol1.
.IP .IP
\fBpvmetadatacopies\fP \(em When creating a physical volume using the \fBpvmetadatacopies\fP \(em When creating a physical volume using the
LVM2 metadata format, this is the default number of copies of metadata LVM2 metadata format, this is the default number of copies of metadata
to store on each physical volume. to store on each physical volume.
Currently it can be set to 0, 1 or 2. The default is 1. 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 If set to 2, one copy is placed at the beginning of the disk
and the other is placed at the end. and the other is placed at the end.
It can be overridden on the command line with \fB--pvmetadatacopies\fP It can be overridden on the command line with \fB--pvmetadatacopies\fP
@ -450,7 +450,7 @@ 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 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 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, 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 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 physical volume with at least 1 copy of the metadata (unless using
the text files described below). The disadvantage of having lots the text files described below). The disadvantage of having lots
of copies is that every time the tools access the volume group, every of copies is that every time the tools access the volume group, every
@ -459,7 +459,7 @@ tools.
.IP .IP
\fBpvmetadatasize\fP \(em Approximate number of sectors to set aside \fBpvmetadatasize\fP \(em Approximate number of sectors to set aside
for each copy of the metadata. Volume groups with large numbers of for each copy of the metadata. Volume groups with large numbers of
physical or logical volumes, or volumes groups containing complex physical or logical volumes, or volumes groups containing complex
logical volume structures will need additional space for their metadata. logical volume structures will need additional space for their metadata.
The metadata areas are treated as circular buffers, so The metadata areas are treated as circular buffers, so
unused space becomes filled with an archive of the most recent unused space becomes filled with an archive of the most recent
@ -507,16 +507,20 @@ and with no other on-disk metadata, \fBpvmetadatacopies = 0\fP.
Alternatively these directories can be in addition to the Alternatively these directories can be in addition to the
on-disk metadata areas. This feature was created during the on-disk metadata areas. This feature was created during the
development of the LVM2 metadata before the new on-disk metadata development of the LVM2 metadata before the new on-disk metadata
areas were designed and no longer gets tested. areas were designed and no longer gets tested.
It is not supported under low-memory conditions, and it is It is not supported under low-memory conditions, and it is
important never to edit these metadata files unless you fully important never to edit these metadata files unless you fully
understand how things work: to make changes you should always use understand how things work: to make changes you should always use
the tools as normal, or else vgcfgbackup, edit backup, vgcfgrestore. the tools as normal, or else vgcfgbackup, edit backup, vgcfgrestore.
.SH FILES .SH FILES
.I #DEFAULT_SYS_DIR#/lvm.conf .I #DEFAULT_SYS_DIR#/lvm.conf
.br
.I #DEFAULT_ARCHIVE_DIR# .I #DEFAULT_ARCHIVE_DIR#
.br
.I #DEFAULT_BACKUP_DIR# .I #DEFAULT_BACKUP_DIR#
.br
.I #DEFAULT_CACHE_DIR#/.cache .I #DEFAULT_CACHE_DIR#/.cache
.br
.I #DEFAULT_LOCK_DIR# .I #DEFAULT_LOCK_DIR#
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),

View File

@ -5,6 +5,6 @@ lvmchange \- change attributes of the logical volume manager
.B lvmchange .B lvmchange
.SH DESCRIPTION .SH DESCRIPTION
lvmchange is not currently supported under LVM2, although lvmchange is not currently supported under LVM2, although
\fBdmsetup (8)\fP has a \fBremove_all\fP command. \fBdmsetup\fP(8) has a \fBremove_all\fP command.
.SH SEE ALSO .SH SEE ALSO
.BR dmsetup (8) .BR dmsetup (8)

View File

@ -6,15 +6,18 @@
.SH "SYNOPSIS" .SH "SYNOPSIS"
.B lvmconf .B lvmconf
[\-\-disable-cluster] .RB [ \-\-disable-cluster ]
[\-\-enable-cluster] .RB [ \-\-enable-cluster ]
[\-\-file <configfile>] .RB [ \-\-file
[\-\-lockinglib <lib>] .RI < configfile >]
[\-\-lockinglibdir <dir>] .RB [ \-\-lockinglib
.RI < lib >]
.RB [ \-\-lockinglibdir
.RI < dir >]
.SH "DESCRIPTION" .SH "DESCRIPTION"
.B lvmconf lvmconf is a script that modifies the locking configuration in
is a script that modifies the locking configuration in an lvm configuration file. See \fBlvm.conf\fP(5). an lvm configuration file. See \fBlvm.conf\fP(5).
.SH "OPTIONS" .SH "OPTIONS"
.TP .TP
@ -24,13 +27,14 @@ Set \fBlocking_type\fR to the default non-clustered type.
.BR \-\-enable-cluster .BR \-\-enable-cluster
Set \fBlocking_type\fR to the default clustered type on this system. Set \fBlocking_type\fR to the default clustered type on this system.
.TP .TP
.BR \-\-file " " \fI<configfile>\fR .BR \-\-file " <" \fIconfigfile >
Apply the changes to \fBconfigfile\fR instead of the default \fB#DEFAULT_SYS_DIR#/lvm.conf\fR. Apply the changes to \fIconfigfile\fP instead of the default
\fI#DEFAULT_SYS_DIR#/lvm.conf\fP.
.TP .TP
.BR \-\-lockinglib " " \fI<lib>\fR .BR \-\-lockinglib " <" \fIlib >
Set external \fBlocking_library\fR locking library to load if an external locking type is used. Set external \fBlocking_library\fR locking library to load if an external locking type is used.
.TP .TP
.BR \-\-lockinglibdir " " \fI<dir>\fR .BR \-\-lockinglibdir " <" \fIdir >
.SH FILES .SH FILES
.I #DEFAULT_SYS_DIR#/lvm.conf .I #DEFAULT_SYS_DIR#/lvm.conf

View File

@ -3,22 +3,23 @@
lvmdiskscan \- scan for all devices visible to LVM2 lvmdiskscan \- scan for all devices visible to LVM2
.SH SYNOPSIS .SH SYNOPSIS
.B lvmdiskscan .B lvmdiskscan
[\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-d | \-\-debug ]
[\-l|\-\-lvmpartition] .RB [ \-h | \-? | \-\-help ]
[\-v|\-\-verbose] .RB [ \-l | \-\-lvmpartition ]
.RB [ \-v | \-\-verbose ]
.SH DESCRIPTION .SH DESCRIPTION
\fBlvmdiskscan\fP scans all SCSI, (E)IDE disks, multiple devices and a bunch lvmdiskscan scans all SCSI, (E)IDE disks, multiple devices and a bunch
of other block devices in the system looking for LVM physical volumes. of other block devices in the system looking for LVM physical volumes.
The size reported is the real device size. The size reported is the real device size.
Define a filter in \fBlvm.conf\fP(5) to restrict Define a filter in \fBlvm.conf\fP(5) to restrict
the scan to avoid a CD ROM, for example. the scan to avoid a CD ROM, for example.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.I \-l, \-\-lvmpartition .BR \-l ", " \-\-lvmpartition
Only reports Physical Volumes. Only reports Physical Volumes.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR lvm.conf (5), .BR lvm.conf (5),
.BR pvscan (8), .BR pvscan (8),
.BR vgscan (8) .BR vgscan (8)

View File

@ -2,9 +2,17 @@
.SH NAME .SH NAME
lvmdump - create lvm2 information dumps for diagnostic purposes lvmdump - create lvm2 information dumps for diagnostic purposes
.SH SYNOPSIS .SH SYNOPSIS
\fBlvmdump\fP [options] [-d directory] .B lvmdump
.RB [ \-a ]
.RB [ \-c ]
.RB [ \-d
.IR directory ]
.RB [ \-h ]
.RB [ \-m ]
.SH DESCRIPTION .SH DESCRIPTION
\fBlvmdump\fP is a tool to dump various information concerning LVM2. By default, it creates a tarball suitable for submission along with a problem report. 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 .PP
The content of the tarball is as follows: The content of the tarball is as follows:
.br .br
@ -22,33 +30,45 @@ The content of the tarball is as follows:
.br .br
- list of files present /sys/devices/virtual/block - list of files present /sys/devices/virtual/block
.br .br
- if enabled with -m, metadata dump will be also included - if enabled with \-m, metadata dump will be also included
.br .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 - 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 .br
- if enabled with -c, cluster status info - if enabled with \-c, cluster status info
.SH OPTIONS .SH OPTIONS
.TP .TP
\fB\-h\fR \(em print help message .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 .TP
\fB\-a\fR \(em advanced collection .B \-c
\fBWARNING\fR: if lvm is already hung, then this script may hang as well if \fB\-a\fR is used If clvmd is running, gather cluster data as well.
.TP .TP
\fB\-m\fR \(em gather LVM metadata from the PVs .B \-d \fIdirectory
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. 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 .TP
\fB\-d\fR directory \(em dump into a directory instead of tarball .B \-h
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 \fBdirectory\fP. Print help message
.TP .TP
\fB\-c\fR \(em if clvmd is running, gather cluster data as well .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 .SH ENVIRONMENT VARIABLES
.TP .TP
\fBLVM_BINARY\fP \fBLVM_BINARY\fP
The LVM2 binary to use. The LVM2 binary to use.
Defaults to "lvm". Defaults to "lvm".
Sometimes you might need to set this to "/sbin/lvm.static", for example. Sometimes you might need to set this to "/sbin/lvm.static", for example.
.TP .TP
\fBDMSETUP_BINARY\fP \fBDMSETUP_BINARY\fP
The dmsetup binary to use. The dmsetup binary to use.
Defaults to "dmsetup". Defaults to "dmsetup".
.PP .PP
.SH SEE ALSO
.BR lvm (8)

View File

@ -7,8 +7,7 @@ lvmsadc \- LVM system activity data collector
.B lvmsadc .B lvmsadc
.SH "DESCRIPTION" .SH "DESCRIPTION"
.B lvmsadc lvmsadc is not currently supported under LVM2.
is not currently supported under LVM2.
.SH "SEE ALSO" .SH "SEE ALSO"
.BR lvm (8) .BR lvm (8)

View File

@ -7,8 +7,7 @@ lvmsar \- LVM system activity reporter
.B lvmsar .B lvmsar
.SH "DESCRIPTION" .SH "DESCRIPTION"
.B lvmsar lvmsar is not currently supported under LVM2.
is not currently supported under LVM2.
.SH "SEE ALSO" .SH "SEE ALSO"
.BR lvm (8) .BR lvm (8)

View File

@ -12,9 +12,9 @@ lvreduce \- reduce the size of a logical volume
.RB [ \-\-version ] .RB [ \-\-version ]
.RB [ \-f | \-\-force ] .RB [ \-f | \-\-force ]
.RB [ \-\-noudevsync ] .RB [ \-\-noudevsync ]
.RB { \-l | \-\-extents .RB { \-l | \-\-extents
.RI [ \- ] LogicalExtentsNumber [ % { VG | LV | FREE | ORIGIN "}] |" .RI [ \- ] LogicalExtentsNumber [ % { VG | LV | FREE | ORIGIN "}] |"
.RB [ \-L | \-\-size .RB [ \-L | \-\-size
.RI [ \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]} .RI [ \- ] LogicalVolumeSize [ bBsSkKmMgGtTpPeE ]}
.RB [ \-n | \-\-nofsck ] .RB [ \-n | \-\-nofsck ]
.RB [ \-r | \-\-resizefs ] .RB [ \-r | \-\-resizefs ]
@ -22,9 +22,9 @@ lvreduce \- reduce the size of a logical volume
.SH DESCRIPTION .SH DESCRIPTION
lvreduce allows you to reduce the size of a logical volume. lvreduce allows you to reduce the size of a logical volume.
Be careful when reducing a logical volume's size, because data in the Be careful when reducing a logical volume's size, because data in the
reduced part is lost!!! reduced part is lost!!!
.br .br
You should therefore ensure that any filesystem on the volume is You should therefore ensure that any filesystem on the volume is
resized resized
.I before .I before
running lvreduce so that the extents that are to be removed are not in use. running lvreduce so that the extents that are to be removed are not in use.
@ -33,7 +33,7 @@ Shrinking snapshot logical volumes (see
.BR lvcreate (8) .BR lvcreate (8)
for information to create snapshots) is supported as well. for information to create snapshots) is supported as well.
But to change the number of copies in a mirrored logical But to change the number of copies in a mirrored logical
volume use volume use
.BR lvconvert (8). .BR lvconvert (8).
.br .br
Sizes will be rounded if necessary - for example, the volume size must Sizes will be rounded if necessary - for example, the volume size must
@ -41,20 +41,11 @@ be an exact number of extents and the size of a striped segment must
be a multiple of the number of stripes. be a multiple of the number of stripes.
.br .br
.SH OPTIONS .SH OPTIONS
See See \fBlvm\fP(8) for common options.
.BR lvm (8)
for common options.
.TP .TP
.BR \-f ", " \-\-force .BR \-f ", " \-\-force
Force size reduction without prompting even when it may cause data loss. Force size reduction without prompting even when it may cause data loss.
.TP .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
.IR \fB\-l ", " \fB\-\-extents " [" \- ] LogicalExtentsNumber [ % { VG | LV | FREE | ORIGIN }] .IR \fB\-l ", " \fB\-\-extents " [" \- ] LogicalExtentsNumber [ % { VG | LV | FREE | ORIGIN }]
Reduce or set the logical volume size in units of logical extents. Reduce or set the logical volume size in units of logical extents.
With the \fI-\fP sign the value will be subtracted from With the \fI-\fP sign the value will be subtracted from
@ -74,28 +65,35 @@ Reduce or set the logical volume size in units of megabytes.
A size suffix of \fIk\fP for kilobyte, \fIm\fP for megabyte, A size suffix of \fIk\fP for kilobyte, \fIm\fP for megabyte,
\fIg\fP for gigabytes, \fIt\fP for terabytes, \fIp\fP for petabytes \fIg\fP for gigabytes, \fIt\fP for terabytes, \fIp\fP for petabytes
or \fIe\fP for exabytes is optional. or \fIe\fP for exabytes is optional.
With the \fI-\fP sign the value will be subtracted from 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 the logical volume's actual size and without it it will be taken as
an absolute size. an absolute size.
.TP .TP
.BR \-n ", " \-\-nofsck .BR \-n ", " \-\-nofsck
Do not perform fsck before resizing filesystem when filesystem Do not perform fsck before resizing filesystem when filesystem
requires it. You may need to use \fB--force\fR to proceed with requires it. You may need to use \fB\-\-force\fR to proceed with
this option. this option.
.TP .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 .BR \-r ", " \-\-resizefs
Resize underlying filesystem together with the logical volume using Resize underlying filesystem together with the logical volume using
.BR fsadm (8). .BR fsadm (8).
.SH EXAMPLES .SH Examples
Reduce the size of logical volume lvol1 in volume group vg00 by 3 logical extents: Reduce the size of logical volume lvol1 in volume group vg00 by 3 logical extents:
.sp .sp
.B lvreduce -l -3 vg00/lvol1 .B lvreduce \-l \-3 vg00/lvol1
.SH SEE ALSO .SH SEE ALSO
.BR fsadm (8), .BR fsadm (8),
.BR lvchange (8), .BR lvchange (8),
.BR lvconvert (8), .BR lvconvert (8),
.BR lvcreate (8), .BR lvcreate (8),
.BR lvextend (8), .BR lvextend (8),
.BR lvm (8), .BR lvm (8),
.BR lvresize (8), .BR lvresize (8),
.BR vgreduce (8) .BR vgreduce (8)

View File

@ -15,7 +15,7 @@ lvremove \- remove a logical volume
.IR LogicalVolume { Name | Path } .IR LogicalVolume { Name | Path }
.RI [ LogicalVolume { Name | Path }...] .RI [ LogicalVolume { Name | Path }...]
.SH DESCRIPTION .SH DESCRIPTION
\fBlvremove\fP removes one or more logical volumes. lvremove removes one or more logical volumes.
Confirmation will be requested before deactivating any active logical Confirmation will be requested before deactivating any active logical
volume prior to removal. Logical volumes cannot be deactivated volume prior to removal. Logical volumes cannot be deactivated
or removed while they are open (e.g. if they contain a mounted filesystem). or removed while they are open (e.g. if they contain a mounted filesystem).
@ -36,20 +36,20 @@ process will not wait for notification from udev.
It will continue irrespective of any possible udev processing It will continue irrespective of any possible udev processing
in the background. You should only use this if udev is not running in the background. You should only use this if udev is not running
or has rules that ignore the devices LVM2 creates. or has rules that ignore the devices LVM2 creates.
.SH EXAMPLES .SH Examples
Remove the active logical volume lvol1 in volume group vg00 Remove the active logical volume lvol1 in volume group vg00
without asking for confirmation: without asking for confirmation:
.sp .sp
.B lvremove -f vg00/lvol1 .B lvremove \-f vg00/lvol1
.sp .sp
Remove all logical volumes in volume group vg00: Remove all logical volumes in volume group vg00:
.sp .sp
.B lvremove vg00 .B lvremove vg00
.SH SEE ALSO .SH SEE ALSO
.BR lvcreate (8), .BR lvcreate (8),
.BR lvdisplay (8), .BR lvdisplay (8),
.BR lvchange (8), .BR lvchange (8),
.BR lvm (8), .BR lvm (8),
.BR lvs (8), .BR lvs (8),
.BR lvscan (8), .BR lvscan (8),
.BR vgremove (8) .BR vgremove (8)

View File

@ -15,11 +15,9 @@ lvrename \- rename a logical volume
.RI { OldLogicalVolume { Name | Path } .RI { OldLogicalVolume { Name | Path }
.IR NewLogicalVolume { Name | Path } .IR NewLogicalVolume { Name | Path }
| |
.I VolumeGroupName OldLogicalVolumeName NewLogicalVolumeName .I VolumeGroupName OldLogicalVolumeName NewLogicalVolumeName\fR}
}
.SH DESCRIPTION .SH DESCRIPTION
.B lvrename lvrename renames an existing logical volume from
renames an existing logical volume from
.IR OldLogicalVolume { Name | Path } .IR OldLogicalVolume { Name | Path }
to to
.IR NewLogicalVolume { Name | Path }. .IR NewLogicalVolume { Name | Path }.

View File

@ -14,7 +14,7 @@ lvs \- report information about logical volumes
.RB [ \-o | \-\-options .RB [ \-o | \-\-options
.RI [ + ] Field [, Field ]] .RI [ + ] Field [, Field ]]
.RB [ \-O | \-\-sort .RB [ \-O | \-\-sort
.RI [ + | - ] Key1 [,[ + | - ] Key2 [,...]]] .RI [ + | \- ] Key1 [,[ + | \- ] Key2 [,...]]]
.RB [ \-P | \-\-partial ] .RB [ \-P | \-\-partial ]
.RB [ \-\-rows ] .RB [ \-\-rows ]
.RB [ \-\-segments ] .RB [ \-\-segments ]
@ -41,17 +41,18 @@ Include information in the output about internal Logical Volumes that
are components of normally-accessible Logical Volumes, such as mirrors, are components of normally-accessible Logical Volumes, such as mirrors,
but which are not independently accessible (e.g. not mountable). but which are not independently accessible (e.g. not mountable).
The names of such Logical Volumes are enclosed within square brackets The names of such Logical Volumes are enclosed within square brackets
in the output. For example, after creating a mirror using 'lvcreate -m1 in the output. For example, after creating a mirror using
--mirrorlog disk', this option will reveal three internal Logical .B lvcreate -m1 --mirrorlog disk
, this option will reveal three internal Logical
Volumes, with suffixes mimage_0, mimage_1, and mlog. Volumes, with suffixes mimage_0, mimage_1, and mlog.
.TP .TP
.B \-\-aligned .B \-\-aligned
Use with \-\-separator to align the output columns. Use with \fB\-\-separator\fP to align the output columns.
.TP .TP
.B \-\-nameprefixes .B \-\-nameprefixes
Add an "LVM2_" prefix plus the field name to the output. Useful Add an "LVM2_" prefix plus the field name to the output. Useful
with --noheadings to produce a list of field=value pairs that can with \fB\-\-noheadings\fP to produce a list of field=value pairs that can
be used to set environment variables (for example, in be used to set environment variables (for example, in
.BR udev (7) .BR udev (7)
rules). rules).
.TP .TP
@ -60,17 +61,18 @@ Suppress the headings line that is normally the first line of output.
Useful if grepping the output. Useful if grepping the output.
.TP .TP
.B \-\-nosuffix .B \-\-nosuffix
Suppress the suffix on output sizes. Use with \-\-units (except h and H) Suppress the suffix on output sizes. Use with \fB\-\-units\fP
if processing the output. (except h and H) if processing the output.
.TP .TP
.BR \-o ", " \-\-options .BR \-o ", " \-\-options
Comma-separated ordered list of columns. Precede the list with '+' to append Comma-separated ordered list of columns. Precede the list with '+' to append
to the default selection of columns instead of replacing it. to the default selection of columns instead of replacing it.
.IP .IP
Use \fb-o lv_all\fP to select all logical volume columns, and \fb-o seg_all\fP 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. to select all logical volume segment columns.
.IP .IP
Use \fb-o help\fP to view the full list of columns available. Use \fB\-o help\fP to view the full list of columns available.
.IP .IP
Column names include: Column names include:
lv_uuid, lv_name, lv_path, lv_attr, lv_major, lv_minor, lv_read_ahead, lv_kernel_major, lv_uuid, lv_name, lv_path, lv_attr, lv_major, lv_minor, lv_read_ahead, lv_kernel_major,
@ -79,12 +81,12 @@ snap_percent, copy_percent, move_pv, convert_lv, lv_tags, mirror_log, thin_pool,
segtype, stripes, stripesize, regionsize, chunksize, seg_start, seg_start_pe, segtype, stripes, stripesize, regionsize, chunksize, seg_start, seg_start_pe,
seg_size, seg_tags, seg_pe_ranges, devices. seg_size, seg_tags, seg_pe_ranges, devices.
.IP .IP
With \-\-segments, any "seg_" prefixes are optional; otherwise any "lv_" With \fB\-\-segments\fP, any "seg_" prefixes are optional;
prefixes are optional. Columns mentioned in otherwise any "lv_" prefixes are optional. Columns mentioned in
.BR vgs (8) .BR vgs (8)
can also be chosen. can also be chosen.
.IP .IP
The lv_attr bits are: The lv_attr bits are:
.RS .RS
.IP 1 3 .IP 1 3
Volume type: (m)irrored, (M)irrored without initial sync, (o)rigin, Volume type: (m)irrored, (M)irrored without initial sync, (o)rigin,
@ -110,7 +112,7 @@ mapped (d)evice present without tables, mapped device present with (i)nactive ta
.IP 6 3 .IP 6 3
device (o)pen device (o)pen
.IP 7 3 .IP 7 3
Target type: (m)irror, (r)aid, (s)napshot, (t)hin, (u)nknown, (v)irtual. 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, 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 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 (m) if they use the original device-mapper mirror kernel driver; whereas the raid
@ -126,7 +128,7 @@ Use default columns that emphasize segment information.
.TP .TP
.BR \-O ", " \-\-sort .BR \-O ", " \-\-sort
Comma-separated ordered list of columns to sort by. Replaces the default Comma-separated ordered list of columns to sort by. Replaces the default
selection. Precede any column with - for a reverse sort on that column. selection. Precede any column with '\fI\-\fP' for a reverse sort on that column.
.TP .TP
.B \-\-rows .B \-\-rows
Output columns as rows. Output columns as rows.
@ -139,12 +141,13 @@ Produce output immediately without sorting or aligning the columns properly.
.TP .TP
.B \-\-units \fIhHbBsSkKmMgGtTpPeE .B \-\-units \fIhHbBsSkKmMgGtTpPeE
All sizes are output in these units: (h)uman-readable, (b)ytes, (s)ectors, 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. (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 Capitalise to use multiples of 1000 (S.I.) instead of 1024. Can also specify
custom units e.g. \-\-units 3M custom units e.g. \fB\-\-units 3M\fP
.TP .TP
.B \-\-unquoted .B \-\-unquoted
When used with --nameprefixes, output values in the field=value pairs are not quoted. When used with \fB\-\-nameprefixes\fP, output values in the field=value
pairs are not quoted.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR lvdisplay (8), .BR lvdisplay (8),

View File

@ -11,29 +11,29 @@ lvscan \- scan (all disks) for Logical Volumes
.RB [ \-P | \-\-partial ] .RB [ \-P | \-\-partial ]
.RB [ \-v | \-\-verbose ] .RB [ \-v | \-\-verbose ]
.SH DESCRIPTION .SH DESCRIPTION
.B lvscan lvscan scans all known volume groups or all supported LVM block devices
scans all known volume groups or all supported LVM block devices
in the system for defined Logical Volumes. The output consists in the system for defined Logical Volumes. The output consists
of one line for each Logical Volume indicating whether or not it is active, 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. a snapshot or origin, the size of the device and its allocation policy.
Use \fBlvs(8)\fP or \fBlvdisplay(8)\fP to obtain more-comprehensive information Use \fBlvs\fP(8) or \fBlvdisplay\fP(8) to obtain more-comprehensive
about the Logical Volumes. information about the Logical Volumes.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.BR \-\-all .BR \-\-all
Include information in the output about internal Logical Volumes that Include information in the output about internal Logical Volumes that
are components of normally-accessible Logical Volumes, such as mirrors, are components of normally-accessible Logical Volumes, such as mirrors,
but which are not independently accessible (e.g. not mountable). but which are not independently accessible (e.g. not mountable).
For example, after creating a mirror using 'lvcreate -m1 --mirrorlog disk', For example, after creating a mirror using
.B lvcreate \-m1 \-\-mirrorlog disk\fR,
this option will reveal three internal Logical Volumes, with suffixes this option will reveal three internal Logical Volumes, with suffixes
mimage_0, mimage_1, and mlog. mimage_0, mimage_1, and mlog.
.TP .TP
.BR \-b ", " \-\-blockdevice .BR \-b ", " \-\-blockdevice
This option is now ignored. Instead, use \fBlvs(8)\fP or \fBlvdisplay(8)\fP to obtain This option is now ignored. Instead, use \fBlvs\fP(8) or
the device number. \fBlvdisplay\fP(8) to obtain the device number.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR lvcreate (8), .BR lvcreate (8),
.BR lvdisplay (8) .BR lvdisplay (8)
.BR lvs (8) .BR lvs (8)

View File

@ -3,40 +3,51 @@
pvchange \- change attributes of a physical volume pvchange \- change attributes of a physical volume
.SH SYNOPSIS .SH SYNOPSIS
.B pvchange .B pvchange
[\-\-addtag Tag] .RB [ \-\-addtag
[\-A|\-\-autobackup y|n] [\-d|\-\-debug] .IR Tag ]
[\-f|\-\-force] .RB [ \-A | \-\-autobackup
[\-\-deltag Tag] .RI { y | n }]
[\-\-metadataignore y|n] .RB [ \-d | \-\-debug ]
[\-h|\-?|\-\-help] .RB [ \-f | \-\-force ]
[\-t|\-\-test] .RB [ \-\-deltag
[\-v|\-\-verbose] [\-a|\-\-all] [\-x|\-\-allocatable y|n] .IR Tag ]
[\-u|\-\-uuid] [PhysicalVolumePath...] .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 .SH DESCRIPTION
pvchange allows you to change the allocation permissions of one or pvchange allows you to change the allocation permissions of one or
more physical volumes. more physical volumes.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.I \-a, \-\-all .BR \-a ", " \-\-all
If PhysicalVolumePath is not specified on the command line all If PhysicalVolumePath is not specified on the command line all
physical volumes are searched for and used. physical volumes are searched for and used.
.TP .TP
.I \-\-metadataignore " y|n" .BR \-\-metadataignore " {" \fIy | \fIn }
Ignore or un-ignore metadata areas on this physical volume. Ignore or un-ignore metadata areas on this physical volume.
If metadata areas on a physical volume are ignored, LVM will If metadata areas on a physical volume are ignored, LVM will
not not store metadata in the metadata areas present on this Physical not not store metadata in the metadata areas present on this Physical
Volume. Volume.
.TP .TP
.I \-u, \-\-uuid .BR \-u ", " \-\-uuid
Generate new random UUID for specified physical volumes. Generate new random UUID for specified physical volumes.
.TP .TP
.I \-x, \-\-allocatable y|n .BR \-x ", " \-\-allocatable " {" \fIy | \fIn }
Enable or disable allocation of physical extents on this physical volume. Enable or disable allocation of physical extents on this physical volume.
.SH Example .SH Example
"pvchange -x n /dev/sdk1" disallows the allocation of physical extents Disallows the allocation of physical extents on this physical volume
on this physical volume (possibly because of disk errors, or because it will (possibly because of disk errors, or because it will be removed after
be removed after freeing it. freeing it:
.sp
.B pvchange -x n /dev/sdk1
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR pvcreate (8) .BR pvcreate (8)

View File

@ -6,25 +6,27 @@ pvck \- check physical volume metadata
.RB [ \-d | \-\-debug ] .RB [ \-d | \-\-debug ]
.RB [ \-h | \-\-help ] .RB [ \-h | \-\-help ]
.RB [ \-v | \-\-verbose ] .RB [ \-v | \-\-verbose ]
.RB [ \-\-labelsector ] .RB [ \-\-labelsector
.IR PhysicalVolume " [" PhysicalVolume ...] .IR sector ]
.I PhysicalVolume
.RI [ PhysicalVolume ...]
.SH DESCRIPTION .SH DESCRIPTION
pvck checks physical volume LVM metadata for consistency. pvck checks physical volume LVM metadata for consistency.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.BR \-\-labelsector " sector" .B \-\-labelsector \fIsector
By default, 4 sectors of \fBPhysicalVolume\fP are scanned for an LVM label, 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 at sector 0. This parameter allows you to specify a different
starting sector for the scan and is useful for recovery situations. For starting sector for the scan and is useful for recovery situations. For
example, suppose the partition table is corrupted or lost on /dev/sda, example, suppose the partition table is corrupted or lost on /dev/sda,
but you suspect there was an LVM partition at approximately 100 MB. This 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 area of the disk may be scanned by using the \fB\-\-labelsector\fP parameter
with a value of 204800 (100 * 1024 * 1024 / 512 = 204800): with a value of 204800 (100 * 1024 * 1024 / 512 = 204800):
.sp .sp
.BI "pvck --labelsector 204800 /dev/sda" .B pvck \-\-labelsector 204800 /dev/sda
.sp .sp
Note that a script can be used with \fB--labelsector\fP to automate the Note that a script can be used with \fB\-\-labelsector\fP to automate the
process of finding LVM labels. process of finding LVM labels.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),

View File

@ -8,30 +8,42 @@ pvcreate \- initialize a disk or partition for use by LVM
.RB [ \-t | \-\-test ] .RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ] .RB [ \-v | \-\-verbose ]
.RB [ \-\-version ] .RB [ \-\-version ]
.RB [ \-f [ f ]| \-\-force " [" \-\-force ]] .RB [ \-f [ f ]| \-\-force
.RB [ \-\-force ]]
.RB [ \-y | \-\-yes ] .RB [ \-y | \-\-yes ]
.RB [ \-\-labelsector ] .RB [ \-\-labelsector ]
.RB [ \-M | \-\-metadatatype " " \fItype ] .RB [ \-M | \-\-metadatatype
.RB [ \-\-[pv]metadatacopies " " \fI#copies ] .IR type ]
.RB [ \-\-metadatasize " " \fIsize ] .RB [ \-\- [ pv ] metadatacopies
.RB [ \-\-metadataignore " {" \fIy | \fIn }] .IR NumberOfCopies ]
.RB [ \-\-dataalignment " " \fIalignment ] .RB [ \-\-metadatasize
.RB [ \-\-dataalignmentoffset " " \fIalignment_offset ] .IR size ]
.RB [ \-\-restorefile " " \fIfile ] .RB [ \-\-metadataignore
.RI { y | n }]
.RB [ \-\-dataalignment
.IR alignment ]
.RB [ \-\-dataalignmentoffset
.IR alignment_offset ]
.RB [ \-\-restorefile
.IR file ]
.RB [ \-\-norestorefile ] .RB [ \-\-norestorefile ]
.RB [ \-\-setphysicalvolumesize " " \fIsize ] .RB [ \-\-setphysicalvolumesize
.RB [ \-u | \-\-uuid " " \fIuuid ] .IR size ]
.RB [ \-Z | \-\-zero " {" \fIy | \fIn }] .RB [ \-u | \-\-uuid
.IR PhysicalVolume " [" PhysicalVolume ...] .IR uuid ]
.RB [ \-Z | \-\-zero
.RI { y | n }]
.I PhysicalVolume
.RI [ PhysicalVolume ...]
.SH DESCRIPTION .SH DESCRIPTION
.B pvcreate pvcreate initializes
initializes
.I PhysicalVolume .I PhysicalVolume
for later use by the Logical Volume Manager (LVM). Each for later use by the Logical Volume Manager (LVM). Each
.I PhysicalVolume .I PhysicalVolume
can be a disk partition, whole disk, meta device, or loopback file. 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 For DOS disk partitions, the partition id should be set to 0x8e using
.BR fdisk "(8), " cfdisk "(8), " .BR fdisk (8),
.BR cfdisk (8),
or a equivalent. For or a equivalent. For
.B whole disk devices only .B whole disk devices only
the partition table must be erased, which will effectively destroy all the partition table must be erased, which will effectively destroy all
@ -57,45 +69,45 @@ Force the creation without any confirmation. You can not recreate
In an emergency you can override this behaviour with \fB-ff\fP. In an emergency you can override this behaviour with \fB-ff\fP.
.TP .TP
.BR \-u ", " \-\-uuid " " \fIuuid .BR \-u ", " \-\-uuid " " \fIuuid
Specify the uuid for the device. Specify the uuid for the device.
Without this option, \fBpvcreate\fP generates a random uuid. Without this option, \fBpvcreate\fP(8) generates a random uuid.
All of your physical volumes must have unique uuids. All of your physical volumes must have unique uuids.
You need to use this option before restoring a backup of LVM metadata 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 onto a replacement device - see \fBvgcfgrestore\fP(8). As such, use of
\fB--restorefile\fP is compulsory unless the \fB--norestorefile\fP is \fB\-\-restorefile\fP is compulsory unless the \fB\-\-norestorefile\fP is
used. used.
.TP .TP
.BR \-y ", " \-\-yes .BR \-y ", " \-\-yes
Answer yes to all questions. Answer yes to all questions.
.TP .TP
.BR \-Z ", " \-\-zero " " \fIy | \fIn .BR \-Z ", " \-\-zero " {" \fIy | \fIn }
Whether or not the first 4 sectors (2048 bytes) of the device should be Whether or not the first 4 sectors (2048 bytes) of the device should be
wiped. wiped.
If this option is not given, the If this option is not given, the
default is to wipe these sectors unless either or both of the \fB--restorefile\fP default is to wipe these sectors unless either or both of the
or \fB--uuid\fP options were specified. \fB\-\-restorefile\fP or \fB\-\-uuid\fP options were specified.
.SH NEW METADATA OPTIONS .SH NEW METADATA OPTIONS
LVM2 introduces a new format for storing metadata on disk. LVM2 introduces a new format for storing metadata on disk.
This new format is more efficient and resilient than the format the This new format is more efficient and resilient than the format the
original version of LVM used and offers the advanced user greater original version of LVM used and offers the advanced user greater
flexibility and control. flexibility and control.
.sp .P
The new format may be selected on the command line with \fB-M2\fP or by 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. 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 Each physical volume in the same volume group must use the same format, but
different volume groups on a machine may use different formats different volume groups on a machine may use different formats
simultaneously: the tools can handle both formats. simultaneously: the tools can handle both formats.
Additional formats can be added as shared libraries. Additional formats can be added as shared libraries.
.sp .P
Additional tools for manipulating the locations and sizes of metadata areas 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 will be written in due course. Use the verbose/debug options on the tools
to see where the metadata areas are placed. to see where the metadata areas are placed.
.TP .TP
.BI \-\-metadatasize " size" .B \-\-metadatasize \fIsize
The approximate amount of space to be set aside for each metadata area. The approximate amount of space to be set aside for each metadata area.
(The size you specify may get rounded.) (The size you specify may get rounded.)
.TP .TP
.BI \-\-dataalignment " alignment" .B \-\-dataalignment \fIalignment
Align the start of the data to a multiple of this number. Align the start of the data to a multiple of this number.
You should also specify an appropriate \fIPhysicalExtentSize\fP when creating You should also specify an appropriate \fIPhysicalExtentSize\fP when creating
the Volume Group with \fBvgcreate\fP. the Volume Group with \fBvgcreate\fP.
@ -103,25 +115,25 @@ the Volume Group with \fBvgcreate\fP.
To see the location of the first Physical Extent of an existing Physical Volume 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 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 alignment. In addition it may be shifted by \fIalignment_offset\fP from
\fIdata_alignment_offset_detection\fP (if enabled in \fBlvm.conf\fP) or \fIdata_alignment_offset_detection\fP (if enabled in \fBlvm.conf\fP(5)) or
\fB--dataalignmentoffset\fP. \fB\-\-dataalignmentoffset\fP.
.TP .TP
.BI \-\-dataalignmentoffset " alignment_offset" .B \-\-dataalignmentoffset \fIalignment_offset
Shift the start of the data area by this additional \fIalignment_offset\fP. Shift the start of the data area by this additional \fIalignment_offset\fP.
.TP .TP
.BI \-\-[pv]metadatacopies " copies" .BR \-\- [ pv ] metadatacopies " " \fINumberOfCopies
The number of metadata areas to set aside on each PV. Currently The number of metadata areas to set aside on each PV. Currently
this can be 0, 1 or 2. this can be 0, 1 or 2.
If set to 2, two copies of the volume group metadata 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. 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 If set to 1 (the default), one copy is kept at the front of the PV
(starting in the 5th sector). (starting in the 5th sector).
If set to 0, no copies are kept on this PV - you might wish to use this 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 with VGs containing large numbers of PVs. But if you do this and
then later use \fBvgsplit\fP you must ensure that each VG is still going 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! to have a suitable number of copies of the metadata after the split!
.TP .TP
.BI \-\-metadataignore " y" \fR| n .BR \-\-metadataignore " {" \fIy | \fIn }
Ignore or un-ignore metadata areas on this physical volume. Ignore or un-ignore metadata areas on this physical volume.
The default is "n". This setting can be changed with \fBpvchange\fP. The default is "n". This setting can be changed with \fBpvchange\fP.
If metadata areas on a physical volume are ignored, LVM will If metadata areas on a physical volume are ignored, LVM will
@ -132,49 +144,49 @@ 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 area in case you need it in the future and to use this option to instruct
LVM2 to ignore it. LVM2 to ignore it.
.TP .TP
.BI \-\-restorefile " file" .B \-\-restorefile \fIfile
In conjunction with \fB--uuid\fP, this extracts the location and size 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) of the data on the PV from the file (produced by \fBvgcfgbackup\fP)
and ensures that the metadata that the program produces is consistent 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 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 the same place and not get overwritten by new metadata. This provides
a mechanism to upgrade the metadata format or to add/remove metadata a mechanism to upgrade the metadata format or to add/remove metadata
areas. Use with care. See also \fBvgconvert\fP(8). areas. Use with care. See also \fBvgconvert\fP(8).
.TP .TP
.B \-\-norestorefile .B \-\-norestorefile
In conjunction with \fB--uuid\fP, this allows a \fIuuid\fP to be specified 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. without also requiring that a backup of the metadata be provided.
.TP .TP
.BI \-\-labelsector " sector" .B \-\-labelsector \fIsector
By default the PV is labelled with an LVM2 identifier in its second 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 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 start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS
in the source). Use with care. in the source). Use with care.
.TP .TP
.BI \-\-setphysicalvolumesize " size" .B \-\-setphysicalvolumesize \fIsize
Overrides the automatically-detected size of the PV. Use with care. Overrides the automatically-detected size of the PV. Use with care.
.SH EXAMPLES .SH Examples
Initialize partition #4 on the third SCSI disk and the entire fifth Initialize partition #4 on the third SCSI disk and the entire fifth
SCSI disk for later use by LVM: SCSI disk for later use by LVM:
.sp .sp
.B pvcreate /dev/sdc4 /dev/sde .B pvcreate /dev/sdc4 /dev/sde
.sp
If the 2nd SCSI disk is a 4KB sector drive that compensates for windows If the 2nd SCSI disk is a 4KiB sector drive that compensates for windows
partitioning (sector 7 is the lowest aligned logical block, the 4KB partitioning (sector 7 is the lowest aligned logical block, the 4KiB
sectors start at LBA -1, and consequently sector 63 is aligned on a 4KB 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: boundary) manually account for this when initializing for use by LVM:
.sp .sp
.B pvcreate --dataalignmentoffset 7s /dev/sdb .B pvcreate \-\-dataalignmentoffset 7s /dev/sdb
.sp
.SH SEE ALSO .SH SEE ALSO
.BR lvm.conf (5), .BR lvm.conf (5),
.BR lvm (8), .BR lvm (8),
.BR vgcreate (8), .BR vgcreate (8),
.BR vgextend (8), .BR vgextend (8),
.BR lvcreate (8), .BR lvcreate (8),
.BR cfdisk (8), .BR cfdisk (8),
.BR fdisk (8), .BR fdisk (8),
.BR losetup (8), .BR losetup (8),
.BR mdadm (8), .BR mdadm (8),
.BR vgcfgrestore (8), .BR vgcfgrestore (8),
.BR vgconvert (8) .BR vgconvert (8)

View File

@ -3,48 +3,61 @@
pvdisplay \- display attributes of a physical volume pvdisplay \- display attributes of a physical volume
.SH SYNOPSIS .SH SYNOPSIS
.B pvdisplay .B pvdisplay
[\-c|\-\-colon] .RB [ \-c | \-\-colon ]
[\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-d | \-\-debug ]
[\-\-ignorelockingfailure] .RB [ \-h | \-? | \-\-help ]
[\-\-maps] .RB [ \-\-ignorelockingfailure ]
[\-\-nosuffix] .RB [ \-\-maps ]
[\-s|\-\-short] .RB [ \-\-nosuffix ]
[\-\-units hsbkmgtHKMGT] .RB [ \-s | \-\-short ]
[\-v[v]|\-\-verbose [\-\-verbose]] .RB [ \-\-units
[\-\-version] .IR hsbkmgtHKMGT ]
[PhysicalVolumePath [PhysicalVolumePath...]] .RB [ \-v [ v ]| \-\-verbose
.RB [ \-\-verbose ]]
.RB [ \-\-version ]
.RI [ PhysicalVolumePath
.RI [ PhysicalVolumePath ...]]
.br .br
.br .br
.B pvdisplay \-\-columns | \-C .B pvdisplay
[\-\-aligned] .BR \-\-columns | \-C
[\-a|\-\-all] .RB [ \-\-aligned ]
[\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-a | \-\-all ]
[\-\-ignorelockingfailure] .RB [ \-d | \-\-debug ]
[\-\-noheadings] .RB [ \-h | \-? | \-\-help ]
[\-\-nosuffix] .RB [ \-\-ignorelockingfailure ]
[\-o|\-\-options [+]Field[,Field]] .RB [ \-\-noheadings ]
[\-O|\-\-sort [+|-]Key1[,[+|-]Key2[,...]]] .RB [ \-\-nosuffix ]
[\-\-separator Separator] .RB [ \-o | \-\-options
[\-\-unbuffered] .RI [ + ] Field [ ,Field ...]]
[\-\-units hHbBsSkKmMgGtTpPeE] .RB [ \-O | \-\-sort
[\-v[v]|\-\-verbose [\-\-verbose]] .RI [ + | \- ] Key1 [ , [ + | \- ] Key2 ...
[\-\-version] .RI ]]
[PhysicalVolumePath [PhysicalVolumePath...]] .RB [ \-\-separator
.IR Separator ]
.RB [ \-\-unbuffered ]
.RB [ \-\-units
.IR hHbBsSkKmMgGtTpPeE ]
.RB [ \-v [ v ]| \-\-verbose
.RB [ \-\-verbose ]]
.RB [ \-\-version ]
.RI [ PhysicalVolumePath
.RI [ PhysicalVolumePath ...]]
.SH DESCRIPTION .SH DESCRIPTION
pvdisplay allows you to see the attributes of one or more physical volumes 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 like size, physical extent size, space used for the volume group descriptor
area and so on. area and so on.
.P .P
\fBpvs\fP (8) is an alternative that provides the same information \fBpvs\fP(8) is an alternative that provides the same information
in the style of \fBps\fP (1). in the style of \fBps\fP(1).
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options and \fBpvs\fP for options given with See \fBlvm\fP for common options and \fBpvs\fP for options given with
\fB\-\-columns\fP. \fB\-\-columns\fP.
.TP .TP
.I \-c, \-\-colon .BR \-c ", " \-\-colon
Generate colon separated output for easier parsing in scripts or programs. Generate colon separated output for easier parsing in scripts or programs.
N.B. \fBpvs\fP (8) provides considerably more control over the output. N.B. \fBpvs\fP(8) provides considerably more control over the output.
.nf .nf
The values are: The values are:
@ -63,16 +76,16 @@ The values are:
.fi .fi
.TP .TP
.I \-s, \-\-short .BR \-s ", " \-\-short
Only display the size of the given physical volumes. Only display the size of the given physical volumes.
.TP .TP
.I \-m, \-\-maps .BR \-m ", " \-\-maps
Display the mapping of physical extents to logical volumes and Display the mapping of physical extents to logical volumes and
logical extents. logical extents.
.TP .TP
.I \-\-columns | \-C .BR \-\-columns ", " \-C
Display output in columns, the equivalent of \fBpvs\fP (8). See Display output in columns, the equivalent of \fBpvs\fP(8). See
\fBpvs (8)\fP for a description of other options with this form of \fBpvs\fP(8) for a description of other options with this form of
\fBpvdisplay\fP. \fBpvdisplay\fP.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),

View File

@ -3,15 +3,22 @@
pvmove \- move physical extents pvmove \- move physical extents
.SH SYNOPSIS .SH SYNOPSIS
.B pvmove .B pvmove
[\-\-abort] .RB [ \-\-abort ]
[\-\-alloc AllocationPolicy] .RB [ \-\-alloc
[\-b|\-\-background] .IR AllocationPolicy ]
[\-d|\-\-debug] [\-h|\-\-help] [\-i|\-\-interval Seconds] .RB [ \-b | \-\-background ]
[\-\-noudevsync] [\-v|\-\-verbose] [\-n|\-\-name LogicalVolume] .RB [ \-d | \-\-debug ]
[SourcePhysicalVolume[:PE[-PE]...] [DestinationPhysicalVolume[:PE[-PE]...]...]] .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 .SH DESCRIPTION
.B pvmove pvmove allows you to move the allocated physical extents (PEs) on
allows you to move the allocated physical extents (PEs) on
.I SourcePhysicalVolume .I SourcePhysicalVolume
to one or more other physical volumes (PVs). to one or more other physical volumes (PVs).
You can optionally specify a source You can optionally specify a source
@ -23,8 +30,8 @@ If no
.I DestinationPhysicalVolume .I DestinationPhysicalVolume
is specified, the normal allocation rules for the Volume Group are used. is specified, the normal allocation rules for the Volume Group are used.
If \fBpvmove\fP gets interrupted for any reason (e.g. the machine crashes) If pvmove gets interrupted for any reason (e.g. the machine crashes)
then run \fBpvmove\fP again without any PhysicalVolume arguments to then run pvmove again without any PhysicalVolume arguments to
restart any moves that were in progress from the last checkpoint. restart any moves that were in progress from the last checkpoint.
Alternatively use \fBpvmove --abort\fP at any time to abort them Alternatively use \fBpvmove --abort\fP at any time to abort them
at the last checkpoint. at the last checkpoint.
@ -71,78 +78,74 @@ 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. N.B. The moving of mirrors, snapshots and their origins is not yet supported.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP(8) for common options.
.TP .TP
.I \-\-abort .B \-\-abort
Abort any moves in progress. Abort any moves in progress.
.TP .TP
.I \-\-noudevsync .B \-\-noudevsync
Disable udev synchronisation. The Disable udev synchronisation. The
process will not wait for notification from udev. process will not wait for notification from udev.
It will continue irrespective of any possible udev processing It will continue irrespective of any possible udev processing
in the background. You should only use this if udev is not running in the background. You should only use this if udev is not running
or has rules that ignore the devices LVM2 creates. or has rules that ignore the devices LVM2 creates.
.TP .TP
.I \-b, \-\-background .BR \-b ", " \-\-background
Run the daemon in the background. Run the daemon in the background.
.TP .TP
.I \-i, \-\-interval Seconds .BR \-i ", " \-\-interval " " \fISeconds
Report progress as a percentage at regular intervals. Report progress as a percentage at regular intervals.
.TP .TP
.I \-n, \-\-name " \fILogicalVolume\fR" .BR \-n ", " \-\-name " " \fILogicalVolume
Move only the extents belonging to Move only the extents belonging to
.I LogicalVolume .I LogicalVolume
from from
.I SourcePhysicalVolume .I SourcePhysicalVolume
instead of all allocated extents to the destination physical volume(s). instead of all allocated extents to the destination physical volume(s).
.SH EXAMPLES .SH Examples
To move all Physical Extents that are used by simple Logical Volumes on To move all Physical Extents that are used by simple Logical Volumes on
.B /dev/sdb1 /dev/sdb1 to free Physical Extents elsewhere in the Volume Group use:
to free Physical Extents elsewhere in the Volume Group use:
.sp .sp
\ pvmove /dev/sdb1 .B pvmove /dev/sdb1
.P .P
Any mirrors, snapshots and their origins are left unchanged. Any mirrors, snapshots and their origins are left unchanged.
.P .P
Additionally, a specific destination device Additionally, a specific destination device /dev/sdc1
.B /dev/sdc1
can be specified like this: can be specified like this:
.sp .sp
\ pvmove /dev/sdb1 /dev/sdc1 .B pvmove /dev/sdb1 /dev/sdc1
.P .P
To perform the action only on extents belonging to the single Logical Volume To perform the action only on extents belonging to the single Logical Volume
.B lvol1 lvol1 do this:
do this:
.sp .sp
\ pvmove -n lvol1 /dev/sdb1 /dev/sdc1 .B pvmove -n lvol1 /dev/sdb1 /dev/sdc1
.P .P
Rather than moving the contents of the entire device, it is possible to 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 move a range of Physical Extents - for example numbers 1000 to 1999
.B /dev/sdb1 inclusive on /dev/sdb1 - like this:
- like this:
.sp .sp
\ pvmove /dev/sdb1:1000-1999 .B pvmove /dev/sdb1:1000-1999
.P .P
To move a range of Physical Extents to a specific location (which must have To move a range of Physical Extents to a specific location (which must have
sufficent free extents) use the form: sufficent free extents) use the form:
.sp .sp
\ pvmove /dev/sdb1:1000-1999 /dev/sdc1 .B pvmove /dev/sdb1:1000-1999 /dev/sdc1
.sp .sp
or or
.sp .sp
\ pvmove /dev/sdb1:1000-1999 /dev/sdc1:0-999 .B pvmove /dev/sdb1:1000-1999 /dev/sdc1:0-999
.P .P
If the source and destination are on the same disk, the If the source and destination are on the same disk, the
.B anywhere .B anywhere
allocation policy would be needed, like this: allocation policy would be needed, like this:
.sp .sp
\ pvmove --alloc anywhere /dev/sdb1:1000-1999 /dev/sdb1:0-999 .B pvmove --alloc anywhere /dev/sdb1:1000-1999 /dev/sdb1:0-999
.P .P
The part of a specific Logical Volume present within in a range of Physical The part of a specific Logical Volume present within in a range of Physical
Extents can also be picked out and moved, like this: Extents can also be picked out and moved, like this:
.sp .sp
\ pvmove -n lvol1 /dev/sdb1:1000-1999 /dev/sdc1 .B pvmove -n lvol1 /dev/sdb1:1000-1999 /dev/sdc1
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgconvert (8) .BR vgconvert (8)

View File

@ -14,9 +14,8 @@ pvremove \- remove a physical volume
.I PhysicalVolume .I PhysicalVolume
.RI [ PhysicalVolume ...] .RI [ PhysicalVolume ...]
.SH DESCRIPTION .SH DESCRIPTION
.B pvremove pvremove wipes the label on a device so that LVM will no longer
wipes the label on a device so that LVM will no longer recognise it recognise it as a physical volume.
as a physical volume.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP(8) for common options. See \fBlvm\fP(8) for common options.
.TP .TP

View File

@ -13,8 +13,7 @@ pvresize \- resize a disk or partition in use by LVM2
.I PhysicalVolume .I PhysicalVolume
.RI [ PhysicalVolume ...] .RI [ PhysicalVolume ...]
.SH DESCRIPTION .SH DESCRIPTION
.B pvresize pvresize resizes
resizes
.I PhysicalVolume .I PhysicalVolume
which may already be in a volume group and have active logical volumes which may already be in a volume group and have active logical volumes
allocated on it. allocated on it.
@ -33,11 +32,10 @@ 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 (ensure that the PV size is appropriate for your intended new partition
size): size):
.sp .sp
.B pvresize --setphysicalvolumesize 40G /dev/sda1 .B pvresize \-\-setphysicalvolumesize 40G /dev/sda1
.sp .sp
.SH RESTRICTIONS .SH RESTRICTIONS
.B pvresize pvresize will refuse to shrink
will refuse to shrink
.I PhysicalVolume .I PhysicalVolume
if it has allocated extents after where its new end would be. In the future, 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 it should relocate these elsewhere in the volume group if there is sufficient

View File

@ -3,90 +3,102 @@
pvs \- report information about physical volumes pvs \- report information about physical volumes
.SH SYNOPSIS .SH SYNOPSIS
.B pvs .B pvs
[\-a|\-\-all] .RB [ \-a | \-\-all ]
[\-\-aligned] [\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-\-aligned ]
[\-\-ignorelockingfailure] [\-\-nameprefixes] [\-\-noheadings] [\-\-nosuffix] .RB [ \-d | \-\-debug ]
[\-o|\-\-options [+]Field[,Field]] .RB [ \-h | \-? | \-\-help ]
[\-O|\-\-sort [+|-]Key1[,[+|-]Key2[,...]]] .RB [ \-\-ignorelockingfailure ]
[\-P|\-\-partial] .RB [ \-\-nameprefixes ]
[\-\-rows] .RB [ \-\-noheadings ]
[\-\-segments] .RB [ \-\-nosuffix ]
[\-\-separator Separator] .RB [ \-o | \-\-options
[\-\-unbuffered] .RI [ + ] Field [ ,Field ...]]
[\-\-units hHbBsSkKmMgGtTpPeE] .RB [ \-O | \-\-sort
[\-\-unquoted] .RI [ + | \- ] Key1 [ , [ + | \- ] Key2 ...]]
[\-v|\-\-verbose] .RB [ \-P | \-\-partial ]
[\-\-version] [PhysicalVolume [PhysicalVolume...]] .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 .SH DESCRIPTION
pvs produces formatted output about physical volumes. pvs produces formatted output about physical volumes.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
\fB\-\-columns\fP.
.TP .TP
.I \-\-all .B \-\-all
Include information in the output about devices that have not been Include information in the output about devices that have not been
initialized with \fBpvcreate\fP. initialized with \fBpvcreate\fP(8).
.TP .TP
.I \-\-aligned .B \-\-aligned
Use with \-\-separator to align the output columns. Use with \fB\-\-separator\fP to align the output columns.
.TP .TP
.I \-\-nameprefixes .B \-\-nameprefixes
Add an "LVM2_" prefix plus the field name to the output. Useful Add an "LVM2_" prefix plus the field name to the output. Useful
with --noheadings to produce a list of field=value pairs that can with \fB\-\-noheadings\fP to produce a list of field=value pairs that can
be used to set environment variables (for example, in \fBudev (7)\fP rules). be used to set environment variables (for example, in \fBudev\fP(7) rules).
.TP .TP
.I \-\-noheadings .B \-\-noheadings
Suppress the headings line that is normally the first line of output. Suppress the headings line that is normally the first line of output.
Useful if grepping the output. Useful if grepping the output.
.TP .TP
.I \-\-nosuffix .B \-\-nosuffix
Suppress the suffix on output sizes. Use with \-\-units (except h and H) Suppress the suffix on output sizes. Use with \fB\-\-units\fP
if processing the output. (except h and H) if processing the output.
.TP .TP
.I \-o, \-\-options .BR \-o ", " \-\-options
Comma-separated ordered list of columns. Precede the list with '+' to append Comma-separated ordered list of columns. Precede the list with '\fI+\fP'
to the default selection of columns. to append to the default selection of columns.
.IP .IP
Use \fb-o pv_all\fP to select all physical volume columns, and \fb-o pvseg_all\fP Use \fB-o pv_all\fP to select all physical volume columns,
to select all Physical Volume segment columns. and \fB-o pvseg_all\fP to select all Physical Volume segment columns.
.IP .IP
Use \fb-o help\fP to view the full list of columns available. Use \fB-o help\fP to view the full list of columns available.
.IP .IP
Column names include: pv_fmt, pv_uuid, dev_size, pv_name, pv_mda_free, 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_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, pv_pe_alloc_count, pv_tags, pv_mda_count, pv_mda_used_count,
pvseg_start, and pvseg_size. pvseg_start, and pvseg_size.
.IP .IP
With --segments, any "pvseg_" prefixes are optional; otherwise any With \fB\-\-segments\fP, any "pvseg_" prefixes are optional; otherwise any
"pv_" prefixes are optional. Columns mentioned in \fBvgs (8)\fP can also "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. be chosen. The pv_attr bits are: (a)llocatable, e(x)ported and (m)issing.
.TP .TP
.I \-\-segments .B \-\-segments
Produces one line of output for each contiguous allocation of space on each 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 Physical Volume, showing the start (pvseg_start) and length (pvseg_size) in
units of physical extents. units of physical extents.
.TP .TP
.I \-O, \-\-sort .BR \-O ", " \-\-sort
Comma-separated ordered list of columns to sort by. Replaces the default Comma-separated ordered list of columns to sort by. Replaces the default
selection. Precede any column with - for a reverse sort on that column. selection. Precede any column with '\fI\-\fP' for a reverse sort on that
column.
.TP .TP
.I \-\-rows .B \-\-rows
Output columns as rows. Output columns as rows.
.TP .TP
.I \-\-separator Separator .B \-\-separator \fISeparator
String to use to separate each column. Useful if grepping the output. String to use to separate each column. Useful if grepping the output.
.TP .TP
.I \-\-unbuffered .B \-\-unbuffered
Produce output immediately without sorting or aligning the columns properly. Produce output immediately without sorting or aligning the columns properly.
.TP .TP
.I \-\-units hHbBsSkKmMgGtTpPeE .B \-\-units \fIhHbBsSkKmMgGtTpPeE
All sizes are output in these units: (h)uman-readable, (b)ytes, (s)ectors, 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. (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 Capitalise to use multiples of 1000 (S.I.) instead of 1024. Can also specify
custom units e.g. \-\-units 3M custom units e.g. \-\-units 3M
.TP .TP
.I \-\-unquoted .B \-\-unquoted
When used with --nameprefixes, output values in the field=value pairs are not quoted. When used with \fB\-\-nameprefixes\fP, output values in the field=value
pairs are not quoted.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR pvdisplay (8), .BR pvdisplay (8),

View File

@ -17,17 +17,16 @@ pvscan \- scan all disks for physical volumes
.B pvscan .B pvscan
.RB [ \-d | \-\-debug ] .RB [ \-d | \-\-debug ]
.RB [ \-h | \-\-help ] .RB [ \-h | \-\-help ]
.RB \-\-cache .B \-\-cache
.RB [ \-\-major .RB [ \-\-major
.IR major .I major
.RB \-\-minor .B \-\-minor
.IR minor .I minor
| |
.RI DevicePath .IR DevicePath ]...
] ...
.SH DESCRIPTION .SH DESCRIPTION
.B pvscan pvscan scans all supported LVM block devices in the system for
scans all supported LVM block devices in the system for physical volumes. physical volumes.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP(8) for common options. See \fBlvm\fP(8) for common options.
.TP .TP
@ -43,7 +42,7 @@ Short listing format.
.BR \-u ", " \-\-uuid .BR \-u ", " \-\-uuid
Show UUIDs (Uniform Unique Identifiers) in addition to device special names. Show UUIDs (Uniform Unique Identifiers) in addition to device special names.
.TP .TP
.BR \-\-cache " " [ " " \-\-major " " major " " \-\-minor " " minor " " | " " DevicePath " " ] " " ... .BR \-\-cache " [" \-\-major " " \fImajor " " \-\-minor " " \fIminor " | " \fIDevicePath " ]..."
Scan one or more devices and instruct the lvmetad daemon to update its cached Scan one or more devices and instruct the lvmetad daemon to update its cached
state accordingly. Called internally by udev rules. state accordingly. Called internally by udev rules.
All devices listed explicitly are processed \fBregardless\fP of any device All devices listed explicitly are processed \fBregardless\fP of any device

View File

@ -4,29 +4,28 @@ vgcfgbackup \- backup volume group descriptor area
.SH SYNOPSIS .SH SYNOPSIS
.B vgcfgbackup .B vgcfgbackup
.RB [ \-d | \-\-debug ] .RB [ \-d | \-\-debug ]
.RB [ \-f | \-\-file " filename" ] .RB [ \-f | \-\-file
.RI < filename >]
.RB [ \-h | \-\-help ] .RB [ \-h | \-\-help ]
.RB [ \-\-ignorelockingfailure ] .RB [ \-\-ignorelockingfailure ]
.RB [ \-P | \-\-partial ] .RB [ \-P | \-\-partial ]
.RB [ \-v | \-\-verbose ] .RB [ \-v | \-\-verbose ]
.RI [ VolumeGroupName ...] .RI [ VolumeGroupName ...]
.SH DESCRIPTION .SH DESCRIPTION
.B vgcfgbackup vgcfgbackup allows you to backup the metadata of your volume groups.
allows you to backup the metadata If you don't name any volume groups on the command line, all of them
of your volume groups.
If you don't name any volume groups on the command line, all of them
will be backed up. will be backed up.
.sp .sp
In a default installation, each volume group gets backed up into a separate 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#. file bearing the name of the volume group in the directory #DEFAULT_BACKUP_DIR#.
You can write the backup to an alternative file using -f. In this case 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 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. treated as a template, and %s gets replaced by the volume group name.
.sp .sp
NB. This DOESN'T backup user/system data in logical NB. This DOESN'T backup user/system data in logical
volume(s)! Backup #DEFAULT_SYS_DIR# regularly too. volume(s)! Backup #DEFAULT_SYS_DIR# regularly too.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgcfgrestore (8) .BR vgcfgrestore (8)

View File

@ -4,40 +4,43 @@ vgcfgrestore \- restore volume group descriptor area
.SH SYNOPSIS .SH SYNOPSIS
.B vgcfgrestore .B vgcfgrestore
.RB [ \-d | \-\-debug ] .RB [ \-d | \-\-debug ]
.RB [ \-f | \-\-file " filename" ] .RB [ \-f | \-\-file
.RB [ \-l[l] | \-\-list ] .RI < filename >]
.RB [ \-l [ l ]| \-\-list ]
.RB [ \-h | \-\-help ] .RB [ \-h | \-\-help ]
.RB [ \-M | \-\-Metadatatype 1|2] .RB [ \-M | \-\-metadatatype
.IR 1 | 2 ]
.RB [ \-t | \-\-test ] .RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ] .RB [ \-v | \-\-verbose ]
.RI \fIVolumeGroupName\fP .RI \fIVolumeGroupName\fP
.SH DESCRIPTION .SH DESCRIPTION
.B vgcfgrestore vgcfgrestore allows you to restore the metadata of \fIVolumeGroupName\fP
allows you to restore the metadata of \fIVolumeGroupName\fP from a text from a text backup file produced by \fBvgcfgbackup\fP.
backup file produced by \fBvgcfgbackup\fP. You can specify a backup file You can specify a backup file with \fB\-\-file\fP.
with \fP--file\fP. If no backup file is specified, the most recent If no backup file is specified, the most recent
one is used. Use \fB--list\fP for a list of the available one is used. Use \fB\-\-list\fP for a list of the available
backup and archive files of \fIVolumeGroupName\fP. backup and archive files of \fIVolumeGroupName\fP.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP(8) for common options.
.TP .TP
\fB-l | --list\fP \(em List files pertaining to \fIVolumeGroupName\fP .BR \-l ", " \-\-list\fP
List files pertaining to \fIVolumeGroupName\fP
List metadata backup and archive 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. May be used with the \fB\-f\fP option. Does not restore \fIVolumeGroupName\fP.
.TP .TP
\fB-f | --file\fP filename \(em Name of LVM metadata backup file .BR \-f ", " \-\-file " " \fIfilename
Name of LVM metadata backup file
Specifies a metadata backup or archive file to be used for restoring Specifies a metadata backup or archive file to be used for restoring
VolumeGroupName. Often this file has been created with \fBvgcfgbackup\fP. VolumeGroupName. Often this file has been created with \fBvgcfgbackup\fP.
.TP
See \fBlvm\fP for common options.
.SH REPLACING PHYSICAL VOLUMES .SH REPLACING PHYSICAL VOLUMES
\fBvgdisplay --partial --verbose\fP will show you the UUIDs and sizes of \fBvgdisplay \-\-partial \-\-verbose\fP will show you the UUIDs and sizes of
any PVs that are no longer present. any PVs that are no longer present.
If a PV in the VG is lost and you wish to substitute If a PV in the VG is lost and you wish to substitute
another of the same size, use another of the same size, use
\fBpvcreate --restorefile filename --uuid uuid\fP (plus additional \fBpvcreate \-\-restorefile filename \-\-uuid uuid\fP (plus additional
arguments as appropriate) to initialise it with the same UUID as arguments as appropriate) to initialise it with the same UUID as
the missing PV. Repeat for all other missing PVs in the VG. the missing PV. Repeat for all other missing PVs in the VG.
Then use \fBvgcfgrestore --file filename\fP to restore the volume Then use \fBvgcfgrestore \-\-file filename\fP to restore the volume
group's metadata. group's metadata.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),

View File

@ -7,39 +7,45 @@ vgchange \- change attributes of a volume group
.IR Tag ] .IR Tag ]
.RB [ \-\-alloc .RB [ \-\-alloc
.IR AllocationPolicy ] .IR AllocationPolicy ]
.RB [ \-A | \-\-autobackup " {" y | n }] .RB [ \-A | \-\-autobackup
.RB [ \-a | \-\-available " [e|l] {" y | n }] .RI { y | n }]
.RB [ \-\-monitor " {" y | n }] .RB [ \-a | \-\-available
.RB [ \-\-poll " {" y | n }] .RI [ e | l ]
.RB [ \-c | \-\-clustered " {" y | n }] .RI { y | n }]
.RB [ \-\-monitor
.RI { y | n }]
.RB [ \-\-poll
.RI { y | n }]
.RB [ \-c | \-\-clustered
.RI { y | n }]
.RB [ \-u | \-\-uuid ] .RB [ \-u | \-\-uuid ]
.RB [ \-d | \-\-debug] .RB [ \-d | \-\-debug ]
.RB [ \-\-deltag .RB [ \-\-deltag
.IR Tag ] .IR Tag ]
.RB [ \-h | \-\-help] .RB [ \-h | \-\-help ]
.RB [ \-\-ignorelockingfailure] .RB [ \-\-ignorelockingfailure ]
.RB [ \-\-ignoremonitoring] .RB [ \-\-ignoremonitoring ]
.RB [ \-\-sysinit] .RB [ \-\-sysinit ]
.RB [ \-\-noudevsync ] .RB [ \-\-noudevsync ]
.RB [ \-l | \-\-logicalvolume .RB [ \-l | \-\-logicalvolume
.IR MaxLogicalVolumes ] .IR MaxLogicalVolumes ]
.RB [ -p | \-\-maxphysicalvolumes .RB [ -p | \-\-maxphysicalvolumes
.IR MaxPhysicalVolumes ] .IR MaxPhysicalVolumes ]
.RB [ \-\-[vg]metadatacopies ] .RB [ \-\- [ vg ] metadatacopies ]
.IR NumberOfCopies|unmanaged|all ] .IR NumberOfCopies | unmanaged | all ]
.RB [ \-P | \-\-partial] .RB [ \-P | \-\-partial ]
.RB [ \-s | \-\-physicalextentsize .RB [ \-s | \-\-physicalextentsize
.IR PhysicalExtentSize [ \fBbBsSkKmMgGtTpPeE\fR ]] .IR PhysicalExtentSize [ bBsSkKmMgGtTpPeE ]]
.RB [ \-\-refresh] .RB [ \-\-refresh ]
.RB [ -t | \-\-test] .RB [ -t | \-\-test ]
.RB [ \-v | \-\-verbose] .RB [ \-v | \-\-verbose ]
.RB [ \-\-version ] .RB [ \-\-version ]
.RB [ \-x | \-\-resizeable " {" y | n }] .RB [ \-x | \-\-resizeable
.RI { y | n }]
.RI [ VolumeGroupName ...] .RI [ VolumeGroupName ...]
.SH DESCRIPTION .SH DESCRIPTION
.B vgchange vgchange allows you to change the attributes of one or more
allows you to change the attributes of one or more volume groups. volume groups. Its main purpose is to activate and deactivate
Its main purpose is to activate and deactivate
.IR VolumeGroupName , .IR VolumeGroupName ,
or all volume groups if none is specified. Only active volume groups or all volume groups if none is specified. Only active volume groups
are subject to changes and allow access to their logical volumes. are subject to changes and allow access to their logical volumes.
@ -51,25 +57,25 @@ snapshots should be removed (see
.BR lvremove (8)). .BR lvremove (8)).
] ]
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.BR \-A ", " \-\-autobackup " " { y | n } .BR \-A ", " \-\-autobackup " {" \fIy | \fIn }
Controls automatic backup of metadata after the change. See Controls automatic backup of metadata after the change. See
.B vgcfgbackup (8). .BR vgcfgbackup (8).
Default is yes. Default is yes.
.TP .TP
.BR \-a ", " \-\-available " " [e|l] { y | n } .BR \-a ", " \-\-available " [" \fIe | \fIl ]{ \fIy | \fIn }
Controls the availability of the logical volumes in the volume Controls the availability of the logical volumes in the volume
group for input/output. group for input/output.
In other words, makes the logical volumes known/unknown to the kernel. In other words, makes the logical volumes known/unknown to the kernel.
.IP .IP
If clustered locking is enabled, add 'e' to activate/deactivate If clustered locking is enabled, add 'e' to activate/deactivate
exclusively on one node or 'l' to activate/deactivate only exclusively on one node or 'l' to activate/deactivate only
on the local node. on the local node.
Logical volumes with single-host snapshots are always activated Logical volumes with single-host snapshots are always activated
exclusively because they can only be used on one node at once. exclusively because they can only be used on one node at once.
.TP .TP
.BR \-c ", " \-\-clustered " " { y | n } .BR \-c ", " \-\-clustered " {" \fIy | \fIn }
If clustered locking is enabled, this indicates whether this If clustered locking is enabled, this indicates whether this
Volume Group is shared with other nodes in the cluster or whether 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. it contains only local disks that are not visible on the other nodes.
@ -80,32 +86,35 @@ are not marked as clustered.
.BR \-u ", " \-\-uuid .BR \-u ", " \-\-uuid
Generate new random UUID for specified Volume Groups. Generate new random UUID for specified Volume Groups.
.TP .TP
.BR \-\-monitor " " { y | n } .BR \-\-monitor " {" \fIy | \fIn }
Start or stop monitoring a mirrored or snapshot logical volume with Start or stop monitoring a mirrored or snapshot logical volume with
dmeventd, if it is installed. dmeventd, if it is installed.
If a device used by a monitored mirror reports an I/O error, If a device used by a monitored mirror reports an I/O error,
the failure is handled according to the failure is handled according to
.BR mirror_image_fault_policy .B mirror_image_fault_policy
and and
.BR mirror_log_fault_policy .B mirror_log_fault_policy
set in set in
.BR lvm.conf (5). .BR lvm.conf (5).
.TP .TP
.BR \-\-poll " " { y | n } .BR \-\-poll " {" \fIy | \fIn }
Without polling a logical volume's backgrounded transformation process Without polling a logical volume's backgrounded transformation process
will never complete. If there is an incomplete pvmove or lvconvert (for 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 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 process from its last checkpoint. However, it may not be appropriate to
immediately poll a logical volume when it is activated, use \fB--poll immediately poll a logical volume when it is activated, use
n\fP to defer and then \fB--poll y\fP to restart the process. \fB\-\-poll n\fP to defer and then \fB\-\-poll y\fP to restart the process.
.TP .TP
.BR \-\-sysinit .BR \-\-sysinit
Indicates that vgchange(8) is being invoked from early system initialisation Indicates that vgchange(8) is being invoked from early system initialisation
scripts (e.g. rc.sysinit or an initrd), before writeable filesystems are scripts (e.g. rc.sysinit or an initrd), before writeable filesystems are
available. As such, some functionality needs to be disabled and this option available. As such, some functionality needs to be disabled and this option
acts as a shortcut which selects an appropriate set of options. Currently acts as a shortcut which selects an appropriate set of options. Currently
this is equivalent to using \fB--ignorelockingfailure\fP, \fB--ignoremonitoring\fP, this is equivalent to using
\fB--poll n\fP and setting \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP .BR \-\-ignorelockingfailure ,
.BR \-\-ignoremonitoring ,
.B \-\-poll n
and setting \fBLVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
environment variable. environment variable.
.TP .TP
.BR \-\-noudevsync .BR \-\-noudevsync
@ -116,16 +125,16 @@ in the background. You should only use this if udev is not running
or has rules that ignore the devices LVM2 creates. or has rules that ignore the devices LVM2 creates.
.TP .TP
.BR \-\-ignoremonitoring .BR \-\-ignoremonitoring
Make no attempt to interact with dmeventd unless Make no attempt to interact with dmeventd unless
.BR \-\-monitor .BR \-\-monitor
is specified. is specified.
Do not use this if dmeventd is already monitoring a device. Do not use this if dmeventd is already monitoring a device.
.TP .TP
.BR \-l ", " \-\-logicalvolume " " \fIMaxLogicalVolumes\fR .BR \-l ", " \-\-logicalvolume " " \fIMaxLogicalVolumes
Changes the maximum logical volume number of an existing inactive Changes the maximum logical volume number of an existing inactive
volume group. volume group.
.TP .TP
.BR \-p ", " \-\-maxphysicalvolumes " " \fIMaxPhysicalVolumes\fR .BR \-p ", " \-\-maxphysicalvolumes " " \fIMaxPhysicalVolumes
Changes the maximum number of physical volumes that can belong Changes the maximum number of physical volumes that can belong
to this volume group. to this volume group.
For volume groups with metadata in lvm1 format, the limit is 255. For volume groups with metadata in lvm1 format, the limit is 255.
@ -135,7 +144,7 @@ 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 you should consider some use of \fB--pvmetadatacopies 0\fP as described in
\fBpvcreate(8)\fP, and/or use \fB--vgmetadatacopies\fP. \fBpvcreate(8)\fP, and/or use \fB--vgmetadatacopies\fP.
.TP .TP
.BR \-\-[vg]metadatacopies " " \fINumberOfCopies|unmanaged|all\fP .BR \-\- [ vg ] metadatacopies " " \fINumberOfCopies | \fIunmanaged | \fIall
Sets the desired number of metadata copies in the volume group. If set to Sets the desired number of metadata copies in the volume group. If set to
a non-zero value, LVM will automatically manage the 'metadataignore' a non-zero value, LVM will automatically manage the 'metadataignore'
flags on the physical volumes (see \fBpvchange\fP or \fBpvcreate --metadataignore\fP) in order flags on the physical volumes (see \fBpvchange\fP or \fBpvcreate --metadataignore\fP) in order
@ -147,26 +156,26 @@ The \fBvgmetadatacopies\fP option is useful for volume groups containing
large numbers of physical volumes with metadata as it may be used to large numbers of physical volumes with metadata as it may be used to
minimize metadata read and write overhead. minimize metadata read and write overhead.
.TP .TP
.BR \-s ", " \-\-physicalextentsize " " \fIPhysicalExtentSize\fR[\fBbBsSkKmMgGtTpPeE\fR] .BR \-s ", " \-\-physicalextentsize " " \fIPhysicalExtentSize [ \fIBbBsSkKmMgGtTpPeE ]
Changes the physical extent size on physical volumes of this volume group. 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 A size suffix (k for kilobytes up to t for terabytes) is optional, megabytes
is the default if no suffix is present. is the default if no suffix is present.
The default is 4 MB and it must be at least 1 KB and a power of 2. 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, Before increasing the physical extent size, you might need to use lvresize,
pvresize and/or pvmove so that everything fits. For example, every pvresize and/or pvmove so that everything fits. For example, every
contiguous range of extents used in a logical volume must start and contiguous range of extents used in a logical volume must start and
end on an extent boundary. end on an extent boundary.
If the volume group metadata uses lvm1 format, extents can vary in size from If the volume group metadata uses lvm1 format, extents can vary in size from
8KB to 16GB and there is a limit of 65534 extents in each logical volume. The 8KiB to 16GiB and there is a limit of 65534 extents in each logical volume.
default of 4 MB leads to a maximum logical volume size of around 256GB. 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, 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 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 1KB. impact on I/O performance to the logical volume. The smallest PE is 1KiB.
The 2.4 kernel has a limitation of 2TB per block device. The 2.4 kernel has a limitation of 2TiB per block device.
.TP .TP
.BR \-\-refresh .BR \-\-refresh
If any logical volume in the volume group is active, reload its metadata. If any logical volume in the volume group is active, reload its metadata.
@ -174,24 +183,20 @@ This is not necessary in normal operation, but may be useful
if something has gone wrong or if you're doing clustering if something has gone wrong or if you're doing clustering
manually without a clustered lock manager. manually without a clustered lock manager.
.TP .TP
.BR \-x ", " \-\-resizeable " " { y | n } .BR \-x ", " \-\-resizeable " {" \fIy | \fIn }
Enables or disables the extension/reduction of this volume group Enables or disables the extension/reduction of this volume group
with/by physical volumes. with/by physical volumes.
.SH EXAMPLES .SH Examples
To activate all known volume groups in the system: To activate all known volume groups in the system:
.nf .sp
.B vgchange -a y
\ vgchange -a y
.fi
To change the maximum number of logical volumes of inactive volume group To change the maximum number of logical volumes of inactive volume group
.B vg00 vg00 to 128.
to 128. .sp
.nf .B vgchange -l 128 /dev/vg00
\ vgchange -l 128 /dev/vg00
.fi
.SH SEE ALSO .SH SEE ALSO
.BR lvchange (8), .BR lvchange (8),
.BR lvm (8), .BR lvm (8),

View File

@ -3,11 +3,14 @@
vgck \- check volume group metadata vgck \- check volume group metadata
.SH SYNOPSIS .SH SYNOPSIS
.B vgck .B vgck
[\-d|\-\-debug] [\-h|\-?|\-\-help] [\-v|\-\-verbose] [VolumeGroupName...] .RB [ \-d | \-\-debug ]
.RB [ \-h | \-? | \-\-help ]
.RB [ \-v | \-\-verbose ]
.RI [ VolumeGroupName ...]
.SH DESCRIPTION .SH DESCRIPTION
vgck checks LVM metadata for each named volume group for consistency. vgck checks LVM metadata for each named volume group for consistency.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgcreate (8), .BR vgcreate (8),

View File

@ -8,29 +8,32 @@ vgconvert \- convert volume group metadata format
.RB [ \-t | \-\-test ] .RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ] .RB [ \-v | \-\-verbose ]
.RB [ \-\-labelsector ] .RB [ \-\-labelsector ]
.RB [ \-M | \-\-metadatatype type ] .RB [ \-M | \-\-metadatatype
.RB [ \-\-pvmetadatacopies #copies ] .IR type ]
.RB [ \-\-metadatasize size ] .RB [ \-\-pvmetadatacopies
.IR NumberOfCopies ]
.RB [ \-\-metadatasize
.IR size ]
.RB [ \-\-version ] .RB [ \-\-version ]
.IR VolumeGroupName " [" VolumeGroupName ...] .I VolumeGroupName
.RI [ VolumeGroupName ...]
.SH DESCRIPTION .SH DESCRIPTION
.B vgconvert vgconvert converts
converts
.I VolumeGroupName .I VolumeGroupName
metadata from one format to another provided that the metadata metadata from one format to another provided that the metadata
fits into the same space. fits into the same space.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP(8) and \fBpvcreate\fP(8) for options. See \fBlvm\fP(8) and \fBpvcreate\fP(8) for options.
.SH EXAMPLE .SH Examples
Convert volume group vg1 from LVM1 metadata format to the new LVM2 Convert volume group vg1 from LVM1 metadata format to the new LVM2
metadata format. metadata format.
.sp .sp
.B vgconvert -M2 vg1 .B vgconvert \-M2 vg1
.SH RECOVERY .SH RECOVERY
Use \fBpvscan\fP(8) to see which PVs lost their metadata. Use \fBpvscan\fP(8) to see which PVs lost their metadata.
Run \fBpvcreate\fP(8) with the --uuid and --restorefile options on each Run \fBpvcreate\fP(8) with the \fB\-\-uuid\fP and \fB\-\-restorefile\fP
such PV to reformat it as it was, using the archive file that options on each such PV to reformat it as it was, using the archive
\fBvgconvert\fP(8) created at the start of the procedure. file that \fBvgconvert\fP(8) created at the start of the procedure.
Finally run \fBvgcfgrestore\fP(8) with that archive file to restore Finally run \fBvgcfgrestore\fP(8) with that archive file to restore
the original metadata. the original metadata.
.SH SEE ALSO .SH SEE ALSO

View File

@ -5,79 +5,83 @@ vgcreate \- create a volume group
.B vgcreate .B vgcreate
.RB [ \-\-addtag .RB [ \-\-addtag
.IR Tag ] .IR Tag ]
.RB [ \-\-alloc .RB [ \-\-alloc
.IR AllocationPolicy ] .IR AllocationPolicy ]
.RB [ \-A | \-\-autobackup " {" y | n }] .RB [ \-A | \-\-autobackup
.RB [ \-c | \-\-clustered " {" y | n }] .RI { y | n }]
.RB [ \-c | \-\-clustered
.RI { y | n }]
.RB [ \-d | \-\-debug ] .RB [ \-d | \-\-debug ]
.RB [ \-h | \-\-help ] .RB [ \-h | \-\-help ]
.RB [ \-l | \-\-maxlogicalvolumes .RB [ \-l | \-\-maxlogicalvolumes
.IR MaxLogicalVolumes ] .IR MaxLogicalVolumes ]
.RB [ -M | \-\-metadatatype type] .RB [ -M | \-\-metadatatype
.IR type ]
.RB [ -p | \-\-maxphysicalvolumes .RB [ -p | \-\-maxphysicalvolumes
.IR MaxPhysicalVolumes ] .IR MaxPhysicalVolumes ]
.RB [ \-\-[vg]metadatacopies ] .RB [ \-\- [ vg ] metadatacopies
.IR NumberOfCopies|unmanaged|all ] .IR NumberOfCopies | unmanaged | all ]
.RB [ \-s | \-\-physicalextentsize .RB [ \-s | \-\-physicalextentsize
.IR PhysicalExtentSize [ \fBbBsSkKmMgGtTpPeE\fR ]] .IR PhysicalExtentSize [ bBsSkKmMgGtTpPeE ]]
.RB [ \-t | \-\-test ] .RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ] .RB [ \-v | \-\-verbose ]
.RB [ \-\-version ] .RB [ \-\-version ]
[ \fIPHYSICAL DEVICE OPTIONS\fP ] .RB [ "PHYSICAL DEVICE OPTIONS" ]
.I VolumeGroupName PhysicalDevicePath .I VolumeGroupName PhysicalDevicePath
.RI [ PhysicalDevicePath ...] .RI [ PhysicalDevicePath ...]
.SH DESCRIPTION .SH DESCRIPTION
.B vgcreate vgcreate creates a new volume group called
creates a new volume group called
.I VolumeGroupName .I VolumeGroupName
using the block special device \fIPhysicalDevicePath\fP. using the block special device \fIPhysicalDevicePath\fP.
.sp .sp
If \fIPhysicalDevicePath\fP was not previously configured for LVM with If \fIPhysicalDevicePath\fP was not previously configured for LVM with
\fBpvcreate (8)\fP, the device will be initialized with the same \fBpvcreate\fP(8), the device will be initialized with the same
default values used with \fBpvcreate\fP. If non-default default values used with \fBpvcreate\fP(8). If non-default
\fPpvcreate\fP values are desired, they may be given on the \fPpvcreate\fP values are desired, they may be given on the
commandline with the same options as \fPpvcreate\fP. See commandline with the same options as \fBpvcreate\fP(8). See
\fBPHYSICAL DEVICE OPTIONS\fP for available options. Note .B PHYSICAL DEVICE OPTIONS
that the restore-related options such as --restorefile, --uuid, for available options. Note that the restore-related options such as
and --physicalvolumesize are not available. If a restore operation .BR \-\-restorefile ", " \-\-uuid " and " \-\-physicalvolumesize
is needed, use \fBpvcreate (8)\fP and \fBvgcfgrestore (8)\fP. are not available. If a restore operation is needed, use
\fBpvcreate\fP(8) and \fBvgcfgrestore\fP(8).
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.BR \-c ", " \-\-clustered " " { y | n } .BR \-c ", " \-\-clustered " {" \fIy | \fIn }
If clustered locking is enabled, this defaults to \fBy\fP indicating that If clustered locking is enabled, this defaults to \fBy\fP indicating that
this Volume Group is shared with other nodes in the cluster. this Volume Group is shared with other nodes in the cluster.
If the new Volume Group contains only local disks that are not visible If the new Volume Group contains only local disks that are not visible
on the other nodes, you must specify \fB\-\-clustered\ n\fP. on the other nodes, you must specify \fB\-\-clustered\ n\fP.
If the cluster infrastructure is unavailable on a particular node at a If the cluster infrastructure is unavailable on a particular node at a
particular time, you may still be able to use such Volume Groups. particular time, you may still be able to use such Volume Groups.
.TP .TP
.BR \-l ", " \-\-maxlogicalvolumes " " \fIMaxLogicalVolumes\fR .BR \-l ", " \-\-maxlogicalvolumes " " \fIMaxLogicalVolumes
Sets the maximum number of logical volumes allowed in this Sets the maximum number of logical volumes allowed in this
volume group. volume group.
The setting can be changed with \fBvgchange\fP. The setting can be changed with \fBvgchange\fP(8).
For volume groups with metadata in lvm1 format, the limit For volume groups with metadata in lvm1 format, the limit
and default value is 255. and default value is 255.
If the metadata uses lvm2 format, the default value is 0 If the metadata uses lvm2 format, the default value is 0
which removes this restriction: there is then no limit. which removes this restriction: there is then no limit.
.TP .TP
.BR \-p ", " \-\-maxphysicalvolumes " " \fIMaxPhysicalVolumes\fR .BR \-p ", " \-\-maxphysicalvolumes " " \fIMaxPhysicalVolumes
Sets the maximum number of physical volumes that can belong Sets the maximum number of physical volumes that can belong
to this volume group. to this volume group.
The setting can be changed with \fBvgchange\fP. The setting can be changed with \fBvgchange\fP.
For volume groups with metadata in lvm1 format, the limit For volume groups with metadata in lvm1 format, the limit
and default value is 255. and default value is 255.
If the metadata uses lvm2 format, the value 0 removes this restriction: 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 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, 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 you should consider some use of \fB\-\-pvmetadatacopies 0\fP as described in
\fBpvcreate(8)\fP, and/or use \fB--vgmetadatacopies\fP. \fBpvcreate\fP(8), and/or use \fB\-\-vgmetadatacopies\fP.
.TP .TP
.BR \-\-vgmetadatacopies " " \fINumberOfCopies|unmanaged|all\fP .BR \-\- [ vg ] metadatacopies " " \fINumberOfCopies | \fIunmanaged | \fIall
Sets the desired number of metadata copies in the volume group. If set to Sets the desired number of metadata copies in the volume group. If set to
a non-zero value, LVM will automatically manage the 'metadataignore' a non-zero value, LVM will automatically manage the 'metadataignore'
flags on the physical volumes (see \fBpvcreate\fP or \fBpvchange\fP --metadataignore\fP) in order 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, to achieve \fINumberOfCopies\fP copies of metadata. If set to \fIunmanaged\fP,
LVM will not automatically manage the 'metadataignore' flags. If set to LVM will not automatically manage the 'metadataignore' flags. If set to
\fIall\fP, LVM will first clear all of the 'metadataignore' flags on all \fIall\fP, LVM will first clear all of the 'metadataignore' flags on all
@ -87,56 +91,53 @@ large numbers of physical volumes with metadata as it may be used to
minimize metadata read and write overhead. minimize metadata read and write overhead.
The default value is \fIunmanaged\fP. The default value is \fIunmanaged\fP.
.TP .TP
.BR \-s ", " \-\-physicalextentsize " " \fIPhysicalExtentSize\fR[\fBbBsSkKmMgGtTpPeE\fR] .BR \-s ", " \-\-physicalextentsize " " \fIPhysicalExtentSize [ \fIbBsSkKmMgGtTpPeE ]
Sets the physical extent size on physical volumes of this volume group. 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 A size suffix (k for kilobytes up to t for terabytes) is optional, megabytes
is the default if no suffix is present. is the default if no suffix is present.
The default is 4 MB and it must be at least 1 KB and a power of 2. 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 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 the volume group which would involve backing up and restoring data on any
logical volumes. However, if no extents need moving for the new logical volumes. However, if no extents need moving for the new
value to apply, it can be altered using vgchange \-s. 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 If the volume group metadata uses lvm1 format, extents can vary in size from
8KB to 16GB and there is a limit of 65534 extents in each logical volume. The 8KiB to 16GiB and there is a limit of 65534 extents in each logical volume. The
default of 4 MB leads to a maximum logical volume size of around 256GB. 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, 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 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 1KB. 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.
The 2.4 kernel has a limitation of 2TB per block device.
.SH PHYSICAL DEVICE OPTIONS .SH PHYSICAL DEVICE OPTIONS
The following options are available for initializing physical devices in the The following options are available for initializing physical devices in the
volume group. These options are further described in the pvcreate man page. volume group. These options are further described in the \fBpvcreate\fP(8)
man page.
.TP .TP
.BR \-f ", " \-\-force .BR \-f ", " \-\-force
.TP .TP
.BR \-y ", " \-\-yes .BR \-y ", " \-\-yes
.TP .TP
.BR \-Z ", " \-\-zero " y|n" .BR \-Z ", " \-\-zero " {" \fIy | \fIn }
.TP .TP
.BR \-\-labelsector " sector" .B \-\-labelsector \fIsector
.TP .TP
.BR \-\-metadatasize " size" .B \-\-metadatasize \fIsize
.TP .TP
.BR \-\-pvmetadatacopies " copies" .B \-\-pvmetadatacopies \fIcopies
.TP .TP
.BR \-\-dataalignment " alignment" .B \-\-dataalignment \fIalignment
.TP .TP
.BR \-\-dataalignmentoffset " alignment_offset" .B \-\-dataalignmentoffset \fIalignment_offset
.SH EXAMPLES .SH Examples
To create a volume group named Creates a volume group named "test_vg" using physical volumes "/dev/sdk1"
.B test_vg and "/dev/sdl1" with default physical extent size of 4MiB:
using physical volumes .sp
.BR /dev/sdk1 ", and " /dev/sdl1 .B vgcreate test_vg /dev/sdk1 /dev/sdl1
with default physical extent size of 4MB:
.nf
\ vgcreate test_vg /dev/sdk1 /dev/sdl1
.fi
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR pvdisplay (8), .BR pvdisplay (8),

View File

@ -4,41 +4,54 @@ vgdisplay \- display attributes of volume groups
.SH SYNOPSIS .SH SYNOPSIS
.B vgdisplay .B vgdisplay
.RB [ \-A | \-\-activevolumegroups ] .RB [ \-A | \-\-activevolumegroups ]
.RB [ \-c | \-\-colon | \-s | \-\-short | \-v|\-\-verbose ] .RB [ \-c | \-\-colon ]
.RB [ \-s | \-\-short ]
.RB [ \-v | \-\-verbose ]
.RB [ \-d | \-\-debug ] .RB [ \-d | \-\-debug ]
.RB [ \-h | \-\-help ] .RB [ \-h | \-\-help ]
.RB [ \-\-ignorelockingfailure ] .RB [ \-\-ignorelockingfailure ]
.RB [ \-\-nosuffix ] .RB [ \-\-nosuffix ]
.RB [ \-P | \-\-partial ] .RB [ \-P | \-\-partial ]
.RB [\-\-units hHbBsSkKmMgGtTpPeE] .RB [ \-\-units
.IR hHbBsSkKmMgGtTpPeE ]
.RB [ \-\-version ] .RB [ \-\-version ]
.RI [VolumeGroupName [VolumeGroupName...]] .RI [ VolumeGroupName
.RI [ VolumeGroupName ...]]
.br .br
.br .br
.B vgdisplay \-\-columns | \-C
.RB [ \-\-aligned ] [ \-d|\-\-debug ] [ \-h|\-?|\-\-help ]
.RB [ \-\-ignorelockingfailure ] [ \-\-noheadings ] [ \-\-nosuffix ]
.RB [ \-o|\-\-options [+]Field[,Field] ]
.RB [ \-O|\-\-sort [+|-]Key1[,[+|-]Key2[,...]] ]
.RB [ \-P|\-\-partial ]
.RB [ \-\-separator Separator ]
.RB [ \-\-unbuffered ]
.RB [ \-\-units hHbBsSkKmMgGtTpPeE ]
.RB [ \-v|\-\-verbose ]
.RB [ \-\-version ]
.RI [VolumeGroupName [VolumeGroupName...]]
.SH DESCRIPTION
.B vgdisplay .B vgdisplay
allows you to see the attributes of .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 .I VolumeGroupName
(or all volume groups if none is given) with it's physical and logical (or all volume groups if none is given) with it's physical and logical
volumes and their sizes etc. volumes and their sizes etc.
.P .P
\fBvgs\fP (8) is an alternative that provides the same information \fBvgs\fP(8) is an alternative that provides the same information
in the style of \fBps\fP (1). in the style of \fBps\fP(1).
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options and \fBvgs\fP for options given with See \fBlvm\fP(8) for common options and \fBvgs\fP(8) for options given with
\fB\-\-columns\fP. \fB\-\-columns\fP.
.TP .TP
.BR \-A ", " \-\-activevolumegroups .BR \-A ", " \-\-activevolumegroups
@ -46,7 +59,7 @@ Only select the active volume groups.
.TP .TP
.BR \-c ", " \-\-colon .BR \-c ", " \-\-colon
Generate colon separated output for easier parsing in scripts or programs. Generate colon separated output for easier parsing in scripts or programs.
N.B. \fBvgs\fP (8) provides considerably more control over the output. N.B. \fBvgs\fP(8) provides considerably more control over the output.
.nf .nf
The values are: The values are:
@ -79,12 +92,12 @@ Display verbose information containing long listings of physical
and logical volumes. If given twice, also display verbose runtime and logical volumes. If given twice, also display verbose runtime
information of vgdisplay's activities. information of vgdisplay's activities.
.TP .TP
.BR \-\-version .B \-\-version
Display version and exit successfully. Display version and exit successfully.
.TP .TP
.BR \-\-columns | \-C .BR \-\-columns | \-C
Display output in columns, the equivalent of \fBvgs\fP. Options listed Display output in columns, the equivalent of \fBvgs\fP(8).
are the same as options given in \fPvgs (8)\fP. Options listed are the same as options given in \fPvgs\fP(8).
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgs (8), .BR vgs (8),

View File

@ -3,12 +3,14 @@
vgexport \- make volume groups unknown to the system vgexport \- make volume groups unknown to the system
.SH SYNOPSIS .SH SYNOPSIS
.B vgexport .B vgexport
[\-a|\-\-all] .RB [ \-a | \-\-all ]
[\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-d | \-\-debug ]
[\-v|\-\-verbose] .RB [ \-h | \-? | \-\-help ]
VolumeGroupName [VolumeGroupName...] .RB [ \-v | \-\-verbose ]
.I VolumeGroupName
.RI [ VolumeGroupName ...]
.SH DESCRIPTION .SH DESCRIPTION
vgexport allows you to make the inactive vgexport allows you to make the inactive
.IR VolumeGroupName (s) .IR VolumeGroupName (s)
unknown to the system. unknown to the system.
You can then move all the Physical Volumes in that Volume Group to You can then move all the Physical Volumes in that Volume Group to
@ -16,9 +18,9 @@ a different system for later
.BR vgimport (8). .BR vgimport (8).
Most LVM2 tools ignore exported Volume Groups. Most LVM2 tools ignore exported Volume Groups.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.I \-a, \-\-all .BR \-a ", " \-\-all
Export all inactive Volume Groups. Export all inactive Volume Groups.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),

View File

@ -3,58 +3,63 @@
vgextend \- add physical volumes to a volume group vgextend \- add physical volumes to a volume group
.SH SYNOPSIS .SH SYNOPSIS
.B vgextend .B vgextend
[\-A|\-\-autobackup y|n] [\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-A | \-\-autobackup
[\-\-restoremissing] .RI { y | n }]
[\-f|\-\-force] .RB [ \-d | \-\-debug ]
[\-t|\-\-test] .RB [ \-h | \-? | \-\-help ]
[\-v|\-\-verbose] .RB [ \-\-restoremissing ]
[ \fIPHYSICAL DEVICE OPTIONS\fP ] .RB [ \-f | \-\-force ]
VolumeGroupName PhysicalDevicePath [PhysicalDevicePath...] .RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
.RB [ "PHYSICAL DEVICE OPTIONS" ]
.I VolumeGroupName PhysicalDevicePath
.RI [ PhysicalDevicePath ...]
.SH DESCRIPTION .SH DESCRIPTION
vgextend allows you to add one or more initialized physical volumes ( see vgextend allows you to add one or more initialized physical volumes
.B pvcreate(8) (see \fBpvcreate\fP(8)) to an existing volume group to extend it in size. Moreover, it allows you to
) 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 re-add a physical volume that has gone missing previously, due to a transient
device failure, without re-initialising it. Use vgextend \-\-restoremissing to device failure, without re-initialising it. Use
that effect. \fBvgextend \-\-restoremissing\fP to that effect.
.sp .sp
If \fIPhysicalDevicePath\fP was not previously configured for LVM with If \fIPhysicalDevicePath\fP was not previously configured for LVM with
\fBpvcreate (8)\fP, the device will be initialized with the same \fBpvcreate\fP(8), the device will be initialized with the same
default values used with \fBpvcreate\fP. If non-default default values used with \fBpvcreate\fP(8). If non-default
\fPpvcreate\fP values are are desired, they may be given on the \fPpvcreate\fP(8) values are desired, they may be given on the
commandline with the same options as \fPpvcreate\fP. See commandline with the same options as \fPpvcreate\fP(8). See
\fBPHYSICAL DEVICE OPTIONS\fP for available options. Note .B PHYSICAL DEVICE OPTIONS
that the restore-related options such as --restorefile, --uuid, for available options. Note that the restore-related options such as
and --physicalvolumesize are not available. If a restore operation .BR \-\-restorefile ", " \-\-uuid " and " \-\-physicalvolumesize
is needed, use \fBpvcreate (8)\fP and \fBvgcfgrestore (8)\fP. are not available. If a restore operation
is needed, use \fBpvcreate\fP(8) and \fBvgcfgrestore\fP(8).
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.SH PHYSICAL DEVICE OPTIONS .SH PHYSICAL DEVICE OPTIONS
The following options are available for initializing physical devices in the The following options are available for initializing physical devices in the
volume group. These options are further described in the pvcreate man page. volume group. These options are further described in the
\fBpvcreate\fP(8) man page.
.TP .TP
.BR \-f ", " \-\-force .BR \-f ", " \-\-force
.TP .TP
.BR \-y ", " \-\-yes .BR \-y ", " \-\-yes
.TP .TP
.BR \-Z ", " \-\-zero " y|n" .BR \-Z ", " \-\-zero " {" \fIy | \fIn }
.TP .TP
.BR \-\-labelsector " sector" .B \-\-labelsector \fIsector
.TP .TP
.BR \-\-metadatasize " size" .B \-\-metadatasize \fIsize
.TP .TP
.RB [ \-\-metadataignore y|n ] .BR \-\-metadataignore " {" \fIy | \fIn }
.TP .TP
.BR \-\-pvmetadatacopies " copies" .B \-\-pvmetadatacopies \fIcopies
.TP .TP
.BR \-\-dataalignment " alignment" .B \-\-dataalignment \fIalignment
.TP .TP
.BR \-\-dataalignmentoffset " alignment_offset" .B \-\-dataalignmentoffset \fIalignment_offset
.SH Examples .SH Examples
"vgextend vg00 /dev/sda4 /dev/sdn1" tries to extend the existing volume Extends the existing volume group "vg00" by the new physical volumes
group "vg00" by the new physical volumes (see (see \fBpvcreate\fP(8)) "/dev/sda4" and "/dev/sdn1".
.B pvcreate(8) .sp
) "/dev/sdn1" and /dev/sda4". .B vgextend vg00 /dev/sda4 /dev/sdn1
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgcreate (8), .BR vgcreate (8),

View File

@ -3,20 +3,22 @@
vgimport \- make exported volume groups known to the system vgimport \- make exported volume groups known to the system
.SH SYNOPSIS .SH SYNOPSIS
.B vgimport .B vgimport
[\-a|\-\-all] .RB [ \-a | \-\-all ]
[\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-d | \-\-debug ]
[\-v|\-\-verbose] .RB [ \-h | \-? | \-\-help ]
VolumeGroupName [VolumeGroupName...] .RB [ \-v | \-\-verbose ]
.I VolumeGroupName
.RI [ VolumeGroupName ...]
.SH DESCRIPTION .SH DESCRIPTION
.B vgimport vgimport allows you to make a Volume Group that was previously
allows you to make a Volume Group that was previously exported using exported using
.BR vgexport (8) .BR vgexport (8)
known to the system again, perhaps after moving its Physical Volumes known to the system again, perhaps after moving its Physical Volumes
from a different machine. from a different machine.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.I \-a, \-\-all .BR \-a ", " \-\-all
Import all exported Volume Groups. Import all exported Volume Groups.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),

View File

@ -3,55 +3,44 @@
vgimportclone \- import and rename duplicated volume group (e.g. a hardware snapshot) vgimportclone \- import and rename duplicated volume group (e.g. a hardware snapshot)
.SH SYNOPSIS .SH SYNOPSIS
.B vgimportclone .B vgimportclone
[\-n|\-\-basevgname VolumeGroupName] .RB [ \-n | \-\-basevgname
[\-i|\-\-import] .IR VolumeGroupName ]
PhysicalVolume [PhysicalVolume...] .RB [ \-i | \-\-import ]
.I PhysicalVolume
.RI [ PhysicalVolume ...]
.SH DESCRIPTION .SH DESCRIPTION
.B vgimportclone vgimportclone is used to import a duplicated VG (e.g. hardware snapshot).
is used to import a duplicated VG (e.g. hardware snapshot). Duplicate VG(s) Duplicate VG(s) and PV(s) are not able to be used until they are made
and PV(s) are not able to be used until they are made to coexist with to coexist with the origin VG(s) and PV(s).
the origin VG(s) and PV(s). vgimportclone renames the VG associated with the specified PV(s) and
.B vgimportclone changes the associated VG and PV UUIDs.
renames the VG associated with the specified PV(s) and changes the
associated VG and PV UUIDs.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.I \-n|\-\-basevgname VolumeGroupName .BR \-n ", " \-\-basevgname " " \fIVolumeGroupName
By default the snapshot VG will be renamed to the original name plus a 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 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 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 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. a numeric suffix will be added (like the previous example) to make it unique.
.TP .TP
.I \-i|\-\-import .BR \-i ", " \-\-import
Import exported Volume Groups. Otherwise VGs that have been exported Import exported Volume Groups. Otherwise VGs that have been exported
will not be changed (nor will their associated PVs). will not be changed (nor will their associated PVs).
.SH ENVIRONMENT VARIABLES .SH ENVIRONMENT VARIABLES
.TP .TP
\fBLVM_BINARY\fP .B LVM_BINARY
The LVM2 binary to use. The LVM2 binary to use. Defaults to "lvm".
Defaults to "lvm". .SH Examples
.SH EXAMPLES The origin VG "vg00" has origin PVs "/dev/sda" and "/dev/sdb"
The origin VG and the respective snapshot PVs are "/dev/sdc" and "/dev/sdd".
.B vg00 To rename the VG associated with "/dev/sdc" and "/dev/sdd"
has origin PVs from "vg00" to "vg00_snap"
.BR /dev/sda " and " /dev/sdb
and the respective snapshot PVs are
.BR /dev/sdc " and " /dev/sdd "."
To rename the VG
associated with
.BR /dev/sdc " and " /dev/sdd
from
.B vg00
to
.B vg00_snap
(and to change associated VG and PV UUIDs) do: (and to change associated VG and PV UUIDs) do:
.nf .sp
.B vgimportclone --basevgname vg00_snap /dev/sdc /dev/sdd
\ vgimportclone --basevgname vg00_snap /dev/sdc /dev/sdd
.fi
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8) .BR lvm (8),
.BR vgrename (8)

View File

@ -3,25 +3,35 @@
vgmerge \- merge two volume groups vgmerge \- merge two volume groups
.SH SYNOPSIS .SH SYNOPSIS
.B vgmerge .B vgmerge
[\-A|\-\-autobackup y|n] [\-d|\-\-debug] [\-h|\-?|\-\-help] [\-l|\-\-list] .RB [ \-A | \-\-autobackup
[\-t|\-\-test] [\-v|\-\-verbose] DestinationVolumeGroupName .RI { y | n }]
SourceVolumeGroupName .RB [ \-d | \-\-debug ]
.RB [ \-h | \-? | \-\-help ]
.RB [ \-l | \-\-list ]
.RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
.I DestinationVolumeGroupName
.I SourceVolumeGroupName
.SH DESCRIPTION .SH DESCRIPTION
vgmerge merges two existing volume groups. The inactive SourceVolumeGroupName vgmerge merges two existing volume groups. The inactive
will be merged into the DestinationVolumeGroupName if physical extent sizes \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 are equal and physical and logical volume summaries of both volume groups
fit into DestinationVolumeGroupName's limits. fit into \fIDestinationVolumeGroupName\fP's limits.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.I \-l, \-\-list .TP
Display merged DestinationVolumeGroupName like "vgdisplay -v". .BR \-l ", " \-\-list
Display merged \fIDestinationVolumeGroupName\fP like \fBvgdisplay -v\fP.
.TP .TP
.I \-t, \-\-test .BR \-t ", " \-\-test
Do a test run WITHOUT making any real changes. Do a test run WITHOUT making any real changes.
.SH Examples .SH Examples
"vgmerge -v databases my_vg" merges the inactive volume group named "my_vg" Merge the inactive volume group named "my_vg"
into the active or inactive volume group named "databases" giving verbose into the active or inactive volume group named "databases" giving verbose
runtime information. runtime information:
.sp
.B vgmerge -v databases my_vg
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgcreate (8), .BR vgcreate (8),

View File

@ -3,23 +3,23 @@
vgmknodes \- recreate volume group directory and logical volume special files vgmknodes \- recreate volume group directory and logical volume special files
.SH SYNOPSIS .SH SYNOPSIS
.B vgmknodes .B vgmknodes
.RB [ \-d | \-\-debug] .RB [ \-d | \-\-debug ]
.RB [ \-h | \-\-help] .RB [ \-h | \-\-help ]
.RB [ \-\-refresh] .RB [ \-\-refresh ]
.RB [ \-v | \-\-verbose] .RB [ \-v | \-\-verbose ]
[[VolumeGroupName | LogicalVolumePath]...] .RI [[ VolumeGroupName | LogicalVolumePath ]...]
.SH DESCRIPTION .SH DESCRIPTION
Checks the LVM2 special files in /dev that are needed for active Checks the LVM2 special files in /dev that are needed for active
logical volumes and creates any missing ones and removes unused ones. logical volumes and creates any missing ones and removes unused ones.
.SH OPTIONS .SH OPTIONS
.TP .TP
See \fBlvm\fP(8) for common options.
.TP
.BR \-\-refresh .BR \-\-refresh
If any logical volume in the volume group is active, reload its metadata. If any logical volume in the volume group is active, reload its metadata.
This is not necessary in normal operation, but may be useful This is not necessary in normal operation, but may be useful
if something has gone wrong or if you're doing clustering if something has gone wrong or if you're doing clustering
manually without a clustered lock manager. manually without a clustered lock manager.
.TP
See \fBlvm\fP for common options.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgscan (8), .BR vgscan (8),

View File

@ -3,28 +3,34 @@
vgreduce \- reduce a volume group vgreduce \- reduce a volume group
.SH SYNOPSIS .SH SYNOPSIS
.B vgreduce .B vgreduce
[\-a|\-\-all] [\-A|\-\-autobackup y|n] [\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-a | \-\-all ]
[\-\-removemissing] .RB [ \-A | \-\-autobackup
[\-t|\-\-test] .RI { y | n }]
[\-v|\-\-verbose] VolumeGroupName .RB [ \-d | \-\-debug ]
[PhysicalVolumePath...] .RB [ \-h | \-? | \-\-help ]
.RB [ \-\-removemissing ]
.RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
.I VolumeGroupName
.RI [ PhysicalVolumePath ...]
.SH DESCRIPTION .SH DESCRIPTION
vgreduce allows you to remove one or more unused physical volumes vgreduce allows you to remove one or more unused physical volumes
from a volume group. from a volume group.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.I \-a, \-\-all .BR \-a ", " \-\-all
Removes all empty physical volumes if none are given on command line. Removes all empty physical volumes if none are given on command line.
.TP .TP
.I \-\-removemissing .B \-\-removemissing
Removes all missing physical volumes from the volume group, if there are no 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 logical volumes allocated on those. This resumes normal operation of the volume
group (new logical volumes may again be created, changed and so on). group (new logical volumes may again be created, changed and so on).
If this is not possible (there are logical volumes referencing the missing 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 physical volumes) and you cannot or do not want to remove them manually, you
can run this option with --force to have vgreduce remove any partial LVs. 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 Any logical volumes and dependent snapshots that were partly on the
missing disks get removed completely. This includes those parts missing disks get removed completely. This includes those parts
@ -32,7 +38,7 @@ that lie on disks that are still present.
If your logical volumes spanned several disks including the ones that are 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 lost, you might want to try to salvage data first by activating your
logical volumes with --partial as described in \fBlvm (8)\fP. logical volumes with \fB--partial\fP as described in \fBlvm\fP(8).
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),

View File

@ -3,9 +3,14 @@
vgremove \- remove a volume group vgremove \- remove a volume group
.SH SYNOPSIS .SH SYNOPSIS
.B vgremove .B vgremove
[\-d|\-\-debug] [\-f|\-\-force] [\-h|\-?|\-\-help] .RB [ \-d | \-\-debug ]
[\-\-noudevsync] [\-t|\-\-test] [\-v|\-\-verbose] .RB [ \-f | \-\-force ]
VolumeGroupName [VolumeGroupName...] .RB [ \-h | \-? | \-\-help ]
.RB [ \-\-noudevsync ]
.RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
.I VolumeGroupName
.RI [ VolumeGroupName ...]
.SH DESCRIPTION .SH DESCRIPTION
vgremove allows you to remove one or more volume groups. vgremove allows you to remove one or more volume groups.
If one or more physical volumes in the volume group are lost, If one or more physical volumes in the volume group are lost,
@ -16,7 +21,7 @@ If there are logical volumes that exist in the volume group,
a prompt will be given to confirm removal. You can override a prompt will be given to confirm removal. You can override
the prompt with \fB-f\fP. the prompt with \fB-f\fP.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.BR \-f ", " \-\-force .BR \-f ", " \-\-force
Force the removal of any logical volumes on the volume group Force the removal of any logical volumes on the volume group

View File

@ -3,32 +3,21 @@
vgrename \- rename a volume group vgrename \- rename a volume group
.SH SYNOPSIS .SH SYNOPSIS
.B vgrename .B vgrename
[\-A|\-\-autobackup y|n] .RB [ \-A | \-\-autobackup
[\-d|\-\-debug] .RI { y | n }]
[\-h|\-?|\-\-help] .RB [ \-d | \-\-debug ]
[\-t|\-\-test] .RB [ \-h | \-? | \-\-help ]
[\-v|\-\-verbose] .RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ]
.IR OldVolumeGroup { Path | Name | UUID } .IR OldVolumeGroup { Path | Name | UUID }
.IR NewVolumeGroup { Path | Name } .IR NewVolumeGroup { Path | Name }
.SH DESCRIPTION .SH DESCRIPTION
vgrename renames an existing (see vgrename renames an existing (see
.B vgcreate(8) .BR vgcreate (8))
) volume group from volume group from
.IR OldVolumeGroup { Name | Path | UUID } .IR OldVolumeGroup { Name | Path | UUID }
to to
.IR NewVolumeGroup { Name | Path }. .IR NewVolumeGroup { Name | Path }.
.SH OPTIONS
See \fBlvm\fP for common options.
.SH Examples
"vgrename /dev/vg02 /dev/my_volume_group" renames existing
volume group "vg02" to "my_volume_group".
.TP
"vgrename vg02 my_volume_group" does the same.
.TP
"vgrename Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 VolGroup00_tmp"
changes the name of the Volume Group with UUID
Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 to
"VolGroup00_tmp".
All the Volume Groups visible to a system need to have different All the Volume Groups visible to a system need to have different
names. Otherwise many LVM2 commands will refuse to run or give names. Otherwise many LVM2 commands will refuse to run or give
@ -41,7 +30,23 @@ not even boot correctly. However, the two Volume Groups should have
different UUIDs (unless the disk was cloned) so you can rename different UUIDs (unless the disk was cloned) so you can rename
one of the conflicting Volume Groups with one of the conflicting Volume Groups with
\fBvgrename\fP. \fBvgrename\fP.
.TP .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 .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgchange (8), .BR vgchange (8),

View File

@ -3,56 +3,69 @@
vgs \- report information about volume groups vgs \- report information about volume groups
.SH SYNOPSIS .SH SYNOPSIS
.B vgs .B vgs
[\-a|\-\-all] .RB [ \-a | \-\-all ]
[\-\-aligned] [\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-\-aligned ]
[\-\-ignorelockingfailure] [\-\-nameprefixes] [\-\-noheadings] [\-\-nosuffix] .RB [ \-d | \-\-debug ]
[\-o|\-\-options [+]Field[,Field]] .RB [ \-h | \-? | \-\-help ]
[\-O|\-\-sort [+|-]Key1[,[+|-]Key2[,...]]] .RB [ \-\-ignorelockingfailure ]
[\-P|\-\-partial] [\-\-rows] .RB [ \-\-nameprefixes ]
[\-\-separator Separator] [\-\-unbuffered] .RB [ \-\-noheadings ]
[\-\-units hHbBsSkKmMgGtTpPeE] .RB [ \-\-nosuffix ]
[\-\-unquoted] .RB [ \-o | \-\-options
[\-v|\-\-verbose] .RI [ + ] Field1 [ ,Field2 ...]]
[\-\-version] [VolumeGroupName [VolumeGroupName...]] .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 .SH DESCRIPTION
vgs produces formatted output about volume groups. vgs produces formatted output about volume groups.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.I \-\-all .B \-\-all
List all volume groups. Equivalent to not specifying any volume groups. List all volume groups. Equivalent to not specifying any volume groups.
.TP .TP
.I \-\-aligned .B \-\-aligned
Use with \-\-separator to align the output columns. Use with \fB\-\-separator\fP to align the output columns.
.TP .TP
.I \-\-nameprefixes .B \-\-nameprefixes
Add an "LVM2_" prefix plus the field name to the output. Useful Add an "LVM2_" prefix plus the field name to the output. Useful
with --noheadings to produce a list of field=value pairs that can with \fB\-\-noheadings\fP to produce a list of field=value pairs that can
be used to set environment variables (for example, in \fBudev (7)\fP rules). be used to set environment variables (for example, in \fBudev\fP(7) rules).
.TP .TP
.I \-\-noheadings .B \-\-noheadings
Suppress the headings line that is normally the first line of output. Suppress the headings line that is normally the first line of output.
Useful if grepping the output. Useful if grepping the output.
.TP .TP
.I \-\-nosuffix .B \-\-nosuffix
Suppress the suffix on output sizes. Use with \-\-units (except h and H) Suppress the suffix on output sizes. Use with \fB\-\-units\fP
if processing the output. (except h and H) if processing the output.
.TP .TP
.I \-o, \-\-options .BR \-o ", " \-\-options
Comma-separated ordered list of columns. Precede the list with '+' to append Comma-separated ordered list of columns. Precede the list with '+' to append
to the default selection of columns. to the default selection of columns.
.IP .IP
Use \fb-o vg_all\fP to select all volume group columns. Use \fB\-o vg_all\fP to select all volume group columns.
.IP .IP
Use \fb-o help\fP to view the full list of columns available. Use \fB\-o help\fP to view the full list of columns available.
.IP .IP
Column names include: vg_fmt, vg_uuid, vg_name, vg_attr, vg_size, vg_free, 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, 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, pv_count, lv_count, snap_count, vg_seqno, vg_tags, vg_mda_count, vg_mda_free,
and vg_mda_size, vg_mda_used_count. and vg_mda_size, vg_mda_used_count.
.IP .IP
Any "vg_" prefixes are optional. Columns mentioned in either \fBpvs (8)\fP Any "vg_" prefixes are optional. Columns mentioned in either \fBpvs\fP(8)
or \fBlvs (8)\fP can also be chosen, but columns cannot be taken from both or \fBlvs\fP(8) can also be chosen, but columns cannot be taken from both
at the same time. at the same time.
.IP .IP
The vg_attr bits are: The vg_attr bits are:
@ -72,27 +85,29 @@ Allocation policy: (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere, (i)nherited
(c)lustered (c)lustered
.RE .RE
.TP .TP
.I \-O, \-\-sort .BR \-O ", " \-\-sort
Comma-separated ordered list of columns to sort by. Replaces the default Comma-separated ordered list of columns to sort by. Replaces the default
selection. Precede any column with - for a reverse sort on that column. selection. Precede any column with '\fI\-\fP' for a reverse sort on that
column.
.TP .TP
.I \-\-rows .B \-\-rows
Output columns as rows. Output columns as rows.
.TP .TP
.I \-\-separator Separator .B \-\-separator \fISeparator
String to use to separate each column. Useful if grepping the output. String to use to separate each column. Useful if grepping the output.
.TP .TP
.I \-\-unbuffered .B \-\-unbuffered
Produce output immediately without sorting or aligning the columns properly. Produce output immediately without sorting or aligning the columns properly.
.TP .TP
.I \-\-units hHbBsSkKmMgGtTpPeE .B \-\-units \fIhHbBsSkKmMgGtTpPeE
All sizes are output in these units: (h)uman-readable, (b)ytes, (s)ectors, 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. (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 Capitalise to use multiples of 1000 (S.I.) instead of 1024. Can also specify
custom units e.g. \-\-units 3M custom units e.g. \-\-units 3M
.TP .TP
.I \-\-unquoted .B \-\-unquoted
When used with --nameprefixes, output values in the field=value pairs are not quoted. When used with \fB\-\-nameprefixes\fP, output values in the field=value
pairs are not quoted.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgdisplay (8), .BR vgdisplay (8),

View File

@ -3,11 +3,12 @@
vgscan \- scan all disks for volume groups and rebuild caches vgscan \- scan all disks for volume groups and rebuild caches
.SH SYNOPSIS .SH SYNOPSIS
.B vgscan .B vgscan
[\-d|\-\-debug] [\-h|\-?|\-\-help] .RB [ \-d | \-\-debug ]
[\-\-ignorelockingfailure] .RB [ \-h | \-? | \-\-help ]
[\-\-mknodes] .RB [ \-\-ignorelockingfailure ]
[\-P|\-\-partial] .RB [ \-\-mknodes ]
[\-v|\-\-verbose] .RB [ \-P | \-\-partial ]
.RB [ \-v | \-\-verbose ]
.SH DESCRIPTION .SH DESCRIPTION
vgscan scans all SCSI, (E)IDE disks, multiple devices and a bunch vgscan scans all SCSI, (E)IDE disks, multiple devices and a bunch
of other disk devices in the system looking for LVM physical volumes of other disk devices in the system looking for LVM physical volumes
@ -17,13 +18,13 @@ the scan to avoid a CD ROM, for example.
In LVM2, vgscans take place automatically; but you might still need to In LVM2, vgscans take place automatically; but you might still need to
run one explicitly after changing hardware. run one explicitly after changing hardware.
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.TP .TP
.I \-\-mknodes .B \-\-mknodes
Also checks the LVM special files in /dev that are needed for active Also checks the LVM special files in /dev that are needed for active
logical volumes and creates any missing ones and removes unused ones. logical volumes and creates any missing ones and removes unused ones.
.TP .TP
.I \-\-cache .B \-\-cache
Scan devices for LVM physical volumes and volume groups and instruct Scan devices for LVM physical volumes and volume groups and instruct
the lvmetad daemon to update its cached state accordingly. the lvmetad daemon to update its cached state accordingly.
.SH SEE ALSO .SH SEE ALSO

View File

@ -5,8 +5,10 @@ vgsplit \- split a volume group into two
.B vgsplit .B vgsplit
.RB [ \-\-alloc .RB [ \-\-alloc
.IR AllocationPolicy ] .IR AllocationPolicy ]
.RB [ \-A | \-\-autobackup " {" y | n }] .RB [ \-A | \-\-autobackup
.RB [ \-c | \-\-clustered " {" y | n }] .RI { y | n }]
.RB [ \-c | \-\-clustered
.RI { y | n }]
.RB [ \-d | \-\-debug ] .RB [ \-d | \-\-debug ]
.RB [ \-h | \-\-help ] .RB [ \-h | \-\-help ]
.RB [ \-l | \-\-maxlogicalvolumes .RB [ \-l | \-\-maxlogicalvolumes
@ -15,35 +17,36 @@ vgsplit \- split a volume group into two
.IR type ] .IR type ]
.RB [ -p | \-\-maxphysicalvolumes .RB [ -p | \-\-maxphysicalvolumes
.IR MaxPhysicalVolumes ] .IR MaxPhysicalVolumes ]
.RB [ \-\-[vg]metadatacopies ] .RB [ \-\- [ vg ] metadatacopies
.IR NumberOfCopies|unmanaged|all ] .IR NumberOfCopies | unmanaged | all ]
.RB [ \-n | \-\-name .RB [ \-n | \-\-name
.IR LogicalVolumeName ] .IR LogicalVolumeName ]
.RB [ \-t | \-\-test ] .RB [ \-t | \-\-test ]
.RB [ \-v | \-\-verbose ] .RB [ \-v | \-\-verbose ]
SourceVolumeGroupName DestinationVolumeGroupName .I SourceVolumeGroupName DestinationVolumeGroupName
[ PhysicalVolumePath ...] .RI [ PhysicalVolumePath ...]
.SH DESCRIPTION .SH DESCRIPTION
.B vgsplit vgsplit moves one or more physical volumes from
moves one or more physical volumes from \fISourceVolumeGroupName\fP into \fIDestinationVolumeGroupName\fP.
.I SourceVolumeGroupName The physical volumes moved can be specified either explicitly via
into \fIPhysicalVolumePath\fP, or implicitly by \fB\-n\fP
.I DestinationVolumeGroupName\fP. The physical volumes moved can be \fILogicalVolumeName\fP, in which case only physical volumes
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. underlying the specified logical volume will be moved.
If If \fIDestinationVolumeGroupName\fP does not exist, a new volume
.I DestinationVolumeGroupName group will be created. The default attributes
does not exist, a new volume group will be created. The default attributes for the new volume group can be specified with
for the new volume group can be specified with \fB\-\-alloc\fR, .BR \-\-alloc ,
\fB\-\-clustered\fR, \fB\-\-maxlogicalvolumes\fR, \fB\-\-metadatatype\fR, .BR \-\-clustered ,
\fB\-\-maxphysicalvolumes\fR and \fB\-\-[vg]metadatacopies\fR, .BR \-\-maxlogicalvolumes ,
(see \fBvgcreate(8)\fR for a description of these options). If any .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 of these options are not given, default attribute(s) are taken from
.I SourceVolumeGroupName\fP. If a non-LVM2 metadata type (e.g. lvm1) is \fISourceVolumeGroupName\fP. If a non-LVM2 metadata type (e.g. lvm1) is
being used, you should use the -M option to specify the metadata type being used, you should use the \fB\-M\fP option to specify the metadata
directly. type directly.
If If
.I DestinationVolumeGroupName .I DestinationVolumeGroupName
@ -53,20 +56,20 @@ before the physical volumes are moved. Specifying any of the above default
volume group attributes with an existing destination volume group is an error, volume group attributes with an existing destination volume group is an error,
and no split will occur. and no split will occur.
Logical volumes cannot be split between volume groups. \fBVgsplit(8)\fP only Logical volumes cannot be split between volume groups. \fBvgsplit\fP(8) only
moves complete physical volumes: To move part of a physical volume, use moves complete physical volumes: To move part of a physical volume, use
\fBpvmove(8)\fP. Each existing logical volume must be entirely on the physical \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 volumes forming either the source or the destination volume group. For this
reason, \fBvgsplit(8)\fP may fail with an error if a split would result in a reason, \fBvgsplit\fP(8) may fail with an error if a split would result in a
logical volume being split across volume groups. logical volume being split across volume groups.
A \fBvgsplit\fP into an existing volume group retains the existing volume group's A vgsplit into an existing volume group retains the existing volume group's
value of \fPvgmetadatacopies\fP (see \fBvgcreate\fP and \fBlvm.conf\fP for further value of \fPvgmetadatacopies\fP (see \fBvgcreate\fP(8) and \fBlvm.conf\fP(5) for further
explanation of \fPvgmetadatacopies\fP). To change the value of explanation of \fPvgmetadatacopies\fP). To change the value of
\fBvgmetadatacopies\fP, use \fBvgchange\fP. \fBvgmetadatacopies\fP, use \fBvgchange\fP(8).
.SH OPTIONS .SH OPTIONS
See \fBlvm\fP for common options. See \fBlvm\fP(8) for common options.
.SH SEE ALSO .SH SEE ALSO
.BR lvm (8), .BR lvm (8),
.BR vgcreate (8), .BR vgcreate (8),