1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-06 11:33:14 +03:00

Compare commits

..

87 Commits

Author SHA1 Message Date
Zdenek Kabelac
86f2d0668d tests: typo
7 should have replaced 8.
2025-06-12 23:38:44 +02:00
Zdenek Kabelac
f88565316c tests: aux lower 8EiB size
Reduce ~8EiB sized device by few sectors to avoid endless loop
from systemd-udev device scan.

Use of 180143985094819876 solves the issues.
2025-06-12 17:00:09 +02:00
Zdenek Kabelac
9aa346a0c6 tests: aux teardown clear tables in parallel
To avoid getting possibly stuck waiting on suspended LVs,
run 'dmsetup clear' in parallel in teardown of device stack.
2025-06-12 17:00:09 +02:00
Peter Rajnoha
4ef8acb018 WHATS_NEW: update 2025-06-12 10:18:52 +02:00
Peter Rajnoha
cbf4a7c53b tools: reporter: cleanup: setting of cmd->report_strict_type_mode
Make setting of cmd->report_string_type_mode easier to follow.
2025-06-12 10:18:52 +02:00
Peter Rajnoha
f024936924 tools: reporter: override LC_NUMERIC if needed for json_std format
Override LC_NUMERIC part of the locale to "C" if we detect that the
radix character interferes with JSON_STD format. If that's the case,
override LC_NUMERIC locale to "C" in report_format_init, that is,
before any reporting is executed (including log reporting). Restore
it back in report_format_destroy, that is, once we're sure that all
reporting is finished.

Related: https://gitlab.com/lvmteam/lvm2/-/issues/33
2025-06-12 10:18:52 +02:00
Peter Rajnoha
0a665d0c17 tools: reporter: cleanup: factor out code to new report_format_destroy
We already have report_format_init. Having report_format_destroy makes
it easier to read and follow the code using these functions.
2025-06-12 10:18:46 +02:00
Peter Rajnoha
f110b32239 libdm: report: require '.' radix char for DM_REPORT_GROUP_JSON_STD
When a report is under DM_REPORT_GROUP_JSON_STD, the formatting of the
report follows more standard form of the JSON output. This includes
unquoted numbers (as opposed to the DM_REPORT_GROUP_JSON).

The JSON standard dictates the radix character (decimal point) must
be '.' only (https://www.rfc-editor.org/rfc/rfc7158#section-6).

However, some locales may use other character for the radix delimiter,
like ','. This character also interferes with ',' used as delimiter for
json items.

Therefore, we need to check whether current locale is not posing an
issue when using DM_REPORT_GROUP_JSON_STD. If that's the case, simply
error out from dm_report_group_create as we don't want to override
current locale in libdm or do anything else at this level. The libdm
caller is responsible here for setting the proper locale.

Related: https://gitlab.com/lvmteam/lvm2/-/issues/33
2025-06-12 10:12:59 +02:00
Heinz Mauelshagen
37b28216fd lvmlockctl: fix leading spaces in scanf alternative commit 0217887fcd 2025-05-14 14:36:27 +02:00
Zdenek Kabelac
80b1ccd2f3 tests: aux use 8EiB sized devices
From kernel 6.15 DM block devices with size >= 8EiB can't be created.
2025-05-14 12:53:38 +02:00
Su Yue
46a6d0d2bd test: addm shell/lvresize-btrfs.sh
refer legacy patche:
- Ondrej Kozina <okozina@redhat.com>
https://listman.redhat.com/archives/lvm-devel/2012-November/msg00055.html

Signed-off-by: Heming Zhao <heming.zhao@suse.com>
[Adjust to lvresize]
Signed-off-by: Su Yue <glass.su@suse.com>
2025-05-13 12:27:17 -05:00
Su Yue
93013c09be lvresize: add btrfs support
This commit adds lvresize/lvextend/lvreduce support for btrfs.
'btrfs filesystem resize [devid:][+/-]<newsize>[kKmMgGtTpPeE]|[devid:]max <path>'
is used to resize one device only when it's mounted.
The code pattern is like xfs but it supports shrink.

For multi-devices btrfs, There is one difficulty to be handled:

If `lvreduce --fs resize` is given, lvm2 will check newsize vs current fs size
to judge if it's need to shrink fs or not.
For one device btrfs, fslastblock * fsblocksize/FSSIZE is the correct value like
ext* and xfs. But for multi-devices btrfs, the two values are whole fs size.
There is no other way without relying btrfs superblock parse. It's too
complicated and inproper to implemnt the logic in lvm2.
So here just sets fs_last_byte to 0 for btrfs and skips boundary check in
_fs_reduce_allow(). It's safe as btrfs will handle it well.

The another complicated part is how to get mount point info if multi-devices.
There is only one mnt entry per mounted fs in /etc/mtab even it's a
multi-devices btrfs. So we first get uuid from lv device then traverse devices
under /sys/fs/btrfs/$uuid/devices and compare them to the mnt entry to get the
mount point.

Signed-off-by: Su Yue <glass.su@suse.com>
2025-05-13 12:27:17 -05:00
Su Yue
9edb10b5f4 filesystem: factor out get mount point logic from fs_get_info() into _fs_get_mnt()
The new _fs_get_mnt() is used to get mount point info for fses.
No functional change.

Signed-off-by: Su Yue <glass.su@suse.com>
2025-05-13 12:27:17 -05:00
Su Yue
7c65c16a66 filesystem: get device uuid in fs_get_blkid
Add new field fs_info::uuid to record device uuid when calling
fs_get_blkid() for further use.

No functional change.

Signed-off-by: Su Yue <glass.su@suse.com>
2025-05-13 12:27:17 -05:00
Zdenek Kabelac
7c9a3ba381 raid: use byte order conversion macros
As we already use  le_to_cpu() and cpu_to_be() elsewhere
and have a macros usable across wide variety of distros,
switch to use these.
2025-05-12 15:48:35 +02:00
Zdenek Kabelac
239f4be1f0 tests: fix typo in PAGE_SIZE check
Here 1 meant to by shifted by 20 bits...
Otherwise it always falback to just 4K.
2025-05-12 15:07:49 +02:00
Zdenek Kabelac
759d1bfe11 WHATS_NEW: update 2025-05-12 15:07:49 +02:00
Zdenek Kabelac
22364ce9b6 man: update raid man
Mention repair of transiently lost devices.
2025-05-12 15:07:49 +02:00
David Teigland
88910c200f lvmlockd: fix sanlock_release for vgremove
incorrect data was being copied to lease structs passed
to sanlock_release(), making the lease removal fail.
2025-05-08 10:54:50 -05:00
David Teigland
53752ef851 lvmlockd: fix hosts check for vgremove
errors from lock manager were not being considered.
EAGAIN from sanlock should be considered EBUSY.
2025-05-07 17:51:01 -05:00
Zdenek Kabelac
dbac36adf0 lvmlockd: keep using ifdef
We are not defining LOCKDSANLOCK_SUPPORT when there is no support
for sanlock enabled.
2025-05-07 17:03:29 +02:00
Zdenek Kabelac
5d7f862b9b configure: autoreconf 2025-05-07 17:03:29 +02:00
Zdenek Kabelac
1e7a614c34 configure.ac: set lowest version
As we always require and check for version 3.7,
avoid extra CHECK_EXIST and go for CHECK_MODULE.

LOCKDSANLOCK_SUPPORT is not defined is the build
is not enabled.

When build for sanlock is enabled, and
CHEKC_MODULE does not detect at least version 3.7
then whole configure process errors out.
2025-05-07 17:03:29 +02:00
Zdenek Kabelac
0cafb18978 test: check raid superblock clearing 2025-05-07 16:54:55 +02:00
Zdenek Kabelac
0a8f560c75 lvconvert: allow clearing superblocks 2025-05-07 16:54:55 +02:00
Heinz Mauelshagen
03d8661657 raid: count or clear transiently failed devices
Count or clear transiently failed devices as of dm-raid superblocks.
Updated debuging.
Use lvconvert --repair to repair transiently failed legs.
Activating all 'meta' LVs with single sync_local_dev_names().
Using proper DM path for meta LV.

Modified-by: zkabelac@redhat.com
2025-05-07 16:54:12 +02:00
David Teigland
b66cc11b78 lvmlockd: detect sanlock version in configure to enable new code 2025-05-06 16:06:24 -05:00
David Teigland
54f3656b7e lvmlockd: disable use of new sanlock apis 2025-05-06 12:07:54 -05:00
David Teigland
a1b27f0656 lvmlockd: use error for corrupted sanlock lease in start
if sanlock delta lease for host_id is corrupt, then
return ELOCKREPAIR.
2025-05-06 11:34:51 -05:00
David Teigland
47a48fd0b6 lvmlockd: add error for corrupted sanlock lease
A specific error message can be printed for this case:
"sanlock lease needs repair"
2025-05-06 11:34:51 -05:00
David Teigland
a494f07aec lvmlockd: add vg_status operation and fix sanlock read_lockspace_info 2025-05-06 11:34:51 -05:00
David Teigland
bd363a4284 lvmlockd: use new sanlock_read_lockspace_host for prev generation
return previous sanlock generation number in the start_vg response.
2025-05-06 11:34:51 -05:00
David Teigland
9b51b3d3f1 lvmlockd: use new sanlock_acquire2 to return owner info
Use the new sanlock_acquire2() which returns info about the owner
of a lease.  Pass this info back to the lvm command, where it's
initially used to print the host_id of a host holding a lock
when it cannot be acquired.
2025-05-06 11:34:51 -05:00
David Teigland
0217887fcd lvmlockctl: sscanf alternative
Add szscanf() to use in place of sscanf. It takes a buffer size for
strings, so avoids needing to use max field width, which is hard to
read when implemented with stringify macros.
2025-05-05 15:48:48 -05:00
Marian Csontos
086b0ee6e4 post-release 2025-05-05 17:02:06 +02:00
Marian Csontos
8817523c56 pre-release 2.03.32 2025-05-05 17:02:06 +02:00
Marian Csontos
338bb7e68b WHATS_NEW: update 2025-04-29 15:02:04 +02:00
Zdenek Kabelac
8acb84f5bd tests: check for resulting size
Add some extra validation check for size and slabsize.
2025-04-28 14:19:18 +02:00
Zdenek Kabelac
480bf01936 make: generate 2025-04-28 14:19:18 +02:00
Zdenek Kabelac
c1bfc8737f man: updates and typography
Manually enhance pages for thin, cache, raid, vdo.

Replace usage of .HP with .TP when it makes sense (but keep .HP
where so far we don't have replacement giving same visual results).

Use .CMS, .CME  macros in dmsetup/dmstats so it easy to switch
But keep using .HP when the rendering looks simply better in terminal
although HTML output does not looks that well - so we may eventually
switch here to .TP.

For basic command synopsis use .NSY macro that will
use .SY for graphical rendering (postscript/pdf) but keep
using .TP for ASCII terminal output, as here many HTML renderers
are emitting unreadable pages.

For options use '\ ' (non-breakable space) between option and
its argument and option are not across line.

Reformat lines to fit in 80 columns.

Use  .EX .. .EE  for example output - this improves
character alignment for poststrict/pdf rendering as
it use monospace fonts (unlike .nf .. .fi).
Also with Example section never let the line being with space
and use '\' for such line.
If the Example line should being with '.' it needs to be
prefix with \&.
Add .nf/.fi macros for cases where .EX & .EE are undefined
(this happens i.e. with man2html)

Avoid use of tables (.TS .. .TE) as HTML renderers often use
images (.png) files for such tables and this does not scale well
when user changes font size in browser.
(and the large/long table were split into 2 pieces
so it does fit to 80 columns).

Use .MT .ME for emails.

Use .UR .UE. for URL.

Use  .\|.\|.\& as sequence of 3 dots and add \& to not create end of
sentence and possibly wrong alignment.

On lines starting with .BR & .IR avoid using \fB \fI as this
can cause problem when i.e. html rendered may keep use
italic bold when just italic was really wanted.

When using series of .TP/.IP - set the size only with the
first tag - and let renderer align others to match the column.

Correct some small typographical rendering issues.

Rendering was evaluated for readable results with:
- mandoc -T html  (-O style=mandoc.css)
- groff  -Thtml -mman
- man2html
- man -Thtml
- man -Tps
- man

Unfortunatelly various g/troff troubles are with each of them,
so we need to select usage of macros in a way, that is not mangling
results for above engines.
2025-04-28 14:19:18 +02:00
Zdenek Kabelac
fe14628818 man: generator update
Improve generated output for better compliance with '-T lint' checker
(mandoc -T lint and groff --mandoc).

Try to properly place .P sections and also correctly use .TP rendering
where we need to place '.na .ad'  after the first rendered keyword,
otherwise it has not the desired impact.

Also use  .nh .na ..  .ad .hy around whole command USAGE description
so we avoid unwanted alignment,spacing,hyphenation there.

Make sure we are emitting properly order paragraphs and avoid
i.e. submit of .br after .RS/.in  that has this implicit

Also more frequently emit '\n' so there are not too long lines as
rendering engine will format line breaking according to its rules.

To keep generated page better controllable emit more empty line
and use such lines for every .SH, .TP.

Use 'short_ops' loop to avoid duplicating code.

Emit .\|.\|. for 3dot sequence for proper graphical rendering

Emit \\0\\0\\0 (3 white space of width of letter '0')
for better alignment of options with graphical rendering.

There is ATM prepare '#define TABBED' - enabling this make
initial option list nicely aligned in graphical rendering
and doesn't seem to have bad side effect on text rendering.

man: generator use macros for options

Predefine all options used by the command into list of '.de O_name'
macros that are pregenerated in the front of man page.
(interestingly usage of groff strings (.ds) seems to have some
non-trivial issues across rendering engines)

This allows to use '\t' without producing warnings with
'mandoc -T lint' - as normally tabs are allowed only within
'.nf ... .fi' section, but than there is not working line-breaking.

While we could use purely 'tab' base version, for some 'html' (ascii)
redering its producing not so well indented option list.
For this reason use tabs only with graphical renderers .ie  t / .el
and use only spaces for ascii rendering.

Ensure the ...   (3dots continuation is properly renderer with
a single space after repeatable option/argument and not adding extra
space before i.e. closing bracket.

Using .ta for graphical rendering - allows to keep option aligned
with proportional font.
2025-04-28 14:19:15 +02:00
Zdenek Kabelac
df45871754 man: minor refactor
Minor updates to generator code.
2025-04-28 14:18:45 +02:00
David Teigland
9b985f3519 libdaemon: change connect error to log_debug
The message is unnecessary noise since callers print a
more user friendly message.
2025-04-22 16:18:51 -05:00
David Teigland
dcfa77c345 lvmdevices: skip lvmlockd connection
the command doesn't use locks from lvmlockd
2025-04-22 16:12:18 -05:00
Zdenek Kabelac
11b64b0c0c lvmcmdline: still support use of profile
Couple commands (lvcreate,lvconvert,vgcreate,lvchange,vgchange)
has the 'specific' property that within them the option --profile
behaves like --metadataprofile, while for all other commands this
option should be simply an alias for --commandprofile.

We may eventually drop this rather confusing behavior in the future
version and there will be only one use as --[command]profile

It should be noted this --commandprofile can be often used
instead of --config option for preconfiguring setting
for some group of commands - we should possibly more propagate
this usage.
2025-04-04 14:48:57 +02:00
Zdenek Kabelac
6838881956 libdm: fix missed init of regex pointer
Recent patch set for select enhancement missed to initialize
ssl struct element regex to NULL and this code might have
crashed on this code path evaluation.
2025-04-04 14:48:57 +02:00
Zdenek Kabelac
5d16beee57 WHATS_NEW: update 2025-04-01 15:37:36 +02:00
Zdenek Kabelac
26e86f9da9 make: generate 2025-04-01 15:37:36 +02:00
Zdenek Kabelac
b8b0fcfa10 cov: remove unused header 2025-04-01 15:37:36 +02:00
Zdenek Kabelac
6679438437 tests: check resize of snapshot with mounted origin 2025-04-01 15:37:36 +02:00
Zdenek Kabelac
1bf3961bbe tests: resize of mounted fs missed workaround
For older kernel, we need to suspend/resume.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
dcf37af2ca tests: preserve signess 2025-04-01 15:37:36 +02:00
Zdenek Kabelac
ebbdaccd9c tests: check unsupported vdo conversions
Validate unsupported vdo conversions are rejected.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
fafc0f76c5 tests: remove testing of old mirror with vdo
Actually mirror were never supposed to be usable with any newer
target as they are very problematic with any stacked usage.
So now it's going to be properly checked and prohibited.

Users are always supposed to use 'raid1' --type instead.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
491c6652ae command: use loop for short_opts pass
Slight refactoring of the code to take less size
as the code is used rather occasionally.

Correct some minor typographical issue.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
ea73594f07 man-generator: print LV1 also for options
We can print list of supported LV types for
options like --cachepool,--thinpool,--vdopool when
they are specifying particular LV.

TODO: while we nicely document them, the parser engine ATM
is not capable to validate and enforce these properties,
so the code needs to match them on its own.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
9ed7528d1f man-generator: add check for option overlap
Report --check error, when the option is required and optional
for the command.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
7becd29494 lvconvert: fix _lvconvert_visible_check ret code
_lvconvert_visible_check() used to validate visibility
of converted LV for changing mirrorlog, regionsize
and merging images.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
3687f7fee3 lvconvert: validate converted LV to vdopool
Although our command-line description file describes
supported types for conversion with some rules,
these are technically not yet fully implemented in
the code, thus we need explicit functionality to
validate passed LVs for conversion.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
74c178f7bf lvconvert: fix move is positional args
Properly shift args by 1 - hopefully 'argv[]' has the right size
to fit this single shift (as some option must have been there...)
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
82789f6134 lvconvert: simplify passing LV for conversion
Since command is defined to not taky any'free args',
we can actully avoid playing with positional args here
and just pass argv with a single arg.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
30fdd6b9b4 args: update name of kernel module
Use  '_' for kernel module name.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
63088e1f82 command-lines.in: matching vdopool conversion
Just use options in the same order as with --type vdo-pool
conversion.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
579054452b command-lines.in update some description
Add some explicit warning for commands that are destroying content
of converted volume.

Add thinpooldata to the list of allow LVs for caching
(as the code already support this).
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
253ef42362 command-lines.in: add info about implicity type
Short description about how the default implied type
is selected for this lvcreate command.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
54831ecabd command: update parameter from description
Parameter --profile is already 'generic' parameter,
so it's been listed twice in lvchange & vgchange.

Parameter --uuid was listed 2x in pvchange.
2025-04-01 15:37:36 +02:00
Zdenek Kabelac
a4951801fa tools: add suppport to recognize thinpooldata 2025-04-01 15:37:36 +02:00
Zdenek Kabelac
d0c9bcf6d7 validation: add check for single vdo segments
Add check for VDO LV and VDOPOOL LV having just
a single segment in LV.
Also add couple missing '.'  in error messages.
2025-04-01 15:37:36 +02:00
David Disseldorp
43a755d568 device-types: support zram
See Linux source Documentation/admin-guide/blockdev/zram.rst .
zram devices offer a good performance and efficient resource utilization
through the use of compression.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2025-04-01 15:37:36 +02:00
Bryn M. Reeves
12419e3b67 snapshot: fix lvresize when greater than max COW size
If lvresize is given a size > the maximum COW size for a given origin
the command will fail with an internal error and no error message:

  # lvresize --size 1.6g fedora/snaptest-snap
    Rounding size to boundary between physical extents: <1.59 GiB.
    Reached maximum COW size <1.01 GiB (258 extents).
    Command failed with status code 5.

  With -vvv:

  Found snapshot target v1.16.0.
  Getting target version for snapshot-origin
  dm versions   [ opencount flush ]   [2048] (*1)
  Found snapshot-origin target v1.9.0.
  Reached maximum COW size <1.01 GiB (258 extents). <<<
  Unlock: Memlock counters: prioritized:0 locked:0 critical:0 daemon:0 suspended:0
  Syncing device names
  Unlocking /run/lock/lvm/V_fedora
  _undo_flock /run/lock/lvm/V_fedora
  Freeing VG fedora at 0x55781b142890.
  Freeing VG fedora at 0x55781b136860.
  global/notify_dbus not found in config: defaulting to 1
  Destroy lvmcache content
  Completed: lvresize -vvv --debug --size 1706243072b fedora/snaptest-snap
  Internal error: Failed command did not use log_error

This happens because in this case _lvresize_adjust_extents() returns
early without setting lp->resize to either LV_EXTEND or LV_REDUCE after
capping lp->extents to the maximum COW size.

Fix this by just capping lp->extents and relying on the existing code in
_lvresize_adjust_extents() to fixup lp->resize in the case that
lp->extents == existing_logical_extents. This is consistent with the
no-op case where -l is given as the existing size:

root@localhost:~/src/git/lvm2# LD_LIBRARY_PATH="$PWD/tools" ./tools/lvm lvresize -L 1.6g fedora/snaptest-snap
  Rounding size to boundary between physical extents: 1.60 GiB.
  Reached maximum COW size <1.01 GiB (258 extents).
  New size (258 extents) matches existing size (258 extents).
  No size change.
2025-04-01 15:36:26 +02:00
Peter Rajnoha
0d17105292 libdm: report: select: remove fixme note from _create_field_selection
Let's keep the fail-safe check in for the case some combination (e.g.
after adding a new type) is not caught earlier in the _parse_selection.
2025-03-28 10:12:20 +01:00
Peter Rajnoha
1d94dd075d libdm: report: select: add support for string list regex selection
The c065b407cb77a7a14d7c7c3c94e09fcca2fcff09..872e085030ae8039f18908f6e45bad7ba99250a7
was for device_mapper/libdm-report.c. Do the same for libdm/libdm-report.c
2025-03-25 12:17:27 +01:00
Peter Rajnoha
872e085030 WHATS_NEW: update 2025-03-25 10:25:08 +01:00
Peter Rajnoha
959f775985 tests: select-report: cover string list regex selection 2025-03-25 10:25:08 +01:00
Peter Rajnoha
0c970d8ec7 man: lvmreport: update parts about string list selection 2025-03-25 10:25:08 +01:00
Peter Rajnoha
8d41afbc1f libdm: report: select: support string list selection based on a regex
Wire the field<-->selection comparison logic for regexes used for
string lists.
2025-03-25 10:25:08 +01:00
Peter Rajnoha
b4ebf69739 libdm: report: select: support parsing regex for a string list
Recognize regex in string list selection criterion, including grouping
items by using {} and [] together with && (or ",") and || (or "#")
logical operators:
  - [ <regex> && <regex> ... ]
  - [ <regex> || <regex> ... ]
  - { <regex> && <regex> ... ]
  - { <regex> || <regex> ... ]

Also recognize simple "<regex>" (without any grouping operators)
as a shortcut for "{ <regex> }".
2025-03-25 10:25:08 +01:00
Peter Rajnoha
8c696e463f libdm: report: select: lower initial size for selection mempool
The selection doesn't use that much memory, adjust the size accordingly.
2025-03-25 10:25:08 +01:00
Peter Rajnoha
91c29c318f libdm: report: selection: use separate regex mempool
Regex remembers the mempool it was given during dm_regex_create and
then it uses it for further allocation during dm_regex_match. This
could be dangerous in case we used the same mempool for any other
allocations/frees in between dm_regex_create and dm_regex_match calls
in the outer code. This patch adds separate regex mempool for the
report/select to avoid the possible issues.
2025-03-25 10:25:07 +01:00
Peter Rajnoha
d556d77363 libdm: report: select: default to subset if no grouping operator used
Previous patch made a proper difference between [...||...] and
[...&&...]. If the criterion for a string list does not use any [] or
{}, we need to make sure that proper matching function is called -
in this case not using {} or [] is the same as if {} was used
(matching subset).
2025-03-25 10:25:07 +01:00
Peter Rajnoha
649d17d221 tests: select-report: adjust test for matching [...||...] in string lists 2025-03-25 10:25:07 +01:00
Peter Rajnoha
b4a9897bd8 libdm: report: select: fix string list match for [...||...] selection
Matching a string list criterion which had [... || ... ] was not
correctly implemented - it was the same as [ ... && ... ]. This patch
makes a difference between the two:
  - [ ... || ... ] matches if all items from string list value are
    matched by ANY item from selection string list (that is, not
    all the selection string list items need to match)

  - [ ... && ... ] matches if all items from string list value are
    matched by an item from selection string list 1:1 (that is,
    all the selection string list items need to match)
2025-03-25 10:25:07 +01:00
Peter Rajnoha
523d796b15 libdm: report: select: remove superfluous struct reserved_value_wrapper param
Remove superfluous struct reserved_value_wrapper param for
_tok_value_regex function. The only thing that _tok_value did was
zeroing the reserve field within the struct. But this one is already
zero-initialied in outer _parse_selection function.
2025-03-25 10:25:07 +01:00
Peter Rajnoha
d9832565ec libdm: report: select: make internal errors related to incorrect field types clearer 2025-03-25 10:25:07 +01:00
Peter Rajnoha
6565ce22b7 libdm: report: select: also log function name for internal errors 2025-03-25 10:25:07 +01:00
Peter Rajnoha
53ccbdab1b libdm: report: select: add/edit comments for parser 2025-03-25 10:25:06 +01:00
Peter Rajnoha
c065b407cb libdm: report: select: move regex handling under common value token parsing
This is a cleanup and a preparation for adding support for regex matching
in string lists in subsequent patches.
2025-03-24 14:39:11 +01:00
129 changed files with 26277 additions and 14015 deletions

View File

@@ -1 +1 @@
2.03.32(2)-git (2025-02-27)
2.03.33(2)-git (2025-05-05)

View File

@@ -1 +1 @@
1.02.206-git (2025-02-27)
1.02.207-git (2025-05-05)

View File

@@ -1,7 +1,19 @@
Version 2.03.32 -
Version 2.03.33 -
==================
Override LC_NUMERIC locale if unsuitable for json_std report format.
Repair raid arrays with transiently lost devices.
Version 2.03.32 - 05th May 2025
===============================
Lvconvert vdopool conversion propperly validates acceptable LVs.
Accept thin pool data LV as cachable LV.
Allow using zram block devices (likely for testing).
Fix lvresize when resizing COW snapshots already covering origin.
Fix lvmdbusd read of executed lvm commands output.
Fix construction of DM UUID for cachevol _cdata and _cmeta devices.
Ignore PV claims from old metadata when then PV belongs to a new VG.
Fix integrity metadata rounding.
Accept --autobackup option in pvresize.
Version 2.03.31 - 27th February 2025
====================================

View File

@@ -1,5 +1,11 @@
Version 1.02.206 -
Version 1.02.207 -
===================
Fail dm_report_group_create if radix char from locale unsuitable for JSON_STD.
Version 1.02.206 - 05th May 2025
================================
Add support for using regex in selection criteria for string lists.
Fix string list selection when using [<item> || <item> ...].
Version 1.02.205 - 27th February 2025
=====================================

13
configure vendored
View File

@@ -12174,6 +12174,15 @@ printf "%s\n" "$BUILD_LOCKDSANLOCK" >&6; }
if test "$BUILD_LOCKDSANLOCK" = "yes"
then :
LOCKDSANLOCK_SUPPORT=370
if test -n "$PKG_CONFIG" && \
{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsanlock_client >= 4.0.0\""; } >&5
($PKG_CONFIG --exists --print-errors "libsanlock_client >= 4.0.0") 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
LOCKDSANLOCK_SUPPORT=400
fi
pkg_failed=no
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsanlock_client >= 3.7.0" >&5
@@ -12266,7 +12275,7 @@ printf "%s\n" "yes" >&6; }
BUILD_LVMLOCKD="yes"
fi
printf "%s\n" "#define LOCKDSANLOCK_SUPPORT 1" >>confdefs.h
printf "%s\n" "#define LOCKDSANLOCK_SUPPORT $LOCKDSANLOCK_SUPPORT" >>confdefs.h
fi
@@ -13694,7 +13703,7 @@ if test "$NOTIFYDBUS_SUPPORT" = "yes"
then :
printf "%s\n" "#define NOTIFYDBUS_SUPPORT 1" >>confdefs.h
]
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build notifydbus" >&5

View File

@@ -1,4 +1,3 @@
###############################################################################
## Copyright (C) 2000-2004 Sistina Software, Inc. All rights reserved.
## Copyright (C) 2004-2023 Red Hat, Inc. All rights reserved.
##
@@ -935,8 +934,10 @@ AC_MSG_RESULT([$BUILD_LOCKDSANLOCK])
dnl -- Look for sanlock libraries
AS_IF([test "$BUILD_LOCKDSANLOCK" = "yes"], [
LOCKDSANLOCK_SUPPORT=370
PKG_CHECK_EXISTS(libsanlock_client >= 4.0.0, [LOCKDSANLOCK_SUPPORT=400])
PKG_CHECK_MODULES(LIBSANLOCKCLIENT, libsanlock_client >= 3.7.0, [BUILD_LVMLOCKD="yes"])
AC_DEFINE([LOCKDSANLOCK_SUPPORT], 1, [Define to 1 to include code that uses lvmlockd sanlock option.])
AC_DEFINE_UNQUOTED([LOCKDSANLOCK_SUPPORT], [$LOCKDSANLOCK_SUPPORT], [Define version of sanlock.])
])
################################################################################
@@ -1292,7 +1293,7 @@ AS_IF([test "$NOTIFYDBUS_SUPPORT" = "maybe"],
[NOTIFYDBUS_SUPPORT="yes"], [NOTIFYDBUS_SUPPORT="no"])])
AS_IF([test "$NOTIFYDBUS_SUPPORT" = "yes"],
AC_DEFINE([NOTIFYDBUS_SUPPORT], 1, [Define to 1 to include code that uses dbus notification.])])
[AC_DEFINE([NOTIFYDBUS_SUPPORT], 1, [Define to 1 to include code that uses dbus notification.])])
AC_MSG_CHECKING([whether to build notifydbus])
AC_MSG_RESULT([$NOTIFYDBUS_SUPPORT])

View File

@@ -67,6 +67,156 @@ do { \
syslog(LOG_WARNING, fmt, ##args); \
} while (0)
/*
* Like sscanf, but requires buffer size to be specified
* for storing scanned strings, e.g.
*
* szscanf("%s", sizeof(buf), buf);
*
* Up to size-1 input bytes will be copied into buf.
* A null byte will be written to buf following the
* last copied byte. When nothing is copied to buf,
* no terminating null byte is written.
*
* If an input string matching %s is too long for the
* specified buffer size, the characters that would have
* been copied are ignored.
*
* Only recognizes: %d, %u, %s.
*/
static int szscanf(const char *input, const char *format, ...)
{
va_list args;
va_start(args, format);
const char *fm = format;
const char *in = input;
int matched = 0;
int n;
while (*fm != '\0') {
/*
* format is a string containing:
* 1. %d matching int from input
* %u matching unsigned int from input
* %s matching non-whitespace characters from input
* 2. whitespace chars matching zero or more whitespace
* characters from input
* 3. non-whitespace chars matching the same input chars
*/
if (*fm == '%') {
/*
* case 1: %u, %d, or %s
*/
/* advance past '%' character, to look for 'u', 'd' or 's' */
fm++;
if (*fm == 'd') {
/*
* read an int (%d)
*/
int *dest = va_arg(args, int *);
if (sscanf(in, "%d%n", dest, &n) == 1) {
in += n;
matched++;
} else {
/* matching failure: no input int */
break;
}
} else if (*fm == 'u') {
/*
* read an unsigned int (%u)
*/
unsigned int *dest = va_arg(args, unsigned int *);
if (sscanf(in, "%u%n", dest, &n) == 1) {
in += n;
matched++;
} else {
/* matching failure: no input unsigned int */
break;
}
} else if (*fm == 's') {
/*
* read a string (%s) into dest buffer with dest_size
* copy up to dest_size-1 characters into dest buffer
* write null byte into dest buffer following the last
* character copied. When dest_size-1 bytes are copied,
* the null byte is written into the final byte of the
* dest buffer. input bytes that would have been copied
* but did not fit in the dest buffer are skipped.
*/
size_t dest_size = va_arg(args, size_t);
char *dest = va_arg(args, char *);
char *out = dest;
/* don't copy leading input whitespace to dest */
while (isspace((unsigned char)*in))
in++;
/* copy non-whitespace characters from input to dest */
n = 0;
while (*in != '\0' && !isspace((unsigned char)*in) && (n < dest_size-1)) {
*out = *in;
out++;
in++;
n++;
}
if (n) {
dest[n] = '\0';
matched++;
} else {
/* matching failure: no input string chars */
break;
}
/* ignore input bytes that would have been copied but didn't fit */
while (*in != '\0' && !isspace((unsigned char)*in))
in++;
} else {
/* unsupported format specifier */
return -1;
}
/* advance past 'd', 'u', or 's' character */
fm++;
} else if (isspace((unsigned char)*fm)) {
/*
* case 2: format whitespace skips zero or more input
* whitespace characters
*/
while (isspace((unsigned char)*in))
in++;
/* advance past whitespace character */
fm++;
} else if (*fm == *in) {
/*
* case 3: literal character match between format and input
*/
fm++;
in++;
} else {
/*
* matching failure: format and input don't match
*/
break;
}
}
va_end(args);
return matched;
}
#define MAX_LINE 512
/* copied from lvmlockd-internal.h */
@@ -97,9 +247,11 @@ static void save_client_info(char *line)
uint32_t client_id = 0;
char name[MAX_NAME+1] = { 0 };
(void) sscanf(line, "info=client pid=%u fd=%d pi=%d id=%u name=%"
DM_TO_STRING(MAX_NAME) "s",
&pid, &fd, &pi, &client_id, name);
/* info=client pid=%u fd=%d pi=%d id=%u name=%s */
if (szscanf(line, "info=client pid=%u fd=%d pi=%d id=%u name=%s",
&pid, &fd, &pi, &client_id, sizeof(name), name) < 0)
return;
clients[num_clients].client_id = client_id;
clients[num_clients].pid = pid;
@@ -127,22 +279,26 @@ static void format_info_ls(char *line)
char ls_name[MAX_NAME+1] = { 0 };
char vg_name[MAX_NAME+1] = { 0 };
char vg_uuid[MAX_NAME+1] = { 0 };
char lock_args[MAX_ARGS+1] = { 0 };
char lock_type[MAX_NAME+1] = { 0 };
char vg_args[MAX_ARGS+1] = { 0 };
char lm_type[MAX_NAME+1] = { 0 };
(void) sscanf(line, "info=ls ls_name=%" DM_TO_STRING(MAX_NAME) "s vg_name=%"
DM_TO_STRING(MAX_NAME) "s vg_uuid=%" DM_TO_STRING(MAX_NAME)
"s vg_args=%" DM_TO_STRING(MAX_NAME) "s lm_type=%"
DM_TO_STRING(MAX_NAME) "s",
ls_name, vg_name, vg_uuid, lock_args, lock_type);
/* info=ls ls_name=%s vg_name=%s vg_uuid=%s vg_args=%s lm_type=%s */
if (szscanf(line, "info=ls ls_name=%s vg_name=%s vg_uuid=%s vg_args=%s lm_type=%s",
sizeof(ls_name), ls_name,
sizeof(vg_name), vg_name,
sizeof(vg_uuid), vg_uuid,
sizeof(vg_args), vg_args,
sizeof(lm_type), lm_type) < 0)
return;
if (!first_ls)
printf("\n");
first_ls = 0;
printf("VG %s lock_type=%s %s\n", vg_name, lock_type, vg_uuid);
printf("VG %s lock_type=%s %s\n", vg_name, lm_type, vg_uuid);
printf("LS %s %s\n", lock_type, ls_name);
printf("LS %s %s\n", lm_type, ls_name);
}
static void format_info_ls_action(char *line)
@@ -154,11 +310,14 @@ static void format_info_ls_action(char *line)
uint32_t pid = 0;
char cl_name[MAX_NAME+1] = { 0 };
(void) sscanf(line, "info=ls_action client_id=%u %"
DM_TO_STRING(MAX_NAME) "s %"
DM_TO_STRING(MAX_NAME) "s op=%"
DM_TO_STRING(MAX_NAME) "s",
&client_id, flags, version, op);
/* info=ls_action client_id=%u flags=%s version=%u op=%s rt=%s mode=%s lm_type=%s result=%d lm_rv=%d */
if (szscanf(line, "info=ls_action client_id=%u flags=%s version=%s op=%s",
&client_id,
sizeof(flags), flags,
sizeof(version), version,
sizeof(op), op) < 0)
return;
find_client_info(client_id, &pid, cl_name);
@@ -170,13 +329,18 @@ static void format_info_r(char *line, char *r_name_out, char *r_type_out)
char r_name[MAX_NAME+1] = { 0 };
char r_type[4] = { 0 };
char mode[4] = { 0 };
char sh_count[MAX_NAME+1] = { 0 };
uint32_t ver = 0;
int sh_count = 0;
unsigned int ver = 0;
(void) sscanf(line, "info=r name=%" DM_TO_STRING(MAX_NAME)
"s type=%3s mode=%3s %"
DM_TO_STRING(MAX_NAME) "s version=%u",
r_name, r_type, mode, sh_count, &ver);
/* info=r name=%s type=%s mode=%s sh_count=%d version=%s */
if (szscanf(line, "info=r name=%s type=%s mode=%s sh_count=%d version=%u",
sizeof(r_name), r_name,
sizeof(r_type), r_type,
sizeof(mode), mode,
&sh_count,
&ver) < 0)
return;
strcpy(r_name_out, r_name);
strcpy(r_type_out, r_type);
@@ -201,8 +365,8 @@ static void format_info_r(char *line, char *r_name_out, char *r_type_out)
static void format_info_lk(char *line, char *r_name, char *r_type)
{
char mode[4] = { 0 };
uint32_t ver = 0;
char flags[MAX_NAME+1] = { 0 };
uint32_t ver = 0;
uint32_t client_id = 0;
uint32_t pid = 0;
char cl_name[MAX_NAME+1] = { 0 };
@@ -213,9 +377,14 @@ static void format_info_lk(char *line, char *r_name, char *r_type)
return;
}
(void) sscanf(line, "info=lk mode=%3s version=%u %"
DM_TO_STRING(MAX_NAME) "s client_id=%u",
mode, &ver, flags, &client_id);
/* info=lk mode=%s version=%s flags=%s client_id=%u */
if (szscanf(line, "info=lk mode=%s version=%u flags=%s client_id=%u",
sizeof(mode), mode,
&ver,
sizeof(flags), flags,
&client_id) < 0)
return;
find_client_info(client_id, &pid, cl_name);
@@ -238,9 +407,9 @@ static void format_info_r_action(char *line, char *r_name, char *r_type)
char op[MAX_NAME+1] = { 0 };
char rt[4] = { 0 };
char mode[4] = { 0 };
char lm[MAX_NAME+1] = { 0 };
char result[MAX_NAME+1] = { 0 };
char lm_rv[MAX_NAME+1] = { 0 };
char lm_type[MAX_NAME+1] = { 0 };
int result = 0;
int lm_rv = 0;
uint32_t pid = 0;
char cl_name[MAX_NAME+1] = { 0 };
@@ -250,11 +419,19 @@ static void format_info_r_action(char *line, char *r_name, char *r_type)
return;
}
(void) sscanf(line, "info=r_action client_id=%u %" DM_TO_STRING(MAX_NAME)
"s %" DM_TO_STRING(MAX_NAME) "s op=%" DM_TO_STRING(MAX_NAME)
"s rt=%3s mode=%3s %" DM_TO_STRING(MAX_NAME) "s %"
DM_TO_STRING(MAX_NAME) "s %" DM_TO_STRING(MAX_NAME) "s",
&client_id, flags, version, op, rt, mode, lm, result, lm_rv);
/* info=r_action client_id=%u flags=%s version=%s op=%s rt=%s mode=%s lm_type=%s result=%d lm_rv=%d */
if (szscanf(line, "info=r_action client_id=%u flags=%s version=%s op=%s rt=%s mode=%s lm_type=%s result=%d lm_rv=%d",
&client_id,
sizeof(flags), flags,
sizeof(version), version,
sizeof(op), op,
sizeof(rt), rt,
sizeof(mode), mode,
sizeof(lm_type), lm_type,
&result,
&lm_rv) < 0)
return;
find_client_info(client_id, &pid, cl_name);

View File

@@ -57,5 +57,7 @@ static inline void lvmlockd_close(daemon_handle h)
#define EORPHAN 222
#define EADOPT_NONE 223
#define EADOPT_RETRY 224
#define EIOTIMEOUT 225
#define ELOCKREPAIR 226
#endif /* _LVM_LVMLOCKD_CLIENT_H */

View File

@@ -782,6 +782,8 @@ static const char *op_str(int x)
return "disable";
case LD_OP_START_WAIT:
return "start_wait";
case LD_OP_VG_STATUS:
return "vg_status";
case LD_OP_STOP_ALL:
return "stop_all";
case LD_OP_RENAME_BEFORE:
@@ -1044,17 +1046,32 @@ fail:
* These are few enough that arrays of function pointers can
* be avoided.
*/
static void lm_vg_status(struct lockspace *ls, struct action *act)
{
int rv = 0;
if (ls->lm_type == LD_LM_SANLOCK)
rv = lm_vg_status_sanlock(ls, act);
if (act)
act->lm_rv = rv;
}
static int lm_prepare_lockspace(struct lockspace *ls, struct action *act)
{
uint64_t prev_generation = 0;
int rv = -1;
if (ls->lm_type == LD_LM_DLM)
if (ls->lm_type == LD_LM_DLM) {
rv = lm_prepare_lockspace_dlm(ls);
else if (ls->lm_type == LD_LM_SANLOCK)
rv = lm_prepare_lockspace_sanlock(ls);
else if (ls->lm_type == LD_LM_IDM)
} else if (ls->lm_type == LD_LM_SANLOCK) {
rv = lm_prepare_lockspace_sanlock(ls, &prev_generation);
/* borrowing action.owner to avoid adding another action field */
if (!rv)
act->owner.generation = (uint32_t)prev_generation;
} else if (ls->lm_type == LD_LM_IDM) {
rv = lm_prepare_lockspace_idm(ls);
}
if (act)
act->lm_rv = rv;
@@ -1108,14 +1125,15 @@ static int lm_add_resource(struct lockspace *ls, struct resource *r)
}
static int lm_lock(struct lockspace *ls, struct resource *r, int mode, struct action *act,
struct val_blk *vb_out, int *retry, int adopt_only, int adopt_ok)
struct val_blk *vb_out, int *retry, struct owner *owner,
int adopt_only, int adopt_ok)
{
int rv = -1;
if (ls->lm_type == LD_LM_DLM)
rv = lm_lock_dlm(ls, r, mode, vb_out, adopt_only, adopt_ok);
else if (ls->lm_type == LD_LM_SANLOCK)
rv = lm_lock_sanlock(ls, r, mode, vb_out, retry, adopt_only, adopt_ok);
rv = lm_lock_sanlock(ls, r, mode, vb_out, retry, owner, adopt_only, adopt_ok);
else if (ls->lm_type == LD_LM_IDM)
rv = lm_lock_idm(ls, r, mode, vb_out, act->lv_uuid,
&act->pvs, adopt_only, adopt_ok);
@@ -1264,7 +1282,7 @@ static void add_work_action(struct action *act)
pthread_mutex_unlock(&worker_mutex);
}
static int res_lock(struct lockspace *ls, struct resource *r, struct action *act, int *retry)
static int res_lock(struct lockspace *ls, struct resource *r, struct action *act, int *retry, struct owner *owner)
{
struct lock *lk;
struct val_blk vb;
@@ -1289,7 +1307,7 @@ static int res_lock(struct lockspace *ls, struct resource *r, struct action *act
if (r->type == LD_RT_LV && act->lv_args[0])
memcpy(r->lv_args, act->lv_args, MAX_ARGS);
rv = lm_lock(ls, r, act->mode, act, &vb, retry,
rv = lm_lock(ls, r, act->mode, act, &vb, retry, owner,
act->flags & LD_AF_ADOPT_ONLY ? 1 : 0,
act->flags & LD_AF_ADOPT ? 1 : 0);
@@ -1901,6 +1919,7 @@ out:
static void res_process(struct lockspace *ls, struct resource *r,
struct list_head *act_close_list, int *retry_out)
{
struct owner owner = { 0 };
struct action *act, *safe, *act_close;
struct lock *lk;
uint32_t unlock_by_client_id = 0;
@@ -2189,8 +2208,15 @@ static void res_process(struct lockspace *ls, struct resource *r,
if (act->op == LD_OP_LOCK && act->mode == LD_LK_SH) {
lm_retry = 0;
memset(&owner, 0, sizeof(owner));
rv = res_lock(ls, r, act, &lm_retry, &owner);
/* TODO: if lock fails because it's owned by a failed host,
and persistent reservations are enabled, then remove the
pr of failed host_id, tell sanlock the host_id is now
dead, and retry lock request. */
rv = res_lock(ls, r, act, &lm_retry);
if ((rv == -EAGAIN) &&
(act->retries <= act->max_retries) &&
(lm_retry || (r->type != LD_RT_LV))) {
@@ -2199,6 +2225,8 @@ static void res_process(struct lockspace *ls, struct resource *r,
act->retries++;
*retry_out = 1;
} else {
if (rv == -EAGAIN)
memcpy(&act->owner, &owner, sizeof(owner));
act->result = rv;
list_del(&act->list);
add_client_result(act);
@@ -2222,8 +2250,10 @@ static void res_process(struct lockspace *ls, struct resource *r,
list_for_each_entry_safe(act, safe, &r->actions, list) {
if (act->op == LD_OP_LOCK && act->mode == LD_LK_EX) {
lm_retry = 0;
memset(&owner, 0, sizeof(owner));
rv = res_lock(ls, r, act, &lm_retry, &owner);
rv = res_lock(ls, r, act, &lm_retry);
if ((rv == -EAGAIN) &&
(act->retries <= act->max_retries) &&
(lm_retry || (r->type != LD_RT_LV))) {
@@ -2232,6 +2262,8 @@ static void res_process(struct lockspace *ls, struct resource *r,
act->retries++;
*retry_out = 1;
} else {
if (rv == -EAGAIN)
memcpy(&act->owner, &owner, sizeof(owner));
act->result = rv;
list_del(&act->list);
add_client_result(act);
@@ -2708,13 +2740,16 @@ static void *lockspace_thread_main(void *arg_in)
rv = lm_hosts(ls, 1);
if (rv) {
/*
* rv < 0: error (don't remove)
* rv > 0: other hosts in lockspace (cannot remove)
* rv = 0: only local host in lockspace (can remove)
* Checking for hosts here in addition to after the
* main loop allows vgremove to fail and be rerun
* after the ls is stopped on other hosts.
*/
log_error("S %s lockspace hosts %d", ls->name, rv);
list_del(&act->list);
act->result = -EBUSY;
act->result = (rv < 0) ? rv : -EBUSY;
add_client_result(act);
continue;
}
@@ -2727,7 +2762,9 @@ static void *lockspace_thread_main(void *arg_in)
if (act->op == LD_OP_BUSY && act->rt == LD_RT_VG) {
log_debug("S %s checking if lockspace is busy", ls->name);
rv = lm_hosts(ls, 0);
if (rv)
if (rv < 0)
act->result = rv;
else if (rv)
act->result = -EBUSY;
else
act->result = 0;
@@ -2743,7 +2780,7 @@ static void *lockspace_thread_main(void *arg_in)
if (rv) {
log_error("S %s lockspace hosts %d", ls->name, rv);
list_del(&act->list);
act->result = -EBUSY;
act->result = (rv < 0) ? rv : -EBUSY;
add_client_result(act);
continue;
}
@@ -3771,6 +3808,29 @@ static int work_init_lv(struct action *act)
}
}
static int work_vg_status(struct action *act)
{
struct lockspace *ls;
char ls_name[MAX_NAME+1];
int rv = 0;
memset(ls_name, 0, sizeof(ls_name));
vg_ls_name(act->vg_name, ls_name);
pthread_mutex_lock(&lockspaces_mutex);
ls = find_lockspace_name(ls_name);
if (ls) {
memcpy(act->vg_args, ls->vg_args, MAX_ARGS);
act->lm_type = ls->lm_type;
lm_vg_status(ls, act);
} else {
rv = -ENOENT;
}
pthread_mutex_unlock(&lockspaces_mutex);
return rv;
}
/*
* When an action is queued for the worker_thread, it is processed right away.
* After processing, some actions need to be retried again in a short while.
@@ -3890,6 +3950,10 @@ static void *worker_thread_main(void *arg_in)
else
list_add(&act->list, &delayed_list);
} else if (act->op == LD_OP_VG_STATUS) {
act->result = work_vg_status(act);
add_client_result(act);
} else if (act->op == LD_OP_STOP_ALL) {
act->result = for_each_lockspace(DO_STOP, DO_FREE, (act->flags & LD_AF_FORCE) ? DO_FORCE : NO_FORCE);
if (!act->result || !(act->flags & LD_AF_WAIT))
@@ -4235,6 +4299,73 @@ static int client_send_result(struct client *cl, struct action *act)
"result = " FMTd64, (int64_t) act->result,
"dump_len = " FMTd64, (int64_t) dump_len,
NULL);
} else if (act->op == LD_OP_LOCK && act->owner.host_id) {
/*
* lock reply with owner info
*/
log_debug("send %s[%d][%u] %s%s%s result %d owner %u %u %u %s %s",
cl->name[0] ? cl->name : "client", cl->pid, cl->id,
op_mode_str(act->op, act->mode), act->rt ? "_" : "", rt_str(act->rt), act->result,
act->owner.host_id, act->owner.generation, act->owner.timestamp,
act->owner.state[0] ? act->owner.state : "",
act->owner.name[0] ? act->owner.name : "");
res = daemon_reply_simple("OK",
"op = " FMTd64, (int64_t) act->op,
"lock_type = %s", lm_str(act->lm_type),
"op_result = " FMTd64, (int64_t) act->result,
"lm_result = " FMTd64, (int64_t) act->lm_rv,
"owner_host_id = " FMTd64, (int64_t) act->owner.host_id,
"owner_generation = " FMTd64, (int64_t) act->owner.generation,
"owner_timestamp = " FMTd64, (int64_t) act->owner.timestamp,
"owner_state = %s", act->owner.state[0] ? act->owner.state : "none",
"owner_name = %s", act->owner.name[0] ? act->owner.name : "none",
"result_flags = %s", result_flags[0] ? result_flags : "none",
NULL);
} else if (act->op == LD_OP_START && act->owner.generation) {
/*
* start_vg for sanlock returns the prev generation
*/
log_debug("send %s[%d][%u] %s%s%s result %d %s %s",
cl->name[0] ? cl->name : "client", cl->pid, cl->id,
op_mode_str(act->op, act->mode), act->rt ? "_" : "", rt_str(act->rt),
act->result, (act->result == -ENOLS) ? "ENOLS" : "", result_flags);
res = daemon_reply_simple("OK",
"op = " FMTd64, (int64_t) act->op,
"lock_type = %s", lm_str(act->lm_type),
"op_result = " FMTd64, (int64_t) act->result,
"lm_result = " FMTd64, (int64_t) act->lm_rv,
"prev_generation = " FMTd64, (int64_t) act->owner.generation,
"result_flags = %s", result_flags[0] ? result_flags : "none",
NULL);
} else if (act->op == LD_OP_VG_STATUS) {
log_debug("send %s[%d][%u] vg_status result %d owner %u %u %u %s",
cl->name[0] ? cl->name : "client", cl->pid, cl->id, act->result,
act->owner.host_id, act->owner.generation, act->owner.timestamp,
act->owner.state[0] ? act->owner.state : "");
res = daemon_reply_simple("OK",
"op = " FMTd64, (int64_t) act->op,
"lock_type = %s", lm_str(act->lm_type),
"op_result = " FMTd64, (int64_t) act->result,
"lm_result = " FMTd64, (int64_t) act->lm_rv,
"owner_host_id = " FMTd64, (int64_t) act->owner.host_id,
"owner_generation = " FMTd64, (int64_t) act->owner.generation,
"owner_timestamp = " FMTd64, (int64_t) act->owner.timestamp,
"owner_state = %s", act->owner.state[0] ? act->owner.state : "none",
"owner_name = %s", "none",
"result_flags = %s", result_flags[0] ? result_flags : "none",
NULL);
} else {
/*
* A normal reply.
@@ -4516,6 +4647,11 @@ static int str_to_op_rt(const char *req_name, int *op, int *rt)
*rt = 0;
return 0;
}
if (!strcmp(req_name, "vg_status")) {
*op = LD_OP_VG_STATUS;
*rt = LD_RT_VG;
return 0;
}
if (!strcmp(req_name, "stop_all")) {
*op = LD_OP_STOP_ALL;
*rt = 0;
@@ -4769,7 +4905,7 @@ static int print_lockspace(struct lockspace *ls, const char *prefix, int pos, in
"vg_uuid=%s "
"vg_args=%s "
"lm_type=%s "
"host_id=%llu "
"host_id=%u "
"create_fail=%d "
"create_done=%d "
"thread_work=%d "
@@ -4784,7 +4920,7 @@ static int print_lockspace(struct lockspace *ls, const char *prefix, int pos, in
ls->vg_uuid,
ls->vg_args,
lm_str(ls->lm_type),
(unsigned long long)ls->host_id,
ls->host_id,
ls->create_fail ? 1 : 0,
ls->create_done ? 1 : 0,
ls->thread_work ? 1 : 0,
@@ -5221,6 +5357,7 @@ skip_pvs_path:
break;
case LD_OP_INIT:
case LD_OP_START_WAIT:
case LD_OP_VG_STATUS:
case LD_OP_STOP_ALL:
case LD_OP_RENAME_FINAL:
case LD_OP_RUNNING_LM:

View File

@@ -799,6 +799,14 @@ int lm_unlock_dlm(struct lockspace *ls, struct resource *r,
* the stale lockspaces on the others eventually.)
*/
/*
* On error, returns < 0
*
* On success:
* If other hosts are found, returns the number.
* If no other hosts are found (only ourself), returns 0.
*/
int lm_hosts_dlm(struct lockspace *ls, int notify)
{
char ls_nodes_path[PATH_MAX];

View File

@@ -62,6 +62,7 @@ enum {
LD_OP_BUSY,
LD_OP_QUERY_LOCK,
LD_OP_REFRESH_LV,
LD_OP_VG_STATUS,
};
/* resource types */
@@ -130,12 +131,23 @@ struct pvs {
int num;
};
#define OWNER_NAME_SIZE 64
#define OWNER_STATE_SIZE 32
struct owner {
uint32_t host_id;
uint32_t generation;
uint32_t timestamp;
char state[OWNER_STATE_SIZE];
char name[OWNER_NAME_SIZE];
};
struct action {
struct list_head list;
uint32_t client_id;
uint32_t flags; /* LD_AF_ */
uint32_t version;
uint64_t host_id;
uint32_t host_id;
uint64_t lv_size_bytes;
int8_t op; /* operation type LD_OP_ */
int8_t rt; /* resource type LD_RT_ */
@@ -154,6 +166,7 @@ struct action {
char vg_args[MAX_ARGS+1];
char lv_args[MAX_ARGS+1];
char prev_lv_args[MAX_ARGS+1];
struct owner owner;
struct pvs pvs; /* PV list for idm */
};
@@ -195,7 +208,7 @@ struct lockspace {
char vg_args[MAX_ARGS+1]; /* lock manager specific args */
int8_t lm_type; /* lock manager: LM_DLM, LM_SANLOCK */
void *lm_data;
uint64_t host_id;
uint32_t host_id;
uint64_t free_lock_offset; /* for sanlock, start search for free lock here */
struct pvs pvs; /* for idm: PV list */
@@ -548,12 +561,12 @@ int lm_init_vg_sanlock(char *ls_name, char *vg_name, uint32_t flags, char *vg_ar
int lm_init_lv_sanlock(struct lockspace *ls, char *ls_name, char *vg_name, char *lv_name, char *vg_args, char *lv_args, char *prev_args);
int lm_free_lv_sanlock(struct lockspace *ls, struct resource *r);
int lm_rename_vg_sanlock(char *ls_name, char *vg_name, uint32_t flags, char *vg_args);
int lm_prepare_lockspace_sanlock(struct lockspace *ls);
int lm_prepare_lockspace_sanlock(struct lockspace *ls, uint64_t *prev_generation);
int lm_add_lockspace_sanlock(struct lockspace *ls, int adopt_only, int adopt_ok, int nodelay);
int lm_rem_lockspace_sanlock(struct lockspace *ls, int free_vg);
int lm_add_resource_sanlock(struct lockspace *ls, struct resource *r);
int lm_lock_sanlock(struct lockspace *ls, struct resource *r, int ld_mode,
struct val_blk *vb_out, int *retry,
struct val_blk *vb_out, int *retry, struct owner *owner,
int adopt_only, int adopt_ok);
int lm_convert_sanlock(struct lockspace *ls, struct resource *r,
int ld_mode, uint32_t r_version);
@@ -568,6 +581,7 @@ int lm_get_lockspaces_sanlock(struct list_head *ls_rejoin);
int lm_data_size_sanlock(void);
int lm_is_running_sanlock(void);
int lm_find_free_lock_sanlock(struct lockspace *ls, uint64_t lv_size_bytes);
int lm_vg_status_sanlock(struct lockspace *ls, struct action *act);
static inline int lm_support_sanlock(void)
{
@@ -596,7 +610,7 @@ static inline int lm_rename_vg_sanlock(char *ls_name, char *vg_name, uint32_t fl
return -1;
}
static inline int lm_prepare_lockspace_sanlock(struct lockspace *ls)
static inline int lm_prepare_lockspace_sanlock(struct lockspace *ls, uint64_t *prev_generation)
{
return -1;
}
@@ -617,7 +631,7 @@ static inline int lm_add_resource_sanlock(struct lockspace *ls, struct resource
}
static inline int lm_lock_sanlock(struct lockspace *ls, struct resource *r, int ld_mode,
struct val_blk *vb_out, int *retry,
struct val_blk *vb_out, int *retry, struct owner *owner,
int adopt_only, int adopt_ok)
{
return -1;
@@ -680,6 +694,11 @@ static inline int lm_find_free_lock_sanlock(struct lockspace *ls, uint64_t lv_si
return -1;
}
static inline int lm_vg_status_sanlock(struct lockspace *ls, struct action *act)
{
return -1;
}
static inline int lm_support_sanlock(void)
{
return 0;

View File

@@ -26,6 +26,8 @@
/* FIXME: copied from sanlock header until the sanlock update is more widespread */
#define SANLK_ADD_NODELAY 0x00000002
/* FIXME: copied from sanlock header until the sanlock update is more widespread */
#define SANLK_GET_HOST_LOCAL 0x00000001
#include <stddef.h>
#include <poll.h>
@@ -473,12 +475,23 @@ static int get_sizes_device(char *path, uint64_t *dev_size, int *sector_size, in
return -1;
}
static int _lease_corrupt_error(int rv)
{
if (rv == SANLK_LEADER_MAGIC ||
rv == SANLK_LEADER_VERSION ||
rv == SANLK_LEADER_LOCKSPACE ||
rv == SANLK_LEADER_RESOURCE ||
rv == SANLK_LEADER_CHECKSUM ||
rv == SANLK_DBLOCK_CHECKSUM)
return 1;
return 0;
}
/* Get the sector/align sizes that were used to create an existing VG.
sanlock encoded this in the lockspace/resource structs on disk. */
static int get_sizes_lockspace(char *path, int *sector_size, int *align_size, int *align_mb,
uint32_t *ss_flags, uint32_t *rs_flags)
static int read_lockspace_info(char *path, uint32_t host_id, int *sector_size, int *align_size, int *align_mb,
uint32_t *ss_flags, uint32_t *rs_flags, struct sanlk_host *hs)
{
struct sanlk_lockspace ss;
uint32_t io_timeout = 0;
@@ -487,10 +500,20 @@ static int get_sizes_lockspace(char *path, int *sector_size, int *align_size, in
memset(&ss, 0, sizeof(ss));
memcpy(ss.host_id_disk.path, path, SANLK_PATH_LEN);
ss.host_id_disk.offset = 0;
ss.host_id = host_id;
#if LOCKDSANLOCK_SUPPORT >= 400
if (hs)
rv = sanlock_read_lockspace_host(&ss, 0, &io_timeout, hs);
else
#endif
rv = sanlock_read_lockspace(&ss, 0, &io_timeout);
if (_lease_corrupt_error(rv))
return -ELOCKREPAIR;
rv = sanlock_read_lockspace(&ss, 0, &io_timeout);
if (rv < 0) {
log_error("get_sizes_lockspace %s error %d", path, rv);
log_error("read_lockspace_info %s %u error %d", path, host_id, rv);
return rv;
}
@@ -530,7 +553,8 @@ static int get_sizes_lockspace(char *path, int *sector_size, int *align_size, in
*rs_flags = SANLK_RES_SECTOR512 | SANLK_RES_ALIGN1M;
}
log_debug("get_sizes_lockspace found %d %d", *sector_size, *align_size);
log_debug("read_lockspace_info %s %u found sector_size %d align_size %d",
path, host_id, *sector_size, *align_size);
return 0;
}
@@ -829,9 +853,11 @@ int lm_init_lv_sanlock(struct lockspace *ls, char *ls_name, char *vg_name, char
/* FIXME: optimize repeated init_lv for vgchange --locktype sanlock,
to avoid finding align_size/rs_flags each time. */
rv = get_sizes_lockspace(disk_path, &sector_size, &align_size, &align_mb, &ss_flags, &rs_flags);
/* using host_id 1 to get sizes since we don't need host-specific info */
rv = read_lockspace_info(disk_path, 1, &sector_size, &align_size, &align_mb, &ss_flags, &rs_flags, NULL);
if (rv < 0) {
log_error("S %s init_lv_san get_sizes error %d %s",
log_error("S %s init_lv_san read_lockspace_info error %d %s",
ls_name, rv, disk_path);
return rv;
}
@@ -1445,7 +1471,7 @@ int lm_find_free_lock_sanlock(struct lockspace *ls, uint64_t lv_size_bytes)
* This should also not create any major problems.
*/
int lm_prepare_lockspace_sanlock(struct lockspace *ls)
int lm_prepare_lockspace_sanlock(struct lockspace *ls, uint64_t *prev_generation)
{
struct stat st;
struct lm_sanlock *lms = NULL;
@@ -1454,6 +1480,7 @@ int lm_prepare_lockspace_sanlock(struct lockspace *ls)
char disk_path[SANLK_PATH_LEN];
char killpath[SANLK_PATH_LEN];
char killargs[SANLK_PATH_LEN];
struct sanlk_host hs = { 0 };
uint32_t ss_flags = 0;
uint32_t rs_flags = 0;
int sector_size = 0;
@@ -1559,7 +1586,7 @@ int lm_prepare_lockspace_sanlock(struct lockspace *ls)
goto fail;
}
log_debug("set killpath to %s %s", killpath, killargs);
log_debug("S %s prepare_lockspace_san set killpath to %s %s", lsname, killpath, killargs);
rv = sanlock_killpath(lms->sock, 0, killpath, killargs);
if (rv < 0) {
@@ -1575,13 +1602,15 @@ int lm_prepare_lockspace_sanlock(struct lockspace *ls)
goto fail;
}
rv = get_sizes_lockspace(disk_path, &sector_size, &align_size, &align_mb, &ss_flags, &rs_flags);
rv = read_lockspace_info(disk_path, lms->ss.host_id, &sector_size, &align_size, &align_mb, &ss_flags, &rs_flags, &hs);
if (rv < 0) {
log_error("S %s prepare_lockspace_san cannot get sector/align sizes %d", lsname, rv);
log_error("S %s prepare_lockspace_san cannot read lockspace info %d", lsname, rv);
ret = -EMANAGER;
goto fail;
}
*prev_generation = hs.generation;
if (!sector_size) {
log_debug("S %s prepare_lockspace_san using old size method", lsname);
/* use the old method */
@@ -1595,16 +1624,16 @@ int lm_prepare_lockspace_sanlock(struct lockspace *ls)
log_debug("S %s prepare_lockspace_san found old sector_size %d align_size %d", lsname, sector_size, align_size);
}
log_debug("S %s prepare_lockspace_san sector_size %d align_mb %d align_size %d",
lsname, sector_size, align_mb, align_size);
log_debug("S %s prepare_lockspace_san sector_size %d align_mb %d align_size %d prev_generation %llu",
lsname, sector_size, align_mb, align_size, (unsigned long long)hs.generation);
if (sector_size == 4096) {
if (((align_mb == 1) && (ls->host_id > 250)) ||
((align_mb == 2) && (ls->host_id > 500)) ||
((align_mb == 4) && (ls->host_id > 1000)) ||
((align_mb == 8) && (ls->host_id > 2000))) {
log_error("S %s prepare_lockspace_san invalid host_id %llu for align %d MiB",
lsname, (unsigned long long)ls->host_id, align_mb);
log_error("S %s prepare_lockspace_san invalid host_id %u for align %d MiB",
lsname, ls->host_id, align_mb);
ret = -EHOSTID;
goto fail;
}
@@ -1797,13 +1826,33 @@ int lm_rem_resource_sanlock(struct lockspace *ls, struct resource *r)
return 0;
}
static const char *_host_flags_to_str(uint32_t flags)
{
int val = flags & SANLK_HOST_MASK;
if (val == SANLK_HOST_FREE)
return "FREE";
if (val == SANLK_HOST_LIVE)
return "LIVE";
if (val == SANLK_HOST_FAIL)
return "FAIL";
if (val == SANLK_HOST_DEAD)
return "DEAD";
if (val == SANLK_HOST_UNKNOWN)
return "UNKNOWN";
return "ERROR";
}
int lm_lock_sanlock(struct lockspace *ls, struct resource *r, int ld_mode,
struct val_blk *vb_out, int *retry, int adopt_only, int adopt_ok)
struct val_blk *vb_out, int *retry, struct owner *owner,
int adopt_only, int adopt_ok)
{
struct lm_sanlock *lms = (struct lm_sanlock *)ls->lm_data;
struct rd_sanlock *rds = (struct rd_sanlock *)r->lm_data;
struct sanlk_resource *rs;
struct sanlk_options opt;
struct sanlk_host owner_host = { 0 };
char *owner_name = NULL;
uint64_t lock_lv_offset;
uint32_t flags = 0;
struct val_blk vb = { 0 };
@@ -1907,7 +1956,11 @@ int lm_lock_sanlock(struct lockspace *ls, struct resource *r, int ld_mode,
memset(&opt, 0, sizeof(opt));
sprintf(opt.owner_name, "%s", "lvmlockd");
#if LOCKDSANLOCK_SUPPORT >= 400
rv = sanlock_acquire2(lms->sock, -1, flags, rs, &opt, &owner_host, &owner_name);
#else
rv = sanlock_acquire(lms->sock, -1, flags, 1, &rs, &opt);
#endif
/*
* errors: translate the sanlock error number to an lvmlockd error.
@@ -1915,17 +1968,6 @@ int lm_lock_sanlock(struct lockspace *ls, struct resource *r, int ld_mode,
* this function to code that doesn't recognize sanlock error numbers.
*/
if (rv == -EAGAIN) {
/*
* It appears that sanlock_acquire returns EAGAIN when we request
* a shared lock but the lock is held ex by another host.
* There's no point in retrying this case, just return an error.
*/
log_debug("%s:%s lock_san acquire mode %d rv EAGAIN", ls->name, r->name, ld_mode);
*retry = 0;
return -EAGAIN;
}
if ((rv == -EMSGSIZE) && (r->type == LD_RT_LV)) {
/*
* sanlock tried to read beyond the end of the device,
@@ -1962,64 +2004,68 @@ int lm_lock_sanlock(struct lockspace *ls, struct resource *r, int ld_mode,
return -EADOPT_NONE;
}
if (rv == SANLK_ACQUIRE_IDLIVE || rv == SANLK_ACQUIRE_OWNED || rv == SANLK_ACQUIRE_OTHER) {
if (rv == SANLK_ACQUIRE_IDLIVE ||
rv == SANLK_ACQUIRE_OWNED ||
rv == SANLK_ACQUIRE_OTHER ||
rv == SANLK_ACQUIRE_OWNED_RETRY ||
rv == -EAGAIN) {
/*
* The lock is held by another host. These failures can
* happen while multiple hosts are concurrently acquiring
* shared locks. We want to retry a couple times in this
* case because we'll probably get the sh lock.
* EAGAIN: when a shared lock is held, and we request an ex lock.
*
* I believe these are also the errors when requesting an
* ex lock that another host holds ex. We want to report
* something like: "lock is held by another host" in this case.
* Retry is pointless here.
* OWNED_RETRY: the lock is held by a failed but not yet dead host.
* Retrying will eventually find the host is dead (and the lock is
* granted), or another host has acquired it.
*
* We can't distinguish between the two cases above,
* so if requesting a sh lock, retry a couple times,
* otherwise don't.
* Multiple hosts all requesting shared locks can also result in
* some transient errors here (shared locks involve acquiring the
* paxos lease ex for a short period, which means two hosts both
* requesting sh at once can cause one to fail here.)
* Retry here to attempt to cover these transient failures.
*
* The command also has its own configurable retry logic.
* The intention is to handle actual lock contention retries
* from the command, and the transient failures from concurrent
* shared requests here. We don't actually know when a failure
* was related to the transient concurrent sh, so we just guess
* it was if we were requesting a sh lock.
*/
log_debug("%s:%s lock_san acquire mode %d rv %d", ls->name, r->name, ld_mode, rv);
*retry = (ld_mode == LD_LK_SH) ? 1 : 0;
if (rv == SANLK_ACQUIRE_OWNED_RETRY)
*retry = 0;
if (owner && owner_host.host_id) {
const char *host_state;
owner->host_id = (uint32_t)owner_host.host_id;
owner->generation = (uint32_t)owner_host.generation;
owner->timestamp = (uint32_t)owner_host.timestamp;
if ((host_state = _host_flags_to_str(owner_host.flags)))
dm_strncpy(owner->state, host_state, OWNER_STATE_SIZE-1);
if (owner_name) {
dm_strncpy(owner->name, owner_name, OWNER_NAME_SIZE-1);
free(owner_name);
}
log_debug("%s:%s lock_san acquire mode %d lock held %d owner %u %u %u %s %s",
ls->name, r->name, ld_mode, rv,
owner->host_id, owner->generation, owner->timestamp,
owner->state, owner->name ?: "");
} else {
log_debug("%s:%s lock_san acquire mode %d lock held %d",
ls->name, r->name, ld_mode, rv);
}
return -EAGAIN;
}
if (rv == SANLK_AIO_TIMEOUT) {
/*
* sanlock got an i/o timeout when trying to acquire the
* lease on disk.
*/
log_debug("%s:%s lock_san acquire mode %d rv %d", ls->name, r->name, ld_mode, rv);
log_debug("%s:%s lock_san acquire mode %d io timeout", ls->name, r->name, ld_mode);
*retry = 0;
return -EAGAIN;
}
if (rv == SANLK_DBLOCK_LVER || rv == SANLK_DBLOCK_MBAL) {
/*
* There was contention with another host for the lease,
* and we lost.
*/
log_debug("%s:%s lock_san acquire mode %d rv %d", ls->name, r->name, ld_mode, rv);
*retry = 0;
return -EAGAIN;
}
if (rv == SANLK_ACQUIRE_OWNED_RETRY) {
/*
* The lock is held by a failed host, and will eventually
* expire. If we retry we'll eventually acquire the lock
* (or find someone else has acquired it). The EAGAIN retry
* attempts for SH locks above would not be sufficient for
* the length of expiration time. We could add a longer
* retry time here to cover the full expiration time and block
* the activation command for that long. For now just return
* the standard error indicating that another host still owns
* the lease. FIXME: return a different error number so the
* command can print an different error indicating that the
* owner of the lease is in the process of expiring?
*/
log_debug("%s:%s lock_san acquire mode %d rv %d", ls->name, r->name, ld_mode, rv);
*retry = 0;
return -EAGAIN;
return -EIOTIMEOUT;
}
if (rv < 0) {
@@ -2041,9 +2087,16 @@ int lm_lock_sanlock(struct lockspace *ls, struct resource *r, int ld_mode,
lm_rem_resource_sanlock(ls, r);
/* sanlock gets i/o errors trying to read/write the leases. */
if (rv == -EIO)
if (rv == -EIO ||
rv == SANLK_LEADER_READ ||
rv == SANLK_LEADER_WRITE ||
rv == SANLK_DBLOCK_READ ||
rv == SANLK_DBLOCK_WRITE)
return -ELOCKIO;
if (_lease_corrupt_error(rv))
return -ELOCKREPAIR;
/*
* The sanlock lockspace can disappear if the lease storage fails,
* the delta lease renewals fail, the lockspace enters recovery,
@@ -2162,8 +2215,6 @@ int lm_convert_sanlock(struct lockspace *ls, struct resource *r,
case SANLK_ACQUIRE_OWNED_RETRY:
case SANLK_ACQUIRE_OTHER:
case SANLK_AIO_TIMEOUT:
case SANLK_DBLOCK_LVER:
case SANLK_DBLOCK_MBAL:
/* expected errors from known/normal cases like lock contention or io timeouts */
log_debug("%s:%s convert_san error %d", ls->name, r->name, rv);
return -EAGAIN;
@@ -2192,12 +2243,15 @@ static int release_rename(struct lockspace *ls, struct resource *r)
if (!res_args)
return -ENOMEM;
memcpy(&rd1, rds, sizeof(struct rd_sanlock));
memcpy(&rd2, rds, sizeof(struct rd_sanlock));
memcpy(&rd1, &rds->rs, sizeof(struct rd_sanlock));
memcpy(&rd2, &rds->rs, sizeof(struct rd_sanlock));
res1 = (struct sanlk_resource *)&rd1;
res2 = (struct sanlk_resource *)&rd2;
if (memcmp(res1->name, r->name, SANLK_NAME_LEN))
log_error("%s:%s unlock_san release rename bad name %.48s", ls->name, r->name, res1->name);
strcpy_name_len(res2->name, "invalid_removed", SANLK_NAME_LEN);
res_args[0] = res1;
@@ -2296,6 +2350,39 @@ int lm_unlock_sanlock(struct lockspace *ls, struct resource *r,
return 0;
}
int lm_vg_status_sanlock(struct lockspace *ls, struct action *act)
{
struct sanlk_host *hs;
const char *host_state;
int count = 0;
int rv;
if (daemon_test)
return 0;
rv = sanlock_get_hosts(ls->name, 0, &hs, &count, SANLK_GET_HOST_LOCAL);
if (rv < 0) {
log_error("S %s vg_status_san get_hosts error %d", ls->name, rv);
return rv;
}
act->owner.host_id = (uint32_t)hs->host_id;
act->owner.generation = (uint32_t)hs->generation;
act->owner.timestamp = (uint32_t)hs->timestamp;
if ((host_state = _host_flags_to_str(hs->flags)))
dm_strncpy(act->owner.state, host_state, OWNER_STATE_SIZE-1);
return 0;
}
/*
* On error, returns < 0
* Else:
* If other hosts are found, returns the number.
* If no other hosts are found (only ourself), returns 0.
*/
int lm_hosts_sanlock(struct lockspace *ls, int notify)
{
struct sanlk_host *hss = NULL;
@@ -2310,14 +2397,25 @@ int lm_hosts_sanlock(struct lockspace *ls, int notify)
return 0;
rv = sanlock_get_hosts(ls->name, 0, &hss, &hss_count, 0);
if (rv == -EAGAIN) {
/*
* No host info is available yet (perhaps lockspace was
* just started so other host state is unknown.) Pretend
* there is one other host (busy).
*/
log_debug("S %s hosts_san no info, retry later", ls->name);
return 1;
}
if (rv < 0) {
log_error("S %s hosts_san get_hosts error %d", ls->name, rv);
return 0;
return -1;
}
if (!hss || !hss_count) {
log_error("S %s hosts_san zero hosts", ls->name);
return 0;
return -1;
}
hs = hss;
@@ -2329,14 +2427,14 @@ int lm_hosts_sanlock(struct lockspace *ls, int notify)
(unsigned long long)hs->generation,
hs->flags);
if (hs->host_id == ls->host_id) {
if ((uint32_t)hs->host_id == ls->host_id) {
found_self = 1;
hs++;
continue;
}
state = hs->flags & SANLK_HOST_MASK;
if (state == SANLK_HOST_LIVE)
if ((state == SANLK_HOST_LIVE) || (state == SANLK_HOST_UNKNOWN))
found_others++;
hs++;
}
@@ -2358,7 +2456,7 @@ int lm_hosts_sanlock(struct lockspace *ls, int notify)
if (!found_self) {
log_error("S %s hosts_san self not found others %d", ls->name, found_others);
return 0;
return -1;
}
return found_others;
@@ -2416,3 +2514,4 @@ int lm_is_running_sanlock(void)
return 0;
return 1;
}

View File

@@ -25,6 +25,7 @@ DEVICE_MAPPER_SOURCE=\
device_mapper/libdm-targets.c \
device_mapper/libdm-timestamp.c \
device_mapper/mm/pool.c \
device_mapper/raid/raid_parser.c \
device_mapper/regex/matcher.c \
device_mapper/regex/parse_rx.c \
device_mapper/regex/ttree.c \

View File

@@ -19,6 +19,7 @@
#include "base/data-struct/list.h"
#include "base/data-struct/hash.h"
#include "raid/target.h"
#include "vdo/target.h"
#include <inttypes.h>

View File

@@ -17,6 +17,7 @@
#include "base/memory/zalloc.h"
#include <ctype.h>
#include <langinfo.h>
#include <math.h> /* fabs() */
#include <float.h> /* DBL_EPSILON */
#include <time.h>
@@ -31,6 +32,7 @@
struct selection {
struct dm_pool *mem;
struct dm_pool *regex_mem;
struct selection_node *selection_root;
int add_new_fields;
};
@@ -204,7 +206,9 @@ static const struct op_def _op_log[] = {
struct selection_str_list {
struct dm_str_list str_list;
unsigned type; /* either SEL_AND or SEL_OR */
struct dm_regex *regex;
size_t regex_num_patterns;
unsigned type; /* either SEL_LIST_LS or SEL_LIST_SUBSET_LS with either SEL_AND or SEL_OR */
};
struct field_selection_value {
@@ -1412,8 +1416,11 @@ struct dm_report *dm_report_init(uint32_t *report_types,
void dm_report_free(struct dm_report *rh)
{
if (rh->selection)
if (rh->selection) {
dm_pool_destroy(rh->selection->mem);
if (rh->selection->regex_mem)
dm_pool_destroy(rh->selection->regex_mem);
}
if (rh->value_cache)
dm_hash_destroy(rh->value_cache);
dm_pool_destroy(rh->mem);
@@ -1752,8 +1759,74 @@ static int _cmp_field_time(struct dm_report *rh,
return 0;
}
static int _str_list_item_match_regex(const struct str_list_sort_value *val, unsigned int i, struct dm_regex *regex)
{
struct pos_len *item = val->items + i;
char *s = (char *) (val->value + item->pos);
char c = s[item->len];
int r;
/*
* The val->items contains the whole string list in the form of a single string,
* where each item is delimited by a delimiter.
*
* The item->pos + item->len pair then points to the exact item within the val->items.
*
* The dm_regex_match accepts a string, not the pos + len pair, so we need to adapt here:
* replace the delimiter with '\0' temporarily so the item is a proper string.
*/
s[item->len] = '\0';
r = dm_regex_match(regex, s);
s[item->len] = c;
return r;
}
static size_t _bitset_count_set(dm_bitset_t bs)
{
size_t i, size = bs[0]/DM_BITS_PER_INT + 1;
size_t count = 0;
for (i = 1; i <= size; i++)
count += hweight32(bs[i]);
return count;
}
/* Matches if all items from selection string list match list value strictly 1:1. */
static int _cmp_field_string_list_strict_all(const struct str_list_sort_value *val,
static int _cmp_field_string_list_strict_regex_all(const struct dm_report *rh,
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
unsigned int i;
dm_bitset_t bs;
int r;
if (!val->items)
return (sel->regex_num_patterns == 1) && dm_regex_match(sel->regex, "") >= 0;
if (!(bs = dm_bitset_create(rh->selection->mem, sel->regex_num_patterns))) {
log_error("Failed to create bitset for regex match counter.");
return 0;
}
for (i = 1; i <= val->items[0].pos; i++) {
if ((r = _str_list_item_match_regex(val, i, sel->regex)) < 0) {
r = 0;
goto out;
}
dm_bit_set(bs, r);
}
r = _bitset_count_set(bs) == sel->regex_num_patterns;
out:
dm_pool_free(rh->selection->mem, bs);
return r;
}
/* Matches if all items from selection string list match list value strictly 1:1. */
static int _cmp_field_string_list_strict_all(const struct dm_report *rh,
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
unsigned int sel_list_size = dm_list_size(&sel->str_list.list);
@@ -1785,7 +1858,36 @@ static int _cmp_field_string_list_strict_all(const struct str_list_sort_value *v
}
/* Matches if all items from selection string list match a subset of list value. */
static int _cmp_field_string_list_subset_all(const struct str_list_sort_value *val,
static int _cmp_field_string_list_subset_regex_all(const struct dm_report *rh,
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
dm_bitset_t bs;
unsigned int i;
int r;
if (!val->items)
return (sel->regex_num_patterns == 1) && dm_regex_match(sel->regex, "") >= 0;
if (!(bs = dm_bitset_create(rh->selection->mem, sel->regex_num_patterns))) {
log_error("Failed to create bitset for regex match counter.");
return 0;
}
for (i = 1; i <= val->items[0].pos; i++) {
if ((r = _str_list_item_match_regex(val, i, sel->regex)) < 0)
continue;
dm_bit_set(bs, r);
}
r = _bitset_count_set(bs) == sel->regex_num_patterns;
dm_pool_free(rh->selection->mem, bs);
return r;
}
/* Matches if all items from selection string list match a subset of list value. */
static int _cmp_field_string_list_subset_all(const struct dm_report *rh __attribute__((unused)),
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
unsigned int sel_list_size = dm_list_size(&sel->str_list.list);
@@ -1820,8 +1922,26 @@ static int _cmp_field_string_list_subset_all(const struct str_list_sort_value *v
}
/* Matches if any item from selection string list matches list value. */
static int _cmp_field_string_list_any(const struct str_list_sort_value *val,
const struct selection_str_list *sel)
static int _cmp_field_string_list_subset_regex_any(const struct dm_report *rh __attribute__((unused)),
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
unsigned int i;
if (!val->items)
return dm_regex_match(sel->regex, "") >= 0;
for (i = 1; i <= val->items[0].pos; i++) {
if (_str_list_item_match_regex(val, i, sel->regex) >= 0)
return 1;
}
return 0;
}
/* Matches if any item from selection string list matches list value. */
static int _cmp_field_string_list_subset_any(const struct dm_report *rh __attribute__((unused)),
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
struct dm_str_list *sel_item;
unsigned int i;
@@ -1850,7 +1970,59 @@ static int _cmp_field_string_list_any(const struct str_list_sort_value *val,
return 0;
}
static int _cmp_field_string_list(struct dm_report *rh __attribute__((unused)),
/* Matches if all items from list value can be matched by any item from selection list. */
static int _cmp_field_string_list_strict_regex_any(const struct dm_report *rh __attribute__((unused)),
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
unsigned int i;
if (!val->items)
return dm_regex_match(sel->regex, "") >= 0;
for (i = 1; i <= val->items[0].pos; i++) {
if (_str_list_item_match_regex(val, i, sel->regex) < 0)
return 0;
}
return 1;
}
/* Matches if all items from list value can be matched by any item from selection list. */
static int _cmp_field_string_list_strict_any(const struct dm_report *rh __attribute__((unused)),
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
struct dm_str_list *sel_item;
unsigned int i;
int match;
/* match blank string list with selection that contains blank string */
if (!val->items) {
dm_list_iterate_items(sel_item, &sel->str_list.list) {
if (!strcmp(sel_item->str, ""))
return 1;
}
return 0;
}
for (i = 1; i <= val->items[0].pos; i++) {
match = 0;
dm_list_iterate_items(sel_item, &sel->str_list.list) {
if ((strlen(sel_item->str) == val->items[i].len) &&
!strncmp(sel_item->str, val->value + val->items[i].pos, val->items[i].len)) {
match = 1;
break;
}
}
if (!match)
return 0;
}
return 1;
}
static int _cmp_field_string_list(struct dm_report *rh,
uint32_t field_num, const char *field_id,
const struct str_list_sort_value *val,
struct field_selection *fs)
@@ -1872,11 +2044,16 @@ static int _cmp_field_string_list(struct dm_report *rh __attribute__((unused)),
switch (sel->type & SEL_MASK) {
case SEL_AND:
r = subset ? _cmp_field_string_list_subset_all(val, sel)
: _cmp_field_string_list_strict_all(val, sel);
r = subset ? sel->regex ? _cmp_field_string_list_subset_regex_all(rh, val, sel)
: _cmp_field_string_list_subset_all(rh, val, sel)
: sel->regex ? _cmp_field_string_list_strict_regex_all(rh, val, sel)
: _cmp_field_string_list_strict_all(rh, val, sel);
break;
case SEL_OR:
r = _cmp_field_string_list_any(val, sel);
r = subset ? sel->regex ? _cmp_field_string_list_subset_regex_any(rh, val, sel)
: _cmp_field_string_list_subset_any(rh, val, sel)
: sel->regex ? _cmp_field_string_list_strict_regex_any(rh, val, sel)
: _cmp_field_string_list_strict_any(rh, val, sel);
break;
default:
log_error(INTERNAL_ERROR "_cmp_field_string_list: unsupported string "
@@ -1910,7 +2087,17 @@ static int _compare_selection_field(struct dm_report *rh,
}
if (fs->flags & FLD_CMP_REGEX)
r = _cmp_field_regex((const char *) f->sort_value, fs);
switch (f->props->flags & DM_REPORT_FIELD_TYPE_MASK) {
case DM_REPORT_FIELD_TYPE_STRING:
r = _cmp_field_regex((const char *) f->sort_value, fs);
break;
case DM_REPORT_FIELD_TYPE_STRING_LIST:
r = _cmp_field_string_list(rh, f->props->field_num, field_id, (const struct str_list_sort_value *) f->sort_value, fs);
break;
default:
log_error(INTERNAL_ERROR "_compare_selection_field: regex: incorrect type %" PRIu32 " for field %s",
f->props->flags & DM_REPORT_FIELD_TYPE_MASK, field_id);
}
else {
switch(f->props->flags & DM_REPORT_FIELD_TYPE_MASK) {
case DM_REPORT_FIELD_TYPE_PERCENT:
@@ -1937,7 +2124,8 @@ static int _compare_selection_field(struct dm_report *rh,
r = _cmp_field_time(rh, f->props->field_num, field_id, *(const time_t *) f->sort_value, fs);
break;
default:
log_error(INTERNAL_ERROR "_compare_selection_field: unknown field type for field %s", field_id);
log_error(INTERNAL_ERROR "_compare_selection_field: incorrect type %" PRIu32 " for field %s",
f->props->flags & DM_REPORT_FIELD_TYPE_MASK, field_id);
}
}
@@ -2629,11 +2817,9 @@ static int _check_reserved_values_supported(const struct dm_report_field_type fi
static const char *_tok_value_regex(struct dm_report *rh,
const struct dm_report_field_type *ft,
const char *s, const char **begin,
const char **end, uint32_t *flags,
struct reserved_value_wrapper *rvw)
const char **end, uint32_t *flags)
{
char c;
rvw->reserved = NULL;
s = _skip_space(s);
@@ -2696,7 +2882,8 @@ static int _add_item_to_string_list(struct dm_pool *mem, const char *begin,
static const char *_tok_value_string_list(const struct dm_report_field_type *ft,
struct dm_pool *mem, const char *s,
const char **begin, const char **end,
struct selection_str_list **sel_str_list)
struct selection_str_list **sel_str_list,
uint32_t *flags)
{
static const char _str_list_item_parsing_failed[] = "Failed to parse string list value "
"for selection field %s.";
@@ -2710,12 +2897,11 @@ static const char *_tok_value_string_list(const struct dm_report_field_type *ft,
int list_end = 0;
char c;
if (!(ssl = dm_pool_alloc(mem, sizeof(*ssl)))) {
log_error("_tok_value_string_list: memory allocation failed for selection list");
if (!(ssl = dm_pool_zalloc(mem, sizeof(*ssl)))) {
log_error("_tok_value_string_list: memory allocation failed for selection list.");
goto bad;
}
dm_list_init(&ssl->str_list.list);
ssl->type = 0;
*begin = s;
if (!(op_flags = _tok_op_log(s, &tmp, SEL_LIST_LS | SEL_LIST_SUBSET_LS))) {
@@ -2727,7 +2913,7 @@ static const char *_tok_value_string_list(const struct dm_report_field_type *ft,
}
if (!_add_item_to_string_list(mem, begin_item, end_item, &ssl->str_list.list))
goto_bad;
ssl->type = SEL_OR | SEL_LIST_LS;
ssl->type = SEL_OR | SEL_LIST_SUBSET_LS;
goto out;
}
@@ -2802,12 +2988,17 @@ static const char *_tok_value_string_list(const struct dm_report_field_type *ft,
else
ssl->type |= SEL_LIST_SUBSET_LS;
/* Sort the list. */
if (!(list_size = dm_list_size(&ssl->str_list.list))) {
log_error(INTERNAL_ERROR "_tok_value_string_list: list has no items");
goto bad;
} else if (list_size == 1)
goto out;
if (*flags & FLD_CMP_REGEX)
/* No need to sort the list for regex. */
goto out;
/* Sort the list. */
if (!(arr = malloc(sizeof(item) * list_size))) {
log_error("_tok_value_string_list: memory allocation failed for sort array");
goto bad;
@@ -3323,7 +3514,10 @@ static const char *_tok_value(struct dm_report *rh,
s = _skip_space(s);
s = _get_reserved(rh, expected_type, field_num, implicit, s, begin, end, rvw);
/* recognize possible reserved value (but not in a regex) */
if (!(*flags & FLD_CMP_REGEX))
s = _get_reserved(rh, expected_type, field_num, implicit, s, begin, end, rvw);
if (rvw->reserved) {
/*
* FLD_CMP_NUMBER shares operators with FLD_CMP_TIME,
@@ -3334,17 +3528,24 @@ static const char *_tok_value(struct dm_report *rh,
else if (expected_type == DM_REPORT_FIELD_TYPE_NUMBER)
*flags &= ~FLD_CMP_TIME;
*flags |= expected_type;
/* if we matched a reserved value, skip further processing of this token */
return s;
}
switch (expected_type) {
case DM_REPORT_FIELD_TYPE_STRING:
c = _get_and_skip_quote_char(&s);
if (!(s = _tok_value_string(s, begin, end, c, SEL_AND | SEL_OR | SEL_PRECEDENCE_PE, NULL))) {
log_error("Failed to parse string value "
"for selection field %s.", ft->id);
return NULL;
if (*flags & FLD_CMP_REGEX) {
if (!(s = _tok_value_regex(rh, ft, s, begin, end, flags)))
return NULL;
} else {
c = _get_and_skip_quote_char(&s);
if (!(s = _tok_value_string(s, begin, end, c, SEL_AND | SEL_OR | SEL_PRECEDENCE_PE, NULL))) {
log_error("Failed to parse string value "
"for selection field %s.", ft->id);
return NULL;
}
}
*flags |= DM_REPORT_FIELD_TYPE_STRING;
break;
@@ -3353,7 +3554,7 @@ static const char *_tok_value(struct dm_report *rh,
if (!(str_list = (struct selection_str_list **) custom))
goto_bad;
s = _tok_value_string_list(ft, mem, s, begin, end, str_list);
s = _tok_value_string_list(ft, mem, s, begin, end, str_list, flags);
if (!(*str_list)) {
log_error("Failed to parse string list value "
"for selection field %s.", ft->id);
@@ -3437,7 +3638,7 @@ static const char *_tok_value(struct dm_report *rh,
return s;
bad:
log_error(INTERNAL_ERROR "Forbidden NULL custom detected.");
log_error(INTERNAL_ERROR "_tok_value: Forbidden NULL custom parameter detected.");
return NULL;
}
@@ -3508,6 +3709,19 @@ static int _get_reserved_value(struct dm_report *rh, uint32_t field_num,
return 1;
}
static struct dm_regex *_selection_regex_create(struct selection *selection, const char * const *patterns,
unsigned num_patterns)
{
if (!selection->regex_mem) {
if (!(selection->regex_mem = dm_pool_create("report selection regex", 32 * 1024))) {
log_error("Failed to create report selection regex memory pool.");
return NULL;
}
}
return dm_regex_create(selection->regex_mem, patterns, num_patterns);
}
static struct field_selection *_create_field_selection(struct dm_report *rh,
uint32_t field_num,
int implicit,
@@ -3525,7 +3739,11 @@ static struct field_selection *_create_field_selection(struct dm_report *rh,
struct time_value *tval;
uint64_t factor;
char *s;
const char *s_array[2] = { 0 };
const char *s_arr_single[2] = { 0 };
const char **s_arr;
size_t s_arr_size;
struct dm_str_list *sl;
size_t i;
dm_list_iterate_items(fp, &rh->field_props) {
if ((fp->implicit == implicit) && (fp->field_num == field_num)) {
@@ -3590,21 +3808,53 @@ static struct field_selection *_create_field_selection(struct dm_report *rh,
/* store comparison operand */
if (flags & FLD_CMP_REGEX) {
/* REGEX */
if (!(s = malloc(len + 1))) {
log_error("dm_report: malloc failed to store "
"regex value for selection field %s", field_id);
goto error;
}
memcpy(s, v, len);
s[len] = '\0';
s_array[0] = s;
switch (flags & DM_REPORT_FIELD_TYPE_MASK) {
case DM_REPORT_FIELD_TYPE_STRING:
if (!(s = malloc(len + 1))) {
log_error("dm_report: malloc failed to store "
"regex value for selection field %s", field_id);
goto error;
}
memcpy(s, v, len);
s[len] = '\0';
s_arr_single[0] = s;
fs->value->v.r = dm_regex_create(rh->selection->mem, s_array, 1);
free(s);
if (!fs->value->v.r) {
log_error("dm_report: failed to create regex "
"matcher for selection field %s", field_id);
goto error;
fs->value->v.r = _selection_regex_create(rh->selection, s_arr_single, 1);
free(s);
if (!fs->value->v.r) {
log_error("dm_report: failed to create regex "
"matcher for selection field %s", field_id);
goto error;
}
break;
case DM_REPORT_FIELD_TYPE_STRING_LIST:
if (!custom)
goto bad;
fs->value->v.l = *((struct selection_str_list **) custom);
s_arr_size = dm_list_size(&fs->value->v.l->str_list.list);
if (!(s_arr = malloc(sizeof(char *) * s_arr_size))) {
log_error("dm_report: malloc failed for regex array "
"for selection field %s", field_id);
goto error;
}
i = 0;
dm_list_iterate_items(sl, &fs->value->v.l->str_list.list)
s_arr[i++] = sl->str;
fs->value->v.l->regex = _selection_regex_create(rh->selection, s_arr, s_arr_size);
fs->value->v.l->regex_num_patterns = s_arr_size;
free(s_arr);
if (!fs->value->v.l->regex) {
log_error("dm_report: failed to create regex "
"matcher for selection field %s", field_id);
goto error;
}
break;
default:
log_error(INTERNAL_ERROR "_create_field_selection: regex: incorrect type %" PRIu32 " for field %s",
flags & DM_REPORT_FIELD_TYPE_MASK, field_id);
goto error;
}
} else {
/* STRING, NUMBER, SIZE, PERCENT, STRING_LIST, TIME */
@@ -3718,8 +3968,8 @@ static struct field_selection *_create_field_selection(struct dm_report *rh,
}
break;
default:
log_error(INTERNAL_ERROR "_create_field_selection: "
"unknown type of selection field %s", field_id);
log_error(INTERNAL_ERROR "_create_field_selection: incorrect type %" PRIu32 " for field %s",
flags & DM_REPORT_FIELD_TYPE_MASK, field_id);
goto error;
}
}
@@ -3730,7 +3980,7 @@ error_field_id:
field_id);
goto error;
bad:
log_error(INTERNAL_ERROR "Forbidden NULL custom detected.");
log_error(INTERNAL_ERROR "_create_field_selection: Forbidden NULL custom detected.");
error:
dm_pool_free(rh->selection->mem, fs);
@@ -3866,7 +4116,7 @@ static struct selection_node *_parse_selection(struct dm_report *rh,
char *tmp;
char c;
/* field name */
/* get field name */
if (!(last = _tok_field_name(s, &ws, &we))) {
log_error("Expecting field name");
goto bad;
@@ -3899,7 +4149,7 @@ static struct selection_node *_parse_selection(struct dm_report *rh,
} else
ft = &rh->fields[field_num];
/* comparison operator */
/* get comparison operator */
if (!(flags = _tok_op_cmp(we, &last))) {
_display_selection_help(rh);
log_error("Unrecognised comparison operator: %s", we);
@@ -3911,50 +4161,49 @@ static struct selection_node *_parse_selection(struct dm_report *rh,
goto bad;
}
/* comparison value */
/* check we can use the operator with the field */
if (flags & FLD_CMP_REGEX) {
/*
* REGEX value
*/
if (!(last = _tok_value_regex(rh, ft, last, &vs, &ve, &flags, &rvw)))
goto_bad;
} else {
/*
* STRING, NUMBER, SIZE, PERCENT, STRING_LIST, TIME value
*/
if (flags & FLD_CMP_NUMBER) {
if (!(ft->flags & (DM_REPORT_FIELD_TYPE_NUMBER |
DM_REPORT_FIELD_TYPE_SIZE |
DM_REPORT_FIELD_TYPE_PERCENT |
DM_REPORT_FIELD_TYPE_TIME))) {
_display_selection_help(rh);
log_error("Operator can be used only with number, size, time or percent fields: %s", ws);
goto bad;
}
} else if (flags & FLD_CMP_TIME) {
if (!(ft->flags & DM_REPORT_FIELD_TYPE_TIME)) {
_display_selection_help(rh);
log_error("Operator can be used only with time fields: %s", ws);
goto bad;
}
if (!(ft->flags & (DM_REPORT_FIELD_TYPE_STRING |
DM_REPORT_FIELD_TYPE_STRING_LIST))) {
_display_selection_help(rh);
log_error("Operator can be used only with string or string list fields: %s", ws);
goto bad;
}
} else if (flags & FLD_CMP_NUMBER) {
if (!(ft->flags & (DM_REPORT_FIELD_TYPE_NUMBER |
DM_REPORT_FIELD_TYPE_SIZE |
DM_REPORT_FIELD_TYPE_PERCENT |
DM_REPORT_FIELD_TYPE_TIME))) {
_display_selection_help(rh);
log_error("Operator can be used only with number, size, time or percent fields: %s", ws);
goto bad;
}
} else if (flags & FLD_CMP_TIME) {
if (!(ft->flags & DM_REPORT_FIELD_TYPE_TIME)) {
_display_selection_help(rh);
log_error("Operator can be used only with time fields: %s", ws);
goto bad;
}
if (ft->flags == DM_REPORT_FIELD_TYPE_SIZE ||
ft->flags == DM_REPORT_FIELD_TYPE_NUMBER ||
ft->flags == DM_REPORT_FIELD_TYPE_PERCENT)
custom = &factor;
else if (ft->flags & DM_REPORT_FIELD_TYPE_TIME)
custom = &tval;
else if (ft->flags == DM_REPORT_FIELD_TYPE_STRING_LIST)
custom = &str_list;
else
custom = NULL;
if (!(last = _tok_value(rh, ft, field_num, implicit,
last, &vs, &ve, &flags,
&rvw, rh->selection->mem, custom)))
goto_bad;
}
/* assign custom structures to hold extra information for specific value types */
if (ft->flags == DM_REPORT_FIELD_TYPE_SIZE ||
ft->flags == DM_REPORT_FIELD_TYPE_NUMBER ||
ft->flags == DM_REPORT_FIELD_TYPE_PERCENT)
custom = &factor;
else if (ft->flags & DM_REPORT_FIELD_TYPE_TIME)
custom = &tval;
else if (ft->flags == DM_REPORT_FIELD_TYPE_STRING_LIST)
custom = &str_list;
else
custom = NULL;
/* get value to compare with */
if (!(last = _tok_value(rh, ft, field_num, implicit,
last, &vs, &ve, &flags,
&rvw, rh->selection->mem, custom)))
goto_bad;
*next = _skip_space(last);
/* create selection */
@@ -4095,7 +4344,7 @@ error:
static int _alloc_rh_selection(struct dm_report *rh)
{
if (!(rh->selection = dm_pool_zalloc(rh->mem, sizeof(struct selection))) ||
!(rh->selection->mem = dm_pool_create("report selection", 10 * 1024))) {
!(rh->selection->mem = dm_pool_create("report selection", 1024))) {
log_error("Failed to allocate report selection structure.");
if (rh->selection)
dm_pool_free(rh->mem, rh->selection);
@@ -5102,6 +5351,15 @@ struct dm_report_group *dm_report_group_create(dm_report_group_type_t type, void
struct dm_pool *mem;
struct report_group_item *item;
if (type == DM_REPORT_GROUP_JSON_STD) {
const char * radixchar = nl_langinfo(RADIXCHAR);
if (radixchar && strcmp(radixchar, ".")) {
log_error("dm_report: incompatible locale used for DM_REPORT_GROUP_JSON_STD, "
"radix character is '%s', expected '.'", radixchar);
return NULL;
}
}
if (!(mem = dm_pool_create("report_group", 1024))) {
log_error("dm_report: dm_report_init_group: failed to allocate mem pool");
return NULL;

View File

@@ -0,0 +1,165 @@
/*
* Copyright (C) 2024 Red Hat, Inc. All rights reserved.
*
* This file is part of the device-mapper userspace tools.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License v.2.1.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*
* Support counting number of failed device bits in dm-raid superblock bit arrays or clear them out.
*/
#include "device_mapper/misc/dmlib.h"
#include "device_mapper/all.h"
#include "device_mapper/raid/target.h"
#include "lib/mm/xlate.h"
#include <fcntl.h>
#include <unistd.h>
/* Copied/derived from kernel's drivers/md/dm-raid.c so this is prone to out-of-sync (factor out to header file?). */
#define MAX_RAID_DEVICES 253 /* md-raid kernel limit? */
#define UINT64_BITS (sizeof(uint64_t) * 8)
#define DISKS_ARRAY_ELEMS ((MAX_RAID_DEVICES + (UINT64_BITS - 1)) / UINT64_BITS)
#define DM_RAID_SB_MAGIC 0x446D5264 /* "DmRd" */
#define FEATURE_FLAG_SUPPORTS_V190 0x1 /* Supports extended superblock */
/* RAID superblock at beginning of rmeta SubLVs trimmed down to mandatory members. */
struct dm_raid_superblock {
__le32 magic; /* "DmRd" */
__le32 compat_features; /* Used to indicate compatible features (like 1.9.0 ondisk metadata extension) */
__le32 dummy[4];
__le64 failed_devices; /* Pre 1.9.0 part of bit field of devices to */
/* indicate device failures (see extension below) */
__le32 dummy1[7];
/********************************************************************
* BELOW FOLLOW V1.9.0 EXTENSIONS TO THE PRISTINE SUPERBLOCK FORMAT!!!
*
* FEATURE_FLAG_SUPPORTS_V190 in the compat_features member indicates that those exist
*/
__le32 flags; /* Flags defining array states for reshaping */
__le32 dummy2[14];
__le64 extended_failed_devices[DISKS_ARRAY_ELEMS - 1];
__le32 dummy3;
/* Always set rest up to logical block size to 0 when writing ... */
} __packed;
/* END: Copied from ... */
/* Superblock I/O buffer size to be able to Cope with 4K native devices... */
#define SB_BUFSZ 4096
static size_t _get_sb_size(const struct dm_raid_superblock *sb)
{
return (FEATURE_FLAG_SUPPORTS_V190 & le32_to_cpu(sb->compat_features)) ?
sizeof(*sb) : ((char *) &sb->flags - (char *) sb);
}
static uint32_t _hweight64(__le64 v)
{
uint32_t r = 0;
while (v) {
r += v & 1;
v >>= 1;
}
return r;
}
static uint32_t _hweight_failed(struct dm_raid_superblock *sb)
{
uint32_t r = _hweight64(sb->failed_devices);
if (_get_sb_size(sb) == sizeof(*sb)) {
size_t i = DM_ARRAY_SIZE(sb->extended_failed_devices);
while (i--)
r = max(r, _hweight64(sb->extended_failed_devices[i]));
}
return r;
}
static void _clear_failed_devices(struct dm_raid_superblock *sb)
{
sb->failed_devices = 0;
if (_get_sb_size(sb) == sizeof(*sb))
memset(sb->extended_failed_devices, 0, sizeof(sb->extended_failed_devices));
}
static int _count_or_clear_failed_devices(const char *dev_path, bool clear, uint32_t *nr_failed)
{
struct dm_raid_superblock *sb = NULL;
size_t sz;
int fd, r = 0;
if (posix_memalign((void *) &sb, SB_BUFSZ, SB_BUFSZ)) {
log_sys_error("Failed to allocate RAID superblock buffer", dev_path);
return 0;
}
fd = open(dev_path, O_EXCL | ((clear) ? O_RDWR : O_RDONLY) | O_DIRECT);
if (fd < 0) {
log_sys_error("Failed to open RAID metadata volume", dev_path);
goto out;
}
if (read(fd, sb, SB_BUFSZ) != SB_BUFSZ) {
log_sys_error("Failed to read RAID metadata volume", dev_path);
goto out;
}
/* FIXME: big endian??? */
if (sb->magic != cpu_to_be32(DM_RAID_SB_MAGIC)) {
log_error("No RAID signature on %s.", dev_path);
goto out;
}
if (nr_failed)
*nr_failed = _hweight_failed(sb);
if (clear) {
if (lseek(fd, 0, SEEK_SET) < 0) {
log_sys_error("Failed to seek RAID metadata volume", dev_path);
goto out;
}
sz = _get_sb_size(sb);
memset((void *)((char *) sb + sz), 0, SB_BUFSZ - sz);
_clear_failed_devices(sb);
if (write(fd, sb, SB_BUFSZ) != SB_BUFSZ) {
log_sys_error("Failed to clear RAID metadata volume", dev_path);
goto out;
}
}
r = 1;
out:
if ((fd >= 0) && close(fd))
log_sys_debug("close", dev_path);
free(sb);
return r;
}
int dm_raid_count_failed_devices(const char *dev_path, uint32_t *nr_failed)
{
return _count_or_clear_failed_devices(dev_path, false, nr_failed);
}
int dm_raid_clear_failed_devices(const char *dev_path, uint32_t *nr_failed)
{
return _count_or_clear_failed_devices(dev_path, true, nr_failed);
}

View File

@@ -0,0 +1,23 @@
/*
* Copyright (C) 2024 Red Hat, Inc. All rights reserved.
*
* This file is part of the device-mapper userspace tools.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License v.2.1.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef DEVICE_MAPPER_RAID_TARGET_H
#define DEVICE_MAPPER_RAID_TARGET_H
#include <stdint.h>
int dm_raid_count_failed_devices(const char *dev_path, uint32_t *nr_failed);
int dm_raid_clear_failed_devices(const char *dev_path, uint32_t *nr_failed);
#endif

View File

@@ -0,0 +1,26 @@
<!-- Page title -->
[[!meta title="Version 2.03.32 - Bug Fix Release"]]
Version 2.03.32
===============
Mostly bugfix release:
* Add support for using regex in selection criteria for string lists.
* Accept thin pool data LV as cachable LV.
* Accept `--autobackup` option in pvresize.
* Allow using zram block devices (likely for testing).
* Lvconvert vdopool conversion propperly validates acceptable LVs.
* Fix lvresize when resizing COW snapshots already covering origin.
* Fix lvmdbusd read of executed lvm commands output.
* Fix construction of DM UUID for cachevol `_cdata` and `_cmeta` devices.
* Ignore PV claims from old metadata when then PV belongs to a new VG.
* Fix integrity metadata rounding.
* Fix string list selection when using `[<item> || <item> ...]`.
<!-- remove the pending tag on release, remove draft tag once editing is complete -->
[[!tag]]
<!--
For old releases add Release Timestamp like this, date from git show $COMMIT is fine.
[[!meta date="Mon May 05 17:02:00 2025 +0200"]]
-->

View File

@@ -579,7 +579,7 @@
/* Define to 1 to include code that uses lvmlockd IDM option. */
#undef LOCKDIDM_SUPPORT
/* Define to 1 to include code that uses lvmlockd sanlock option. */
/* Define version of sanlock. */
#undef LOCKDSANLOCK_SUPPORT
/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing

View File

@@ -197,6 +197,8 @@ int lv_raid_mismatch_count(const struct logical_volume *lv, uint64_t *cnt);
int lv_raid_sync_action(const struct logical_volume *lv, char **sync_action);
int lv_raid_message(const struct logical_volume *lv, const char *msg);
int lv_raid_status(const struct logical_volume *lv, struct lv_status_raid **status);
int lv_raid_clear_failed_devices(const struct logical_volume *lv);
int lv_raid_count_failed_devices(const struct logical_volume *lv, uint32_t *failed_cnt);
int lv_writecache_message(const struct logical_volume *lv, const char *msg);
int lv_cache_status(const struct logical_volume *cache_lv,
struct lv_status_cache **status);

View File

@@ -21,7 +21,6 @@
#include "lib/device/device_id.h"
#include "lib/locking/locking.h"
#include "lib/metadata/metadata.h"
#include "lib/mm/memlock.h"
#include "lib/format_text/format-text.h"
#include "lib/config/config.h"
#include "lib/filters/filter.h"

View File

@@ -73,7 +73,8 @@ struct cmd_context_initialized_parts {
};
struct cmd_report {
int log_only;
unsigned log_only:1;
unsigned lc_numeric_override:1;
dm_report_group_type_t report_group_type;
struct dm_report_group *report_group;
struct dm_report *log_rh;

View File

@@ -999,6 +999,9 @@ int fs_get_blkid(const char *pathname, struct fs_info *fsi)
if (!blkid_probe_lookup_value(probe, "FSSIZE", &str, &len) && len)
fssize = strtoull(str, NULL, 0);
if (!blkid_probe_lookup_value(probe, "UUID", &str, &len) && len)
memcpy(fsi->uuid, str, UUID_LEN);
blkid_free_probe(probe);
if (fslastblock && fsblocksize)
@@ -1015,6 +1018,13 @@ int fs_get_blkid(const char *pathname, struct fs_info *fsi)
fsi->fs_last_byte += fsblocksize;
}
/*
* For a multi-devices btrfs, fslastblock * fsblocksize means the whole fs size.
* Thus here fs_last_byte can't be used as a device size boundary.
* Let btrfs handle it.
*/
if (!strcmp(fsi->fstype, "btrfs"))
fsi->fs_last_byte = 0;
log_debug("libblkid TYPE %s BLOCK_SIZE %d FSLASTBLOCK %llu FSBLOCKSIZE %u fs_last_byte %llu",
fsi->fstype, fsi->fs_block_size_bytes, (unsigned long long)fslastblock, fsblocksize,

View File

@@ -70,6 +70,7 @@ static const dev_known_type_t _dev_known_types[] = {
{"nvme", 64, "NVM Express"},
{"zvol", 16, "ZFS Zvols"},
{"VxDMP", 16, "Veritas Dynamic Multipathing"},
{"zram", 1, "zram block device"},
{"", 0, ""}
};

View File

@@ -108,6 +108,151 @@ int lv_crypt_is_active(struct cmd_context *cmd, char *lv_path)
return _get_crypt_path(st_lv.st_rdev, lv_path, crypt_path);
}
static int _fs_get_mnt(struct fs_info *fsi, dev_t devt)
{
struct stat stme;
FILE *fme = NULL;
struct mntent *me;
/*
* Note: used swap devices are not considered as mount points,
* hence they're not listed in /etc/mtab, we'd need to read the
* /proc/swaps instead. We don't need it at this moment though,
* but if we do once, read the /proc/swaps here if fsi->fstype == "swap".
*/
if (!(fme = setmntent("/etc/mtab", "r")))
return_0;
while ((me = getmntent(fme))) {
if (strcmp(me->mnt_type, fsi->fstype))
continue;
if (me->mnt_dir[0] != '/')
continue;
if (me->mnt_fsname[0] != '/')
continue;
/*
* st_dev of mnt_dir in btrfs is an anonymous device number,
* use mnt_fsname instead.
*/
if (!strcmp(fsi->fstype, "btrfs")) {
if (stat(me->mnt_fsname, &stme) < 0)
log_sys_error("stat", me->mnt_fsname);
if (stme.st_rdev != devt)
continue;
} else {
if (stat(me->mnt_dir, &stme) < 0)
continue;
if (stme.st_dev != devt)
continue;
fsi->mounted = 1;
}
log_debug("fs_get_info %s is mounted \"%s\"", fsi->fs_dev_path, me->mnt_dir);
strncpy(fsi->mount_dir, me->mnt_dir, PATH_MAX-1);
}
endmntent(fme);
return 1;
}
static int _btrfs_get_mnt(struct fs_info *fsi, dev_t lv_devt)
{
char devices_path[PATH_MAX];
char rdev_path[PATH_MAX];
unsigned major, minor;
dev_t devt;
char buffer[16];
char *device_name;
DIR *dr;
struct dirent *de;
int ret = 1;
int fd = -1;
int r;
bool found = false;
/* For a mounted btrfs, there will be a sys dir like /sys/fs/btrfs/$uuid/devices */
if (!dm_snprintf(devices_path, sizeof(devices_path), "%sfs/btrfs/%s/devices",
dm_sysfs_dir(), fsi->uuid)) {
log_error("Couldn't create btrfs devices path for %s.", fsi->fs_dev_path);
return 0;
}
/* btrfs module is not avaiable or the device is not mounted */
if (!(dr = opendir(devices_path))) {
if (errno == ENOENT) {
fsi->mounted = 0;
return 1;
}
}
/*
* Here iterates entries under /sys/fs/btrfs/$uuid/devices and read devt.
* There is only one mnt entry per mounted fs even it's a multi-devices fs.
* So also call _fs_get_mnt for every devices to find a matched mount point.
*/
while ((de = readdir(dr))) {
if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, ".."))
continue;
device_name = de->d_name;
if (!dm_snprintf(rdev_path, sizeof(devices_path), "%s/%s/dev",
devices_path, device_name)) {
log_error("Couldn't create rdev path for %s.", fsi->fs_dev_path);
ret = 0;
break;
}
if ((fd = open(rdev_path, O_RDONLY)) < 0) {
log_sys_debug("open", rdev_path);
ret = 0;
break;
}
r = read(fd, buffer, sizeof(buffer));
if (r < 0) {
ret = 0;
close(fd);
log_sys_debug("read", rdev_path);
break;
}
buffer[r - 1] = 0;
if (sscanf(buffer, "%u:%u", &major, &minor) != 2) {
ret = 0;
log_sys_debug("sscanf", rdev_path);
break;
}
devt = MKDEV(major, minor);
if (devt == lv_devt)
found = true;
if (fsi->mount_dir[0] == 0)
_fs_get_mnt(fsi, devt);
if (fsi->mounted && fsi->mount_dir[0])
break;
}
if (fd >= 0)
close(fd);
if (closedir(dr))
log_sys_debug("closedir", devices_path);
fsi->mounted = !!found;
if (fsi->mounted && fsi->mount_dir[0] == 0) {
log_error("Couldn't get mount point for %s.", fsi->fs_dev_path);
ret = 0;
}
return ret;
}
int fs_get_info(struct cmd_context *cmd, struct logical_volume *lv,
struct fs_info *fsi, int include_mount)
{
@@ -116,10 +261,7 @@ int fs_get_info(struct cmd_context *cmd, struct logical_volume *lv,
struct stat st_lv;
struct stat st_crypt;
struct stat st_top;
struct stat stme;
struct fs_info info;
FILE *fme = NULL;
struct mntent *me;
int fd;
int ret;
@@ -201,35 +343,10 @@ int fs_get_info(struct cmd_context *cmd, struct logical_volume *lv,
if (!include_mount)
return 1;
/*
* Note: used swap devices are not considered as mount points,
* hence they're not listed in /etc/mtab, we'd need to read the
* /proc/swaps instead. We don't need it at this moment though,
* but if we do once, read the /proc/swaps here if fsi->fstype == "swap".
*/
if (!(fme = setmntent("/etc/mtab", "r")))
return_0;
ret = 1;
while ((me = getmntent(fme))) {
if (strcmp(me->mnt_type, fsi->fstype))
continue;
if (me->mnt_dir[0] != '/')
continue;
if (me->mnt_fsname[0] != '/')
continue;
if (stat(me->mnt_dir, &stme) < 0)
continue;
if (stme.st_dev != st_top.st_rdev)
continue;
log_debug("fs_get_info %s is mounted \"%s\"", fsi->fs_dev_path, me->mnt_dir);
fsi->mounted = 1;
strncpy(fsi->mount_dir, me->mnt_dir, PATH_MAX-1);
}
endmntent(fme);
if (!strcmp(fsi->fstype, "btrfs"))
ret = _btrfs_get_mnt(fsi, st_lv.st_rdev);
else
ret = _fs_get_mnt(fsi, st_top.st_rdev);
fsi->unmounted = !fsi->mounted;
return ret;
@@ -520,11 +637,15 @@ int fs_extend_script(struct cmd_context *cmd, struct logical_volume *lv, struct
{
char lv_path[PATH_MAX];
char crypt_path[PATH_MAX];
char newsize_str[16] = { 0 };
const char *argv[FS_CMD_MAX_ARGS + 4];
char *devpath;
int args = 0;
int status;
if (dm_snprintf(newsize_str, sizeof(newsize_str), "%llu", (unsigned long long)fsi->new_size_bytes) < 0)
return_0;
if (dm_snprintf(lv_path, PATH_MAX, "%s%s/%s", lv->vg->cmd->dev_dir, lv->vg->name, lv->name) < 0)
return_0;
@@ -535,6 +656,10 @@ int fs_extend_script(struct cmd_context *cmd, struct logical_volume *lv, struct
argv[++args] = "--lvpath";
argv[++args] = lv_path;
if (fsi->new_size_bytes) {
argv[++args] = "--newsizebytes";
argv[++args] = newsize_str;
}
if (fsi->mounted) {
argv[++args] = "--mountdir";
argv[++args] = fsi->mount_dir;

View File

@@ -19,10 +19,12 @@
#include "lib/device/device.h"
#define FSTYPE_MAX 16
#define UUID_LEN 37
struct fs_info {
char fstype[FSTYPE_MAX];
char mount_dir[PATH_MAX];
char uuid[UUID_LEN];
char fs_dev_path[PATH_MAX]; /* usually lv dev, can be crypt dev */
unsigned int fs_block_size_bytes; /* 512 or 4k */
uint64_t fs_last_byte; /* last byte on the device used by the fs */

View File

@@ -32,6 +32,12 @@ struct lvmlockd_pvs {
int num;
};
struct owner {
uint32_t host_id;
uint32_t generation;
char *name;
};
void lvmlockd_set_socket(const char *sock)
{
_lvmlockd_socket = sock;
@@ -132,6 +138,21 @@ static void _flags_str_to_lockd_flags(const char *flags_str, uint32_t *lockd_fla
*lockd_flags |= LD_RF_SH_EXISTS;
}
static char *_owner_str(struct owner *owner)
{
static char log_owner_str[128];
if (!owner || !owner->host_id)
return (char *)"";
log_owner_str[0] = '\0';
/* Use a --lockopt setting to print all owner details? */
snprintf(log_owner_str, sizeof(log_owner_str)-1, " (host_id %u)", owner->host_id);
return log_owner_str;
}
/*
* evaluate the reply from lvmlockd, check for errors, extract
* the result and lockd_flags returned by lvmlockd.
@@ -146,10 +167,11 @@ static void _flags_str_to_lockd_flags(const char *flags_str, uint32_t *lockd_fla
*/
#define NO_LOCKD_RESULT (-1000)
static int _lockd_result(const char *req_name, daemon_reply reply, int *result, uint32_t *lockd_flags)
static int _lockd_result(struct cmd_context *cmd, const char *req_name, daemon_reply reply,
int *result, uint32_t *lockd_flags, struct owner *owner)
{
int reply_result;
const char *flags_str = NULL;
const char *str;
*result = -1;
@@ -172,8 +194,15 @@ static int _lockd_result(const char *req_name, daemon_reply reply, int *result,
*result = reply_result;
if (lockd_flags) {
if ((flags_str = daemon_reply_str(reply, "result_flags", NULL)))
_flags_str_to_lockd_flags(flags_str, lockd_flags);
if ((str = daemon_reply_str(reply, "result_flags", NULL)))
_flags_str_to_lockd_flags(str, lockd_flags);
}
if (owner) {
owner->host_id = (uint32_t)daemon_reply_int(reply, "owner_host_id", 0);
owner->generation = (uint32_t)daemon_reply_int(reply, "owner_generation", 0);
if ((str = daemon_reply_str(reply, "owner_name", "none")))
owner->name = dm_pool_strdup(cmd->mem, str);
}
log_debug("lockd %s result: %d", req_name, reply_result);
@@ -389,7 +418,8 @@ static int _lockd_request(struct cmd_context *cmd,
const char *opts,
const struct lvmlockd_pvs *lock_pvs,
int *result,
uint32_t *lockd_flags)
uint32_t *lockd_flags,
struct owner *owner)
{
const char *cmd_name = get_cmd_name();
daemon_reply reply;
@@ -426,7 +456,7 @@ static int _lockd_request(struct cmd_context *cmd,
"lv_lock_args = %s", lv_lock_args ?: "none",
NULL);
if (!_lockd_result(req_name, reply, result, lockd_flags))
if (!_lockd_result(cmd, req_name, reply, result, lockd_flags, owner))
goto fail;
/*
@@ -446,7 +476,7 @@ static int _lockd_request(struct cmd_context *cmd,
"vg_lock_args = %s", vg_lock_args ?: "none",
NULL);
if (!_lockd_result(req_name, reply, result, lockd_flags))
if (!_lockd_result(cmd, req_name, reply, result, lockd_flags, owner))
goto fail;
/*
@@ -464,7 +494,7 @@ static int _lockd_request(struct cmd_context *cmd,
"vg_lock_type = %s", vg_lock_type ?: "none",
NULL);
if (!_lockd_result(req_name, reply, result, lockd_flags))
if (!_lockd_result(cmd, req_name, reply, result, lockd_flags, owner))
goto fail;
log_debug("lockd %s %s result %d %x",
@@ -735,7 +765,7 @@ static int _handle_sanlock_lv(struct cmd_context *cmd, struct volume_group *vg)
"lv_size_bytes = " FMTd64, (int64_t) lv_size_bytes,
NULL);
if (!_lockd_result("find_free_lock", reply, &result, NULL)) {
if (!_lockd_result(cmd, "find_free_lock", reply, &result, NULL, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -790,7 +820,7 @@ static int _init_vg(struct cmd_context *cmd, struct volume_group *vg,
"vg_lock_type = %s", lock_type,
NULL);
if (!_lockd_result("init_vg", reply, &result, NULL)) {
if (!_lockd_result(cmd, "init_vg", reply, &result, NULL, NULL)) {
ret = 0;
result = -ELOCKD;
} else {
@@ -987,7 +1017,7 @@ static int _init_vg_sanlock(struct cmd_context *cmd, struct volume_group *vg, in
"opts = %s", opts ?: "none",
NULL);
if (!_lockd_result("init_vg", reply, &result, NULL)) {
if (!_lockd_result(cmd, "init_vg", reply, &result, NULL, NULL)) {
ret = 0;
result = -ELOCKD;
} else {
@@ -1089,7 +1119,7 @@ static int _free_vg(struct cmd_context *cmd, struct volume_group *vg)
"vg_lock_args = %s", vg->lock_args,
NULL);
if (!_lockd_result("free_vg", reply, &result, &lockd_flags)) {
if (!_lockd_result(cmd, "free_vg", reply, &result, &lockd_flags, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -1143,7 +1173,7 @@ static int _busy_vg(struct cmd_context *cmd, struct volume_group *vg)
"vg_lock_args = %s", vg->lock_args,
NULL);
if (!_lockd_result("busy_vg", reply, &result, &lockd_flags)) {
if (!_lockd_result(cmd, "busy_vg", reply, &result, &lockd_flags, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -1217,7 +1247,7 @@ static int _free_vg_sanlock(struct cmd_context *cmd, struct volume_group *vg)
"vg_lock_args = %s", vg->lock_args,
NULL);
if (!_lockd_result("free_vg", reply, &result, &lockd_flags)) {
if (!_lockd_result(cmd, "free_vg", reply, &result, &lockd_flags, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -1497,7 +1527,7 @@ int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int *exists
NULL);
}
if (!_lockd_result("start_vg", reply, &result, &lockd_flags)) {
if (!_lockd_result(cmd, "start_vg", reply, &result, &lockd_flags, NULL)) {
ret = 0;
result = -ELOCKD;
} else {
@@ -1536,6 +1566,9 @@ int lockd_start_vg(struct cmd_context *cmd, struct volume_group *vg, int *exists
case -EPROTONOSUPPORT:
log_error("VG %s start failed: lock manager %s is not supported by lvmlockd", vg->name, vg->lock_type);
break;
case -ELOCKREPAIR:
log_error("VG %s start failed: sanlock lease needs repair", vg->name);
break;
default:
log_error("VG %s start failed: %d", vg->name, result);
}
@@ -1566,7 +1599,7 @@ int lockd_stop_vg(struct cmd_context *cmd, struct volume_group *vg)
"vg_name = %s", vg->name,
NULL);
if (!_lockd_result("stop_vg", reply, &result, NULL)) {
if (!_lockd_result(cmd, "stop_vg", reply, &result, NULL, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -1612,7 +1645,7 @@ int lockd_start_wait(struct cmd_context *cmd)
"pid = " FMTd64, (int64_t) getpid(),
NULL);
if (!_lockd_result("start_wait", reply, &result, NULL)) {
if (!_lockd_result(cmd, "start_wait", reply, &result, NULL, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -1683,6 +1716,7 @@ int lockd_start_wait(struct cmd_context *cmd)
int lockd_global_create(struct cmd_context *cmd, const char *def_mode, const char *vg_lock_type)
{
struct owner owner = { 0 };
const char *mode = NULL;
uint32_t lockd_flags;
int retries = 0;
@@ -1730,15 +1764,18 @@ int lockd_global_create(struct cmd_context *cmd, const char *def_mode, const cha
req:
if (!_lockd_request(cmd, "lock_gl",
NULL, vg_lock_type, NULL, NULL, NULL, NULL, mode, NULL,
NULL, &result, &lockd_flags)) {
NULL, &result, &lockd_flags, &owner)) {
/* No result from lvmlockd, it is probably not running. */
log_error("Global lock failed: check that lvmlockd is running.");
return 0;
}
if (result == -EAGAIN) {
if (result == -EAGAIN || result == -EIOTIMEOUT) {
if (retries < find_config_tree_int(cmd, global_lvmlockd_lock_retries_CFG, NULL)) {
log_warn("Retrying %s global lock", mode);
if (result == -EIOTIMEOUT)
log_warn("Retrying global lock: io timeout");
else
log_warn("Retrying global lock: held by other host%s", _owner_str(&owner));
sleep(1);
retries++;
goto req;
@@ -1821,8 +1858,12 @@ int lockd_global_create(struct cmd_context *cmd, const char *def_mode, const cha
if (result < 0) {
if (result == -ESTARTING)
log_error("Global lock failed: lockspace is starting.");
else if (result == -EIOTIMEOUT)
log_error("Global lock failed: io timeout");
else if (result == -ELOCKREPAIR)
log_error("Global lock failed: sanlock lease needs repair");
else if (result == -EAGAIN)
log_error("Global lock failed: held by other host.");
log_error("Global lock failed: held by other host%s", _owner_str(&owner));
else if (result == -EPROTONOSUPPORT)
log_error("VG create failed: lock manager %s is not supported by lvmlockd.", vg_lock_type);
else
@@ -1925,6 +1966,7 @@ out:
int lockd_global(struct cmd_context *cmd, const char *def_mode)
{
struct owner owner = { 0 };
const char *mode = NULL;
const char *opts = NULL;
uint32_t lockd_flags;
@@ -1976,7 +2018,7 @@ int lockd_global(struct cmd_context *cmd, const char *def_mode)
if (!_lockd_request(cmd, "lock_gl",
NULL, NULL, NULL, NULL, NULL, NULL, mode, opts,
NULL, &result, &lockd_flags)) {
NULL, &result, &lockd_flags, &owner)) {
/* No result from lvmlockd, it is probably not running. */
/* We don't care if an unlock fails. */
@@ -1993,9 +2035,12 @@ int lockd_global(struct cmd_context *cmd, const char *def_mode)
return 0;
}
if (result == -EAGAIN) {
if (result == -EAGAIN || result == -EIOTIMEOUT) {
if (retries < find_config_tree_int(cmd, global_lvmlockd_lock_retries_CFG, NULL)) {
log_warn("Retrying %s global lock", mode);
if (result == -EIOTIMEOUT)
log_warn("Retrying global lock: io timeout");
else
log_warn("Retrying global lock: held by other host%s", _owner_str(&owner));
sleep(1);
retries++;
goto req;
@@ -2038,10 +2083,13 @@ int lockd_global(struct cmd_context *cmd, const char *def_mode)
result == -ESTARTING ||
result == -EVGKILLED ||
result == -ELOCKIO ||
result == -EIOTIMEOUT ||
result == -ELOCKREPAIR ||
result == -ELMERR ||
result == -EORPHAN ||
result == -EADOPT_RETRY ||
result == -EADOPT_NONE) {
result == -EADOPT_NONE ||
result == -EAGAIN) {
/*
* If an ex global lock fails, then the command fails.
*/
@@ -2052,6 +2100,10 @@ int lockd_global(struct cmd_context *cmd, const char *def_mode)
log_error("Global lock failed: check that global lockspace is started");
else if (result == -ELOCKIO)
log_error("Global lock failed: storage errors for sanlock leases");
else if (result == -EIOTIMEOUT)
log_error("Global lock failed: io timeout");
else if (result == -ELOCKREPAIR)
log_error("Global lock failed: sanlock lease needs repair");
else if (result == -ELMERR)
log_error("Global lock failed: lock manager error");
else if (result == -EVGKILLED)
@@ -2062,6 +2114,8 @@ int lockd_global(struct cmd_context *cmd, const char *def_mode)
log_error("Global lock failed: adopt found no orphan");
else if (result == -EADOPT_RETRY)
log_error("Global lock failed: adopt found other mode");
else if (result == -EAGAIN)
log_error("Global lock failed: held by other host%s", _owner_str(&owner));
else
log_error("Global lock failed: error %d", result);
@@ -2085,6 +2139,16 @@ int lockd_global(struct cmd_context *cmd, const char *def_mode)
goto allow;
}
if (result == -EIOTIMEOUT) {
log_warn("Skipping global lock: io timeout");
goto allow;
}
if (result == -ELOCKREPAIR) {
log_warn("Skipping global lock: sanlock lease needs repair");
goto allow;
}
if ((lockd_flags & LD_RF_NO_GL_LS) && (lockd_flags & LD_RF_WARN_GL_REMOVED)) {
log_warn("Skipping global lock: VG with global lock was removed");
goto allow;
@@ -2110,12 +2174,16 @@ int lockd_global(struct cmd_context *cmd, const char *def_mode)
goto allow;
}
if (result == -EAGAIN) {
log_warn("Skipping global lock: held by other host%s", _owner_str(&owner));
goto allow;
}
if ((lockd_flags & LD_RF_NO_GL_LS) || (lockd_flags & LD_RF_NO_LOCKSPACES)) {
log_debug("Skipping global lock: lockspace not found or started");
goto allow;
}
/*
* This is for completeness. If we reach here, then
* a specific check for the error should be added above
@@ -2129,21 +2197,13 @@ int lockd_global(struct cmd_context *cmd, const char *def_mode)
log_warn("Duplicate sanlock global locks should be corrected");
if (result < 0) {
if (result == -EAGAIN) {
/*
* Most of the time, retries should avoid this case.
*/
log_error("Global lock failed: held by other host.");
return 0;
} else {
/*
* We don't intend to reach this. We should check
* any known/possible error specifically and print
* a more helpful message. This is for completeness.
*/
log_error("Global lock failed: error %d.", result);
return 0;
}
/*
* We don't intend to reach this. We should check
* any known/possible error specifically and print
* a more helpful message. This is for completeness.
*/
log_error("Global lock failed: error %d.", result);
return 0;
}
allow:
@@ -2194,6 +2254,7 @@ int lockd_global(struct cmd_context *cmd, const char *def_mode)
int lockd_vg(struct cmd_context *cmd, const char *vg_name, const char *def_mode,
uint32_t flags, uint32_t *lockd_state)
{
struct owner owner = { 0 };
const char *mode = NULL;
const char *opts = NULL;
uint32_t lockd_flags;
@@ -2293,7 +2354,7 @@ int lockd_vg(struct cmd_context *cmd, const char *vg_name, const char *def_mode,
if (!_lockd_request(cmd, "lock_vg",
vg_name, NULL, NULL, NULL, NULL, NULL, mode, opts,
NULL, &result, &lockd_flags)) {
NULL, &result, &lockd_flags, &owner)) {
/*
* No result from lvmlockd, it is probably not running.
* Decide if it is ok to continue without a lock in
@@ -2305,9 +2366,12 @@ int lockd_vg(struct cmd_context *cmd, const char *vg_name, const char *def_mode,
return 1;
}
if (result == -EAGAIN) {
if (result == -EAGAIN || result == -EIOTIMEOUT) {
if (retries < find_config_tree_int(cmd, global_lvmlockd_lock_retries_CFG, NULL)) {
log_warn("Retrying %s lock on VG %s", mode, vg_name);
if (result == -EIOTIMEOUT)
log_warn("Retrying lock on VG %s: io timeout", vg_name);
else
log_warn("Retrying lock on VG %s: held by other host%s", vg_name, _owner_str(&owner));
sleep(1);
retries++;
goto req;
@@ -2381,6 +2445,32 @@ int lockd_vg(struct cmd_context *cmd, const char *vg_name, const char *def_mode,
}
}
if (result == -EIOTIMEOUT) {
if (!strcmp(mode, "un"))
goto out;
else if (!strcmp(mode, "sh")) {
log_warn("VG %s lock skipped: io timeout", vg_name);
goto out;
} else {
log_error("VG %s lock failed: io timeout", vg_name);
ret = 0;
goto out;
}
}
if (result == -ELOCKREPAIR) {
if (!strcmp(mode, "un"))
goto out;
else if (!strcmp(mode, "sh")) {
log_warn("VG %s lock skipped: sanlock lease needs repair", vg_name);
goto out;
} else {
log_error("VG %s lock failed: sanlock lease needs repair", vg_name);
ret = 0;
goto out;
}
}
/*
* The lock is held by another host, and retries have been unsuccessful.
*/
@@ -2388,10 +2478,10 @@ int lockd_vg(struct cmd_context *cmd, const char *vg_name, const char *def_mode,
if (!strcmp(mode, "un"))
goto out;
else if (!strcmp(mode, "sh")) {
log_warn("VG %s lock skipped: held by other host.", vg_name);
log_warn("VG %s lock skipped: held by other host%s", vg_name, _owner_str(&owner));
goto out;
} else {
log_error("VG %s lock failed: held by other host.", vg_name);
log_error("VG %s lock failed: held by other host%s", vg_name, _owner_str(&owner));
ret = 0;
goto out;
}
@@ -2522,7 +2612,7 @@ int lockd_vg_update(struct volume_group *vg)
"version = " FMTd64, (int64_t) vg->seqno,
NULL);
if (!_lockd_result("vg_update", reply, &result, NULL)) {
if (!_lockd_result(vg->cmd, "vg_update", reply, &result, NULL, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -2554,7 +2644,7 @@ static int _query_lv(struct cmd_context *cmd, struct volume_group *vg,
"lv_lock_args = %s", lock_args ?: "none",
NULL);
if (!_lockd_result("query_lock_lv", reply, &result, NULL)) {
if (!_lockd_result(cmd, "query_lock_lv", reply, &result, NULL, NULL)) {
/* No result from lvmlockd, it is probably not running. */
log_error("Lock query failed for LV %s/%s", vg->name, lv_name);
return 0;
@@ -2621,6 +2711,7 @@ int lockd_lv_name(struct cmd_context *cmd, struct volume_group *vg,
const char *lv_name, struct id *lv_id,
const char *lock_args, const char *def_mode, uint32_t flags)
{
struct owner owner = { 0 };
char lv_uuid[64] __attribute__((aligned(8)));
char opt_buf[64] = {};
const char *opts = NULL;
@@ -2718,7 +2809,7 @@ int lockd_lv_name(struct cmd_context *cmd, struct volume_group *vg,
if (!_lockd_request(cmd, "lock_lv",
vg->name, vg->lock_type, vg->lock_args,
lv_name, lv_uuid, lock_args, mode, opts,
&lock_pvs, &result, &lockd_flags)) {
&lock_pvs, &result, &lockd_flags, NULL)) {
_lockd_free_pv_list(&lock_pvs);
/* No result from lvmlockd, it is probably not running. */
log_error("Locking failed for LV %s/%s", vg->name, lv_name);
@@ -2729,7 +2820,7 @@ int lockd_lv_name(struct cmd_context *cmd, struct volume_group *vg,
if (!_lockd_request(cmd, "lock_lv",
vg->name, vg->lock_type, vg->lock_args,
lv_name, lv_uuid, lock_args, mode, opts,
NULL, &result, &lockd_flags)) {
NULL, &result, &lockd_flags, &owner)) {
/* No result from lvmlockd, it is probably not running. */
log_error("Locking failed for LV %s/%s", vg->name, lv_name);
return 0;
@@ -2744,7 +2835,17 @@ int lockd_lv_name(struct cmd_context *cmd, struct volume_group *vg,
return 1;
if (result == -EAGAIN) {
log_error("LV locked by other host: %s/%s", vg->name, lv_name);
log_error("LV locked by other host: %s/%s%s", vg->name, lv_name, _owner_str(&owner));
return 0;
}
if (result == -EIOTIMEOUT) {
log_error("LV %s/%s lock failed: io timeout.", vg->name, lv_name);
return 0;
}
if (result == -ELOCKREPAIR) {
log_error("LV %s/%s lock failed: sanlock lease needs repair.", vg->name, lv_name);
return 0;
}
@@ -3649,7 +3750,7 @@ static int _init_lv_sanlock(struct cmd_context *cmd, struct volume_group *vg,
"vg_lock_args = %s", vg->lock_args,
NULL);
if (!_lockd_result("init_lv", reply, &result, NULL)) {
if (!_lockd_result(cmd, "init_lv", reply, &result, NULL, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -3724,7 +3825,7 @@ static int _free_lv(struct cmd_context *cmd, struct volume_group *vg,
"lv_lock_args = %s", lock_args ?: "none",
NULL);
if (!_lockd_result("free_lv", reply, &result, NULL)) {
if (!_lockd_result(cmd, "free_lv", reply, &result, NULL, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -3989,7 +4090,7 @@ int lockd_rename_vg_before(struct cmd_context *cmd, struct volume_group *vg)
"vg_lock_args = %s", vg->lock_args,
NULL);
if (!_lockd_result("rename_vg_before", reply, &result, NULL)) {
if (!_lockd_result(cmd, "rename_vg_before", reply, &result, NULL, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -4054,7 +4155,7 @@ int lockd_rename_vg_final(struct cmd_context *cmd, struct volume_group *vg, int
"vg_lock_args = %s", vg->lock_args,
NULL);
if (!_lockd_result("rename_vg_final", reply, &result, NULL)) {
if (!_lockd_result(cmd, "rename_vg_final", reply, &result, NULL, NULL)) {
ret = 0;
} else {
ret = (result < 0) ? 0 : 1;
@@ -4095,7 +4196,7 @@ const char *lockd_running_lock_type(struct cmd_context *cmd, int *found_multiple
"pid = " FMTd64, (int64_t) getpid(),
NULL);
if (!_lockd_result("running_lm", reply, &result, NULL)) {
if (!_lockd_result(cmd, "running_lm", reply, &result, NULL, NULL)) {
log_error("Failed to get result from lvmlockd");
goto out;
}
@@ -4216,7 +4317,7 @@ int lockd_lv_refresh(struct cmd_context *cmd, struct lvresize_params *lp)
"path = %s", path,
NULL);
if (!_lockd_result("refresh_lv", reply, &result, NULL)) {
if (!_lockd_result(cmd, "refresh_lv", reply, &result, NULL, NULL)) {
/* No result from lvmlockd, it is probably not running. */
log_error("LV refresh failed for LV %s", path);
return 0;

View File

@@ -5587,13 +5587,8 @@ static int _lvresize_adjust_extents(struct logical_volume *lv,
log_print_unless_silent("Reached maximum COW size %s (%" PRIu32 " extents).",
display_size(vg->cmd, (uint64_t) vg->extent_size * logical_extents_used),
logical_extents_used);
lp->extents = logical_extents_used; // CHANGES lp->extents
seg_size = lp->extents - existing_logical_extents; // Recalculate
if (lp->extents == existing_logical_extents) {
/* Signal that normal resizing is not required */
lp->size_changed = 1;
return 1;
}
/* Truncate lp->extents to logical_extents_used */
lp->extents = logical_extents_used;
}
} else if (lv_is_thin_pool_metadata(lv)) {
if (!(seg = get_only_segment_using_this_lv(lv)))
@@ -6076,6 +6071,7 @@ static int _fs_reduce_allow(struct cmd_context *cmd, struct logical_volume *lv,
int equal = 0, smaller = 0, larger = 0;
int is_ext_fstype = 0;
int confirm_mount_change = 0;
int check_boundary = 1;
/*
* Allow reducing the LV for other fs types if the fs is not using
@@ -6084,7 +6080,8 @@ static int _fs_reduce_allow(struct cmd_context *cmd, struct logical_volume *lv,
if (!strcmp(fsi->fstype, "ext2") ||
!strcmp(fsi->fstype, "ext3") ||
!strcmp(fsi->fstype, "ext4") ||
!strcmp(fsi->fstype, "xfs")) {
!strcmp(fsi->fstype, "xfs") ||
!strcmp(fsi->fstype, "btrfs")) {
log_debug("Found fs %s last_byte %llu new_size_bytes %llu",
fsi->fstype,
(unsigned long long)fsi->fs_last_byte,
@@ -6092,6 +6089,9 @@ static int _fs_reduce_allow(struct cmd_context *cmd, struct logical_volume *lv,
if (!strncmp(fsi->fstype, "ext", 3)) {
is_ext_fstype = 1;
fs_reduce_cmd = " resize2fs";
} else if (!strncmp(fsi->fstype, "btrfs", 5)) {
/* let btrfs handle it */
check_boundary = 0;
}
}
@@ -6108,29 +6108,34 @@ static int _fs_reduce_allow(struct cmd_context *cmd, struct logical_volume *lv,
if (!strcmp(fsi->fstype, "reiserfs")) {
log_error("File system reduce for reiserfs requires --fs resize_fsadm.");
return 0;
} else if (!strcmp(fsi->fstype, "btrfs")) {
log_print_unless_silent("Skipping check used device size for btrfs.");
} else {
log_error("File system device usage is not available from libblkid.");
return 0;
}
log_error("File system device usage is not available from libblkid.");
return 0;
}
if ((equal = (fsi->fs_last_byte == fsi->new_size_bytes)))
cmp_desc = "equal to";
else if ((smaller = (fsi->fs_last_byte < fsi->new_size_bytes)))
cmp_desc = "smaller than";
else if ((larger = (fsi->fs_last_byte > fsi->new_size_bytes)))
cmp_desc = "larger than";
if (check_boundary) {
if ((equal = (fsi->fs_last_byte == fsi->new_size_bytes)))
cmp_desc = "equal to";
else if ((smaller = (fsi->fs_last_byte < fsi->new_size_bytes)))
cmp_desc = "smaller than";
else if ((larger = (fsi->fs_last_byte > fsi->new_size_bytes)))
cmp_desc = "larger than";
log_print_unless_silent("File system size (%s) is %s the requested size (%s).",
display_size(cmd, fsi->fs_last_byte/512), cmp_desc,
display_size(cmd, fsi->new_size_bytes/512));
log_print_unless_silent("File system size (%s) is %s the requested size (%s).",
display_size(cmd, fsi->fs_last_byte/512), cmp_desc,
display_size(cmd, fsi->new_size_bytes/512));
/*
* FS reduce is not needed, it's not using the affected space.
*/
if (smaller || equal) {
log_print_unless_silent("File system reduce is not needed, skipping.");
fsi->needs_reduce = 0;
return 1;
/*
* FS reduce is not needed, it's not using the affected space.
*/
if (smaller || equal) {
log_print_unless_silent("File system reduce is not needed, skipping.");
fsi->needs_reduce = 0;
return 1;
}
}
/*
@@ -6139,19 +6144,23 @@ static int _fs_reduce_allow(struct cmd_context *cmd, struct logical_volume *lv,
if (!strcmp(lp->fsopt, "checksize")) {
if (is_ext_fstype)
log_error("File system reduce is required (see resize2fs or --resizefs.)");
else if (!strcmp(fsi->fstype, "btrfs"))
log_error("File system reduce is required (see btrfs-progs or --resizefs.)");
else
log_error("File system reduce is required and not supported (%s).", fsi->fstype);
return 0;
}
/*
* FS reduce required, ext* supports it, xfs does not.
* FS reduce required, ext* and btrfs support it, xfs does not.
*/
if (is_ext_fstype) {
log_print_unless_silent("File system reduce is required using resize2fs.");
} else if (!strcmp(fsi->fstype, "reiserfs")) {
log_error("File system reduce for reiserfs requires --fs resize_fsadm.");
return 0;
} else if (!strcmp(fsi->fstype, "btrfs")) {
log_print_unless_silent("File system reduce is required using btrfs-progs.");
} else {
log_error("File system reduce is required and not supported (%s).", fsi->fstype);
return 0;
@@ -6174,6 +6183,11 @@ static int _fs_reduce_allow(struct cmd_context *cmd, struct logical_volume *lv,
fsi->needs_reduce = 1;
} else if (!strcmp(fsi->fstype, "swap")) {
fsi->needs_reduce = 1;
} else if (!strcmp(fsi->fstype, "btrfs")) {
/* btrfs requires fs to be mounted to shrink */
if (fsi->unmounted)
fsi->needs_mount = 1;
fsi->needs_reduce = 1;
} else {
/*
* Shouldn't reach here since no other fs types get this far.
@@ -6266,7 +6280,8 @@ static int _fs_extend_allow(struct cmd_context *cmd, struct logical_volume *lv,
if (!strcmp(fsi->fstype, "ext2") ||
!strcmp(fsi->fstype, "ext3") ||
!strcmp(fsi->fstype, "ext4") ||
!strcmp(fsi->fstype, "xfs")) {
!strcmp(fsi->fstype, "xfs") ||
!strcmp(fsi->fstype, "btrfs")) {
log_debug("Found fs %s last_byte %llu",
fsi->fstype, (unsigned long long)fsi->fs_last_byte);
if (!strncmp(fsi->fstype, "ext", 3))
@@ -6345,11 +6360,13 @@ static int _fs_extend_allow(struct cmd_context *cmd, struct logical_volume *lv,
} else if (!strcmp(fsi->fstype, "swap")) {
fsi->needs_extend = 1;
} else if (!strcmp(fsi->fstype, "xfs")) {
fs_extend_cmd = " xfs_growfs";
} else if (!strcmp(fsi->fstype, "xfs") || !strcmp(fsi->fstype, "btrfs")) {
if (!strcmp(fsi->fstype, "xfs"))
fs_extend_cmd = " xfs_growfs";
else
fs_extend_cmd = " btrfs filesystem resize";
/*
* xfs must be mounted to extend.
* xfs and btrfs must be mounted to extend.
*
* --fs resize --fsmode nochange: don't change mount condition.
* if mounted: fs_extend
@@ -6382,7 +6399,6 @@ static int _fs_extend_allow(struct cmd_context *cmd, struct logical_volume *lv,
fsi->needs_extend = 1;
}
}
} else {
/* shouldn't reach here */
log_error("File system type %s not handled.", fsi->fstype);

View File

@@ -86,14 +86,14 @@ int lv_merge_segments(struct logical_volume *lv)
* bogus segment structure setup.
*/
#define raid_seg_error(msg) do { \
log_error("LV %s invalid: %s for %s segment", \
log_error("LV %s invalid: %s for %s segment.", \
display_lvname(seg->lv), (msg), lvseg_name(seg)); \
if ((*error_count)++ > ERROR_MAX) \
return; \
} while (0)
#define raid_seg_error_val(msg, val) do { \
log_error("LV %s invalid: %s (is %u) for %s segment", \
log_error("LV %s invalid: %s (is %u) for %s segment.", \
display_lvname(seg->lv), (msg), (val), lvseg_name(seg)); \
if ((*error_count)++ > ERROR_MAX) \
return; \
@@ -282,16 +282,20 @@ static void _check_raid_seg(struct lv_segment *seg, int *error_count)
/* Default < 10, change once raid1 split shift and rename SubLVs works! */
if (seg_is_raid1(seg)) {
if (seg->area_count > DEFAULT_RAID1_MAX_IMAGES) {
log_error("LV %s invalid: maximum supported areas %u (is %u) for %s segment",
seg->lv->name, DEFAULT_RAID1_MAX_IMAGES, seg->area_count, lvseg_name(seg));
if ((*error_count)++ > ERROR_MAX)
return;
}
} else if (seg->area_count > DEFAULT_RAID_MAX_IMAGES) {
log_error("LV %s invalid: maximum supported areas %u (is %u) for %s segment",
seg->lv->name, DEFAULT_RAID_MAX_IMAGES, seg->area_count, lvseg_name(seg));
log_error("LV %s invalid: maximum supported areas %u "
"(is %u) for %s segment.",
seg->lv->name, DEFAULT_RAID1_MAX_IMAGES,
seg->area_count, lvseg_name(seg));
if ((*error_count)++ > ERROR_MAX)
return;
}
} else if (seg->area_count > DEFAULT_RAID_MAX_IMAGES) {
log_error("LV %s invalid: maximum supported areas %u "
"(is %u) for %s segment.",
seg->lv->name, DEFAULT_RAID_MAX_IMAGES,
seg->area_count, lvseg_name(seg));
if ((*error_count)++ > ERROR_MAX)
return;
}
/* FIXME: should we check any non-RAID segment struct members at all? */
@@ -627,7 +631,7 @@ int check_lv_segments_complete_vg(struct logical_volume *lv)
seg_le(seg, s))) ||
find_mirror_seg(seg2) != seg)) {
log_error("LV %s: segment %u mirror "
"image %u missing mirror ptr",
"image %u missing mirror ptr.",
lv->name, seg_count, s);
inc_error_count;
}
@@ -651,7 +655,9 @@ int check_lv_segments_complete_vg(struct logical_volume *lv)
lv_is_raid(lv) ||
lv_is_snapshot(lv) ||
lv_is_thin_pool(lv) ||
lv_is_thin_volume(lv))) {
lv_is_thin_volume(lv) ||
lv_is_vdo_pool(lv) ||
lv_is_vdo(lv))) {
log_error("LV %s must have exactly one segment.",
lv->name);
inc_error_count;
@@ -661,7 +667,7 @@ int check_lv_segments_complete_vg(struct logical_volume *lv)
(!(seg2 = first_seg(lv)) || !(seg2 = find_pool_seg(seg2)) ||
seg2->area_count != 1 || seg_type(seg2, 0) != AREA_LV ||
seg_lv(seg2, 0) != lv)) {
log_error("LV %s: segment 1 pool data LV does not point back to same LV",
log_error("LV %s: segment 1 pool data LV does not point back to same LV.",
lv->name);
inc_error_count;
}
@@ -732,7 +738,7 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
if (seg->len != seg->area_len &&
seg->len != seg->area_len * data_rimage_count) {
log_error("LV %s: segment %u with len=%u "
" has inconsistent area_len %u",
"has inconsistent area_len %u.",
lv->name, seg_count, seg->len, seg->area_len);
inc_error_count;
}
@@ -740,7 +746,7 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
if (seg_is_snapshot(seg)) {
if (seg->cow && seg->cow == seg->origin) {
log_error("LV %s: segment %u has same LV %s for "
"both origin and snapshot",
"both origin and snapshot.",
lv->name, seg_count, seg->cow->name);
inc_error_count;
}
@@ -748,8 +754,8 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
for (s = 0; s < seg->area_count; s++) {
if (seg_type(seg, s) == AREA_UNASSIGNED) {
log_error("LV %s: segment %u has unassigned "
"area %u.",
log_error("LV %s: segment %u has "
"unassigned area %u.",
lv->name, seg_count, s);
inc_error_count;
} else if (seg_type(seg, s) == AREA_PV) {
@@ -757,7 +763,7 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
seg_pvseg(seg, s)->lvseg != seg ||
seg_pvseg(seg, s)->lv_area != s) {
log_error("LV %s: segment %u has "
"inconsistent PV area %u",
"inconsistent PV area %u.",
lv->name, seg_count, s);
inc_error_count;
}
@@ -766,7 +772,7 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
seg_lv(seg, s)->vg != lv->vg ||
seg_lv(seg, s) == lv) {
log_error("LV %s: segment %u has "
"inconsistent LV area %u",
"inconsistent LV area %u.",
lv->name, seg_count, s);
inc_error_count;
/* Can't check more of such segment */
@@ -789,15 +795,15 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
seg_found++;
if (!seg_found) {
log_error("LV %s segment %u uses LV %s,"
" but missing ptr from %s to %s",
log_error("LV %s segment %u uses LV %s, "
"but missing ptr from %s to %s.",
lv->name, seg_count,
seg_lv(seg, s)->name,
seg_lv(seg, s)->name, lv->name);
inc_error_count;
} else if (seg_found > 1) {
log_error("LV %s has duplicated links "
"to LV %s segment %u",
"to LV %s segment %u.",
seg_lv(seg, s)->name,
lv->name, seg_count);
inc_error_count;
@@ -810,7 +816,7 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
}
if (le != lv->le_count) {
log_error("LV %s: inconsistent LE count %u != %u",
log_error("LV %s: inconsistent LE count %u != %u.",
lv->name, le, lv->le_count);
inc_error_count;
}
@@ -846,7 +852,7 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
if (!seg_found) {
log_error("LV %s is used by LV %s:%" PRIu32 "-%" PRIu32
", but missing ptr from %s to %s",
", but missing ptr from %s to %s.",
lv->name, seg->lv->name, seg->le,
seg->le + seg->len - 1,
seg->lv->name, lv->name);
@@ -854,7 +860,7 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
} else if (seg_found != sl->count) {
log_error("Reference count mismatch: LV %s has %u "
"links to LV %s:%" PRIu32 "-%" PRIu32
", which has %u links",
", which has %u links.",
lv->name, sl->count, seg->lv->name, seg->le,
seg->le + seg->len - 1, seg_found);
inc_error_count;
@@ -869,7 +875,7 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
if (!seg_found) {
log_error("LV segment %s:%" PRIu32 "-%" PRIu32
" is incorrectly listed as being used by LV %s",
" is incorrectly listed as being used by LV %s.",
seg->lv->name, seg->le, seg->le + seg->len - 1,
lv->name);
inc_error_count;
@@ -879,16 +885,16 @@ int check_lv_segments_incomplete_vg(struct logical_volume *lv)
dm_list_iterate_items(glvl, &lv->indirect_glvs) {
if (glvl->glv->is_historical) {
if (glvl->glv->historical->indirect_origin != lv->this_glv) {
log_error("LV %s is indirectly used by historical LV %s"
"but that historical LV does not point back to LV %s",
log_error("LV %s is indirectly used by historical LV %s "
"but that historical LV does not point back to LV %s.",
lv->name, glvl->glv->historical->name, lv->name);
inc_error_count;
}
} else {
if (!(seg = first_seg(glvl->glv->live)) ||
seg->indirect_origin != lv->this_glv) {
log_error("LV %s is indirectly used by LV %s"
"but that LV does not point back to LV %s",
log_error("LV %s is indirectly used by LV %s "
"but that LV does not point back to LV %s.",
lv->name, glvl->glv->live->name, lv->name);
inc_error_count;
}
@@ -913,7 +919,7 @@ static int _lv_split_segment(struct logical_volume *lv, struct lv_segment *seg,
if (!seg_can_split(seg)) {
log_error("Unable to split the %s segment at LE %" PRIu32
" in LV %s", lvseg_name(seg), le, lv->name);
" in LV %s.", lvseg_name(seg), le, lv->name);
return 0;
}
@@ -930,7 +936,7 @@ static int _lv_split_segment(struct logical_volume *lv, struct lv_segment *seg,
}
if (!str_list_dup(lv->vg->vgmem, &split_seg->tags, &seg->tags)) {
log_error("LV segment tags duplication failed");
log_error("LV segment tags duplication failed.");
return 0;
}
@@ -957,7 +963,7 @@ static int _lv_split_segment(struct logical_volume *lv, struct lv_segment *seg,
if (!set_lv_segment_area_lv(split_seg, s, seg_lv(seg, s),
seg_le(seg, s) + seg->area_len, 0))
return_0;
log_debug_alloc("Split %s:%u[%u] at %u: %s LE %u", lv->name,
log_debug_alloc("Split %s:%u[%u] at %u: %s LE %u.", lv->name,
seg->le, s, le, seg_lv(seg, s)->name,
seg_le(split_seg, s));
break;
@@ -971,14 +977,14 @@ static int _lv_split_segment(struct logical_volume *lv, struct lv_segment *seg,
seg->area_len,
split_seg, s)))
return_0;
log_debug_alloc("Split %s:%u[%u] at %u: %s PE %u", lv->name,
log_debug_alloc("Split %s:%u[%u] at %u: %s PE %u.", lv->name,
seg->le, s, le,
dev_name(seg_dev(seg, s)),
seg_pe(split_seg, s));
break;
case AREA_UNASSIGNED:
log_error("Unassigned area %u found in segment", s);
log_error("Unassigned area %u found in segment.", s);
return 0;
}
}
@@ -997,7 +1003,7 @@ int lv_split_segment(struct logical_volume *lv, uint32_t le)
struct lv_segment *seg;
if (!(seg = find_seg_by_le(lv, le))) {
log_error("Segment with extent %" PRIu32 " in LV %s not found",
log_error("Segment with extent %" PRIu32 " in LV %s not found.",
le, lv->name);
return 0;
}

View File

@@ -3242,7 +3242,7 @@ static int _raid_leg_degraded(struct lv_segment *raid_seg, uint32_t s)
_sublv_is_degraded(seg_metalv(raid_seg, s))));
}
/* Return failed component SubLV count for @lv. */
/* Return failed component SubLV pair count for @lv. */
static uint32_t _lv_get_nr_failed_components(const struct logical_volume *lv)
{
uint32_t r = 0, s;
@@ -7328,6 +7328,183 @@ int lv_raid_remove_missing(struct logical_volume *lv)
return 1;
}
/*
* Count number of failed device bits in dm-raid superblock bit arrays -or- clear them out.
*
* If any failed devices, return != 0 maximum of failed SubLVs and parity_devs so that the
* caller will ask to clear and try activation of the RaidLV unless more than parity_devs
* component device pairs (rmeta and rimage) are still failed. This'll allow early exit
* in the caller preventing MD kernel rejection to activate the RAID array with > parity_devs
* failed component device pairs.
*/
static int _count_or_clear_failed_devices_bits(struct logical_volume *meta_lv,
bool clear, uint32_t *nr_failed)
{
char *meta_path = lv_dmpath_dup(meta_lv->vg->cmd->mem, meta_lv);
if (!meta_path) {
log_error("Failed to build device path for %s.",
display_lvname(meta_lv));
return 0;
}
if (!clear) /* only counting */
return dm_raid_count_failed_devices(meta_path, nr_failed);
return dm_raid_clear_failed_devices(meta_path, nr_failed);
}
/* Count or clear failed devices bits in RAID superblocks for
* recurred transiently failed component SubLV pairs. */
static int _raid_count_or_clear_failed_devices(const struct logical_volume *lv,
bool clear, uint32_t *failed_devices)
{
uint32_t nr_failed = 0, nr_failed_tmp = 0, failed_sublvs = 0, s;
struct lv_segment *raid_seg = first_seg(lv);
struct logical_volume *meta_lv;
const char *str;
int r = 1, cleared_devs = 0;
/* Prevent bogus use. */
if (!seg_is_raid_with_meta(raid_seg)) {
log_error("%s is not a RaidLV with metadata.", display_lvname(lv));
return 0;
}
failed_sublvs = _lv_get_nr_failed_components(lv);
if (clear && (failed_sublvs > raid_seg->segtype->parity_devs)) {
log_error("Can't clear transiently failed devices on still failed %s.",
display_lvname(lv));
return 0;
}
if (!raid_seg->meta_areas) {
log_error(INTERNAL_ERROR "Missing metadata areas on %s!", display_lvname(lv));
return 0;
}
/* Check if there isn't any meta LV already active */
for (s = 0; s < raid_seg->area_count; s++) {
if (_raid_leg_degraded(raid_seg, s))
continue;
meta_lv = seg_metalv(raid_seg, s);
if (lv_is_active(meta_lv)) {
/* DM table is in some unknown condition, aborting... */
log_error("Can't %s failed devices with active %s metadata volume %s.",
clear ? "clear" : "count",
lvseg_name(raid_seg), display_lvname(meta_lv));
return 0;
}
}
/* Activate all non degraded meta LVs before count or clear */
for (s = 0; s < raid_seg->area_count; s++) {
meta_lv = seg_metalv(raid_seg, s);
if (_raid_leg_degraded(raid_seg, s)) {
log_debug("Skipping activation of failed devices for degraded %s metadata volume %s.",
lvseg_name(raid_seg), display_lvname(meta_lv));
continue;
}
if (!activate_lv(lv->vg->cmd, meta_lv)) {
log_error("Failed to activate %s metadata volume %s.",
lvseg_name(raid_seg), display_lvname(meta_lv));
r = 0; /* how many can be counted... */
}
}
/* Wait for meta activation. */
if (!sync_local_dev_names(lv->vg->cmd))
stack;
for (s = 0; s < raid_seg->area_count; s++) {
meta_lv = seg_metalv(raid_seg, s);
if (_raid_leg_degraded(raid_seg, s)) {
if (clear)
log_debug("Skipping clear of failed devices for degraded %s metadata volume %s.",
lvseg_name(raid_seg), display_lvname(meta_lv));
continue;
}
if (lv_is_active(meta_lv) &&
!_count_or_clear_failed_devices_bits(meta_lv, clear,
&nr_failed_tmp)) {
log_error("Failed to %s failed device(s) in superblock of %s metadata volume %s.",
clear ? "clear" : "count",
lvseg_name(raid_seg), display_lvname(meta_lv));
r = 0;
continue;
}
if (nr_failed_tmp) {
log_verbose("%s %u failed device(s) in superblock of %s metadata volume %s.",
clear ? "Cleared" : "Counted", nr_failed_tmp,
lvseg_name(raid_seg), display_lvname(meta_lv));
cleared_devs++;
}
if (nr_failed_tmp > nr_failed)
nr_failed = nr_failed_tmp;
}
/* Deactivate meta LVs */
for (s = 0; s < raid_seg->area_count; s++) {
if (_raid_leg_degraded(raid_seg, s))
continue;
if (!deactivate_lv(lv->vg->cmd, seg_metalv(raid_seg, s))) {
stack;
r = 0;
}
}
if (clear) {
if (!failed_sublvs)
str = "fully operational";
else if (failed_sublvs <= raid_seg->segtype->parity_devs)
str = "degraded";
else
str = "still failed";
log_print_unless_silent("The %s volume %s is %s with %u transiently failed device(s).",
lvseg_name(raid_seg), display_lvname(lv), str,
nr_failed - failed_sublvs);
if (r && cleared_devs &&
(failed_sublvs <= raid_seg->segtype->parity_devs))
/* TODO: maybe we want to activate RAID volume here ? */
log_print_unless_silent("Volume has been restored after clearing %u superblocks(s). Once online please check its content.",
cleared_devs);
}
if (failed_devices)
*failed_devices = max(failed_sublvs, raid_seg->segtype->parity_devs);
return r;
}
/* Clear failed device bits in RAID superblocks for recurred
* transiently failed component SubLV pairs. */
int lv_raid_clear_failed_devices(const struct logical_volume *lv)
{
return _raid_count_or_clear_failed_devices(lv, true, NULL);
}
/* Count failed device bits in RAID superblocks for recurred
* transiently failed component SubLV pairs.
*
* On success, @failed_cnt contains the current number.
*/
int lv_raid_count_failed_devices(const struct logical_volume *lv, uint32_t *failed_cnt)
{
return _raid_count_or_clear_failed_devices(lv, false, failed_cnt);
}
/* Return 1 if a partial raid LV can be activated redundantly */
static int _partial_raid_lv_is_redundant(const struct logical_volume *lv)
{

View File

@@ -91,6 +91,7 @@ typedef int (*field_report_fn) (struct report_handle * dh, struct field * field,
report_headings_t report_headings_str_to_type(const char *str);
int report_format_init(struct cmd_context *cmd);
void report_format_destroy(struct cmd_context *cmd);
void *report_init(struct cmd_context *cmd, const char *format, const char *keys,
unsigned *report_type, const char *separator,

View File

@@ -43,7 +43,7 @@ daemon_handle daemon_open(daemon_info i)
if (connect(h.socket_fd,(struct sockaddr *) &sockaddr, sizeof(sockaddr))) {
h.error = errno;
log_sys_error("connect", i.socket);
log_debug("socket connect error %d for %s", h.error, i.socket);
goto error;
}

View File

@@ -16,6 +16,7 @@
#include "libdm/misc/dmlib.h"
#include <ctype.h>
#include <langinfo.h>
#include <math.h> /* fabs() */
#include <float.h> /* DBL_EPSILON */
#include <time.h>
@@ -30,6 +31,7 @@
struct selection {
struct dm_pool *mem;
struct dm_pool *regex_mem;
struct selection_node *selection_root;
int add_new_fields;
};
@@ -203,7 +205,9 @@ static const struct op_def _op_log[] = {
struct selection_str_list {
struct dm_str_list str_list;
unsigned type; /* either SEL_AND or SEL_OR */
struct dm_regex *regex;
size_t regex_num_patterns;
unsigned type; /* either SEL_LIST_LS or SEL_LIST_SUBSET_LS with either SEL_AND or SEL_OR */
};
struct field_selection_value {
@@ -1410,8 +1414,11 @@ struct dm_report *dm_report_init(uint32_t *report_types,
void dm_report_free(struct dm_report *rh)
{
if (rh->selection)
if (rh->selection) {
dm_pool_destroy(rh->selection->mem);
if (rh->selection->regex_mem)
dm_pool_destroy(rh->selection->regex_mem);
}
if (rh->value_cache)
dm_hash_destroy(rh->value_cache);
dm_pool_destroy(rh->mem);
@@ -1749,8 +1756,74 @@ static int _cmp_field_time(struct dm_report *rh,
return 0;
}
static int _str_list_item_match_regex(const struct str_list_sort_value *val, unsigned int i, struct dm_regex *regex)
{
struct pos_len *item = val->items + i;
char *s = (char *) (val->value + item->pos);
char c = s[item->len];
int r;
/*
* The val->items contains the whole string list in the form of a single string,
* where each item is delimited by a delimiter.
*
* The item->pos + item->len pair then points to the exact item within the val->items.
*
* The dm_regex_match accepts a string, not the pos + len pair, so we need to adapt here:
* replace the delimiter with '\0' temporarily so the item is a proper string.
*/
s[item->len] = '\0';
r = dm_regex_match(regex, s);
s[item->len] = c;
return r;
}
static size_t _bitset_count_set(dm_bitset_t bs)
{
size_t i, size = bs[0]/DM_BITS_PER_INT + 1;
size_t count = 0;
for (i = 1; i <= size; i++)
count += hweight32(bs[i]);
return count;
}
/* Matches if all items from selection string list match list value strictly 1:1. */
static int _cmp_field_string_list_strict_all(const struct str_list_sort_value *val,
static int _cmp_field_string_list_strict_regex_all(const struct dm_report *rh,
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
unsigned int i;
dm_bitset_t bs;
int r;
if (!val->items)
return (sel->regex_num_patterns == 1) && dm_regex_match(sel->regex, "") >= 0;
if (!(bs = dm_bitset_create(rh->selection->mem, sel->regex_num_patterns))) {
log_error("Failed to create bitset for regex match counter.");
return 0;
}
for (i = 1; i <= val->items[0].pos; i++) {
if ((r = _str_list_item_match_regex(val, i, sel->regex)) < 0) {
r = 0;
goto out;
}
dm_bit_set(bs, r);
}
r = _bitset_count_set(bs) == sel->regex_num_patterns;
out:
dm_pool_free(rh->selection->mem, bs);
return r;
}
/* Matches if all items from selection string list match list value strictly 1:1. */
static int _cmp_field_string_list_strict_all(const struct dm_report *rh,
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
unsigned int sel_list_size = dm_list_size(&sel->str_list.list);
@@ -1782,7 +1855,36 @@ static int _cmp_field_string_list_strict_all(const struct str_list_sort_value *v
}
/* Matches if all items from selection string list match a subset of list value. */
static int _cmp_field_string_list_subset_all(const struct str_list_sort_value *val,
static int _cmp_field_string_list_subset_regex_all(const struct dm_report *rh,
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
dm_bitset_t bs;
unsigned int i;
int r;
if (!val->items)
return (sel->regex_num_patterns == 1) && dm_regex_match(sel->regex, "") >= 0;
if (!(bs = dm_bitset_create(rh->selection->mem, sel->regex_num_patterns))) {
log_error("Failed to create bitset for regex match counter.");
return 0;
}
for (i = 1; i <= val->items[0].pos; i++) {
if ((r = _str_list_item_match_regex(val, i, sel->regex)) < 0)
continue;
dm_bit_set(bs, r);
}
r = _bitset_count_set(bs) == sel->regex_num_patterns;
dm_pool_free(rh->selection->mem, bs);
return r;
}
/* Matches if all items from selection string list match a subset of list value. */
static int _cmp_field_string_list_subset_all(const struct dm_report *rh __attribute__((unused)),
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
unsigned int sel_list_size = dm_list_size(&sel->str_list.list);
@@ -1817,8 +1919,26 @@ static int _cmp_field_string_list_subset_all(const struct str_list_sort_value *v
}
/* Matches if any item from selection string list matches list value. */
static int _cmp_field_string_list_any(const struct str_list_sort_value *val,
const struct selection_str_list *sel)
static int _cmp_field_string_list_subset_regex_any(const struct dm_report *rh __attribute__((unused)),
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
unsigned int i;
if (!val->items)
return dm_regex_match(sel->regex, "") >= 0;
for (i = 1; i <= val->items[0].pos; i++) {
if (_str_list_item_match_regex(val, i, sel->regex) >= 0)
return 1;
}
return 0;
}
/* Matches if any item from selection string list matches list value. */
static int _cmp_field_string_list_subset_any(const struct dm_report *rh __attribute__((unused)),
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
struct dm_str_list *sel_item;
unsigned int i;
@@ -1847,7 +1967,59 @@ static int _cmp_field_string_list_any(const struct str_list_sort_value *val,
return 0;
}
static int _cmp_field_string_list(struct dm_report *rh __attribute__((unused)),
/* Matches if all items from list value can be matched by any item from selection list. */
static int _cmp_field_string_list_strict_regex_any(const struct dm_report *rh __attribute__((unused)),
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
unsigned int i;
if (!val->items)
return dm_regex_match(sel->regex, "") >= 0;
for (i = 1; i <= val->items[0].pos; i++) {
if (_str_list_item_match_regex(val, i, sel->regex) < 0)
return 0;
}
return 1;
}
/* Matches if all items from list value can be matched by any item from selection list. */
static int _cmp_field_string_list_strict_any(const struct dm_report *rh __attribute__((unused)),
const struct str_list_sort_value *val,
const struct selection_str_list *sel)
{
struct dm_str_list *sel_item;
unsigned int i;
int match;
/* match blank string list with selection that contains blank string */
if (!val->items) {
dm_list_iterate_items(sel_item, &sel->str_list.list) {
if (!strcmp(sel_item->str, ""))
return 1;
}
return 0;
}
for (i = 1; i <= val->items[0].pos; i++) {
match = 0;
dm_list_iterate_items(sel_item, &sel->str_list.list) {
if ((strlen(sel_item->str) == val->items[i].len) &&
!strncmp(sel_item->str, val->value + val->items[i].pos, val->items[i].len)) {
match = 1;
break;
}
}
if (!match)
return 0;
}
return 1;
}
static int _cmp_field_string_list(struct dm_report *rh,
uint32_t field_num, const char *field_id,
const struct str_list_sort_value *val,
struct field_selection *fs)
@@ -1869,11 +2041,16 @@ static int _cmp_field_string_list(struct dm_report *rh __attribute__((unused)),
switch (sel->type & SEL_MASK) {
case SEL_AND:
r = subset ? _cmp_field_string_list_subset_all(val, sel)
: _cmp_field_string_list_strict_all(val, sel);
r = subset ? sel->regex ? _cmp_field_string_list_subset_regex_all(rh, val, sel)
: _cmp_field_string_list_subset_all(rh, val, sel)
: sel->regex ? _cmp_field_string_list_strict_regex_all(rh, val, sel)
: _cmp_field_string_list_strict_all(rh, val, sel);
break;
case SEL_OR:
r = _cmp_field_string_list_any(val, sel);
r = subset ? sel->regex ? _cmp_field_string_list_subset_regex_any(rh, val, sel)
: _cmp_field_string_list_subset_any(rh, val, sel)
: sel->regex ? _cmp_field_string_list_strict_regex_any(rh, val, sel)
: _cmp_field_string_list_strict_any(rh, val, sel);
break;
default:
log_error(INTERNAL_ERROR "_cmp_field_string_list: unsupported string "
@@ -1907,7 +2084,17 @@ static int _compare_selection_field(struct dm_report *rh,
}
if (fs->flags & FLD_CMP_REGEX)
r = _cmp_field_regex((const char *) f->sort_value, fs);
switch (f->props->flags & DM_REPORT_FIELD_TYPE_MASK) {
case DM_REPORT_FIELD_TYPE_STRING:
r = _cmp_field_regex((const char *) f->sort_value, fs);
break;
case DM_REPORT_FIELD_TYPE_STRING_LIST:
r = _cmp_field_string_list(rh, f->props->field_num, field_id, (const struct str_list_sort_value *) f->sort_value, fs);
break;
default:
log_error(INTERNAL_ERROR "_compare_selection_field: regex: incorrect type %" PRIu32 " for field %s",
f->props->flags & DM_REPORT_FIELD_TYPE_MASK, field_id);
}
else {
switch(f->props->flags & DM_REPORT_FIELD_TYPE_MASK) {
case DM_REPORT_FIELD_TYPE_PERCENT:
@@ -1934,7 +2121,8 @@ static int _compare_selection_field(struct dm_report *rh,
r = _cmp_field_time(rh, f->props->field_num, field_id, *(const time_t *) f->sort_value, fs);
break;
default:
log_error(INTERNAL_ERROR "_compare_selection_field: unknown field type for field %s", field_id);
log_error(INTERNAL_ERROR "_compare_selection_field: incorrect type %" PRIu32 " for field %s",
f->props->flags & DM_REPORT_FIELD_TYPE_MASK, field_id);
}
}
@@ -2626,11 +2814,9 @@ static int _check_reserved_values_supported(const struct dm_report_field_type fi
static const char *_tok_value_regex(struct dm_report *rh,
const struct dm_report_field_type *ft,
const char *s, const char **begin,
const char **end, uint32_t *flags,
struct reserved_value_wrapper *rvw)
const char **end, uint32_t *flags)
{
char c;
rvw->reserved = NULL;
s = _skip_space(s);
@@ -2693,7 +2879,8 @@ static int _add_item_to_string_list(struct dm_pool *mem, const char *begin,
static const char *_tok_value_string_list(const struct dm_report_field_type *ft,
struct dm_pool *mem, const char *s,
const char **begin, const char **end,
struct selection_str_list **sel_str_list)
struct selection_str_list **sel_str_list,
uint32_t *flags)
{
static const char _str_list_item_parsing_failed[] = "Failed to parse string list value "
"for selection field %s.";
@@ -2707,12 +2894,11 @@ static const char *_tok_value_string_list(const struct dm_report_field_type *ft,
int list_end = 0;
char c;
if (!(ssl = dm_pool_alloc(mem, sizeof(*ssl)))) {
log_error("_tok_value_string_list: memory allocation failed for selection list");
if (!(ssl = dm_pool_zalloc(mem, sizeof(*ssl)))) {
log_error("_tok_value_string_list: memory allocation failed for selection list.");
goto bad;
}
dm_list_init(&ssl->str_list.list);
ssl->type = 0;
*begin = s;
if (!(op_flags = _tok_op_log(s, &tmp, SEL_LIST_LS | SEL_LIST_SUBSET_LS))) {
@@ -2724,7 +2910,7 @@ static const char *_tok_value_string_list(const struct dm_report_field_type *ft,
}
if (!_add_item_to_string_list(mem, begin_item, end_item, &ssl->str_list.list))
goto_bad;
ssl->type = SEL_OR | SEL_LIST_LS;
ssl->type = SEL_OR | SEL_LIST_SUBSET_LS;
goto out;
}
@@ -2799,12 +2985,17 @@ static const char *_tok_value_string_list(const struct dm_report_field_type *ft,
else
ssl->type |= SEL_LIST_SUBSET_LS;
/* Sort the list. */
if (!(list_size = dm_list_size(&ssl->str_list.list))) {
log_error(INTERNAL_ERROR "_tok_value_string_list: list has no items");
goto bad;
} else if (list_size == 1)
goto out;
if (*flags & FLD_CMP_REGEX)
/* No need to sort the list for regex. */
goto out;
/* Sort the list. */
if (!(arr = dm_malloc(sizeof(item) * list_size))) {
log_error("_tok_value_string_list: memory allocation failed for sort array");
goto bad;
@@ -3320,7 +3511,10 @@ static const char *_tok_value(struct dm_report *rh,
s = _skip_space(s);
s = _get_reserved(rh, expected_type, field_num, implicit, s, begin, end, rvw);
/* recognize possible reserved value (but not in a regex) */
if (!(*flags & FLD_CMP_REGEX))
s = _get_reserved(rh, expected_type, field_num, implicit, s, begin, end, rvw);
if (rvw->reserved) {
/*
* FLD_CMP_NUMBER shares operators with FLD_CMP_TIME,
@@ -3331,17 +3525,24 @@ static const char *_tok_value(struct dm_report *rh,
else if (expected_type == DM_REPORT_FIELD_TYPE_NUMBER)
*flags &= ~FLD_CMP_TIME;
*flags |= expected_type;
/* if we matched a reserved value, skip further processing of this token */
return s;
}
switch (expected_type) {
case DM_REPORT_FIELD_TYPE_STRING:
c = _get_and_skip_quote_char(&s);
if (!(s = _tok_value_string(s, begin, end, c, SEL_AND | SEL_OR | SEL_PRECEDENCE_PE, NULL))) {
log_error("Failed to parse string value "
"for selection field %s.", ft->id);
return NULL;
if (*flags & FLD_CMP_REGEX) {
if (!(s = _tok_value_regex(rh, ft, s, begin, end, flags)))
return NULL;
} else {
c = _get_and_skip_quote_char(&s);
if (!(s = _tok_value_string(s, begin, end, c, SEL_AND | SEL_OR | SEL_PRECEDENCE_PE, NULL))) {
log_error("Failed to parse string value "
"for selection field %s.", ft->id);
return NULL;
}
}
*flags |= DM_REPORT_FIELD_TYPE_STRING;
break;
@@ -3350,7 +3551,7 @@ static const char *_tok_value(struct dm_report *rh,
if (!(str_list = (struct selection_str_list **) custom))
goto_bad;
s = _tok_value_string_list(ft, mem, s, begin, end, str_list);
s = _tok_value_string_list(ft, mem, s, begin, end, str_list, flags);
if (!(*str_list)) {
log_error("Failed to parse string list value "
"for selection field %s.", ft->id);
@@ -3434,7 +3635,7 @@ static const char *_tok_value(struct dm_report *rh,
return s;
bad:
log_error(INTERNAL_ERROR "Forbidden NULL custom detected.");
log_error(INTERNAL_ERROR "_tok_value: Forbidden NULL custom parameter detected.");
return NULL;
}
@@ -3505,6 +3706,19 @@ static int _get_reserved_value(struct dm_report *rh, uint32_t field_num,
return 1;
}
static struct dm_regex *_selection_regex_create(struct selection *selection, const char * const *patterns,
unsigned num_patterns)
{
if (!selection->regex_mem) {
if (!(selection->regex_mem = dm_pool_create("report selection regex", 32 * 1024))) {
log_error("Failed to create report selection regex memory pool.");
return NULL;
}
}
return dm_regex_create(selection->regex_mem, patterns, num_patterns);
}
static struct field_selection *_create_field_selection(struct dm_report *rh,
uint32_t field_num,
int implicit,
@@ -3522,7 +3736,11 @@ static struct field_selection *_create_field_selection(struct dm_report *rh,
struct time_value *tval;
uint64_t factor;
char *s;
const char *s_array[2] = { 0 };
const char *s_arr_single[2] = { 0 };
const char **s_arr;
size_t s_arr_size;
struct dm_str_list *sl;
size_t i;
dm_list_iterate_items(fp, &rh->field_props) {
if ((fp->implicit == implicit) && (fp->field_num == field_num)) {
@@ -3587,21 +3805,53 @@ static struct field_selection *_create_field_selection(struct dm_report *rh,
/* store comparison operand */
if (flags & FLD_CMP_REGEX) {
/* REGEX */
if (!(s = dm_malloc(len + 1))) {
log_error("dm_report: dm_malloc failed to store "
"regex value for selection field %s", field_id);
goto error;
}
memcpy(s, v, len);
s[len] = '\0';
s_array[0] = s;
switch (flags & DM_REPORT_FIELD_TYPE_MASK) {
case DM_REPORT_FIELD_TYPE_STRING:
if (!(s = malloc(len + 1))) {
log_error("dm_report: malloc failed to store "
"regex value for selection field %s", field_id);
goto error;
}
memcpy(s, v, len);
s[len] = '\0';
s_arr_single[0] = s;
fs->value->v.r = dm_regex_create(rh->selection->mem, s_array, 1);
dm_free(s);
if (!fs->value->v.r) {
log_error("dm_report: failed to create regex "
"matcher for selection field %s", field_id);
goto error;
fs->value->v.r = _selection_regex_create(rh->selection, s_arr_single, 1);
free(s);
if (!fs->value->v.r) {
log_error("dm_report: failed to create regex "
"matcher for selection field %s", field_id);
goto error;
}
break;
case DM_REPORT_FIELD_TYPE_STRING_LIST:
if (!custom)
goto bad;
fs->value->v.l = *((struct selection_str_list **) custom);
s_arr_size = dm_list_size(&fs->value->v.l->str_list.list);
if (!(s_arr = malloc(sizeof(char *) * s_arr_size))) {
log_error("dm_report: malloc failed for regex array "
"for selection field %s", field_id);
goto error;
}
i = 0;
dm_list_iterate_items(sl, &fs->value->v.l->str_list.list)
s_arr[i++] = sl->str;
fs->value->v.l->regex = _selection_regex_create(rh->selection, s_arr, s_arr_size);
fs->value->v.l->regex_num_patterns = s_arr_size;
free(s_arr);
if (!fs->value->v.l->regex) {
log_error("dm_report: failed to create regex "
"matcher for selection field %s", field_id);
goto error;
}
break;
default:
log_error(INTERNAL_ERROR "_create_field_selection: regex: incorrect type %" PRIu32 " for field %s",
flags & DM_REPORT_FIELD_TYPE_MASK, field_id);
goto error;
}
} else {
/* STRING, NUMBER, SIZE, PERCENT, STRING_LIST, TIME */
@@ -3715,8 +3965,8 @@ static struct field_selection *_create_field_selection(struct dm_report *rh,
}
break;
default:
log_error(INTERNAL_ERROR "_create_field_selection: "
"unknown type of selection field %s", field_id);
log_error(INTERNAL_ERROR "_create_field_selection: incorrect type %" PRIu32 " for field %s",
flags & DM_REPORT_FIELD_TYPE_MASK, field_id);
goto error;
}
}
@@ -3727,7 +3977,7 @@ error_field_id:
field_id);
goto error;
bad:
log_error(INTERNAL_ERROR "Forbidden NULL custom detected.");
log_error(INTERNAL_ERROR "_create_field_selection: Forbidden NULL custom detected.");
error:
dm_pool_free(rh->selection->mem, fs);
@@ -3863,7 +4113,7 @@ static struct selection_node *_parse_selection(struct dm_report *rh,
char *tmp;
char c;
/* field name */
/* get field name */
if (!(last = _tok_field_name(s, &ws, &we))) {
log_error("Expecting field name");
goto bad;
@@ -3896,7 +4146,7 @@ static struct selection_node *_parse_selection(struct dm_report *rh,
} else
ft = &rh->fields[field_num];
/* comparison operator */
/* get comparison operator */
if (!(flags = _tok_op_cmp(we, &last))) {
_display_selection_help(rh);
log_error("Unrecognised comparison operator: %s", we);
@@ -3908,50 +4158,49 @@ static struct selection_node *_parse_selection(struct dm_report *rh,
goto bad;
}
/* comparison value */
/* check we can use the operator with the field */
if (flags & FLD_CMP_REGEX) {
/*
* REGEX value
*/
if (!(last = _tok_value_regex(rh, ft, last, &vs, &ve, &flags, &rvw)))
goto_bad;
} else {
/*
* STRING, NUMBER, SIZE, PERCENT, STRING_LIST, TIME value
*/
if (flags & FLD_CMP_NUMBER) {
if (!(ft->flags & (DM_REPORT_FIELD_TYPE_NUMBER |
DM_REPORT_FIELD_TYPE_SIZE |
DM_REPORT_FIELD_TYPE_PERCENT |
DM_REPORT_FIELD_TYPE_TIME))) {
_display_selection_help(rh);
log_error("Operator can be used only with number, size, time or percent fields: %s", ws);
goto bad;
}
} else if (flags & FLD_CMP_TIME) {
if (!(ft->flags & DM_REPORT_FIELD_TYPE_TIME)) {
_display_selection_help(rh);
log_error("Operator can be used only with time fields: %s", ws);
goto bad;
}
if (!(ft->flags & (DM_REPORT_FIELD_TYPE_STRING |
DM_REPORT_FIELD_TYPE_STRING_LIST))) {
_display_selection_help(rh);
log_error("Operator can be used only with string or string list fields: %s", ws);
goto bad;
}
} else if (flags & FLD_CMP_NUMBER) {
if (!(ft->flags & (DM_REPORT_FIELD_TYPE_NUMBER |
DM_REPORT_FIELD_TYPE_SIZE |
DM_REPORT_FIELD_TYPE_PERCENT |
DM_REPORT_FIELD_TYPE_TIME))) {
_display_selection_help(rh);
log_error("Operator can be used only with number, size, time or percent fields: %s", ws);
goto bad;
}
} else if (flags & FLD_CMP_TIME) {
if (!(ft->flags & DM_REPORT_FIELD_TYPE_TIME)) {
_display_selection_help(rh);
log_error("Operator can be used only with time fields: %s", ws);
goto bad;
}
if (ft->flags == DM_REPORT_FIELD_TYPE_SIZE ||
ft->flags == DM_REPORT_FIELD_TYPE_NUMBER ||
ft->flags == DM_REPORT_FIELD_TYPE_PERCENT)
custom = &factor;
else if (ft->flags & DM_REPORT_FIELD_TYPE_TIME)
custom = &tval;
else if (ft->flags == DM_REPORT_FIELD_TYPE_STRING_LIST)
custom = &str_list;
else
custom = NULL;
if (!(last = _tok_value(rh, ft, field_num, implicit,
last, &vs, &ve, &flags,
&rvw, rh->selection->mem, custom)))
goto_bad;
}
/* assign custom structures to hold extra information for specific value types */
if (ft->flags == DM_REPORT_FIELD_TYPE_SIZE ||
ft->flags == DM_REPORT_FIELD_TYPE_NUMBER ||
ft->flags == DM_REPORT_FIELD_TYPE_PERCENT)
custom = &factor;
else if (ft->flags & DM_REPORT_FIELD_TYPE_TIME)
custom = &tval;
else if (ft->flags == DM_REPORT_FIELD_TYPE_STRING_LIST)
custom = &str_list;
else
custom = NULL;
/* get value to compare with */
if (!(last = _tok_value(rh, ft, field_num, implicit,
last, &vs, &ve, &flags,
&rvw, rh->selection->mem, custom)))
goto_bad;
*next = _skip_space(last);
/* create selection */
@@ -4092,7 +4341,7 @@ error:
static int _alloc_rh_selection(struct dm_report *rh)
{
if (!(rh->selection = dm_pool_zalloc(rh->mem, sizeof(struct selection))) ||
!(rh->selection->mem = dm_pool_create("report selection", 10 * 1024))) {
!(rh->selection->mem = dm_pool_create("report selection", 1024))) {
log_error("Failed to allocate report selection structure.");
if (rh->selection)
dm_pool_free(rh->mem, rh->selection);
@@ -5099,6 +5348,15 @@ struct dm_report_group *dm_report_group_create(dm_report_group_type_t type, void
struct dm_pool *mem;
struct report_group_item *item;
if (type == DM_REPORT_GROUP_JSON_STD) {
const char * radixchar = nl_langinfo(RADIXCHAR);
if (radixchar && strcmp(radixchar, ".")) {
log_error("dm_report: incompatible locale used for DM_REPORT_GROUP_JSON_STD, "
"radix character is '%s', expected '.'", radixchar);
return NULL;
}
}
if (!(mem = dm_pool_create("report_group", 1024))) {
log_error("dm_report: dm_report_init_group: failed to allocate mem pool");
return NULL;

View File

@@ -1,31 +1,45 @@
.TH "BLKDEACTIVATE" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" \" -*- nroff -*-
.
.de NSY
. ie t .SY \\$1
. el \{\
. ie \\n(.$>1 \{\
. PD 0
. TP \\w'\\$1\ 'u
. \}
. el .TP
. B \\$1
. nh
. na
. \}
..
.
.SH NAME
.
blkdeactivate \(em utility to deactivate block devices
.
.SH SYNOPSIS
.
.na
.nh
.B blkdeactivate
.RB [ -d
.NSY blkdeactivate 1
.RB [ -d | --dmoptions\ \c
.IR dm_options ]
.RB [ -e ]
.RB [ -h ]
.RB [ -l
.RB [ -e | --errors ]
.RB [ -h | --help ]
.RB [ -l | --lvmoptions\ \c
.IR lvm_options ]
.RB [ -m
.IR mpath_options ]
.RB [ -r
.RB [ -r | --mdraidoptions\ \c
.IR mdraid_options ]
.RB [ -o
.RB [ -m | --mpathoptions\ \c
.IR mpath_options ]
.RB [ -u | --umount ]
.RB [ -o | --vdooptions\ \c
.IR vdo_options ]
.RB [ -u ]
.RB [ -v ]
.RB [ -v | --verbose ]
.RI [ device ]
.hy
.
.PD
.ad
.hy
.
.SH DESCRIPTION
.
@@ -41,16 +55,23 @@ MD devices are handled using the \fBmdadm\fP(8) command.
.SH OPTIONS
.
.TP
.BR -d | --dmoptions " " \fIdm_options
\fB-d\fP|\fB--dmoptions\fP \fIdm_options\fP
Comma separated list of device-mapper specific options.
Accepted \fBdmsetup\fP(8) options are:
.br
Accepted
.BR dmsetup (8)
options are:
.
.RS
.
.TP
.B retry
Retry removal several times in case of failure.
.
.TP
.B force
Force device removal.
.
.RE
.
.TP
@@ -65,12 +86,14 @@ the device was skipped.
Display the help text.
.
.TP
.BR -l | --lvmoptions " " \fIlvm_options
\fB-l\fP|\fB--lvmoptions\fP \fIlvm_options\fP
Comma-separated list of LVM specific options:
.RS
.
.TP
.B retry
Retry removal several times in case of failure.
.
.TP
.B wholevg
Deactivate the whole LVM Volume Group when processing a Logical Volume.
@@ -79,34 +102,31 @@ each Logical Volume separately.
.RE
.
.TP
.BR -r | --mdraidoptions " " \fImdraid_options
\fB-r\fP|\fB--mdraidoptions\fP \fImdraid_options\fP
Comma-separated list of MD RAID specific options:
.
.RS
.
.TP
.B wait
Wait MD device's resync, recovery or reshape action to complete
before deactivation.
.
.RE
.
.TP
.BR -m | --mpathoptions " " \fImpath_options
\fB-m\fP|\fB--mpathoptions\fP \fImpath_options\fP
Comma-separated list of device-mapper multipath specific options:
.
.RS
.
.TP
.B disablequeueing
Disable queueing on all multipath devices before deactivation.
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 -o | --vdooptions " " \fIvdo_options
Comma-separated list of VDO specific options:
.RS
.TP
.BR configfile = \fIfile
Use specified VDO configuration file.
.RE
.
.TP
@@ -115,7 +135,19 @@ 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
\fB-o\fP|\fB--vdooptions\fP \fIvdo_options\fP
Comma-separated list of VDO specific options:
.
.RS
.
.TP
\fBconfigfile\fP=\fIfile\fP
Use specified VDO configuration file.
.
.RE
.
.TP
.BR -v | --verbose
Run in verbose mode. Use \fB-vv\fP for even more verbose mode.
.
.SH EXAMPLES
@@ -123,41 +155,40 @@ Run in verbose mode. Use \fB-vv\fP for even more verbose mode.
Deactivate all supported block devices found in the system, skipping mounted
devices.
.br
#
.B blkdeactivate
.P
Deactivate all supported block devices found in the system, unmounting any
mounted devices first, if possible.
.br
#
.B blkdeactivate -u
.P
Deactivate the device /dev/vg/lvol0 together with all its holders, unmounting
any mounted devices first, if possible.
.br
#
.na
.B blkdeactivate -u /dev/vg/lvol0
.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
#
.na
.B blkdeactivate -u -d retry -l wholevg
.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
#
.B blkdeactivate -d force,retry
.
.SH SEE ALSO
.
.nh
.na
.BR dmsetup (8),
.BR lsblk (8),
.BR lvm (8),
.P
.BR dmsetup (8),
.P
.BR lsblk (8),
.BR mdadm (8),
.BR multipathd (8),
.BR vdo (8),

View File

@@ -1,15 +1,33 @@
.TH CMIRRORD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
.
.de NSY
. ie t .SY \\$1
. el \{\
. ie \\n(.$>1 \{\
. PD 0
. TP \\w'\\$1\ 'u
. \}
. el .TP
. B \\$1
. nh
. na
. \}
..
.
.SH NAME
.
cmirrord \(em cluster mirror log daemon
.
.SH SYNOPSIS
.
.B cmirrord
.NSY cmirrord 1
.RB [ -f | --foreground ]
.RB [ -h | --help ]
.
.PD
.ad
.hy
.
.SH DESCRIPTION
.
\fBcmirrord\fP is the daemon that tracks mirror log information in a cluster.
@@ -34,13 +52,17 @@ mirror log daemon.
.TP
.BR -f | --foreground
Do not fork and log to the terminal.
.
.TP
.BR -h | --help
Print usage.
.
.SH SEE ALSO
.
.nh
.na
.BR lvmlockd (8),
.BR lvm (8),
.P
.BR syslog (3),
.BR signal (7)

View File

@@ -1,17 +1,31 @@
.TH DMEVENTD 8 "DM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
.
.de NSY
. ie t .SY \\$1
. el \{\
. ie \\n(.$>1 \{\
. PD 0
. TP \\w'\\$1\ 'u
. \}
. el .TP
. B \\$1
. nh
. na
. \}
..
.
.SH NAME
.
dmeventd \(em Device-mapper event daemon
.
.SH SYNOPSIS
.
.B dmeventd
.NSY dmeventd 1
.RB [ -d
.RB [ -d
.RB [ -d ]]]
.RB [ -e
.BR exit_on_path ]
.RB [ -e\ \c
.IR exit_on_path ]
.RB [ -f ]
.RB [ -h ]
.RB [ -i ]
@@ -20,6 +34,10 @@ dmeventd \(em Device-mapper event daemon
.RB [ -V ]
.RB [ -? ]
.
.PD
.ad
.hy
.
.SH DESCRIPTION
.
dmeventd is the event monitoring daemon for device-mapper devices.
@@ -39,7 +57,7 @@ debug messages sent to syslog.
Each extra d adds more debugging information.
.
.TP
.B -e exit_on_path
\fB-e\fP \fIexit_on_path\fP
Specifies the file path whose presence is checked by the daemon when it
receives a signal (SIGINT, SIGTERM) and allows to exit even if there are still
monitored devices.
@@ -86,14 +104,12 @@ Show version of dmeventd.
.TP
.B Mirror
Attempts to handle device failure automatically.
.br
See
.BR lvm.conf (5).
.
.TP
.B Raid
Attempts to handle device failure automatically.
.br
See
.BR lvm.conf (5).
.
@@ -115,11 +131,11 @@ The warning is repeated when more than 85%, 90% and 95%
of the thin pool is filled. See
.BR lvm.conf (5).
When a thin pool fills over 50% (data or metadata) thin plugin calls
configured \fBdmeventd/thin_command\fP with every 5% increase.
configured \fBdmeventd/\:thin_command\fP with every 5% increase.
With default setting it calls internal
\fBlvm lvextend --use-policies\fP to resize thin pool
when it's been filled above configured threshold
\fBactivation/thin_pool_autoextend_threshold\fP.
\fBactivation/\:thin_pool\%_auto\%extend\%_threshold\fP.
If the command fails, dmeventd thin plugin will keep
retrying execution with increasing time delay between
retries up to 42 minutes.
@@ -130,11 +146,13 @@ use \fBfstrim\fP(8) to free recover space in a thin pool,
but also can use \fBlvextend --use-policies\fP if other actions
have not released enough space.
Command is executed with environmental variable
\fBLVM_RUN_BY_DMEVENTD=1\fP so any lvm2 command executed
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.
\fBLVM_RUN_BY\%_DM\%EVENTD=1\fP
so any lvm2 command executed 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.
Command can also read status with tools like \fBlvs\fP(8).
.
.TP
@@ -145,11 +163,11 @@ The warning is repeated when more than 85%, 90% and 95%
of the VDO pool is filled. See
.BR lvm.conf (5).
When a VDO pool fills over 50% vdo plugin calls
configured \fBdmeventd/vdo_command\fP with every 5% increase.
configured \fBdmeventd/\:vdo_command\fP with every 5% increase.
With default setting it calls internal
\fBlvm lvextend --use-policies\fP to resize VDO pool
when it's been filled above the configured threshold
\fBactivation/vdo_pool_autoextend_threshold\fP.
\fBactivation/\:vdo_pool\%_auto\%extend\%_threshold\fP.
If the command fails, dmeventd vdo plugin will keep
retrying execution with increasing time delay between
retries up to 42 minutes.
@@ -157,10 +175,10 @@ User may also configure external command to support more advanced
maintenance operations of a VDO pool.
Such external command can e.g. remove some unneeded space
with \fBfstrim\fP(8),
but also can use \fBlvextend --use-policies\fP if other actions
have not released enough space.
but also can use \fBlvextend --use-policies\fP
if other actions have not released enough space.
Command is executed with environmental variable
\fBLVM_RUN_BY_DMEVENTD=1\fP so any lvm2 command executed
\fBLVM_RUN_BY\%_DMEVENTD=1\fP so any lvm2 command executed
in this environment will not try to interact with dmeventd.
To see the fullness of a VDO pool command may check this
environmental variable \fBDMEVENTD_VDO_POOL\fP.
@@ -173,16 +191,19 @@ Command can also read status with tools like \fBlvs\fP(8).
Variable is set by thin plugin and is available to executed program.
Value present actual usage of thin pool data volume.
Variable is not set when error event is processed.
.
.TP
.B DMEVENTD_THIN_POOL_METADATA
Variable is set by thin plugin and is available to executed program.
Value present actual usage of thin pool metadata volume.
Variable is not set when error event is processed.
.
.TP
.B DMEVENTD_VDO_POOL
Variable is set by vdo plugin and is available to executed program.
Value present actual usage of VDO pool data volume.
Variable is not set when error event is processed.
.
.TP
.B LVM_RUN_BY_DMEVENTD
Variable is set by thin and vdo plugin to prohibit recursive interaction
@@ -191,8 +212,10 @@ a thin_command, vdo_command environment.
.
.SH SEE ALSO
.
.nh
.na
.BR lvm (8),
.BR lvm.conf (5),
.BR lvextend (8),
.br
.P
.BR fstrim (8)

View File

@@ -1,5 +1,28 @@
.TH DMFILEMAPD 8 "Dec 17 2016" "Linux" "MAINTENANCE COMMANDS"
.
.if !dEX \{\
.de EX
.nf
..
.de EE
.fi
..
\}
.
.de NSY
. ie t .SY \\$1
. el \{\
. ie \\n(.$>1 \{\
. PD 0
. TP \\w'\\$1\ 'u
. \}
. el .TP
. B \\$1
. nh
. na
. \}
..
.
.de OPT_FD
. I file_descriptor
..
@@ -26,21 +49,16 @@ dmfilemapd \(em device-mapper filemap monitoring daemon
.
.SH SYNOPSIS
.
.de CMD_DMFILEMAPD
. na
. nh
. BR dmfilemapd
. OPT_FD
. OPT_GROUP
. OPT_PATH
. OPT_MODE
. OPT_DEBUG
. hy
. ad
..
.CMD_DMFILEMAPD
.NSY dmfilemapd 1
.OPT_FD
.OPT_GROUP
.OPT_PATH
.OPT_MODE
.OPT_DEBUG
.
.PD
.ad
.hy
.
.SH DESCRIPTION
.
@@ -83,11 +101,15 @@ and the \fImode\fP option for more information.
.OPT_MODE
The filemap monitoring mode the daemon.
Use either
.na
.nh
.B inode
(\fBDM_FILEMAP_FOLLOW_INODE\fP), or
.B path
(\fBDM_FILEMAP_FOLLOW_PATH\fP), to enable follow-inode or
follow-path mode respectively.
(\fBDM_FILEMAP_FOLLOW_PATH\fP),
to enable follow-inode or follow-path mode respectively.
.hy
.ad
.
.TP
.RI [ foreground ]
@@ -113,26 +135,26 @@ cause the daemon to terminate.
.P
In both modes, the daemon will always shut down when the group
being monitored is deleted.
.P
.
.TP
.B Follow inode
.P
The daemon follows the inode of the file, as it was at the time the
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
.sp
This mode is useful if the file is expected to be renamed, or moved
within the file system, while it is being monitored.
.P
.
.TP
.B Follow path
.P
The daemon follows the path that was given on the daemon command
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
.sp
This mode is useful if the file is updated by unlinking the original
and placing a new file at the same path.
.
@@ -143,7 +165,9 @@ extents and the regions contained in the group, however, since the
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).
single thread writing beyond EOF (for example, the
.BR dd (1)
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
@@ -164,17 +188,14 @@ manually for debugging or testing purposes.
.P
Start the daemon in the background, in follow-path mode
.br
#
.B dmfilemapd 3 0 /srv/images/vm.img path 0 0 3< /srv/images/vm.img
.br
.P
Start the daemon in follow-inode mode, disable forking and enable
verbose logging
.br
.na
#
.B dmfilemapd 3 0 /var/tmp/data inode 1 3 3< /var/tmp/data
.nf
.P
.EX
Starting dmfilemapd with fd=3, group_id=0 mode=inode, path=/var/tmp/data
dm version [ opencount flush ] [16384] (*1)
dm info (253:0) [ opencount flush ] [16384] (*1)
@@ -185,22 +206,24 @@ dm_stats_walk_init: initialized flags to 4000000000000
starting stats walk with GROUP
exiting _filemap_monitor_get_events() with deleted=0, check=0
Waiting for check interval
.fi
.ad
.EE
.
.SH AUTHORS
.
Bryn M. Reeves <bmr@redhat.com>
.MT bmr@redhat.com
Bryn M. Reeves
.ME
.
.SH SEE ALSO
.
.nh
.na
.BR dmstats (8)
.P
LVM2 resource page:
.UR https://www.sourceware.org/lvm2
LVM2 resource page:
.UE
.br
Device-mapper resource page:
.UR http://www.sourceware.org/lvm2
Device-mapper resource page:
.UE

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,27 +1,39 @@
.TH "FSADM" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" \" -*- nroff -*-
.
.de NSY
. ie t .SY \\$1
. el \{\
. ie \\n(.$>1 \{\
. PD 0
. TP \\w'\\$1\ 'u
. \}
. el .TP
. B \\$1
. nh
. na
. \}
..
.
.SH "NAME"
.
fsadm \(em utility to resize or check filesystem on a device
.
.SH SYNOPSIS
.
.PD 0
.na
.TP 6
.B fsadm
.NSY fsadm 1
.RI [ options ]
.BR check
.IR device
.B check
.I device
.
.TP
.B fsadm
.NSY fsadm
.RI [ options ]
.BR resize
.IR device
.B resize
.I device
.RI [ new_size ]
.ad
.
.PD
.ad
.hy
.
.SH DESCRIPTION
.
@@ -31,16 +43,16 @@ It tries to use the same API for
.BR ext2 ,
.BR ext3 ,
.BR ext4 ,
.BR ReiserFS
.B ReiserFS
and
.BR XFS
.B XFS
filesystem.
.
.SH OPTIONS
.
.TP
.BR -e | --ext-offline
Unmount ext2/ext3/ext4 filesystem before doing resize.
Unmount ext2/\:ext3/\:ext4 filesystem before doing resize.
.
.TP
.BR -f | --force
@@ -74,7 +86,8 @@ Resize dm-crypt mapping together with filesystem detected on the device.
The dm-crypt device must be recognizable by cryptsetup(8).
.
.TP
.BR \fInew_size [ B | K | M | G | T | P | E ]
.IR new_size [\c
.BR B | K | M | G | T | P | E ]
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,18 +104,19 @@ A status code of 1 is used for other failures.
.
.SH EXAMPLES
.
Resize the filesystem on logical volume \fI/dev/vg/test\fP to 1000\~MiB.
Resize the filesystem on logical volume \fI/dev/vg/test\fP to 1000\ MiB.
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'.
.P
.B # fsadm -e -y resize /dev/vg/test 1000M
.B fsadm -e -y resize /dev/vg/test 1000M
.
.SH ENVIRONMENT VARIABLES
.
.TP
.B TMPDIR
The temporary directory name for mount points. Defaults to "\fI/tmp\fP".
.
.TP
.B DM_DEV_DIR
The device directory name.

File diff suppressed because it is too large Load Diff

View File

@@ -51,7 +51,8 @@ from specific PV ranges.
.br
.B lvconvert --mirrors 1 vg/lvol1 /dev/sda:0-15 /dev/sdb:0-15
.P
Convert a mirror LV to a linear LV, freeing physical extents from a specific PV.
Convert a mirror LV to a linear LV,
freeing physical extents from a specific PV.
.br
.B lvconvert --type linear vg/lvol1 /dev/sda
.P
@@ -75,10 +76,8 @@ Replace PV /dev/sdb1 with PV /dev/sdf1 in a raid1/4/5/6/10 LV.
.P
Replace 3 PVs /dev/sd[b-d]1 with PVs /dev/sd[f-h]1 in a raid1 LV.
.br
.B lvconvert --replace /dev/sdb1 --replace /dev/sdc1 --replace /dev/sdd1
.RS
.B vg/lvol1 /dev/sd[fgh]1
.RE
.B lvconvert --replace /dev/sdb1 --replace /dev/sdc1 \
--replace /dev/sdd1 vg/lvol1 /dev/sd[fgh]1
.P
Replace the maximum of 2 PVs /dev/sd[bc]1 with PVs /dev/sd[gh]1 in a raid6 LV.
.br
@@ -103,10 +102,7 @@ Convert an LV into a thin LV in the specified thin pool. The existing LV
is used as an external read-only origin for the new thin LV, and is
renamed "external".
.br
.B lvconvert --type thin --thinpool vg/tpool1
.RS
.B --originname external vg/lvol1
.RE
.B lvconvert --type thin --thinpool vg/tpool1 --originname external vg/lvol1
.P
Convert an LV to a cache pool LV using another specified LV for cache pool
metadata.

File diff suppressed because it is too large Load Diff

View File

@@ -1,25 +1,25 @@
.
.SH EXAMPLES
.
Create a striped LV with 3 stripes, a stripe size of 8\~KiB
and a size of 100\~MiB.
Create a striped LV with 3 stripes, a stripe size of 8\ KiB
and a size of 100\ MiB.
The LV name is chosen by lvcreate.
.br
.B lvcreate -i 3 -I 8 -L 100m vg00
.P
Create a raid1 LV with two images, and a usable size of 500\~MiB. This
operation requires two devices, one for each mirror image. RAID metadata
(superblock and bitmap) is also included on the two devices.
Create a raid1 LV with two images, and a usable size of 500\ MiB.
This operation requires two devices, one for each mirror image.
RAID metadata (superblock and bitmap) is also included on the two devices.
.br
.B lvcreate --type raid1 -m1 -L 500m -n mylv vg00
.P
Create a mirror LV with two images, and a usable size of 500\~MiB.
Create a mirror LV with two images, and a usable size of 500\ MiB.
This operation requires three devices: two for mirror images and
one for a disk log.
.br
.B lvcreate --type mirror -m1 -L 500m -n mylv vg00
.P
Create a mirror LV with 2 images, and a usable size of 500\~MiB.
Create a mirror LV with 2 images, and a usable size of 500\ MiB.
This operation requires 2 devices because the log is in memory.
.br
.B lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
@@ -33,17 +33,17 @@ for overwriting 20% of the size of the original LV.
.br
.B lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
.P
Create a sparse LV with 1 TiB of virtual space, and actual space just under
100\~MiB.
Create a sparse LV with 1 TiB of virtual space,
and actual space just under 100\ MiB.
.br
.B lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
.P
Create a linear LV with a usable size of 64\~MiB on specific physical extents.
Create a linear LV with a usable size of 64\ MiB on specific physical extents.
.br
.B lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
.P
Create a RAID5 LV with a usable size of 5 GiB, 3 stripes, a stripe size of
64\~KiB, using a total of 4 devices (including one for parity).
64\ KiB, using a total of 4 devices (including one for parity).
.br
.B lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
.P
@@ -51,15 +51,13 @@ Create a RAID5 LV using all of the free space in the VG and spanning all the
PVs in the VG (note that the command will fail if there are more than 8 PVs in
the VG, in which case \fB-i 7\fP must be used to get to the current maximum of
8 devices including parity for RaidLVs).
.PD 0
.HP
.B lvcreate --config allocation/raid_stripe_all_devices=1 \
.br
.B lvcreate --config allocation/\:raid_stripe_all_devices=1 \
--type raid5 -l 100%FREE -n mylv vg00
.PD
.P
Create RAID10 LV with a usable size of 5 GiB, using 2 stripes, each on
a two-image mirror. (Note that the \fB-i\fP and \fB-m\fP arguments behave
differently:
Create RAID10 LV with a usable size of 5 GiB, using 2 stripes,
each on a two-image mirror.
(Note that the \fB-i\fP and \fB-m\fP arguments behave differently:
\fB-i\fP specifies the total number of stripes,
but \fB-m\fP specifies the number of images in addition
to the first image).
@@ -70,17 +68,15 @@ Create a 1 TiB thin LV mythin, with 256 GiB thinpool tpool0 in vg00.
.br
.B lvcreate -T -V 1T --size 256G --name mythin vg00/tpool0
.P
Create a 1 TiB thin LV, first creating a new thin pool for it, where
the thin pool has 100\~MiB of space, uses 2 stripes, has a 64\~KiB stripe
size, and 256\~KiB chunk size.
.PD 0
.HP
Create a 1 TiB thin LV, first creating a new thin pool for it,
where the thin pool has 100\ MiB of space, uses 2 stripes,
has a 64\ KiB stripe size, and 256\ KiB chunk size.
.br
.B lvcreate --type thin --name mylv --thinpool mypool -V 1t \
-L 100m -i 2 -I 64 -c 256 vg00
.PD
.P
Create a thin snapshot of a thin LV (the size option must not be
used, otherwise a copy-on-write snapshot would be created).
Create a thin snapshot of a thin LV (the size option must not be used,
otherwise a copy-on-write snapshot would be created).
.br
.B lvcreate --snapshot --name mysnap vg00/thinvol
.P
@@ -96,10 +92,8 @@ then be used to cache an LV.
.P
Create a cache LV, first creating a new origin LV on a slow physical device,
then combining the new origin LV with an existing cache pool.
.PD 0
.HP
.br
.B lvcreate --type cache --cachepool my_cpool -L 100G -n mylv vg00 /dev/slow1
.PD
.P
Create a VDO LV vdo0 with VDOPoolLV size of 10 GiB and name vpool1.
.br

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,220 @@
.TH LVM FULLREPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_aligned
.OPS aligned
..
.de O_all
.OPS a all
..
.de O_binary
.OPS binary
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_configreport
.OPA configreport
\%\fBlog\fP|\:\
\fBvg\fP|\:\
\fBlv\fP|\:\
\fBpv\fP|\:\
\fBpvseg\fP|\:\
\fBseg\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_foreign
.OPS foreign
..
.de O_headings
.OPA headings
\%\fBnone\fP|\:\
\fBabbrev\fP|\:\
\fBfull\fP|\:\
\fB0\fP|\:\
\fB1\fP|\:\
\fB2\fP
..
.de O_help
.OPS h help
..
.de O_ignorelockingfailure
.OPS ignorelockingfailure
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_logonly
.OPS logonly
..
.de O_longhelp
.OPS longhelp
..
.de O_nameprefixes
.OPS nameprefixes
..
.de O_noheadings
.OPS noheadings
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_nosuffix
.OPS nosuffix
..
.de O_options
.OPA o options
\fIString\fP
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_readonly
.OPS readonly
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_rows
.OPS rows
..
.de O_select
.OPA S select
\fIString\fP
..
.de O_separator
.OPA separator
\fIString\fP
..
.de O_shared
.OPS shared
..
.de O_sort
.OPA O sort
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_unbuffered
.OPS unbuffered
..
.de O_units
.OPA units
\%[\fINumber\fP]\fBr\fP|\:\
\fBR\fP|\:\
\fBh\fP|\:\
\fBH\fP|\:\
\fBb\fP|\:\
\fBB\fP|\:\
\fBs\fP|\:\
\fBS\fP|\:\
\fBk\fP|\:\
\fBK\fP|\:\
\fBm\fP|\:\
\fBM\fP|\:\
\fBg\fP|\:\
\fBG\fP|\:\
\fBt\fP|\:\
\fBT\fP|\:\
\fBp\fP|\:\
\fBP\fP|\:\
\fBe\fP|\:\
\fBE\fP
..
.de O_unquoted
.OPS unquoted
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvm fullreport \(em Display full report
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvm fullreport\fP
[ \fIoption_args\fP ]
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
[ \fIposition_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -22,118 +226,190 @@ if information changes between commands.
.
.SH USAGE
.
\fBlvm fullreport\fP
.br
.RS 4
.na
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.br
[ \fB-a\fP|\fB--all\fP ]
.br
[ \fB-o\fP|\fB--options\fP \fIString\fP ]
.br
[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
.br
[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
.br
[ \fB--foreign\fP ]
.br
[ \fB--ignorelockingfailure\fP ]
.br
[ \fB--logonly\fP ]
.br
[ \fB--readonly\fP ]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
.br
[ \fB--shared\fP ]
.br
[ \fB--units\fP \c
.nh
\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
.hy
.na
.B lvm fullreport
.RS
[
.O_select
]
.br
[ \fB--aligned\fP ]
[
.O_all
]
.br
[ \fB--binary\fP ]
[
.O_options
]
.br
[ \fB--headings\fP \fBnone\fP|\fBabbrev\fP|\fBfull\fP|\fB0\fP|\fB1\fP|\fB2\fP ]
[
.O_sort
]
.br
[ \fB--nameprefixes\fP ]
[
.O_configreport
]
.br
[ \fB--noheadings\fP ]
[
.O_foreign
]
.br
[ \fB--nosuffix\fP ]
[
.O_ignorelockingfailure
]
.br
[ \fB--rows\fP ]
[
.O_logonly
]
.br
[ \fB--separator\fP \fIString\fP ]
[
.O_readonly
]
.br
[ \fB--unbuffered\fP ]
[
.O_reportformat
]
.br
[ \fB--unquoted\fP ]
[
.O_shared
]
.br
[
.O_units
]
.br
[
.O_aligned
]
.br
[
.O_binary
]
.br
[
.O_headings
]
.br
[
.O_nameprefixes
]
.br
[
.O_noheadings
]
.br
[
.O_nosuffix
]
.br
[
.O_rows
]
.br
[
.O_separator
]
.br
[
.O_unbuffered
]
.br
[
.O_unquoted
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIVG\fP ... ]
.br
[ \fIVG\fP\ .\|.\|.\& ]
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--aligned\fP
.br
.TP
.O_aligned
Use with --separator to align the output columns.
.
.HP
\fB-a\fP|\fB--all\fP
.br
.TP
.O_all
Show information about internal LVs.
These are components of normal LVs, such as mirrors,
which are not independently accessible, e.g. not mountable.
@@ -141,89 +417,76 @@ List all VGs. Equivalent to not specifying any VGs.
Show information about devices that have not been initialized
by LVM, i.e. they are not PVs.
.
.HP
\fB--binary\fP
.br
.TP
.O_binary
Use binary values "0" or "1" instead of descriptive literal values
for columns that have exactly two valid values to report (not counting
the "unknown" value which denotes that the value could not be determined).
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
.br
.TP
.O_configreport
See \fBlvmreport\fP(7).
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB--foreign\fP
.br
.TP
.O_foreign
Report/display foreign VGs that would otherwise be skipped.
See \fBlvmsystemid\fP(7) for more information about foreign VGs.
.
.HP
\fB--headings\fP \fBnone\fP|\fBabbrev\fP|\fBfull\fP|\fB0\fP|\fB1\fP|\fB2\fP
.br
.TP
.O_headings
Type of headings to use in report output.
\fBnone\fP or \fB0\fP: No headings.
\fBabbrev\fP or \fB1\fP: Column name abbreviations.
\fBfull\fP or \fB2\fP: Full column names.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--ignorelockingfailure\fP
.br
.TP
.O_ignorelockingfailure
Allows a command to continue with read-only metadata
operations after locking failures.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -231,57 +494,48 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--logonly\fP
.br
.TP
.O_logonly
Suppress command report and display only log report.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nameprefixes\fP
.br
.TP
.O_nameprefixes
Add an "LVM2_" prefix plus the field name to the output. Useful
with --noheadings to produce a list of field=value pairs that can
be used to set environment variables (for example, in udev rules).
.
.HP
\fB--noheadings\fP
.br
.TP
.O_noheadings
Suppress the headings line that is normally the first line of output.
Useful if grepping the output.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--nosuffix\fP
.br
.TP
.O_nosuffix
Suppress the suffix on output sizes. Use with --units
(except h and H) if processing the output.
.
.HP
\fB-o\fP|\fB--options\fP \fIString\fP
.br
.TP
.O_options
Comma-separated, ordered list of fields to display in columns.
String arg syntax is:
[\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
@@ -301,27 +555,23 @@ Use field name \fBlv_all\fP to view all LV fields,
See the \fBlvm.conf\fP(5) report section for more config options.
See \fBlvmreport\fP(7) for more information about reporting.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--readonly\fP
.br
.TP
.O_readonly
Prevent the command from making changes, including activation and
metadata updates. (See --permission r for read only LVs.)
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -331,14 +581,12 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB--rows\fP
.br
.TP
.O_rows
Output columns as rows.
.
.HP
\fB-S\fP|\fB--select\fP \fIString\fP
.br
.TP
.O_select
Select objects for processing and reporting based on specified criteria.
The criteria syntax is described by \fB--select help\fP
and \fBlvmreport\fP(7).
@@ -350,46 +598,35 @@ showing 1 if the row matches the selection and 0 otherwise.
For non-reporting commands which process LVM entities, the selection is
used to choose items to process.
.
.HP
\fB--separator\fP \fIString\fP
.br
.TP
.O_separator
String to use to separate each column. Useful if grepping the output.
.
.HP
\fB--shared\fP
.br
.TP
.O_shared
Report/display shared VGs that would otherwise be skipped when
lvmlockd is not being used on the host.
See \fBlvmlockd\fP(8) for more information about shared VGs.
.
.HP
\fB-O\fP|\fB--sort\fP \fIString\fP
.br
.TP
.O_sort
Comma-separated ordered list of columns to sort by. Replaces the default
selection. Precede any column with \fB-\fP for a reverse sort on that column.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB--unbuffered\fP
.br
.TP
.O_unbuffered
Produce output immediately without sorting or aligning the columns properly.
.
.HP
.ad
\fB--units\fP \c
.nh
\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
.hy
.ad
.br
.TP
.O_units
All sizes are output in these units:
human-(r)eadable with '<' rounding indicator,
(h)uman-readable, (b)ytes, (s)ectors, (k)ilobytes, (m)egabytes,
@@ -397,26 +634,22 @@ human-(r)eadable with '<' rounding indicator,
Capitalise to use multiples of 1000 (S.I.) instead of 1024.
Custom units can be specified, e.g. --units 3M.
.
.HP
\fB--unquoted\fP
.br
.TP
.O_unquoted
When used with --nameprefixes, output values in the field=value
pairs are not quoted.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -426,9 +659,11 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -458,5 +693,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,134 @@
.TH LVM LVPOLL 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_abort
.OPS abort
..
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_handlemissingpvs
.OPS handlemissingpvs
..
.de O_help
.OPS h help
..
.de O_interval
.OPA i interval
\fINumber\fP
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_polloperation
.OPA polloperation
\%\fBpvmove\fP|\:\
\fBconvert\fP|\:\
\fBmerge\fP|\:\
\fBmerge_thin\fP
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvm lvpoll \(em Continue already initiated poll operation on a logical volume
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvm lvpoll\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -19,141 +139,174 @@ directly.
.
.SH USAGE
.
\fBlvm lvpoll\fP \fB--polloperation\fP \fBpvmove\fP|\fBconvert\fP|\fBmerge\fP|\fBmerge_thin\fP \fILV\fP ...
.br
.RS 4
.nh
.na
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.B lvm lvpoll
.O_polloperation
\fILV\fP\ .\|.\|.\&
.RS
[
.O_autobackup
]
.br
[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
[
.O_interval
]
.br
[ \fB--abort\fP ]
[
.O_abort
]
.br
[ \fB--handlemissingpvs\fP ]
[
.O_handlemissingpvs
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--abort\fP
.br
.TP
.O_abort
Stop processing a poll operation in lvmpolld.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB--handlemissingpvs\fP
.br
.TP
.O_handlemissingpvs
Allows a polling operation to continue when PVs are missing,
e.g. for repairs due to faulty devices.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB-i\fP|\fB--interval\fP \fINumber\fP
.br
.TP
.O_interval
Report progress at regular intervals.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -161,70 +314,59 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--polloperation\fP \fBpvmove\fP|\fBconvert\fP|\fBmerge\fP|\fBmerge_thin\fP
.br
.TP
.O_polloperation
The command to perform from lvmpolld.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -235,9 +377,11 @@ answer yes. Use with extreme caution.
.I LV
Logical Volume name. See \fBlvm\fP(8) for valid names.
An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -267,5 +411,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -61,41 +61,53 @@ The following commands are built into lvm without links
normally being created in the filesystem for them.
.sp
.PD 0
.
.TP 16
.B config
The same as \fBlvmconfig\fP(8) below.
.
.TP
.B devtypes
Display the recognised built-in block device types.
.
.TP
.B dumpconfig
The same as \fBlvmconfig\fP(8) below.
.
.TP
.B formats
Display recognised metadata formats.
.
.TP
.B fullreport
Report information about PVs, PV segments, VGs, LVs and LV segments,
all at once.
.
.TP
.B help
Display the help text.
.
.TP
.B lastlog
Display log report of last command run in LVM shell
if command log reporting is enabled.
.
.TP
.B lvpoll
Complete lvmpolld operations (Internal command).
.
.TP
.B segtypes
Display recognised Logical Volume segment types.
.
.TP
.B systemid
Display any system ID currently set on this host.
.
.TP
.B tags
Display any tags defined on this host.
.
.TP
.B version
Display version information.
@@ -106,135 +118,178 @@ Display version information.
The following commands implement the core LVM functionality.
.sp
.PD 0
.
.TP 16
.B pvchange
Change attributes of a Physical Volume.
.
.TP
.B pvck
Check Physical Volume metadata.
.
.TP
.B pvcreate
Initialize a disk or partition for use by LVM.
.
.TP
.B pvdisplay
Display attributes of a Physical Volume.
.
.TP
.B pvmove
Move Physical Extents.
.
.TP
.B pvremove
Remove a Physical Volume.
.
.TP
.B pvresize
Resize a disk or partition in use by LVM.
.
.TP
.B pvs
Report information about Physical Volumes.
.
.TP
.B pvscan
List Physical Volumes.
.
.TP
.B vgcfgbackup
Backup Volume Group descriptor area.
.
.TP
.B vgcfgrestore
Restore Volume Group descriptor area.
.
.TP
.B vgchange
Change attributes of a Volume Group.
.
.TP
.B vgck
Check Volume Group metadata.
.
.TP
.B vgcreate
Create a Volume Group.
.
.TP
.B vgdisplay
Display attributes of Volume Groups.
.
.TP
.B vgexport
Make volume Groups unknown to the system.
.
.TP
.B vgextend
Add Physical Volumes to a Volume Group.
.
.TP
.B vgimport
Make exported Volume Groups known to the system.
.
.TP
.B vgimportclone
Import and rename duplicated Volume Group (e.g. a hardware snapshot).
.
.TP
.B vgimportdevices
Add PVs from a VG to the devices file.
.
.TP
.B vgmerge
Merge two Volume Groups.
.
.TP
.B vgmknodes
Recreate Volume Group directory and Logical Volume special files
.
.TP
.B vgreduce
Reduce a Volume Group by removing one or more Physical Volumes.
.
.TP
.B vgremove
Remove a Volume Group.
.
.TP
.B vgrename
Rename a Volume Group.
.
.TP
.B vgs
Report information about Volume Groups.
.
.TP
.B vgscan
List Volume Groups.
.
.TP
.B vgsplit
Split a Volume Group into two, moving any logical
volumes from one Volume Group to another by moving entire Physical
Split a Volume Group into two, moving any logical volumes
from one Volume Group to another by moving entire Physical
Volumes.
.
.TP
.B lvchange
Change attributes of a Logical Volume.
.
.TP
.B lvconvert
Convert a Logical Volume from linear to mirror or snapshot.
.
.TP
.B lvcreate
Create a Logical Volume in an existing Volume Group.
.
.TP
.B lvdisplay
Display attributes of a Logical Volume.
.
.TP
.B lvextend
Extend the size of a Logical Volume.
.
.TP
.B lvmconfig
Display the configuration information after
loading \fBlvm.conf\fP(5) and any other configuration files.
.
.TP
.B lvmdevices
Manage the devices file.
.
.TP
.B lvmdiskscan
Scan for all devices visible to LVM.
.
.TP
.B lvmdump
Create LVM information dumps for diagnostic purposes.
.
.TP
.B lvreduce
Reduce the size of a Logical Volume.
.
.TP
.B lvremove
Remove a Logical Volume.
.
.TP
.B lvrename
Rename a Logical Volume.
.
.TP
.B lvresize
Resize a Logical Volume.
.
.TP
.B lvs
Report information about Logical Volumes.
.
.TP
.B lvscan
List Logical Volumes.
@@ -433,55 +488,69 @@ Message text may also change.
.B HOME
Directory containing \fI.lvm_history\fP if the internal #DEFAULT_LIBLINE#
shell is invoked.
.
.TP
.B LVM_OUT_FD
File descriptor to use for common output from LVM commands.
.
.TP
.B LVM_ERR_FD
File descriptor to use for error output from LVM commands.
.
.TP
.B LVM_REPORT_FD
File descriptor to use for report output from LVM commands.
.
.TP
.B LVM_COMMAND_PROFILE
Name of default command profile to use for LVM commands. This profile
is overridden by direct use of \fB--commandprofile\fP command line option.
.
.TP
.B LVM_RUN_BY_DMEVENTD
This variable is normally set by dmeventd plugin to inform lvm command
it is running from dmeventd plugin so lvm takes some extra action
to avoid communication and deadlocks with dmeventd.
.
.TP
.B LVM_SYSTEM_DIR
Directory containing \fBlvm.conf\fP(5) and other LVM system files.
Defaults to "\fI#DEFAULT_SYS_DIR#\fP".
.
.TP
.B LVM_SUPPRESS_FD_WARNINGS
Suppress warnings about unexpected file descriptors passed into LVM.
.
.TP
.B LVM_SUPPRESS_SYSLOG
Suppress contacting syslog.
.
.TP
.B LVM_VG_NAME
The Volume Group name that is assumed for
any reference to a Logical Volume that doesn't specify a path.
Not set by default.
.
.TP
.B LVM_LVMPOLLD_PIDFILE
Path to the file that stores the lvmpolld process ID.
.
.TP
.B LVM_LVMPOLLD_SOCKET
Path to the socket used to communicate with lvmpolld..
.
.TP
.B LVM_LOG_FILE_EPOCH
A string of up to 32 letters appended to the log filename and
followed by the process ID and a startup timestamp using
this format string "_%s_%d_%llu". When set, each process logs to a
separate file.
.
.TP
.B LVM_LOG_FILE_MAX_LINES
If more than this number of lines are sent to the log file, the command gets
aborted. Automated tests use this to terminate looping commands.
.
.TP
.B LVM_EXPECTED_EXIT_STATUS
The status anticipated when the process exits. Use ">N" to match any
@@ -491,17 +560,21 @@ file got produced, it is deleted.
and
.B LVM_EXPECTED_EXIT_STATUS
together allow automated test scripts to discard uninteresting log data.
.
.TP
.B LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES
Used to suppress warning messages when the configured locking is known
to be unavailable.
.
.TP
.B DM_ABORT_ON_INTERNAL_ERRORS
Abort processing if the code detects a non-fatal internal error.
.
.TP
.B DM_DISABLE_UDEV
Avoid interaction with udev. LVM will manage the relevant nodes in /dev
directly.
.
.TP
.B DM_DEBUG_WITH_LINE_NUMBERS
Prepends source file name and code line number with libdm debugging.

View File

@@ -11,7 +11,8 @@ lvm.conf \(em Configuration file for LVM2
.SH DESCRIPTION
.
\fBlvm.conf\fP is loaded during the initialisation phase of
\fBlvm\fP(8). This file can in turn lead to other files
.BR lvm (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.
@@ -45,8 +46,8 @@ 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.
\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
@@ -83,7 +84,9 @@ 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).
.P
The profiles are stored in \fI#DEFAULT_PROFILE_DIR#\fP directory by default.
The profiles are stored in
.I #DEFAULT_PROFILE_DIR#
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
@@ -98,12 +101,17 @@ 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:
.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
.B direct config override on command line
\[->]
.B command profile config
\[->]
.B metadata profile config
\[->]
.B tag config
\[->]
.B lvmlocal.conf
\[->]
.B lvm.conf
.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.
@@ -113,32 +121,38 @@ the default values are.
.SH SYNTAX
.
This section describes the configuration file syntax.
.LP
.P
Whitespace is not significant unless it is within quotes.
This provides a wide choice of acceptable indentation styles.
Comments begin with # and continue to the end of the line.
They are treated as whitespace.
.LP
.P
Here is an informal grammar:
.
.TP
.BR file " = " value *
A configuration file consists of a set of values.
.
.TP
.BR value " = " section " | " assignment
A value can either be a new section, or an assignment.
.
.TP
.BR section " = " identifier " '" { "' " value "* '" } '
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.
.br
It is denoted by a name and delimited by curly brackets.
It is denoted by a name and delimited by curly brackets. e.g.
.br
e.g. backup {
.br
...
.br
}
backup {
.RS
.RS
\|\.\|.\|.
.RE
}
.RE
.
.TP
.BR assignment " = " identifier " '" = "' ( " array " | " type " )"
.br
@@ -148,8 +162,9 @@ forward slashes, those are interpreted as path delimiters. The statement
multiple instances of the same key are encountered, only the last value is used
(and a warning is issued).
.br
e.g. \fBlevel = 7\fP
e.g.\& \fBlevel = 7\fP
.br
.
.TP
.BR array " = '" [ "' ( " type " '" , "')* " type " '" ] "' | '" [ "' '" ] '
Inhomogeneous arrays are supported.
@@ -160,13 +175,16 @@ An empty array is acceptable.
.br
An array with one element will be correctly interpreted if the array brackets
are missing.
.
.TP
.BR type " = " integer | float | string
.BR type " = "
.BR integer | float | string
.BR integer " = [" 0 - 9 "]*"
.br
.BR float " = [" 0 - 9 "]*'" . "'[" 0 - 9 ]*
.br
.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.
@@ -208,6 +226,7 @@ e.g. umask:
.B lvmconfig --type default --withcomments Section/Setting
.
.SH FILES
.
.I #DEFAULT_SYS_DIR#/lvm.conf
.br
.I #DEFAULT_SYS_DIR#/lvmlocal.conf

View File

@@ -92,16 +92,20 @@ with within volume group VG1.
.TP
.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.
.
.TP
.B DM_UUID_PREFIX
Specify uuid prefix for snapshot volume used during vdo conversion.
.
.TP
.B LVM_BINARY
Allow to override command called from lvm. Defaults to "\fIlvm\fP".
.
.TP
.B VDO_BINARY
Allow to override command called from vdo. Defaults to "\fIvdo\fP".
@@ -113,4 +117,4 @@ Allow to override command called from vdo. Defaults to "\fIvdo\fP".
.BR lvm (8),
.BR lvm.conf (5),
.P
.BR vdo (8),
.BR vdo (8)

View File

@@ -1,4 +1,13 @@
.TH "LVMAUTOACTIVATION" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.TH "LVMAUTOACTIVATION" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc"
.
.if !dEX \{\
.de EX
.nf
..
.de EE
.fi
..
\}
.
.SH NAME
.
@@ -12,11 +21,13 @@ PVs in a VG have been attached, the VG is complete, and LVs in the VG are
activated.
.P
Autoactivation of VGs, or specific LVs, can be prevented using vgchange or
lvchange --setautoactivation n. The lvm.conf auto_activation_volume_list
lvchange --set\%auto\%activation\~n. The
.BR lvm.conf (5)
.B auto_activation_volume_list
is another way to limit autoactivation.
.
.SS event autoactivation
.P
.
LVM autoactivation is "event based", in which complete VGs are activated
in response to uevents which occur during system startup or at any time
after the system has started. An old form of autoactivation was "static"
@@ -32,37 +43,41 @@ device, which triggers autoactivation.
.P
There are two variations of event based autoactivation that may be used on
a system, depending on the LVM udev rule that is installed (found in
/lib/udev/rules.d/.) The following summarizes the steps in each rule
which lead to autoactivation:
.IR /lib/udev/rules.d/ ).
The following summarizes the steps in each rule which lead to autoactivation:
.P
.B 69-dm-lvm-metad.rules
.
.IP \[bu] 2
device /dev/name with major:minor X:Y is attached to the machine
.
.IP \[bu] 2
.IP \[bu]
systemd/udev runs blkid to identify /dev/name as an LVM PV
.
.IP \[bu] 2
.IP \[bu]
udev rule 69-dm-lvm-metad.rules is run for /dev/name
.
.IP \[bu] 2
.IP \[bu]
the lvm udev rule runs the systemd service lvm2-pvscan@X:Yservice
.
.IP \[bu] 2
.IP \[bu]
the lvm2-pvscan service runs:
.br
.na
.nh
pvscan --cache -aay --major X --minor Y
.hy
.ad
.
.IP \[bu] 2
.IP \[bu]
pvscan reads the device, records that the PV is online
(see pvs_online), and checks if the VG is complete.
.
.IP \[bu] 2
.IP \[bu]
if the VG is complete, pvscan creates the vgs_online temp file,
and activates the VG.
.
.IP \[bu] 2
.IP \[bu]
the activation command output can be seen from
systemctl status lvm2-pvscan*
.P
@@ -71,112 +86,122 @@ systemctl status lvm2-pvscan*
.IP \[bu] 2
device /dev/name with major:minor X:Y is attached to the machine
.
.IP \[bu] 2
.IP \[bu]
systemd/udev runs blkid to identify /dev/name as an LVM PV
.
.IP \[bu] 2
.IP \[bu]
udev rule 69-dm-lvm.rules is run for /dev/name
.
.IP \[bu] 2
.IP \[bu]
the lvm udev rule runs:
.br
.na
.nh
pvscan --cache --listvg --checkcomplete --vgonline
.br
--autoactivation event --udevoutput --journal=output /dev/name
.hy
.ad
.
.IP \[bu] 2
.IP \[bu]
pvscan reads the device, records that the PV is online
(see pvs_online), and checks if the VG is complete.
.
.IP \[bu] 2
.IP \[bu]
if the VG is complete, pvscan creates the vgs_online temp file,
and prints the name of the VG for the udev rule to import:
LVM_VG_NAME_COMPLETE='vgname'
.
.IP \[bu] 2
.IP \[bu]
if the lvm udev rule sees LVM_VG_NAME_COMPLETE from pvscan,
it activates the VG using a transient systemd service named
lvm-activate-<vgname>.
.
.IP \[bu] 2
.IP \[bu]
the lvm-activate-<vgname> service runs
.br
vgchange -aay --autoactivation event <vgname>
.
.IP \[bu] 2
.IP \[bu]
the activation command output can be seen from
journalctl -u lvm-activate-<vgname>
.P
.
.SS pvscan options
.P
.
.TP
.B --cache
.br
Read the <device> arg (and only that device), and record that
the PV is online by creating the /run/lvm/pvs_online/<pvid>
the PV is online by creating the
.I #DEFAULT_RUN_DIR#/pvs_online/<pvid>
file containing the name of the VG and the device for the PV.
.P
.
.TP
.B -aay
.br
Activate the VG from the pvscan command
(includes implicit --checkcomplete and --vgonline.)
.P
.
.TP
.B --checkcomplete
.br
Check if the VG is complete, i.e. all PVs are present on
the system, by checking /run/lvm/pvs_online/<pvid> files.
.P
the system, by checking
.I #DEFAULT_RUN_DIR#/pvs_online/<pvid>
files.
.
.TP
.B --vgonline
.br
Create /run/lvm/vgs_online/<vgname> if the VG is complete
Create
.I #DEFAULT_RUN_DIR#/vgs_online/<vgname>
if the VG is complete
(used to ensure only one command performs activation.)
.P
.
.TP
.B --autoactivation event
.br
Inform the command it is used for event based autoactivation.
.P
.
.TP
.B --listvg
.br
Print the name of the VG using the device.
.P
.
.TP
.B --udevoutput
.br
Only print output that can be imported to the udev rule,
using the udev environment key format, i.e. NAME='value'.
.P
.
.TP
.B --journal=output
.br
Send standard command output to the journal (when stdout
is reserved for udev output.)
.P
.
.SS run files
.P
Autoactivation commands use a number of temp files in /run/lvm (with the
expectation that /run is cleared between boots.)
.P
.
Autoactivation commands use a number of temp files in
.I #DEFAULT_RUN_DIR#
(with the expectation that
.I #DEFAULT_PID_DIR#
is cleared between boots).
.
.TP
.B pvs_online
.br
pvscan --cache creates a file here for each PV that is attached. The file
is named with the PVID and contains the VG name and device information.
The existence of the file is used to determine when all PVs for a given VG
are present. The device information in these files is also used to
optimize locating devices for a VG when the VG is activated.
.P
.
.TP
.B pvs_lookup
.br
pvscan --cache creates a file here named for a VG (if one doesn't already
exist.) The file contains a list of PVIDs in the VG. This is needed when
a PV is processed which has no VG metadata, in which case the list of
PVIDs from the lookup file is used to check if the VG is complete.
.P
.
.TP
.B vgs_online
.br
The first activation command (pvscan or vgchange) to create a file here,
named for the VG, will activate the VG. This resolves a race when
concurrent commands attempt to activate a VG at once.
.
.SS static autoactivation
.P
.
A static autoactivation method is no longer provided by lvm.
Setting event_activation=0 still disables event based autoactivation.
WARNING: disabling event activation without an alternative may prevent a
@@ -185,10 +210,12 @@ autoactivation during system startup, in which case disabling event
autoactivation may be useful.
.
.SS lvm.conf filter
.P
Device symlinks from /dev/disk/ can be used in the lvm.conf filter to
guard against changes in kernel device names. The /dev/disk/by-path/ or
/dev/disk/by-id/ prefixes should be included in the filter names; these
.
Device symlinks from \fI/dev/disk/\fP can be used in the
.BR lvm.conf (5)
filter to guard against changes in kernel device names.
The \fI/dev/disk/by-path/\fP or \fI/dev/disk/by-id/\fP
prefixes should be included in the filter names; these
prefixes help lvm detect that symlink names are used. Filters containing
symlinks require special matching by commands run in the lvm udev rule.
.P
@@ -198,105 +225,120 @@ may be less reliable. If a custom udev rule creates symlinks used in the
lvm filter, then the udev rule should be started prior to the lvm rule.
.
.SH EXAMPLES
.P
.
VG "vg" contains two PVs:
.nf
$ pvs -o name,vgname,uuid /dev/sdb /dev/sdc
PV VG PV UUID
/dev/sdb vg 1uKpaT-lFOZ-NLHX-j4jI-OBi1-QpdE-HZ5hZY
/dev/sdc vg 5J3tM8-aIPe-2vbd-DBe7-bvRq-TGj0-DaKV2G
.fi
.P
.EX
# pvs -o name,vgname,uuid /dev/sdb /dev/sdc
\ PV VG PV UUID
\ /dev/sdb vg 1uKpaT-lFOZ-NLHX-j4jI-OBi1-QpdE-HZ5hZY
\ /dev/sdc vg 5J3tM8-aIPe-2vbd-DBe7-bvRq-TGj0-DaKV2G
.EE
.P
use of --cache:
.nf
$ pvscan --cache /dev/sdb
pvscan[12922] PV /dev/sdb online.
$ pvscan --cache /dev/sdc
pvscan[12923] PV /dev/sdc online.
$ cat /run/lvm/pvs_online/1uKpaTlFOZNLHXj4jIOBi1QpdEHZ5hZY
.P
.EX
# pvscan --cache /dev/sdb
\ pvscan[12922] PV /dev/sdb online.
# pvscan --cache /dev/sdc
\ pvscan[12923] PV /dev/sdc online.
.P
# cat #DEFAULT_RUN_DIR#/pvs_online/1uKpaTlFOZNLHXj4jIOBi1QpdEHZ5hZY
8:16
vg:vg
dev:/dev/sdb
$ cat /run/lvm/pvs_online/5J3tM8aIPe2vbdDBe7bvRqTGj0DaKV2G
# cat #DEFAULT_RUN_DIR#/pvs_online/5J3tM8aIPe2vbdDBe7bvRqTGj0DaKV2G
8:32
vg:vg
dev:/dev/sdc
.fi
.EE
.P
use of -aay:
.nf
$ pvscan --cache -aay /dev/sdb
pvscan[12935] PV /dev/sdb online, VG vg incomplete (need 1).
$ pvscan --cache -aay /dev/sdc
pvscan[12936] PV /dev/sdc online, VG vg is complete.
pvscan[12936] VG vg run autoactivation.
1 logical volume(s) in volume group "vg" now active
$ cat /run/lvm/pvs_online/1uKpaTlFOZNLHXj4jIOBi1QpdEHZ5hZY
.P
.EX
# pvscan --cache -aay /dev/sdb
\ pvscan[12935] PV /dev/sdb online, VG vg incomplete (need 1).
# pvscan --cache -aay /dev/sdc
\ pvscan[12936] PV /dev/sdc online, VG vg is complete.
\ pvscan[12936] VG vg run autoactivation.
\ 1 logical volume(s) in volume group "vg" now active
.P
# cat #DEFAULT_RUN_DIR#/pvs_online/1uKpaTlFOZNLHXj4jIOBi1QpdEHZ5hZY
8:16
vg:vg
dev:/dev/sdb
$ cat /run/lvm/pvs_online/5J3tM8aIPe2vbdDBe7bvRqTGj0DaKV2G
$ cat #DEFAULT_RUN_DIR#/pvs_online/5J3tM8aIPe2vbdDBe7bvRqTGj0DaKV2G
8:32
vg:vg
dev:/dev/sdc
$ ls /run/lvm/vgs_online/vg
/run/lvm/vgs_online/vg
.fi
# ls #DEFAULT_RUN_DIR#/vgs_online/vg
#DEFAULT_RUN_DIR#/vgs_online/vg
.EE
.P
use of --listvg:
.nf
$ pvscan --cache --listvg /dev/sdb
VG vg
$ pvscan --cache --listvg /dev/sdc
VG vg
$ cat /run/lvm/pvs_online/1uKpaTlFOZNLHXj4jIOBi1QpdEHZ5hZY
.P
.EX
# pvscan --cache --listvg /dev/sdb
\ VG vg
# pvscan --cache --listvg /dev/sdc
\ VG vg
.P
# cat #DEFAULT_RUN_DIR#/pvs_online/1uKpaTlFOZNLHXj4jIOBi1QpdEHZ5hZY
8:16
vg:vg
dev:/dev/sdb
$ cat /run/lvm/pvs_online/5J3tM8aIPe2vbdDBe7bvRqTGj0DaKV2G
$ cat #DEFAULT_RUN_DIR#/pvs_online/5J3tM8aIPe2vbdDBe7bvRqTGj0DaKV2G
8:32
vg:vg
dev:/dev/sdc
.fi
.EE
.P
use of --checkcomplete:
.nf
$ pvscan --cache --listvg --checkcomplete --vgonline /dev/sdb
pvscan[12996] PV /dev/sdb online, VG vg incomplete (need 1).
VG vg incomplete
$ pvscan --cache --listvg --checkcomplete --vgonline /dev/sdc
pvscan[12997] PV /dev/sdc online, VG vg is complete.
VG vg complete
.fi
.P
.EX
# pvscan --cache --listvg --checkcomplete --vgonline /dev/sdb
\ pvscan[12996] PV /dev/sdb online, VG vg incomplete (need 1).
\ VG vg incomplete
# pvscan --cache --listvg --checkcomplete --vgonline /dev/sdc
\ pvscan[12997] PV /dev/sdc online, VG vg is complete.
\ VG vg complete
.EE
.P
use of --udevoutput:
.nf
$ pvscan --cache --listvg --checkcomplete --vgonline --udevoutput /dev/sdb
.P
.EX
# pvscan --cache --listvg --checkcomplete --vgonline --udevoutput /dev/sdb
LVM_VG_NAME_INCOMPLETE='vg'
$ pvscan --cache --listvg --checkcomplete --vgonline --udevoutput /dev/sdc
# pvscan --cache --listvg --checkcomplete --vgonline --udevoutput /dev/sdc
LVM_VG_NAME_COMPLETE='vg'
.fi
.EE
.P
use of --listlvs:
.nf
$ lvs -o name,devices vg
LV Devices
lvol0 /dev/sdb(0)
lvol1 /dev/sdc(0)
lvol2 /dev/sdb(1),/dev/sdc(1)
$ pvscan --cache --listlvs --checkcomplete /dev/sdb
pvscan[13288] PV /dev/sdb online, VG vg incomplete (need 1).
VG vg incomplete
LV vg/lvol0 complete
LV vg/lvol2 incomplete
$ pvscan --cache --listlvs --checkcomplete /dev/sdc
pvscan[13289] PV /dev/sdc online, VG vg is complete.
VG vg complete
LV vg/lvol1 complete
LV vg/lvol2 complete
.fi
.P
.EX
# lvs -o name,devices vg
\ LV Devices
\ lvol0 /dev/sdb(0)
\ lvol1 /dev/sdc(0)
\ lvol2 /dev/sdb(1),/dev/sdc(1)
.P
# pvscan --cache --listlvs --checkcomplete /dev/sdb
\ pvscan[13288] PV /dev/sdb online, VG vg incomplete (need 1).
\ VG vg incomplete
\ LV vg/lvol0 complete
\ LV vg/lvol2 incomplete
# pvscan --cache --listlvs --checkcomplete /dev/sdc
\ pvscan[13289] PV /dev/sdc online, VG vg is complete.
\ VG vg complete
\ LV vg/lvol1 complete
\ LV vg/lvol2 complete
.EE
.
.SH SEE ALSO
.
.nh
.na
.BR lvm (8),
.BR lvm.conf (5),
.BR lvchange (8),
.BR pvscan (8)

View File

@@ -1,4 +1,13 @@
.TH "LVMCACHE" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.TH "LVMCACHE" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc"
.
.if !dEX \{\
.de EX
.nf
..
.de EE
.fi
..
\}
.
.SH NAME
.
@@ -21,7 +30,7 @@ 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
@@ -41,20 +50,23 @@ LVM refers to this using the LV type \fBwritecache\fP.
The main LV may already exist, and is located on larger, slower devices.
A main LV would be created with a command like:
.P
.EX
# lvcreate -n main -L Size vg /dev/slow_hhd
.EE
.
.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:
.P
.EX
# 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
\ LV Attr Type Devices
\ fast -wi------- linear /dev/fast_ssd
\ main -wi------- linear /dev/slow_hhd
.EE
.
.SS 3. Start caching the main LV
.
@@ -63,15 +75,21 @@ type, and specify the fast LV to use as the cache:
.P
using dm-cache (with cachepool):
.P
.EX
# lvconvert --type cache --cachepool fast vg/main
.EE
.P
using dm-cache (with cachevol):
.P
.EX
# lvconvert --type cache --cachevol fast vg/main
.EE
.P
using dm-writecache (with cachevol):
.P
.EX
# lvconvert --type writecache --cachevol fast vg/main
.EE
.P
For more alternatives see:
.br
@@ -89,37 +107,35 @@ the original LV without the cache.
.sp
using dm-cache (with cachepool):
.P
.EX
# 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
\ 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
.EE
.P
using dm-cache (with cachevol):
.P
.EX
# lvs -ao+devices
\ LV Pool Type Devices
\ main [fast_cvol] cache main_corig(0)
\ [fast_cvol] linear /dev/fast_ssd
\ [main_corig] linear /dev/slow_hhd
.EE
.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):
.P
.EX
# 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
\ LV Pool Type Devices
\ main [fast_cvol] writecache main_wcorig(0)
\ [fast_cvol] linear /dev/fast_ssd
\ [main_wcorig] linear /dev/slow_hhd
.EE
.
.SS 5. Use the main LV
.
@@ -130,36 +146,36 @@ Use the LV until the cache is no longer wanted, or needs to be changed.
To stop caching the main LV and also remove unneeded cache pool,
use the --uncache:
.P
.EX
# lvconvert --uncache vg/main
.P
# lvs -a
.nf
LV VG Attr Type Devices
main vg -wi------- linear /dev/slow_hhd
.fi
\ LV VG Attr Type Devices
\ main vg -wi------- linear /dev/slow_hhd
.EE
.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
.EX
# lvconvert --splitcache vg/main
.P
# lvs -a
.nf
LV VG Attr Type Devices
fast vg -wi------- linear /dev/fast_ssd
main vg -wi------- linear /dev/slow_hhd
.fi
\ LV VG Attr Type Devices
\ fast vg -wi------- linear /dev/fast_ssd
\ main vg -wi------- linear /dev/slow_hhd
.EE
.
.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
.EX
# lvcreate --type cache|writecache -n Name -L Size
--cachedevice /dev/fast_ssd vg /dev/slow_hhd
.fi
.EE
.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
@@ -172,36 +188,37 @@ for the fast LV.
.
.SS option args
.
.B --cachepool
.IR CachePoolLV | LV
.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
for dm-cache and permits specific placement and segment type selection
for data and metadata volumes.
.TP
\fB--cachepool\fP \fICachePoolLV\fP|\fILV\fP
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 for dm-cache and permits specific
placement and segment type selection for data and metadata volumes.
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
.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
.P
.
.TP
\fB--cachevol\fP \fILV\fP
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.
.
.TP
\fB--cachedevice\fP \fIPV\fP
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
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.
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 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
.
@@ -230,10 +247,10 @@ 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
.EX
# xfs_info /dev/vg/main
.nf
Look for sectsz=512 or sectsz=4096
.fi
.EE
.P
The writecache block size should be chosen to match the xfs sectsz value.
.P
@@ -242,18 +259,21 @@ creating the file system. In this case the writecache block size of 4096
can be used.
.P
The writecache block size is displayed by the command:
.br
lvs -o writecacheblocksize VG/LV
.P
.EX
# lvs -o writecacheblocksize VG/LV
.EE
.
.SS dm-writecache memory usage
.P
.
The amount of main system memory used by dm-writecache can be a factor
when selecting the writecache cachevol size and the writecache block size.
.P
.
.IP \[bu] 2
writecache block size 4096: each 100 GiB of writecache cachevol uses
slightly over 2 GiB of system memory.
.IP \[bu] 2
.
.IP \[bu]
writecache block size 512: each 100 GiB of writecache cachevol uses
a little over 16 GiB of system memory.
.
@@ -269,28 +289,28 @@ For example, --cachesettings 'high_watermark=90 writeback_jobs=4'.
.P
To include settings when caching is started, run:
.P
.nf
.EX
# lvconvert --type writecache --cachevol fast \\
--cachesettings 'option=N' vg/main
.fi
.EE
.P
To change settings for an existing writecache, run:
.P
.nf
.EX
# lvchange --cachesettings 'option=N' vg/main
.fi
.EE
.P
To clear all settings that have been applied, run:
.P
.nf
.EX
# lvchange --cachesettings '' vg/main
.fi
.EE
.P
To view the settings that are applied to a writecache LV, run:
.P
.nf
.EX
# lvs -o cachesettings vg/main
.fi
.EE
.P
Tunable settings are:
.
@@ -313,7 +333,7 @@ autocommit_blocks = <count>
When the application writes this amount of blocks without issuing the
FLUSH request, the blocks are automatically committed.
.
.TP
.TP
autocommit_time = <milliseconds>
The data is automatically committed if this time passes and no FLUSH
request is received.
@@ -343,23 +363,26 @@ cleaner mode, and any required flushing is performed in device suspend.
.
.TP
max_age = <milliseconds>
Specifies the maximum age of a block in milliseconds. If a block is stored in
the cache for too long, it will be written to the underlying device and cleaned up.
Specifies the maximum age of a block in milliseconds.
If a block is stored in the cache for too long,
it will be written to the underlying device and cleaned up.
.
.TP
metadata_only = 0|1
Only metadata is promoted to the cache. This option improves performance for
heavier REQ_META workloads.
Only metadata is promoted to the cache. This option improves performance
for heavier REQ_META workloads.
.
.TP
pause_writeback = <milliseconds>
Pause writeback if there was some write I/O redirected to the origin volume in
the last number of milliseconds.
Pause writeback if there was some write I/O redirected to the origin volume
in the last number of milliseconds.
.
.SS dm-writecache using metadata profiles
.
In addition to specifying writecache settings on the command line, they
can also be set in lvm.conf, or in a profile file, using the
In addition to specifying writecache settings on the command line,
they can also be set in
.BR lvm.conf (5),
or in a profile file, using the
allocation/cache_settings/writecache config structure shown below.
.P
It's possible to prepare a number of different profile files in the
@@ -367,7 +390,8 @@ It's possible to prepare a number of different profile files in the
of the profile when starting writecache.
.P
.I Example
.nf
.P
.EX
# cat <<EOF > #DEFAULT_SYS_DIR#/profile/cache_writecache.profile
allocation {
.RS
@@ -385,11 +409,11 @@ writeback_jobs=1024
}
EOF
.P
.
# lvcreate -an -L10G --name fast vg /dev/fast_ssd
# lvcreate --type writecache -L10G --name main --cachevol fast \\
--metadataprofile cache_writecache vg /dev/slow_hdd
.fi
\ --metadataprofile cache_writecache vg /dev/slow_hdd
.EE
.
.SS dm-cache with separate data and metadata LVs
.
@@ -400,27 +424,31 @@ LV that references two sub LVs, one for data and one for metadata.
To create a cache pool of given data size and let lvm2 calculate appropriate
metadata size:
.P
.EX
# lvcreate --type cache-pool -L DataSize -n fast vg /dev/fast_ssd1
.EE
.P
To create a cache pool from separate LV and let lvm2 calculate
appropriate cache metadata size:
.P
.EX
# lvcreate -n fast -L DataSize vg /dev/fast_ssd1
.br
# lvconvert --type cache-pool vg/fast /dev/fast_ssd1
.br
.EE
.P
To create a cache pool from two separate LVs:
.P
.EX
# 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
.EE
.P
Then use the cache pool LV to start caching the main LV:
.P
.EX
# lvconvert --type cache --cachepool fast vg/main
.EE
.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
@@ -429,12 +457,12 @@ caching is started. To do this, use a standard LV as the --cachepool
cache pool LV from the two specified LVs, and use the cache pool to start
caching the main LV.
.P
.nf
.EX
# 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
\ --poolmetadata fastmeta vg/main
.EE
.
.SS dm-cache cache modes
.
@@ -451,20 +479,22 @@ 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
.EX
# lvs -o+cache_mode VG/LV
.EE
.P
.BR lvm.conf (5)
.B allocation/cache_mode
.br
\(en
defines the default cache mode.
.P
.nf
.EX
# lvconvert --type cache --cachemode writethrough \\
--cachepool fast vg/main
\ --cachepool fast vg/main
.P
# lvconvert --type cache --cachemode writethrough \\
--cachevol fast vg/main
.nf
\ --cachevol fast vg/main
.EE
.
.SS dm-cache chunk size
.
@@ -486,7 +516,9 @@ time searching for chunks, and excessive memory tracking chunks.
.P
Command to display the chunk size:
.P
.B lvs -o+chunksize VG/LV
.EX
# lvs -o+chunksize VG/LV
.EE
.P
.BR lvm.conf (5)
.B allocation/cache_pool_chunk_size
@@ -495,22 +527,26 @@ controls the default chunk size.
.P
The default value is shown by:
.P
.B lvmconfig --type default allocation/cache_pool_chunk_size
.EX
# lvmconfig --type default allocation/cache_pool_chunk_size
.EE
.P
Checking migration threshold (in sectors) of running cached LV:
.br
.B lvs -o+kernel_cache_settings VG/LV
.P
.EX
# lvs -o+kernel_cache_settings VG/LV
.EE
.
.SS dm-cache cache settings
.
To set dm-cache cache setting use:
.P
--cachesettings 'option1=N option2=N ...'
--cachesettings 'option1=N option2=N .\|.\|.'
.P
To unset/drop cache setting and restore its default kernel value
use special keyword 'default' as option parameter:
.P
--cachesettings 'option1=default option2=default ...'
--cachesettings 'option1=default option2=default .\|.\|.'
.
.SS dm-cache migration threshold cache setting
.
@@ -526,17 +562,22 @@ or 8 cache chunks whichever of those two values is larger.
.P
Command to set migration threshold to 2 MiB (4096 sectors):
.P
.B lvcreate --cachesettings 'migration_threshold=4096' VG/LV
.EX
# lvcreate --cachesettings 'migration_threshold=4096' VG/LV
.EE
.P
Command to display the migration threshold:
.P
.B lvs -o+kernel_cache_settings,cache_settings VG/LV
.br
.B lvs -o+chunksize VG/LV
.EX
# lvs -o+kernel_cache_settings,cache_settings VG/LV
# lvs -o+chunksize VG/LV
.EE
.P
Command to restore/revert to default value:
.P
.B lvchange --cachesettings 'migration_threshold=default' VG/LV
.EX
# lvchange --cachesettings 'migration_threshold=default' VG/LV
.EE
.
.SS dm-cache cache policy
.
@@ -561,35 +602,46 @@ 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
.EX
# lvs -o+cache_policy,cache_settings VG/LV
.EE
.P
Change the cache policy and settings of an existing LV.
.nf
.P
.EX
# lvchange --cachepolicy mq --cachesettings \\
\(aqmigration_threshold=2048 random_threshold=4\(aq vg/main
.fi
.EE
.P
.BR lvm.conf (5)
.B allocation/cache_policy
.br
\(en
defines the default cache policy.
.P
.BR lvm.conf (5)
.B allocation/cache_settings
.br
\(en
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 \fI#DEFAULT_SYS_DIR#/profile\fP 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
a number of different profiles
in the \fI#DEFAULT_SYS_DIR#/profile\fP
directory and just specify the metadata profile file name
when caching LV or creating cache-pool.
Check the output of:
.P
.EX
# lvmconfig --type default --withcomments
.EE
.P
for a detailed description of all individual cache settings.
.P
.I Example
.nf
.P
.EX
# cat <<EOF > #DEFAULT_SYS_DIR#/profile/cache_big_chunk.profile
allocation {
.RS
@@ -611,12 +663,12 @@ migration_threshold=8192
}
EOF
.P
.
# lvcreate --cache -L10G --metadataprofile cache_big_chunk vg/main \\
/dev/fast_ssd
\ /dev/fast_ssd
# lvcreate --cache -L10G vg/main --config \\
'allocation/cache_pool_chunk_size=512' /dev/fast_ssd
.fi
\ 'allocation/cache_pool_chunk_size=512' /dev/fast_ssd
.EE
.
.SS dm-cache spare metadata LV
.
@@ -640,27 +692,27 @@ 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
.EX
# 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
.EE
.
.SS dm-cache command shortcut
.
A single command can be used to cache main LV with automatic
creation of a cache-pool:
.P
.nf
.EX
# lvcreate --cache --size CacheDataSize VG/LV [FastPVs]
.fi
.EE
.P
or the longer variant
.P
.nf
.EX
# lvcreate --type cache --size CacheDataSize \\
--name NameCachePool VG/LV [FastPVs]
.fi
\ --name NameCachePool VG/LV [FastPVs]
.EE
.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
@@ -690,6 +742,8 @@ and the existing main LV is being converted to type cache.)
.BR lvrename (8),
.BR lvresize (8),
.BR lvs (8),
.BR lvmraid (7),
.BR lvmthin (7),
.br
.BR vgchange (8),
.BR vgmerge (8),

View File

@@ -1,16 +1,192 @@
.TH LVMCONFIG 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_atversion
.OPA atversion
\fIString\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_file
.OPA f file
\fIString\fP
..
.de O_help
.OPS h help
..
.de O_ignoreadvanced
.OPS ignoreadvanced
..
.de O_ignorelocal
.OPS ignorelocal
..
.de O_ignoreunsupported
.OPS ignoreunsupported
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_list
.OPS l list
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_mergedconfig
.OPS mergedconfig
..
.de O_metadataprofile
.OPA metadataprofile
\fIString\fP
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_showdeprecated
.OPS showdeprecated
..
.de O_showunsupported
.OPS showunsupported
..
.de O_sinceversion
.OPA sinceversion
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_typeconfig
.OPA typeconfig
\%\fBcurrent\fP|\:\
\fBdefault\fP|\:\
\fBdiff\fP|\:\
\fBfull\fP|\:\
\fBlist\fP|\:\
\fBmissing\fP|\:\
\fBnew\fP|\:\
\fBprofilable\fP|\:\
\fBprofilable-command\fP|\:\
\fBprofilable-metadata\fP
..
.de O_unconfigured
.OPS unconfigured
..
.de O_validate
.OPS validate
..
.de O_valuesonly
.OPS valuesonly
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_withcomments
.OPS withcomments
..
.de O_withgeneralpreamble
.OPS withgeneralpreamble
..
.de O_withlocalpreamble
.OPS withlocalpreamble
..
.de O_withspaces
.OPS withspaces
..
.de O_withsummary
.OPS withsummary
..
.de O_withversions
.OPS withversions
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvmconfig \(em Display and manipulate configuration information
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvmconfig\fP
[ \fIoption_args\fP ]
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
[ \fIposition_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -21,111 +197,182 @@ line settings from --config.
.
.SH USAGE
.
\fBlvmconfig\fP
.br
.RS 4
.na
[ \fB-f\fP|\fB--file\fP \fIString\fP ]
.br
[ \fB-l\fP|\fB--list\fP ]
.br
[ \fB--atversion\fP \fIString\fP ]
.br
[ \fB--typeconfig\fP \c
.nh
\%\fBcurrent\fP|\:\fBdefault\fP|\:\fBdiff\fP|\:\fBfull\fP|\:\fBlist\fP|\:\fBmissing\fP|\:\fBnew\fP|\:\fBprofilable\fP|\:\fBprofilable-command\fP|\:\fBprofilable-metadata\fP
.hy
.na
.B lvmconfig
.RS
[
.O_file
]
.br
[ \fB--ignoreadvanced\fP ]
[
.O_list
]
.br
[ \fB--ignoreunsupported\fP ]
[
.O_atversion
]
.br
[ \fB--ignorelocal\fP ]
[
.O_typeconfig
]
.br
[ \fB--mergedconfig\fP ]
[
.O_ignoreadvanced
]
.br
[ \fB--metadataprofile\fP \fIString\fP ]
[
.O_ignoreunsupported
]
.br
[ \fB--sinceversion\fP \fIString\fP ]
[
.O_ignorelocal
]
.br
[ \fB--showdeprecated\fP ]
[
.O_mergedconfig
]
.br
[ \fB--showunsupported\fP ]
[
.O_metadataprofile
]
.br
[ \fB--validate\fP ]
[
.O_sinceversion
]
.br
[ \fB--valuesonly\fP ]
[
.O_showdeprecated
]
.br
[ \fB--withsummary\fP ]
[
.O_showunsupported
]
.br
[ \fB--withcomments\fP ]
[
.O_validate
]
.br
[ \fB--withgeneralpreamble\fP ]
[
.O_valuesonly
]
.br
[ \fB--withlocalpreamble\fP ]
[
.O_withsummary
]
.br
[ \fB--withspaces\fP ]
[
.O_withcomments
]
.br
[ \fB--unconfigured\fP ]
[
.O_withgeneralpreamble
]
.br
[ \fB--withversions\fP ]
[
.O_withlocalpreamble
]
.br
[
.O_withspaces
]
.br
[
.O_unconfigured
]
.br
[
.O_withversions
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIString\fP ... ]
.br
[ \fIString\fP\ .\|.\|.\& ]
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--atversion\fP \fIString\fP
.br
.TP
.O_atversion
Specify an LVM version in x.y.z format where x is the major version,
the y is the minor version and z is the patchlevel (e.g. 2.2.106).
When configuration is displayed, the configuration settings recognized
@@ -134,84 +381,72 @@ to display a configuration that a certain LVM version understands and
which does not contain any newer settings for which LVM would
issue a warning message when checking the configuration.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--file\fP \fIString\fP
.br
.TP
.O_file
Write output to the named file.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--ignoreadvanced\fP
.br
.TP
.O_ignoreadvanced
Exclude advanced configuration settings from the output.
.
.HP
\fB--ignorelocal\fP
.br
.TP
.O_ignorelocal
Ignore the local section. The local section should be defined in
the lvmlocal.conf file, and should contain config settings
specific to the local host which should not be copied to
other hosts.
.
.HP
\fB--ignoreunsupported\fP
.br
.TP
.O_ignoreunsupported
Exclude unsupported configuration settings from the output. These settings are
either used for debugging and development purposes only or their support is not
yet complete and they are not meant to be used in production. The \fBcurrent\fP
and \fBdiff\fP types include unsupported settings in their output by default,
all the other types ignore unsupported settings.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -219,26 +454,22 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB-l\fP|\fB--list\fP
.br
.TP
.O_list
List config settings with summarizing comment. This is the same as using
options --typeconfig list --withsummary.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--mergedconfig\fP
.br
.TP
.O_mergedconfig
When the command is run with --config
and/or --commandprofile (or using LVM_COMMAND_PROFILE
environment variable), --profile, or --metadataprofile,
@@ -247,40 +478,34 @@ Without merging, only the configuration at the front of the
cascade is displayed.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB--metadataprofile\fP \fIString\fP
.br
.TP
.O_metadataprofile
The metadata profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--showdeprecated\fP
.br
.TP
.O_showdeprecated
Include deprecated configuration settings in the output. These settings
are deprecated after a certain version. If a concrete version is specified
with --atversion, deprecated settings are automatically included
@@ -288,40 +513,31 @@ if the specified version is lower than the version in which the settings were
deprecated. The current and diff types include deprecated settings
in their output by default, all the other types ignore deprecated settings.
.
.HP
\fB--showunsupported\fP
.br
.TP
.O_showunsupported
Include unsupported configuration settings in the output. These settings
are either used for debugging or development purposes only, or their support
is not yet complete and they are not meant to be used in production. The
current and diff types include unsupported settings in their
output by default, all the other types ignore unsupported settings.
.
.HP
\fB--sinceversion\fP \fIString\fP
.br
.TP
.O_sinceversion
Specify an LVM version in x.y.z format where x is the major version,
the y is the minor version and z is the patchlevel (e.g. 2.2.106).
This option is currently applicable only with --typeconfig new
to display all configuration settings introduced since given version.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
.ad
\fB--typeconfig\fP \c
.nh
\%\fBcurrent\fP|\:\fBdefault\fP|\:\fBdiff\fP|\:\fBfull\fP|\:\fBlist\fP|\:\fBmissing\fP|\:\fBnew\fP|\:\fBprofilable\fP|\:\fBprofilable-command\fP|\:\fBprofilable-metadata\fP
.hy
.ad
.br
.TP
.O_typeconfig
\fBcurrent\fP prints the config settings that would be applied
to an lvm command (assuming the command does not override them
on the command line.) This includes:
@@ -355,14 +571,12 @@ with their default values.
\fBprofilable-metadata\fP prints settings with their default values that can be set from a metadata profile.
Also see \fBlvm.conf\fP(5).
.
.HP
\fB--unconfigured\fP
.br
.TP
.O_unconfigured
Internal option used for generating config file during build.
.
.HP
\fB--validate\fP
.br
.TP
.O_validate
Validate current configuration used and exit with appropriate
return code. The validation is done only for the configuration
at the front of the "config cascade". To validate the whole
@@ -370,58 +584,48 @@ merged configuration tree, also use --mergedconfig.
The validation is done even if \fBlvm.conf\fP(5) \fBconfig/checks\fP
is disabled.
.
.HP
\fB--valuesonly\fP
.br
.TP
.O_valuesonly
When printing config settings, print only values without keys.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB--withcomments\fP
.br
.TP
.O_withcomments
Display a full comment for each configuration node. For deprecated
settings, also display comments about deprecation.
.
.HP
\fB--withgeneralpreamble\fP
.br
.TP
.O_withgeneralpreamble
Include general config file preamble.
.
.HP
\fB--withlocalpreamble\fP
.br
.TP
.O_withlocalpreamble
Include local config file preamble.
.
.HP
\fB--withspaces\fP
.br
.TP
.O_withspaces
Where appropriate, add more spaces in output for better readability.
.
.HP
\fB--withsummary\fP
.br
.TP
.O_withsummary
Display a one line comment for each configuration node.
.
.HP
\fB--withversions\fP
.br
.TP
.O_withversions
Also display a comment containing the version of introduction for
each configuration node. If the setting is deprecated, also display
the version since which it is deprecated.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -431,6 +635,7 @@ answer yes. Use with extreme caution.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -460,5 +665,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -32,5 +32,8 @@ Use udev events to trigger updates
.
.SH SEE ALSO
.
.BR dbus-send (1),
.BR lvm (8)
.nh
.na
.BR lvm (8),
.P
.BR dbus-send (1)

View File

@@ -71,35 +71,35 @@ Possible device ID types are:
.IP \[bu] 2
.B sys_wwid
uses the wwid reported by the wwid sysfs file. This is the first choice.
.IP \[bu] 2
.IP \[bu]
.B wwid_naa
uses the naa wwid decoded from the vpd_pg83 sysfs file.
.IP \[bu] 2
.IP \[bu]
.B wwid_eui
uses the eui wwid decoded from the vpd_pg83 sysfs file.
.IP \[bu] 2
.IP \[bu]
.B wwid_t10
uses the t10 wwid decoded from the vpd_pg83 sysfs file.
.IP \[bu] 2
.IP \[bu]
.B sys_serial
uses the serial number reported by the serial sysfs file or the vpd_pg80
file. A serial number is used if no wwid is available.
.IP \[bu] 2
.IP \[bu]
.B mpath_uuid
is used for dm multipath devices, reported by sysfs.
.IP \[bu] 2
.IP \[bu]
.B crypt_uuid
is used for dm crypt devices, reported by sysfs.
.IP \[bu] 2
.IP \[bu]
.B md_uuid
is used for md devices, reported by sysfs.
.IP \[bu] 2
.IP \[bu]
.B lvmlv_uuid
is used if a PV is placed on top of an lvm LV, reported by sysfs.
.IP \[bu] 2
.IP \[bu]
.B loop_file
is used for loop devices, the backing file name reported by sysfs.
.IP \[bu] 2
.IP \[bu]
.B devname
the device name is used if no other type applies.
.P
@@ -126,6 +126,11 @@ existing PVIDs (assuming the original device IDs are also no longer
found.)
.P
The machine identifier used in system.devices will be either the DMI
product_uuid from /sys/devices/virtual/dmi/id/product_uuid, or the
hostname from uname(2). See lvm.conf device_ids_refresh_checks to
product_uuid from
.IR /sys/devices/virtual/dmi/id/product_uuid ,
or the hostname from
.BR uname (2).
See
.BR lvm.conf (5)
.B device_ids_refresh_checks to
configure this.

View File

@@ -1,70 +1,207 @@
.TH LVMDEVICES 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_adddev
.OPA adddev
\fIPV\fP
..
.de O_addpvid
.OPA addpvid
\fIString\fP
..
.de O_check
.OPS check
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_deldev
.OPA deldev
\fIString\fP
..
.de O_delnotfound
.OPS delnotfound
..
.de O_delpvid
.OPA delpvid
\fIString\fP
..
.de O_deviceidtype
.OPA deviceidtype
\fIString\fP
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_refresh
.OPS refresh
..
.de O_test
.OPS t test
..
.de O_update
.OPS update
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvmdevices \(em Manage the devices file
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvmdevices\fP \fIoption_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.P
.na
\fB--adddev\fP \fIPV\fP
.RS 5
.if t .ta 3nR +1uL \" PostScript/PDF
.PD 0
.O_adddev
.br
\fB--addpvid\fP \fIString\fP
.O_addpvid
.br
\fB--check\fP
.O_check
.br
\fB--commandprofile\fP \fIString\fP
.O_commandprofile
.br
\fB--config\fP \fIString\fP
.O_config
.br
\fB-d\fP|\fB--debug\fP
.O_debug
.br
\fB--deldev\fP \fIString\fP
.O_deldev
.br
\fB--delnotfound\fP
.O_delnotfound
.br
\fB--delpvid\fP \fIString\fP
.O_delpvid
.br
\fB--deviceidtype\fP \fIString\fP
.O_deviceidtype
.br
\fB--devices\fP \fIPV\fP
.O_devices
.br
\fB--devicesfile\fP \fIString\fP
.O_devicesfile
.br
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.O_driverloaded
.br
\fB-h\fP|\fB--help\fP
.O_help
.br
\fB--journal\fP \fIString\fP
.O_journal
.br
\fB--lockopt\fP \fIString\fP
.O_lockopt
.br
\fB--longhelp\fP
.O_longhelp
.br
\fB--nohints\fP
.O_nohints
.br
\fB--nolocking\fP
.O_nolocking
.br
\fB--profile\fP \fIString\fP
.O_profile
.br
\fB-q\fP|\fB--quiet\fP
.O_quiet
.br
\fB--refresh\fP
.O_refresh
.br
\fB-t\fP|\fB--test\fP
.O_test
.br
\fB--update\fP
.O_update
.br
\fB-v\fP|\fB--verbose\fP
.O_verbose
.br
\fB--version\fP
.O_version
.br
\fB-y\fP|\fB--yes\fP
.O_yes
.PD
.if t .ta
.RE
.ad
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -141,35 +278,35 @@ Possible device ID types are:
.IP \[bu] 2
.B sys_wwid
uses the wwid reported by the wwid sysfs file. This is the first choice.
.IP \[bu] 2
.IP \[bu]
.B wwid_naa
uses the naa wwid decoded from the vpd_pg83 sysfs file.
.IP \[bu] 2
.IP \[bu]
.B wwid_eui
uses the eui wwid decoded from the vpd_pg83 sysfs file.
.IP \[bu] 2
.IP \[bu]
.B wwid_t10
uses the t10 wwid decoded from the vpd_pg83 sysfs file.
.IP \[bu] 2
.IP \[bu]
.B sys_serial
uses the serial number reported by the serial sysfs file or the vpd_pg80
file. A serial number is used if no wwid is available.
.IP \[bu] 2
.IP \[bu]
.B mpath_uuid
is used for dm multipath devices, reported by sysfs.
.IP \[bu] 2
.IP \[bu]
.B crypt_uuid
is used for dm crypt devices, reported by sysfs.
.IP \[bu] 2
.IP \[bu]
.B md_uuid
is used for md devices, reported by sysfs.
.IP \[bu] 2
.IP \[bu]
.B lvmlv_uuid
is used if a PV is placed on top of an lvm LV, reported by sysfs.
.IP \[bu] 2
.IP \[bu]
.B loop_file
is used for loop devices, the backing file name reported by sysfs.
.IP \[bu] 2
.IP \[bu]
.B devname
the device name is used if no other type applies.
.P
@@ -196,251 +333,279 @@ existing PVIDs (assuming the original device IDs are also no longer
found.)
.P
The machine identifier used in system.devices will be either the DMI
product_uuid from /sys/devices/virtual/dmi/id/product_uuid, or the
hostname from uname(2). See lvm.conf device_ids_refresh_checks to
product_uuid from
.IR /sys/devices/virtual/dmi/id/product_uuid ,
or the hostname from
.BR uname (2).
See
.BR lvm.conf (5)
.B device_ids_refresh_checks to
configure this.
.
.SH USAGE
.
.nh
.na
Print devices in the devices file.
.br
.P
\fBlvmdevices\fP
.br
.RS 4
.na
.B lvmdevices
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Check the devices file and report incorrect values.
.br
.P
\fBlvmdevices\fP \fB--check\fP
.br
.RS 4
.na
[ \fB--refresh\fP ]
.B lvmdevices
.O_check
.RS
[
.O_refresh
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Update the devices file to fix incorrect values.
.br
.P
\fBlvmdevices\fP \fB--update\fP
.B lvmdevices
.O_update
.RS
[
.O_delnotfound
]
.br
.RS 4
.na
[ \fB--delnotfound\fP ]
.br
[ \fB--refresh\fP ]
[
.O_refresh
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Add a device to the devices file.
.br
.P
\fBlvmdevices\fP \fB--adddev\fP \fIPV\fP
.br
.RS 4
.na
[ \fB--deviceidtype\fP \fIString\fP ]
.B lvmdevices
.O_adddev
.RS
[
.O_deviceidtype
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Remove a device from the devices file.
.br
.P
\fBlvmdevices\fP \fB--deldev\fP \fIString\fP|\fIPV\fP
.br
.RS 4
.na
[ \fB--deviceidtype\fP \fIString\fP ]
.B lvmdevices
.O_deldev
.RS
[
.O_deviceidtype
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Find the device with the given PVID and add it to the devices file.
.br
.P
\fBlvmdevices\fP \fB--addpvid\fP \fIString\fP
.br
.RS 4
.na
[ \fB--deviceidtype\fP \fIString\fP ]
.B lvmdevices
.O_addpvid
.RS
[
.O_deviceidtype
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Remove the devices file entry for the given PVID.
.br
.P
\fBlvmdevices\fP \fB--delpvid\fP \fIString\fP
.br
.RS 4
.na
.B lvmdevices
.O_delpvid
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--adddev\fP \fIPV\fP
.br
.TP
.O_adddev
Add a device to the devices file.
.
.HP
\fB--addpvid\fP \fIString\fP
.br
.TP
.O_addpvid
Find a device with the PVID and add the device to the devices file.
.
.HP
\fB--check\fP
.br
.TP
.O_check
Checks the content of the devices file.
Reports incorrect device names or PVIDs for entries.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--deldev\fP \fIString\fP
.br
.TP
.O_deldev
Remove a device from the devices file.
When used alone, --deldev specifies a device name.
When used with --deviceidtype, --deldev specifies a device id.
.
.HP
\fB--delnotfound\fP
.br
.TP
.O_delnotfound
Remove devices file entries with no matching device.
.
.HP
\fB--delpvid\fP \fIString\fP
.br
.TP
.O_delpvid
Remove a device with the PVID from the devices file.
.
.HP
\fB--deviceidtype\fP \fIString\fP
.br
.TP
.O_deviceidtype
The type of device ID to use for the device.
If the specified type is available for the device,
then it will override the default type that lvm would use.
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -448,45 +613,38 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--refresh\fP
.br
.TP
.O_refresh
Search for missing PVs on new devices, and update the devices file
with new device IDs for the PVs if they are found on new devices.
This is useful if PVs have been moved to new devices with new WWIDs,
@@ -497,34 +655,29 @@ correct device ID with the clone/snapshot device ID, and lvm would begin
using the wrong device for the PV. Use deldev/adddev to safely change
a PV device ID in this scenario.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB--update\fP
.br
.TP
.O_update
Update the content of the devices file.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -534,6 +687,7 @@ answer yes. Use with extreme caution.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -563,5 +717,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,119 @@
.TH LVMDISKSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_lvmpartition
.OPS l lvmpartition
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_readonly
.OPS readonly
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvmdiskscan \(em List devices that may be used as physical volumes
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvmdiskscan\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -21,114 +126,145 @@ This command is deprecated, use \fBpvs\fP instead.
.
.SH USAGE
.
\fBlvmdiskscan\fP
.br
.RS 4
.nh
.na
[ \fB-l\fP|\fB--lvmpartition\fP ]
.B lvmdiskscan
.RS
[
.O_lvmpartition
]
.br
[ \fB--readonly\fP ]
[
.O_readonly
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -136,76 +272,64 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB-l\fP|\fB--lvmpartition\fP
.br
.TP
.O_lvmpartition
Only report PVs.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--readonly\fP
.br
.TP
.O_readonly
Prevent the command from making changes, including activation and
metadata updates. (See --permission r for read only LVs.)
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -215,6 +339,7 @@ answer yes. Use with extreme caution.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -244,5 +369,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,12 +1,26 @@
.TH LVMDUMP 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.de NSY
. ie t .SY \\$1
. el \{\
. ie \\n(.$>1 \{\
. PD 0
. TP \\w'\\$1\ 'u
. \}
. el .TP
. B \\$1
. nh
. na
. \}
..
.
.SH NAME
.
lvmdump \(em create lvm2 information dumps for diagnostic purposes
.
.SH SYNOPSIS
.
.B lvmdump
.NSY lvmdump 1
.RB [ -a ]
.RB [ -c ]
.RB [ -d
@@ -18,6 +32,10 @@ lvmdump \(em create lvm2 information dumps for diagnostic purposes
.RB [ -s ]
.RB [ -u ]
.
.PD
.ad
.hy
.
.SH DESCRIPTION
.
lvmdump is a tool to dump various information concerning LVM2.
@@ -25,7 +43,7 @@ By default, it creates a tarball suitable for submission along
with a problem report.
.P
The content of the tarball is as follows:
.na
.
.PD 0
.IP \[bu] 2
dmsetup info
@@ -56,42 +74,50 @@ if enabled with -s, system info and context
.IP \[bu]
if enabled with -u, udev info and context
.PD
.ad
.
.SH OPTIONS
.
.TP
.B -a
Advanced collection.
.br
\fBWARNING\fP: if lvm is already hung, then this script may hang as well
if \fB-a\fP is used.
.
.TP
.B -d \fIdirectory
\fB-d\fP \fIdirectory\fP
Dump into a directory instead of tarball
By default, lvmdump will produce a single compressed tarball containing
all the information. Using this option, it can be instructed to only
produce the raw dump tree, rooted in \fIdirectory\fP.
.
.TP
.B -h
Print help message
.
.TP
.B -l
Include \fBlvmetad\fP(8) daemon dump if it is running. The dump contains
cached information that is currently stored in lvmetad: VG metadata,
PV metadata and various mappings in between these metadata for quick
access.
.
.TP
.B -m
Gather LVM metadata from the PVs
This option generates a 1:1 dump of the metadata area from all PVs visible
to the system, which can cause the dump to increase in size considerably.
However, the metadata dump may represent a valuable diagnostic resource.
.
.TP
.B -p
Include \fBlvmpolld\fP(8) daemon dump if it is running. The dump contains
all in-progress operation currently monitored by the daemon and partial
history for all yet uncollected results of polling operations already finished
including reason.
Include
.BR lvmpolld (8)
daemon dump if it is running.
The dump contains all in-progress operation currently monitored
by the daemon and partial history for all yet uncollected results
of polling operations already finished including reason.
.
.TP
.B -s
Gather system info and context. Currently, this encompasses info gathered
@@ -99,12 +125,17 @@ by calling lsblk command and various systemd info and context: overall state
of systemd units present in the system, more detailed status of units
controlling LVM functionality and the content of systemd journal for
current boot.
.
.TP
.B -u
Gather udev info and context: \fI/etc/udev/udev.conf\fP file,
udev daemon version (output of 'udevadm info --version' command),
udev rules currently used in the system
(content of \fI/lib/udev/rules.d\fP and \fI/etc/udev/rules.d\fP directory),
(content of
.I /lib/udev/rules.d
and
.I /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).
.
@@ -116,6 +147,7 @@ The LVM2 binary to use.
Defaults to "\fBlvm\fP".
Sometimes you might need to set this to "\fI#LVM_PATH#.static\fP",
for example.
.
.TP
.B DMSETUP_BINARY
The dmsetup binary to use.
@@ -123,8 +155,11 @@ Defaults to "\fBdmsetup\fP".
.
.SH SEE ALSO
.
.na
.nh
.BR lvm (8),
.BR lvmpolld (8),
.BR dmsetup (8),
.P
.BR udev (8),
.BR udevadm (8)

View File

@@ -6,7 +6,8 @@ lvmlockctl \(em Control for lvmlockd
.
.SH SYNOPSIS
.
.BR lvmlockctl " [" \fIoptions ]
.B lvmlockctl
.RI [ Ioptions ]
.
.SH DESCRIPTION
.
@@ -40,19 +41,19 @@ Wait option for other commands.
Force option for other commands.
.
.TP
.BR -k | --kill " " \fIvgname
\fB-k\fP|\fB--kill\fP \fIvgname\fP
Kill access to the VG when sanlock cannot renew lease.
.
.TP
.BR -r | --drop " " \fIvgname
\fB-r\fP|\fB--drop\fP \fIvgname\fP
Clear locks for the VG when it is unused after kill (-k).
.
.TP
.BR -E | --gl-enable " " \fIvgname
\fB-E\fP|\fB--gl-enable\fP \fIvgname\fP
Tell lvmlockd to enable the global lock in a sanlock VG.
.
.TP
.BR -D | --gl-disable " " \fIvgname
\fB-D\fP|\fB--gl-disable\fP \fIvgname\fP
Tell lvmlockd to disable the global lock in a sanlock VG.
.
.TP

View File

@@ -1,38 +1,49 @@
.TH "LVMLOCKD" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" \" -*- nroff -*-
.
.if !dEX \{\
.de EX
.nf
..
.de EE
.fi
..
\}
.
.SH NAME
.
lvmlockd \(em LVM locking daemon
.
.SH SYNOPSIS
.
.BR lvmlockd " [" \fIoptions ]
.B lvmlockd
.RI [ options ]
.
.SH DESCRIPTION
.
LVM commands use lvmlockd to coordinate access to shared storage.
.br
.P
When LVM is used on devices shared by multiple hosts, locks will:
.br
\[bu]
.PD 0
.IP \[bu] 2
coordinate reading and writing of LVM metadata
.br
\[bu]
.IP \[bu]
validate caching of LVM metadata
.br
\[bu]
.IP \[bu]
prevent conflicting activation of logical volumes
.br
.PD
.P
lvmlockd uses an external lock manager to perform basic locking.
.P
Lock manager (lock type) options are:
.br
\[bu]
sanlock: places locks on disk within LVM storage.
.br
\[bu]
dlm: uses network communication and a cluster manager.
.br
.
.TP 8
.B sanlock
\(en places locks on disk within LVM storage.
.
.TP
.B dlm
\(en uses network communication and a cluster manager.
.PD
.
.SH OPTIONS
.
@@ -57,15 +68,17 @@ Don't fork.
Don't fork and print debugging to stdout.
.
.TP
.BR -p | --pid-file " " \fIpath
.BR -p | --pid-file\ \c
.I path
Set path to the pid file.
.
.TP
.BR -s | --socket-path " " \fIpath
.BR -s | --socket-path\ \c
.I path
Set path to the socket to listen on.
.
.TP
.B --adopt-file \fIpath
\fB--adopt-file\fP \fIpath\fP
Set path to the adopt file.
.
.TP
@@ -77,15 +90,18 @@ Write log messages from this level up to syslog.
Set global lock type to be sanlock or dlm.
.
.TP
.BR -i | --host-id " " \fInum
.BR -i | --host-id\ \c
.I num
Set the local sanlock host id.
.
.TP
.BR -F | --host-id-file " " \fIpath
.BR -F | --host-id-file\ \c
.I path
A file containing the local sanlock host_id.
.
.TP
.BR -o | --sanlock-timeout " " \fIseconds
.BR -o | --sanlock-timeout\ \c
.I seconds
Override the default sanlock I/O timeout.
.
.TP
@@ -101,56 +117,65 @@ some one time set up steps:
.
.SS 1. choose a lock manager
.
.I dlm
.br
.TP 8
.B sanlock
Choose sanlock if dlm/corosync are not otherwise required.
sanlock does not depend on any clustering software or configuration.
.
.TP
.B dlm
If dlm (or corosync) are already being used by other cluster
software, then select dlm. dlm uses corosync which requires additional
configuration beyond the scope of this document. See corosync and dlm
documentation for instructions on configuration, set up and usage.
.P
.I sanlock
.br
Choose sanlock if dlm/corosync are not otherwise required.
sanlock does not depend on any clustering software or configuration.
.
.SS 2. configure hosts to use lvmlockd
.
On all hosts running lvmlockd, configure lvm.conf:
.nf
use_lvmlockd = 1
.fi
On all hosts running lvmlockd, configure
.BR lvm.conf (5):
.P
.I sanlock
.br
.EX
use_lvmlockd = 1
.EE
.
.TP 8
.B sanlock
Assign each host a unique host_id in the range 1-2000 by setting
.br
#DEFAULT_SYS_DIR#/lvmlocal.conf local/host_id
.I #DEFAULT_SYS_DIR#/lvmlocal.conf
local/host_id
.
.SS 3. start lvmlockd
.
Start the lvmlockd daemon.
.br
Use systemctl, a cluster resource agent, or run directly, e.g.
.br
.P
.EX
systemctl start lvmlockd
.EE
.
.SS 4. start lock manager
.
.I sanlock
.br
.TP 8
.B sanlock
Start the sanlock and wdmd daemons.
.br
Use systemctl or run directly, e.g.
.br
.sp
.EX
systemctl start wdmd sanlock
.P
.I dlm
.br
.EE
.
.TP
.B dlm
Start the dlm and corosync daemons.
.br
Use systemctl, a cluster resource agent, or run directly, e.g.
.br
.sp
.EX
systemctl start corosync dlm
.EE
.
.SS 5. create VG on shared devices
.
@@ -162,7 +187,9 @@ and lvmlockd uses the chosen lock manager.
.
.SS 6. start VG on all hosts
.
.EX
vgchange --lockstart
.EE
.P
Shared VGs must be started before they are used. Starting the VG performs
lock manager initialization that is necessary to begin using locks (i.e.
@@ -185,33 +212,30 @@ multiple hosts.)
After initial set up, start up and shut down include the following steps.
They can be performed directly or may be automated using systemd or a
cluster resource manager/agents. When using lvmlockd.service, daemon
options can be set in /etc/sysconfig/lvmlockd as OPTIONS='-x1 -y2'.
.P
\[bu]
options can be set in
.I /etc/sysconfig/lvmlockd
as OPTIONS='-x1 -y2'.
.
.IP \[bu] 2
start lvmlockd
.br
\[bu]
.
.IP \[bu]
start lock manager
.br
\[bu]
.
.IP \[bu]
vgchange --lockstart
.br
\[bu]
.
.IP \[bu]
activate LVs in shared VGs
.br
.P
The shut down sequence is the reverse:
.P
\[bu]
.IP \[bu] 2
deactivate LVs in shared VGs
.br
\[bu]
.IP \[bu]
vgchange --lockstop
.br
\[bu]
.IP \[bu]
stop lock manager
.br
\[bu]
.IP \[bu]
stop lvmlockd
.
.SH TOPICS
@@ -220,36 +244,38 @@ stop lvmlockd
.
The following terms are used to describe the different ways of accessing
VGs on shared devices.
.P
.I "shared VG"
.P
.
.TP
.I shared VG
A shared VG exists on shared storage that is visible to multiple hosts.
LVM acquires locks through lvmlockd to coordinate access to shared VGs.
A shared VG has lock_type "dlm" or "sanlock", which specifies the lock
manager lvmlockd will use.
.P
.sp
When the lock manager for the lock type is not available (e.g. not started
or failed), lvmlockd is unable to acquire locks for LVM commands. In this
situation, LVM commands are only allowed to read and display the VG;
changes and activation will fail.
.P
.I "local VG"
.P
.
.TP
.I local VG
A local VG is meant to be used by a single host. It has no lock type or
lock type "none". A local VG typically exists on local (non-shared)
devices and cannot be used concurrently from different hosts.
.P
.sp
If a local VG does exist on shared devices, it should be owned by a single
host by having the system ID set, see
.BR lvmsystemid (7).
The host with a matching system ID can use the local VG and other hosts
will ignore it. A VG with no lock type and no system ID should be
excluded from all but one host using lvm.conf filters. Without any of
these protections, a local VG on shared devices can be easily damaged or
destroyed.
.P
.I "clvm VG"
.P
excluded from all but one host using
.BR lvm.conf (5)
filters.
Without any of these protections, a local VG on shared devices
can be easily damaged or destroyed.
.
.TP
.I clvm VG
A clvm VG (or clustered VG) is a VG on shared storage (like a shared VG)
that requires clvmd for clustering and locking. See below for converting
a clvm/clustered VG to a shared VG.
@@ -267,9 +293,11 @@ does for foreign VGs.
.
.SS Creating the first sanlock VG
.
When use_lvmlockd is first enabled in lvm.conf, and before the first
sanlock VG is created, no global lock will exist. In this initial state,
LVM commands try and fail to acquire the global lock, producing a warning,
When use_lvmlockd is first enabled in
.BR lvm.conf (5),
and before the first sanlock VG is created, no global lock will exist.
In this initial state, LVM commands try
and fail to acquire the global lock, producing a warning,
and some commands are disallowed. Once the first sanlock VG is created,
the global lock will be available, and LVM will be fully operational.
.P
@@ -301,10 +329,17 @@ See below for more information about managing the sanlock global lock.
.
.SS Using shared VGs
.
In the 'vgs' command, shared VGs are indicated by "s" (for shared) in
the sixth attr field, and by "shared" in the "--options shared" report
field. The specific lock type and lock args for a shared VG can be
displayed with 'vgs -o+locktype,lockargs'.
In the
.BR vgs (8)
command, shared VGs are indicated by "s" (for shared)
in the sixth attr field,
and by "shared" in the "--options shared" report field.
The specific lock type and lock args for a shared VG can be
displayed with:
.P
.EX
# vgs -o+locktype,lockargs
.EE
.P
Shared VGs need to be "started" and "stopped", unlike other types of VGs.
See the following section for a full description of starting and stopping.
@@ -345,10 +380,11 @@ the VG's devices are visible on the system
A shared VG can be stopped if all LVs are deactivated.
.P
All shared VGs can be started/stopped using:
.br
vgchange --lockstart
.br
vgchange --lockstop
.P
.EX
# vgchange --lockstart
# vgchange --lockstop
.EE
.P
Individual VGs can be started/stopped using:
.br
@@ -364,36 +400,37 @@ lvmlockd can be asked directly to stop all lockspaces:
.br
lvmlockctl -S|--stop-lockspaces
.P
To start only selected shared VGs, use the lvm.conf
activation/lock_start_list. When defined, only VG names in this list are
To start only selected shared VGs, use the
.BR lvm.conf (5)
\fBactivation/lock_start_list\fP.
When defined, only VG names in this list are
started by vgchange. If the list is not defined (the default), all
visible shared VGs are started. To start only "vg1", use the following
lvm.conf configuration:
.BR lvm.conf (5)
configuration:
.P
.nf
.EX
activation {
lock_start_list = [ "vg1" ]
...
\ lock_start_list = [ "vg1" ]
\ \&...
}
.fi
.EE
.
.SS Internal command locking
.
To optimize the use of LVM with lvmlockd, be aware of the three kinds of
locks and when they are used:
.P
.
.TP
.I Global lock
.P
The global lock is associated with global information, which is
information not isolated to a single VG. This includes:
.P
\[bu]
.RS
.IP \[bu] 2
The global VG namespace.
.br
\[bu]
.IP \[bu]
The set of orphan PVs and unused devices.
.br
\[bu]
.IP \[bu]
The properties of orphan PVs, e.g. PV size.
.P
The global lock is acquired in shared mode by commands that read this
@@ -406,28 +443,29 @@ takes a PV from the list of unused PVs.
When an LVM command is given a tag argument, or uses select, it must read
all VGs to match the tag or selection, which causes the global lock to be
acquired.
.P
.RE
.
.TP
.I VG lock
.P
A VG lock is associated with each shared VG. The VG lock is acquired in
shared mode to read the VG and in exclusive mode to change the VG or
activate LVs. This lock serializes access to a VG with all other LVM
commands accessing the VG from all hosts.
.P
.sp
The command 'vgs <vgname>' does not acquire the global lock (it does not
need the list of all VG names), but will acquire the VG lock on each VG
name argument.
.P
.
.TP
.I LV lock
.P
An LV lock is acquired before the LV is activated, and is released after
the LV is deactivated. If the LV lock cannot be acquired, the LV is not
activated. (LV locks are persistent and remain in place when the
activation command is done. Global and VG locks are transient, and are
held only while an LVM command is running.)
.P
.
.TP
.I lock retries
.P
If a request for a global or VG lock fails due to a lock conflict with
another host, lvmlockd automatically retries for a short time before
returning a failure to the LVM command. If those retries are
@@ -536,9 +574,13 @@ In a sanlock VG, the sanlock locks are held on the hidden "lvmlock" LV.
If the PV holding this LV is lost, a new lvmlock LV needs to be created.
To do this, ensure no hosts are using the VG, then forcibly change the
lock type to "none" (see above). Then change the lock type back to
"sanlock" with the normal command for changing the lock type: vgchange
--locktype sanlock VG. This recreates the internal lvmlock LV with the
necessary locks.
"sanlock" with the normal command for changing the lock type:
.P
.EX
# vgchange --locktype sanlock VG
.EE
.P
This recreates the internal lvmlock LV with the necessary locks.
.
.SS Locking system failures
.
@@ -549,7 +591,7 @@ in the lock manager. Orphaned locks must be cleared or adopted before the
associated resources can be accessed normally. If lock adoption is
enabled, lvmlockd keeps a record of locks in the adopt-file. A subsequent
instance of lvmlockd will then adopt locks orphaned by the previous
instance. Adoption must be enabled in both instances (--adopt|-A 1).
instance. Adoption must be enabled in both instances (-A|--adopt 1).
Without adoption, the lock manager or host would require a reset to clear
orphaned lock state.
.P
@@ -596,8 +638,10 @@ When the sanlock daemon detects that the lease storage is lost, it runs
the command lvmlockctl --kill <vgname>. This lvmlockctl command can be
configured to run another command to forcibly deactivate LVs, taking the
place of the manual process described above. The other command is
configured in the lvm.conf lvmlockctl_kill_command setting. The VG name
is appended to the end of the command specified.
configured in the
.BR lvm.conf (5)
\fBlvmlockctl_kill_command\fP setting.
The VG name is appended to the end of the command specified.
.P
The lvmlockctl_kill_command should forcibly deactivate LVs in the VG,
ensuring that existing writes to LVs in the VG are complete and that
@@ -609,23 +653,28 @@ equivalent of running lvmlockctl --drop). If this completes in time, a
machine reset can be avoided.
.P
One possible option is to create a script my_vg_kill_script.sh:
.nf
#!/bin/bash
VG=$1
# replace dm table with the error target for top level LVs
dmsetup wipe_table -S "uuid=~LVM && vgname=$VG && lv_layer=\\"\\""
# check that the error target is in place
dmsetup table -c -S "uuid=~LVM && vgname=$VG && lv_layer=\\"\\"" |grep -vw error
if [[ $? -ne 0 ]] ; then
exit 0
fi
exit 1
.fi
.P
Set in lvm.conf:
.nf
lvmlockctl_kill_command="/usr/sbin/my_vg_kill_script.sh"
.fi
.EX
#!/bin/bash
VG=$1
.P
# replace dm table with the error target for top level LVs
dmsetup wipe_table -S "uuid=~LVM && vgname=$VG && lv_layer=\\"\\""
.P
# check that the error target is in place
dmsetup table -c -S "uuid=~LVM && vgname=$VG && lv_layer=\\"\\"" |grep -vw error
if [[ $? -ne 0 ]] ; then
\ exit 0
fi
exit 1
.EE
.P
Set in
.BR lvm.conf (5):
.P
.EX
lvmlockctl_kill_command="/usr/sbin/my_vg_kill_script.sh"
.EE
.P
(The script and dmsetup commands should be tested with the actual VG to
ensure that all top level LVs are properly disabled.)
@@ -649,8 +698,10 @@ cluster name changes, or the VG is moved to a new cluster, the dlm cluster
name saved in the VG must also be changed.
.P
To see the dlm cluster name saved in the VG, use the command:
.br
vgs -o+locktype,lockargs <vgname>
.P
.EX
# vgs -o+locktype,lockargs <vgname>
.EE
.P
To change the dlm cluster name in the VG when the VG is still used by the
original cluster:
@@ -802,17 +853,17 @@ operation.
.SS Limitations of shared VGs
.
Commands that cannot be run on shared VGs:
.br
\[bu]
.
.IP \[bu] 2
splitting snapshots from LVs
.br
\[bu]
.
.IP \[bu]
splitting mirrors in sanlock VGs
.br
\[bu]
.
.IP \[bu]
pvmove of entire PVs, or under LVs activated with shared locks
.br
\[bu]
.
.IP \[bu]
vgmerge
.
.SS lvmlockd changes from clvmd
@@ -827,7 +878,9 @@ Visible usage differences between shared VGs (using lvmlockd) and
clvm/clustered VGs (using clvmd):
.
.IP \[bu] 2
lvm.conf is configured to use lvmlockd by setting use_lvmlockd=1.
.BR lvm.conf (5)
is configured to use lvmlockd by setting \fBuse_lvmlockd=1\fP.
.br
clvmd used locking_type=3.
.
.IP \[bu]
@@ -873,8 +926,9 @@ lvmlockd includes VG reporting options lock_type and lock_args, and LV
reporting option lock_args to view the corresponding metadata fields.
.
.IP \[bu]
In the 'vgs' command's sixth VG attr field, "s" for "shared" is displayed
for shared VGs.
In the
.BR vgs (8)
command's sixth VG attr field, "s" for "shared" is displayed for shared VGs.
.
.IP \[bu]
If lvmlockd fails or is killed while in use, locks it held remain but are
@@ -882,10 +936,18 @@ orphaned in the lock manager. lvmlockd can be restarted with an option to
adopt the orphan locks from the previous instance of lvmlockd.
.
.IP \[bu]
The 'lvs' command does not report any remote state, because lvmlockd is
The
.BR lvs (8)
command does not report any remote state, because lvmlockd is
unable to passively check the remote active or lock state of an LV.
.
.SH SEE ALSO
.
.nh
.na
.BR lvm (8),
.BR lvmlockctl (8)
.BR lvmlockctl (8),
.BR lvchange (8),
.BR lvgs (8),
.BR vgs (8),
.BR lvm.conf (5)

View File

@@ -1,32 +1,45 @@
.TH LVMPOLLD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
.
.de NSY
. ie t .SY \\$1
. el \{\
. ie \\n(.$>1 \{\
. PD 0
. TP \\w'\\$1\ 'u
. \}
. el .TP
. B \\$1
. na
. nh
. \}
..
.
.SH NAME
.
lvmpolld \(em LVM poll daemon
.
.SH SYNOPSIS
.
.B lvmpolld
.nh
.na
.RB [ -l | --log
.BR all | wire | debug ]
.RB [ -p | --pidfile
.IR pidfile_path ]
.RB [ -s | --socket
.IR socket_path ]
.RB [ -B | --binary
.IR lvm_binary_path ]
.RB [ -t | --timeout
.IR timeout_value ]
.NSY lvmpolld 1
.RB [ -B | --binary\ \c
.IR lvm_bi\%nary_path ]
.RB [ -f | --foreground ]
.RB [ -h | --help ]
.RB [ -l | --log\ \c
.BR all |\: wire | debug ]
.RB [ -p | --pidfile\ \c
.IR pidfile_path ]
.RB [ -s | --socket\ \c
.IR socket_path ]
.RB [ -t | --timeout\ \c
.IR timeout_value ]
.RB [ -V | --version ]
.sp
.NSY lvmpolld
.RB [ --dump ]
.ad
.hy
.P
.B lvmpolld
.RB [ --dump ]
.PD
.
.SH DESCRIPTION
.
@@ -51,8 +64,20 @@ To run the daemon in a test environment both the pidfile_path and the
socket_path should be changed from the defaults.
.
.TP
\fB-B\fP|\fB--binary\fP \fIlvm_binary_path\fP
Optional path to alternative LVM binary
(default: \fI#LVM_PATH#\fP).
Use for testing purposes only.
.
.TP
.B --dump
Contact the running lvmpolld daemon to obtain the complete state
and print it out in a raw format.
.
.TP
.BR -f | --foreground
Don't fork, but run in the foreground.
.
.TP
.BR -h | --help
Show help information.
@@ -67,36 +92,29 @@ Selecting '\fBall\fP' supplies both
and is equivalent to a comma-separated list \fB-l wire,debug\fP.
.
.TP
.BR -p | --pidfile " " \fIpidfile_path
\fB-p\fP|\fB--pidfile\fP \fIpidfile_path\fP
Path to the pidfile. This overrides both the built-in default
(\fI#DEFAULT_PID_DIR#/lvmpolld.pid\fP) and the environment variable
\fBLVM_LVMPOLLD_PIDFILE\fP. This file is used to prevent more
than one instance of the daemon running simultaneously.
(\fI#DEFAULT_PID_DIR#/lvmpolld.pid\fP)
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
\fB-s\fP|\fB--socket\fP \fIsocket_path\fP
Path to the socket file. This overrides both the built-in default
(\fI#DEFAULT_RUN_DIR#/lvmpolld.socket\fP) and the environment variable
\fBLVM_LVMPOLLD_SOCKET\fP.
.
.TP
.BR -t | --timeout " " \fItimeout_value
\fB-t\fP|\fB--timeout\fP \fItimeout_value\fP
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
Optional path to alternative LVM binary (default: \fI#LVM_PATH#\fP).
Use for testing purposes only.
.
.TP
.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
.
@@ -111,4 +129,8 @@ Path for the socket file.
.SH SEE ALSO
.
.BR lvm (8),
.BR lvm.conf (5)
.BR lvm.conf (5),
.BR lvchange (8),
.BR lvconvert (8),
.BR pvmove (8),
.BR vgchange (8)

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,13 @@
.TH "LVMSYSTEMID" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.TH "LVMSYSTEMID" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc"
.
.if !dEX \{\
.de EX
.nf
..
.de EE
.fi
..
\}
.
.SH NAME
.
@@ -160,96 +169,89 @@ 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
.EX
global {
system_id_source = "none"
\ system_id_source = "none"
}
.fi
.EE
.
.TP
.B appmachineid
.br
An LVM-specific derivation of /etc/machine-id is used as the system ID.
See
.BR machine-id (5)
to check if machine-id is available on the host.
.sp
.I lvm.conf
.nf
.EX
global {
system_id_source = "appmachineid"
\ system_id_source = "appmachineid"
}
.fi
.EE
.
.TP
.B machineid
.br
The content of /etc/machine-id is used as the system ID if available.
(appmachineid is recommended to avoid exposing the confidential
machine-id.)
.sp
.I lvm.conf
.nf
.EX
global {
system_id_source = "machineid"
\ system_id_source = "machineid"
}
.fi
.EE
.
.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
.EX
global {
system_id_source = "uname"
\ system_id_source = "uname"
}
.fi
.EE
.
.TP
.B lvmlocal
.br
The system ID is defined in lvmlocal.conf local/system_id.
.sp
.I lvm.conf
.nf
.EX
global {
system_id_source = "lvmlocal"
\ system_id_source = "lvmlocal"
}
.fi
.EE
.sp
.I lvmlocal.conf
.nf
.EX
local {
system_id = "example_name"
\ system_id = "example_name"
}
.fi
.EE
.
.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
.EX
global {
system_id_source = "file"
system_id_file = "/path/to/file"
\ system_id_source = "file"
\ system_id_file = "/path/to/file"
}
.fi
.LP
.EE
.P
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.)
@@ -268,11 +270,11 @@ with other system IDs, those other system IDs can be listed in
lvmlocal.conf local/extra_system_ids.
.P
.I lvmlocal.conf
.nf
.EX
local {
extra_system_ids = [ "my_other_name" ]
\ extra_system_ids = [ "my_other_name" ]
}
.fi
.EE
.P
A safer option may be configuring the extra values as needed on the
command line as:
@@ -281,16 +283,17 @@ command line as:
.
.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:
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.
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.)
@@ -375,5 +378,6 @@ system ID. The same is true of any block device that is not a PV.
.BR vgs (8),
.BR lvmlockd (8),
.BR lvm.conf (5),
.P
.BR machine-id (5),
.BR uname (2)

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,14 @@
.TH "LVMVDO" "7" "LVM TOOLS #VERSION#" "Red Hat, Inc" \" -*- nroff -*-
.
.if !dEX \{\
.de EX
.nf
..
.de EE
.fi
..
\}
.
.SH NAME
.
lvmvdo \(em Support for Virtual Data Optimizer in LVM
@@ -52,30 +61,20 @@ for extracting statistics from VDO volumes.
.SH VDO TERMS
.
.TP
VDODataLV
.br
VDO data LV
.br
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.
.B VDODataLV
VDO data LV is large hidden LV with the _vdata suffix.
It is created in a VG used by the VDO kernel target
to store all data and metadata blocks.
.
.TP
VDOPoolLV
.br
VDO pool LV
.br
A pool for virtual VDOLV(s), which are the size of used VDODataLV.
.br
.B VDOPoolLV
VDO pool LV is pool for virtual VDOLV(s),
which are the size of used VDODataLV.
Only a single VDOLV is currently supported.
.
.TP
VDOLV
.br
VDO LV
.br
Created from VDOPoolLV.
.br
.B VDOLV
VDO LV is a virtual LV created from VDOPoolLV.
Appears blank after creation.
.
.SH VDO USAGE
@@ -100,16 +99,22 @@ 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
.B lvcreate --type vdo -n
.I VDOLV
.B -L
.I DataSize
.B -V
.I LargeVirtualSize VG/VDOPoolLV
.br
.B lvcreate --vdo -L
.I DataSize VG
.P
.I Example
.nf
.P
.EX
# lvcreate --type vdo -n vdo0 -L 10G -V 100G vg/vdopool0
# mkfs.ext4 -E nodiscard /dev/vg/vdo0
.fi
.EE
.
.SS \n+[step]. Convert an existing LV into VDOPoolLV
.
@@ -122,40 +127,51 @@ 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
.B lvconvert --type vdo-pool -n
.I VDOLV
.B -V
.I VirtualSize VG/VDOPoolLV
.br
.B lvconvert --vdopool
.I VG/VDOPoolLV
.P
.I Example
.nf
.P
.EX
# lvconvert --type vdo-pool -n vdo0 -V10G vg/ExistingLV
.fi
.EE
.
.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).
.P
.B lvchange --compression y|n --deduplication y|n VG/VDOPoolLV
.B lvchange --compression
.BR y | n
.B --deduplication
.BR y | n
.I VG/VDOPoolLV
.P
.I Example
.nf
.P
.EX
# lvchange --compression n vg/vdopool0
# lvchange --deduplication y vg/vdopool1
.fi
.EE
.
.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 \fI#DEFAULT_SYS_DIR#/profile\fP directory
and just specify the profile file name.
a number of different profiles in the
\fI#DEFAULT_SYS_DIR#/profile\fP
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
.P
.EX
# cat <<EOF > #DEFAULT_SYS_DIR#/profile/vdo_create.profile
allocation {
.RS
@@ -181,7 +197,7 @@ EOF
.P
# lvcreate --vdo -L10G --metadataprofile vdo_create vg/vdopool0
# lvcreate --vdo -L10G --config 'allocation/vdo_cpu_threads=4' vg/vdopool1
.fi
.EE
.
.SS \n+[step]. Set or change VDO settings with option --vdosettings
.
@@ -202,10 +218,10 @@ and --deduplication.
.P
.I Example
.P
.nf
.EX
# lvcreate --vdo -L10G --vdosettings 'ack_threads=1 hash_zone_threads=2' vg/vdopool0
# lvchange --vdosettings 'bio_threads=2 deduplication=1' vg/vdopool0
.fi
.EE
.
.SS \n+[step]. Checking the usage of VDOPoolLV
.
@@ -219,23 +235,24 @@ Note: \fBvdostats\fP(8) currently understands only
\fI/dev/mapper\fP device names.
.P
.I Example
.nf
.P
.EX
# 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
\ 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
release version : 133524
data blocks used : 79
...
.fi
\ version : 30
\ release version : 133524
\ data blocks used : 79
\ ...
.EE
.
.SS \n+[step]. Extending the VDOPoolLV size
.
@@ -251,13 +268,15 @@ with the \fBactivation/vdo_pool_autoextend_percent\fP and
.P
Note: You cannot reduce the size of a VDOPoolLV.
.P
.B lvextend -L+AddingSize VG/VDOPoolLV
.B lvextend -L+\c
.I AddingSize VG/VDOPoolLV
.P
.I Example
.nf
.P
.EX
# lvextend -L+50G vg/vdopool0
# lvresize -L300G vg/vdopool1
.fi
.EE
.
.SS \n+[step]. Extending or reducing the VDOLV size
.
@@ -268,16 +287,19 @@ 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.
.P
.B lvextend -L+AddingSize VG/VDOLV
.B lvextend -L+\c
.I AddingSize VG/VDOLV
.br
.B lvreduce -L-ReducingSize VG/VDOLV
.B lvreduce -L-\c
.I ReducingSize VG/VDOLV
.P
.I Example
.nf
.P
.EX
# lvextend -L+50G vg/vdo0
# lvreduce -L-50G vg/vdo1
# lvresize -L200G vg/vdo2
.fi
.EE
.
.SS \n+[step]. Component activation of a VDODataLV
.
@@ -290,10 +312,11 @@ 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
.P
.EX
# lvchange -ay vg/vpool0_vdata
# lvchange -an vg/vpool0_vdata
.fi
.EE
.
.SH VDO TOPICS
.
@@ -312,21 +335,23 @@ with thin-pool named after original LV name LV_tpool0.
See \fBlvmthin\fP(7) for more details.
.P
.I Example
.nf
.P
.EX
# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vdopool
# lvconvert --type thin vg/vdo1
# lvcreate -V20 vg/vdo1_tpool0
.fi
.EE
.
.SS \n+[step]. VDOPoolLV on top of raid
.
Using a raid type LV for a VDODataLV.
.P
.I Example
.nf
.P
.EX
# lvcreate --type raid1 -L 5G -n vdopool vg
# lvconvert --type vdo-pool -V 10G vg/vdopool
.fi
.EE
.
.SS \n+[step]. Caching a VDOPoolLV
.
@@ -335,12 +360,13 @@ to accelerate reads and writes of already compressed and deduplicated
data blocks together with VDO metadata.
.P
.I Example
.nf
.P
.EX
# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vdopool
# lvcreate --type cache-pool -L 1G -n cachepool vg
# lvconvert --cache --cachepool vg/cachepool vg/vdopool
# lvconvert --uncache vg/vdopool
.fi
.EE
.
.SS \n+[step]. Caching a VDOLV
.
@@ -348,12 +374,13 @@ 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
.P
.EX
# lvcreate --type vdo -L 5G -V 10G -n vdo1 vg/vdopool
# lvcreate --type cache-pool -L 1G -n cachepool vg
# lvconvert --cache --cachepool vg/cachepool vg/vdo1
# lvconvert --uncache vg/vdo1
.fi
.EE
.
.SS \n+[step]. Usage of Discard/TRIM with a VDOLV
.
@@ -373,19 +400,20 @@ take otherwise as device is already expected to be empty.
.
.SS \n+[step]. Memory usage
.
The VDO target requires 38\~MiB of RAM and several variable amounts:
The VDO target requires 38\ MiB of RAM and several variable amounts:
.
.IP \(bu 2
1.15\~MiB of RAM for each 1\~MiB of configured block map cache size.
The block map cache requires a minimum of 150\~MiB RAM.
.br
1.15\ MiB of RAM for each 1\ MiB of configured block map cache size.
The block map cache requires a minimum of 150\ MiB RAM.
.
.IP \(bu
1.6\~MiB of RAM for each 1\~TiB of logical space.
.br
1.6\ MiB of RAM for each 1\ TiB of logical space.
.
.IP \(bu
268\~MiB of RAM for each 1\~TiB of physical storage managed by the volume.
.br
268\ MiB of RAM for each 1\ TiB of physical storage managed by the volume.
.
.P
UDS requires a minimum of 250\~MiB of RAM,
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
@@ -403,31 +431,35 @@ 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.
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 \n+[step]. Storage space requirements
.
You can configure a VDOPoolLV to use up to 256\~TiB of physical storage.
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:
.
.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.
The first type of VDO metadata uses approximately 1\ MiB for each 4\ GiB
of physical storage plus an additional 1\ MiB per slab.
.
.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.
The second type of VDO metadata consumes approximately 1.25\ MiB
for each 1\ GiB of logical storage, rounded up to the nearest slab.
.
.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.
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
.

View File

@@ -1,14 +1,152 @@
.TH LVREDUCE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_extents
.OPA l extents
[\fB-\fP]\fINumber\fP[PERCENT]
..
.de O_force
.OPA f force
\&\.\|.\|.\&
..
.de O_fs
.OPA fs
\fIString\fP
..
.de O_fsmode
.OPA fsmode
\fIString\fP
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nofsck
.OPS n nofsck
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_noudevsync
.OPS noudevsync
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_resizefs
.OPS r resizefs
..
.de O_size
.OPA L size
[\fB-\fP]\fISize\fP[m|\:UNIT]
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvreduce \(em Reduce the size of a logical volume
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvreduce\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -33,130 +171,177 @@ the options section.
.
.SH USAGE
.
\fBlvreduce\fP \fB-L\fP|\fB--size\fP [\fB-\fP]\fISize\fP[m|UNIT] \fILV\fP
.br
.RS 4
.nh
.na
[ \fB-l\fP|\fB--extents\fP [\fB-\fP]\fINumber\fP[PERCENT] ]
.B lvreduce
.O_size
\fILV\fP
.RS
[
.O_extents
]
.br
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
[
.O_autobackup
]
.br
[ \fB-f\fP|\fB--force\fP ]
[
.O_force
]
.br
[ \fB-n\fP|\fB--nofsck\fP ]
[
.O_nofsck
]
.br
[ \fB-r\fP|\fB--resizefs\fP ]
[
.O_resizefs
]
.br
[ \fB--noudevsync\fP ]
[
.O_noudevsync
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_reportformat
]
.br
[ \fB--fs\fP \fIString\fP ]
[
.O_fs
]
.br
[ \fB--fsmode\fP \fIString\fP ]
[
.O_fsmode
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-l\fP|\fB--extents\fP [\fB-\fP]\fINumber\fP[PERCENT]
.br
.TP
.O_extents
Specifies the new size of the LV in logical extents.
The --size and --extents options are alternate methods of specifying size.
The total number of physical extents used will be
@@ -176,15 +361,13 @@ When the plus \fB+\fP or minus \fB-\fP prefix is used,
the value is not an absolute size, but is relative and added or subtracted
from the current size.
.
.HP
\fB-f\fP|\fB--force\fP ...
.br
.TP
.O_force
Override various checks, confirmations and protections.
Use with extreme caution.
.
.HP
\fB--fs\fP \fIString\fP
.br
.TP
.O_fs
Control file system resizing when resizing an LV.
\fBchecksize\fP: Check the fs size and reduce the LV if the fs is not
using the reduced space (fs reduce is not needed.) If the reduced space
@@ -199,9 +382,8 @@ file systems that are unmounted (or mounted if prompts are skipped.)
\fBignore\fP: Resize the LV without checking for or handling a file system.
Warning: using ignore when reducing the LV size may destroy the file system.
.
.HP
\fB--fsmode\fP \fIString\fP
.br
.TP
.O_fsmode
Control file system mounting behavior for fs resize.
\fBmanage\fP: Mount or unmount the fs as needed to resize the fs,
and attempt to restore the original mount state at the end.
@@ -212,14 +394,12 @@ the command.
is unmounted. If mounting is required to resize the fs, then do not resize
the fs or the LV and fail the command.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -227,58 +407,49 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB-n\fP|\fB--nofsck\fP
.br
.TP
.O_nofsck
Do not perform fsck when resizing the file system with --resizefs.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--noudevsync\fP
.br
.TP
.O_noudevsync
Disables udev synchronization. The process will not wait for notification
from udev. It will continue irrespective of any possible udev processing
in the background. Only use this if udev is not running or has rules that
ignore the devices LVM creates.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -288,17 +459,15 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-r\fP|\fB--resizefs\fP
.br
.TP
.O_resizefs
Resize the fs using the fs-specific resize command.
May include mounting, unmounting, or running fsck. See --fsmode to control
mounting behavior, and --nofsck to disable fsck. See --fs for more options
(--resizefs is equivalent to --fs resize.)
.
.HP
\fB-L\fP|\fB--size\fP [\fB-\fP]\fISize\fP[m|UNIT]
.br
.TP
.O_size
Specifies the new size of the LV.
The --size and --extents options are alternate methods of specifying size.
The total number of physical extents used will be
@@ -307,29 +476,25 @@ When the plus \fB+\fP or minus \fB-\fP prefix is used,
the value is not an absolute size, but is relative and added or subtracted
from the current size.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -340,9 +505,11 @@ answer yes. Use with extreme caution.
.I LV
Logical Volume name. See \fBlvm\fP(8) for valid names.
An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -372,5 +539,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,137 @@
.TH LVREMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_force
.OPA f force
\&\.\|.\|.\&
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nohistory
.OPS nohistory
..
.de O_nolocking
.OPS nolocking
..
.de O_noudevsync
.OPS noudevsync
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_select
.OPA S select
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvremove \(em Remove logical volume(s) from the system
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvremove\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -41,135 +164,173 @@ former LV completely.
.
.SH USAGE
.
\fBlvremove\fP \fIVG\fP|\fILV\fP|\fITag\fP|\fISelect\fP ...
.br
.RS 4
.nh
.na
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.B lvremove
\fIVG\fP|\fILV\fP|\fITag\fP|\fISelect\fP\ .\|.\|.\&
.RS
[
.O_autobackup
]
.br
[ \fB-f\fP|\fB--force\fP ]
[
.O_force
]
.br
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
[
.O_select
]
.br
[ \fB--nohistory\fP ]
[
.O_nohistory
]
.br
[ \fB--noudevsync\fP ]
[
.O_noudevsync
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_reportformat
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--force\fP ...
.br
.TP
.O_force
Override various checks, confirmations and protections.
Use with extreme caution.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -177,60 +338,51 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nohistory\fP
.br
.TP
.O_nohistory
Do not record history of LVs being removed.
This has no effect unless the configuration setting
metadata/record_lvs_history is enabled.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--noudevsync\fP
.br
.TP
.O_noudevsync
Disables udev synchronization. The process will not wait for notification
from udev. It will continue irrespective of any possible udev processing
in the background. Only use this if udev is not running or has rules that
ignore the devices LVM creates.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -240,9 +392,8 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-S\fP|\fB--select\fP \fIString\fP
.br
.TP
.O_select
Select objects for processing and reporting based on specified criteria.
The criteria syntax is described by \fB--select help\fP
and \fBlvmreport\fP(7).
@@ -254,29 +405,25 @@ showing 1 if the row matches the selection and 0 otherwise.
For non-reporting commands which process LVM entities, the selection is
used to choose items to process.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -286,22 +433,27 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I LV
Logical Volume name. See \fBlvm\fP(8) for valid names.
An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
.
.TP
.I Tag
Tag name. See \fBlvm\fP(8) for information about tag names and using tags
in place of a VG, LV or PV.
.
.TP
.I Select
Select indicates that a required positional parameter can
be omitted if the \fB--select\fP option is used.
No arg appears in this position.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -331,5 +483,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,126 @@
.TH LVRENAME 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_noudevsync
.OPS noudevsync
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvrename \(em Rename a logical volume
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvrename\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -17,137 +129,169 @@ historical LV information.)
.
.SH USAGE
.
\fBlvrename\fP \fIVG\fP \fILV\fP \fILV\fP\fI_new\fP
.br
.RS 4
.nh
.na
.B lvrename
\fIVG\fP \fILV\fP \fILV\fP\fI_new\fP
.RS
[ COMMON_OPTIONS ]
.RE
.
.P
\(em
.P
.
.B lvrename
\fILV\fP \fILV\fP\fI_new\fP
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.P
\fBlvrename\fP \fILV\fP \fILV\fP\fI_new\fP
.br
.RS 4
.na
[ COMMON_OPTIONS ]
.ad
.RE
\(em
.P
Common options for command:
.
.RS 4
.na
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.RS
[
.O_autobackup
]
.br
[ \fB--noudevsync\fP ]
[
.O_noudevsync
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
.ad
[
.O_reportformat
]
.RE
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -155,53 +299,45 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--noudevsync\fP
.br
.TP
.O_noudevsync
Disables udev synchronization. The process will not wait for notification
from udev. It will continue irrespective of any possible udev processing
in the background. Only use this if udev is not running or has rules that
ignore the devices LVM creates.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -211,29 +347,25 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -243,13 +375,16 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I LV
Logical Volume name. See \fBlvm\fP(8) for valid names.
An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -279,5 +414,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,92 +1,269 @@
.TH LVRESIZE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_alloc
.OPA alloc
\%\fBcontiguous\fP|\:\
\fBcling\fP|\:\
\fBcling_by_tags\fP|\:\
\fBnormal\fP|\:\
\fBanywhere\fP|\:\
\fBinherit\fP
..
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_extents
.OPA l extents
[\fB+\fP|\fB-\fP]\fINumber\fP[PERCENT]
..
.de O_force
.OPA f force
\&\.\|.\|.\&
..
.de O_fs
.OPA fs
\fIString\fP
..
.de O_fsmode
.OPA fsmode
\fIString\fP
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nofsck
.OPS n nofsck
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_nosync
.OPS nosync
..
.de O_noudevsync
.OPS noudevsync
..
.de O_poolmetadatasize
.OPA poolmetadatasize
[\fB+\fP]\fISize\fP[m|\:UNIT]
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_resizefs
.OPS r resizefs
..
.de O_size
.OPA L size
[\fB+\fP|\fB-\fP]\fISize\fP[m|\:UNIT]
..
.de O_stripes
.OPA i stripes
\fINumber\fP
..
.de O_stripesize
.OPA I stripesize
\fISize\fP[k|\:UNIT]
..
.de O_test
.OPS t test
..
.de O_type
.OPA type
\%\fBlinear\fP|\:\
\fBstriped\fP|\:\
\fBsnapshot\fP|\:\
\fBraid\fP|\:\
\fBmirror\fP|\:\
\fBthin\fP|\:\
\fBthin-pool\fP|\:\
\fBvdo\fP|\:\
\fBvdo-pool\fP|\:\
\fBcache\fP|\:\
\fBcache-pool\fP|\:\
\fBwritecache\fP
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvresize \(em Resize a logical volume
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvresize\fP \fIoption_args\fP \fIposition_args\fP
[ \fIoption_args\fP ]
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
[ \fIposition_args\fP ]
.P
.na
\fB--alloc\fP \c
.nh
\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
.hy
.RS 5
.if t .ta 3nR +1uL \" PostScript/PDF
.PD 0
.O_alloc
.br
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.O_autobackup
.br
\fB--commandprofile\fP \fIString\fP
.O_commandprofile
.br
\fB--config\fP \fIString\fP
.O_config
.br
\fB-d\fP|\fB--debug\fP
.O_debug
.br
\fB--devices\fP \fIPV\fP
.O_devices
.br
\fB--devicesfile\fP \fIString\fP
.O_devicesfile
.br
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.O_driverloaded
.br
\fB-l\fP|\fB--extents\fP [\fB+\fP|\fB-\fP]\fINumber\fP[PERCENT]
.O_extents
.br
\fB-f\fP|\fB--force\fP
.O_force
.br
\fB--fs\fP \fIString\fP
.O_fs
.br
\fB--fsmode\fP \fIString\fP
.O_fsmode
.br
\fB-h\fP|\fB--help\fP
.O_help
.br
\fB--journal\fP \fIString\fP
.O_journal
.br
\fB--lockopt\fP \fIString\fP
.O_lockopt
.br
\fB--longhelp\fP
.O_longhelp
.br
\fB-n\fP|\fB--nofsck\fP
.O_nofsck
.br
\fB--nohints\fP
.O_nohints
.br
\fB--nolocking\fP
.O_nolocking
.br
\fB--nosync\fP
.O_nosync
.br
\fB--noudevsync\fP
.O_noudevsync
.br
\fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT]
.O_poolmetadatasize
.br
\fB--profile\fP \fIString\fP
.O_profile
.br
\fB-q\fP|\fB--quiet\fP
.O_quiet
.br
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.O_reportformat
.br
\fB-r\fP|\fB--resizefs\fP
.O_resizefs
.br
\fB-L\fP|\fB--size\fP [\fB+\fP|\fB-\fP]\fISize\fP[m|UNIT]
.O_size
.br
\fB-i\fP|\fB--stripes\fP \fINumber\fP
.O_stripes
.br
\fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
.O_stripesize
.br
\fB-t\fP|\fB--test\fP
.O_test
.br
\fB--type\fP \c
.nh
\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
.hy
.O_type
.br
\fB-v\fP|\fB--verbose\fP
.O_verbose
.br
\fB--version\fP
.O_version
.br
\fB-y\fP|\fB--yes\fP
.O_yes
.PD
.if t .ta
.RE
.ad
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -99,158 +276,207 @@ the options section.
.
.SH USAGE
.
.nh
.na
Resize an LV by a specified size.
.br
.P
\fBlvresize\fP \fB-L\fP|\fB--size\fP [\fB+\fP|\fB-\fP]\fISize\fP[m|UNIT] \fILV\fP
.B lvresize
.O_size
\fILV\fP
.RS
[
.O_extents
]
.br
.RS 4
.na
[ \fB-l\fP|\fB--extents\fP [\fB+\fP|\fB-\fP]\fINumber\fP[PERCENT] ]
[
.O_resizefs
]
.br
[ \fB-r\fP|\fB--resizefs\fP ]
[
.O_poolmetadatasize
]
.br
[ \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] ]
[
.O_fs
]
.br
[ \fB--fs\fP \fIString\fP ]
.br
[ \fB--fsmode\fP \fIString\fP ]
[
.O_fsmode
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIPV\fP ... ]
.br
[ \fIPV\fP\ .\|.\|.\& ]
.RE
.
.P
\(em
.P
.
Resize an LV by specified PV extents.
.br
.P
\fBlvresize\fP \fILV\fP \fIPV\fP ...
.B lvresize
\fILV\fP \fIPV\fP\ .\|.\|.\&
.RS
[
.O_resizefs
]
.br
.RS 4
.na
[ \fB-r\fP|\fB--resizefs\fP ]
[
.O_fs
]
.br
[ \fB--fs\fP \fIString\fP ]
.br
[ \fB--fsmode\fP \fIString\fP ]
[
.O_fsmode
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Resize a pool metadata SubLV by a specified size.
.br
.P
\fBlvresize\fP \fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT] \fILV1\fP
.br
.RS 4
.na
.B lvresize
.O_poolmetadatasize
\fILV1\fP
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIPV\fP ... ]
.RE
.P
.RS 4
LV1 types: thinpool
.br
[ \fIPV\fP\ .\|.\|.\& ]
.sp
LV1 types:
thinpool
.RE
.P
\(em
.P
Common options for command:
.
.RS 4
.na
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.br
[ \fB-f\fP|\fB--force\fP ]
.br
[ \fB-n\fP|\fB--nofsck\fP ]
.br
[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
.br
[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
.br
[ \fB--alloc\fP \c
.nh
\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
.hy
.RS
[
.O_autobackup
]
.br
[ \fB--nosync\fP ]
.br
[ \fB--noudevsync\fP ]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
.br
[ \fB--type\fP \c
.nh
\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
.hy
[
.O_force
]
.br
[
.O_nofsck
]
.br
[
.O_stripes
]
.br
[
.O_stripesize
]
.br
[
.O_alloc
]
.br
[
.O_nosync
]
.br
[
.O_noudevsync
]
.br
[
.O_reportformat
]
.br
[
.O_type
]
.ad
.RE
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
.ad
\fB--alloc\fP \c
.nh
\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
.hy
.ad
.br
.TP
.O_alloc
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
which can be changed with vgchange/lvchange, or overridden on the
@@ -268,59 +494,51 @@ Optional positional PV args on the command line can also be used to limit
which PVs the command will use for allocation.
See \fBlvm\fP(8) for more information about allocation.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-l\fP|\fB--extents\fP [\fB+\fP|\fB-\fP]\fINumber\fP[PERCENT]
.br
.TP
.O_extents
Specifies the new size of the LV in logical extents.
The --size and --extents options are alternate methods of specifying size.
The total number of physical extents used will be
@@ -340,15 +558,13 @@ When the plus \fB+\fP or minus \fB-\fP prefix is used,
the value is not an absolute size, but is relative and added or subtracted
from the current size.
.
.HP
\fB-f\fP|\fB--force\fP ...
.br
.TP
.O_force
Override various checks, confirmations and protections.
Use with extreme caution.
.
.HP
\fB--fs\fP \fIString\fP
.br
.TP
.O_fs
Control file system resizing when resizing an LV.
\fBchecksize\fP: Check the fs size and reduce the LV if the fs is not
using the reduced space (fs reduce is not needed.) If the reduced space
@@ -363,9 +579,8 @@ file systems that are unmounted (or mounted if prompts are skipped.)
\fBignore\fP: Resize the LV without checking for or handling a file system.
Warning: using ignore when reducing the LV size may destroy the file system.
.
.HP
\fB--fsmode\fP \fIString\fP
.br
.TP
.O_fsmode
Control file system mounting behavior for fs resize.
\fBmanage\fP: Mount or unmount the fs as needed to resize the fs,
and attempt to restore the original mount state at the end.
@@ -376,14 +591,12 @@ the command.
is unmounted. If mounting is required to resize the fs, then do not resize
the fs or the LV and fail the command.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -391,38 +604,32 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB-n\fP|\fB--nofsck\fP
.br
.TP
.O_nofsck
Do not perform fsck when resizing the file system with --resizefs.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--nosync\fP
.br
.TP
.O_nosync
Causes the creation of mirror, raid1, raid4, raid5 and raid10 to skip the
initial synchronization. In case of mirror, raid1 and raid10, any data
written afterwards will be mirrored, but the original contents will not be
@@ -436,36 +643,31 @@ to reconstruct proper user date in case of device failures.
raid0 and raid0_meta do not provide any data copies or parity support
and thus do not support initial synchronization.
.
.HP
\fB--noudevsync\fP
.br
.TP
.O_noudevsync
Disables udev synchronization. The process will not wait for notification
from udev. It will continue irrespective of any possible udev processing
in the background. Only use this if udev is not running or has rules that
ignore the devices LVM creates.
.
.HP
\fB--poolmetadatasize\fP [\fB+\fP]\fISize\fP[m|UNIT]
.br
.TP
.O_poolmetadatasize
Specifies the new size of the pool metadata LV.
The plus prefix \fB+\fP can be used, in which case
the value is added to the current size.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -475,17 +677,15 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-r\fP|\fB--resizefs\fP
.br
.TP
.O_resizefs
Resize the fs using the fs-specific resize command.
May include mounting, unmounting, or running fsck. See --fsmode to control
mounting behavior, and --nofsck to disable fsck. See --fs for more options
(--resizefs is equivalent to --fs resize.)
.
.HP
\fB-L\fP|\fB--size\fP [\fB+\fP|\fB-\fP]\fISize\fP[m|UNIT]
.br
.TP
.O_size
Specifies the new size of the LV.
The --size and --extents options are alternate methods of specifying size.
The total number of physical extents used will be
@@ -494,9 +694,8 @@ When the plus \fB+\fP or minus \fB-\fP prefix is used,
the value is not an absolute size, but is relative and added or subtracted
from the current size.
.
.HP
\fB-i\fP|\fB--stripes\fP \fINumber\fP
.br
.TP
.O_stripes
Specifies the number of stripes in a striped LV. This is the number of
PVs (devices) that a striped LV is spread across. Data that
appears sequential in the LV is spread across multiple devices in units of
@@ -510,29 +709,21 @@ when unspecified, the default depends on the RAID type
To stripe a new raid LV across all PVs by default,
see \fBlvm.conf\fP(5) \fBallocation/raid_stripe_all_devices\fP.
.
.HP
\fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT]
.br
.TP
.O_stripesize
The amount of data that is written to one device before
moving to the next in a striped LV.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
.ad
\fB--type\fP \c
.nh
\%\fBlinear\fP|\:\fBstriped\fP|\:\fBsnapshot\fP|\:\fBraid\fP|\:\fBmirror\fP|\:\fBthin\fP|\:\fBthin-pool\fP|\:\fBvdo\fP|\:\fBvdo-pool\fP|\:\fBcache\fP|\:\fBcache-pool\fP|\:\fBwritecache\fP
.hy
.ad
.br
.TP
.O_type
The LV type, also known as "segment type" or "segtype".
See usage descriptions for the specific ways to use these types.
For more information about redundancy and performance
@@ -548,20 +739,17 @@ is inferred from other options or shortcuts
--thin, --cache, --vdo).
Use inferred types with care because it can lead to unexpected results.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -574,6 +762,7 @@ Logical Volume name. See \fBlvm\fP(8) for valid names.
An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
LV1 indicates the LV must have a specific type, where the
accepted LV types are listed. (raid represents raid<N> type).
.
.TP
.I PV
Physical Volume name, a device path under /dev.
@@ -581,13 +770,17 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -617,5 +810,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -2,6 +2,7 @@
.SH NOTES
.
The lv_attr bits are:
.
.IP 1 3
Volume type: (\fBC\fP)ache, (\fBm\fP)irrored,
(\fBM\fP)irrored without initial sync,
@@ -13,18 +14,22 @@ mirror (\fBl\fP)og device, under (\fBc\fP)onversion, thin (\fBV\fP)olume,
(\fBt\fP)hin pool, (\fBT\fP)hin pool data,
v(\fBd\fP)o pool, v(\fBD\fP)o pool data,
raid or pool m(\fBe\fP)tadata or pool metadata spare.
.IP 2 3
.
.IP 2
Permissions: (\fBw\fP)riteable, (\fBr\fP)ead-only, (\fBR\fP)ead-only activation
of non-read-only volume
.IP 3 3
.
.IP 3
Allocation policy: (\fBa\fP)nywhere, (\fBc\fP)ontiguous, (\fBi\fP)nherited,
c(\fBl\fP)ing, (\fBn\fP)ormal
This is capitalised if the volume is currently locked against allocation
changes, for example during
.BR pvmove (8).
.IP 4 3
.
.IP 4
fixed (\fBm\fP)inor
.IP 5 3
.
.IP 5
State: (\fBa\fP)ctive, (\fBh\fP)istorical, (\fBs\fP)uspended,
(\fBI\fP)nvalid snapshot, invalid (\fBS\fP)uspended snapshot,
snapshot (\fBm\fP)erge failed, suspended snapshot (\fBM\fP)erge failed,
@@ -32,9 +37,11 @@ mapped (\fBd\fP)evice present without tables,
mapped device present with (\fBi\fP)nactive table,
thin-pool (\fBc\fP)heck needed,
suspended thin-pool (\fBC\fP)heck needed, (\fBX\fP) unknown
.IP 6 3
.
.IP 6
device (\fBo\fP)pen, (\fBX\fP) unknown
.IP 7 3
.
.IP 7
Target type: (\fBC\fP)ache, (\fBm\fP)irror, (\fBr\fP)aid,
(\fBs\fP)napshot, (\fBt\fP)hin, (\fBu\fP)nknown, (\fBv\fP)irtual.
This groups logical volumes related to the same kernel target together. So,
@@ -45,17 +52,21 @@ all appear as (\fBr\fP).
Snapshots using the original device-mapper driver appear as (\fBs\fP);
whereas snapshots of thin volumes using the new thin provisioning
driver appear as (\fBt\fP).
.IP 8 3
.
.IP 8
Newly-allocated data blocks are overwritten with blocks
of (\fBz\fP)eroes before use.
.IP 9 3
.
.IP 9
Volume Health, where there are currently three groups of attributes identified:
.
.IP
Common ones for all Logical Volumes: (\fBp\fP)artial, (\fBX\fP) unknown.
.br
(\fBp\fP)artial signifies that one or more of the Physical Volumes this Logical
Volume uses is missing from the system. (\fBX\fP) unknown signifies the status
is unknown.
.
.IP
Related to RAID Logical Volumes: (\fBr\fP)efresh needed,
(\fBm\fP)ismatches exist, (\fBw\fP)ritemostly.
@@ -73,6 +84,7 @@ devices in a RAID 1 logical volume that have been marked write-mostly.
Re(\fBs\fP)haping signifies a RAID Logical Volume is either undergoing
a stripe addition/removal, a stripe size or RAID algorithm change.
(\fBR\fP)emove after reshape signifies freed striped raid images to be removed.
.
.IP
Related to Thin pool Logical Volumes: (\fBF\fP)ailed, out of (\fBD\fP)ata space,
(\fBM\fP)etadata read only.
@@ -83,14 +95,17 @@ The out of (\fBD\fP)ata space is set if thin pool has run out of data space.
(\fBM\fP)etadata read only signifies that thin pool encounters certain
types of failures but it's still possible to do reads at least,
but no metadata changes are allowed.
.
.IP
Related to Thin Logical Volumes: (\fBF\fP)ailed.
.br
(\fBF\fP)ailed is set when related thin pool enters Failed state and
no further I/O is permitted at all.
.
.IP
Related to writecache logical volumes: (\fBE\fP)rror.
.br
(\fBE\fP)rror is set dm-writecache reports an error.
.IP 10 3
.
.IP 10
s(\fBk\fP)ip activation: this volume is flagged to be skipped during activation.

View File

@@ -1,16 +1,226 @@
.TH LVS 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_aligned
.OPS aligned
..
.de O_all
.OPS a all
..
.de O_binary
.OPS binary
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_configreport
.OPA configreport
\%\fBlog\fP|\:\
\fBvg\fP|\:\
\fBlv\fP|\:\
\fBpv\fP|\:\
\fBpvseg\fP|\:\
\fBseg\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_foreign
.OPS foreign
..
.de O_headings
.OPA headings
\%\fBnone\fP|\:\
\fBabbrev\fP|\:\
\fBfull\fP|\:\
\fB0\fP|\:\
\fB1\fP|\:\
\fB2\fP
..
.de O_help
.OPS h help
..
.de O_history
.OPS H history
..
.de O_ignorelockingfailure
.OPS ignorelockingfailure
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_logonly
.OPS logonly
..
.de O_longhelp
.OPS longhelp
..
.de O_nameprefixes
.OPS nameprefixes
..
.de O_noheadings
.OPS noheadings
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_nosuffix
.OPS nosuffix
..
.de O_options
.OPA o options
\fIString\fP
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_readonly
.OPS readonly
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_rows
.OPS rows
..
.de O_segments
.OPS segments
..
.de O_select
.OPA S select
\fIString\fP
..
.de O_separator
.OPA separator
\fIString\fP
..
.de O_shared
.OPS shared
..
.de O_sort
.OPA O sort
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_unbuffered
.OPS unbuffered
..
.de O_units
.OPA units
\%[\fINumber\fP]\fBr\fP|\:\
\fBR\fP|\:\
\fBh\fP|\:\
\fBH\fP|\:\
\fBb\fP|\:\
\fBB\fP|\:\
\fBs\fP|\:\
\fBS\fP|\:\
\fBk\fP|\:\
\fBK\fP|\:\
\fBm\fP|\:\
\fBM\fP|\:\
\fBg\fP|\:\
\fBG\fP|\:\
\fBt\fP|\:\
\fBT\fP|\:\
\fBp\fP|\:\
\fBP\fP|\:\
\fBe\fP|\:\
\fBE\fP
..
.de O_unquoted
.OPS unquoted
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvs \(em Display information about logical volumes
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvs\fP
[ \fIoption_args\fP ]
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
[ \fIposition_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -18,216 +228,278 @@ lvs produces formatted output about LVs.
.
.SH USAGE
.
\fBlvs\fP
.br
.RS 4
.na
[ \fB-H\fP|\fB--history\fP ]
.br
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.br
[ \fB-a\fP|\fB--all\fP ]
.br
[ \fB-o\fP|\fB--options\fP \fIString\fP ]
.br
[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
.br
[ \fB--segments\fP ]
.br
[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
.br
[ \fB--foreign\fP ]
.br
[ \fB--ignorelockingfailure\fP ]
.br
[ \fB--logonly\fP ]
.br
[ \fB--readonly\fP ]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
.br
[ \fB--shared\fP ]
.br
[ \fB--units\fP \c
.nh
\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
.hy
.na
.B lvs
.RS
[
.O_history
]
.br
[ \fB--aligned\fP ]
[
.O_select
]
.br
[ \fB--binary\fP ]
[
.O_all
]
.br
[ \fB--headings\fP \fBnone\fP|\fBabbrev\fP|\fBfull\fP|\fB0\fP|\fB1\fP|\fB2\fP ]
[
.O_options
]
.br
[ \fB--nameprefixes\fP ]
[
.O_sort
]
.br
[ \fB--noheadings\fP ]
[
.O_segments
]
.br
[ \fB--nosuffix\fP ]
[
.O_configreport
]
.br
[ \fB--rows\fP ]
[
.O_foreign
]
.br
[ \fB--separator\fP \fIString\fP ]
[
.O_ignorelockingfailure
]
.br
[ \fB--unbuffered\fP ]
[
.O_logonly
]
.br
[ \fB--unquoted\fP ]
[
.O_readonly
]
.br
[
.O_reportformat
]
.br
[
.O_shared
]
.br
[
.O_units
]
.br
[
.O_aligned
]
.br
[
.O_binary
]
.br
[
.O_headings
]
.br
[
.O_nameprefixes
]
.br
[
.O_noheadings
]
.br
[
.O_nosuffix
]
.br
[
.O_rows
]
.br
[
.O_separator
]
.br
[
.O_unbuffered
]
.br
[
.O_unquoted
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIVG\fP|\fILV\fP|\fITag\fP ... ]
.br
[ \fIVG\fP|\fILV\fP|\fITag\fP\ .\|.\|.\& ]
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--aligned\fP
.br
.TP
.O_aligned
Use with --separator to align the output columns.
.
.HP
\fB-a\fP|\fB--all\fP
.br
.TP
.O_all
Show information about internal LVs.
These are components of normal LVs, such as mirrors,
which are not independently accessible, e.g. not mountable.
.
.HP
\fB--binary\fP
.br
.TP
.O_binary
Use binary values "0" or "1" instead of descriptive literal values
for columns that have exactly two valid values to report (not counting
the "unknown" value which denotes that the value could not be determined).
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
.br
.TP
.O_configreport
See \fBlvmreport\fP(7).
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB--foreign\fP
.br
.TP
.O_foreign
Report/display foreign VGs that would otherwise be skipped.
See \fBlvmsystemid\fP(7) for more information about foreign VGs.
.
.HP
\fB--headings\fP \fBnone\fP|\fBabbrev\fP|\fBfull\fP|\fB0\fP|\fB1\fP|\fB2\fP
.br
.TP
.O_headings
Type of headings to use in report output.
\fBnone\fP or \fB0\fP: No headings.
\fBabbrev\fP or \fB1\fP: Column name abbreviations.
\fBfull\fP or \fB2\fP: Full column names.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB-H\fP|\fB--history\fP
.br
.TP
.O_history
Include historical LVs in the output.
(This has no effect unless LVs were removed while
\fBlvm.conf\fP(5) \fBmetadata/record_lvs_history\fP was enabled.
.
.HP
\fB--ignorelockingfailure\fP
.br
.TP
.O_ignorelockingfailure
Allows a command to continue with read-only metadata
operations after locking failures.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -235,57 +507,48 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--logonly\fP
.br
.TP
.O_logonly
Suppress command report and display only log report.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nameprefixes\fP
.br
.TP
.O_nameprefixes
Add an "LVM2_" prefix plus the field name to the output. Useful
with --noheadings to produce a list of field=value pairs that can
be used to set environment variables (for example, in udev rules).
.
.HP
\fB--noheadings\fP
.br
.TP
.O_noheadings
Suppress the headings line that is normally the first line of output.
Useful if grepping the output.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--nosuffix\fP
.br
.TP
.O_nosuffix
Suppress the suffix on output sizes. Use with --units
(except h and H) if processing the output.
.
.HP
\fB-o\fP|\fB--options\fP \fIString\fP
.br
.TP
.O_options
Comma-separated, ordered list of fields to display in columns.
String arg syntax is:
[\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
@@ -305,27 +568,23 @@ Use field name \fBlv_all\fP to view all LV fields,
See the \fBlvm.conf\fP(5) report section for more config options.
See \fBlvmreport\fP(7) for more information about reporting.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--readonly\fP
.br
.TP
.O_readonly
Prevent the command from making changes, including activation and
metadata updates. (See --permission r for read only LVs.)
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -335,19 +594,16 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB--rows\fP
.br
.TP
.O_rows
Output columns as rows.
.
.HP
\fB--segments\fP
.br
.TP
.O_segments
Use default columns that emphasize segment information.
.
.HP
\fB-S\fP|\fB--select\fP \fIString\fP
.br
.TP
.O_select
Select objects for processing and reporting based on specified criteria.
The criteria syntax is described by \fB--select help\fP
and \fBlvmreport\fP(7).
@@ -359,46 +615,35 @@ showing 1 if the row matches the selection and 0 otherwise.
For non-reporting commands which process LVM entities, the selection is
used to choose items to process.
.
.HP
\fB--separator\fP \fIString\fP
.br
.TP
.O_separator
String to use to separate each column. Useful if grepping the output.
.
.HP
\fB--shared\fP
.br
.TP
.O_shared
Report/display shared VGs that would otherwise be skipped when
lvmlockd is not being used on the host.
See \fBlvmlockd\fP(8) for more information about shared VGs.
.
.HP
\fB-O\fP|\fB--sort\fP \fIString\fP
.br
.TP
.O_sort
Comma-separated ordered list of columns to sort by. Replaces the default
selection. Precede any column with \fB-\fP for a reverse sort on that column.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB--unbuffered\fP
.br
.TP
.O_unbuffered
Produce output immediately without sorting or aligning the columns properly.
.
.HP
.ad
\fB--units\fP \c
.nh
\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
.hy
.ad
.br
.TP
.O_units
All sizes are output in these units:
human-(r)eadable with '<' rounding indicator,
(h)uman-readable, (b)ytes, (s)ectors, (k)ilobytes, (m)egabytes,
@@ -406,26 +651,22 @@ human-(r)eadable with '<' rounding indicator,
Capitalise to use multiples of 1000 (S.I.) instead of 1024.
Custom units can be specified, e.g. --units 3M.
.
.HP
\fB--unquoted\fP
.br
.TP
.O_unquoted
When used with --nameprefixes, output values in the field=value
pairs are not quoted.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -435,17 +676,21 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I LV
Logical Volume name. See \fBlvm\fP(8) for valid names.
An LV positional arg generally includes the VG name and LV name, e.g. VG/LV.
.
.TP
.I Tag
Tag name. See \fBlvm\fP(8) for information about tag names and using tags
in place of a VG, LV or PV.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -475,5 +720,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,131 @@
.TH LVSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_all
.OPS a all
..
.de O_blockdevice
.OPS b blockdevice
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_help
.OPS h help
..
.de O_ignorelockingfailure
.OPS ignorelockingfailure
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_readonly
.OPS readonly
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
lvscan \(em List all logical volumes in all volume groups
.
.SH SYNOPSIS
.
.nh
.TP
\fBlvscan\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -20,138 +137,172 @@ comprehensive information about LVs.
.
.SH USAGE
.
\fBlvscan\fP
.br
.RS 4
.nh
.na
[ \fB-a\fP|\fB--all\fP ]
.B lvscan
.RS
[
.O_all
]
.br
[ \fB-b\fP|\fB--blockdevice\fP ]
[
.O_blockdevice
]
.br
[ \fB--ignorelockingfailure\fP ]
[
.O_ignorelockingfailure
]
.br
[ \fB--readonly\fP ]
[
.O_readonly
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_reportformat
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB-a\fP|\fB--all\fP
.br
.TP
.O_all
Show information about internal LVs.
These are components of normal LVs, such as mirrors,
which are not independently accessible, e.g. not mountable.
.
.HP
\fB-b\fP|\fB--blockdevice\fP
.br
.TP
.O_blockdevice
No longer used.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--ignorelockingfailure\fP
.br
.TP
.O_ignorelockingfailure
Allows a command to continue with read-only metadata
operations after locking failures.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -159,51 +310,43 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--readonly\fP
.br
.TP
.O_readonly
Prevent the command from making changes, including activation and
metadata updates. (See --permission r for read only LVs.)
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -213,29 +356,25 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -245,6 +384,7 @@ answer yes. Use with extreme caution.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -274,5 +414,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,153 @@
.TH PVCHANGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_addtag
.OPA addtag
\fITag\fP
..
.de O_all
.OPS a all
..
.de O_allocatable
.OPA x allocatable
\fBy\fP|\fBn\fP
..
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_deltag
.OPA deltag
\fITag\fP
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_force
.OPA f force
\&\.\|.\|.\&
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_metadataignore
.OPA metadataignore
\fBy\fP|\fBn\fP
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_select
.OPA S select
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_uuid
.OPS u uuid
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
pvchange \(em Change attributes of physical volume(s)
.
.SH SYNOPSIS
.
.nh
.TP
\fBpvchange\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -19,200 +158,225 @@ others are optional.
.
.SH USAGE
.
.nh
.na
Change properties of all PVs.
.br
.P
\fBpvchange\fP \fB-a\fP|\fB--all\fP
.RS 4
( \fB-x\fP|\fB--allocatable\fP \fBy\fP|\fBn\fP
.B pvchange
.O_all
.RS
(
.O_allocatable
.in +2n
.O_uuid
.br
\fB-u\fP|\fB--uuid\fP
.O_addtag
.br
\fB--addtag\fP \fITag\fP
.O_deltag
.br
\fB--deltag\fP \fITag\fP
.br
\fB--metadataignore\fP \fBy\fP|\fBn\fP )
.RE
.br
.RS 4
.na
.O_metadataignore
)
.in
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Change properties of specified PVs.
.br
.P
\fBpvchange\fP
.RS 4
( \fB-x\fP|\fB--allocatable\fP \fBy\fP|\fBn\fP
.B pvchange
.RS
(
.O_allocatable
.in +2n
.O_uuid
.br
\fB-u\fP|\fB--uuid\fP
.O_addtag
.br
\fB--addtag\fP \fITag\fP
.O_deltag
.br
\fB--deltag\fP \fITag\fP
.O_metadataignore
)
.in
\fIPV\fP|\fISelect\fP\ .\|.\|.\&
.br
\fB--metadataignore\fP \fBy\fP|\fBn\fP )
.RE
.RS 4
\fIPV\fP|\fISelect\fP ...
.RE
.br
.RS 4
.na
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
[
.O_select
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for command:
.
.RS 4
.na
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.RS
[
.O_autobackup
]
.br
[ \fB-f\fP|\fB--force\fP ]
[
.O_force
]
.br
[ \fB-u\fP|\fB--uuid\fP ]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
.ad
[
.O_reportformat
]
.RE
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--addtag\fP \fITag\fP
.br
.TP
.O_addtag
Adds a tag to a PV, VG or LV. This option can be repeated to add
multiple tags at once. See \fBlvm\fP(8) for information about tags.
.
.HP
\fB-a\fP|\fB--all\fP
.br
.TP
.O_all
Change all visible PVs.
.
.HP
\fB-x\fP|\fB--allocatable\fP \fBy\fP|\fBn\fP
.br
.TP
.O_allocatable
Enable or disable allocation of physical extents on this PV.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--deltag\fP \fITag\fP
.br
.TP
.O_deltag
Deletes a tag from a PV, VG or LV. This option can be repeated to delete
multiple tags at once. See \fBlvm\fP(8) for information about tags.
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--force\fP ...
.br
.TP
.O_force
Override various checks, confirmations and protections.
Use with extreme caution.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -220,53 +384,45 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--metadataignore\fP \fBy\fP|\fBn\fP
.br
.TP
.O_metadataignore
Specifies the metadataignore property of a PV.
If yes, metadata areas on the PV are ignored, and lvm will
not store metadata in the metadata areas of the PV.
If no, lvm will store metadata on the PV.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -276,9 +432,8 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-S\fP|\fB--select\fP \fIString\fP
.br
.TP
.O_select
Select objects for processing and reporting based on specified criteria.
The criteria syntax is described by \fB--select help\fP
and \fBlvmreport\fP(7).
@@ -290,34 +445,29 @@ showing 1 if the row matches the selection and 0 otherwise.
For non-reporting commands which process LVM entities, the selection is
used to choose items to process.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-u\fP|\fB--uuid\fP
.br
.TP
.O_uuid
Generate new random UUID for specified PVs.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -331,18 +481,23 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I Select
Select indicates that a required positional parameter can
be omitted if the \fB--select\fP option is used.
No arg appears in this position.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -372,5 +527,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,69 +1,203 @@
.TH PVCK 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_dump
.OPA dump
\%\fBheaders\fP|\:\
\fBmetadata\fP|\:\
\fBmetadata_all\fP|\:\
\fBmetadata_search\fP
..
.de O_file
.OPA f file
\fIString\fP
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_labelsector
.OPA labelsector
\fINumber\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_pvmetadatacopies
.OPA \fP[\fBpv\fP]\fBmetadatacopies
\fB0\fP|\fB1\fP|\fB2\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_repair
.OPS repair
..
.de O_repairtype
.OPA repairtype
\%\fBpv_header\fP|\:\
\fBmetadata\fP|\:\
\fBlabel_header\fP
..
.de O_settings
.OPA settings
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
pvck \(em Check metadata on physical volumes
.
.SH SYNOPSIS
.
.nh
.TP
\fBpvck\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.P
.na
\fB--commandprofile\fP \fIString\fP
.RS 5
.if t .ta 3nR +1uL \" PostScript/PDF
.PD 0
.O_commandprofile
.br
\fB--config\fP \fIString\fP
.O_config
.br
\fB-d\fP|\fB--debug\fP
.O_debug
.br
\fB--devices\fP \fIPV\fP
.O_devices
.br
\fB--devicesfile\fP \fIString\fP
.O_devicesfile
.br
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.O_driverloaded
.br
\fB--dump\fP \c
.nh
\%\fBheaders\fP|\:\fBmetadata\fP|\:\fBmetadata_all\fP|\:\fBmetadata_search\fP
.hy
.O_dump
.br
\fB-f\fP|\fB--file\fP \fIString\fP
.O_file
.br
\fB-h\fP|\fB--help\fP
.O_help
.br
\fB--journal\fP \fIString\fP
.O_journal
.br
\fB--labelsector\fP \fINumber\fP
.O_labelsector
.br
\fB--lockopt\fP \fIString\fP
.O_lockopt
.br
\fB--longhelp\fP
.O_longhelp
.br
\fB--nohints\fP
.O_nohints
.br
\fB--nolocking\fP
.O_nolocking
.br
\fB--profile\fP \fIString\fP
.O_profile
.br
\fB--\fP[\fBpv\fP]\fBmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
.O_pvmetadatacopies
.br
\fB-q\fP|\fB--quiet\fP
.O_quiet
.br
\fB--repair\fP
.O_repair
.br
\fB--repairtype\fP \fBpv_header\fP|\fBmetadata\fP|\fBlabel_header\fP
.O_repairtype
.br
\fB--settings\fP \fIString\fP
.O_settings
.br
\fB-t\fP|\fB--test\fP
.O_test
.br
\fB-v\fP|\fB--verbose\fP
.O_verbose
.br
\fB--version\fP
.O_version
.br
\fB-y\fP|\fB--yes\fP
.O_yes
.PD
.if t .ta
.RE
.ad
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -207,178 +341,207 @@ extent (data), which follows the first metadata area.
.
.SH USAGE
.
Check for metadata on a device
.br
.P
\fBpvck\fP \fIPV\fP ...
.br
.RS 4
.na
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Check and print LVM headers and metadata on a device
.br
.P
\fBpvck\fP \fB--dump\fP \c
.nh
\%\fBheaders\fP|\:\fBmetadata\fP|\:\fBmetadata_all\fP|\:\fBmetadata_search\fP
.hy
.na
Check for metadata on a device
.P
.B pvck
\fIPV\fP\ .\|.\|.\&
.RS
[ COMMON_OPTIONS ]
.RE
.
.P
\(em
.P
.
Check and print LVM headers and metadata on a device
.P
.B pvck
.O_dump
\fIPV\fP
.RS
[
.O_file
]
.br
.RS 4
.na
[ \fB-f\fP|\fB--file\fP \fIString\fP ]
[
.O_settings
]
.br
[ \fB--settings\fP \fIString\fP ]
.br
[ \fB--\fP[\fBpv\fP]\fBmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
[
.O_pvmetadatacopies
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Repair LVM headers or metadata on a device
.br
.P
\fBpvck\fP \fB--repairtype\fP \fBpv_header\fP|\fBmetadata\fP|\fBlabel_header\fP \fIPV\fP
.B pvck
.O_repairtype
\fIPV\fP
.RS
[
.O_file
]
.br
.RS 4
.na
[ \fB-f\fP|\fB--file\fP \fIString\fP ]
.br
[ \fB--settings\fP \fIString\fP ]
[
.O_settings
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Repair LVM headers and metadata on a device
.br
.P
\fBpvck\fP \fB--repair\fP \fB-f\fP|\fB--file\fP \fIString\fP \fIPV\fP
.br
.RS 4
.na
[ \fB--settings\fP \fIString\fP ]
.B pvck
.O_repair
.O_file
\fIPV\fP
.RS
[
.O_settings
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for command:
.
.RS 4
.na
[ \fB--labelsector\fP \fINumber\fP ]
.ad
.RS
[
.O_labelsector
]
.RE
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
.ad
\fB--dump\fP \c
.nh
\%\fBheaders\fP|\:\fBmetadata\fP|\:\fBmetadata_all\fP|\:\fBmetadata_search\fP
.hy
.ad
.br
.TP
.O_dump
Dump headers and metadata from a PV for debugging and repair.
Option values include: \fBheaders\fP to print and check LVM headers,
\fBmetadata\fP to print or save the current text metadata,
@@ -387,19 +550,16 @@ Option values include: \fBheaders\fP to print and check LVM headers,
searching standard locations in case of damaged headers,
\fBmetadata_area\fP to save an entire text metadata area to a file.
.
.HP
\fB-f\fP|\fB--file\fP \fIString\fP
.br
.TP
.O_file
Metadata file to read or write.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -407,47 +567,40 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--labelsector\fP \fINumber\fP
.br
.TP
.O_labelsector
By default the PV is labelled with an LVM2 identifier in its second
sector (sector 1). This lets you use a different sector near the
start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS
in the source). Use with care.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB--\fP[\fBpv\fP]\fBmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
.br
.TP
.O_pvmetadatacopies
The number of metadata areas to set aside on a PV for storing VG metadata.
When 2, one copy of the VG metadata is stored at the front of the PV
and a second copy is stored at the end.
@@ -456,52 +609,44 @@ When 0, no copies of the VG metadata are stored on the given PV.
This may be useful in VGs containing many PVs (this places limitations
on the ability to use vgsplit later.)
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--repair\fP
.br
.TP
.O_repair
Repair headers and metadata on a PV.
.
.HP
\fB--repairtype\fP \fBpv_header\fP|\fBmetadata\fP|\fBlabel_header\fP
.br
.TP
.O_repairtype
Repair headers and metadata on a PV. See command description.
.
.HP
\fB--settings\fP \fIString\fP
.br
.TP
.O_settings
Specifies command specific settings in "Key = Value" form.
Combine multiple settings in quotes, or repeat the settings
option for each.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -515,13 +660,17 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -551,5 +700,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,174 @@
.TH PVCREATE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_bootloaderareasize
.OPA bootloaderareasize
\fISize\fP[m|\:UNIT]
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_dataalignment
.OPA dataalignment
\fISize\fP[k|\:UNIT]
..
.de O_dataalignmentoffset
.OPA dataalignmentoffset
\fISize\fP[k|\:UNIT]
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_force
.OPA f force
\&\.\|.\|.\&
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_labelsector
.OPA labelsector
\fINumber\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_metadataignore
.OPA metadataignore
\fBy\fP|\fBn\fP
..
.de O_metadatasize
.OPA metadatasize
\fISize\fP[m|\:UNIT]
..
.de O_metadatatype
.OPA M metadatatype
\fBlvm2\fP
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_norestorefile
.OPS norestorefile
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_pvmetadatacopies
.OPA \fP[\fBpv\fP]\fBmetadatacopies
\fB0\fP|\fB1\fP|\fB2\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_restorefile
.OPA restorefile
\fIString\fP
..
.de O_setphysicalvolumesize
.OPA setphysicalvolumesize
\fISize\fP[m|\:UNIT]
..
.de O_test
.OPS t test
..
.de O_uuid
.OPA u uuid
\fIString\fP
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.de O_zero
.OPA Z zero
\fBy\fP|\fBn\fP
..
.
.SH NAME
.
pvcreate \(em Initialize physical volume(s) for use by LVM
.
.SH SYNOPSIS
.
.nh
.TP
\fBpvcreate\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -94,92 +254,157 @@ pe_start value.
.
.SH USAGE
.
\fBpvcreate\fP \fIPV\fP ...
.br
.RS 4
.nh
.na
[ \fB-f\fP|\fB--force\fP ]
.B pvcreate
\fIPV\fP\ .\|.\|.\&
.RS
[
.O_force
]
.br
[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
[
.O_metadatatype
]
.br
[ \fB-u\fP|\fB--uuid\fP \fIString\fP ]
[
.O_uuid
]
.br
[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
[
.O_zero
]
.br
[ \fB--dataalignment\fP \fISize\fP[k|UNIT] ]
[
.O_dataalignment
]
.br
[ \fB--dataalignmentoffset\fP \fISize\fP[k|UNIT] ]
[
.O_dataalignmentoffset
]
.br
[ \fB--bootloaderareasize\fP \fISize\fP[m|UNIT] ]
[
.O_bootloaderareasize
]
.br
[ \fB--labelsector\fP \fINumber\fP ]
[
.O_labelsector
]
.br
[ \fB--\fP[\fBpv\fP]\fBmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
[
.O_pvmetadatacopies
]
.br
[ \fB--metadatasize\fP \fISize\fP[m|UNIT] ]
[
.O_metadatasize
]
.br
[ \fB--metadataignore\fP \fBy\fP|\fBn\fP ]
[
.O_metadataignore
]
.br
[ \fB--norestorefile\fP ]
[
.O_norestorefile
]
.br
[ \fB--setphysicalvolumesize\fP \fISize\fP[m|UNIT] ]
[
.O_setphysicalvolumesize
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_reportformat
]
.br
[ \fB--restorefile\fP \fIString\fP ]
[
.O_restorefile
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--bootloaderareasize\fP \fISize\fP[m|UNIT]
.br
.TP
.O_bootloaderareasize
Reserve space for the bootloader between the LVM metadata area and the first PE.
The bootloader area is reserved for bootloaders to embed their own data or
metadata; LVM will not use it.
@@ -192,77 +417,66 @@ due to the alignment, but it's never less than the requested size.
To see the bootloader area start and size of
an existing PV use pvs -o +pv_ba_start,pv_ba_size.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB--dataalignment\fP \fISize\fP[k|UNIT]
.br
.TP
.O_dataalignment
Align the start of a PV data area with a multiple of this number.
To see the location of the first Physical Extent (PE) of an existing PV,
use pvs -o +pe_start. In addition, it may be shifted by an alignment offset,
see --dataalignmentoffset.
Also specify an appropriate PE size when creating a VG.
.
.HP
\fB--dataalignmentoffset\fP \fISize\fP[k|UNIT]
.br
.TP
.O_dataalignmentoffset
Shift the start of the PV data area by this additional offset.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--force\fP ...
.br
.TP
.O_force
Override various checks, confirmations and protections.
Use with extreme caution.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -270,74 +484,63 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--labelsector\fP \fINumber\fP
.br
.TP
.O_labelsector
By default the PV is labelled with an LVM2 identifier in its second
sector (sector 1). This lets you use a different sector near the
start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS
in the source). Use with care.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--metadataignore\fP \fBy\fP|\fBn\fP
.br
.TP
.O_metadataignore
Specifies the metadataignore property of a PV.
If yes, metadata areas on the PV are ignored, and lvm will
not store metadata in the metadata areas of the PV.
If no, lvm will store metadata on the PV.
.
.HP
\fB--metadatasize\fP \fISize\fP[m|UNIT]
.br
.TP
.O_metadatasize
The approximate amount of space used for each VG metadata area.
The size may be rounded.
.
.HP
\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
.br
.TP
.O_metadatatype
Specifies the type of on-disk metadata to use.
\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
\fBlvm1\fP (or just \fB1\fP) is no longer used.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--norestorefile\fP
.br
.TP
.O_norestorefile
In conjunction with --uuid, this allows a uuid to be specified
without also requiring that a backup of the metadata be provided.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB--\fP[\fBpv\fP]\fBmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
.br
.TP
.O_pvmetadatacopies
The number of metadata areas to set aside on a PV for storing VG metadata.
When 2, one copy of the VG metadata is stored at the front of the PV
and a second copy is stored at the end.
@@ -346,15 +549,13 @@ When 0, no copies of the VG metadata are stored on the given PV.
This may be useful in VGs containing many PVs (this places limitations
on the ability to use vgsplit later.)
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -364,9 +565,8 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB--restorefile\fP \fIString\fP
.br
.TP
.O_restorefile
In conjunction with --uuid, this reads the file (produced by
vgcfgbackup), extracts the location and size of the data on the PV,
and ensures that the metadata produced by the program is consistent
@@ -375,24 +575,21 @@ the same place and not be overwritten by new metadata. This provides
a mechanism to upgrade the metadata format or to add/remove metadata
areas. Use with care.
.
.HP
\fB--setphysicalvolumesize\fP \fISize\fP[m|UNIT]
.br
.TP
.O_setphysicalvolumesize
Overrides the automatically detected size of the PV.
Use with care, or prior to reducing the physical size of the device.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-u\fP|\fB--uuid\fP \fIString\fP
.br
.TP
.O_uuid
Specify a UUID for the device.
Without this option, a random UUID is generated.
This option is needed before restoring a backup of LVM metadata
@@ -402,27 +599,23 @@ All PVs must have unique UUIDs, and LVM will prevent certain operations
if multiple devices are seen with the same UUID.
See \fBvgimportclone\fP(8) for more information.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.
.HP
\fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
.br
.TP
.O_zero
Controls if the first 4 sectors (2048 bytes) of the device are wiped.
The default is to wipe these sectors unless either or both of
--restorefile or --uuid are specified.
@@ -436,13 +629,17 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -472,5 +669,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,154 @@
.TH PVMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_abort
.OPS abort
..
.de O_alloc
.OPA alloc
\%\fBcontiguous\fP|\:\
\fBcling\fP|\:\
\fBcling_by_tags\fP|\:\
\fBnormal\fP|\:\
\fBanywhere\fP|\:\
\fBinherit\fP
..
.de O_atomic
.OPS atomic
..
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_background
.OPS b background
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_help
.OPS h help
..
.de O_interval
.OPA i interval
\fINumber\fP
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_name
.OPA n name
\fIString\fP
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_noudevsync
.OPS noudevsync
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
pvmove \(em Move extents from one physical volume to another
.
.SH SYNOPSIS
.
.nh
.TP
\fBpvmove\fP \fIposition_args\fP
[ \fIoption_args\fP ]
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
[ \fIposition_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -32,120 +170,158 @@ in the process of being changed, so some data might not get moved.
.
.SH USAGE
.
Move PV extents.
.br
.P
\fBpvmove\fP \fIPV\fP
.br
.RS 4
.na
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.br
[ \fB-n\fP|\fB--name\fP \fILV\fP ]
.br
[ \fB--alloc\fP \c
.nh
\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
.hy
.na
Move PV extents.
.P
.B pvmove
\fIPV\fP
.RS
[
.O_autobackup
]
.br
[ \fB--atomic\fP ]
[
.O_name
]
.br
[ \fB--noudevsync\fP ]
[
.O_alloc
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_atomic
]
.br
[
.O_noudevsync
]
.br
[
.O_reportformat
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIPV\fP ... ]
.br
[ \fIPV\fP\ .\|.\|.\& ]
.RE
.
.P
\(em
.P
.
Continue or abort existing pvmove operations.
.br
.P
\fBpvmove\fP
.br
.RS 4
.na
.B pvmove
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for command:
.
.RS 4
.na
[ \fB-b\fP|\fB--background\fP ]
.RS
[
.O_background
]
.br
[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
[
.O_interval
]
.br
[ \fB--abort\fP ]
.ad
[
.O_abort
]
.RE
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--abort\fP
.br
.TP
.O_abort
Abort any pvmove operations in progress. If a pvmove was started
with the --atomic option, then all LVs will remain on the source PV.
Otherwise, segments that have been moved will remain on the
destination PV, while unmoved segments will remain on the source PV.
.
.HP
.ad
\fB--alloc\fP \c
.nh
\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
.hy
.ad
.br
.TP
.O_alloc
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
which can be changed with vgchange/lvchange, or overridden on the
@@ -163,82 +339,70 @@ Optional positional PV args on the command line can also be used to limit
which PVs the command will use for allocation.
See \fBlvm\fP(8) for more information about allocation.
.
.HP
\fB--atomic\fP
.br
.TP
.O_atomic
Makes a pvmove operation atomic, ensuring that all affected LVs are
moved to the destination PV, or none are if the operation is aborted.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB-b\fP|\fB--background\fP
.br
.TP
.O_background
If the operation requires polling, this option causes the command to
return before the operation is complete, and polling is done in the
background.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB-i\fP|\fB--interval\fP \fINumber\fP
.br
.TP
.O_interval
Report progress at regular intervals.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -246,58 +410,49 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB-n\fP|\fB--name\fP \fIString\fP
.br
.TP
.O_name
Move only the extents belonging to the named LV.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--noudevsync\fP
.br
.TP
.O_noudevsync
Disables udev synchronization. The process will not wait for notification
from udev. It will continue irrespective of any possible udev processing
in the background. Only use this if udev is not running or has rules that
ignore the devices LVM creates.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -307,29 +462,25 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -343,13 +494,17 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -379,5 +534,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,123 @@
.TH PVREMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_force
.OPA f force
\&\.\|.\|.\&
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
pvremove \(em Remove LVM label(s) from physical volume(s)
.
.SH SYNOPSIS
.
.nh
.TP
\fBpvremove\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -22,120 +131,151 @@ an existing VG. Normally, \fBvgreduce\fP(8) should be used instead.
.
.SH USAGE
.
\fBpvremove\fP \fIPV\fP ...
.br
.RS 4
.nh
.na
[ \fB-f\fP|\fB--force\fP ]
.B pvremove
\fIPV\fP\ .\|.\|.\&
.RS
[
.O_force
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_reportformat
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--force\fP ...
.br
.TP
.O_force
Override various checks, confirmations and protections.
Use with extreme caution.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -143,45 +283,38 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -191,29 +324,25 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -227,13 +356,17 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -263,5 +396,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,127 @@
.TH PVRESIZE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_setphysicalvolumesize
.OPA setphysicalvolumesize
\fISize\fP[m|\:UNIT]
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
pvresize \(em Resize physical volume(s)
.
.SH SYNOPSIS
.
.nh
.TP
\fBpvresize\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -17,123 +130,156 @@ LVs allocated on it.
.
.SH USAGE
.
\fBpvresize\fP \fIPV\fP ...
.br
.RS 4
.nh
.na
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.B pvresize
\fIPV\fP\ .\|.\|.\&
.RS
[
.O_autobackup
]
.br
[ \fB--setphysicalvolumesize\fP \fISize\fP[m|UNIT] ]
[
.O_setphysicalvolumesize
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_reportformat
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -141,45 +287,38 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -189,35 +328,30 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB--setphysicalvolumesize\fP \fISize\fP[m|UNIT]
.br
.TP
.O_setphysicalvolumesize
Overrides the automatically detected size of the PV.
Use with care, or prior to reducing the physical size of the device.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -231,13 +365,17 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -267,5 +405,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -2,9 +2,12 @@
.SH NOTES
.
The pv_attr bits are:
.
.IP 1 3
(\fBd\fP)uplicate, (\fBa\fP)llocatable, (\fBu\fP)sed
.IP 2 3
.
.IP 2
e(\fBx\fP)ported
.IP 3 3
.
.IP 3
(\fBm\fP)issing

View File

@@ -1,16 +1,226 @@
.TH PVS 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_aligned
.OPS aligned
..
.de O_all
.OPS a all
..
.de O_allpvs
.OPS A allpvs
..
.de O_binary
.OPS binary
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_configreport
.OPA configreport
\%\fBlog\fP|\:\
\fBvg\fP|\:\
\fBlv\fP|\:\
\fBpv\fP|\:\
\fBpvseg\fP|\:\
\fBseg\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_foreign
.OPS foreign
..
.de O_headings
.OPA headings
\%\fBnone\fP|\:\
\fBabbrev\fP|\:\
\fBfull\fP|\:\
\fB0\fP|\:\
\fB1\fP|\:\
\fB2\fP
..
.de O_help
.OPS h help
..
.de O_ignorelockingfailure
.OPS ignorelockingfailure
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_logonly
.OPS logonly
..
.de O_longhelp
.OPS longhelp
..
.de O_nameprefixes
.OPS nameprefixes
..
.de O_noheadings
.OPS noheadings
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_nosuffix
.OPS nosuffix
..
.de O_options
.OPA o options
\fIString\fP
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_readonly
.OPS readonly
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_rows
.OPS rows
..
.de O_segments
.OPS segments
..
.de O_select
.OPA S select
\fIString\fP
..
.de O_separator
.OPA separator
\fIString\fP
..
.de O_shared
.OPS shared
..
.de O_sort
.OPA O sort
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_unbuffered
.OPS unbuffered
..
.de O_units
.OPA units
\%[\fINumber\fP]\fBr\fP|\:\
\fBR\fP|\:\
\fBh\fP|\:\
\fBH\fP|\:\
\fBb\fP|\:\
\fBB\fP|\:\
\fBs\fP|\:\
\fBS\fP|\:\
\fBk\fP|\:\
\fBK\fP|\:\
\fBm\fP|\:\
\fBM\fP|\:\
\fBg\fP|\:\
\fBG\fP|\:\
\fBt\fP|\:\
\fBT\fP|\:\
\fBp\fP|\:\
\fBP\fP|\:\
\fBe\fP|\:\
\fBE\fP
..
.de O_unquoted
.OPS unquoted
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
pvs \(em Display information about physical volumes
.
.SH SYNOPSIS
.
.nh
.TP
\fBpvs\fP
[ \fIoption_args\fP ]
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
[ \fIposition_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -18,214 +228,276 @@ pvs produces formatted output about PVs.
.
.SH USAGE
.
\fBpvs\fP
.br
.RS 4
.na
[ \fB-A\fP|\fB--allpvs\fP ]
.br
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.br
[ \fB-a\fP|\fB--all\fP ]
.br
[ \fB-o\fP|\fB--options\fP \fIString\fP ]
.br
[ \fB-O\fP|\fB--sort\fP \fIString\fP ]
.br
[ \fB--segments\fP ]
.br
[ \fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP ]
.br
[ \fB--foreign\fP ]
.br
[ \fB--ignorelockingfailure\fP ]
.br
[ \fB--logonly\fP ]
.br
[ \fB--readonly\fP ]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
.br
[ \fB--shared\fP ]
.br
[ \fB--units\fP \c
.nh
\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
.hy
.na
.B pvs
.RS
[
.O_allpvs
]
.br
[ \fB--aligned\fP ]
[
.O_select
]
.br
[ \fB--binary\fP ]
[
.O_all
]
.br
[ \fB--headings\fP \fBnone\fP|\fBabbrev\fP|\fBfull\fP|\fB0\fP|\fB1\fP|\fB2\fP ]
[
.O_options
]
.br
[ \fB--nameprefixes\fP ]
[
.O_sort
]
.br
[ \fB--noheadings\fP ]
[
.O_segments
]
.br
[ \fB--nosuffix\fP ]
[
.O_configreport
]
.br
[ \fB--rows\fP ]
[
.O_foreign
]
.br
[ \fB--separator\fP \fIString\fP ]
[
.O_ignorelockingfailure
]
.br
[ \fB--unbuffered\fP ]
[
.O_logonly
]
.br
[ \fB--unquoted\fP ]
[
.O_readonly
]
.br
[
.O_reportformat
]
.br
[
.O_shared
]
.br
[
.O_units
]
.br
[
.O_aligned
]
.br
[
.O_binary
]
.br
[
.O_headings
]
.br
[
.O_nameprefixes
]
.br
[
.O_noheadings
]
.br
[
.O_nosuffix
]
.br
[
.O_rows
]
.br
[
.O_separator
]
.br
[
.O_unbuffered
]
.br
[
.O_unquoted
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIPV\fP|\fITag\fP ... ]
.br
[ \fIPV\fP|\fITag\fP\ .\|.\|.\& ]
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--aligned\fP
.br
.TP
.O_aligned
Use with --separator to align the output columns.
.
.HP
\fB-a\fP|\fB--all\fP
.br
.TP
.O_all
Show information about devices that have not been initialized
by LVM, i.e. they are not PVs.
.
.HP
\fB-A\fP|\fB--allpvs\fP
.br
.TP
.O_allpvs
Show information about PVs outside the devices file.
Combine with -a|--all to include devices that are not PVs.
.
.HP
\fB--binary\fP
.br
.TP
.O_binary
Use binary values "0" or "1" instead of descriptive literal values
for columns that have exactly two valid values to report (not counting
the "unknown" value which denotes that the value could not be determined).
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB--configreport\fP \fBlog\fP|\fBvg\fP|\fBlv\fP|\fBpv\fP|\fBpvseg\fP|\fBseg\fP
.br
.TP
.O_configreport
See \fBlvmreport\fP(7).
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB--foreign\fP
.br
.TP
.O_foreign
Report/display foreign VGs that would otherwise be skipped.
See \fBlvmsystemid\fP(7) for more information about foreign VGs.
.
.HP
\fB--headings\fP \fBnone\fP|\fBabbrev\fP|\fBfull\fP|\fB0\fP|\fB1\fP|\fB2\fP
.br
.TP
.O_headings
Type of headings to use in report output.
\fBnone\fP or \fB0\fP: No headings.
\fBabbrev\fP or \fB1\fP: Column name abbreviations.
\fBfull\fP or \fB2\fP: Full column names.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--ignorelockingfailure\fP
.br
.TP
.O_ignorelockingfailure
Allows a command to continue with read-only metadata
operations after locking failures.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -233,57 +505,48 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--logonly\fP
.br
.TP
.O_logonly
Suppress command report and display only log report.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nameprefixes\fP
.br
.TP
.O_nameprefixes
Add an "LVM2_" prefix plus the field name to the output. Useful
with --noheadings to produce a list of field=value pairs that can
be used to set environment variables (for example, in udev rules).
.
.HP
\fB--noheadings\fP
.br
.TP
.O_noheadings
Suppress the headings line that is normally the first line of output.
Useful if grepping the output.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--nosuffix\fP
.br
.TP
.O_nosuffix
Suppress the suffix on output sizes. Use with --units
(except h and H) if processing the output.
.
.HP
\fB-o\fP|\fB--options\fP \fIString\fP
.br
.TP
.O_options
Comma-separated, ordered list of fields to display in columns.
String arg syntax is:
[\fB+\fP|\fB-\fP|\fB#\fP]\fIField1\fP[\fB,\fP\fIField2\fP ...]
@@ -303,27 +566,23 @@ Use field name \fBlv_all\fP to view all LV fields,
See the \fBlvm.conf\fP(5) report section for more config options.
See \fBlvmreport\fP(7) for more information about reporting.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--readonly\fP
.br
.TP
.O_readonly
Prevent the command from making changes, including activation and
metadata updates. (See --permission r for read only LVs.)
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -333,21 +592,18 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB--rows\fP
.br
.TP
.O_rows
Output columns as rows.
.
.HP
\fB--segments\fP
.br
.TP
.O_segments
Produces one line of output for each contiguous allocation of space on each
PV, showing the start (pvseg_start) and length (pvseg_size) in units of
physical extents.
.
.HP
\fB-S\fP|\fB--select\fP \fIString\fP
.br
.TP
.O_select
Select objects for processing and reporting based on specified criteria.
The criteria syntax is described by \fB--select help\fP
and \fBlvmreport\fP(7).
@@ -359,46 +615,35 @@ showing 1 if the row matches the selection and 0 otherwise.
For non-reporting commands which process LVM entities, the selection is
used to choose items to process.
.
.HP
\fB--separator\fP \fIString\fP
.br
.TP
.O_separator
String to use to separate each column. Useful if grepping the output.
.
.HP
\fB--shared\fP
.br
.TP
.O_shared
Report/display shared VGs that would otherwise be skipped when
lvmlockd is not being used on the host.
See \fBlvmlockd\fP(8) for more information about shared VGs.
.
.HP
\fB-O\fP|\fB--sort\fP \fIString\fP
.br
.TP
.O_sort
Comma-separated ordered list of columns to sort by. Replaces the default
selection. Precede any column with \fB-\fP for a reverse sort on that column.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB--unbuffered\fP
.br
.TP
.O_unbuffered
Produce output immediately without sorting or aligning the columns properly.
.
.HP
.ad
\fB--units\fP \c
.nh
\%[\fINumber\fP]\fBr\fP|\:\fBR\fP|\:\fBh\fP|\:\fBH\fP|\:\fBb\fP|\:\fBB\fP|\:\fBs\fP|\:\fBS\fP|\:\fBk\fP|\:\fBK\fP|\:\fBm\fP|\:\fBM\fP|\:\fBg\fP|\:\fBG\fP|\:\fBt\fP|\:\fBT\fP|\:\fBp\fP|\:\fBP\fP|\:\fBe\fP|\:\fBE\fP
.hy
.ad
.br
.TP
.O_units
All sizes are output in these units:
human-(r)eadable with '<' rounding indicator,
(h)uman-readable, (b)ytes, (s)ectors, (k)ilobytes, (m)egabytes,
@@ -406,26 +651,22 @@ human-(r)eadable with '<' rounding indicator,
Capitalise to use multiples of 1000 (S.I.) instead of 1024.
Custom units can be specified, e.g. --units 3M.
.
.HP
\fB--unquoted\fP
.br
.TP
.O_unquoted
When used with --nameprefixes, output values in the field=value
pairs are not quoted.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -439,17 +680,22 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I Tag
Tag name. See \fBlvm\fP(8) for information about tag names and using tags
in place of a VG, LV or PV.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -479,5 +725,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,90 +1,256 @@
.TH PVSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_activate
.OPA a activate
\fBy\fP|\fBn\fP|\fBay\fP
..
.de O_allpvs
.OPS A allpvs
..
.de O_autoactivation
.OPA autoactivation
\fIString\fP
..
.de O_cache
.OPS cache
..
.de O_checkcomplete
.OPS checkcomplete
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_exported
.OPS e exported
..
.de O_help
.OPS h help
..
.de O_ignorelockingfailure
.OPS ignorelockingfailure
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_listlvs
.OPS listlvs
..
.de O_listvg
.OPS listvg
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_major
.OPA j major
\fINumber\fP
..
.de O_minor
.OPA minor
\fINumber\fP
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_noudevsync
.OPS noudevsync
..
.de O_novolumegroup
.OPS n novolumegroup
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_short
.OPS s short
..
.de O_test
.OPS t test
..
.de O_udevoutput
.OPS udevoutput
..
.de O_uuid
.OPS u uuid
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_vgonline
.OPS vgonline
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
pvscan \(em List all physical volumes
.
.SH SYNOPSIS
.
.nh
.TP
\fBpvscan\fP \fIoption_args\fP \fIposition_args\fP
[ \fIoption_args\fP ]
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
[ \fIposition_args\fP ]
.P
.na
\fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
.RS 5
.if t .ta 3nR +1uL \" PostScript/PDF
.PD 0
.O_activate
.br
\fB-A\fP|\fB--allpvs\fP
.O_allpvs
.br
\fB--autoactivation\fP \fIString\fP
.O_autoactivation
.br
\fB--cache\fP
.O_cache
.br
\fB--checkcomplete\fP
.O_checkcomplete
.br
\fB--commandprofile\fP \fIString\fP
.O_commandprofile
.br
\fB--config\fP \fIString\fP
.O_config
.br
\fB-d\fP|\fB--debug\fP
.O_debug
.br
\fB--devices\fP \fIPV\fP
.O_devices
.br
\fB--devicesfile\fP \fIString\fP
.O_devicesfile
.br
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.O_driverloaded
.br
\fB-e\fP|\fB--exported\fP
.O_exported
.br
\fB-h\fP|\fB--help\fP
.O_help
.br
\fB--ignorelockingfailure\fP
.O_ignorelockingfailure
.br
\fB--journal\fP \fIString\fP
.O_journal
.br
\fB--listlvs\fP
.O_listlvs
.br
\fB--listvg\fP
.O_listvg
.br
\fB--lockopt\fP \fIString\fP
.O_lockopt
.br
\fB--longhelp\fP
.O_longhelp
.br
\fB-j\fP|\fB--major\fP \fINumber\fP
.O_major
.br
\fB--minor\fP \fINumber\fP
.O_minor
.br
\fB--nohints\fP
.O_nohints
.br
\fB--nolocking\fP
.O_nolocking
.br
\fB--noudevsync\fP
.O_noudevsync
.br
\fB-n\fP|\fB--novolumegroup\fP
.O_novolumegroup
.br
\fB--profile\fP \fIString\fP
.O_profile
.br
\fB-q\fP|\fB--quiet\fP
.O_quiet
.br
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.O_reportformat
.br
\fB-s\fP|\fB--short\fP
.O_short
.br
\fB-t\fP|\fB--test\fP
.O_test
.br
\fB--udevoutput\fP
.O_udevoutput
.br
\fB-u\fP|\fB--uuid\fP
.O_uuid
.br
\fB-v\fP|\fB--verbose\fP
.O_verbose
.br
\fB--version\fP
.O_version
.br
\fB--vgonline\fP
.O_vgonline
.br
\fB-y\fP|\fB--yes\fP
.O_yes
.PD
.if t .ta
.RE
.ad
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -142,296 +308,364 @@ for more information about how pvscan is used for autoactivation.
.
.SH USAGE
.
.nh
.na
Display PV information.
.br
.P
\fBpvscan\fP
.B pvscan
.RS
[
.O_exported
]
.br
.RS 4
.na
[ \fB-e\fP|\fB--exported\fP ]
[
.O_novolumegroup
]
.br
[ \fB-n\fP|\fB--novolumegroup\fP ]
[
.O_short
]
.br
[ \fB-s\fP|\fB--short\fP ]
[
.O_uuid
]
.br
[ \fB-u\fP|\fB--uuid\fP ]
[
.O_allpvs
]
.br
[ \fB-A\fP|\fB--allpvs\fP ]
[
.O_ignorelockingfailure
]
.br
[ \fB--ignorelockingfailure\fP ]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_reportformat
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Record that a PV is online or offline.
.br
.P
\fBpvscan\fP \fB--cache\fP
.B pvscan
.O_cache
.RS
[
.O_major
]
.br
.RS 4
.na
[ \fB-j\fP|\fB--major\fP \fINumber\fP ]
[
.O_ignorelockingfailure
]
.br
[ \fB--ignorelockingfailure\fP ]
[
.O_reportformat
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_minor
]
.br
[ \fB--minor\fP \fINumber\fP ]
.br
[ \fB--noudevsync\fP ]
[
.O_noudevsync
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIString\fP|\fIPV\fP ... ]
.br
[ \fIString\fP|\fIPV\fP\ .\|.\|.\& ]
.RE
.
.P
\(em
.P
.
Record that a PV is online and autoactivate the VG if complete.
.br
.P
\fBpvscan\fP \fB--cache\fP \fB-a\fP|\fB--activate\fP \fBay\fP
.B pvscan
.O_cache
.O_activate
.RS
[
.O_major
]
.br
.RS 4
.na
[ \fB-j\fP|\fB--major\fP \fINumber\fP ]
[
.O_ignorelockingfailure
]
.br
[ \fB--ignorelockingfailure\fP ]
[
.O_reportformat
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_minor
]
.br
[ \fB--minor\fP \fINumber\fP ]
[
.O_noudevsync
]
.br
[ \fB--noudevsync\fP ]
.br
[ \fB--autoactivation\fP \fIString\fP ]
[
.O_autoactivation
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIString\fP|\fIPV\fP ... ]
.br
[ \fIString\fP|\fIPV\fP\ .\|.\|.\& ]
.RE
.
.P
\(em
.P
.
Record that a PV is online and list the VG using the PV.
.br
.P
\fBpvscan\fP \fB--cache\fP \fB--listvg\fP \fIPV\fP
.B pvscan
.O_cache
.O_listvg
\fIPV\fP
.RS
[
.O_ignorelockingfailure
]
.br
.RS 4
.na
[ \fB--ignorelockingfailure\fP ]
[
.O_checkcomplete
]
.br
[ \fB--checkcomplete\fP ]
[
.O_vgonline
]
.br
[ \fB--vgonline\fP ]
[
.O_udevoutput
]
.br
[ \fB--udevoutput\fP ]
.br
[ \fB--autoactivation\fP \fIString\fP ]
[
.O_autoactivation
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Record that a PV is online and list LVs using the PV.
.br
.P
\fBpvscan\fP \fB--cache\fP \fB--listlvs\fP \fIPV\fP
.B pvscan
.O_cache
.O_listlvs
\fIPV\fP
.RS
[
.O_ignorelockingfailure
]
.br
.RS 4
.na
[ \fB--ignorelockingfailure\fP ]
[
.O_checkcomplete
]
.br
[ \fB--checkcomplete\fP ]
.br
[ \fB--vgonline\fP ]
[
.O_vgonline
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
List LVs using the PV.
.br
.P
\fBpvscan\fP \fB--listlvs\fP \fIPV\fP
.br
.RS 4
.na
.B pvscan
.O_listlvs
\fIPV\fP
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
List the VG using the PV.
.br
.P
\fBpvscan\fP \fB--listvg\fP \fIPV\fP
.br
.RS 4
.na
.B pvscan
.O_listvg
\fIPV\fP
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP
.br
.TP
.O_activate
Auto-activate LVs in a VG when the PVs scanned have completed the VG.
(Only \fBay\fP is applicable.)
.
.HP
\fB-A\fP|\fB--allpvs\fP
.br
.TP
.O_allpvs
Show information about PVs outside the devices file.
Displays the device ID for PVs included in the devices file.
.
.HP
\fB--autoactivation\fP \fIString\fP
.br
.TP
.O_autoactivation
Specify if autoactivation is being used from an event.
This allows the command to apply settings that are specific
to event activation, such as device scanning optimizations
using pvs_online files created by event-based pvscans.
.
.HP
\fB--cache\fP
.br
.TP
.O_cache
Scan one or more devices and record that they are online.
.
.HP
\fB--checkcomplete\fP
.br
.TP
.O_checkcomplete
Check if all the devices used by a VG or LV are present,
and print "complete" or "incomplete" for each listed
VG or LV. This option is used as a part of event-based
autoactivation, so pvscan will do nothing if this option
is set and event_activation=0 in the config settings.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-e\fP|\fB--exported\fP
.br
.TP
.O_exported
Only show PVs belonging to exported VGs.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--ignorelockingfailure\fP
.br
.TP
.O_ignorelockingfailure
Allows a command to continue with read-only metadata
operations after locking failures.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -439,78 +673,65 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--listlvs\fP
.br
.TP
.O_listlvs
Print a list of LVs that use the device.
.
.HP
\fB--listvg\fP
.br
.TP
.O_listvg
Print the VG that uses the device.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB-j\fP|\fB--major\fP \fINumber\fP
.br
.TP
.O_major
The major number of a device.
.
.HP
\fB--minor\fP \fINumber\fP
.br
.TP
.O_minor
The minor number of a device.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--noudevsync\fP
.br
.TP
.O_noudevsync
Disables udev synchronization. The process will not wait for notification
from udev. It will continue irrespective of any possible udev processing
in the background. Only use this if udev is not running or has rules that
ignore the devices LVM creates.
.
.HP
\fB-n\fP|\fB--novolumegroup\fP
.br
.TP
.O_novolumegroup
Only show PVs not belonging to any VG.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -520,50 +741,42 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-s\fP|\fB--short\fP
.br
.TP
.O_short
Short listing format.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB--udevoutput\fP
.br
.TP
.O_udevoutput
Command output is modified to be imported from a udev rule.
.
.HP
\fB-u\fP|\fB--uuid\fP
.br
.TP
.O_uuid
Show UUIDs in addition to device names.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB--vgonline\fP
.br
.TP
.O_vgonline
The first command to see a complete VG will report it uniquely.
Other commands to see the complete VG will report it differently.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -577,13 +790,17 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -613,5 +830,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,7 +1,7 @@
vgcfgbackup creates back up files containing metadata of VGs.
If no VGs are named, back up files are created for all VGs.
See \fBvgcfgrestore\fP for information on using the back up
files.
If no VGs are named, back up files are created for all VGs. See
.BR vgcfgrestore (8)
for information on using the back up files.
.P
In a default installation, each VG is backed up into a separate file
bearing the name of the VG in the directory

View File

@@ -1,23 +1,141 @@
.TH VGCFGBACKUP 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_file
.OPA f file
\fIString\fP
..
.de O_foreign
.OPS foreign
..
.de O_help
.OPS h help
..
.de O_ignorelockingfailure
.OPS ignorelockingfailure
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_readonly
.OPS readonly
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
vgcfgbackup \(em Backup volume group configuration(s)
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgcfgbackup\fP
[ \fIoption_args\fP ]
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
[ \fIposition_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
vgcfgbackup creates back up files containing metadata of VGs.
If no VGs are named, back up files are created for all VGs.
See \fBvgcfgrestore\fP for information on using the back up
files.
If no VGs are named, back up files are created for all VGs. See
.BR vgcfgrestore (8)
for information on using the back up files.
.P
In a default installation, each VG is backed up into a separate file
bearing the name of the VG in the directory
@@ -34,142 +152,175 @@ It may also be useful to regularly back up the files in
.
.SH USAGE
.
\fBvgcfgbackup\fP
.br
.RS 4
.nh
.na
[ \fB-f\fP|\fB--file\fP \fIString\fP ]
.B vgcfgbackup
.RS
[
.O_file
]
.br
[ \fB--foreign\fP ]
[
.O_foreign
]
.br
[ \fB--ignorelockingfailure\fP ]
[
.O_ignorelockingfailure
]
.br
[ \fB--readonly\fP ]
[
.O_readonly
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_reportformat
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIVG\fP ... ]
.br
[ \fIVG\fP\ .\|.\|.\& ]
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--file\fP \fIString\fP
.br
.TP
.O_file
Write the backup to the named file.
When backing up more than one VG, the file name is
treated as a template, and %s is replaced by the VG name.
.
.HP
\fB--foreign\fP
.br
.TP
.O_foreign
Report/display foreign VGs that would otherwise be skipped.
See \fBlvmsystemid\fP(7) for more information about foreign VGs.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--ignorelockingfailure\fP
.br
.TP
.O_ignorelockingfailure
Allows a command to continue with read-only metadata
operations after locking failures.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -177,51 +328,43 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--readonly\fP
.br
.TP
.O_readonly
Prevent the command from making changes, including activation and
metadata updates. (See --permission r for read only LVs.)
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -231,29 +374,25 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -263,9 +402,11 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -295,5 +436,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,6 +1,7 @@
vgcfgrestore restores the metadata of a VG from a text back up file
produced by \fBvgcfgbackup\fP. This writes VG metadata onto the devices
specified in back up file.
produced by
.BR vgcfgbackup (8).
This writes VG metadata onto the devices specified in back up file.
.P
A back up file can be specified with \fB--file\fP. If no backup file is
specified, the most recent one is used. Use \fB--list\fP for a list of

View File

@@ -1,68 +1,189 @@
.TH VGCFGRESTORE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_file
.OPA f file
\fIString\fP
..
.de O_force
.OPA force
\&\.\|.\|.\&
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_list
.OPS l list
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_metadatatype
.OPA M metadatatype
\fBlvm2\fP
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
vgcfgrestore \(em Restore volume group configuration
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgcfgrestore\fP \fIoption_args\fP \fIposition_args\fP
[ \fIoption_args\fP ]
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
[ \fIposition_args\fP ]
.P
.na
\fB--commandprofile\fP \fIString\fP
.RS 5
.if t .ta 3nR +1uL \" PostScript/PDF
.PD 0
.O_commandprofile
.br
\fB--config\fP \fIString\fP
.O_config
.br
\fB-d\fP|\fB--debug\fP
.O_debug
.br
\fB--devices\fP \fIPV\fP
.O_devices
.br
\fB--devicesfile\fP \fIString\fP
.O_devicesfile
.br
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.O_driverloaded
.br
\fB-f\fP|\fB--file\fP \fIString\fP
.O_file
.br
\fB--force\fP
.O_force
.br
\fB-h\fP|\fB--help\fP
.O_help
.br
\fB--journal\fP \fIString\fP
.O_journal
.br
\fB-l\fP|\fB--list\fP
.O_list
.br
\fB--lockopt\fP \fIString\fP
.O_lockopt
.br
\fB--longhelp\fP
.O_longhelp
.br
\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
.O_metadatatype
.br
\fB--nohints\fP
.O_nohints
.br
\fB--nolocking\fP
.O_nolocking
.br
\fB--profile\fP \fIString\fP
.O_profile
.br
\fB-q\fP|\fB--quiet\fP
.O_quiet
.br
\fB-t\fP|\fB--test\fP
.O_test
.br
\fB-v\fP|\fB--verbose\fP
.O_verbose
.br
\fB--version\fP
.O_version
.br
\fB-y\fP|\fB--yes\fP
.O_yes
.PD
.if t .ta
.RE
.ad
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
vgcfgrestore restores the metadata of a VG from a text back up file
produced by \fBvgcfgbackup\fP. This writes VG metadata onto the devices
specified in back up file.
produced by
.BR vgcfgbackup (8).
This writes VG metadata onto the devices specified in back up file.
.P
A back up file can be specified with \fB--file\fP. If no backup file is
specified, the most recent one is used. Use \fB--list\fP for a list of
@@ -74,182 +195,205 @@ option is required to restore in this case.
.
.SH USAGE
.
.nh
.na
Restore VG metadata from last backup.
.br
.P
\fBvgcfgrestore\fP \fIVG\fP
.br
.RS 4
.na
.B vgcfgrestore
\fIVG\fP
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Restore VG metadata from specified file.
.br
.P
\fBvgcfgrestore\fP \fB-f\fP|\fB--file\fP \fIString\fP \fIVG\fP
.br
.RS 4
.na
.B vgcfgrestore
.O_file
\fIVG\fP
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
List all VG metadata backups.
.br
.P
\fBvgcfgrestore\fP \fB-l\fP|\fB--list\fP \fIVG\fP
.br
.RS 4
.na
.B vgcfgrestore
.O_list
\fIVG\fP
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
List one VG metadata backup file.
.br
.P
\fBvgcfgrestore\fP \fB-l\fP|\fB--list\fP \fB-f\fP|\fB--file\fP \fIString\fP
.br
.RS 4
.na
.B vgcfgrestore
.O_list
.O_file
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
.br
[ \fIVG\fP ]
.RE
.P
\(em
.P
Common options for command:
.
.RS 4
.na
[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
.RS
[
.O_metadatatype
]
.br
[ \fB--force\fP ]
.ad
[
.O_force
]
.RE
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--file\fP \fIString\fP
.br
.TP
.O_file
Read metadata backup from the named file.
Usually this file was created by vgcfgbackup.
.
.HP
\fB--force\fP ...
.br
.TP
.O_force
Force metadata restore even with thin pool LVs.
Use with extreme caution. Most changes to thin metadata
cannot be reverted.
You may lose data if you restore metadata that does not match the
thin pool kernel metadata precisely.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -257,78 +401,66 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB-l\fP|\fB--list\fP
.br
.TP
.O_list
List metadata backup and archive files pertaining to the VG.
May be used with --file. Does not restore the VG.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
.br
.TP
.O_metadatatype
Specifies the type of on-disk metadata to use.
\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
\fBlvm1\fP (or just \fB1\fP) is no longer used.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -338,9 +470,11 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -370,5 +504,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,124 @@
.TH VGCK 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_test
.OPS t test
..
.de O_updatemetadata
.OPS updatemetadata
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
vgck \(em Check the consistency of volume group(s)
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgck\fP \fIoption_args\fP \fIposition_args\fP
[ \fIoption_args\fP ]
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
[ \fIposition_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -18,129 +126,158 @@ vgck checks LVM metadata for consistency.
.
.SH USAGE
.
.nh
.na
Read and display information about a VG.
.br
.P
\fBvgck\fP
.br
.RS 4
.na
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
.B vgck
.RS
[
.O_reportformat
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.RS 4
[ \fIVG\fP|\fITag\fP ... ]
.br
[ \fIVG\fP|\fITag\fP\ .\|.\|.\& ]
.RE
.
.P
\(em
.P
.
Rewrite VG metadata to correct problems.
.br
.P
\fBvgck\fP \fB--updatemetadata\fP \fIVG\fP
.br
.RS 4
.na
.B vgck
.O_updatemetadata
\fIVG\fP
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -148,45 +285,38 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -196,18 +326,16 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB--updatemetadata\fP
.br
.TP
.O_updatemetadata
Update VG metadata to correct problems.
If VG metadata was updated while a PV was missing, and the PV
reappears with an old version of metadata, then this option
@@ -219,20 +347,17 @@ missing PV. If metadata text is damaged on one PV, using this
option will replace the damaged metadata text. For more severe
damage, e.g. with headers, see \fBpvck\fP(8).
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -242,13 +367,16 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I Tag
Tag name. See \fBlvm\fP(8) for information about tag names and using tags
in place of a VG, LV or PV.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -278,5 +406,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,143 @@
.TH VGCONVERT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_bootloaderareasize
.OPA bootloaderareasize
\fISize\fP[m|\:UNIT]
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_force
.OPA f force
\&\.\|.\|.\&
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_labelsector
.OPA labelsector
\fINumber\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_metadatasize
.OPA metadatasize
\fISize\fP[m|\:UNIT]
..
.de O_metadatatype
.OPA M metadatatype
\fBlvm2\fP
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_pvmetadatacopies
.OPA pvmetadatacopies
\fB0\fP|\fB1\fP|\fB2\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
vgconvert \(em Change volume group metadata format
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgconvert\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -18,76 +147,124 @@ convert VGs from the LVM1 format to LVM2.
.
.SH USAGE
.
\fBvgconvert\fP \fIVG\fP ...
.br
.RS 4
.nh
.na
[ \fB-f\fP|\fB--force\fP ]
.B vgconvert
\fIVG\fP\ .\|.\|.\&
.RS
[
.O_force
]
.br
[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
[
.O_metadatatype
]
.br
[ \fB--labelsector\fP \fINumber\fP ]
[
.O_labelsector
]
.br
[ \fB--bootloaderareasize\fP \fISize\fP[m|UNIT] ]
[
.O_bootloaderareasize
]
.br
[ \fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
[
.O_pvmetadatacopies
]
.br
[ \fB--metadatasize\fP \fISize\fP[m|UNIT] ]
[
.O_metadatasize
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_reportformat
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--bootloaderareasize\fP \fISize\fP[m|UNIT]
.br
.TP
.O_bootloaderareasize
Reserve space for the bootloader between the LVM metadata area and the first PE.
The bootloader area is reserved for bootloaders to embed their own data or
metadata; LVM will not use it.
@@ -100,63 +277,54 @@ due to the alignment, but it's never less than the requested size.
To see the bootloader area start and size of
an existing PV use pvs -o +pv_ba_start,pv_ba_size.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--force\fP ...
.br
.TP
.O_force
Override various checks, confirmations and protections.
Use with extreme caution.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -164,60 +332,51 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--labelsector\fP \fINumber\fP
.br
.TP
.O_labelsector
By default the PV is labelled with an LVM2 identifier in its second
sector (sector 1). This lets you use a different sector near the
start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS
in the source). Use with care.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--metadatasize\fP \fISize\fP[m|UNIT]
.br
.TP
.O_metadatasize
The approximate amount of space used for each VG metadata area.
The size may be rounded.
.
.HP
\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
.br
.TP
.O_metadatatype
Specifies the type of on-disk metadata to use.
\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
\fBlvm1\fP (or just \fB1\fP) is no longer used.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
.br
.TP
.O_pvmetadatacopies
The number of metadata areas to set aside on a PV for storing VG metadata.
When 2, one copy of the VG metadata is stored at the front of the PV
and a second copy is stored at the end.
@@ -226,15 +385,13 @@ When 0, no copies of the VG metadata are stored on the given PV.
This may be useful in VGs containing many PVs (this places limitations
on the ability to use vgsplit later.)
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -244,29 +401,25 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -276,9 +429,11 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -308,5 +463,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,211 @@
.TH VGCREATE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_addtag
.OPA addtag
\fITag\fP
..
.de O_alloc
.OPA alloc
\%\fBcontiguous\fP|\:\
\fBcling\fP|\:\
\fBcling_by_tags\fP|\:\
\fBnormal\fP|\:\
\fBanywhere\fP|\:\
\fBinherit\fP
..
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_clustered
.OPA c clustered
\fBy\fP|\fBn\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_dataalignment
.OPA dataalignment
\fISize\fP[k|\:UNIT]
..
.de O_dataalignmentoffset
.OPA dataalignmentoffset
\fISize\fP[k|\:UNIT]
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_force
.OPA f force
\&\.\|.\|.\&
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_labelsector
.OPA labelsector
\fINumber\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_locktype
.OPA locktype
\%\fBsanlock\fP|\:\
\fBdlm\fP|\:\
\fBnone\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_maxlogicalvolumes
.OPA l maxlogicalvolumes
\fINumber\fP
..
.de O_maxphysicalvolumes
.OPA p maxphysicalvolumes
\fINumber\fP
..
.de O_metadataprofile
.OPA metadataprofile
\fIString\fP
..
.de O_metadatasize
.OPA metadatasize
\fISize\fP[m|\:UNIT]
..
.de O_metadatatype
.OPA M metadatatype
\fBlvm2\fP
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_physicalextentsize
.OPA s physicalextentsize
\fISize\fP[m|\:UNIT]
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_pvmetadatacopies
.OPA pvmetadatacopies
\fB0\fP|\fB1\fP|\fB2\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_setautoactivation
.OPA setautoactivation
\fBy\fP|\fBn\fP
..
.de O_shared
.OPS shared
..
.de O_systemid
.OPA systemid
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_vgmetadatacopies
.OPA \fP[\fBvg\fP]\fBmetadatacopies
\%\fBall\fP|\:\
\fBunmanaged\fP|\:\
\fINumber\fP
..
.de O_yes
.OPS y yes
..
.de O_zero
.OPA Z zero
\fBy\fP|\fBn\fP
..
.
.SH NAME
.
vgcreate \(em Create a volume group
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgcreate\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -24,121 +221,190 @@ device.
.
.SH USAGE
.
\fBvgcreate\fP \fIVG\fP\fI_new\fP \fIPV\fP ...
.br
.RS 4
.na
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.br
[ \fB-c\fP|\fB--clustered\fP \fBy\fP|\fBn\fP ]
.br
[ \fB-l\fP|\fB--maxlogicalvolumes\fP \fINumber\fP ]
.br
[ \fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP ]
.br
[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
.br
[ \fB-s\fP|\fB--physicalextentsize\fP \fISize\fP[m|UNIT] ]
.br
[ \fB-f\fP|\fB--force\fP ]
.br
[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
.br
[ \fB--addtag\fP \fITag\fP ]
.br
[ \fB--alloc\fP \c
.nh
\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
.hy
.na
.B vgcreate
\fIVG\fP\fI_new\fP \fIPV\fP\ .\|.\|.\&
.RS
[
.O_autobackup
]
.br
[ \fB--metadataprofile\fP \fIString\fP ]
[
.O_clustered
]
.br
[ \fB--labelsector\fP \fINumber\fP ]
[
.O_maxlogicalvolumes
]
.br
[ \fB--metadatasize\fP \fISize\fP[m|UNIT] ]
[
.O_maxphysicalvolumes
]
.br
[ \fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
[
.O_metadatatype
]
.br
[ \fB--\fP[\fBvg\fP]\fBmetadatacopies\fP \fBall\fP|\fBunmanaged\fP|\fINumber\fP ]
[
.O_physicalextentsize
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_force
]
.br
[ \fB--dataalignment\fP \fISize\fP[k|UNIT] ]
[
.O_zero
]
.br
[ \fB--dataalignmentoffset\fP \fISize\fP[k|UNIT] ]
[
.O_addtag
]
.br
[ \fB--shared\fP ]
[
.O_alloc
]
.br
[ \fB--systemid\fP \fIString\fP ]
[
.O_metadataprofile
]
.br
[ \fB--locktype\fP \fBsanlock\fP|\fBdlm\fP|\fBnone\fP ]
[
.O_labelsector
]
.br
[ \fB--setautoactivation\fP \fBy\fP|\fBn\fP ]
[
.O_metadatasize
]
.br
[
.O_pvmetadatacopies
]
.br
[
.O_vgmetadatacopies
]
.br
[
.O_reportformat
]
.br
[
.O_dataalignment
]
.br
[
.O_dataalignmentoffset
]
.br
[
.O_shared
]
.br
[
.O_systemid
]
.br
[
.O_locktype
]
.br
[
.O_setautoactivation
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB--addtag\fP \fITag\fP
.br
.TP
.O_addtag
Adds a tag to a PV, VG or LV. This option can be repeated to add
multiple tags at once. See \fBlvm\fP(8) for information about tags.
.
.HP
.ad
\fB--alloc\fP \c
.nh
\%\fBcontiguous\fP|\:\fBcling\fP|\:\fBcling_by_tags\fP|\:\fBnormal\fP|\:\fBanywhere\fP|\:\fBinherit\fP
.hy
.ad
.br
.TP
.O_alloc
Determines the allocation policy when a command needs to allocate
Physical Extents (PEs) from the VG. Each VG and LV has an allocation policy
which can be changed with vgchange/lvchange, or overridden on the
@@ -156,90 +422,77 @@ Optional positional PV args on the command line can also be used to limit
which PVs the command will use for allocation.
See \fBlvm\fP(8) for more information about allocation.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB-c\fP|\fB--clustered\fP \fBy\fP|\fBn\fP
.br
.TP
.O_clustered
This option was specific to clvm and is now replaced by
the --shared option with \fBlvmlockd\fP(8).
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB--dataalignment\fP \fISize\fP[k|UNIT]
.br
.TP
.O_dataalignment
Align the start of a PV data area with a multiple of this number.
To see the location of the first Physical Extent (PE) of an existing PV,
use pvs -o +pe_start. In addition, it may be shifted by an alignment offset,
see --dataalignmentoffset.
Also specify an appropriate PE size when creating a VG.
.
.HP
\fB--dataalignmentoffset\fP \fISize\fP[k|UNIT]
.br
.TP
.O_dataalignmentoffset
Shift the start of the PV data area by this additional offset.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--force\fP ...
.br
.TP
.O_force
Override various checks, confirmations and protections.
Use with extreme caution.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -247,79 +500,67 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--labelsector\fP \fINumber\fP
.br
.TP
.O_labelsector
By default the PV is labelled with an LVM2 identifier in its second
sector (sector 1). This lets you use a different sector near the
start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS
in the source). Use with care.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--locktype\fP \fBsanlock\fP|\fBdlm\fP|\fBnone\fP
.br
.TP
.O_locktype
Specify the VG lock type directly in place of using --shared.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB-l\fP|\fB--maxlogicalvolumes\fP \fINumber\fP
.br
.TP
.O_maxlogicalvolumes
Sets the maximum number of LVs allowed in a VG.
.
.HP
\fB-p\fP|\fB--maxphysicalvolumes\fP \fINumber\fP
.br
.TP
.O_maxphysicalvolumes
Sets the maximum number of PVs that can belong to the VG.
The value 0 removes any limitation.
For large numbers of PVs, also see options --pvmetadatacopies,
and --vgmetadatacopies for improving performance.
.
.HP
\fB--metadataprofile\fP \fIString\fP
.br
.TP
.O_metadataprofile
The metadata profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--metadatasize\fP \fISize\fP[m|UNIT]
.br
.TP
.O_metadatasize
The approximate amount of space used for each VG metadata area.
The size may be rounded.
.
.HP
\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
.br
.TP
.O_metadatatype
Specifies the type of on-disk metadata to use.
\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
\fBlvm1\fP (or just \fB1\fP) is no longer used.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB-s\fP|\fB--physicalextentsize\fP \fISize\fP[m|UNIT]
.br
.TP
.O_physicalextentsize
Sets the physical extent size of PVs in the VG.
The value must be either a power of 2 of at least 1 sector
(where the sector size is the largest sector size of the PVs
@@ -327,15 +568,13 @@ currently used in the VG), or at least 128 KiB.
Once this value has been set, it is difficult to change
without recreating the VG, unless no extents need moving.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
.br
.TP
.O_pvmetadatacopies
The number of metadata areas to set aside on a PV for storing VG metadata.
When 2, one copy of the VG metadata is stored at the front of the PV
and a second copy is stored at the end.
@@ -344,15 +583,13 @@ When 0, no copies of the VG metadata are stored on the given PV.
This may be useful in VGs containing many PVs (this places limitations
on the ability to use vgsplit later.)
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -362,9 +599,8 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB--setautoactivation\fP \fBy\fP|\fBn\fP
.br
.TP
.O_setautoactivation
Set the autoactivation property on a VG or LV.
Display the property with vgs or lvs "-o autoactivation".
When the autoactivation property is disabled, the VG or LV
@@ -375,18 +611,16 @@ in that VG, and the LV autoactivation property has no effect.
If autoactivation is enabled on a VG, autoactivation can be disabled
for individual LVs.
.
.HP
\fB--shared\fP
.br
.TP
.O_shared
Create a shared VG using lvmlockd if LVM is compiled with lockd support.
lvmlockd will select lock type sanlock or dlm depending on which lock
manager is running. This allows multiple hosts to share a VG on shared
devices. lvmlockd and a lock manager must be configured and running.
See \fBlvmlockd\fP(8) for more information about shared VGs.
.
.HP
\fB--systemid\fP \fIString\fP
.br
.TP
.O_systemid
Specifies the system ID that will be given to the new VG, overriding the
system ID of the host running the command. A VG is normally created
without this option, in which case the new VG is given the system ID of
@@ -395,29 +629,25 @@ system ID of the new VG may not match the system ID of the host running
the command, leaving the VG inaccessible to the host.
See \fBlvmsystemid\fP(7) for more information.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB--\fP[\fBvg\fP]\fBmetadatacopies\fP \fBall\fP|\fBunmanaged\fP|\fINumber\fP
.br
.TP
.O_vgmetadatacopies
Number of copies of the VG metadata that are kept.
VG metadata is kept in VG metadata areas on PVs in the VG,
i.e. reserved space at the start and/or end of the PVs.
@@ -432,16 +662,14 @@ metadataignore flags.
\fBall\fP causes LVM to first clear the metadataignore flags on
all PVs, and then to become unmanaged.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.
.HP
\fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
.br
.TP
.O_zero
Controls if the first 4 sectors (2048 bytes) of the device are wiped.
The default is to wipe these sectors unless either or both of
--restorefile or --uuid are specified.
@@ -451,6 +679,7 @@ The default is to wipe these sectors unless either or both of
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I PV
Physical Volume name, a device path under /dev.
@@ -458,13 +687,17 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -494,5 +727,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,126 @@
.TH VGEXPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_all
.OPS a all
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_select
.OPA S select
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
vgexport \(em Unregister volume group(s) from the system
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgexport\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -34,138 +146,166 @@ match the host running vgimport (if the host has a system ID).
.
.SH USAGE
.
.nh
.na
Export specified VGs.
.br
.P
\fBvgexport\fP \fIVG\fP|\fITag\fP|\fISelect\fP ...
.br
.RS 4
.na
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.B vgexport
\fIVG\fP|\fITag\fP|\fISelect\fP\ .\|.\|.\&
.RS
[
.O_select
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Export all VGs.
.br
.P
\fBvgexport\fP \fB-a\fP|\fB--all\fP
.br
.RS 4
.na
.B vgexport
.O_all
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for command:
.
.RS 4
.na
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
.ad
.RS
[
.O_reportformat
]
.RE
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.TP
.O_all
.
.HP
\fB-a\fP|\fB--all\fP
.br
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -173,45 +313,38 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -221,9 +354,8 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-S\fP|\fB--select\fP \fIString\fP
.br
.TP
.O_select
Select objects for processing and reporting based on specified criteria.
The criteria syntax is described by \fB--select help\fP
and \fBlvmreport\fP(7).
@@ -235,29 +367,25 @@ showing 1 if the row matches the selection and 0 otherwise.
For non-reporting commands which process LVM entities, the selection is
used to choose items to process.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -267,18 +395,22 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I Tag
Tag name. See \fBlvm\fP(8) for information about tag names and using tags
in place of a VG, LV or PV.
.
.TP
.I Select
Select indicates that a required positional parameter can
be omitted if the \fB--select\fP option is used.
No arg appears in this position.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -308,5 +440,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,162 @@
.TH VGEXTEND 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_dataalignment
.OPA dataalignment
\fISize\fP[k|\:UNIT]
..
.de O_dataalignmentoffset
.OPA dataalignmentoffset
\fISize\fP[k|\:UNIT]
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_force
.OPA f force
\&\.\|.\|.\&
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_labelsector
.OPA labelsector
\fINumber\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_metadataignore
.OPA metadataignore
\fBy\fP|\fBn\fP
..
.de O_metadatasize
.OPA metadatasize
\fISize\fP[m|\:UNIT]
..
.de O_metadatatype
.OPA M metadatatype
\fBlvm2\fP
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_pvmetadatacopies
.OPA pvmetadatacopies
\fB0\fP|\fB1\fP|\fB2\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_restoremissing
.OPS restoremissing
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.de O_zero
.OPA Z zero
\fBy\fP|\fBn\fP
..
.
.SH NAME
.
vgextend \(em Add physical volumes to a volume group
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgextend\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -26,161 +174,209 @@ will initialize them. In this case pvcreate options can be used, e.g.
.
.SH USAGE
.
\fBvgextend\fP \fIVG\fP \fIPV\fP ...
.br
.RS 4
.nh
.na
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.B vgextend
\fIVG\fP \fIPV\fP\ .\|.\|.\&
.RS
[
.O_autobackup
]
.br
[ \fB-f\fP|\fB--force\fP ]
[
.O_force
]
.br
[ \fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP ]
[
.O_zero
]
.br
[ \fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP ]
[
.O_metadatatype
]
.br
[ \fB--labelsector\fP \fINumber\fP ]
[
.O_labelsector
]
.br
[ \fB--metadatasize\fP \fISize\fP[m|UNIT] ]
[
.O_metadatasize
]
.br
[ \fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP ]
[
.O_pvmetadatacopies
]
.br
[ \fB--metadataignore\fP \fBy\fP|\fBn\fP ]
[
.O_metadataignore
]
.br
[ \fB--dataalignment\fP \fISize\fP[k|UNIT] ]
[
.O_dataalignment
]
.br
[ \fB--dataalignmentoffset\fP \fISize\fP[k|UNIT] ]
[
.O_dataalignmentoffset
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
[
.O_reportformat
]
.br
[ \fB--restoremissing\fP ]
[
.O_restoremissing
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB--dataalignment\fP \fISize\fP[k|UNIT]
.br
.TP
.O_dataalignment
Align the start of a PV data area with a multiple of this number.
To see the location of the first Physical Extent (PE) of an existing PV,
use pvs -o +pe_start. In addition, it may be shifted by an alignment offset,
see --dataalignmentoffset.
Also specify an appropriate PE size when creating a VG.
.
.HP
\fB--dataalignmentoffset\fP \fISize\fP[k|UNIT]
.br
.TP
.O_dataalignmentoffset
Shift the start of the PV data area by this additional offset.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--force\fP ...
.br
.TP
.O_force
Override various checks, confirmations and protections.
Use with extreme caution.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -188,68 +384,58 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--labelsector\fP \fINumber\fP
.br
.TP
.O_labelsector
By default the PV is labelled with an LVM2 identifier in its second
sector (sector 1). This lets you use a different sector near the
start of the disk (between 0 and 3 inclusive - see LABEL_SCAN_SECTORS
in the source). Use with care.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--metadataignore\fP \fBy\fP|\fBn\fP
.br
.TP
.O_metadataignore
Specifies the metadataignore property of a PV.
If yes, metadata areas on the PV are ignored, and lvm will
not store metadata in the metadata areas of the PV.
If no, lvm will store metadata on the PV.
.
.HP
\fB--metadatasize\fP \fISize\fP[m|UNIT]
.br
.TP
.O_metadatasize
The approximate amount of space used for each VG metadata area.
The size may be rounded.
.
.HP
\fB-M\fP|\fB--metadatatype\fP \fBlvm2\fP
.br
.TP
.O_metadatatype
Specifies the type of on-disk metadata to use.
\fBlvm2\fP (or just \fB2\fP) is the current, standard format.
\fBlvm1\fP (or just \fB1\fP) is no longer used.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB--pvmetadatacopies\fP \fB0\fP|\fB1\fP|\fB2\fP
.br
.TP
.O_pvmetadatacopies
The number of metadata areas to set aside on a PV for storing VG metadata.
When 2, one copy of the VG metadata is stored at the front of the PV
and a second copy is stored at the end.
@@ -258,15 +444,13 @@ When 0, no copies of the VG metadata are stored on the given PV.
This may be useful in VGs containing many PVs (this places limitations
on the ability to use vgsplit later.)
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -276,42 +460,36 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB--restoremissing\fP
.br
.TP
.O_restoremissing
Add a PV back into a VG after the PV was missing and then returned,
e.g. due to a transient failure. The PV is not reinitialized.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.
.HP
\fB-Z\fP|\fB--zero\fP \fBy\fP|\fBn\fP
.br
.TP
.O_zero
Controls if the first 4 sectors (2048 bytes) of the device are wiped.
The default is to wipe these sectors unless either or both of
--restorefile or --uuid are specified.
@@ -321,6 +499,7 @@ The default is to wipe these sectors unless either or both of
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I PV
Physical Volume name, a device path under /dev.
@@ -328,13 +507,17 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -364,5 +547,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,130 @@
.TH VGIMPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_all
.OPS a all
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_force
.OPA f force
\&\.\|.\|.\&
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_select
.OPA S select
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
vgimport \(em Register exported volume group with system
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgimport\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -20,147 +136,176 @@ match the host running vgimport (if the host has a system ID).
.
.SH USAGE
.
.nh
.na
Import specified VGs.
.br
.P
\fBvgimport\fP \fIVG\fP|\fITag\fP|\fISelect\fP ...
.br
.RS 4
.na
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.B vgimport
\fIVG\fP|\fITag\fP|\fISelect\fP\ .\|.\|.\&
.RS
[
.O_select
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Import all VGs.
.br
.P
\fBvgimport\fP \fB-a\fP|\fB--all\fP
.br
.RS 4
.na
.B vgimport
.O_all
.RS
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for command:
.
.RS 4
.na
[ \fB-f\fP|\fB--force\fP ]
.RS
[
.O_force
]
.br
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
.ad
[
.O_reportformat
]
.RE
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB-a\fP|\fB--all\fP
.br
.TP
.O_all
Import all visible VGs.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-f\fP|\fB--force\fP ...
.br
.TP
.O_force
Override various checks, confirmations and protections.
Use with extreme caution.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -168,45 +313,38 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -216,9 +354,8 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB-S\fP|\fB--select\fP \fIString\fP
.br
.TP
.O_select
Select objects for processing and reporting based on specified criteria.
The criteria syntax is described by \fB--select help\fP
and \fBlvmreport\fP(7).
@@ -230,29 +367,25 @@ showing 1 if the row matches the selection and 0 otherwise.
For non-reporting commands which process LVM entities, the selection is
used to choose items to process.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -262,18 +395,22 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I Tag
Tag name. See \fBlvm\fP(8) for information about tag names and using tags
in place of a VG, LV or PV.
.
.TP
.I Select
Select indicates that a required positional parameter can
be omitted if the \fB--select\fP option is used.
No arg appears in this position.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -303,5 +440,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,123 @@
.TH VGIMPORTCLONE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_basevgname
.OPA n basevgname
\fIString\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_help
.OPS h help
..
.de O_import
.OPS i import
..
.de O_importdevices
.OPS importdevices
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
vgimportclone \(em Import a VG from cloned PVs
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgimportclone\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -21,136 +130,167 @@ changes the associated VG and PV UUIDs.
.
.SH USAGE
.
\fBvgimportclone\fP \fIPV\fP ...
.br
.RS 4
.nh
.na
[ \fB-n\fP|\fB--basevgname\fP \fIVG\fP ]
.B vgimportclone
\fIPV\fP\ .\|.\|.\&
.RS
[
.O_basevgname
]
.br
[ \fB-i\fP|\fB--import\fP ]
[
.O_import
]
.br
[ \fB--importdevices\fP ]
[
.O_importdevices
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB-n\fP|\fB--basevgname\fP \fIString\fP
.br
.TP
.O_basevgname
By default the snapshot VG will be renamed to the original name plus a
numeric suffix to avoid duplicate naming (e.g. 'test_vg' would be renamed
to 'test_vg1'). This option will override the base VG name that is
used for all VG renames. If a VG already exists with the specified name
a numeric suffix will be added (like the previous example) to make it unique.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB-i\fP|\fB--import\fP
.br
.TP
.O_import
Import exported VGs. Otherwise VGs that have been exported
will not be changed (nor will their associated PVs).
.
.HP
\fB--importdevices\fP
.br
.TP
.O_importdevices
Add devices to the devices file.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -158,65 +298,55 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -230,13 +360,17 @@ For commands managing physical extents, a PV positional arg
generally accepts a suffix indicating a range (or multiple ranges)
of physical extents (PEs). When the first PE is omitted, it defaults
to the start of the device, and when the last PE is omitted it defaults to end.
.br
Start and end range (inclusive):
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB-\fP\fIPE\fP]\ .\|.\|.\&
.br
Start and length range (counting from 0):
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]...
\fIPV\fP[\fB:\fP\fIPE\fP\fB+\fP\fIPE\fP]\ .\|.\|.\&
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -266,5 +400,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,64 +1,191 @@
.TH VGIMPORTDEVICES 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_all
.OPS a all
..
.de O_auto
.OPS auto
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_foreign
.OPS foreign
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_reportformat
.OPA reportformat
\%\fBbasic\fP|\:\
\fBjson\fP|\:\
\fBjson_std\fP
..
.de O_rootvg
.OPS rootvg
..
.de O_select
.OPA S select
\fIString\fP
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
vgimportdevices \(em Add devices for a VG to the devices file.
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgimportdevices\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.P
.na
\fB-a\fP|\fB--all\fP
.RS 5
.if t .ta 3nR +1uL \" PostScript/PDF
.PD 0
.O_all
.br
\fB--auto\fP
.O_auto
.br
\fB--commandprofile\fP \fIString\fP
.O_commandprofile
.br
\fB--config\fP \fIString\fP
.O_config
.br
\fB-d\fP|\fB--debug\fP
.O_debug
.br
\fB--devices\fP \fIPV\fP
.O_devices
.br
\fB--devicesfile\fP \fIString\fP
.O_devicesfile
.br
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.O_driverloaded
.br
\fB--foreign\fP
.O_foreign
.br
\fB-h\fP|\fB--help\fP
.O_help
.br
\fB--journal\fP \fIString\fP
.O_journal
.br
\fB--lockopt\fP \fIString\fP
.O_lockopt
.br
\fB--longhelp\fP
.O_longhelp
.br
\fB--nohints\fP
.O_nohints
.br
\fB--nolocking\fP
.O_nolocking
.br
\fB--profile\fP \fIString\fP
.O_profile
.br
\fB-q\fP|\fB--quiet\fP
.O_quiet
.br
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.O_reportformat
.br
\fB--rootvg\fP
.O_rootvg
.br
\fB-S\fP|\fB--select\fP \fIString\fP
.O_select
.br
\fB-t\fP|\fB--test\fP
.O_test
.br
\fB-v\fP|\fB--verbose\fP
.O_verbose
.br
\fB--version\fP
.O_version
.br
\fB-y\fP|\fB--yes\fP
.O_yes
.PD
.if t .ta
.RE
.ad
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -75,113 +202,149 @@ system to the devices file.
.
.SH USAGE
.
.nh
.na
Add devices from specific VGs to the devices file.
.br
.P
\fBvgimportdevices\fP \fIVG\fP|\fITag\fP|\fISelect\fP ...
.B vgimportdevices
\fIVG\fP|\fITag\fP|\fISelect\fP\ .\|.\|.\&
.RS
[
.O_select
]
.br
.RS 4
.na
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.br
[ \fB--foreign\fP ]
[
.O_foreign
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Add devices from all accessible VGs to the devices file.
.br
.P
\fBvgimportdevices\fP \fB-a\fP|\fB--all\fP
.br
.RS 4
.na
[ \fB--foreign\fP ]
.B vgimportdevices
.O_all
.RS
[
.O_foreign
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.
.P
\(em
.P
.
Add devices from root VG to the devices file.
.br
.P
\fBvgimportdevices\fP \fB--rootvg\fP
.br
.RS 4
.na
[ \fB--auto\fP ]
.B vgimportdevices
.O_rootvg
.RS
[
.O_auto
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for command:
.
.RS 4
.na
[ \fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP ]
.ad
.RS
[
.O_reportformat
]
.RE
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.TP
.O_all
.
.HP
\fB-a\fP|\fB--all\fP
.br
.
.HP
\fB--auto\fP
.br
.TP
.O_auto
This option is used when automatically importing devices for the root VG.
The auto import is intended to be done once, on first boot, to create an
initial system.devices file for the root VG.
@@ -189,63 +352,54 @@ When this option is used, the vgimportdevices --rootvg command does nothing
if system.devices exists, or the file auto-import-rootvg does not exist
(both in the \fI#DEFAULT_SYS_DIR#/devices/\fP directory.)
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB--foreign\fP
.br
.TP
.O_foreign
Report/display foreign VGs that would otherwise be skipped.
See \fBlvmsystemid\fP(7) for more information about foreign VGs.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -253,45 +407,38 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB--reportformat\fP \fBbasic\fP|\fBjson\fP|\fBjson_std\fP
.br
.TP
.O_reportformat
Overrides current output format for reports which is defined globally by
the report/output_format setting in \fBlvm.conf\fP(5).
\fBbasic\fP is the original format with columns and rows.
@@ -301,14 +448,12 @@ output in JSON format. \fBjson_std\fP produces report output in
JSON format which is more compliant with JSON standard.
See \fBlvmreport\fP(7) for more information.
.
.HP
\fB--rootvg\fP
.br
.TP
.O_rootvg
Import devices used for the root VG.
.
.HP
\fB-S\fP|\fB--select\fP \fIString\fP
.br
.TP
.O_select
Select objects for processing and reporting based on specified criteria.
The criteria syntax is described by \fB--select help\fP
and \fBlvmreport\fP(7).
@@ -320,29 +465,25 @@ showing 1 if the row matches the selection and 0 otherwise.
For non-reporting commands which process LVM entities, the selection is
used to choose items to process.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -352,18 +493,22 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I Tag
Tag name. See \fBlvm\fP(8) for information about tag names and using tags
in place of a VG, LV or PV.
.
.TP
.I Select
Select indicates that a required positional parameter can
be omitted if the \fB--select\fP option is used.
No arg appears in this position.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -393,5 +538,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

View File

@@ -1,14 +1,124 @@
.TH VGMERGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.ie t \{\
.\" PostScript/PDF with tabs
. ds TT \t
. ds DTT \t\t
.\}
.el \{\
. ds TT \&
. ds DTT \0\0\0
.\}
.
.de OPT
.ie \\n(.$>1 \\*[TT]\fB-\\$1\fP|\\*[TT]\fB--\\$2\fP\c
.el \\*[DTT]\fB--\\$1\fP\c
..
.
.de OPA
.OPT \\$*
\ \c
..
.de OPS
.OPT \\$*
\&
..
.
.
.\"List of all options as O_string.
.
.de O_autobackup
.OPA A autobackup
\fBy\fP|\fBn\fP
..
.de O_commandprofile
.OPA commandprofile
\fIString\fP
..
.de O_config
.OPA config
\fIString\fP
..
.de O_debug
.OPA d debug
\&\.\|.\|.\&
..
.de O_devices
.OPA devices
\fIPV\fP
..
.de O_devicesfile
.OPA devicesfile
\fIString\fP
..
.de O_driverloaded
.OPA driverloaded
\fBy\fP|\fBn\fP
..
.de O_help
.OPS h help
..
.de O_journal
.OPA journal
\fIString\fP
..
.de O_list
.OPS l list
..
.de O_lockopt
.OPA lockopt
\fIString\fP
..
.de O_longhelp
.OPS longhelp
..
.de O_nohints
.OPS nohints
..
.de O_nolocking
.OPS nolocking
..
.de O_poolmetadataspare
.OPA poolmetadataspare
\fBy\fP|\fBn\fP
..
.de O_profile
.OPA profile
\fIString\fP
..
.de O_quiet
.OPA q quiet
\&\.\|.\|.\&
..
.de O_test
.OPS t test
..
.de O_verbose
.OPA v verbose
\&\.\|.\|.\&
..
.de O_version
.OPS version
..
.de O_yes
.OPS y yes
..
.
.SH NAME
.
vgmerge \(em Merge volume groups
.
.SH SYNOPSIS
.
.nh
.TP
\fBvgmerge\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
[ \fIoption_args\fP ]
.hy
.
.ds TT \&
.ds DTT \&
.
.
.SH DESCRIPTION
.
@@ -18,123 +128,156 @@ of both VGs fit into the destination VG's limits.
.
.SH USAGE
.
\fBvgmerge\fP \fIVG\fP \fIVG\fP
.br
.RS 4
.nh
.na
[ \fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP ]
.B vgmerge
\fIVG\fP \fIVG\fP
.RS
[
.O_autobackup
]
.br
[ \fB-l\fP|\fB--list\fP ]
[
.O_list
]
.br
[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
[
.O_poolmetadataspare
]
.br
[ COMMON_OPTIONS ]
.ad
.RE
.P
\(em
.P
Common options for lvm:
.
.RS 4
.na
[ \fB-d\fP|\fB--debug\fP ]
.RS
[
.O_debug
]
.br
[ \fB-h\fP|\fB--help\fP ]
[
.O_help
]
.br
[ \fB-q\fP|\fB--quiet\fP ]
[
.O_quiet
]
.br
[ \fB-t\fP|\fB--test\fP ]
[
.O_test
]
.br
[ \fB-v\fP|\fB--verbose\fP ]
[
.O_verbose
]
.br
[ \fB-y\fP|\fB--yes\fP ]
[
.O_yes
]
.br
[ \fB--commandprofile\fP \fIString\fP ]
[
.O_commandprofile
]
.br
[ \fB--config\fP \fIString\fP ]
[
.O_config
]
.br
[ \fB--devices\fP \fIPV\fP ]
[
.O_devices
]
.br
[ \fB--devicesfile\fP \fIString\fP ]
[
.O_devicesfile
]
.br
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
[
.O_driverloaded
]
.br
[ \fB--journal\fP \fIString\fP ]
[
.O_journal
]
.br
[ \fB--lockopt\fP \fIString\fP ]
[
.O_lockopt
]
.br
[ \fB--longhelp\fP ]
[
.O_longhelp
]
.br
[ \fB--nohints\fP ]
[
.O_nohints
]
.br
[ \fB--nolocking\fP ]
[
.O_nolocking
]
.br
[ \fB--profile\fP \fIString\fP ]
[
.O_profile
]
.br
[ \fB--version\fP ]
.ad
[
.O_version
]
.RE
.hy
.ad
.
.SH OPTIONS
.
.
.HP
\fB-A\fP|\fB--autobackup\fP \fBy\fP|\fBn\fP
.br
.TP
.O_autobackup
Specifies if metadata should be backed up automatically after a change.
Enabling this is strongly advised!
See \fBvgcfgbackup\fP(8) for more information.
.
.HP
\fB--commandprofile\fP \fIString\fP
.br
.TP
.O_commandprofile
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.
.HP
\fB--config\fP \fIString\fP
.br
.TP
.O_config
Config settings for the command. These override \fBlvm.conf\fP(5) settings.
The String arg uses the same format as \fBlvm.conf\fP(5),
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.
.HP
\fB-d\fP|\fB--debug\fP ...
.br
.TP
.O_debug
Set debug level. Repeat from 1 to 6 times to increase the detail of
messages sent to the log file and/or syslog (if configured).
.
.HP
\fB--devices\fP \fIPV\fP
.br
.TP
.O_devices
Restricts the devices that are visible and accessible to the command.
Devices not listed will appear to be missing. This option can be
repeated, or accepts a comma separated list of devices. This overrides
the devices file.
.
.HP
\fB--devicesfile\fP \fIString\fP
.br
.TP
.O_devicesfile
A file listing devices that LVM should use.
The file must exist in \fI#DEFAULT_SYS_DIR#/devices/\fP and is managed
with the \fBlvmdevices\fP(8) command.
This overrides the \fBlvm.conf\fP(5) \fBdevices/devicesfile\fP and
\fBdevices/use_devicesfile\fP settings.
.
.HP
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
.TP
.O_driverloaded
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.
.HP
\fB-h\fP|\fB--help\fP
.br
.TP
.O_help
Display help text.
.
.HP
\fB--journal\fP \fIString\fP
.br
.TP
.O_journal
Record information in the systemd journal.
This information is in addition to information
enabled by the lvm.conf log/journal setting.
@@ -142,77 +285,65 @@ command: record information about the command.
output: record the default command output.
debug: record full command debugging.
.
.HP
\fB-l\fP|\fB--list\fP
.br
.TP
.O_list
Display merged destination VG like vgdisplay -v.
.
.HP
\fB--lockopt\fP \fIString\fP
.br
.TP
.O_lockopt
Used to pass options for special cases to lvmlockd.
See \fBlvmlockd\fP(8) for more information.
.
.HP
\fB--longhelp\fP
.br
.TP
.O_longhelp
Display long help text.
.
.HP
\fB--nohints\fP
.br
.TP
.O_nohints
Do not use the hints file to locate devices for PVs. A command may read
more devices to find PVs when hints are not used. The command will still
perform standard hint file invalidation where appropriate.
.
.HP
\fB--nolocking\fP
.br
.TP
.O_nolocking
Disable locking. Use with caution, concurrent commands may produce
incorrect results.
.
.HP
\fB--poolmetadataspare\fP \fBy\fP|\fBn\fP
.br
.TP
.O_poolmetadataspare
Enable or disable the automatic creation and management of a
spare pool metadata LV in the VG. A spare metadata LV is reserved
space that can be used when repairing a pool.
.
.HP
\fB--profile\fP \fIString\fP
.br
.TP
.O_profile
An alias for --commandprofile or --metadataprofile, depending
on the command.
.
.HP
\fB-q\fP|\fB--quiet\fP ...
.br
.TP
.O_quiet
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.
.
.HP
\fB-t\fP|\fB--test\fP
.br
.TP
.O_test
Run in test mode. Commands will not update metadata.
This is implemented by disabling all metadata writing but nevertheless
returning success to the calling function. This may lead to unusual
error messages in multi-stage operations if a tool relies on reading
back metadata it believes has changed but hasn't.
.
.HP
\fB-v\fP|\fB--verbose\fP ...
.br
.TP
.O_verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.
.HP
\fB--version\fP
.br
.TP
.O_version
Display version information.
.
.HP
\fB-y\fP|\fB--yes\fP
.br
.TP
.O_yes
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
@@ -222,9 +353,11 @@ answer yes. Use with extreme caution.
.TP
.I VG
Volume Group name. See \fBlvm\fP(8) for valid names.
.
.TP
.I String
See the option description for information about the string content.
.
.TP
.IR Size [UNIT]
Size is an input number that accepts an optional unit.
@@ -254,5 +387,5 @@ where capital letters mean multiple of 1000.)
.SH ENVIRONMENT VARIABLES
.
See \fBlvm\fP(8) for information about environment variables used by lvm.
For example, LVM_VG_NAME can generally be substituted
For example, \fBLVM_VG_NAME\fP can generally be substituted
for a required VG parameter.

Some files were not shown because too many files have changed in this diff Show More