mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
133 lines
4.3 KiB
Groff
133 lines
4.3 KiB
Groff
.TH LVM 8 "LVM TOOLS" "Sistina Software UK" \" -*- nroff -*-
|
|
.SH NAME
|
|
lvm \- LVM2 tools
|
|
.SH SYNOPSIS
|
|
.B lvm
|
|
[command | file]
|
|
.SH DESCRIPTION
|
|
\fBlvm\fP provides the command-line tools for LVM2. A separate
|
|
manual page describes each command in detail.
|
|
.LP
|
|
If \fBlvm\fP is invoked with no arguments it presents a readline prompt
|
|
(assuming it was compiled with readline support).
|
|
LVM commands may be entered interactively at this prompt with
|
|
readline facilities including history and command name and option
|
|
completion. Refer to \fBreadline\fP(3) for details.
|
|
.LP
|
|
If \fBlvm\fP is invoked with argv[0] set to the name of a specific
|
|
LVM command (for example by using a hard or soft link) it acts as
|
|
that command.
|
|
.LP
|
|
One advantage of using the built-in shell is that configuration
|
|
information is cached internally between commands.
|
|
.LP
|
|
A file containing a simple script with one command per line
|
|
can also be given on the command line. The script can also be
|
|
executed directly if the first line is #! followed by the absolute
|
|
path of \fBlvm\fP.
|
|
.LP
|
|
Where commands take VG or LV names as arguments, the full path name is
|
|
optional. An LV called "lvol0" in a VG called "vg0" can be specified
|
|
as "vg0/lvol0". If a list of VGs is required but is left empty, a list of
|
|
all VGs will be substituted. If a list of LVs is required
|
|
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".
|
|
.SH OPTIONS
|
|
The following options are available for many of the commands and are
|
|
not documented on individual manual pages.
|
|
.TP
|
|
\fB-h | --help\fP \(em Display the help text.
|
|
.TP
|
|
\fB--version\fP \(em Display version information.
|
|
.TP
|
|
\fB-v | --verbose\fP \(em Set verbose level.
|
|
Repeat from 1 to 3 times to increase the detail of messages
|
|
sent to stdout and stderr. Overrides config file setting.
|
|
.TP
|
|
\fB-d | --debug\fP \(em Set debug level.
|
|
Repeat from 1 to 6 times to increase the detail of messages sent
|
|
to the log file and/or syslog (if configured).
|
|
Overrides config file setting.
|
|
.TP
|
|
\fB--quiet\fP \(em Suppress output and log messages.
|
|
Overrides -d and -v.
|
|
.TP
|
|
\fB-t | --test\fP \(em Run in test mode.
|
|
Commands will not update metadata.
|
|
.TP
|
|
\fB--driverloaded\fP { \fBy\fP | \fBn\fP }
|
|
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.
|
|
.TP
|
|
\fB-A | --autobackup\fP { \fBy\fP | \fBn\fP }
|
|
Whether or not to metadata should be backed up automatically after a change.
|
|
You are strongly advised not to disable this!
|
|
See
|
|
.B vgcfgbackup (8).
|
|
.TP
|
|
\fB-P | --partial\fP
|
|
When set, the tools will do their best to provide access to volume groups
|
|
that are only partially available. Where part of a logical 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,
|
|
or create it as a large block device of nulls. Metadata may not be
|
|
changed with this option. To insert a replacement physical volume
|
|
of the same or large size use \fBpvcreate -u\fP to set the uuid to
|
|
match the original followed by \fBvgcfgrestore (8)\fP.
|
|
.TP
|
|
\fB--ignorelockingfailure\fP
|
|
This lets you proceed with read-only metadata operations such as
|
|
\fBlvchange -ay\fP and \fBvgchange -ay\fP even if the locking module fails.
|
|
One use for this is in a system init script if the lock directory
|
|
is mounted read-only when the script runs.
|
|
.SH ENVIRONMENT VARIABLES
|
|
.TP
|
|
\fBLVM_SYSTEM_DIR\fP
|
|
Directory containing lvm.conf and other LVM
|
|
system files.
|
|
Defaults to "/etc/lvm".
|
|
.TP
|
|
\fBHOME\fP
|
|
Directory containing .lvm_history if the internal readline shell
|
|
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.
|
|
Not set by default.
|
|
.SH DIAGNOSTICS
|
|
All tools return a status code of zero on success or non-zero on failure.
|
|
.SH FILES
|
|
.I /etc/lvm/lvm.conf
|
|
.br
|
|
.I $HOME/.lvm_history
|
|
.SH SEE ALSO
|
|
.BR lvchange (8),
|
|
.BR lvcreate (8),
|
|
.BR lvdisplay (8),
|
|
.BR lvextend (8),
|
|
.BR lvmchange (8),
|
|
.BR lvreduce (8),
|
|
.BR lvremove (8),
|
|
.BR lvrename (8),
|
|
.BR lvresize (8),
|
|
.BR lvscan (8),
|
|
.BR pvchange (8),
|
|
.BR pvcreate (8),
|
|
.BR pvdisplay (8),
|
|
.BR pvscan (8),
|
|
.BR vgcfgbackup (8),
|
|
.BR vgchange (8),
|
|
.BR vgck (8),
|
|
.BR vgcreate (8),
|
|
.BR vgdisplay (8),
|
|
.BR vgextend (8),
|
|
.BR vgmerge (8),
|
|
.BR vgreduce (8),
|
|
.BR vgremove (8),
|
|
.BR vgrename (8),
|
|
.BR vgscan (8),
|
|
.BR readline (3),
|
|
.BR lvm.conf (5)
|
|
|