1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-02-10 17:57:54 +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:
Zdenek Kabelac 2021-04-13 15:26:54 +02:00
parent 0004ffa73a
commit 353718785f
22 changed files with 1970 additions and 2061 deletions

View File

@ -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
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),

View File

@ -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),

View File

@ -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%

View File

@ -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

View File

@ -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
.
@ -656,7 +615,7 @@ Flags defaults to read-write (rw) or may be read-only (ro).
Uuid, minor number and flags are optional so those fields may be empty.
A semi-colon separates specifications of different devices.
Use a backslash to escape the following character, for example a comma or semi-colon in a name or table. See also CONCISE FORMAT below.
.
.
.HP
.CMD_DEPS
.br
@ -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

View File

@ -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.