mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-13 00:58:47 +03:00
man: typography
With to use .TP where it's easy and doesn't change layout (since .HP is marked as deprecated) - but .TP is not always perfetc match. Avoid submitting empty lines to troff and replace them mostly with .P and use '.' at line start to preserve 'visual' presence of empty line while editing man page manually when there is no extra space needed. Fix some markup. Add some missing SEE ALSO section. Drop some white-space at end-of-lines. Improve hyphenation logic so we do not split options. Use '.IP numbers' only with first one the row (others in row automatically derive this value) Use automatic enumeration for .SH titles. Guidelines in-use: https://man7.org/linux/man-pages/man7/groff.7.html https://www.gnu.org/software/groff/manual/html_node/Man-usage.html https://www.gnu.org/software/groff/manual/html_node/Lists-in-ms.html
This commit is contained in:
parent
0004ffa73a
commit
353718785f
@ -1,19 +1,34 @@
|
||||
.TH "BLKDEACTIVATE" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
|
||||
.SH "NAME"
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
blkdeactivate \(em utility to deactivate block devices
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
.
|
||||
.ad l
|
||||
.nh
|
||||
.B blkdeactivate
|
||||
.RB [ -d \ \fIdm_options\fP ]
|
||||
.RB [ -d
|
||||
.IR dm_options ]
|
||||
.RB [ -e ]
|
||||
.RB [ -h ]
|
||||
.RB [ -l \ \fIlvm_options\fP ]
|
||||
.RB [ -m \ \fImpath_options\fP ]
|
||||
.RB [ -r \ \fImdraid_options\fP ]
|
||||
.RB [ -o \ \fIvdo_options\fP ]
|
||||
.RB [ -l
|
||||
.IR lvm_options ]
|
||||
.RB [ -m
|
||||
.IR mpath_options ]
|
||||
.RB [ -r
|
||||
.IR mdraid_options ]
|
||||
.RB [ -o
|
||||
.IR vdo_options ]
|
||||
.RB [ -u ]
|
||||
.RB [ -v ]
|
||||
.RI [ device ]
|
||||
.hy
|
||||
.ad b
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
The blkdeactivate utility deactivates block devices. For mounted
|
||||
block devices, it attempts to unmount it automatically before
|
||||
trying to deactivate. The utility currently supports
|
||||
@ -22,9 +37,11 @@ software RAID MD devices. LVM volumes are handled directly
|
||||
using the \fBlvm\fP(8) command, the rest of device-mapper
|
||||
based devices are handled using the \fBdmsetup\fP(8) command.
|
||||
MD devices are handled using the \fBmdadm\fP(8) command.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.
|
||||
.TP
|
||||
.BR -d ", " --dmoptions \ \fIdm_options\fP
|
||||
.BR -d | --dmoptions " " \fIdm_options
|
||||
Comma separated list of device-mapper specific options.
|
||||
Accepted \fBdmsetup\fP(8) options are:
|
||||
.RS
|
||||
@ -33,17 +50,20 @@ Retry removal several times in case of failure.
|
||||
.IP \fIforce\fP
|
||||
Force device removal.
|
||||
.RE
|
||||
.
|
||||
.TP
|
||||
.BR -e ", " --errors
|
||||
.BR -e | --errors
|
||||
Show errors reported from tools called by \fBblkdeactivate\fP. Without this
|
||||
option, any error messages from these external tools are suppressed and the
|
||||
\fBblkdeactivate\fP itself provides only a summary message to indicate
|
||||
the device was skipped.
|
||||
.
|
||||
.TP
|
||||
.BR -h ", " --help
|
||||
.BR -h | --help
|
||||
Display the help text.
|
||||
.
|
||||
.TP
|
||||
.BR -l ", " --lvmoptions \ \fIlvm_options\fP
|
||||
.BR -l | --lvmoptions " " \fIlvm_options
|
||||
Comma-separated list of LVM specific options:
|
||||
.RS
|
||||
.IP \fIretry\fP
|
||||
@ -53,8 +73,9 @@ Deactivate the whole LVM Volume Group when processing a Logical Volume.
|
||||
Deactivating the Volume Group as a whole is quicker than deactivating
|
||||
each Logical Volume separately.
|
||||
.RE
|
||||
.
|
||||
.TP
|
||||
.BR -m ", " --mpathoptions \ \fImpath_options\fP
|
||||
.BR -m | --mpathoptions " " \fImpath_options
|
||||
Comma-separated list of device-mapper multipath specific options:
|
||||
.RS
|
||||
.IP \fIdisablequeueing\fP
|
||||
@ -63,68 +84,74 @@ This avoids a situation where blkdeactivate may end up waiting if
|
||||
all the paths are unavailable for any underlying device-mapper multipath
|
||||
device.
|
||||
.RE
|
||||
.
|
||||
.TP
|
||||
.BR -r ", " --mdraidoptions \ \fImdraid_options\fP
|
||||
.BR -r | --mdraidoptions " " \fImdraid_options
|
||||
Comma-separated list of MD RAID specific options:
|
||||
.RS
|
||||
.IP \fIwait\fP
|
||||
Wait MD device's resync, recovery or reshape action to complete
|
||||
before deactivation.
|
||||
.RE
|
||||
|
||||
.
|
||||
.TP
|
||||
.BR -o ", " --vdooptions \ \fIvdo_options\fP
|
||||
.BR -o | --vdooptions " " \fIvdo_options
|
||||
Comma-separated list of VDO specific options:
|
||||
.RS
|
||||
.IP \fIconfigfile=file\fP
|
||||
Use specified VDO configuration file.
|
||||
.RE
|
||||
|
||||
.
|
||||
.TP
|
||||
.BR -u ", " --umount
|
||||
.BR -u | --umount
|
||||
Unmount a mounted device before trying to deactivate it.
|
||||
Without this option used, a device that is mounted is not deactivated.
|
||||
.
|
||||
.TP
|
||||
.BR -v ", " --verbose
|
||||
Run in verbose mode. Use --vv for even more verbose mode.
|
||||
Run in verbose mode. Use \fB-vv\fP for even more verbose mode.
|
||||
.
|
||||
.SH EXAMPLES
|
||||
.
|
||||
Deactivate all supported block devices found in the system, skipping mounted
|
||||
devices.
|
||||
.BR
|
||||
.br
|
||||
#
|
||||
.B blkdeactivate
|
||||
.BR
|
||||
.br
|
||||
.P
|
||||
Deactivate all supported block devices found in the system, unmounting any
|
||||
mounted devices first, if possible.
|
||||
.BR
|
||||
.br
|
||||
#
|
||||
.B blkdeactivate -u
|
||||
.BR
|
||||
.br
|
||||
.P
|
||||
Deactivate the device /dev/vg/lvol0 together with all its holders, unmounting
|
||||
any mounted devices first, if possible.
|
||||
.BR
|
||||
.br
|
||||
#
|
||||
.B blkdeactivate -u /dev/vg/lvol0
|
||||
.BR
|
||||
.br
|
||||
.P
|
||||
Deactivate all supported block devices found in the system. If the deactivation
|
||||
of a device-mapper device fails, retry it. Deactivate the whole
|
||||
Volume Group at once when processing an LVM Logical Volume.
|
||||
.BR
|
||||
.br
|
||||
#
|
||||
.B blkdeactivate -u -d retry -l wholevg
|
||||
.BR
|
||||
.br
|
||||
.P
|
||||
Deactivate all supported block devices found in the system. If the deactivation
|
||||
of a device-mapper device fails, retry it and force removal.
|
||||
.BR
|
||||
.br
|
||||
#
|
||||
.B blkdeactivate -d force,retry
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.nh
|
||||
.ad l
|
||||
.BR dmsetup (8),
|
||||
.BR lsblk (8),
|
||||
.BR lvm (8),
|
||||
|
@ -1,35 +1,45 @@
|
||||
.TH CMIRRORD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
cmirrord \(em cluster mirror log daemon
|
||||
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
\fBcmirrord\fR [\fB-f\fR] [\fB-h\fR]
|
||||
|
||||
.
|
||||
.B cmirrord
|
||||
.RB [ -f | --foreground ]
|
||||
.RB [ -h | --help ]
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
\fBcmirrord\fP is the daemon that tracks mirror log information in a cluster.
|
||||
It is specific to device-mapper based mirrors (and by extension, LVM
|
||||
cluster mirrors). Cluster mirrors are not possible without this daemon
|
||||
running.
|
||||
|
||||
.P
|
||||
This daemon relies on the cluster infrastructure provided by the corosync,
|
||||
which must be set up and running in order for cmirrord to function.
|
||||
|
||||
.P
|
||||
Output is logged via \fBsyslog\fP(3). The \fBSIGUSR1 signal\fP(7) can be
|
||||
issued to \fBcmirrord\fP to gather current status information for debugging
|
||||
purposes.
|
||||
|
||||
.P
|
||||
Once started, \fBcmirrord\fP will run until it is shutdown via \fBSIGINT\fP
|
||||
signal. If there are still active cluster mirrors, however, the signal will be
|
||||
ignored. Active cluster mirrors should be shutdown before stopping the cluster
|
||||
mirror log daemon.
|
||||
|
||||
.
|
||||
.SH OPTIONS
|
||||
.IP "\fB-f\fR, \fB--foreground\fR" 4
|
||||
.
|
||||
.TP
|
||||
.BR -f | --foreground
|
||||
Do not fork and log to the terminal.
|
||||
.IP "\fB-h\fR, \fB--help\fR" 4
|
||||
.TP
|
||||
.BR -h | --help
|
||||
Print usage.
|
||||
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.BR lvmlockd (8),
|
||||
.BR lvm (8),
|
||||
.BR syslog (3),
|
||||
|
@ -23,70 +23,63 @@ dmeventd is the event monitoring daemon for device-mapper devices.
|
||||
Library plugins can register and carry out actions triggered when
|
||||
particular events occur.
|
||||
.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.
|
||||
.HP
|
||||
.BR -d
|
||||
.br
|
||||
Repeat from 1 to 3 times (
|
||||
.BR -d ,
|
||||
.TP
|
||||
.B -d
|
||||
Repeat from 1 to 3 times
|
||||
.RB ( -d ,
|
||||
.BR -dd ,
|
||||
.BR -ddd
|
||||
) to increase the detail of
|
||||
.BR -ddd )
|
||||
to increase the detail of
|
||||
debug messages sent to syslog.
|
||||
Each extra d adds more debugging information.
|
||||
.
|
||||
.HP
|
||||
.BR -f
|
||||
.br
|
||||
.TP
|
||||
.B -f
|
||||
Don't fork, run in the foreground.
|
||||
.
|
||||
.HP
|
||||
.BR -h
|
||||
.br
|
||||
.TP
|
||||
.B -h
|
||||
Show help information.
|
||||
.
|
||||
.HP
|
||||
.BR -l
|
||||
.br
|
||||
.TP
|
||||
.B -l
|
||||
Log through stdout and stderr instead of syslog.
|
||||
This option works only with option -f, otherwise it is ignored.
|
||||
.
|
||||
.HP
|
||||
.BR -?
|
||||
.br
|
||||
.TP
|
||||
.B -?
|
||||
Show help information on stderr.
|
||||
.
|
||||
.HP
|
||||
.BR -R
|
||||
.br
|
||||
.TP
|
||||
.B -R
|
||||
Replace a running dmeventd instance. The running dmeventd must be version
|
||||
2.02.77 or newer. The new dmeventd instance will obtain a list of devices and
|
||||
events to monitor from the currently running daemon.
|
||||
.
|
||||
.HP
|
||||
.BR -V
|
||||
.br
|
||||
.TP
|
||||
.B -V
|
||||
Show version of dmeventd.
|
||||
.
|
||||
.SH LVM PLUGINS
|
||||
.
|
||||
.HP
|
||||
.BR Mirror
|
||||
.TP
|
||||
.B Mirror
|
||||
Attempts to handle device failure automatically.
|
||||
.br
|
||||
Attempts to handle device failure automatically. See
|
||||
See
|
||||
.BR lvm.conf (5).
|
||||
.
|
||||
.HP
|
||||
.BR Raid
|
||||
.TP
|
||||
.B Raid
|
||||
Attempts to handle device failure automatically.
|
||||
.br
|
||||
Attempts to handle device failure automatically. See
|
||||
See
|
||||
.BR lvm.conf (5).
|
||||
.
|
||||
.HP
|
||||
.BR Snapshot
|
||||
.br
|
||||
.TP
|
||||
.B Snapshot
|
||||
Monitors how full a snapshot is becoming and emits a warning to
|
||||
syslog when it exceeds 80% full.
|
||||
The warning is repeated when 85%, 90% and 95% of the snapshot is filled.
|
||||
@ -95,9 +88,8 @@ See
|
||||
Snapshot which runs out of space gets invalid and when it is mounted,
|
||||
it gets umounted if possible.
|
||||
.
|
||||
.HP
|
||||
.BR Thin
|
||||
.br
|
||||
.TP
|
||||
.B Thin
|
||||
Monitors how full a thin pool data and metadata is becoming and emits
|
||||
a warning to syslog when it exceeds 80% full.
|
||||
The warning is repeated when more then 85%, 90% and 95%
|
||||
@ -123,12 +115,11 @@ Command is executed with environmental variable
|
||||
in this environment will not try to interact with dmeventd.
|
||||
To see the fullness of a thin pool command may check these
|
||||
two environmental variables
|
||||
\fBDMEVENTD_THIN_POOL_DATA\fP and \fBDMEVENTD_THIN_POOL_METADATA\fP.
|
||||
\fBDMEVENTD_THIN_POOL_DATA\fP and \fBDMEVENTD_THIN_POOL_\:METADATA\fP.
|
||||
Command can also read status with tools like \fBlvs\fP(8).
|
||||
|
||||
.HP
|
||||
.BR Vdo
|
||||
.br
|
||||
.
|
||||
.TP
|
||||
.B Vdo
|
||||
Monitors how full a VDO pool data is becoming and emits
|
||||
a warning to syslog when it exceeds 80% full.
|
||||
The warning is repeated when more then 85%, 90% and 95%
|
||||
|
@ -1,23 +1,23 @@
|
||||
.TH DMFILEMAPD 8 "Dec 17 2016" "Linux" "MAINTENANCE COMMANDS"
|
||||
|
||||
.
|
||||
.de OPT_FD
|
||||
. RB [ file_descriptor ]
|
||||
. I file_descriptor
|
||||
..
|
||||
.
|
||||
.de OPT_GROUP
|
||||
. RB [ group_id ]
|
||||
. I group_id
|
||||
..
|
||||
.
|
||||
.de OPT_PATH
|
||||
. RB [ abs_path ]
|
||||
. I abs_path
|
||||
..
|
||||
.
|
||||
.de OPT_MODE
|
||||
. RB [ mode ]
|
||||
. BR inode | path
|
||||
..
|
||||
.
|
||||
.de OPT_DEBUG
|
||||
. RB [ foreground [ verbose ]]
|
||||
. RI [ foreground " [" verbose ]]
|
||||
..
|
||||
.
|
||||
.SH NAME
|
||||
@ -29,7 +29,7 @@ dmfilemapd \(em device-mapper filemap monitoring daemon
|
||||
.de CMD_DMFILEMAPD
|
||||
. ad l
|
||||
. nh
|
||||
. IR dmfilemapd
|
||||
. BR dmfilemapd
|
||||
. OPT_FD
|
||||
. OPT_GROUP
|
||||
. OPT_PATH
|
||||
@ -41,15 +41,14 @@ dmfilemapd \(em device-mapper filemap monitoring daemon
|
||||
.CMD_DMFILEMAPD
|
||||
.
|
||||
.PD
|
||||
.ad b
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
The dmfilemapd daemon monitors groups of \fIdmstats\fP regions that
|
||||
The dmfilemapd daemon monitors groups of \fBdmstats\fP regions that
|
||||
correspond to the extents of a file, adding and removing regions to
|
||||
reflect the changing state of the file on-disk.
|
||||
|
||||
The daemon is normally launched automatically by the \fPdmstats
|
||||
.P
|
||||
The daemon is normally launched automatically by the \fBdmstats
|
||||
create\fP command, but can be run manually, either to create a new
|
||||
daemon where one did not previously exist, or to change the options
|
||||
previously used, by killing the existing daemon and starting a new
|
||||
@ -57,49 +56,48 @@ one.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.
|
||||
.HP
|
||||
.BR file_descriptor
|
||||
.br
|
||||
.TP
|
||||
.OPT_FD
|
||||
Specify the file descriptor number for the file to be monitored.
|
||||
The file descriptor must reference a regular file, open for reading,
|
||||
in a local file system that supports the FIEMAP ioctl, and that
|
||||
returns data describing the physical location of extents.
|
||||
|
||||
.sp
|
||||
The process that executes \fBdmfilemapd\fP is responsible for
|
||||
opening the file descriptor that is handed to the daemon.
|
||||
.
|
||||
.HP
|
||||
.BR group_id
|
||||
.br
|
||||
.TP
|
||||
.OPT_GROUP
|
||||
The \fBdmstats\fP group identifier of the group that \fBdmfilemapd\fP
|
||||
should update. The group must exist and it should correspond to
|
||||
a set of regions created by a previous filemap operation.
|
||||
.
|
||||
.HP
|
||||
.BR abs_path
|
||||
.br
|
||||
.TP
|
||||
.OPT_PATH
|
||||
The absolute path to the file being monitored, at the time that
|
||||
it was opened. The use of \fBpath\fP by the daemon differs,
|
||||
it was opened. The use of \fIabs_path\fP by the daemon differs,
|
||||
depending on the filemap following mode in use; see \fBMODES\fP
|
||||
and the \fBmode\fP option for more information.
|
||||
|
||||
.br
|
||||
.HP
|
||||
.BR mode
|
||||
.br
|
||||
The filemap monitoring mode the daemon should use: either "inode"
|
||||
(\fBDM_FILEMAP_FOLLOW_INODE\fP), or "path"
|
||||
and the \fImode\fP option for more information.
|
||||
.
|
||||
.TP
|
||||
.OPT_MODE
|
||||
The filemap monitoring mode the daemon.
|
||||
Use either
|
||||
.B inode
|
||||
(\fBDM_FILEMAP_FOLLOW_INODE\fP), or
|
||||
.B path
|
||||
(\fBDM_FILEMAP_FOLLOW_PATH\fP), to enable follow-inode or
|
||||
follow-path mode respectively.
|
||||
.
|
||||
.HP
|
||||
.BR [foreground]
|
||||
.TP
|
||||
.RI [ foreground ]
|
||||
.br
|
||||
If set to 1, disable forking and allow the daemon to run in the
|
||||
foreground.
|
||||
.
|
||||
.HP
|
||||
.BR [verbose]
|
||||
.TP
|
||||
.RI [ verbose ]
|
||||
.br
|
||||
Control daemon logging. If set to zero, the daemon will close all
|
||||
stdio streams and run silently. If \fBverbose\fP is a number
|
||||
between 1 and 3, stdio will be retained and the daemon will log
|
||||
@ -112,7 +110,7 @@ The file map monitoring daemon can monitor files in two distinct
|
||||
ways: the mode affects the behaviour of the daemon when a file
|
||||
under monitoring is renamed or unlinked, and the conditions which
|
||||
cause the daemon to terminate.
|
||||
|
||||
.P
|
||||
In both modes, the daemon will always shut down when the group
|
||||
being monitored is deleted.
|
||||
.P
|
||||
@ -123,7 +121,7 @@ daemon started. The file descriptor referencing the file is kept
|
||||
open at all times, and the daemon will exit when it detects that
|
||||
the file has been unlinked and it is the last holder of a reference
|
||||
to the file.
|
||||
|
||||
.P
|
||||
This mode is useful if the file is expected to be renamed, or moved
|
||||
within the file system, while it is being monitored.
|
||||
.P
|
||||
@ -134,7 +132,7 @@ line. The file descriptor referencing the file is re-opened on each
|
||||
iteration of the daemon, and the daemon will exit if no file exists
|
||||
at this location (a tolerance is allowed so that a brief delay
|
||||
between removal and replacement is permitted).
|
||||
|
||||
.P
|
||||
This mode is useful if the file is updated by unlinking the original
|
||||
and placing a new file at the same path.
|
||||
.
|
||||
@ -146,14 +144,14 @@ daemon can only react to new allocations once they have been written,
|
||||
there are inevitably some IO events that cannot be counted when a
|
||||
file is growing, particularly if the file is being extended by a
|
||||
single thread writing beyond EOF (for example, the \fBdd\fP program).
|
||||
|
||||
.P
|
||||
There is a further loss of events in that there is currently no way
|
||||
to atomically resize a \fBdmstats\fP region and preserve its current
|
||||
counter values. This affects files when they grow by extending the
|
||||
final extent, rather than allocating a new extent: any events that
|
||||
had accumulated in the region between any prior operation and the
|
||||
resize are lost.
|
||||
|
||||
.P
|
||||
File mapping is currently most effective in cases where the majority
|
||||
of IO does not trigger extent allocation. Future updates may address
|
||||
these limitations when kernel support is available.
|
||||
@ -206,8 +204,7 @@ Bryn M. Reeves <bmr@redhat.com>
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.BR dmstats (8)
|
||||
|
||||
.P
|
||||
LVM2 resource page: https://www.sourceware.org/lvm2/
|
||||
.br
|
||||
Device-mapper resource page: http://sources.redhat.com/dm/
|
||||
.br
|
||||
|
@ -24,13 +24,13 @@ dmsetup \(em low level logical volume management
|
||||
. nh
|
||||
. BR create
|
||||
. IR device_name
|
||||
. RB [ -u | --uuid
|
||||
. IR uuid ]
|
||||
. RB [ --addnodeoncreate |\: --addnodeonresume ]
|
||||
. RB [ -n | --notable |\: --table
|
||||
. IR table |\: table_file ]
|
||||
. RB [ --readahead
|
||||
. RB [ + ] \fIsectors |\: auto | none ]
|
||||
. RB [ -u | --uuid
|
||||
. IR uuid ]
|
||||
. RB [ --addnodeoncreate |\: --addnodeonresume ]
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
@ -86,12 +86,12 @@ dmsetup \(em low level logical volume management
|
||||
. IR count ]
|
||||
. RB [ --interval
|
||||
. IR seconds ]
|
||||
. RB [ --nameprefixes ]
|
||||
. RB [ --noheadings ]
|
||||
. RB [ -o
|
||||
. IR fields ]
|
||||
. RB [ -O | --sort
|
||||
. IR sort_fields ]
|
||||
. RB [ --nameprefixes ]
|
||||
. RB [ --separator
|
||||
. IR separator ]
|
||||
. RI [ device_name ]
|
||||
@ -120,11 +120,11 @@ dmsetup \(em low level logical volume management
|
||||
. BR ls
|
||||
. RB [ --target
|
||||
. IR target_type ]
|
||||
. RB [ -o
|
||||
. IR options ]
|
||||
. RB [ --exec
|
||||
. IR command ]
|
||||
. RB [ --tree ]
|
||||
. RB [ -o
|
||||
. IR options ]
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
@ -391,10 +391,10 @@ dmsetup \(em low level logical volume management
|
||||
.CMD_WIPE_TABLE
|
||||
.PD
|
||||
.P
|
||||
.HP
|
||||
.PD 0
|
||||
.TP
|
||||
.B devmap_name \fImajor minor
|
||||
.HP
|
||||
.TP
|
||||
.B devmap_name \fImajor:minor
|
||||
.PD
|
||||
.ad b
|
||||
@ -404,10 +404,10 @@ dmsetup \(em low level logical volume management
|
||||
dmsetup manages logical devices that use the device-mapper driver.
|
||||
Devices are created by loading a table that specifies a target for
|
||||
each sector (512 bytes) in the logical device.
|
||||
|
||||
.P
|
||||
The first argument to dmsetup is a command.
|
||||
The second argument is the logical device name or uuid.
|
||||
|
||||
.P
|
||||
Invoking the dmsetup tool as \fBdevmap_name\fP
|
||||
(which is not normally distributed and is supported
|
||||
only for historical reasons) is equivalent to
|
||||
@ -417,66 +417,53 @@ only for historical reasons) is equivalent to
|
||||
.
|
||||
.SH OPTIONS
|
||||
.
|
||||
.HP
|
||||
.BR --addnodeoncreate
|
||||
.br
|
||||
.TP
|
||||
.B --addnodeoncreate
|
||||
Ensure \fI/dev/mapper\fP node exists after \fBdmsetup create\fP.
|
||||
.
|
||||
.HP
|
||||
.BR --addnodeonresume
|
||||
.br
|
||||
.TP
|
||||
.B --addnodeonresume
|
||||
Ensure \fI/dev/mapper\fP node exists after \fBdmsetup resume\fP (default with udev).
|
||||
.
|
||||
.HP
|
||||
.BR --checks
|
||||
.br
|
||||
.TP
|
||||
.B --checks
|
||||
Perform additional checks on the operations requested and report
|
||||
potential problems. Useful when debugging scripts.
|
||||
In some cases these checks may slow down operations noticeably.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -c | -C | --columns
|
||||
.br
|
||||
Display output in columns rather than as Field: Value lines.
|
||||
.
|
||||
.HP
|
||||
.BR --count
|
||||
.IR count
|
||||
.br
|
||||
.TP
|
||||
.B --count \fIcount
|
||||
Specify the number of times to repeat a report. Set this to zero
|
||||
continue until interrupted. The default interval is one second.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -f | --force
|
||||
.br
|
||||
Try harder to complete operation.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -h | --help
|
||||
.br
|
||||
Outputs a summary of the commands available, optionally including
|
||||
the list of report fields (synonym with \fBhelp\fP command).
|
||||
.
|
||||
.HP
|
||||
.BR --inactive
|
||||
.br
|
||||
.TP
|
||||
.B --inactive
|
||||
When returning any table information from the kernel report on the
|
||||
inactive table instead of the live table.
|
||||
Requires kernel driver version 4.16.0 or above.
|
||||
.
|
||||
.HP
|
||||
.BR --interval
|
||||
.IR seconds
|
||||
.br
|
||||
.TP
|
||||
.B --interval \fIseconds
|
||||
Specify the interval in seconds between successive iterations for
|
||||
repeating reports. If \fB--interval\fP is specified but \fB--count\fP
|
||||
is not, reports will continue to repeat until interrupted.
|
||||
The default interval is one second.
|
||||
.
|
||||
.HP
|
||||
.BR --manglename
|
||||
.BR auto | hex | none
|
||||
.br
|
||||
.TP
|
||||
.BR --manglename " " auto | hex | none
|
||||
Mangle any character not on a whitelist using mangling_mode when
|
||||
processing device-mapper device names and UUIDs. The names and UUIDs
|
||||
are mangled on input and unmangled on output where the mangling mode
|
||||
@ -493,26 +480,20 @@ Mangling mode could be also set through
|
||||
\fBDM_DEFAULT_NAME_MANGLING_MODE\fP
|
||||
environment variable.
|
||||
.
|
||||
.HP
|
||||
.BR -j | --major
|
||||
.IR major
|
||||
.br
|
||||
.TP
|
||||
.BR -j | --major " " \fImajor
|
||||
Specify the major number.
|
||||
.
|
||||
.HP
|
||||
.BR -m | --minor
|
||||
.IR minor
|
||||
.br
|
||||
.TP
|
||||
.BR -m | --minor " " \fIminor
|
||||
Specify the minor number.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -n | --notable
|
||||
.br
|
||||
When creating a device, don't load any table.
|
||||
.
|
||||
.HP
|
||||
.BR --nameprefixes
|
||||
.br
|
||||
.TP
|
||||
.B --nameprefixes
|
||||
Add a "DM_" prefix plus the field name to the output. Useful with
|
||||
\fB--noheadings\fP to produce a list of
|
||||
field=value pairs that can be used to set environment variables
|
||||
@ -520,45 +501,37 @@ field=value pairs that can be used to set environment variables
|
||||
.BR udev (7)
|
||||
rules).
|
||||
.
|
||||
.HP
|
||||
.BR --noheadings
|
||||
.TP
|
||||
.B --noheadings
|
||||
Suppress the headings line when using columnar output.
|
||||
.
|
||||
.HP
|
||||
.BR --noflush
|
||||
.TP
|
||||
.B --noflush
|
||||
Do not flush outstanding I/O when suspending a device, or do not
|
||||
commit thin-pool metadata when obtaining thin-pool status.
|
||||
.
|
||||
.HP
|
||||
.BR --nolockfs
|
||||
.br
|
||||
.TP
|
||||
.B --nolockfs
|
||||
Do not attempt to synchronize filesystem eg, when suspending a device.
|
||||
.
|
||||
.HP
|
||||
.BR --noopencount
|
||||
.br
|
||||
.TP
|
||||
.B --noopencount
|
||||
Tell the kernel not to supply the open reference count for the device.
|
||||
.
|
||||
.HP
|
||||
.BR --noudevrules
|
||||
.br
|
||||
.TP
|
||||
.B --noudevrules
|
||||
Do not allow udev to manage nodes for devices in device-mapper directory.
|
||||
.
|
||||
.HP
|
||||
.BR --noudevsync
|
||||
.br
|
||||
.TP
|
||||
.B --noudevsync
|
||||
Do not synchronise with udev when creating, renaming or removing devices.
|
||||
.
|
||||
.HP
|
||||
.BR -o | --options
|
||||
.IR options
|
||||
.br
|
||||
.TP
|
||||
.BR -o | --options " " \fIoptions
|
||||
Specify which fields to display.
|
||||
.
|
||||
.HP
|
||||
.BR --readahead
|
||||
.RB [ + ] \fIsectors | auto | none
|
||||
.br
|
||||
.TP
|
||||
.BR --readahead \ [ + ] \fIsectors | auto | none
|
||||
Specify read ahead size in units of sectors.
|
||||
The default value is \fBauto\fP which allows the kernel to choose
|
||||
a suitable value automatically. The \fB+\fP prefix lets you
|
||||
@ -566,15 +539,12 @@ specify a minimum value which will not be used if it is
|
||||
smaller than the value chosen by the kernel.
|
||||
The value \fBnone\fP is equivalent to specifying zero.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -r | --readonly
|
||||
.br
|
||||
Set the table being loaded read-only.
|
||||
.
|
||||
.HP
|
||||
.BR -S | --select
|
||||
.IR selection
|
||||
.br
|
||||
.TP
|
||||
.BR -S | --select " " \fIselection
|
||||
Process only items that match \fIselection\fP criteria. If the command is
|
||||
producing report output, adding the "selected" column (\fB-o
|
||||
selected\fP) displays all rows and shows 1 if the row matches the
|
||||
@ -584,49 +554,38 @@ comparison operators. As a quick help and to see full list of column names that
|
||||
can be used in selection and the set of supported selection operators, check
|
||||
the output of \fBdmsetup\ info\ -c\ -S\ help\fP command.
|
||||
.
|
||||
.HP
|
||||
.BR --table
|
||||
.IR table
|
||||
.br
|
||||
.TP
|
||||
.B --table \fItable
|
||||
Specify a one-line table directly on the command line.
|
||||
See below for more information on the table format.
|
||||
.
|
||||
.HP
|
||||
.BR --udevcookie
|
||||
.IR cookie
|
||||
.br
|
||||
.TP
|
||||
.B --udevcookie \fIcookie
|
||||
Use cookie for udev synchronisation.
|
||||
Note: Same cookie should be used for same type of operations i.e. creation of
|
||||
multiple different devices. It's not adviced to combine different
|
||||
operations on the single device.
|
||||
.
|
||||
.HP
|
||||
.BR -u | --uuid
|
||||
.br
|
||||
.TP
|
||||
.BR -u | --uuid " " \fIuuid
|
||||
Specify the \fIuuid\fP.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -y | --yes
|
||||
.br
|
||||
Answer yes to all prompts automatically.
|
||||
.
|
||||
.HP
|
||||
.BR -v | --verbose
|
||||
.RB [ -v | --verbose ]
|
||||
.br
|
||||
.TP
|
||||
.BR -v | --verbose " [" -v | --verbose ]
|
||||
Produce additional output.
|
||||
.
|
||||
.HP
|
||||
.BR --verifyudev
|
||||
.br
|
||||
.TP
|
||||
.B --verifyudev
|
||||
If udev synchronisation is enabled, verify that udev operations get performed
|
||||
correctly and try to fix up the device nodes afterwards if not.
|
||||
.
|
||||
.HP
|
||||
.BR --version
|
||||
.br
|
||||
.TP
|
||||
.B --version
|
||||
Display the library and kernel driver version.
|
||||
.br
|
||||
.
|
||||
.SH COMMANDS
|
||||
.
|
||||
@ -701,11 +660,11 @@ Fields are comma-separated and chosen from the following list:
|
||||
.BR events ,
|
||||
.BR uuid .
|
||||
Attributes are:
|
||||
.RI ( L )ive,
|
||||
.RI ( I )nactive,
|
||||
.RI ( s )uspended,
|
||||
.RI ( r )ead-only,
|
||||
.RI read-( w )rite.
|
||||
.RB ( L )ive,
|
||||
.RB ( I )nactive,
|
||||
.RB ( s )uspended,
|
||||
.RB ( r )ead-only,
|
||||
.RB read-( w )rite.
|
||||
Precede the list with '\fB+\fP' to append
|
||||
to the default selection of columns instead of replacing it.
|
||||
Precede any sort field with '\fB-\fP' for a reverse sort on that column.
|
||||
@ -838,7 +797,7 @@ Outputs status information for each of the device's targets.
|
||||
With \fB--target\fP, only information relating to the specified target type
|
||||
any is displayed. With \fB--noflush\fP, the thin target (from version 1.3.0)
|
||||
doesn't commit any outstanding changes to disk before reporting its statistics.
|
||||
|
||||
.
|
||||
.HP
|
||||
.CMD_SUSPEND
|
||||
.br
|
||||
@ -964,14 +923,13 @@ Creates a striped area.
|
||||
e.g. striped 2 32 /dev/hda1 0 /dev/hdb1 0
|
||||
will map the first chunk (16k) as follows:
|
||||
.RS
|
||||
.RS
|
||||
.IP
|
||||
LV chunk 1 -> hda1, chunk 1
|
||||
LV chunk 2 -> hdb1, chunk 1
|
||||
LV chunk 3 -> hda1, chunk 2
|
||||
LV chunk 4 -> hdb1, chunk 2
|
||||
etc.
|
||||
.RE
|
||||
.RE
|
||||
.TP
|
||||
.B error
|
||||
Errors any I/O that goes to this area. Useful for testing or
|
||||
|
@ -1,12 +1,12 @@
|
||||
.TH DMSTATS 8 "Jun 23 2016" "Linux" "MAINTENANCE COMMANDS"
|
||||
|
||||
.
|
||||
.de OPT_PROGRAMS
|
||||
. RB \%[ --allprograms | --programid
|
||||
. RB [ --allprograms | --programid
|
||||
. IR id ]
|
||||
..
|
||||
.
|
||||
.de OPT_REGIONS
|
||||
. RB \%[ --allregions | --regionid
|
||||
. RB [ --allregions | --regionid
|
||||
. IR id ]
|
||||
..
|
||||
.de OPT_OBJECTS
|
||||
@ -55,15 +55,17 @@ dmstats \(em device-mapper statistics management
|
||||
.B dmstats
|
||||
.de CMD_COMMAND
|
||||
. ad l
|
||||
. nh
|
||||
. IR command
|
||||
. IR device_name " |"
|
||||
. IR device_name \ |
|
||||
. BR --major
|
||||
. IR major
|
||||
. BR --minor
|
||||
. IR minor " |"
|
||||
. IR minor \ |
|
||||
. BR -u | --uuid
|
||||
. IR uuid
|
||||
. RB \%[ -v | --verbose]
|
||||
. RB [ -v | --verbose ]
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
.CMD_COMMAND
|
||||
@ -72,10 +74,12 @@ dmstats \(em device-mapper statistics management
|
||||
.B dmstats
|
||||
.de CMD_CLEAR
|
||||
. ad l
|
||||
. nh
|
||||
. BR clear
|
||||
. IR device_name
|
||||
. OPT_PROGRAMS
|
||||
. OPT_REGIONS
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
.CMD_CLEAR
|
||||
@ -84,13 +88,14 @@ dmstats \(em device-mapper statistics management
|
||||
.B dmstats
|
||||
.de CMD_CREATE
|
||||
. ad l
|
||||
. nh
|
||||
. BR create
|
||||
. IR device_name... | file_path... | \fB--alldevices
|
||||
. RB [ --areas
|
||||
. IR nr_areas | \fB--areasize
|
||||
. IR area_size ]
|
||||
. RB [ --bounds
|
||||
. IR \%histogram_boundaries ]
|
||||
. IR histogram_boundaries ]
|
||||
. RB [ --filemap ]
|
||||
. RB [ --follow
|
||||
. IR follow_mode ]
|
||||
@ -102,10 +107,11 @@ dmstats \(em device-mapper statistics management
|
||||
. IR start_sector
|
||||
. BR --length
|
||||
. IR length | \fB--segments ]
|
||||
. RB \%[ --userdata
|
||||
. RB [ --userdata
|
||||
. IR user_data ]
|
||||
. RB [ --programid
|
||||
. IR id ]
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
.CMD_CREATE
|
||||
@ -114,10 +120,12 @@ dmstats \(em device-mapper statistics management
|
||||
.B dmstats
|
||||
.de CMD_DELETE
|
||||
. ad l
|
||||
. nh
|
||||
. BR delete
|
||||
. IR device_name | \fB--alldevices
|
||||
. OPT_PROGRAMS
|
||||
. OPT_REGIONS
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
.CMD_DELETE
|
||||
@ -126,12 +134,14 @@ dmstats \(em device-mapper statistics management
|
||||
.B dmstats
|
||||
.de CMD_GROUP
|
||||
. ad l
|
||||
. nh
|
||||
. BR group
|
||||
. RI [ device_name | \fB--alldevices ]
|
||||
. RB [ --alias
|
||||
. IR name ]
|
||||
. RB [ --regions
|
||||
. IR regions ]
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
.CMD_GROUP
|
||||
@ -149,6 +159,7 @@ dmstats \(em device-mapper statistics management
|
||||
.B dmstats
|
||||
.de CMD_LIST
|
||||
. ad l
|
||||
. nh
|
||||
. BR list
|
||||
. RI [ device_name ]
|
||||
. RB [ --histogram ]
|
||||
@ -156,9 +167,10 @@ dmstats \(em device-mapper statistics management
|
||||
. RB [ --units
|
||||
. IR units ]
|
||||
. OPT_OBJECTS
|
||||
. RB \%[ --nosuffix ]
|
||||
. RB [ --nosuffix ]
|
||||
. RB [ --notimesuffix ]
|
||||
. RB \%[ -v | --verbose]
|
||||
. RB [ -v | --verbose ]
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
.CMD_LIST
|
||||
@ -167,11 +179,13 @@ dmstats \(em device-mapper statistics management
|
||||
.B dmstats
|
||||
.de CMD_PRINT
|
||||
. ad l
|
||||
. nh
|
||||
. BR print
|
||||
. RI [ device_name ]
|
||||
. RB [ --clear ]
|
||||
. OPT_PROGRAMS
|
||||
. OPT_REGIONS
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
.CMD_PRINT
|
||||
@ -180,6 +194,7 @@ dmstats \(em device-mapper statistics management
|
||||
.B dmstats
|
||||
.de CMD_REPORT
|
||||
. ad l
|
||||
. nh
|
||||
. BR report
|
||||
. RI [ device_name ]
|
||||
. RB [ --interval
|
||||
@ -199,7 +214,8 @@ dmstats \(em device-mapper statistics management
|
||||
. RB [ --units
|
||||
. IR units ]
|
||||
. RB [ --nosuffix ]
|
||||
. RB \%[ --notimesuffix ]
|
||||
. RB [ --notimesuffix ]
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
.CMD_REPORT
|
||||
@ -207,10 +223,12 @@ dmstats \(em device-mapper statistics management
|
||||
.B dmstats
|
||||
.de CMD_UNGROUP
|
||||
. ad l
|
||||
. nh
|
||||
. BR ungroup
|
||||
. RI [ device_name | \fB--alldevices ]
|
||||
. RB [ --groupid
|
||||
. IR id ]
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
.CMD_UNGROUP
|
||||
@ -218,6 +236,7 @@ dmstats \(em device-mapper statistics management
|
||||
.B dmstats
|
||||
.de CMD_UPDATE_FILEMAP
|
||||
. ad l
|
||||
. nh
|
||||
. BR update_filemap
|
||||
. IR file_path
|
||||
. RB [ --groupid
|
||||
@ -225,6 +244,7 @@ dmstats \(em device-mapper statistics management
|
||||
. RB [ --follow
|
||||
. IR follow_mode ]
|
||||
. OPT_FOREGROUND
|
||||
. hy
|
||||
. ad b
|
||||
..
|
||||
.CMD_UPDATE_FILEMAP
|
||||
@ -237,334 +257,272 @@ dmstats \(em device-mapper statistics management
|
||||
The dmstats program manages IO statistics regions for devices that use
|
||||
the device-mapper driver. Statistics regions may be created, deleted,
|
||||
listed and reported on using the tool.
|
||||
|
||||
.P
|
||||
The first argument to dmstats is a \fIcommand\fP.
|
||||
|
||||
.P
|
||||
The second argument is the \fIdevice name\fP,
|
||||
\fIuuid\fP or \fImajor\fP and \fIminor\fP numbers.
|
||||
|
||||
.P
|
||||
Further options permit the selection of regions, output format
|
||||
control, and reporting behaviour.
|
||||
|
||||
.P
|
||||
When no device argument is given dmstats will by default operate on all
|
||||
device-mapper devices present. The \fBcreate\fP and \fBdelete\fP
|
||||
commands require the use of \fB--alldevices\fP when used in this way.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.
|
||||
.HP
|
||||
.BR --alias
|
||||
.IR name
|
||||
.br
|
||||
.TP
|
||||
.B --alias \fIname
|
||||
Specify an alias name for a group.
|
||||
.
|
||||
.HP
|
||||
.BR --alldevices
|
||||
.br
|
||||
.TP
|
||||
.B --alldevices
|
||||
If no device arguments are given allow operation on all devices when
|
||||
creating or deleting regions.
|
||||
.
|
||||
.HP
|
||||
.BR --allprograms
|
||||
.br
|
||||
.TP
|
||||
.B --allprograms
|
||||
Include regions from all program IDs for list and report operations.
|
||||
.br
|
||||
.HP
|
||||
.BR --allregions
|
||||
.br
|
||||
.
|
||||
.TP
|
||||
.B --allregions
|
||||
Include all present regions for commands that normally accept a single
|
||||
region identifier.
|
||||
.
|
||||
.HP
|
||||
.BR --area
|
||||
.br
|
||||
.TP
|
||||
.B --area
|
||||
When peforming a list or report, include objects of type area in the
|
||||
results.
|
||||
.
|
||||
.HP
|
||||
.BR --areas
|
||||
.IR nr_areas
|
||||
.br
|
||||
.TP
|
||||
.B --areas \fInr_areas
|
||||
Specify the number of statistics areas to create within a new region.
|
||||
.
|
||||
.HP
|
||||
.BR --areasize
|
||||
.IR area_size \c
|
||||
.RB [ \c
|
||||
.TP
|
||||
.B --areasize \fIarea_size\fR[\c
|
||||
.UNITS
|
||||
.br
|
||||
Specify the size of areas into which a new region should be divided. An
|
||||
optional suffix selects units of:
|
||||
.HELP_UNITS
|
||||
.
|
||||
.HP
|
||||
.BR --clear
|
||||
.br
|
||||
.TP
|
||||
.B --clear
|
||||
When printing statistics counters, also atomically reset them to zero.
|
||||
.
|
||||
.HP
|
||||
.BR --count
|
||||
.IR count
|
||||
.br
|
||||
.TP
|
||||
.B --count \fIcount
|
||||
Specify the iteration count for repeating reports. If the count
|
||||
argument is zero reports will continue to repeat until interrupted.
|
||||
.
|
||||
.HP
|
||||
.BR --group
|
||||
.br
|
||||
.TP
|
||||
.B --group
|
||||
When peforming a list or report, include objects of type group in the
|
||||
results.
|
||||
.
|
||||
.HP
|
||||
.BR --filemap
|
||||
.br
|
||||
.TP
|
||||
.B --filemap
|
||||
Instead of creating regions on a device as specified by command line
|
||||
options, open the file found at each \fBfile_path\fP argument, and
|
||||
create regions corresponding to the locations of the on-disk extents
|
||||
allocated to the file(s).
|
||||
.
|
||||
.HP
|
||||
.BR --nomonitor
|
||||
.br
|
||||
.TP
|
||||
.B --nomonitor
|
||||
Disable the \fBdmfilemapd\fP daemon when creating new file mapped
|
||||
groups. Normally the device-mapper filemap monitoring daemon,
|
||||
\fBdmfilemapd\fP, is started for each file mapped group to update the
|
||||
set of regions as the file changes on-disk: use of this option
|
||||
disables this behaviour.
|
||||
|
||||
.P
|
||||
Regions in the group may still be updated with the
|
||||
\fBupdate_filemap\fP command, or by starting the daemon manually.
|
||||
.
|
||||
.HP
|
||||
.BR --follow
|
||||
.IR follow_mode
|
||||
.br
|
||||
.TP
|
||||
.B --follow \fIfollow_mode
|
||||
Specify the \fBdmfilemapd\fP file following mode. The file map
|
||||
monitoring daemon can monitor files in two distinct ways: the mode
|
||||
affects the behaviour of the daemon when a file under monitoring is
|
||||
renamed or unlinked, and the conditions which cause the daemon to
|
||||
terminate.
|
||||
|
||||
.P
|
||||
The \fBfollow_mode\fP argument is either "inode", for follow-inode
|
||||
mode, or "path", for follow-path.
|
||||
|
||||
.P
|
||||
If follow-inode mode is used, the daemon will hold the file open, and
|
||||
continue to update regions from the same file descriptor. This means
|
||||
that the mapping will follow rename, move (within the same file
|
||||
system), and unlink operations. This mode is useful if the file is
|
||||
expected to be moved, renamed, or unlinked while it is being
|
||||
monitored.
|
||||
|
||||
.P
|
||||
In follow-inode mode, the daemon will exit once it detects that the
|
||||
file has been unlinked and it is the last holder of a reference to it.
|
||||
|
||||
.P
|
||||
If follow-path is used, the daemon will re-open the provided path on
|
||||
each monitoring iteration. This means that the group will be updated
|
||||
to reflect a new file being moved to the same path as the original
|
||||
file. This mode is useful for files that are expected to be updated
|
||||
via unlink and rename.
|
||||
|
||||
.P
|
||||
In follow-path mode, the daemon will exit if the file is removed and
|
||||
not replaced within a brief tolerance interval.
|
||||
|
||||
.P
|
||||
In either mode, the daemon exits automatically if the monitored group
|
||||
is removed.
|
||||
.
|
||||
.HP
|
||||
.BR --foreground
|
||||
.br
|
||||
.TP
|
||||
.B --foreground
|
||||
Specify that the \fBdmfilemapd\fP daemon should run in the foreground.
|
||||
The daemon will not fork into the background, and will replace the
|
||||
\fBdmstats\fP command that started it.
|
||||
.
|
||||
.HP
|
||||
.BR --groupid
|
||||
.IR id
|
||||
.br
|
||||
.TP
|
||||
.B --groupid \fIid
|
||||
Specify the group to operate on.
|
||||
.
|
||||
.HP
|
||||
.BR --bounds
|
||||
.IR histogram_boundaries \c
|
||||
.TP
|
||||
.B --bounds \fIhistogram_boundaries\c
|
||||
.RB [ ns | us | ms | s ]
|
||||
.br
|
||||
Specify the boundaries of a latency histogram to be tracked for the
|
||||
region as a comma separated list of latency values. Latency values are
|
||||
given in nanoseconds. An optional unit suffix of
|
||||
.BR ns ,
|
||||
.BR us ,
|
||||
.BR ms ,
|
||||
.BR ns , us , ms ,
|
||||
or \fBs\fP may be given after each value to specify units of
|
||||
nanoseconds, microseconds, miliseconds or seconds respectively.
|
||||
.
|
||||
.HP
|
||||
.BR --histogram
|
||||
.br
|
||||
.TP
|
||||
.B --histogram
|
||||
When used with the \fBreport\fP and \fBlist\fP commands select default
|
||||
fields that emphasize latency histogram data.
|
||||
.
|
||||
.HP
|
||||
.BR --interval
|
||||
.IR seconds
|
||||
.br
|
||||
.TP
|
||||
.B --interval \fIseconds
|
||||
Specify the interval in seconds between successive iterations for
|
||||
repeating reports. If \fB--interval\fP is specified but
|
||||
\fB--count\fP is not,
|
||||
reports will continue to repeat until interrupted.
|
||||
.
|
||||
.HP
|
||||
.BR --length
|
||||
.IR length \c
|
||||
.RB [ \c
|
||||
.TP
|
||||
.B --length \fIlength\fR[\c
|
||||
.UNITS
|
||||
.br
|
||||
Specify the length of a new statistics region in sectors. An optional
|
||||
suffix selects units of:
|
||||
.HELP_UNITS
|
||||
.
|
||||
.HP
|
||||
.BR -j | --major
|
||||
.IR major
|
||||
.br
|
||||
.TP
|
||||
.BR -j | --major " " \fImajor
|
||||
Specify the major number.
|
||||
.
|
||||
.HP
|
||||
.BR -m | --minor
|
||||
.IR minor
|
||||
.br
|
||||
.TP
|
||||
.BR -m | --minor " " \fIminor
|
||||
Specify the minor number.
|
||||
.
|
||||
.HP
|
||||
.BR --nogroup
|
||||
.br
|
||||
.TP
|
||||
.B --nogroup
|
||||
When creating regions mapping the extents of a file in the file
|
||||
system, do not create a group or set an alias.
|
||||
.
|
||||
.HP
|
||||
.BR --nosuffix
|
||||
.br
|
||||
.TP
|
||||
.B --nosuffix
|
||||
Suppress the suffix on output sizes. Use with \fB--units\fP
|
||||
(except h and H) if processing the output.
|
||||
.
|
||||
.HP
|
||||
.BR --notimesuffix
|
||||
.br
|
||||
.TP
|
||||
.B --notimesuffix
|
||||
Suppress the suffix on output time values. Histogram boundary values
|
||||
will be reported in units of nanoseconds.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -o | --options
|
||||
.br
|
||||
Specify which report fields to display.
|
||||
.
|
||||
.HP
|
||||
.BR -O | --sort
|
||||
.IR sort_fields
|
||||
.br
|
||||
.TP
|
||||
.BR -O | --sort " " \fIsort_fields
|
||||
Sort output according to the list of fields given. Precede any
|
||||
sort field with '\fB-\fP' for a reverse sort on that column.
|
||||
.
|
||||
.HP
|
||||
.BR --precise
|
||||
.br
|
||||
.TP
|
||||
.B --precise
|
||||
Attempt to use nanosecond precision counters when creating new
|
||||
statistics regions.
|
||||
.
|
||||
.HP
|
||||
.BR --programid
|
||||
.IR id
|
||||
.br
|
||||
.TP
|
||||
.B --programid \fIid
|
||||
Specify a program ID string. When creating new statistics regions this
|
||||
string is stored with the region. Subsequent operations may supply a
|
||||
program ID in order to select only regions with a matching value. The
|
||||
default program ID for dmstats-managed regions is "dmstats".
|
||||
.
|
||||
.HP
|
||||
.BR --region
|
||||
.br
|
||||
.TP
|
||||
.B --region
|
||||
When peforming a list or report, include objects of type region in the
|
||||
results.
|
||||
.
|
||||
.HP
|
||||
.BR --regionid
|
||||
.IR id
|
||||
.br
|
||||
.TP
|
||||
.B --regionid \fIid
|
||||
Specify the region to operate on.
|
||||
.
|
||||
.HP
|
||||
.BR --regions
|
||||
.IR region_list
|
||||
.br
|
||||
.TP
|
||||
.B --regions \fIregion_list
|
||||
Specify a list of regions to group. The group list is a comma-separated
|
||||
list of region identifiers. Continuous sequences of identifiers may be
|
||||
expressed as a hyphen separated range, for example: '1-10'.
|
||||
.
|
||||
.HP
|
||||
.BR --relative
|
||||
.br
|
||||
.TP
|
||||
.B --relative
|
||||
If displaying the histogram report show relative (percentage) values
|
||||
instead of absolute counts.
|
||||
.
|
||||
.HP
|
||||
.BR -S | --select
|
||||
.IR selection
|
||||
.br
|
||||
.TP
|
||||
.BR -S | --select " " \fIselection
|
||||
Display only rows that match \fIselection\fP criteria. All rows with the
|
||||
additional "selected" column (\fB-o selected\fP) showing 1 if the row matches
|
||||
the \fIselection\fP and 0 otherwise. The selection criteria are defined by
|
||||
specifying column names and their valid values while making use of
|
||||
supported comparison operators.
|
||||
.
|
||||
.HP
|
||||
.BR --start
|
||||
.IR start \c
|
||||
.RB [ \c
|
||||
.TP
|
||||
.B --start \fIstart\fR[\c
|
||||
.UNITS
|
||||
.br
|
||||
Specify the start offset of a new statistics region in sectors. An
|
||||
optional suffix selects units of:
|
||||
.HELP_UNITS
|
||||
.
|
||||
.HP
|
||||
.BR --segments
|
||||
.br
|
||||
.TP
|
||||
.B --segments
|
||||
When used with \fBcreate\fP, create a new statistics region for each
|
||||
target contained in the given device(s). This causes a separate region
|
||||
to be allocated for each segment of the device.
|
||||
|
||||
.P
|
||||
The newly created regions are automatically placed into a group unless
|
||||
the \fB--nogroup\fP option is given. When grouping is enabled a group
|
||||
alias may be specified using the \fB--alias\fP option.
|
||||
.
|
||||
.HP
|
||||
.BR --units
|
||||
.TP
|
||||
.B --units \c
|
||||
.RI [ units ] \c
|
||||
.RB [ h | H | \c
|
||||
.UNITS
|
||||
.br
|
||||
Set the display units for report output.
|
||||
All sizes are output in these units:
|
||||
.RB ( h )uman-readable,
|
||||
.HELP_UNITS
|
||||
Can also specify custom units e.g. \fB--units\ 3M\fP.
|
||||
.
|
||||
.HP
|
||||
.BR --userdata
|
||||
.IR user_data
|
||||
.br
|
||||
.TP
|
||||
.B --userdata \fIuser_data
|
||||
Specify user data (a word) to be stored with a new region. The value
|
||||
is added to any internal auxiliary data (for example, group
|
||||
information), and stored with the region in the aux_data field provided
|
||||
by the kernel. Whitespace is not permitted.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -u | --uuid
|
||||
.br
|
||||
Specify the uuid.
|
||||
.
|
||||
.HP
|
||||
.BR -v | --verbose " [" -v | --verbose ]
|
||||
.br
|
||||
.TP
|
||||
.BR -v | --verbose \ [ -v | --verbose ]
|
||||
Produce additional output.
|
||||
.
|
||||
.SH COMMANDS
|
||||
@ -579,23 +537,23 @@ regions (with the exception of in-flight IO counters).
|
||||
.CMD_CREATE
|
||||
.br
|
||||
Creates one or more new statistics regions on the specified device(s).
|
||||
|
||||
.P
|
||||
The region will span the entire device unless \fB--start\fP and
|
||||
\fB--length\fP or \fB--segments\fP are given. The \fB--start\fP an
|
||||
\fB--length\fP options allow a region of arbitrary length to be placed
|
||||
at an arbitrary offset into the device. The \fB--segments\fP option
|
||||
causes a new region to be created for each target in the corresponding
|
||||
device-mapper device's table.
|
||||
|
||||
.P
|
||||
If the \fB--precise\fP option is used the command will attempt to
|
||||
create a region using nanosecond precision counters.
|
||||
|
||||
.P
|
||||
If \fB--bounds\fP is given a latency histogram will be tracked for
|
||||
the new region. The boundaries of the histogram bins are given as a
|
||||
comma separated list of latency values. There is an implicit lower bound
|
||||
of zero on the first bin and an implicit upper bound of infinity (or the
|
||||
configured interval duration) on the final bin.
|
||||
|
||||
.P
|
||||
Latencies are given in nanoseconds. An optional unit suffix of ns, us,
|
||||
ms, or s may be given after each value to specify units of nanoseconds,
|
||||
microseconds, miliseconds or seconds respectively, so for example, 10ms
|
||||
@ -603,19 +561,19 @@ is equivalent to 10000000. Latency values with a precision of less than
|
||||
one milisecond can only be used when precise timestamps are enabled: if
|
||||
\fB--precise\fP is not given and values less than one milisecond are
|
||||
used it will be enabled automatically.
|
||||
|
||||
.P
|
||||
An optional \fBprogram_id\fP or \fBuser_data\fP string may be associated
|
||||
with the region. A \fBprogram_id\fP may then be used to select regions
|
||||
for subsequent list, print, and report operations. The \fBuser_data\fP
|
||||
stores an arbitrary string and is not used by dmstats or the
|
||||
device-mapper kernel statistics subsystem.
|
||||
|
||||
.P
|
||||
By default dmstats creates regions with a \fBprogram_id\fP of
|
||||
"dmstats".
|
||||
|
||||
.P
|
||||
On success the \fBregion_id\fP of the newly created region is printed
|
||||
to stdout.
|
||||
|
||||
.P
|
||||
If the \fB--filemap\fP option is given with a regular file, or list
|
||||
of files, as the \fBfile_path\fP argument, instead of creating regions
|
||||
with parameters specified on the command line, \fBdmstats\fP will open
|
||||
@ -623,20 +581,20 @@ the files located at \fBfile_path\fP and create regions corresponding to
|
||||
the physical extents allocated to the file. This can be used to monitor
|
||||
statistics for individual files in the file system, for example, virtual
|
||||
machine images, swap areas, or large database files.
|
||||
|
||||
.P
|
||||
To work with the \fB--filemap\fP option, files must be located on a
|
||||
local file system, backed by a device-mapper device, that supports
|
||||
physical extent data using the FIEMAP ioctl (Ext4 and XFS for e.g.).
|
||||
|
||||
.P
|
||||
By default regions that map a file are placed into a group and the
|
||||
group alias is set to the basename of the file. This behaviour can be
|
||||
overridden with the \fB--alias\fP and \fB--nogroup\fP options.
|
||||
|
||||
.P
|
||||
Creating a group that maps a file automatically starts a daemon,
|
||||
\fBdmfilemapd\fP to monitor the file and update the mapping as the
|
||||
extents allocated to the file change. This behaviour can be disabled
|
||||
using the \fB--nomonitor\fP option.
|
||||
|
||||
.P
|
||||
Use the \fB--group\fP option to only display information for groups
|
||||
when listing and reporting.
|
||||
.
|
||||
@ -646,17 +604,17 @@ when listing and reporting.
|
||||
Delete the specified statistics region. All counters and resources used
|
||||
by the region are released and the region will not appear in the output
|
||||
of subsequent list, print, or report operations.
|
||||
|
||||
.P
|
||||
All regions registered on a device may be removed using
|
||||
\fB--allregions\fP.
|
||||
|
||||
.P
|
||||
To remove all regions on all devices both \fB--allregions\fP and
|
||||
\fB--alldevices\fP must be used.
|
||||
|
||||
.P
|
||||
If a \fB--groupid\fP is given instead of a \fB--regionid\fP the
|
||||
command will attempt to delete the group and all regions that it
|
||||
contains.
|
||||
|
||||
.P
|
||||
If a deleted region is the first member of a group of regions the group
|
||||
will also be removed.
|
||||
.
|
||||
@ -665,19 +623,19 @@ will also be removed.
|
||||
.br
|
||||
Combine one or more statistics regions on the specified device into a
|
||||
group.
|
||||
|
||||
.P
|
||||
The list of regions to be grouped is specified with \fB--regions\fP
|
||||
and an optional alias may be assigned with \fB--alias\fP. The set of
|
||||
regions is given as a comma-separated list of region identifiers. A
|
||||
continuous range of identifers spanning from \fBR1\fP to \fBR2\fP may
|
||||
be expressed as '\fBR1\fP-\fBR2\fP'.
|
||||
|
||||
.P
|
||||
Regions that have a histogram configured can be grouped: in this case
|
||||
the number of histogram bins and their bounds must match exactly.
|
||||
|
||||
.P
|
||||
On success the group list and newly created \fBgroup_id\fP are
|
||||
printed to stdout.
|
||||
|
||||
.P
|
||||
The group metadata is stored with the first (lowest numbered)
|
||||
\fBregion_id\fP in the group: deleting this region will also delete
|
||||
the group and other group members will be returned to their prior
|
||||
@ -695,18 +653,18 @@ the list of report fields.
|
||||
List the statistics regions, areas, or groups registered on the device.
|
||||
If the \fB--allprograms\fP switch is given all regions will be listed
|
||||
regardless of region program ID values.
|
||||
|
||||
.P
|
||||
By default only regions and groups are included in list output. If
|
||||
\fB-v\fP or \fB--verbose\fP is given the report will also include a
|
||||
row of information for each configured group and for each area contained
|
||||
in each region displayed.
|
||||
|
||||
.P
|
||||
Regions that contain a single area are by default omitted from the
|
||||
verbose list since their properties are identical to the area that they
|
||||
contain - to view all regions regardless of the number of areas present
|
||||
use \fB--region\fP). To also view the areas contained within regions
|
||||
use \fB--area\fP.
|
||||
|
||||
.P
|
||||
If \fB--histogram\fP is given the report will include the bin count
|
||||
and latency boundary values for any configured histograms.
|
||||
.HP
|
||||
@ -722,16 +680,16 @@ Start a report for the specified object or for all present objects. If
|
||||
the count argument is specified, the report will repeat at a fixed
|
||||
interval set by the \fB--interval\fP option. The default interval is
|
||||
one second.
|
||||
|
||||
.P
|
||||
If the \fB--allprograms\fP switch is given, all regions will be
|
||||
listed, regardless of region program ID values.
|
||||
|
||||
.P
|
||||
If the \fB--histogram\fP is given the report will include the histogram
|
||||
values and latency boundaries.
|
||||
|
||||
.P
|
||||
If the \fB--relative\fP is used the default histogram field displays
|
||||
bin values as a percentage of the total number of I/Os.
|
||||
|
||||
.P
|
||||
Object types (areas, regions and groups) to include in the report are
|
||||
selected using the \fB--area\fP, \fB--region\fP, and \fB--group\fP
|
||||
options.
|
||||
@ -741,7 +699,7 @@ options.
|
||||
.br
|
||||
Remove an existing group and return all the group's regions to their
|
||||
original state.
|
||||
|
||||
.P
|
||||
The group to be removed is specified using \fB--groupid\fP.
|
||||
.HP
|
||||
.CMD_UPDATE_FILEMAP
|
||||
@ -749,19 +707,19 @@ The group to be removed is specified using \fB--groupid\fP.
|
||||
Update a group of \fBdmstats\fP regions specified by \fBgroup_id\fP,
|
||||
that were previously created with \fB--filemap\fP, either directly,
|
||||
or by starting the monitoring daemon, \fBdmfilemapd\fP.
|
||||
|
||||
.P
|
||||
This will add and remove regions to reflect changes in the allocated
|
||||
extents of the file on-disk, since the time that it was crated or last
|
||||
updated.
|
||||
|
||||
.P
|
||||
Use of this command is not normally needed since the \fBdmfilemapd\fP
|
||||
daemon will automatically monitor filemap groups and perform these
|
||||
updates when required.
|
||||
|
||||
.P
|
||||
If a filemapped group was created with \fB--nomonitor\fP, or the
|
||||
daemon has been killed, the \fBupdate_filemap\fP can be used to
|
||||
manually force an update or start a new daemon.
|
||||
|
||||
.P
|
||||
Use \fB--nomonitor\fP to force a direct update and disable starting
|
||||
the monitoring daemon.
|
||||
.
|
||||
@ -773,55 +731,54 @@ span any range: from a single sector to the whole device. A region may
|
||||
be further sub-divided into a number of distinct areas (one or more),
|
||||
each with its own counter set. In this case a summary value for the
|
||||
entire region is also available for use in reports.
|
||||
|
||||
.P
|
||||
In addition, one or more regions on one device can be combined into
|
||||
a statistics group. Groups allow several regions to be aggregated and
|
||||
reported as a single entity; counters for all regions and areas are
|
||||
summed and used to report totals for all group members. Groups also
|
||||
permit the assignment of an optional alias, allowing meaningful names
|
||||
to be associated with sets of regions.
|
||||
|
||||
.P
|
||||
The group metadata is stored with the first (lowest numbered)
|
||||
\fBregion_id\fP in the group: deleting this region will also delete
|
||||
the group and other group members will be returned to their prior
|
||||
state.
|
||||
|
||||
.P
|
||||
By default new regions span the entire device. The \fB--start\fP and
|
||||
\fB--length\fP options allows a region of any size to be placed at any
|
||||
location on the device.
|
||||
|
||||
.P
|
||||
Using offsets it is possible to create regions that map individual
|
||||
objects within a block device (for example: partitions, files in a file
|
||||
system, or stripes or other structures in a RAID volume). Groups allow
|
||||
several non-contiguous regions to be assembled together for reporting
|
||||
and data aggregation.
|
||||
|
||||
.P
|
||||
A region may be either divided into the specified number of equal-sized
|
||||
areas, or into areas of the given size by specifying one of
|
||||
\fB--areas\fP or \fB--areasize\fP when creating a region with the
|
||||
\fBcreate\fP command. Depending on the size of the areas and the device
|
||||
region the final area within the region may be smaller than requested.
|
||||
.P
|
||||
.B Region identifiers
|
||||
.P
|
||||
.
|
||||
.SS Region identifiers
|
||||
.
|
||||
Each region is assigned an identifier when it is created that is used to
|
||||
reference the region in subsequent operations. Region identifiers are
|
||||
unique within a given device (including across different \fBprogram_id\fP
|
||||
values).
|
||||
|
||||
.P
|
||||
Depending on the sequence of create and delete operations, gaps may
|
||||
exist in the sequence of \fBregion_id\fP values for a particular device.
|
||||
|
||||
.P
|
||||
The \fBregion_id\fP should be treated as an opaque identifier used to
|
||||
reference the region.
|
||||
.
|
||||
.P
|
||||
.B Group identifiers
|
||||
.P
|
||||
.SS Group identifiers
|
||||
.
|
||||
Groups are also assigned an integer identifier at creation time;
|
||||
like region identifiers, group identifiers are unique within the
|
||||
containing device.
|
||||
|
||||
.P
|
||||
The \fBgroup_id\fP should be treated as an opaque identifier used to
|
||||
reference the group.
|
||||
.
|
||||
@ -832,82 +789,80 @@ correspond to the extents of a file in the file system. This allows
|
||||
IO statistics to be monitored on a per-file basis, for example to
|
||||
observe large database files, virtual machine images, or other files
|
||||
of interest.
|
||||
|
||||
.P
|
||||
To be able to use file mapping, the file must be backed by a
|
||||
device-mapper device, and in a file system that supports the FIEMAP
|
||||
ioctl (and which returns data describing the physical location of
|
||||
extents). This currently includes \fBxfs(5)\fP and \fBext4(5)\fP.
|
||||
|
||||
.P
|
||||
By default the regions making up a file are placed together in a
|
||||
group, and the group alias is set to the \fBbasename(3)\fP of the
|
||||
file. This allows statistics to be reported for the file as a whole,
|
||||
aggregating values for the regions making up the group. To see only
|
||||
the whole file (group) when using the \fBlist\fP and \fBreport\fP
|
||||
commands, use \fB--group\fP.
|
||||
|
||||
.P
|
||||
Since it is possible for the file to change after the initial
|
||||
group of regions is created, the \fBupdate_filemap\fP command, and
|
||||
\fBdmfilemapd\fP daemon are provided to update file mapped groups
|
||||
either manually or automatically.
|
||||
.
|
||||
.P
|
||||
.B File follow modes
|
||||
.P
|
||||
.SS File follow modes
|
||||
.
|
||||
The file map monitoring daemon can monitor files in two distinct ways:
|
||||
follow-inode mode, and follow-path mode.
|
||||
|
||||
.P
|
||||
The mode affects the behaviour of the daemon when a file under
|
||||
monitoring is renamed or unlinked, and the conditions which cause the
|
||||
daemon to terminate.
|
||||
|
||||
.P
|
||||
If follow-inode mode is used, the daemon will hold the file open, and
|
||||
continue to update regions from the same file descriptor. This means
|
||||
that the mapping will follow rename, move (within the same file
|
||||
system), and unlink operations. This mode is useful if the file is
|
||||
expected to be moved, renamed, or unlinked while it is being
|
||||
monitored.
|
||||
|
||||
.P
|
||||
In follow-inode mode, the daemon will exit once it detects that the
|
||||
file has been unlinked and it is the last holder of a reference to it.
|
||||
|
||||
.P
|
||||
If follow-path is used, the daemon will re-open the provided path on
|
||||
each monitoring iteration. This means that the group will be updated
|
||||
to reflect a new file being moved to the same path as the original
|
||||
file. This mode is useful for files that are expected to be updated
|
||||
via unlink and rename.
|
||||
|
||||
.P
|
||||
In follow-path mode, the daemon will exit if the file is removed and
|
||||
not replaced within a brief tolerance interval (one second).
|
||||
|
||||
.P
|
||||
To stop the daemon, delete the group containing the mapped regions:
|
||||
the daemon will automatically shut down.
|
||||
|
||||
.P
|
||||
The daemon can also be safely killed at any time and the group kept:
|
||||
if the file is still being allocated the mapping will become
|
||||
progressively out-of-date as extents are added and removed (in this
|
||||
case the daemon can be re-started or the group updated manually with
|
||||
the \fBupdate_filemap\fP command).
|
||||
|
||||
.P
|
||||
See the \fBcreate\fP command and \fB--filemap\fP, \fB--follow\fP,
|
||||
and \fB--nomonitor\fP options for further information.
|
||||
.
|
||||
.P
|
||||
.B Limitations
|
||||
.P
|
||||
.SS Limitations
|
||||
.
|
||||
The daemon attempts to maintain good synchronisation between the file
|
||||
extents and the regions contained in the group, however, since it can
|
||||
only react to new allocations once they have been written, there are
|
||||
inevitably some IO events that cannot be counted when a file is
|
||||
growing, particularly if the file is being extended by a single thread
|
||||
writing beyond end-of-file (for example, the \fBdd\fP program).
|
||||
|
||||
.P
|
||||
There is a further loss of events in that there is currently no way
|
||||
to atomically resize a \fBdmstats\fP region and preserve its current
|
||||
counter values. This affects files when they grow by extending the
|
||||
final extent, rather than allocating a new extent: any events that
|
||||
had accumulated in the region between any prior operation and the
|
||||
resize are lost.
|
||||
|
||||
.P
|
||||
File mapping is currently most effective in cases where the majority
|
||||
of IO does not trigger extent allocation. Future updates may address
|
||||
these limitations when kernel support is available.
|
||||
@ -916,7 +871,7 @@ these limitations when kernel support is available.
|
||||
.
|
||||
The dmstats report provides several types of field that may be added to
|
||||
the default field set, or used to create custom reports.
|
||||
|
||||
.P
|
||||
All performance counters and metrics are calculated per-area.
|
||||
.
|
||||
.SS Derived metrics
|
||||
@ -1273,12 +1228,11 @@ Bryn M. Reeves <bmr@redhat.com>
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.BR dmsetup (8)
|
||||
|
||||
.P
|
||||
LVM2 resource page: https://www.sourceware.org/lvm2/
|
||||
.br
|
||||
Device-mapper resource page: http://sources.redhat.com/dm/
|
||||
.br
|
||||
|
||||
.P
|
||||
Device-mapper statistics kernel documentation
|
||||
.br
|
||||
.I Documentation/device-mapper/statistics.txt
|
||||
|
@ -1,24 +1,27 @@
|
||||
.TH "FSADM" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
|
||||
.
|
||||
.SH "NAME"
|
||||
.
|
||||
fsadm \(em utility to resize or check filesystem on a device
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
.
|
||||
.PD 0
|
||||
.ad l
|
||||
.HP 5
|
||||
.TP 6
|
||||
.B fsadm
|
||||
.RI [ options ]
|
||||
.BR check
|
||||
.IR device
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.B fsadm
|
||||
.RI [ options ]
|
||||
.BR resize
|
||||
.IR device
|
||||
.RI [ new_size ]
|
||||
.PD
|
||||
.ad b
|
||||
.PD
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
@ -34,44 +37,36 @@ filesystem.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -e | --ext-offline
|
||||
.br
|
||||
Unmount ext2/ext3/ext4 filesystem before doing resize.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -f | --force
|
||||
.br
|
||||
Bypass some sanity checks.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -h | --help
|
||||
.br
|
||||
Display the help text.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -n | --dry-run
|
||||
.br
|
||||
Print commands without running them.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -v | --verbose
|
||||
.br
|
||||
Be more verbose.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -y | --yes
|
||||
.br
|
||||
Answer "yes" at any prompts.
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR -c | --cryptresize
|
||||
.br
|
||||
Resize dm-crypt mapping together with filesystem detected on the device. The dm-crypt device must be recognizable by cryptsetup(8).
|
||||
.
|
||||
.HP
|
||||
.TP
|
||||
.BR \fInew_size [ B | K | M | G | T | P | E ]
|
||||
.br
|
||||
Absolute number of filesystem blocks to be in the filesystem,
|
||||
or an absolute size using a suffix (in powers of 1024).
|
||||
If new_size is not supplied, the whole device is used.
|
||||
@ -91,30 +86,37 @@ Resize the filesystem on logical volume \fI/dev/vg/test\fP to 1000 megabytes.
|
||||
If \fI/dev/vg/test\fP contains ext2/ext3/ext4
|
||||
filesystem it will be unmounted prior the resize.
|
||||
All [y/n] questions will be answered 'y'.
|
||||
.sp
|
||||
.P
|
||||
#
|
||||
.B fsadm -e -y resize /dev/vg/test 1000M
|
||||
.
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.
|
||||
.TP
|
||||
.B "TMPDIR "
|
||||
.B TMPDIR
|
||||
The temporary directory name for mount points. Defaults to "\fI/tmp\fP".
|
||||
.TP
|
||||
.B DM_DEV_DIR
|
||||
The device directory name.
|
||||
Defaults to "\fI/dev\fP" and must be an absolute path.
|
||||
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.nh
|
||||
.ad l
|
||||
.BR lvm (8),
|
||||
.BR lvresize (8),
|
||||
.BR lvm.conf (5),
|
||||
.P
|
||||
.BR fsck (8),
|
||||
.BR tune2fs (8),
|
||||
.BR resize2fs (8),
|
||||
.P
|
||||
.BR reiserfstune (8),
|
||||
.BR resize_reiserfs (8),
|
||||
.P
|
||||
.BR xfs_info (8),
|
||||
.BR xfs_growfs (8),
|
||||
.BR xfs_check (8),
|
||||
.P
|
||||
.BR cryptsetup (8)
|
||||
|
@ -11,7 +11,6 @@ lvm \(em LVM2 tools
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
|
||||
The Logical Volume Manager (LVM) provides tools to create virtual block
|
||||
devices from physical devices. Virtual devices may be easier to manage
|
||||
than physical devices, and can have capabilities beyond what the physical
|
||||
@ -22,7 +21,6 @@ applications. Each block of data in an LV is stored on one or more PV in
|
||||
the VG, according to algorithms implemented by Device Mapper (DM) in the
|
||||
kernel.
|
||||
.P
|
||||
|
||||
The lvm command, and other commands listed below, are the command-line
|
||||
tools for LVM. A separate manual page describes each command in detail.
|
||||
.P
|
||||
@ -40,7 +38,7 @@ On invocation, \fBlvm\fP requires that only the standard file descriptors
|
||||
stdin, stdout and stderr are available. If others are found, they
|
||||
get closed and messages are issued warning about the leak.
|
||||
This warning can be suppressed by setting the environment variable
|
||||
.B LVM_SUPPRESS_FD_WARNINGS\fP.
|
||||
.BR LVM_SUPPRESS_FD_WARNINGS .
|
||||
.P
|
||||
Where commands take VG or LV names as arguments, the full path name is
|
||||
optional. An LV called "lvol0" in a VG called "vg0" can be specified
|
||||
@ -67,7 +65,7 @@ The following commands are built into lvm without links
|
||||
normally being created in the filesystem for them.
|
||||
.sp
|
||||
.PD 0
|
||||
.TP 14
|
||||
.TP 16
|
||||
.B config
|
||||
The same as \fBlvmconfig\fP(8) below.
|
||||
.TP
|
||||
@ -112,7 +110,7 @@ Display version information.
|
||||
The following commands implement the core LVM functionality.
|
||||
.sp
|
||||
.PD 0
|
||||
.TP 14
|
||||
.TP 16
|
||||
.B pvchange
|
||||
Change attributes of a Physical Volume.
|
||||
.TP
|
||||
@ -296,19 +294,18 @@ original VG, LV and internal layer names.
|
||||
.
|
||||
.SH UNIQUE NAMES
|
||||
.
|
||||
|
||||
VG names should be unique. vgcreate will produce an error if the
|
||||
specified VG name matches an existing VG name. However, there are cases
|
||||
where different VGs with the same name can appear to LVM, e.g. after
|
||||
moving disks or changing filters.
|
||||
|
||||
.P
|
||||
When VGs with the same name exist, commands operating on all VGs will
|
||||
include all of the VGs with the same name. If the ambiguous VG name is
|
||||
specified on the command line, the command will produce an error. The
|
||||
error states that multiple VGs exist with the specified name. To process
|
||||
one of the VGs specifically, the --select option should be used with the
|
||||
UUID of the intended VG: '--select vg_uuid=<uuid>'.
|
||||
|
||||
UUID of the intended VG: --select vg_uuid=<uuid>
|
||||
.P
|
||||
An exception is if all but one of the VGs with the shared name is foreign
|
||||
(see
|
||||
.BR lvmsystemid (7).)
|
||||
@ -317,18 +314,17 @@ VG and is processed.
|
||||
.P
|
||||
LV names are unique within a VG. The name of an historical LV cannot be
|
||||
reused until the historical LV has itself been removed or renamed.
|
||||
|
||||
.
|
||||
.SH ALLOCATION
|
||||
.
|
||||
When an operation needs to allocate Physical Extents for one or more
|
||||
Logical Volumes, the tools proceed as follows:
|
||||
|
||||
.P
|
||||
First of all, they generate the complete set of unallocated Physical Extents
|
||||
in the Volume Group. If any ranges of Physical Extents are supplied at
|
||||
the end of the command line, only unallocated Physical Extents within
|
||||
those ranges on the specified Physical Volumes are considered.
|
||||
|
||||
.P
|
||||
Then they try each allocation policy in turn, starting with the strictest
|
||||
policy (\fBcontiguous\fP) and ending with the allocation policy specified
|
||||
using \fB--alloc\fP or set as the default for the particular Logical
|
||||
@ -337,14 +333,14 @@ lowest-numbered Logical Extent of the empty Logical Volume space that
|
||||
needs to be filled, they allocate as much space as possible according to
|
||||
the restrictions imposed by the policy. If more space is needed,
|
||||
they move on to the next policy.
|
||||
|
||||
.P
|
||||
The restrictions are as follows:
|
||||
|
||||
.P
|
||||
\fBContiguous\fP requires that the physical location of any Logical
|
||||
Extent that is not the first Logical Extent of a Logical Volume is
|
||||
adjacent to the physical location of the Logical Extent immediately
|
||||
preceding it.
|
||||
|
||||
.P
|
||||
\fBCling\fP requires that the Physical Volume used for any Logical
|
||||
Extent to be added to an existing Logical Volume is already in use by at
|
||||
least one Logical Extent earlier in that Logical Volume. If the
|
||||
@ -353,31 +349,31 @@ Physical Volumes are considered to match if any of the listed tags is
|
||||
present on both Physical Volumes. This allows groups of Physical
|
||||
Volumes with similar properties (such as their physical location) to be
|
||||
tagged and treated as equivalent for allocation purposes.
|
||||
|
||||
.P
|
||||
When a Logical Volume is striped or mirrored, the above restrictions are
|
||||
applied independently to each stripe or mirror image (leg) that needs
|
||||
space.
|
||||
|
||||
.P
|
||||
\fBNormal\fP will not choose a Physical Extent that shares the same Physical
|
||||
Volume as a Logical Extent already allocated to a parallel Logical
|
||||
Volume (i.e. a different stripe or mirror image/leg) at the same offset
|
||||
within that parallel Logical Volume.
|
||||
|
||||
.P
|
||||
When allocating a mirror log at the same time as Logical Volumes to hold
|
||||
the mirror data, Normal will first try to select different Physical
|
||||
Volumes for the log and the data. If that's not possible and the
|
||||
.B allocation/mirror_logs_require_separate_pvs
|
||||
configuration parameter is set to 0, it will then allow the log
|
||||
to share Physical Volume(s) with part of the data.
|
||||
|
||||
.P
|
||||
When allocating thin pool metadata, similar considerations to those of a
|
||||
mirror log in the last paragraph apply based on the value of the
|
||||
.B allocation/thin_pool_metadata_require_separate_pvs
|
||||
configuration parameter.
|
||||
|
||||
.P
|
||||
If you rely upon any layout behaviour beyond that documented here, be
|
||||
aware that it might change in future versions of the code.
|
||||
|
||||
.P
|
||||
For example, if you supply on the command line two empty Physical
|
||||
Volumes that have an identical number of free Physical Extents available for
|
||||
allocation, the current code considers using each of them in the order
|
||||
@ -387,7 +383,7 @@ for a particular Logical Volume, then you should build it up through a
|
||||
sequence of \fBlvcreate\fP(8) and \fBlvconvert\fP(8) steps such that the
|
||||
restrictions described above applied to each step leave the tools no
|
||||
discretion over the layout.
|
||||
|
||||
.P
|
||||
To view the way the allocation process currently works in any specific
|
||||
case, read the debug logging output, for example by adding \fB-vvvv\fP to
|
||||
a command.
|
||||
@ -501,7 +497,7 @@ Prepends source file name and code line number with libdm debugging.
|
||||
.BR lvm (8),
|
||||
.BR lvm.conf (5),
|
||||
.BR lvmconfig (8),
|
||||
|
||||
.P
|
||||
.BR pvchange (8),
|
||||
.BR pvck (8),
|
||||
.BR pvcreate (8),
|
||||
@ -511,7 +507,7 @@ Prepends source file name and code line number with libdm debugging.
|
||||
.BR pvresize (8),
|
||||
.BR pvs (8),
|
||||
.BR pvscan (8),
|
||||
|
||||
.P
|
||||
.BR vgcfgbackup (8),
|
||||
.BR vgcfgrestore (8),
|
||||
.BR vgchange (8),
|
||||
@ -531,7 +527,7 @@ Prepends source file name and code line number with libdm debugging.
|
||||
.BR vgs (8),
|
||||
.BR vgscan (8),
|
||||
.BR vgsplit (8),
|
||||
|
||||
.P
|
||||
.BR lvcreate (8),
|
||||
.BR lvchange (8),
|
||||
.BR lvconvert (8),
|
||||
@ -543,26 +539,26 @@ Prepends source file name and code line number with libdm debugging.
|
||||
.BR lvresize (8),
|
||||
.BR lvs (8),
|
||||
.BR lvscan (8),
|
||||
|
||||
.P
|
||||
.BR lvm-fullreport (8),
|
||||
.BR lvm-lvpoll (8),
|
||||
.BR lvm2-activation-generator (8),
|
||||
.BR blkdeactivate (8),
|
||||
.BR lvmdump (8),
|
||||
|
||||
.P
|
||||
.BR dmeventd (8),
|
||||
.BR lvmpolld (8),
|
||||
.BR lvmlockd (8),
|
||||
.BR lvmlockctl (8),
|
||||
.BR cmirrord (8),
|
||||
.BR lvmdbusd (8),
|
||||
|
||||
.P
|
||||
.BR lvmsystemid (7),
|
||||
.BR lvmreport (7),
|
||||
.BR lvmraid (7),
|
||||
.BR lvmthin (7),
|
||||
.BR lvmcache (7),
|
||||
|
||||
.P
|
||||
.BR dmsetup (8),
|
||||
.BR dmstats (8),
|
||||
.BR readline (3)
|
||||
|
@ -1,28 +1,35 @@
|
||||
.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Red Hat, Inc." \" -*- nroff -*-
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
lvm.conf \(em Configuration file for LVM2
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
.
|
||||
.B #DEFAULT_SYS_DIR#/lvm.conf
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
\fBlvm.conf\fP is loaded during the initialisation phase of
|
||||
\fBlvm\fP(8). This file can in turn lead to other files
|
||||
being loaded - settings read in later override earlier
|
||||
settings. File timestamps are checked between commands and if
|
||||
any have changed, all the files are reloaded.
|
||||
|
||||
.P
|
||||
For a description of each lvm.conf setting, run:
|
||||
|
||||
.P
|
||||
.B lvmconfig --typeconfig default --withcomments --withspaces
|
||||
|
||||
.P
|
||||
The settings defined in lvm.conf can be overridden by any
|
||||
of these extended configuration methods:
|
||||
.
|
||||
.TP
|
||||
.B direct config override on command line
|
||||
The \fB--config ConfigurationString\fP command line option takes the
|
||||
ConfigurationString as direct string representation of the configuration
|
||||
to override the existing configuration. The ConfigurationString is of
|
||||
exactly the same format as used in any LVM configuration file.
|
||||
|
||||
.
|
||||
.TP
|
||||
.B profile config
|
||||
.br
|
||||
@ -30,17 +37,17 @@ A profile is a set of selected customizable configuration settings
|
||||
that are aimed to achieve a certain characteristics in various
|
||||
environments or uses. It's used to override existing configuration.
|
||||
Normally, the name of the profile should reflect that environment or use.
|
||||
|
||||
.P
|
||||
There are two groups of profiles recognised: \fBcommand profiles\fP and
|
||||
\fBmetadata profiles\fP.
|
||||
|
||||
.P
|
||||
The \fBcommand profile\fP is used to override selected configuration
|
||||
settings at global LVM command level - it is applied at the very beginning
|
||||
of LVM command execution and it is used throughout the whole time of LVM
|
||||
command execution. The command profile is applied by using the
|
||||
\fB--commandprofile ProfileName\fP command line option that is recognised by
|
||||
all LVM2 commands.
|
||||
|
||||
.P
|
||||
The \fBmetadata profile\fP is used to override selected configuration
|
||||
settings at Volume Group/Logical Volume level - it is applied independently
|
||||
for each Volume Group/Logical Volume that is being processed. As such,
|
||||
@ -56,12 +63,12 @@ option during creation when using \fBvgcreate\fP or \fBlvcreate\fP command.
|
||||
The \fBvgs\fP and \fBlvs\fP reporting commands provide \fB-o vg_profile\fP
|
||||
and \fB-o lv_profile\fP output options to show the metadata profile
|
||||
currently attached to a Volume Group or a Logical Volume.
|
||||
|
||||
.P
|
||||
The set of options allowed for command profiles is mutually exclusive
|
||||
when compared to the set of options allowed for metadata profiles. The
|
||||
settings that belong to either of these two sets can't be mixed together
|
||||
and LVM tools will reject such profiles.
|
||||
|
||||
.P
|
||||
LVM itself provides a few predefined configuration profiles.
|
||||
Users are allowed to add more profiles with different values if needed.
|
||||
For this purpose, there's the \fBcommand_profile_template.profile\fP
|
||||
@ -74,31 +81,36 @@ or \fBlvmconfig --file <ProfileName.profile> --type profilable-metadata <section
|
||||
can be used to generate a configuration with profilable settings in either
|
||||
of the type for given section and save it to new ProfileName.profile
|
||||
(if the section is not specified, all profilable settings are reported).
|
||||
|
||||
The profiles are stored in #DEFAULT_PROFILE_DIR# directory by default.
|
||||
.P
|
||||
The profiles are stored in \fI#DEFAULT_PROFILE_DIR#\fP directory by default.
|
||||
This location can be changed by using the \fBconfig/profile_dir\fP setting.
|
||||
Each profile configuration is stored in \fBProfileName.profile\fP file
|
||||
in the profile directory. When referencing the profile, the \fB.profile\fP
|
||||
suffix is left out.
|
||||
|
||||
.
|
||||
.TP
|
||||
.B tag config
|
||||
.br
|
||||
See \fBtags\fP configuration setting description below.
|
||||
|
||||
.LP
|
||||
.P
|
||||
When several configuration methods are used at the same time
|
||||
and when LVM looks for the value of a particular setting, it traverses
|
||||
this \fBconfig cascade\fP from left to right:
|
||||
|
||||
\fBdirect config override on command line\fP -> \fBcommand profile config\fP -> \fBmetadata profile config\fP -> \fBtag config\fP -> \fBlvmlocal.conf\fB -> \fBlvm.conf\fP
|
||||
|
||||
.P
|
||||
\fBdirect config override on command line\fP ->
|
||||
\fBcommand profile config\fP ->
|
||||
\fBmetadata profile config\fP ->
|
||||
\fBtag config\fP ->
|
||||
\fBlvmlocal.conf\fP ->
|
||||
\fBlvm.conf\fP
|
||||
.P
|
||||
No part of this cascade is compulsory. If there's no setting value found at
|
||||
the end of the cascade, a default value is used for that setting.
|
||||
Use \fBlvmconfig\fP to check what settings are in use and what
|
||||
the default values are.
|
||||
.
|
||||
.SH SYNTAX
|
||||
.LP
|
||||
.
|
||||
This section describes the configuration file syntax.
|
||||
.LP
|
||||
Whitespace is not significant unless it is within quotes.
|
||||
@ -109,15 +121,12 @@ They are treated as whitespace.
|
||||
Here is an informal grammar:
|
||||
.TP
|
||||
.BR file " = " value *
|
||||
.br
|
||||
A configuration file consists of a set of values.
|
||||
.TP
|
||||
.BR value " = " section " | " assignment
|
||||
.br
|
||||
A value can either be a new section, or an assignment.
|
||||
.TP
|
||||
.BR section " = " identifier " '" { "' " value "* '" } '
|
||||
.br
|
||||
A section groups associated values together. If the same section is
|
||||
encountered multiple times, the contents of all instances are concatenated
|
||||
together in the order of appearance.
|
||||
@ -142,60 +151,58 @@ e.g. \fBlevel = 7\fP
|
||||
.br
|
||||
.TP
|
||||
.BR array " = '" [ "' ( " type " '" , "')* " type " '" ] "' | '" [ "' '" ] '
|
||||
.br
|
||||
Inhomogeneous arrays are supported.
|
||||
.br
|
||||
Elements must be separated by commas.
|
||||
.br
|
||||
An empty array is acceptable.
|
||||
.TP
|
||||
.BR type " = " integer " | " float " | " string
|
||||
.BR integer " = [0-9]*"
|
||||
.BR type " = " integer | float | string
|
||||
.BR integer " = [" 0 - 9 "]*"
|
||||
.br
|
||||
.BR float " = [0-9]*'" . '[0-9]*
|
||||
.BR float " = [" 0 - 9 "]*'" . "'[" 0 - 9 ]*
|
||||
.br
|
||||
.B string \fR= '\fB"\fR'.*'\fB"\fR'
|
||||
.BR string " = '" \(dq "' .* '" \(dq '
|
||||
.IP
|
||||
Strings with spaces must be enclosed in double quotes, single words that start
|
||||
with a letter can be left unquoted.
|
||||
|
||||
.
|
||||
.SH SETTINGS
|
||||
|
||||
.
|
||||
The
|
||||
.B lvmconfig
|
||||
command prints the LVM configuration settings in various ways.
|
||||
See the man page
|
||||
.BR lvmconfig (8).
|
||||
|
||||
.P
|
||||
Command to print a list of all possible config settings, with their
|
||||
default values:
|
||||
.br
|
||||
.B lvmconfig --type default
|
||||
|
||||
.P
|
||||
Command to print a list of all possible config settings, with their
|
||||
default values, and a full description of each as a comment:
|
||||
.br
|
||||
.B lvmconfig --type default --withcomments
|
||||
|
||||
.P
|
||||
Command to print a list of all possible config settings, with their
|
||||
current values (configured, non-default values are shown):
|
||||
.br
|
||||
.B lvmconfig --type current
|
||||
|
||||
.P
|
||||
Command to print all config settings that have been configured with a
|
||||
different value than the default (configured, non-default values are
|
||||
shown):
|
||||
.br
|
||||
.B lvmconfig --type diff
|
||||
|
||||
.P
|
||||
Command to print a single config setting, with its default value,
|
||||
and a full description, where "Section" refers to the config section,
|
||||
e.g. global, and "Setting" refers to the name of the specific setting,
|
||||
e.g. umask:
|
||||
.br
|
||||
.B lvmconfig --type default --withcomments Section/Setting
|
||||
|
||||
|
||||
.
|
||||
.SH FILES
|
||||
.I #DEFAULT_SYS_DIR#/lvm.conf
|
||||
.br
|
||||
@ -210,8 +217,8 @@ e.g. umask:
|
||||
.I #DEFAULT_LOCK_DIR#
|
||||
.br
|
||||
.I #DEFAULT_PROFILE_DIR#
|
||||
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.BR lvm (8)
|
||||
.
|
||||
.BR lvm (8),
|
||||
.BR lvmconfig (8)
|
||||
|
||||
|
@ -1,49 +1,58 @@
|
||||
.TH "LVM2-ACTIVATION-GENERATOR" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
|
||||
.
|
||||
.SH "NAME"
|
||||
.
|
||||
lvm2-activation-generator - generator for systemd units to activate LVM volumes on boot
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
.
|
||||
.B #SYSTEMD_GENERATOR_DIR#/lvm2-activation-generator
|
||||
.sp
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
|
||||
.
|
||||
The lvm2-activation-generator is called by \fBsystemd\fP(1) on boot to
|
||||
generate systemd units at runtime to activate LVM Logical Volumes (LVs)
|
||||
when global/event_activation=0 is set in \fBlvm.conf\fP(5). These units use
|
||||
\fBvgchange -aay\fP to activate LVs.
|
||||
|
||||
.P
|
||||
If event_activation=1, the lvm2-activation-generator exits immediately without
|
||||
generating any systemd units, and LVM fully relies on event-based
|
||||
activation to activate LVs. In this case, event-generated \fBpvscan
|
||||
--cache -aay\fP commands activate LVs.
|
||||
|
||||
activation to activate LVs. In this case, event-generated
|
||||
.B pvscan --cache -aay
|
||||
commands activate LVs.
|
||||
.P
|
||||
These systemd units are generated by lvm2-activation-generator:
|
||||
.sp
|
||||
\fIlvm2-activation-early.service\fP
|
||||
.P
|
||||
.I lvm2-activation-early.service
|
||||
is run before systemd's special \fBcryptsetup.target\fP to activate
|
||||
LVs that are not layered on top of encrypted devices.
|
||||
|
||||
\fIlvm2-activation.service\fP
|
||||
.P
|
||||
.I lvm2-activation.service
|
||||
is run after systemd's special \fBcryptsetup.target\fP to activate
|
||||
LVs that are layered on top of encrypted devices.
|
||||
|
||||
\fIlvm2-activation-net.service\fP
|
||||
.P
|
||||
.I lvm2-activation-net.service
|
||||
is run after systemd's special \fBremote-fs-pre.target\fP to activate
|
||||
LVs that are layered on attached remote devices.
|
||||
|
||||
.P
|
||||
Note that all the underlying LVM devices (Physical Volumes) need to be
|
||||
present when the service is run. If the there are any devices that appear
|
||||
to the system later, LVs using these devices need to be activated directly
|
||||
by \fBlvchange\fP(8) or \fBvgchange\fP(8).
|
||||
|
||||
.P
|
||||
The lvm2-activation-generator implements the \fBGenerators Specification\fP
|
||||
as referenced in \fBsystemd\fP(1).
|
||||
.sp
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.BR lvm.conf (5)
|
||||
.BR vgchange (8)
|
||||
.BR lvchange (8)
|
||||
.BR pvscan (8)
|
||||
.nh
|
||||
.ad l
|
||||
.BR lvm.conf (5),
|
||||
.BR vgchange (8),
|
||||
.BR lvchange (8),
|
||||
.BR pvscan (8),
|
||||
.P
|
||||
.BR systemd (1),
|
||||
.BR systemd.target (5),
|
||||
.BR systemd.special (7),
|
||||
.P
|
||||
.BR udev (7)
|
||||
.BR systemd (1)
|
||||
.BR systemd.target (5)
|
||||
.BR systemd.special (7)
|
||||
|
@ -1,14 +1,16 @@
|
||||
.TH "LVMCACHE" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
lvmcache \(em LVM caching
|
||||
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
|
||||
.
|
||||
\fBlvm\fP(8) includes two kinds of caching that can be used to improve the
|
||||
performance of a Logical Volume (LV). When caching, varying subsets of an
|
||||
LV's data are temporarily stored on a smaller, faster device (e.g. an SSD)
|
||||
to improve the performance of the LV.
|
||||
|
||||
.P
|
||||
To do this with lvm, a new special LV is first created from the faster
|
||||
device. This LV will hold the cache. Then, the new fast LV is attached to
|
||||
the main LV by way of an lvconvert command. lvconvert inserts one of the
|
||||
@ -17,164 +19,162 @@ mapper target combines the main LV and fast LV into a hybrid device that looks
|
||||
like the main LV, but has better performance. While the main LV is being
|
||||
used, portions of its data will be temporarily and transparently stored on
|
||||
the special fast LV.
|
||||
|
||||
.P
|
||||
The two kinds of caching are:
|
||||
|
||||
.P
|
||||
.IP \[bu] 2
|
||||
A read and write hot-spot cache, using the dm-cache kernel module.
|
||||
This cache tracks access patterns and adjusts its content deliberately so
|
||||
that commonly used parts of the main LV are likely to be found on the fast
|
||||
storage. LVM refers to this using the LV type \fBcache\fP.
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.IP \[bu]
|
||||
A write cache, using the dm-writecache kernel module. This cache can be
|
||||
used with SSD or PMEM devices to speed up all writes to the main LV. Data
|
||||
read from the main LV is not stored in the cache, only newly written data.
|
||||
LVM refers to this using the LV type \fBwritecache\fP.
|
||||
|
||||
.
|
||||
.SH USAGE
|
||||
|
||||
.B 1. Identify main LV that needs caching
|
||||
|
||||
.
|
||||
.SS 1. Identify main LV that needs caching
|
||||
.
|
||||
The main LV may already exist, and is located on larger, slower devices.
|
||||
A main LV would be created with a command like:
|
||||
|
||||
.nf
|
||||
$ lvcreate -n main -L Size vg /dev/slow_hhd
|
||||
.fi
|
||||
|
||||
.B 2. Identify fast LV to use as the cache
|
||||
|
||||
.P
|
||||
# lvcreate -n main -L Size vg /dev/slow_hhd
|
||||
.
|
||||
.SS 2. Identify fast LV to use as the cache
|
||||
.
|
||||
A fast LV is created using one or more fast devices, like an SSD. This
|
||||
special LV will be used to hold the cache:
|
||||
|
||||
.nf
|
||||
$ lvcreate -n fast -L Size vg /dev/fast_ssd
|
||||
|
||||
$ lvs -a
|
||||
.P
|
||||
# lvcreate -n fast -L Size vg /dev/fast_ssd
|
||||
.P
|
||||
# lvs -a
|
||||
LV Attr Type Devices
|
||||
fast -wi------- linear /dev/fast_ssd
|
||||
main -wi------- linear /dev/slow_hhd
|
||||
.fi
|
||||
|
||||
.B 3. Start caching the main LV
|
||||
|
||||
.
|
||||
.SS 3. Start caching the main LV
|
||||
.
|
||||
To start caching the main LV, convert the main LV to the desired caching
|
||||
type, and specify the fast LV to use as the cache:
|
||||
|
||||
.nf
|
||||
.P
|
||||
using dm-cache (with cachepool):
|
||||
|
||||
$ lvconvert --type cache --cachepool fast vg/main
|
||||
|
||||
.P
|
||||
# lvconvert --type cache --cachepool fast vg/main
|
||||
.P
|
||||
using dm-cache (with cachevol):
|
||||
|
||||
$ lvconvert --type cache --cachevol fast vg/main
|
||||
|
||||
.P
|
||||
# lvconvert --type cache --cachevol fast vg/main
|
||||
.P
|
||||
using dm-writecache (with cachevol):
|
||||
|
||||
$ lvconvert --type writecache --cachevol fast vg/main
|
||||
|
||||
.P
|
||||
# lvconvert --type writecache --cachevol fast vg/main
|
||||
.P
|
||||
For more alteratives see:
|
||||
.br
|
||||
dm-cache command shortcut
|
||||
.br
|
||||
dm-cache with separate data and metadata LVs
|
||||
.fi
|
||||
|
||||
.B 4. Display LVs
|
||||
|
||||
.
|
||||
.SS 4. Display LVs
|
||||
.
|
||||
Once the fast LV has been attached to the main LV, lvm reports the main LV
|
||||
type as either \fBcache\fP or \fBwritecache\fP depending on the type used.
|
||||
While attached, the fast LV is hidden, and renamed with a _cvol or _cpool
|
||||
suffix. It is displayed by lvs -a. The _corig or _wcorig LV represents
|
||||
the original LV without the cache.
|
||||
|
||||
.nf
|
||||
.sp
|
||||
using dm-cache (with cachepool):
|
||||
|
||||
$ lvs -ao+devices
|
||||
.P
|
||||
# lvs -ao+devices
|
||||
.nf
|
||||
LV Pool Type Devices
|
||||
main [fast_cpool] cache main_corig(0)
|
||||
[fast_cpool] cache-pool fast_pool_cdata(0)
|
||||
[fast_cpool_cdata] linear /dev/fast_ssd
|
||||
[fast_cpool_cmeta] linear /dev/fast_ssd
|
||||
[main_corig] linear /dev/slow_hhd
|
||||
|
||||
.fi
|
||||
.sp
|
||||
using dm-cache (with cachevol):
|
||||
|
||||
$ lvs -ao+devices
|
||||
.P
|
||||
# lvs -ao+devices
|
||||
.P
|
||||
.nf
|
||||
LV Pool Type Devices
|
||||
main [fast_cvol] cache main_corig(0)
|
||||
[fast_cvol] linear /dev/fast_ssd
|
||||
[main_corig] linear /dev/slow_hhd
|
||||
|
||||
.fi
|
||||
.sp
|
||||
using dm-writecache (with cachevol):
|
||||
|
||||
$ lvs -ao+devices
|
||||
.P
|
||||
# lvs -ao+devices
|
||||
.P
|
||||
.nf
|
||||
LV Pool Type Devices
|
||||
main [fast_cvol] writecache main_wcorig(0)
|
||||
[fast_cvol] linear /dev/fast_ssd
|
||||
[main_wcorig] linear /dev/slow_hhd
|
||||
.fi
|
||||
|
||||
.B 5. Use the main LV
|
||||
|
||||
.
|
||||
.SS 5. Use the main LV
|
||||
.
|
||||
Use the LV until the cache is no longer wanted, or needs to be changed.
|
||||
|
||||
.B 6. Stop caching
|
||||
|
||||
.
|
||||
.SS 6. Stop caching
|
||||
.
|
||||
To stop caching the main LV and also remove unneeded cache pool,
|
||||
use the --uncache:
|
||||
|
||||
.P
|
||||
# lvconvert --uncache vg/main
|
||||
.P
|
||||
# lvs -a
|
||||
.nf
|
||||
$ lvconvert --uncache vg/main
|
||||
|
||||
$ lvs -a
|
||||
LV VG Attr Type Devices
|
||||
main vg -wi------- linear /dev/slow_hhd
|
||||
|
||||
.fi
|
||||
.P
|
||||
To stop caching the main LV, separate the fast LV from the main LV. This
|
||||
changes the type of the main LV back to what it was before the cache was
|
||||
attached.
|
||||
|
||||
.P
|
||||
# lvconvert --splitcache vg/main
|
||||
.P
|
||||
# lvs -a
|
||||
.nf
|
||||
$ lvconvert --splitcache vg/main
|
||||
|
||||
$ lvs -a
|
||||
LV VG Attr Type Devices
|
||||
fast vg -wi------- linear /dev/fast_ssd
|
||||
main vg -wi------- linear /dev/slow_hhd
|
||||
|
||||
.fi
|
||||
|
||||
.SS Create a new LV with caching.
|
||||
|
||||
.
|
||||
.SS 7. Create a new LV with caching
|
||||
.
|
||||
A new LV can be created with caching attached at the time of creation
|
||||
using the following command:
|
||||
|
||||
.P
|
||||
.nf
|
||||
$ lvcreate --type cache|writecache -n Name -L Size
|
||||
# lvcreate --type cache|writecache -n Name -L Size
|
||||
--cachedevice /dev/fast_ssd vg /dev/slow_hhd
|
||||
.fi
|
||||
|
||||
.P
|
||||
The main LV is created with the specified Name and Size from the slow_hhd.
|
||||
A hidden fast LV is created on the fast_ssd and is then attached to the
|
||||
new main LV. If the fast_ssd is unused, the entire disk will be used as
|
||||
the cache unless the --cachesize option is used to specify a size for the
|
||||
fast LV. The --cachedevice option can be repeated to use multiple disks
|
||||
for the fast LV.
|
||||
|
||||
.
|
||||
.SH OPTIONS
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
.SS option args
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
.B --cachepool
|
||||
.IR CachePoolLV | LV
|
||||
.br
|
||||
|
||||
.P
|
||||
Pass this option a cachepool LV or a standard LV. When using a cache
|
||||
pool, lvm places cache data and cache metadata on different LVs. The two
|
||||
LVs together are called a cache pool. This has a bit better performance
|
||||
@ -184,19 +184,17 @@ A cache pool is represented as a special type of LV
|
||||
that cannot be used directly. If a standard LV is passed with this
|
||||
option, lvm will first convert it to a cache pool by combining it with
|
||||
another LV to use for metadata. This option can be used with dm-cache.
|
||||
|
||||
.P
|
||||
.B --cachevol
|
||||
.I LV
|
||||
.br
|
||||
|
||||
.P
|
||||
Pass this option a fast LV that should be used to hold the cache. With a
|
||||
cachevol, cache data and metadata are stored in different parts of the
|
||||
same fast LV. This option can be used with dm-writecache or dm-cache.
|
||||
|
||||
.P
|
||||
.B --cachedevice
|
||||
.I PV
|
||||
.br
|
||||
|
||||
.P
|
||||
This option can be used in place of --cachevol, in which case a cachevol
|
||||
LV will be created using the specified device. This option can be
|
||||
repeated to create a cachevol using multiple devices, or a tag name can be
|
||||
@ -204,112 +202,96 @@ specified in which case the cachevol will be created using any of the
|
||||
devices with the given tag. If a named cache device is unused, the entire
|
||||
device will be used to create the cachevol. To create a cachevol of a
|
||||
specific size from the cache devices, include the --cachesize option.
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
.SS dm-cache block size
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
A cache pool will have a logical block size of 4096 bytes if it is created
|
||||
on a device with a logical block size of 4096 bytes.
|
||||
|
||||
.P
|
||||
If a main LV has logical block size 512 (with an existing xfs file system
|
||||
using that size), then it cannot use a cache pool with a 4096 logical
|
||||
block size. If the cache pool is attached, the main LV will likely fail
|
||||
to mount.
|
||||
|
||||
.P
|
||||
To avoid this problem, use a mkfs option to specify a 4096 block size for
|
||||
the file system, or attach the cache pool before running mkfs.
|
||||
|
||||
.
|
||||
.SS dm-writecache block size
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
The dm-writecache block size can be 4096 bytes (the default), or 512
|
||||
bytes. The default 4096 has better performance and should be used except
|
||||
when 512 is necessary for compatibility. The dm-writecache block size is
|
||||
specified with --cachesettings block_size=4096|512 when caching is started.
|
||||
|
||||
.P
|
||||
When a file system like xfs already exists on the main LV prior to
|
||||
caching, and the file system is using a block size of 512, then the
|
||||
writecache block size should be set to 512. (The file system will likely
|
||||
fail to mount if writecache block size of 4096 is used in this case.)
|
||||
|
||||
.P
|
||||
Check the xfs sector size while the fs is mounted:
|
||||
|
||||
.P
|
||||
# xfs_info /dev/vg/main
|
||||
.nf
|
||||
$ xfs_info /dev/vg/main
|
||||
Look for sectsz=512 or sectsz=4096
|
||||
.fi
|
||||
|
||||
.P
|
||||
The writecache block size should be chosen to match the xfs sectsz value.
|
||||
|
||||
.P
|
||||
It is also possible to specify a sector size of 4096 to mkfs.xfs when
|
||||
creating the file system. In this case the writecache block size of 4096
|
||||
can be used.
|
||||
|
||||
.
|
||||
.SS dm-writecache settings
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
Tunable parameters can be passed to the dm-writecache kernel module using
|
||||
the --cachesettings option when caching is started, e.g.
|
||||
|
||||
.P
|
||||
.nf
|
||||
$ lvconvert --type writecache --cachevol fast \\
|
||||
# lvconvert --type writecache --cachevol fast \\
|
||||
--cachesettings 'high_watermark=N writeback_jobs=N' vg/main
|
||||
.fi
|
||||
|
||||
.P
|
||||
Tunable options are:
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.TP
|
||||
high_watermark = <percent>
|
||||
|
||||
Start writeback when the writecache usage reaches this percent (0-100).
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.TP
|
||||
low_watermark = <percent>
|
||||
|
||||
Stop writeback when the writecache usage reaches this percent (0-100).
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.TP
|
||||
writeback_jobs = <count>
|
||||
|
||||
Limit the number of blocks that are in flight during writeback. Setting
|
||||
this value reduces writeback throughput, but it may improve latency of
|
||||
read requests.
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.TP
|
||||
autocommit_blocks = <count>
|
||||
|
||||
When the application writes this amount of blocks without issuing the
|
||||
FLUSH request, the blocks are automatically commited.
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.TP
|
||||
autocommit_time = <milliseconds>
|
||||
|
||||
The data is automatically commited if this time passes and no FLUSH
|
||||
request is received.
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.TP
|
||||
fua = 0|1
|
||||
|
||||
Use the FUA flag when writing data from persistent memory back to the
|
||||
underlying device.
|
||||
Applicable only to persistent memory.
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.TP
|
||||
nofua = 0|1
|
||||
|
||||
Don't use the FUA flag when writing back data and send the FLUSH request
|
||||
afterwards. Some underlying devices perform better with fua, some with
|
||||
nofua. Testing is necessary to determine which.
|
||||
Applicable only to persistent memory.
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.TP
|
||||
cleaner = 0|1
|
||||
|
||||
Setting cleaner=1 enables the writecache cleaner mode in which data is
|
||||
gradually flushed from the cache. If this is done prior to detaching the
|
||||
writecache, then the splitcache command will have little or no flushing to
|
||||
@ -317,99 +299,88 @@ perform. If not done beforehand, the splitcache command enables the
|
||||
cleaner mode and waits for flushing to complete before detaching the
|
||||
writecache. Adding cleaner=0 to the splitcache command will skip the
|
||||
cleaner mode, and any required flushing is performed in device suspend.
|
||||
|
||||
.
|
||||
.SS dm-cache with separate data and metadata LVs
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
Preferred way of using dm-cache is to place the cache metadata and cache data
|
||||
on separate LVs. To do this, a "cache pool" is created, which is a special
|
||||
LV that references two sub LVs, one for data and one for metadata.
|
||||
|
||||
.P
|
||||
To create a cache pool of given data size and let lvm2 calculate appropriate
|
||||
metadata size:
|
||||
|
||||
.nf
|
||||
$ lvcreate --type cache-pool -L DataSize -n fast vg /dev/fast_ssd1
|
||||
.fi
|
||||
|
||||
.P
|
||||
# lvcreate --type cache-pool -L DataSize -n fast vg /dev/fast_ssd1
|
||||
.P
|
||||
To create a cache pool from separate LV and let lvm2 calculate
|
||||
appropriate cache metadata size:
|
||||
|
||||
.nf
|
||||
$ lvcreate -n fast -L DataSize vg /dev/fast_ssd1
|
||||
$ lvconvert --type cache-pool vg/fast /dev/fast_ssd1
|
||||
.fi
|
||||
|
||||
.P
|
||||
# lvcreate -n fast -L DataSize vg /dev/fast_ssd1
|
||||
.br
|
||||
# lvconvert --type cache-pool vg/fast /dev/fast_ssd1
|
||||
.br
|
||||
.P
|
||||
To create a cache pool from two separate LVs:
|
||||
|
||||
.nf
|
||||
$ lvcreate -n fast -L DataSize vg /dev/fast_ssd1
|
||||
$ lvcreate -n fastmeta -L MetadataSize vg /dev/fast_ssd2
|
||||
$ lvconvert --type cache-pool --poolmetadata fastmeta vg/fast
|
||||
.fi
|
||||
|
||||
.P
|
||||
# lvcreate -n fast -L DataSize vg /dev/fast_ssd1
|
||||
.br
|
||||
# lvcreate -n fastmeta -L MetadataSize vg /dev/fast_ssd2
|
||||
.br
|
||||
# lvconvert --type cache-pool --poolmetadata fastmeta vg/fast
|
||||
.P
|
||||
Then use the cache pool LV to start caching the main LV:
|
||||
|
||||
.nf
|
||||
$ lvconvert --type cache --cachepool fast vg/main
|
||||
.fi
|
||||
|
||||
.P
|
||||
# lvconvert --type cache --cachepool fast vg/main
|
||||
.P
|
||||
A variation of the same procedure automatically creates a cache pool when
|
||||
caching is started. To do this, use a standard LV as the --cachepool
|
||||
(this will hold cache data), and use another standard LV as the
|
||||
--poolmetadata (this will hold cache metadata). LVM will create a
|
||||
cache pool LV from the two specified LVs, and use the cache pool to start
|
||||
caching the main LV.
|
||||
|
||||
.P
|
||||
.nf
|
||||
$ lvcreate -n fast -L DataSize vg /dev/fast_ssd1
|
||||
$ lvcreate -n fastmeta -L MetadataSize vg /dev/fast_ssd2
|
||||
$ lvconvert --type cache --cachepool fast --poolmetadata fastmeta vg/main
|
||||
# lvcreate -n fast -L DataSize vg /dev/fast_ssd1
|
||||
# lvcreate -n fastmeta -L MetadataSize vg /dev/fast_ssd2
|
||||
# lvconvert --type cache --cachepool fast --poolmetadata fastmeta vg/main
|
||||
.fi
|
||||
|
||||
.
|
||||
.SS dm-cache cache modes
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
The default dm-cache cache mode is "writethrough". Writethrough ensures
|
||||
that any data written will be stored both in the cache and on the origin
|
||||
LV. The loss of a device associated with the cache in this case would not
|
||||
mean the loss of any data.
|
||||
|
||||
.P
|
||||
A second cache mode is "writeback". Writeback delays writing data blocks
|
||||
from the cache back to the origin LV. This mode will increase
|
||||
performance, but the loss of a cache device can result in lost data.
|
||||
|
||||
.P
|
||||
With the --cachemode option, the cache mode can be set when caching is
|
||||
started, or changed on an LV that is already cached. The current cache
|
||||
mode can be displayed with the cache_mode reporting option:
|
||||
|
||||
.P
|
||||
.B lvs -o+cache_mode VG/LV
|
||||
|
||||
.P
|
||||
.BR lvm.conf (5)
|
||||
.B allocation/cache_mode
|
||||
.br
|
||||
defines the default cache mode.
|
||||
|
||||
.P
|
||||
.nf
|
||||
$ lvconvert --type cache --cachemode writethrough \\
|
||||
# lvconvert --type cache --cachemode writethrough \\
|
||||
--cachepool fast vg/main
|
||||
|
||||
|
||||
$ lvconvert --type cache --cachemode writethrough \\
|
||||
.P
|
||||
# lvconvert --type cache --cachemode writethrough \\
|
||||
--cachevol fast vg/main
|
||||
.nf
|
||||
|
||||
.
|
||||
.SS dm-cache chunk size
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
The size of data blocks managed by dm-cache can be specified with the
|
||||
--chunksize option when caching is started. The default unit is KiB. The
|
||||
value must be a multiple of 32KiB between 32KiB and 1GiB. Cache chunks
|
||||
bigger then 512KiB shall be only used when necessary.
|
||||
|
||||
.P
|
||||
Using a chunk size that is too large can result in wasteful use of the
|
||||
cache, in which small reads and writes cause large sections of an LV to be
|
||||
stored in the cache. It can also require increasing migration threshold
|
||||
@ -420,100 +391,90 @@ cache origin LV. However, choosing a chunk size that is too small
|
||||
can result in more overhead trying to manage the numerous chunks that
|
||||
become mapped into the cache. Overhead can include both excessive CPU
|
||||
time searching for chunks, and excessive memory tracking chunks.
|
||||
|
||||
.P
|
||||
Command to display the chunk size:
|
||||
.br
|
||||
.P
|
||||
.B lvs -o+chunksize VG/LV
|
||||
|
||||
.P
|
||||
.BR lvm.conf (5)
|
||||
.B cache_pool_chunk_size
|
||||
.br
|
||||
.P
|
||||
controls the default chunk size.
|
||||
|
||||
.P
|
||||
The default value is shown by:
|
||||
.br
|
||||
.P
|
||||
.B lvmconfig --type default allocation/cache_pool_chunk_size
|
||||
|
||||
.P
|
||||
Checking migration threshold (in sectors) of running cached LV:
|
||||
.br
|
||||
.B lvs -o+kernel_cache_settings VG/LV
|
||||
|
||||
|
||||
.
|
||||
.SS dm-cache migration threshold
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
Migrating data between the origin and cache LV uses bandwidth.
|
||||
The user can set a throttle to prevent more than a certain amount of
|
||||
migration occurring at any one time. Currently dm-cache is not taking any
|
||||
account of normal io traffic going to the devices.
|
||||
|
||||
.P
|
||||
User can set migration threshold via cache policy settings as
|
||||
"migration_threshold=<#sectors>" to set the maximum number
|
||||
of sectors being migrated, the default being 2048 sectors (1MiB).
|
||||
|
||||
.P
|
||||
Command to set migration threshold to 2MiB (4096 sectors):
|
||||
.br
|
||||
.P
|
||||
.B lvcreate --cachepolicy 'migration_threshold=4096' VG/LV
|
||||
|
||||
|
||||
.P
|
||||
Command to display the migration threshold:
|
||||
.br
|
||||
.P
|
||||
.B lvs -o+kernel_cache_settings,cache_settings VG/LV
|
||||
.br
|
||||
.B lvs -o+chunksize VG/LV
|
||||
|
||||
|
||||
.
|
||||
.SS dm-cache cache policy
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
The dm-cache subsystem has additional per-LV parameters: the cache policy
|
||||
to use, and possibly tunable parameters for the cache policy. Three
|
||||
policies are currently available: "smq" is the default policy, "mq" is an
|
||||
older implementation, and "cleaner" is used to force the cache to write
|
||||
back (flush) all cached writes to the origin LV.
|
||||
|
||||
.P
|
||||
The older "mq" policy has a number of tunable parameters. The defaults are
|
||||
chosen to be suitable for the majority of systems, but in special
|
||||
circumstances, changing the settings can improve performance.
|
||||
|
||||
.P
|
||||
With the --cachepolicy and --cachesettings options, the cache policy and
|
||||
settings can be set when caching is started, or changed on an existing
|
||||
cached LV (both options can be used together). The current cache policy
|
||||
and settings can be displayed with the cache_policy and cache_settings
|
||||
reporting options:
|
||||
|
||||
.P
|
||||
.B lvs -o+cache_policy,cache_settings VG/LV
|
||||
|
||||
.nf
|
||||
.P
|
||||
Change the cache policy and settings of an existing LV.
|
||||
|
||||
$ lvchange --cachepolicy mq --cachesettings \\
|
||||
.nf
|
||||
# lvchange --cachepolicy mq --cachesettings \\
|
||||
\(aqmigration_threshold=2048 random_threshold=4\(aq vg/main
|
||||
.fi
|
||||
|
||||
.P
|
||||
.BR lvm.conf (5)
|
||||
.B allocation/cache_policy
|
||||
.br
|
||||
defines the default cache policy.
|
||||
|
||||
.P
|
||||
.BR lvm.conf (5)
|
||||
.B allocation/cache_settings
|
||||
.br
|
||||
defines the default cache settings.
|
||||
|
||||
.
|
||||
.SS dm-cache using metadata profiles
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
Cache pools allows to set a variety of options. Lots of these settings
|
||||
can be specified in lvm.conf or profile settings. You can prepare
|
||||
a number of different profiles in the #DEFAULT_SYS_DIR#/profile directory
|
||||
and just specify the metadata profile file name when caching LV or creating cache-pool.
|
||||
Check the output of \fBlvmconfig --type default --withcomments\fP
|
||||
for a detailed description of all individual cache settings.
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# cat <<EOF > #DEFAULT_SYS_DIR#/profile/cache_big_chunk.profile
|
||||
@ -531,80 +492,74 @@ allocation {
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
.P
|
||||
# lvcreate --cache -L10G --metadataprofile cache_big_chunk vg/main /dev/fast_ssd
|
||||
# lvcreate --cache -L10G --config 'allocation/cache_pool_chunk_size=512' vg/main /dev/fast_ssd
|
||||
.fi
|
||||
|
||||
.
|
||||
.SS dm-cache spare metadata LV
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
See
|
||||
.BR lvmthin (7)
|
||||
for a description of the "pool metadata spare" LV.
|
||||
The same concept is used for cache pools.
|
||||
|
||||
.
|
||||
.SS dm-cache metadata formats
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
There are two disk formats for dm-cache metadata. The metadata format can
|
||||
be specified with --cachemetadataformat when caching is started, and
|
||||
cannot be changed. Format \fB2\fP has better performance; it is more
|
||||
compact, and stores dirty bits in a separate btree, which improves the
|
||||
speed of shutting down the cache. With \fBauto\fP, lvm selects the best
|
||||
option provided by the current dm-cache kernel module.
|
||||
|
||||
.
|
||||
.SS RAID1 cache device
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
RAID1 can be used to create the fast LV holding the cache so that it can
|
||||
tolerate a device failure. (When using dm-cache with separate data
|
||||
and metadata LVs, each of the sub-LVs can use RAID1.)
|
||||
|
||||
.P
|
||||
.nf
|
||||
$ lvcreate -n main -L Size vg /dev/slow
|
||||
$ lvcreate --type raid1 -m 1 -n fast -L Size vg /dev/ssd1 /dev/ssd2
|
||||
$ lvconvert --type cache --cachevol fast vg/main
|
||||
# lvcreate -n main -L Size vg /dev/slow
|
||||
# lvcreate --type raid1 -m 1 -n fast -L Size vg /dev/ssd1 /dev/ssd2
|
||||
# lvconvert --type cache --cachevol fast vg/main
|
||||
.fi
|
||||
|
||||
.
|
||||
.SS dm-cache command shortcut
|
||||
|
||||
\&
|
||||
|
||||
.
|
||||
A single command can be used to cache main LV with automatic
|
||||
creation of a cache-pool:
|
||||
|
||||
.P
|
||||
.nf
|
||||
$ lvcreate --cache --size CacheDataSize VG/LV [FastPVs]
|
||||
# lvcreate --cache --size CacheDataSize VG/LV [FastPVs]
|
||||
.fi
|
||||
|
||||
.P
|
||||
or the longer variant
|
||||
|
||||
.P
|
||||
.nf
|
||||
$ lvcreate --type cache --size CacheDataSize \\
|
||||
# lvcreate --type cache --size CacheDataSize \\
|
||||
--name NameCachePool VG/LV [FastPVs]
|
||||
.fi
|
||||
|
||||
.P
|
||||
In this command, the specified LV already exists, and is the main LV to be
|
||||
cached. The command creates a new cache pool with size and given name
|
||||
or the name is automatically selected from a sequence lvolX_cpool,
|
||||
using the optionally specified fast PV(s) (typically an ssd). Then it
|
||||
attaches the new cache pool to the existing main LV to begin caching.
|
||||
|
||||
.P
|
||||
(Note: ensure that the specified main LV is a standard LV. If a cache
|
||||
pool LV is mistakenly specified, then the command does something
|
||||
different.)
|
||||
|
||||
.P
|
||||
(Note: the type option is interpreted differently by this command than by
|
||||
normal lvcreate commands in which --type specifies the type of the newly
|
||||
created LV. In this case, an LV with type cache-pool is being created,
|
||||
and the existing main LV is being converted to type cache.)
|
||||
|
||||
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.nh
|
||||
.ad l
|
||||
.BR lvm.conf (5),
|
||||
.BR lvchange (8),
|
||||
.BR lvcreate (8),
|
||||
@ -614,7 +569,12 @@ and the existing main LV is being converted to type cache.)
|
||||
.BR lvrename (8),
|
||||
.BR lvresize (8),
|
||||
.BR lvs (8),
|
||||
.br
|
||||
.BR vgchange (8),
|
||||
.BR vgmerge (8),
|
||||
.BR vgreduce (8),
|
||||
.BR vgsplit (8)
|
||||
.BR vgsplit (8),
|
||||
.P
|
||||
.BR cache_dump (8),
|
||||
.BR cache_check (8),
|
||||
.BR cache_repair (8)
|
||||
|
@ -8,8 +8,8 @@ lvmdbusd \(em LVM D-Bus daemon
|
||||
.
|
||||
.ad l
|
||||
.B lvmdbusd
|
||||
.RB [ --debug \]
|
||||
.RB [ --udev \]
|
||||
.RB [ --debug ]
|
||||
.RB [ --udev ]
|
||||
.ad b
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
@ -21,18 +21,15 @@ as root.
|
||||
.
|
||||
.SH OPTIONS
|
||||
.
|
||||
.HP
|
||||
.BR --debug
|
||||
.br
|
||||
.TP 8
|
||||
.B --debug
|
||||
Enable debug statements
|
||||
.
|
||||
.HP
|
||||
.BR --udev
|
||||
.br
|
||||
.TP
|
||||
.B --udev
|
||||
Use udev events to trigger updates
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.nh
|
||||
.BR dbus-send (1),
|
||||
.BR lvm (8)
|
||||
|
@ -1,7 +1,11 @@
|
||||
.TH LVMDUMP 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
lvmdump \(em create lvm2 information dumps for diagnostic purposes
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
.
|
||||
.B lvmdump
|
||||
.RB [ -a ]
|
||||
.RB [ -c ]
|
||||
@ -13,39 +17,47 @@ lvmdump \(em create lvm2 information dumps for diagnostic purposes
|
||||
.RB [ -p ]
|
||||
.RB [ -s ]
|
||||
.RB [ -u ]
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
lvmdump is a tool to dump various information concerning LVM2.
|
||||
By default, it creates a tarball suitable for submission along
|
||||
with a problem report.
|
||||
.PP
|
||||
.P
|
||||
The content of the tarball is as follows:
|
||||
.br
|
||||
- dmsetup info
|
||||
.br
|
||||
- table of currently running processes
|
||||
.br
|
||||
- recent entries from /var/log/messages (containing system messages)
|
||||
.br
|
||||
- complete lvm configuration and cache (content of #DEFAULT_SYS_DIR#)
|
||||
.br
|
||||
- list of device nodes present under /dev
|
||||
.br
|
||||
- list of files present /sys/block
|
||||
.br
|
||||
- list of files present /sys/devices/virtual/block
|
||||
.br
|
||||
- if enabled with -m, metadata dump will be also included
|
||||
.br
|
||||
- if enabled with -a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included
|
||||
.br
|
||||
- if enabled with -l, lvmetad state if running
|
||||
.br
|
||||
- if enabled with -p, lvmpolld state if running
|
||||
.br
|
||||
- if enabled with -s, system info and context
|
||||
.br
|
||||
- if enabled with -u, udev info and context
|
||||
.ad l
|
||||
.PD 0
|
||||
.IP \[bu] 2
|
||||
dmsetup info
|
||||
.IP \[bu]
|
||||
table of currently running processes
|
||||
.IP \[bu]
|
||||
recent entries from /var/log/messages (containing system messages)
|
||||
.IP \[bu]
|
||||
complete lvm configuration and cache (content of #DEFAULT_SYS_DIR#)
|
||||
.IP \[bu]
|
||||
list of device nodes present under /dev
|
||||
.IP \[bu]
|
||||
list of files present /sys/block
|
||||
.IP \[bu]
|
||||
list of files present /sys/devices/virtual/block
|
||||
.IP \[bu]
|
||||
if enabled with -m, metadata dump will be also included
|
||||
.IP \[bu]
|
||||
if enabled with -a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included
|
||||
.IP \[bu]
|
||||
if enabled with -l, lvmetad state if running
|
||||
.IP \[bu]
|
||||
if enabled with -p, lvmpolld state if running
|
||||
.IP \[bu]
|
||||
if enabled with -s, system info and context
|
||||
.IP \[bu]
|
||||
if enabled with -u, udev info and context
|
||||
.PD
|
||||
.ad b
|
||||
.
|
||||
.SH OPTIONS
|
||||
.
|
||||
.TP
|
||||
.B -a
|
||||
Advanced collection.
|
||||
@ -92,16 +104,19 @@ Gather udev info and context: /etc/udev/udev.conf file, udev daemon version
|
||||
(content of /lib/udev/rules.d and /etc/udev/rules.d directory),
|
||||
list of files in /lib/udev directory and dump of current udev
|
||||
database content (the output of 'udevadm info --export-db' command).
|
||||
.
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.
|
||||
.TP
|
||||
\fBLVM_BINARY\fP
|
||||
.B LVM_BINARY
|
||||
The LVM2 binary to use.
|
||||
Defaults to "lvm".
|
||||
Sometimes you might need to set this to "#LVM_PATH#/lvm.static", for example.
|
||||
Sometimes you might need to set this to "#LVM_PATH#.static", for example.
|
||||
.TP
|
||||
\fBDMSETUP_BINARY\fP
|
||||
.B DMSETUP_BINARY
|
||||
The dmsetup binary to use.
|
||||
Defaults to "dmsetup".
|
||||
.PP
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.BR lvm (8)
|
||||
|
@ -1,69 +1,79 @@
|
||||
.TH "LVMLOCKCTL" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
|
||||
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
lvmlockctl \(em Control for lvmlockd
|
||||
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
.
|
||||
.BR lvmlockctl " [" \fIoptions ]
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
This command interacts with
|
||||
.BR lvmlockd (8).
|
||||
|
||||
.
|
||||
.SH OPTIONS
|
||||
|
||||
lvmlockctl [options]
|
||||
|
||||
.B --help | -h
|
||||
.
|
||||
.TP
|
||||
.BR -h | --help
|
||||
Show this help information.
|
||||
|
||||
.B --quit | -q
|
||||
.
|
||||
.TP
|
||||
.BR -q | --quit
|
||||
Tell lvmlockd to quit.
|
||||
|
||||
.B --info | -i
|
||||
.
|
||||
.TP
|
||||
.BR -i | --info
|
||||
Print lock state information from lvmlockd.
|
||||
|
||||
.B --dump | -d
|
||||
.
|
||||
.TP
|
||||
.BR -d | --dump
|
||||
Print log buffer from lvmlockd.
|
||||
|
||||
.B --wait | -w 0|1
|
||||
.
|
||||
.TP
|
||||
.BR -w | --wait\ 0 | 1
|
||||
Wait option for other commands.
|
||||
|
||||
.B --force | -f 0|1
|
||||
.
|
||||
.TP
|
||||
.BR -f | --force\ 0 | 1
|
||||
Force option for other commands.
|
||||
|
||||
.B --kill | -k
|
||||
.I vgname
|
||||
.
|
||||
.TP
|
||||
.BR -k | --kill " " \fIvgname
|
||||
Kill access to the VG when sanlock cannot renew lease.
|
||||
|
||||
.B --drop | -r
|
||||
.I vgname
|
||||
.
|
||||
.TP
|
||||
.BR -r | --drop " " \fIvgname
|
||||
Clear locks for the VG when it is unused after kill (-k).
|
||||
|
||||
.B --gl-enable | -E
|
||||
.I vgname
|
||||
.
|
||||
.TP
|
||||
.BR -E | --gl-enable " " \fIvgname
|
||||
Tell lvmlockd to enable the global lock in a sanlock VG.
|
||||
|
||||
.B --gl-disable | -D
|
||||
.I vgname
|
||||
.
|
||||
.TP
|
||||
.BR -D | --gl-disable " " \fIvgname
|
||||
Tell lvmlockd to disable the global lock in a sanlock VG.
|
||||
|
||||
.B --stop-lockspaces | -S
|
||||
.
|
||||
.TP
|
||||
.BR -S | --stop-lockspaces
|
||||
Stop all lockspaces.
|
||||
|
||||
|
||||
.
|
||||
.SH USAGE
|
||||
|
||||
.
|
||||
.SS info
|
||||
|
||||
.
|
||||
This collects and displays lock state from lvmlockd. The display is
|
||||
primitive, incomplete and will change in future version. To print the raw
|
||||
lock state from lvmlockd, combine this option with --dump|-d.
|
||||
|
||||
.
|
||||
.SS dump
|
||||
|
||||
.
|
||||
This collects the circular log buffer of debug statements from lvmlockd
|
||||
and prints it.
|
||||
|
||||
.
|
||||
.SS kill
|
||||
|
||||
.
|
||||
This is run by sanlock when it loses access to the storage holding leases
|
||||
for a VG. It runs the command specified in lvm.conf
|
||||
lvmlockctl_kill_command to deactivate LVs in the VG. If the specified
|
||||
@ -73,34 +83,37 @@ is specified, or the command fails, then the user must intervene
|
||||
to forcefully deactivate LVs in the VG, and if successful, run
|
||||
lvmlockctl --drop. For more, see
|
||||
.BR lvmlockd (8).
|
||||
|
||||
.
|
||||
.SS drop
|
||||
|
||||
.
|
||||
This should only be run after a VG has been successfully deactivated
|
||||
following an lvmlockctl --kill command. It clears the stale lockspace
|
||||
from lvmlockd. When lvmlockctl_kill_command is used, the --kill
|
||||
command may run drop automatically. For more, see
|
||||
.BR lvmlockd (8).
|
||||
|
||||
.
|
||||
.SS gl-enable
|
||||
|
||||
.
|
||||
This enables the global lock in a sanlock VG. This is necessary if the VG
|
||||
that previously held the global lock is removed. For more, see
|
||||
.BR lvmlockd (8).
|
||||
|
||||
.
|
||||
.SS gl-disable
|
||||
|
||||
.
|
||||
This disables the global lock in a sanlock VG. This is necessary if the
|
||||
global lock has mistakenly been enabled in more than one VG. The global
|
||||
lock should be disabled in all but one sanlock VG. For more, see
|
||||
.BR lvmlockd (8).
|
||||
|
||||
.
|
||||
.SS stop-lockspaces
|
||||
|
||||
.
|
||||
This tells lvmlockd to stop all lockspaces. It can be useful to stop
|
||||
lockspaces for VGs that the vgchange --lock-stop comand can no longer
|
||||
see, or to stop the dlm global lockspace which is not directly stopped by
|
||||
the vgchange command. The wait and force options can be used with this
|
||||
command.
|
||||
|
||||
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.BR lvm (8),
|
||||
.BR lvmlockd (8)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,16 @@
|
||||
.TH LVMPOLLD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
lvmpolld \(em LVM poll daemon
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
.
|
||||
.B lvmpolld
|
||||
.nh
|
||||
.ad l
|
||||
.RB [ -l | --log
|
||||
.RI { all | wire | debug }]
|
||||
.BR all | wire | debug ]
|
||||
.RB [ -p | --pidfile
|
||||
.IR pidfile_path ]
|
||||
.RB [ -s | --socket
|
||||
@ -16,75 +22,91 @@ lvmpolld \(em LVM poll daemon
|
||||
.RB [ -f | --foreground ]
|
||||
.RB [ -h | --help ]
|
||||
.RB [ -V | --version ]
|
||||
|
||||
.ad b
|
||||
.hy
|
||||
.P
|
||||
.B lvmpolld
|
||||
.RB [ --dump ]
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
lvmpolld is polling daemon for LVM. The daemon receives requests for polling
|
||||
of already initialised operations originating in LVM2 command line tool.
|
||||
The requests for polling originate in the \fBlvconvert\fP, \fBpvmove\fP,
|
||||
\fBlvchange\fP or \fBvgchange\fP LVM2 commands.
|
||||
|
||||
.P
|
||||
The purpose of lvmpolld is to reduce the number of spawned background processes
|
||||
per otherwise unique polling operation. There should be only one. It also
|
||||
eliminates the possibility of unsolicited termination of background process by
|
||||
external factors.
|
||||
|
||||
.P
|
||||
lvmpolld is used by LVM only if it is enabled in \fBlvm.conf\fP(5) by
|
||||
specifying the \fBglobal/use_lvmpolld\fP setting. If this is not defined in the
|
||||
LVM configuration explicitly then default setting is used instead (see the
|
||||
output of \fBlvmconfig --type default global/use_lvmpolld\fP command).
|
||||
.
|
||||
.SH OPTIONS
|
||||
|
||||
.
|
||||
To run the daemon in a test environment both the pidfile_path and the
|
||||
socket_path should be changed from the defaults.
|
||||
.
|
||||
.TP
|
||||
.BR -f ", " --foreground
|
||||
.BR -f | --foreground
|
||||
Don't fork, but run in the foreground.
|
||||
.TP
|
||||
.BR -h ", " --help
|
||||
.BR -h | --help
|
||||
Show help information.
|
||||
.
|
||||
.TP
|
||||
.IR \fB-l\fP ", " \fB--log\fP " {" all | wire | debug }
|
||||
.BR -l | --log " " all | wire | debug
|
||||
Select the type of log messages to generate.
|
||||
Messages are logged by syslog.
|
||||
Additionally, when -f is given they are also sent to standard error.
|
||||
There are two classes of messages: wire and debug. Selecting 'all' supplies both
|
||||
and is equivalent to a comma-separated list -l wire,debug.
|
||||
Additionally, when \fB-f\fP is given they are also sent to standard error.
|
||||
There are two classes of messages: wire and debug. Selecting '\fBall\fP' supplies both
|
||||
and is equivalent to a comma-separated list \fB-l wire,debug\fP.
|
||||
.
|
||||
.TP
|
||||
.BR -p ", " --pidfile " " \fIpidfile_path
|
||||
.BR -p | --pidfile " " \fIpidfile_path
|
||||
Path to the pidfile. This overrides both the built-in default
|
||||
(#DEFAULT_PID_DIR#/lvmpolld.pid) and the environment variable
|
||||
\fBLVM_LVMPOLLD_PIDFILE\fP. This file is used to prevent more
|
||||
than one instance of the daemon running simultaneously.
|
||||
.
|
||||
.TP
|
||||
.BR -s ", " --socket " " \fIsocket_path
|
||||
.BR -s | --socket " " \fIsocket_path
|
||||
Path to the socket file. This overrides both the built-in default
|
||||
(#DEFAULT_RUN_DIR#/lvmpolld.socket) and the environment variable
|
||||
\fBLVM_LVMPOLLD_SOCKET\fP.
|
||||
.
|
||||
.TP
|
||||
.BR -t ", " --timeout " " \fItimeout_value
|
||||
.BR -t | --timeout " " \fItimeout_value
|
||||
The daemon may shutdown after being idle for the given time (in seconds). When the
|
||||
option is omitted or the value given is zero the daemon never shutdowns on idle.
|
||||
.
|
||||
.TP
|
||||
.BR -B ", " --binary " " \fIlvm_binary_path
|
||||
.BR -B | --binary " " \fIlvm_binary_path
|
||||
Optional path to alternative LVM binary (default: #LVM_PATH#). Use for
|
||||
testing purposes only.
|
||||
.
|
||||
.TP
|
||||
.BR -V ", " --version
|
||||
.BR -V | --version
|
||||
Display the version of lvmpolld daemon.
|
||||
.TP
|
||||
.B --dump
|
||||
Contact the running lvmpolld daemon to obtain the complete state and print it
|
||||
out in a raw format.
|
||||
.
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
.
|
||||
.TP
|
||||
.B LVM_LVMPOLLD_PIDFILE
|
||||
Path for the pid file.
|
||||
.
|
||||
.TP
|
||||
.B LVM_LVMPOLLD_SOCKET
|
||||
Path for the socket file.
|
||||
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.BR lvm (8),
|
||||
.BR lvm.conf (5)
|
||||
|
@ -1,12 +1,20 @@
|
||||
.TH "LVMSADC" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
|
||||
.SH "NAME"
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
lvmsadc \(em LVM system activity data collector
|
||||
.SH "SYNOPSIS"
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
.
|
||||
.B lvmsadc
|
||||
.SH "DESCRIPTION"
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
lvmsadc is not supported under LVM2. The device-mapper statistics
|
||||
facility provides similar performance metrics using the \fBdmstats(8)\fP
|
||||
command.
|
||||
.SH "SEE ALSO"
|
||||
.BR dmstats (8)
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.BR dmstats (8),
|
||||
.BR lvm (8)
|
||||
|
@ -1,12 +1,20 @@
|
||||
.TH "LVMSAR" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
|
||||
.SH "NAME"
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
lvmsar \(em LVM system activity reporter
|
||||
.SH "SYNOPSIS"
|
||||
.
|
||||
.SH SYNOPSIS
|
||||
.
|
||||
.B lvmsar
|
||||
.SH "DESCRIPTION"
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
lvmsar is not supported under LVM2. The device-mapper statistics
|
||||
facility provides similar performance metrics using the \fBdmstats(8)\fP
|
||||
command.
|
||||
.SH "SEE ALSO"
|
||||
.BR dmstats (8)
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.BR dmstats (8),
|
||||
.BR lvm (8)
|
||||
|
@ -1,38 +1,39 @@
|
||||
.TH "LVMSYSTEMID" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
|
||||
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
lvmsystemid \(em LVM system ID
|
||||
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
|
||||
.
|
||||
The \fBlvm\fP(8) system ID restricts Volume Group (VG) access to one host.
|
||||
This is useful when a VG is placed on shared storage devices, or when
|
||||
local devices are visible to both host and guest operating systems. In
|
||||
cases like these, a VG can be visible to multiple hosts at once, and some
|
||||
mechanism is needed to protect it from being used by more than one host at
|
||||
a time.
|
||||
|
||||
.P
|
||||
A VG's system ID identifies one host as the VG owner. The host with a
|
||||
matching system ID can use the VG and its LVs, while LVM on other hosts
|
||||
will ignore it. This protects the VG from being accidentally used from
|
||||
other hosts.
|
||||
|
||||
.P
|
||||
The system ID is a string that uniquely identifies a host. It can be
|
||||
configured as a custom value, or it can be assigned automatically by LVM
|
||||
using some unique identifier already available on the host, e.g.
|
||||
machine-id or uname.
|
||||
|
||||
.P
|
||||
When a new VG is created, the system ID of the local host is recorded in
|
||||
the VG metadata. The creating host then owns the new VG, and LVM on other
|
||||
hosts will ignore it. When an existing, exported VG is imported
|
||||
(vgimport), the system ID of the local host is saved in the VG metadata,
|
||||
and the importing host owns the VG.
|
||||
|
||||
.P
|
||||
A VG without a system ID can be used by LVM on any host where the VG's
|
||||
devices are visible. When system IDs are not used, device filters should
|
||||
be configured on all hosts to exclude the VG's devices from all but one
|
||||
host.
|
||||
|
||||
.P
|
||||
A
|
||||
.B foreign VG
|
||||
is a VG seen by a host with an unmatching system ID, i.e. the system ID
|
||||
@ -40,195 +41,194 @@ in the VG metadata does not match the system ID configured on the host.
|
||||
If the host has no system ID, and the VG does, the VG is foreign and LVM
|
||||
will ignore it. If the VG has no system ID, access is unrestricted, and
|
||||
LVM can access it from any host, whether the host has a system ID or not.
|
||||
|
||||
.P
|
||||
Changes to a host's system ID and a VG's system ID can be made in limited
|
||||
circumstances (see vgexport and vgimport). Improper changes can result in
|
||||
a host losing access to its VG, or a VG being accidentally damaged by
|
||||
access from an unintended host. Even limited changes to the VG system ID
|
||||
may not be perfectly reflected across hosts. A more coherent view of
|
||||
shared storage requires an inter-host locking system to coordinate access.
|
||||
|
||||
.P
|
||||
Valid system ID characters are the same as valid VG name characters. If a
|
||||
system ID contains invalid characters, those characters are omitted and
|
||||
remaining characters are used. If a system ID is longer than the maximum
|
||||
name length, the characters up to the maximum length are used. The
|
||||
maximum length of a system ID is 128 characters.
|
||||
|
||||
.P
|
||||
Print the system ID of a VG to check if it is set:
|
||||
|
||||
.P
|
||||
.B vgs -o systemid
|
||||
.I VG
|
||||
|
||||
.P
|
||||
Print the system ID of the local host to check if it is configured:
|
||||
|
||||
.P
|
||||
.B lvm systemid
|
||||
|
||||
.
|
||||
.SS Limitations and warnings
|
||||
|
||||
.
|
||||
To benefit fully from system ID, all hosts should have a system ID
|
||||
configured, and all VGs should have a system ID set. Without any method
|
||||
to restrict access, e.g. system ID or device filters, a VG that is visible
|
||||
to multiple hosts can be accidentally damaged or destroyed.
|
||||
|
||||
.
|
||||
.IP \[bu] 2
|
||||
A VG without a system ID can be used without restriction from any host
|
||||
where it is visible, even from hosts that have a system ID.
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.IP \[bu]
|
||||
Many VGs will not have a system ID set because LVM has not enabled it by
|
||||
default, and even when enabled, many VGs were created before the feature
|
||||
was added to LVM or enabled. A system ID can be assigned to these VGs by
|
||||
using vgchange --systemid (see below).
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.IP \[bu]
|
||||
Two hosts should not be assigned the same system ID. Doing so defeats
|
||||
the purpose of distinguishing different hosts with this value.
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.IP \[bu]
|
||||
Orphan PVs (or unused devices) on shared storage are unprotected by the
|
||||
system ID feature. Commands that use these PVs, such as vgcreate or
|
||||
vgextend, are not prevented from performing conflicting operations and
|
||||
corrupting the PVs. See the
|
||||
.B orphans
|
||||
section for more information.
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.IP \[bu]
|
||||
The system ID does not protect devices in a VG from programs other than LVM.
|
||||
|
||||
.IP \[bu] 2
|
||||
.
|
||||
.IP \[bu]
|
||||
A host using an old LVM version (without the system ID feature) will not
|
||||
recognize a system ID set in VGs. The old LVM can read a VG with a
|
||||
system ID, but is prevented from writing to the VG (or its LVs).
|
||||
The system ID feature changes the write mode of a VG, making it appear
|
||||
read-only to previous versions of LVM.
|
||||
|
||||
.sp
|
||||
This also means that if a host downgrades to the old LVM version, it would
|
||||
lose access to any VGs it had created with a system ID. To avoid this,
|
||||
the system ID should be removed from local VGs before downgrading LVM to a
|
||||
version without the system ID feature.
|
||||
|
||||
|
||||
.
|
||||
.SS Types of VG access
|
||||
|
||||
.
|
||||
A local VG is meant to be used by a single host.
|
||||
|
||||
.P
|
||||
A shared or clustered VG is meant to be used by multiple hosts.
|
||||
|
||||
.P
|
||||
These can be further distinguished as:
|
||||
|
||||
.
|
||||
.TP
|
||||
.B Unrestricted:
|
||||
A local VG that has no system ID. This VG type is unprotected and
|
||||
accessible to any host.
|
||||
|
||||
.
|
||||
.TP
|
||||
.B Owned:
|
||||
A local VG that has a system ID set, as viewed from the host with a
|
||||
matching system ID (the owner). This VG type is accessible to the host.
|
||||
|
||||
.
|
||||
.TP
|
||||
.B Foreign:
|
||||
A local VG that has a system ID set, as viewed from any host with an
|
||||
unmatching system ID (or no system ID). It is owned by another host.
|
||||
This VG type is not accessible to the host.
|
||||
|
||||
.
|
||||
.TP
|
||||
.B Exported:
|
||||
A local VG that has been exported with vgexport and has no system ID.
|
||||
This VG type can only be accessed by vgimport which will change it to
|
||||
owned.
|
||||
|
||||
.
|
||||
.TP
|
||||
.B Shared:
|
||||
A shared or "lockd" VG has the lock_type set and has no system ID.
|
||||
A shared VG is meant to be used on shared storage from multiple hosts,
|
||||
and is only accessible to hosts using lvmlockd. Applicable only if LVM
|
||||
is compiled with lvmlockd support.
|
||||
|
||||
.
|
||||
.TP
|
||||
.B Clustered:
|
||||
A clustered or "clvm" VG has the clustered flag set and has no system ID.
|
||||
A clustered VG is meant to be used on shared storage from multiple hosts,
|
||||
and is only accessible to hosts using clvmd. Applicable only if LVM
|
||||
is compiled with clvm support.
|
||||
|
||||
|
||||
.
|
||||
.SS Host system ID configuration
|
||||
|
||||
.
|
||||
A host's own system ID can be defined in a number of ways. lvm.conf
|
||||
global/system_id_source defines the method LVM will use to find the local
|
||||
system ID:
|
||||
|
||||
.
|
||||
.TP
|
||||
.B none
|
||||
.br
|
||||
|
||||
LVM will not use a system ID. LVM is allowed to access VGs without a
|
||||
system ID, and will create new VGs without a system ID. An undefined
|
||||
system_id_source is equivalent to none.
|
||||
|
||||
.sp
|
||||
.I lvm.conf
|
||||
.nf
|
||||
global {
|
||||
system_id_source = "none"
|
||||
}
|
||||
.fi
|
||||
|
||||
.
|
||||
.TP
|
||||
.B machineid
|
||||
.br
|
||||
|
||||
The content of /etc/machine-id is used as the system ID if available.
|
||||
See
|
||||
.BR machine-id (5)
|
||||
and
|
||||
.BR systemd-machine-id-setup (1)
|
||||
to check if machine-id is available on the host.
|
||||
|
||||
.sp
|
||||
.I lvm.conf
|
||||
.nf
|
||||
global {
|
||||
system_id_source = "machineid"
|
||||
}
|
||||
.fi
|
||||
|
||||
.
|
||||
.TP
|
||||
.B uname
|
||||
.br
|
||||
|
||||
The string utsname.nodename from
|
||||
.BR uname (2)
|
||||
is used as the system ID. A uname beginning with "localhost"
|
||||
is ignored and equivalent to none.
|
||||
|
||||
.sp
|
||||
.I lvm.conf
|
||||
.nf
|
||||
global {
|
||||
system_id_source = "uname"
|
||||
}
|
||||
.fi
|
||||
|
||||
.
|
||||
.TP
|
||||
.B lvmlocal
|
||||
.br
|
||||
|
||||
The system ID is defined in lvmlocal.conf local/system_id.
|
||||
|
||||
.sp
|
||||
.I lvm.conf
|
||||
.nf
|
||||
global {
|
||||
system_id_source = "lvmlocal"
|
||||
}
|
||||
.fi
|
||||
|
||||
.sp
|
||||
.I lvmlocal.conf
|
||||
.nf
|
||||
local {
|
||||
system_id = "example_name"
|
||||
}
|
||||
.fi
|
||||
|
||||
.
|
||||
.TP
|
||||
.B file
|
||||
.br
|
||||
|
||||
The system ID is defined in a file specified by lvm.conf
|
||||
global/system_id_file.
|
||||
|
||||
.sp
|
||||
.I lvm.conf
|
||||
.nf
|
||||
global {
|
||||
@ -236,132 +236,125 @@ global {
|
||||
system_id_file = "/path/to/file"
|
||||
}
|
||||
.fi
|
||||
|
||||
.LP
|
||||
|
||||
Changing system_id_source will likely cause the system ID of the host to
|
||||
change, which will prevent the host from using VGs that it previously used
|
||||
(see extra_system_ids below to handle this.)
|
||||
|
||||
.P
|
||||
If a system_id_source other than none fails to produce a system ID value,
|
||||
it is the equivalent of having none. The host will be allowed to access
|
||||
VGs with no system ID, but will not be allowed to access VGs with a system
|
||||
ID set.
|
||||
|
||||
|
||||
.
|
||||
.SS Overriding system ID
|
||||
|
||||
.
|
||||
In some cases, it may be necessary for a host to access VGs with different
|
||||
system IDs, e.g. if a host's system ID changes, and it wants to use VGs
|
||||
that it created with its old system ID. To allow a host to access VGs
|
||||
with other system IDs, those other system IDs can be listed in
|
||||
lvmlocal.conf local/extra_system_ids.
|
||||
|
||||
.P
|
||||
.I lvmlocal.conf
|
||||
.nf
|
||||
local {
|
||||
extra_system_ids = [ "my_other_name" ]
|
||||
}
|
||||
.fi
|
||||
|
||||
.P
|
||||
A safer option may be configuring the extra values as needed on the
|
||||
command line as:
|
||||
.br
|
||||
\fB--config 'local/extra_system_ids=["\fP\fIid\fP\fB"]'\fP
|
||||
|
||||
|
||||
.
|
||||
.SS vgcreate
|
||||
|
||||
.
|
||||
In vgcreate, the host running the command assigns its own system ID to the
|
||||
new VG. To override this and set another system ID:
|
||||
|
||||
.P
|
||||
.B vgcreate --systemid
|
||||
.I SystemID VG PVs
|
||||
|
||||
.P
|
||||
Overriding the host's system ID makes it possible for a host to create a
|
||||
VG that it may not be able to use. Another host with a system ID matching
|
||||
the one specified may not recognize the new VG without manually rescanning
|
||||
devices.
|
||||
|
||||
.P
|
||||
If the --systemid argument is an empty string (""), the VG is created with
|
||||
no system ID, making it accessible to other hosts (see warnings above.)
|
||||
|
||||
|
||||
.
|
||||
.SS report/display
|
||||
|
||||
.
|
||||
The system ID of a VG is displayed with the "systemid" reporting option.
|
||||
|
||||
.P
|
||||
Report/display commands ignore foreign VGs by default. To report foreign
|
||||
VGs, the --foreign option can be used. This causes the VGs to be read
|
||||
from disk.
|
||||
|
||||
.P
|
||||
.B vgs --foreign -o +systemid
|
||||
|
||||
.P
|
||||
When a host with no system ID sees foreign VGs, it warns about them as
|
||||
they are skipped. The host should be assigned a system ID, after which
|
||||
standard reporting commands will silently ignore foreign VGs.
|
||||
|
||||
|
||||
.
|
||||
.SS vgexport/vgimport
|
||||
|
||||
.
|
||||
vgexport clears the VG system ID when exporting the VG.
|
||||
|
||||
.P
|
||||
vgimport sets the VG system ID to the system ID of the host doing the
|
||||
import.
|
||||
|
||||
|
||||
.
|
||||
.SS vgchange
|
||||
|
||||
.
|
||||
A host can change the system ID of its own VGs, but the command requires
|
||||
confirmation because the host may lose access to the VG being changed:
|
||||
|
||||
.P
|
||||
.B vgchange --systemid
|
||||
.I SystemID VG
|
||||
|
||||
.P
|
||||
The system ID can be removed from a VG by specifying an empty string ("")
|
||||
as the new system ID. This makes the VG accessible to other hosts (see
|
||||
warnings above.)
|
||||
|
||||
.P
|
||||
A host cannot directly change the system ID of a foreign VG.
|
||||
|
||||
.P
|
||||
To move a VG from one host to another, vgexport and vgimport should be
|
||||
used.
|
||||
|
||||
.P
|
||||
To forcibly gain ownership of a foreign VG, a host can temporarily add the
|
||||
foreign system ID to its extra_system_ids list, and change the system ID
|
||||
of the foreign VG to its own. See Overriding system ID above.
|
||||
|
||||
|
||||
.
|
||||
.SS shared VGs
|
||||
|
||||
.
|
||||
A shared VG has no system ID set, allowing multiple hosts to use it
|
||||
via lvmlockd. Changing a VG to shared will clear the existing
|
||||
system ID. Applicable only if LVM is compiled with lvmlockd support.
|
||||
|
||||
|
||||
.
|
||||
.SS clustered VGs
|
||||
|
||||
.
|
||||
A clustered/clvm VG has no system ID set, allowing multiple hosts to use
|
||||
it via clvmd. Changing a VG to clustered will clear the existing system
|
||||
ID. Changing a VG to not clustered will set the system ID to the host
|
||||
running the vgchange command.
|
||||
|
||||
|
||||
.
|
||||
.SS creation_host
|
||||
|
||||
.
|
||||
In vgcreate, the VG metadata field creation_host is set by default to the
|
||||
host's uname. The creation_host cannot be changed, and is not used to
|
||||
control access. When system_id_source is "uname", the system_id and
|
||||
creation_host fields will be the same.
|
||||
|
||||
.
|
||||
.SS orphans
|
||||
|
||||
.
|
||||
Orphan PVs are unused devices; they are not currently used in any VG.
|
||||
Because of this, they are not protected by a system ID, and any host can
|
||||
use them. Coordination of changes to orphan PVs is beyond the scope of
|
||||
system ID. The same is true of any block device that is not a PV.
|
||||
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.nh
|
||||
.ad l
|
||||
.BR vgcreate (8),
|
||||
.BR vgchange (8),
|
||||
.BR vgimport (8),
|
||||
@ -371,4 +364,3 @@ system ID. The same is true of any block device that is not a PV.
|
||||
.BR lvm.conf (5),
|
||||
.BR machine-id (5),
|
||||
.BR uname (2)
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,22 @@
|
||||
.TH "LVMVDO" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
|
||||
|
||||
.
|
||||
.SH NAME
|
||||
.
|
||||
lvmvdo \(em Support for Virtual Data Optimizer in LVM
|
||||
.
|
||||
.SH DESCRIPTION
|
||||
.
|
||||
VDO is software that provides inline
|
||||
block-level deduplication, compression, and thin provisioning capabilities
|
||||
for primary storage.
|
||||
|
||||
.P
|
||||
Deduplication is a technique for reducing the consumption of storage
|
||||
resources by eliminating multiple copies of duplicate blocks. Compression
|
||||
takes the individual unique blocks and shrinks them. These reduced blocks are then efficiently packed together into
|
||||
physical blocks. Thin provisioning manages the mapping from logical blocks
|
||||
presented by VDO to where the data has actually been physically stored,
|
||||
and also eliminates any blocks of all zeroes.
|
||||
|
||||
.P
|
||||
With deduplication, instead of writing the same data more than once, VDO detects and records each
|
||||
duplicate block as a reference to the original
|
||||
block. VDO maintains a mapping from Logical Block Addresses (LBA) (used by the
|
||||
@ -21,31 +24,33 @@ storage layer above VDO) to physical block addresses (used by the storage
|
||||
layer under VDO). After deduplication, multiple logical block addresses
|
||||
may be mapped to the same physical block address; these are called shared
|
||||
blocks and are reference-counted by the software.
|
||||
|
||||
.P
|
||||
With compression, VDO compresses multiple blocks (or shared blocks)
|
||||
with the fast LZ4 algorithm, and bins them together where possible so that
|
||||
multiple compressed blocks fit within a 4 KB block on the underlying
|
||||
storage. Mapping from LBA is to a physical block address and index within
|
||||
it for the desired compressed data. All compressed blocks are individually
|
||||
reference counted for correctness.
|
||||
|
||||
.P
|
||||
Block sharing and block compression are invisible to applications using
|
||||
the storage, which read and write blocks as they would if VDO were not
|
||||
present. When a shared block is overwritten, a new physical block is
|
||||
allocated for storing the new block data to ensure that other logical
|
||||
block addresses that are mapped to the shared physical block are not
|
||||
modified.
|
||||
|
||||
.P
|
||||
To use VDO with \fBlvm\fP(8), you must install the standard VDO user-space tools
|
||||
\fBvdoformat\fP(8) and the currently non-standard kernel VDO module
|
||||
"\fIkvdo\fP".
|
||||
|
||||
.P
|
||||
The "\fIkvdo\fP" module implements fine-grained storage virtualization,
|
||||
thin provisioning, block sharing, and compression.
|
||||
The "\fIuds\fP" module provides memory-efficient duplicate
|
||||
identification. The user-space tools include \fBvdostats\fP(8)
|
||||
for extracting statistics from VDO volumes.
|
||||
.
|
||||
.SH VDO TERMS
|
||||
.
|
||||
.TP
|
||||
VDODataLV
|
||||
.br
|
||||
@ -54,6 +59,7 @@ VDO data LV
|
||||
A large hidden LV with the _vdata suffix. It is created in a VG
|
||||
.br
|
||||
used by the VDO kernel target to store all data and metadata blocks.
|
||||
.
|
||||
.TP
|
||||
VDOPoolLV
|
||||
.br
|
||||
@ -62,6 +68,7 @@ VDO pool LV
|
||||
A pool for virtual VDOLV(s), which are the size of used VDODataLV.
|
||||
.br
|
||||
Only a single VDOLV is currently supported.
|
||||
.
|
||||
.TP
|
||||
VDOLV
|
||||
.br
|
||||
@ -70,9 +77,14 @@ VDO LV
|
||||
Created from VDOPoolLV.
|
||||
.br
|
||||
Appears blank after creation.
|
||||
.
|
||||
.SH VDO USAGE
|
||||
.
|
||||
The primary methods for using VDO with lvm2:
|
||||
.SS 1. Create a VDOPoolLV and a VDOLV
|
||||
.nr step 1 1
|
||||
.
|
||||
.SS \n[step]. Create a VDOPoolLV and a VDOLV
|
||||
.
|
||||
Create a VDOPoolLV that will hold VDO data, and a
|
||||
virtual size VDOLV that the user can use. If you do not specify the virtual size,
|
||||
then the VDOLV is created with the maximum size that
|
||||
@ -81,23 +93,25 @@ deduplication or compression can happen
|
||||
(i.e. it can hold the incompressible content of /dev/urandom).
|
||||
If you do not specify the name of VDOPoolLV, it is taken from
|
||||
the sequence of vpool0, vpool1 ...
|
||||
|
||||
.P
|
||||
Note: The performance of TRIM/Discard operations is slow for large
|
||||
volumes of VDO type. Please try to avoid sending discard requests unless
|
||||
necessary because it might take considerable amount of time to finish the discard
|
||||
operation.
|
||||
|
||||
.P
|
||||
.nf
|
||||
.B lvcreate --type vdo -n VDOLV -L DataSize -V LargeVirtualSize VG/VDOPoolLV
|
||||
.B lvcreate --vdo -L DataSize VG
|
||||
.fi
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# lvcreate --type vdo -n vdo0 -L 10G -V 100G vg/vdopool0
|
||||
# mkfs.ext4 -E nodiscard /dev/vg/vdo0
|
||||
.fi
|
||||
.SS 2. Convert an existing LV into VDOPoolLV
|
||||
.
|
||||
.SS \n+[step]. Convert an existing LV into VDOPoolLV
|
||||
.
|
||||
Convert an already created or existing LV into a VDOPoolLV, which is a volume
|
||||
that can hold data and metadata.
|
||||
You will be prompted to confirm such conversion because it \fBIRREVERSIBLY
|
||||
@ -106,24 +120,26 @@ formatted by \fBvdoformat\fP(8) as a VDO pool data volume. You can
|
||||
specify the virtual size of the VDOLV associated with this VDOPoolLV.
|
||||
If you do not specify the virtual size, it will be set to the maximum size
|
||||
that can keep 100% incompressible data there.
|
||||
|
||||
.P
|
||||
.nf
|
||||
.B lvconvert --type vdo-pool -n VDOLV -V VirtualSize VG/VDOPoolLV
|
||||
.B lvconvert --vdopool VG/VDOPoolLV
|
||||
.fi
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# lvconvert --type vdo-pool -n vdo0 -V10G vg/ExistingLV
|
||||
.fi
|
||||
.SS 3. Change the default settings used for creating a VDOPoolLV
|
||||
.
|
||||
.SS \n+[step]. Change the default settings used for creating a VDOPoolLV
|
||||
.
|
||||
VDO allows to set a large variety of options. Lots of these settings
|
||||
can be specified in lvm.conf or profile settings. You can prepare
|
||||
a number of different profiles in the #DEFAULT_SYS_DIR#/profile directory
|
||||
and just specify the profile file name.
|
||||
Check the output of \fBlvmconfig --type default --withcomments\fP
|
||||
for a detailed description of all individual VDO settings.
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# cat <<EOF > #DEFAULT_SYS_DIR#/profile/vdo_create.profile
|
||||
@ -149,43 +165,45 @@ allocation {
|
||||
vdo_max_discard=1
|
||||
}
|
||||
EOF
|
||||
|
||||
.P
|
||||
# lvcreate --vdo -L10G --metadataprofile vdo_create vg/vdopool0
|
||||
# lvcreate --vdo -L10G --config 'allocation/vdo_cpu_threads=4' vg/vdopool1
|
||||
.fi
|
||||
.SS 4. Change the compression and deduplication of a VDOPoolLV
|
||||
.
|
||||
.SS \n+[step]. Change the compression and deduplication of a VDOPoolLV
|
||||
.
|
||||
Disable or enable the compression and deduplication for VDOPoolLV
|
||||
(the volume that maintains all VDO LV(s) associated with it).
|
||||
|
||||
.nf
|
||||
.P
|
||||
.B lvchange --compression [y|n] --deduplication [y|n] VG/VDOPoolLV
|
||||
.fi
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# lvchange --compression n vg/vdopool0
|
||||
# lvchange --deduplication y vg/vdopool1
|
||||
.fi
|
||||
.SS 5. Checking the usage of VDOPoolLV
|
||||
.
|
||||
.SS \n+[step]. Checking the usage of VDOPoolLV
|
||||
.
|
||||
To quickly check how much data on a VDOPoolLV is already consumed,
|
||||
use \fBlvs\fP(8). The Data% field reports how much data is occupied
|
||||
in the content of the virtual data for the VDOLV and how much space is already
|
||||
consumed with all the data and metadata blocks in the VDOPoolLV.
|
||||
For a detailed description, use the \fBvdostats\fP(8) command.
|
||||
|
||||
.P
|
||||
Note: \fBvdostats\fP(8) currently understands only /dev/mapper device names.
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# lvcreate --type vdo -L10G -V20G -n vdo0 vg/vdopool0
|
||||
# mkfs.ext4 -E nodiscard /dev/vg/vdo0
|
||||
# lvs -a vg
|
||||
|
||||
.P
|
||||
LV VG Attr LSize Pool Origin Data%
|
||||
vdo0 vg vwi-a-v--- 20.00g vdopool0 0.01
|
||||
vdopool0 vg dwi-ao---- 10.00g 30.16
|
||||
[vdopool0_vdata] vg Dwi-ao---- 10.00g
|
||||
|
||||
.P
|
||||
# vdostats --all /dev/mapper/vg-vdopool0-vpool
|
||||
/dev/mapper/vg-vdopool0 :
|
||||
version : 30
|
||||
@ -193,76 +211,88 @@ Note: \fBvdostats\fP(8) currently understands only /dev/mapper device names.
|
||||
data blocks used : 79
|
||||
...
|
||||
.fi
|
||||
.SS 6. Extending the VDOPoolLV size
|
||||
.
|
||||
.SS \n+[step]. Extending the VDOPoolLV size
|
||||
.
|
||||
You can add more space to hold VDO data and metadata by
|
||||
extending the VDODataLV using the commands
|
||||
\fBlvresize\fP(8) and \fBlvextend\fP(8).
|
||||
The extension needs to add at least one new VDO slab. You can configure
|
||||
the slab size with the \fBallocation/vdo_slab_size_mb\fP setting.
|
||||
|
||||
.P
|
||||
You can also enable automatic size extension of a monitored VDOPoolLV
|
||||
with the \fBactivation/vdo_pool_autoextend_percent\fP and
|
||||
\fBactivation/vdo_pool_autoextend_threshold\fP settings.
|
||||
|
||||
.P
|
||||
Note: You cannot reduce the size of a VDOPoolLV.
|
||||
|
||||
.nf
|
||||
.P
|
||||
.B lvextend -L+AddingSize VG/VDOPoolLV
|
||||
.fi
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# lvextend -L+50G vg/vdopool0
|
||||
# lvresize -L300G vg/vdopool1
|
||||
.fi
|
||||
.SS 7. Extending or reducing the VDOLV size
|
||||
.
|
||||
.SS \n+[step]. Extending or reducing the VDOLV size
|
||||
.
|
||||
You can extend or reduce a virtual VDO LV as a standard LV with the
|
||||
\fBlvresize\fP(8), \fBlvextend\fP(8), and \fBlvreduce\fP(8) commands.
|
||||
|
||||
.P
|
||||
Note: The reduction needs to process TRIM for reduced disk area
|
||||
to unmap used data blocks from the VDOPoolLV, which might take
|
||||
a long time.
|
||||
|
||||
.nf
|
||||
.P
|
||||
.B lvextend -L+AddingSize VG/VDOLV
|
||||
.br
|
||||
.B lvreduce -L-ReducingSize VG/VDOLV
|
||||
.fi
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# lvextend -L+50G vg/vdo0
|
||||
# lvreduce -L-50G vg/vdo1
|
||||
# lvresize -L200G vg/vdo2
|
||||
.fi
|
||||
.SS 8. Component activation of a VDODataLV
|
||||
.
|
||||
.SS \n+[step]. Component activation of a VDODataLV
|
||||
.
|
||||
You can activate a VDODataLV separately as a component LV for examination
|
||||
purposes. The activation of the VDODataLV activates the data LV in read-only mode,
|
||||
and the data LV cannot be modified.
|
||||
If the VDODataLV is active as a component, any upper LV using this volume CANNOT
|
||||
be activated. You have to deactivate the VDODataLV first to continue to use the VDOPoolLV.
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# lvchange -ay vg/vpool0_vdata
|
||||
# lvchange -an vg/vpool0_vdata
|
||||
.fi
|
||||
.
|
||||
.SH VDO TOPICS
|
||||
.SS 1. Stacking VDO
|
||||
.
|
||||
.nr step 1 1
|
||||
.
|
||||
.SS \n[step]. Stacking VDO
|
||||
.
|
||||
You can convert or stack a VDOPooLV with these currently supported
|
||||
volume types: linear, stripe, raid, and cache with cachepool.
|
||||
.SS 2. VDOPoolLV on top of raid
|
||||
.
|
||||
.SS \n+[step]. VDOPoolLV on top of raid
|
||||
.
|
||||
Using a raid type LV for a VDODataLV.
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# lvcreate --type raid1 -L 5G -n vdopool vg
|
||||
# lvconvert --type vdo-pool -V 10G vg/vdopool
|
||||
.fi
|
||||
.SS 3. Caching a VDODataLV or a VDOPoolLV
|
||||
.
|
||||
.SS \n+[step]. Caching a VDODataLV or a VDOPoolLV
|
||||
.
|
||||
VDODataLV (accepts also VDOPoolLV) caching provides a mechanism
|
||||
to accelerate reads and writes of already compressed and deduplicated
|
||||
data blocks together with VDO metadata.
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vdopool
|
||||
@ -270,10 +300,12 @@ data blocks together with VDO metadata.
|
||||
# lvconvert --cache --cachepool vg/cachepool vg/vdopool
|
||||
# lvconvert --uncache vg/vdopool
|
||||
.fi
|
||||
.SS 4. Caching a VDOLV
|
||||
.
|
||||
.SS \n+[step]. Caching a VDOLV
|
||||
.
|
||||
VDO LV cache allow you to 'cache' a device for better performance before
|
||||
it hits the processing of the VDO Pool LV layer.
|
||||
|
||||
.P
|
||||
.I Example
|
||||
.nf
|
||||
# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vdopool
|
||||
@ -281,12 +313,14 @@ it hits the processing of the VDO Pool LV layer.
|
||||
# lvconvert --cache --cachepool vg/cachepool vg/vdo1
|
||||
# lvconvert --uncache vg/vdo1
|
||||
.fi
|
||||
.SS 5. Usage of Discard/TRIM with a VDOLV
|
||||
.
|
||||
.SS \n+[step]. Usage of Discard/TRIM with a VDOLV
|
||||
.
|
||||
You can discard data on a VDO LV and reduce used blocks on a VDOPoolLV.
|
||||
However, the current performance of discard operations is still not optimal
|
||||
and takes a considerable amount of time and CPU.
|
||||
Unless you really need it, you should avoid using discard.
|
||||
|
||||
.P
|
||||
When a block device is going to be rewritten,
|
||||
its blocks will be automatically reused for new data.
|
||||
Discard is useful in situations when user knows that the given portion of a VDO LV
|
||||
@ -295,55 +329,59 @@ provisioning in other regions of the VDO LV.
|
||||
For the same reason, you should avoid using mkfs with discard for
|
||||
a freshly created VDO LV to save a lot of time that this operation would
|
||||
take otherwise as device is already expected to be empty.
|
||||
.SS 6. Memory usage
|
||||
.
|
||||
.SS \n+[step]. Memory usage
|
||||
.
|
||||
The VDO target requires 370 MiB of RAM plus an additional 268 MiB
|
||||
per each 1 TiB of physical storage managed by the volume.
|
||||
|
||||
.P
|
||||
UDS requires a minimum of 250 MiB of RAM,
|
||||
which is also the default amount that deduplication uses.
|
||||
|
||||
.P
|
||||
The memory required for the UDS index is determined by the index type
|
||||
and the required size of the deduplication window and
|
||||
is controlled by the \fBallocation/vdo_use_sparse_index\fP setting.
|
||||
|
||||
.P
|
||||
With enabled UDS sparse indexing, it relies on the temporal locality of data
|
||||
and attempts to retain only the most relevant index entries in memory and
|
||||
can maintain a deduplication window that is ten times larger
|
||||
than with dense while using the same amount of memory.
|
||||
|
||||
.P
|
||||
Although the sparse index provides the greatest coverage,
|
||||
the dense index provides more deduplication advice.
|
||||
For most workloads, given the same amount of memory,
|
||||
the difference in deduplication rates between dense
|
||||
and sparse indexes is negligible.
|
||||
|
||||
.P
|
||||
A dense index with 1 GiB of RAM maintains a 1 TiB deduplication window,
|
||||
while a sparse index with 1 GiB of RAM maintains a 10 TiB deduplication window.
|
||||
In general, 1 GiB is sufficient for 4 TiB of physical space with
|
||||
a dense index and 40 TiB with a sparse index.
|
||||
.SS 7. Storage space requirements
|
||||
.
|
||||
.SS \n+[step]. Storage space requirements
|
||||
.
|
||||
You can configure a VDOPoolLV to use up to 256 TiB of physical storage.
|
||||
Only a certain part of the physical storage is usable to store data.
|
||||
This section provides the calculations to determine the usable size
|
||||
of a VDO-managed volume.
|
||||
|
||||
.P
|
||||
The VDO target requires storage for two types of VDO metadata and for the UDS index:
|
||||
.TP
|
||||
\(bu
|
||||
.IP \(bu 2
|
||||
The first type of VDO metadata uses approximately 1 MiB for each 4 GiB
|
||||
of physical storage plus an additional 1 MiB per slab.
|
||||
.TP
|
||||
\(bu
|
||||
.IP \(bu
|
||||
The second type of VDO metadata consumes approximately 1.25 MiB
|
||||
for each 1 GiB of logical storage, rounded up to the nearest slab.
|
||||
.TP
|
||||
\(bu
|
||||
.IP \(bu
|
||||
The amount of storage required for the UDS index depends on the type of index
|
||||
and the amount of RAM allocated to the index. For each 1 GiB of RAM,
|
||||
a dense UDS index uses 17 GiB of storage and a sparse UDS index will use
|
||||
170 GiB of storage.
|
||||
|
||||
.
|
||||
.SH SEE ALSO
|
||||
.
|
||||
.nh
|
||||
.ad l
|
||||
.BR lvm (8),
|
||||
.BR lvm.conf (5),
|
||||
.BR lvmconfig (8),
|
||||
@ -355,7 +393,9 @@ a dense UDS index uses 17 GiB of storage and a sparse UDS index will use
|
||||
.BR lvresize (8),
|
||||
.BR lvremove (8),
|
||||
.BR lvs (8),
|
||||
.P
|
||||
.BR vdo (8),
|
||||
.BR vdoformat (8),
|
||||
.BR vdostats (8),
|
||||
.P
|
||||
.BR mkfs (8)
|
||||
|
Loading…
x
Reference in New Issue
Block a user