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

Compare commits

...

193 Commits

Author SHA1 Message Date
Alasdair G Kergon
b9a16fe73b pre-release 2017-04-13 00:43:31 +01:00
Alasdair G Kergon
9ed518f19f autoconf 2017-04-13 00:38:46 +01:00
Alasdair G Kergon
5ac230095c make generate 2017-04-13 00:30:05 +01:00
Zdenek Kabelac
a3e8354479 tests: use egrep to check for message
Seems we may get different '' around option on different nixes.
2017-04-12 23:05:50 +02:00
Zdenek Kabelac
59d54d70e7 tests: aux defines fsadm path 2017-04-12 23:05:50 +02:00
Zdenek Kabelac
1e64386dc6 raid: use log_error
Turn log_print into log_error for error path.
2017-04-12 23:05:50 +02:00
Heinz Mauelshagen
1f715ab3b2 lvconvert: return error without conversion
lvconvert parameters not causing a conversion (i.e. no type,
number of stripes, stripesize or regionsize changes) will
remove any allocated reshape space in which case the command
returns success.  If reshape space does not exist though,
return error.
2017-04-12 22:11:30 +02:00
Zdenek Kabelac
56704383bf tests: test for new supported commands
New tests for:

lvconvert --regionsize | --swapmetadata | --startpoll |
          --mergesnapshot | mergethin
2017-04-12 21:34:08 +02:00
Zdenek Kabelac
f8034e14e6 tests: restore some test changes
Restore existing tests and separate new tests
for new options later.

Keep coverage for existing syntax

Reverts bits from commits:

a801b92b2c.
d71aaca07b
fa2a728a39
1e2420bca8
46abc28a48
0e3e611a13
2017-04-12 21:34:08 +02:00
Zdenek Kabelac
3018cdcaa7 fsadm: support configurable full path
Just like with other tools lvm2 is using allow to define
fully configurable path.

Default is selected by $PREFIX/sbin/fsadm
2017-04-12 21:34:08 +02:00
Zdenek Kabelac
1095322901 thin: properly check for status for max sizes metadata
When metadata LV size was over DM_THIN_MAX_METADATA_SIZE sectors,
the info() routine was incorrectly trying to match bigger size,
while we do never pass any bigger device.

Fixing a case, where lvs should be displaying status for metadata
LV with 16GB size.
2017-04-12 21:34:08 +02:00
Zdenek Kabelac
3503ef23e3 cmdline: ensure command struct is defined
Make it clear to Coverity cmd will be defined.
2017-04-12 21:33:47 +02:00
Zdenek Kabelac
635e7e0c92 libdm: set min,maj
Reset derefered pointers instead of pointers.
2017-04-12 21:33:47 +02:00
Zdenek Kabelac
3e3f2a53ea dmfilemapd: free path
Cleanup resources before exit.
2017-04-12 21:33:47 +02:00
Zdenek Kabelac
dfc083d8d6 dmfilemapd: keep 1 byte for \0
Coverity noticed the buffer should have 1 byte for \0.
2017-04-12 21:33:47 +02:00
David Teigland
6c342abb7f commands: improve error message for option rules
When a cmd def RULE fails because of a disallowed
combination of options, improve the error message
to show the option combination, not just the options
that broke the rule.
2017-04-12 14:05:36 -05:00
David Teigland
4b121a1f6f WHATS_NEW: add items since last release 2017-04-12 13:45:37 -05:00
David Teigland
61cfe2d55b commands: add rule for lvconvert commands that create pools
For an lvconvert command that creates a thin pool or cache pool,
--poolmetadata cannot be used with --readahead, --stripes or --stripesize.
2017-04-12 13:33:40 -05:00
Heinz Mauelshagen
19e6c338d3 WHATS_NEW: add recent RAID entries 2017-04-12 19:41:55 +02:00
Heinz Mauelshagen
51a31dbd79 lvconvert: better message on --regionsize
Enhance message on "lvconvert --regionsize size RaidLV".
in case the regionsize does not change and return error.
2017-04-12 19:34:18 +02:00
Bryn M. Reeves
f5b0697c05 WHATS_NEW_DM: add recent dmsetup and dmfilemapd entries 2017-04-12 17:41:29 +01:00
Jonathan Brassow
ba12a2e81a Typo: change loose to lose
loose (v): set free; release
lose (v) : be deprived of or cease to have or retain

We 'lose' redundancy or 'lose' meaning.
2017-04-12 10:28:19 -05:00
Heinz Mauelshagen
532388fad5 lvconvert: fix failing valid regionsize change
Reshape check failed when regionsize changed and current raid type
was provided with no other change requested (stripes or stripesize).

E.g. "lvconvert --type raid6 --regionsize 256K" on a raid6 LV
with != 256K regionsize.

Enable --type in test script.
2017-04-12 14:38:49 +02:00
Heinz Mauelshagen
01b5820d03 lvconvert: add segment type raid10_near
Introducing this alias for "raid10", avoid allocating
reshape space when converting between them.

Resolves: rhbz1441347
2017-04-12 01:28:22 +02:00
Heinz Mauelshagen
7bc85177b0 raid: handle insufficent PVs on takeover from striped/raid0
Remove any newly allocated sub LV (pair) remnants in case
allocation fails due to lag of (parallel) free PV space
and keep initial raid type.

Resolves: rhbz1438013
2017-04-12 00:27:59 +02:00
David Teigland
c7ecf379ab man lvmraid: wrap long lines
Break lines in examples to keep line length under 80.
2017-04-11 15:23:48 -05:00
David Teigland
69c3543855 raid_manip: fix typo warning message 2017-04-11 14:18:57 -05:00
David Teigland
1dfb4a2dae man lvmraid: fix line wrapping in examples 2017-04-11 14:17:08 -05:00
David Teigland
c448dcb349 man lvmraid: use same style as generated pages 2017-04-11 13:20:54 -05:00
David Teigland
04d7444afa lvconvert: require different LV for pool
When convering an LV to a cache or thin LV, require
that an LV being converted to cache pool or thin pool
at the same time be a different LV.
2017-04-11 12:17:14 -05:00
David Teigland
a96c8b46b6 lvconvert: prevent duplicate use of metadata lv
The LV being processed cannot be used as the
pool metadata LV.
2017-04-11 12:11:00 -05:00
David Teigland
e0c169f8b7 man lvmraid: improve text layout 2017-04-11 10:55:02 -05:00
David Teigland
2fd9ae0703 lvconvert: validate vg name prefix for pool metadata name 2017-04-11 10:40:08 -05:00
David Teigland
21da004e58 man lvcreate/lvconvert: minor clean up rewording 2017-04-11 10:21:36 -05:00
David Teigland
a4f07b701a commands: check required option value when matching command
A command def can include a specific constant option value,
but the value was not being checked for optional opts.

e.g. this is an incorrect command and does not match any
command defs:

lvconvert --type cache --cachepool vg/lv

However, it was mistakely being matched to this cmd def,
where the required options match, but the optional options
do not:

lonvert --cachepool LV_linear_striped_raid_cachepool
OO: --type cache-pool, ...

The optional options were mistakely considered matching
because 'cache' and 'cache-pool' were not being compared.
2017-04-10 13:41:47 -05:00
Heinz Mauelshagen
a14a8cef2f signals: fix comparison flaw
commit 9a689fb8f0
fixed SIGINT blocking but introduced a comparision
flaw to sigint_restore().

Related: rhbz1440766
2017-04-10 18:41:28 +02:00
Heinz Mauelshagen
9a689fb8f0 signals: fix SIGINT blocking flaw causing inconsistent metadata
SIGINT isn't blocked properly after a sigint_allow(),
sigint_restore() cycle leading to illicit interruptable
metadata updates.  These can leave corrupted metadata behind.

Issues addressed in this commit:

sigint_allow() fails to set _oldmasked[] members properly due
to an offset by one bug on indexing the members of the array.

It bails out prematurely comparing to MAX_SIGINTS causing nesting
depths to be one less than MAX_SIGINTS.  Fix the comparision.

Correct the related comparison flaw in sigint_restore().

Initialize all sig_atomic_t variables consequently.

Resolves: rhbz1440766
2017-04-10 18:16:09 +02:00
Heinz Mauelshagen
ef3e1013aa lvconvert: cleanup prompting 2017-04-06 19:59:57 +02:00
Heinz Mauelshagen
eb6302c8cb lvconvert: fixe conversion message
When selecting a convenience RAID type only display
the selected type when it changed.  Display proper
current raid type when prompting.
2017-04-06 19:28:32 +02:00
Heinz Mauelshagen
653bca6811 lvconvert: raid1 -> linear prompt
Avoid 2 prompts when downconverting raid1 to linear
(related commit 0f65d7ec3a).
2017-04-06 19:24:11 +02:00
Heinz Mauelshagen
3b1a96b9b3 lvconvert: avoid error message on raid1 -> raid4 conversion
Avoid error message
"Logical Volume *_rimage_0 already exists in volume group,,,"
on takeover conversion from a 2-legged raid1 to raid4
(aiming to reshape it adding images).

Resolves: rhbz1439398
2017-04-06 19:09:05 +02:00
Heinz Mauelshagen
0f65d7ec3a lvconvert: prompt on raid1 image changes
Don't change resilience of raid1 LVs without --yes.

Adjust respective tests.
2017-04-06 18:47:41 +02:00
Heinz Mauelshagen
e350b83d50 raid: reload on removing images
Requesting _raid_remove_images() to commit the
metadata missed to reload the origin causing a
kernel takeover error converting a 2-legged raid1
(with previously removed images) to raid5.
2017-04-06 00:47:34 +02:00
Heinz Mauelshagen
a8d5ada452 man: lvmraid.7 raid6_n_6 fix 2017-04-06 00:35:12 +02:00
Heinz Mauelshagen
d23cad16c9 raid: tidying 2017-04-06 00:06:52 +02:00
Heinz Mauelshagen
1ef1bdab27 lvconvert: allow --type with --regionsize
Allow the combination of both arguments keeping
the raid level but changing the regionssize
(e.g. "lvconvert --type raid1 --regionsize 1M RaidLV"
 on an existing raid1 LV).

Resolves: rhbz1438396
2017-04-06 00:03:16 +02:00
David Teigland
7ccb4825c7 lvchange/lvconvert: fix missing lvmlockd LV locks
lvchange/lvconvert operations that do not require the LV
to already be active need to acquire a transient LV lock
before changing/converting the LV to ensure the LV is not
active on another host.  If the LV is already active,
a persistent LV lock already exists on the host and the
transient LV lock request is a no-op.

Some lvmlockd locks in lvchange were lost in the cmd def
changes.  The lvmlockd locks in lvconvert seem to have
been missed from the start.
2017-04-05 16:46:38 -05:00
Heinz Mauelshagen
c9bc1c1c8c lvchange: tidy switch code in _lvchange_properties_single() 2017-04-05 17:29:31 +02:00
David Teigland
6fdc391bae lvchange: fix missing return value
A return value from lvchange_persistent_cmd() was missed
in commit 1c41898c07
2017-04-05 10:08:01 -05:00
Peter Rajnoha
448bf9491a lvmconf: fix systemd unit existence check for lvmconf --services --startstopservices
We have to unset the LoadState variable from previous use when we check
for systemd unit state. We use this variable to check if systemd services
are loaded or not and if it is loaded, we issue systemctl commands to
enable/disable and start/stop the service. We don't issue these commands
if the unit is not loaded to avoid error messages which may confuse users.
2017-04-05 11:06:56 +02:00
David Teigland
afa844817a commands: fix misspelling of option value
(The cmd def parser really needs to catch mistakes
like this as it did when it was external.)
2017-04-04 17:09:35 -05:00
David Teigland
a7d4156a9a lvchange: fix --poll value when set from option
The actual value specified by the --poll y|n option was not
being used.  The way the --poll value is used is hidden
through an indirection where the value is stored in a
global variable at the start of the command, and then the
value is read from there later.  Setting the global
variable early in the command had been lost with the
cmd def changes.
2017-04-04 17:04:45 -05:00
David Teigland
1c41898c07 vgchange/lvchange: fix poll and monitor use
Fill in some gaps where old versions of lvm allowed
--poll and --monitor in combination with other operations,
but those combinations had been lost since the cmd def work.
(The new cmd def code also added some combinations that
had been missed by the old code.)

Changes:

lvchange --activate: add poll and monitor options, and
                     add calls to them in implementation.

lvchange --refresh: add monitor option (poll already there),
                    and call to monitor in implementation.

lvchange <metadata ops>: add poll and monitor options, and
                         add calls to them in implementation.

vgchange <metadata ops>: add poll option (call to poll
                         already in implementation).

vgchange --refresh: remove monitor option (not used by code)

lvchange --persistent y: add poll and monitor options, and
                         add calls to them, and to activate
                         in the implementation. (Making it
                         match the main lvchange metadata
                         command.)

Summary of current usage:

lvchange --activate: monitor, poll
vgchange --activate: monitor, poll

lvchange --refresh: monitor, poll
vgchange --refresh: poll

lvchange --monitor: ok
lvchange --poll: ok
lvchange --monitor --poll: ok
vgchange --monitor: ok
vgchange --poll: ok
vgchange --monitor --poll: ok

lvchange <metadata ops>: monitor, poll
vgchange <metadata ops>: poll
2017-04-04 17:04:45 -05:00
Heinz Mauelshagen
a12b3af033 lvchange: enhance avoiding multiple metadata updates/reloads/backups
Enhance commit 25b5915c9b
to process options requiring immediate metadata commits
and reloads after those we can group together doing just
one commit and an optional reload for the whole group.

Backup metadata after processing options successfully.

Related: rhbz1437611
2017-04-04 23:53:55 +02:00
Heinz Mauelshagen
e7ec9aab8a man: '-pool' regexp 2017-04-04 23:53:28 +02:00
David Teigland
76b70d5058 lvconvert: fix converting hidden lv to pool
A hidden LV can not be converted to a thin pool or cache pool.
2017-04-04 16:47:47 -05:00
David Teigland
b951d04337 help: print all options in abbreviated help output
Don't abbreviate the --help output quite as much
when there are many command defs.  Print all the
options in the cmd defs that are shown.  --longhelp
output is unchanged and includes everything.
2017-04-03 16:36:04 -05:00
David Teigland
29161a145e commands: missing comma in cmd def option list
Does not affect parsing, but keep it consistent.
2017-04-03 16:20:55 -05:00
David Teigland
db579b9e93 help: include cmd def info in verbose output
It can sometimes be important to correlate a
command with its cmd def entry, so include
the cross reference info in help -vv output.
2017-04-03 16:17:37 -05:00
David Teigland
dece723dc7 commands: recognize ignored options 2017-04-03 15:49:24 -05:00
David Teigland
162272e5a5 commands: ignore partial option in most cases
These days --partial is only used with activation in
lvchange/vgchange.  It probably had another meaning
at some point in history which is no longer used,
so ignore it in those cases.

When included in the OO list, the option is advertised in
help/man output, implying it is meaningful to the command,
when in fact the command never uses it.
The IO list means the option won't cause an error if it's
used, but is not displayed as an valid option for the command.
If the option is not included in either OO or IO lists,
using the option would cause a command error, which would cause
problems for anyone is using the option for historical reasons.
2017-04-03 15:43:04 -05:00
David Teigland
51ff707ac8 man: fix description of --partial option 2017-04-03 14:15:29 -05:00
David Teigland
e0f284d372 lvchange: refresh command missing activationmode option 2017-04-03 13:44:35 -05:00
Heinz Mauelshagen
25b5915c9b lvchange: avoid multiple metadata updates/reloads/backups
_lvchange_properties_single() processes multiple command
line arguments in a loop causing metadata updates and/or
backups per argument.

Optimize to only perform one update and/or backup
(but necessary interim ones; e.g. for --resync)
per command run.

Related: rhbz1437611
2017-04-01 02:38:48 +02:00
Zdenek Kabelac
fb1f38a6f6 tests: fix LD_LIBRARY_PATH
Use only selected paths for finding .so in builddir.
So if builddir constains some embeded subdirs with some more
occurences of project (i.e.  'make rpm' build subdir)
those library paths will not get into list.
2017-03-31 17:12:00 +02:00
Zdenek Kabelac
970df59f91 cache: scan kallsyms for kernel symbols
With monolithic kernels we can't actually modprobe
for cache modules as they are already compiled-in
and policy modules do not export version symbol.

Reported issue on list:
https://www.redhat.com/archives/dm-devel/2017-March/msg00061.html

Fix will try to look for explicit kernel symbols first before
calling modprobe.
2017-03-31 17:12:00 +02:00
Heinz Mauelshagen
13ca11cc14 lvchange: persistent major/minor processing regression
Optimized change.

Resolves: rhbz1437611
2017-03-31 17:09:33 +02:00
Heinz Mauelshagen
d6ddacf6a1 lvchange: persistent major/minor processing regression
Fix a regression introduced by new command line processing
(see starting commit 1e2420bca8)
causing activation to be rejected in combination with setting
persistent minor device numbers.

Resolves: rhbz1437611
2017-03-31 13:51:39 +02:00
Heinz Mauelshagen
0ed087aae5 man: pregen file change 2017-03-30 20:48:53 +02:00
Heinz Mauelshagen
92ac1da16a man-generator: shutdown stdout buffer
Flush stdout and switch it back to line buffering before exit.
2017-03-30 20:40:44 +02:00
Heinz Mauelshagen
2c4e8254de man-generator: enhance performance
Set block buffering on stdout to
save ~30% time generating manuals.
2017-03-30 19:55:50 +02:00
Heinz Mauelshagen
0da040b1eb man-generator: don't ignore description file errors
In case we provide a description file it has to
succeed opening and reading.  Dynamically allocate
buffer space for it whilst on it.
2017-03-30 19:51:35 +02:00
Heinz Mauelshagen
980e4f673e raid: more coverity issues 2017-03-30 18:39:04 +02:00
Heinz Mauelshagen
c34ab29ec6 raid: favour dm_list_first() 2017-03-30 18:13:27 +02:00
Heinz Mauelshagen
2d75ef3b05 raid: address coverity issues 2017-03-30 18:09:06 +02:00
Heinz Mauelshagen
b3854155d9 man-generator: add '.' to all messages 2017-03-30 17:54:36 +02:00
Heinz Mauelshagen
99dc49c7dd man: add minor regexp 2017-03-30 17:54:02 +02:00
Bryn M. Reeves
2b46fe5843 dmsetup: replace (f)printf("\n") with putchar/putc 2017-03-30 16:30:50 +01:00
Bryn M. Reeves
febda60f3d libdm: use correct FMTu32 format specifier for uint32_t 2017-03-30 16:17:19 +01:00
Bryn M. Reeves
e8d5e05ff5 libdm: fix incorrect format specifier in _stats_resize_group()
The bitmap size in dm_bitset_t[0] is a uint32_t, not uint64_t: use
%u instead of FMTu64.
2017-03-30 10:31:36 +01:00
Nir Soffer
b8b2b1efd8 dmsetup: Flush ouptut when using --interval 2017-03-30 10:17:32 +01:00
Bryn M. Reeves
c7e4b97abc libdm: use uint64_t where possible in filemap routines
Use uint64_t where possible and explicit casts elsewhere to avoid
compiler warnings when converting between int, int64_t and
uint64_t.
2017-03-30 10:02:54 +01:00
Bryn M. Reeves
b823646ace libdm: use size_t for buflen in _stats_group_file_regions() 2017-03-30 10:02:45 +01:00
Bryn M. Reeves
833b02106d libdm: make _stats_resize_group() num_regions argument uint64_t 2017-03-30 10:02:39 +01:00
Bryn M. Reeves
722542fabb libdm: make _find_extent() nr_extents argument uint64_t 2017-03-30 10:02:35 +01:00
Bryn M. Reeves
5e74e43896 dmfilemapd: cast return value of strto* functions when needed 2017-03-30 10:02:31 +01:00
Bryn M. Reeves
834574cc27 dmfilemapd: use log_sys_error in _filemap_monitor_set_notify
Since _filemap_monitor_set_notify() is only called after daemon
start up it should not use the _early_log() macros. Instead, use
log_sys_error to log errors from the two syscalls in the function.
2017-03-30 10:01:57 +01:00
Bryn M. Reeves
bfc880994c dmfilemapd: cast sysconf() return value to int 2017-03-30 09:57:58 +01:00
Bryn M. Reeves
76b6cbea60 dmfilemapd: fix len type in _filemap_monitor_check_file_unlinked()
Make 'len' a size_t to match the return type of readlink(2).
2017-03-30 09:57:58 +01:00
Bryn M. Reeves
660bd4fe3e dmfilemapd: make filemap_monitor->nr_regions uint64_t 2017-03-30 09:57:58 +01:00
Bryn M. Reeves
ac6089ee8d libdm: use DM_STATS_GROUP_* constants in dm_stats_create_regions_from_fd 2017-03-30 09:57:58 +01:00
Bryn M. Reeves
fe0922b8a6 dmsetup: simplify branching in _stats_update_file()
The fallback branch in _stats_update_file() is redundant (since the
branch taken when the daemon starts successfully must jump to the
'out' label anyway): remove it and re-order the conditions to
improve readability.
2017-03-30 09:57:58 +01:00
Heinz Mauelshagen
803b1775ba man: raid cleanup 2017-03-30 00:44:35 +02:00
Heinz Mauelshagen
b6724fa423 man: Copyright 2017-03-30 00:44:35 +02:00
Heinz Mauelshagen
e9921ffd33 man: use variable in Makefile / regexp 2017-03-30 00:44:35 +02:00
Heinz Mauelshagen
2f1fd1584e man-generator: catch missing command name 2017-03-30 00:44:34 +02:00
Zdenek Kabelac
df86ee8c21 tests: fix typo in makefile
Use properly $(SORT)
2017-03-30 00:38:41 +02:00
Zdenek Kabelac
a66411bd7a man: fix type
With commit 4af09a94bd unwanted rename  of
target happened - restore it.
2017-03-30 00:38:41 +02:00
Zdenek Kabelac
dfdd6ccf3b vgrename: use long enough buffer for path
Use PATH_MAX when creating buffers for rename.
2017-03-30 00:38:41 +02:00
Bryn M. Reeves
4b3d71212f libdm: use log_sys_error if dmfilemapd exec fails
Use log_sys_error rather than log_error if execvp() fails:

  /mnt/redhat/xdoio.13752.XIORQ: Created new group with 2 region(s) as group ID 0.
  # execvp() failed.

vs:

  /var/lib/libvirt/images/rhel7-vm1.qcow2: Created new group with 884 region(s) as group ID 0.
  dmfilemapd: execvp failed: No such file or directory
2017-03-29 21:38:15 +01:00
Bryn M. Reeves
5994ed9df2 dmsetup: always close fd when leaving _stats_update_file() (coverity) 2017-03-29 18:34:57 +01:00
Bryn M. Reeves
11749e7adb dmsetup: do not start dmfilemapd if region creation fails (coverity) 2017-03-29 18:34:51 +01:00
Bryn M. Reeves
6740eb1c2b libdm: do not attempt filemap cleanup if dm_stats_list() fails (coverity) 2017-03-29 18:34:43 +01:00
Bryn M. Reeves
f86c1f5d0a libdm: abort filemap update if pool allocation fails (coverity) 2017-03-29 18:34:38 +01:00
Bryn M. Reeves
bc5d67884f libdm: do not leak FIEMAP extent buffer if pool allocation fails (coverity) 2017-03-29 18:34:30 +01:00
Bryn M. Reeves
13426092e9 dmfilemapd: free region table at end of _update_regions() (coverity) 2017-03-29 18:34:24 +01:00
Bryn M. Reeves
f66bc3dab0 dmfilemapd: fix off-by-one in fd comparison (coverity)
The function _filemap_monitor_check_file_unlinked() attempts to
test whether a fd value should be closed by comparison to zero:

        if ((fd > 0) && close(fd))
                log_error("Error closing fd %d", fd);

The test should be '>=' since 0 is a valid file descriptor.
2017-03-29 18:34:19 +01:00
Bryn M. Reeves
8658bbe3ee dmfilemapd: always close link check file descriptor (coverity)
Similar to 40fb91a, but for the file descriptor opened using the
link path reported by /proc/<self>/fd/<fd>.

The daemon opens a new file descriptor from /proc/<self>/fd when
checking for an unlinked file with mode=inode. Ensure that it is
always closed even if the same file test fails.
2017-03-29 18:34:11 +01:00
Bryn M. Reeves
7db51a6bed dmfilemapd: always terminate link buffer after readlink(2) (coverity) 2017-03-29 18:34:05 +01:00
Bryn M. Reeves
70bb726678 dmfilemapd: always close check file descriptor (coverity)
The daemon opens a new file descriptor from fm->path when checking
for an unlinked file with mode=inode. Ensure that it is always
closed even if the same file test fails.
2017-03-29 18:33:53 +01:00
Bryn M. Reeves
43fdbb8aeb dmfilemapd: use *argv[0] when testing for absolute path (coverity)
The path argument check in dmfilemapd incorrectly tests for:

  if (argv[0] == '/')

Rather than testing the 1st character in the string pointed to by
argv[0].
2017-03-29 18:33:42 +01:00
Bryn M. Reeves
b5252a51a5 dmfilemapd: pass correct dirp to closedir() 2017-03-29 16:54:44 +01:00
Bryn M. Reeves
481a522dd7 dmfilemapd: do not closdir(pid_d) unless it is open 2017-03-29 16:48:32 +01:00
Bryn M. Reeves
d71071a1af dmfilemapd: log closedir errors with log_sys_error() 2017-03-29 16:04:15 +01:00
Marian Csontos
5dfd35f2f8 dmstats: Fix path to static dmstats 2017-03-29 09:04:56 +02:00
Heinz Mauelshagen
5012be326d man: ranges/LV names/symbolic use regexp 2017-03-29 02:27:10 +02:00
Heinz Mauelshagen
4af09a94bd man: simplify by avoiding different headers on de-duplication of lvmconfig, lvm-config and lvm-dumpconfig 2017-03-29 01:44:09 +02:00
Heinz Mauelshagen
6742137964 man: de-duplicate lvmconfig, lvm-config and lvm-dumpconfig manuals 2017-03-29 00:22:15 +02:00
Marian Csontos
162552041f spec: Add dmfilemapd 2017-03-28 21:52:50 +02:00
Marian Csontos
a41d5b6491 dmfilemapd: Fix install target 2017-03-28 21:52:30 +02:00
Heinz Mauelshagen
3aab873199 man: regexp readability / use $(SED) 2017-03-28 17:51:22 +02:00
Alasdair G Kergon
0c2f7ed49a post-release 2017-03-28 16:14:03 +01:00
Alasdair G Kergon
396377bc03 pre-release
Removing some unused new lines and changing some incorrect "can't
release until this is fixed" comments.  Rename license.txt to make
it clear its merely an included file, not itself a licence.
2017-03-28 16:11:35 +01:00
Alasdair G Kergon
b9399f2148 man: pre-generated files weren't committed 2017-03-28 01:32:59 +01:00
Heinz Mauelshagen
19a72e601f man: fix / typo 2017-03-28 00:27:04 +02:00
Heinz Mauelshagen
7f31261844 man: enhance man postprocessing regexp 2017-03-28 00:17:43 +02:00
Zdenek Kabelac
88e408b8ed tests: update to better fit
Die is automatic on 'error' result
Cleanup everything on 'regular' code path.
2017-03-27 20:50:19 +02:00
Zdenek Kabelac
e3a3cf01eb cleanup: use more common FMTd64 type
We use 'd' for plain singed integers.
2017-03-27 20:50:19 +02:00
Mikulas Patocka
78d004efa8 build: fix x32 arch
This patch fixed lvm2 compilation running on x32 arch.
(Using 64bit x86 cpu features but running on 32b address space,
so consuming less mem in VM).

On x32 arch 'time_t' is 64bit while 'long' is 32bit.
2017-03-27 20:50:19 +02:00
Heinz Mauelshagen
36cac41115 man-generator/man/help: simplify hyphen escaping
Commits a29bb6a14b
    ... 5c199d99f4
narrowed down on addressing the escaping of hyphens
in the dynamic creation of manuals whilst avoiding
them in creating help texts.  This lead to a sequence
of slipping through hyphens adrressed by additional
patches in aforementioned commit series.

On the other hand, postprocessing dynamically man-generator
created and statically provided manuals catches all hyphens
in need of escaping.

Changes:
- revert the above commits whilst keeping man-generator
  streamlining and the detection of any '\' when generating
  help texts in order to avoid escapes to slip in

- Dynamically escape hyphens in manaual pages using sed(1)
  in the respective Makefile targets

- remove any manually added escaping on hyphens from any
  static manual sources or headers
2017-03-27 16:49:39 +02:00
Heinz Mauelshagen
6165e09221 lvchange: reject setting all raid1 images to writemostly
raid1 doesn't allow to set all images to writemostly because at
least one image is required to receive any written data immediately.

The dm-raid target will detect such invalid request and
fail it iwith a kernel error message.

Reject such request in uspace displaying a respective error message.
2017-03-26 20:28:04 +02:00
Heinz Mauelshagen
5c199d99f4 man: a few more missed '-' to escape 2017-03-25 03:40:02 +01:00
Heinz Mauelshagen
66b2084b96 man-generator: more escaped '-' 2017-03-24 18:57:45 +01:00
Heinz Mauelshagen
d823c65d50 man-generator: fix buffer length calculation 2017-03-24 18:33:03 +01:00
Alasdair G Kergon
25c841af00 make: Don't hard-code SHELL as /bin/sh 2017-03-24 15:29:17 +00:00
Heinz Mauelshagen
4046f9bd95 man/help: avoid escaping of '-' with --help 2017-03-24 15:14:21 +01:00
Heinz Mauelshagen
e9433a9de9 WHATS_NEW: man-generator escape '-' 2017-03-24 14:31:19 +01:00
Heinz Mauelshagen
9354ce6045 man-generator: cleanup escape '-' 2017-03-24 14:27:59 +01:00
Heinz Mauelshagen
10e0a5066e man-generator: emit escaped '-' 2017-03-24 04:00:47 +01:00
Heinz Mauelshagen
5eec3de41f man: escape all single '-' 2017-03-24 02:46:11 +01:00
Heinz Mauelshagen
93467f0d9f man: revert erouneous '-' escapes in Makefine.in 2017-03-24 01:39:50 +01:00
Heinz Mauelshagen
a29bb6a14b man: escape all double '-' 2017-03-24 01:03:58 +01:00
Alasdair G Kergon
2eaca7ab63 tools: Reinstate lvm script processing.
We check for a script if the command isn't recognised (ENO_SUCH_CMD).
(Also added a few comments and fixed some whitespace.)
2017-03-23 23:20:53 +00:00
Heinz Mauelshagen
fe3b9bb7d4 libdm: typo 2017-03-24 00:12:41 +01:00
David Teigland
6471bb2c41 commands: improve error message for unknown command
when running "lvm foo".
2017-03-23 03:35:06 -05:00
David Teigland
0dabe7237c commands: fix commands with run with path basename
The recent command definitions commit took the command
name from argv[0] without applying basename to the value,
so a pathname, e.g. /usr/sbin, would cause lvm to not
recognize the command name.
2017-03-23 03:06:07 -05:00
Alasdair G Kergon
e8362b4cb7 tools: Show configuration command line in lvm version.
Also update configure.in with some items recently added to the tree.
2017-03-23 01:01:35 +00:00
Heinz Mauelshagen
b84bf3e8cd raid: adjust to misordered raid table line output
This commit supersedes reverted 1e4462dbfb
to avoid changes to liblvm and the libdm API completely.

The libdevmapper interface compares existing table line retrieved from
the kernel to new table line created to decide if it can suppress a reload.
Any difference between input and output of the table line is taken to be a
change thus causing a table reload.

The dm-raid target started to misorder the raid parameters (e.g. 'raid10_copies')
starting with dm-raid target version 1.9.0 up to (excluding) 1.11.0.  This causes
runtime failures (limited to raid10 as of tests) and needs to be reversed to allow
e.g. old lvm2 uspace to run properly.

Check for the aforementioned version range in libdm and adjust creation of the table line
to the respective (mis)ordered sequence inside and correct order outside the range
(as described for the raid target in the kernels Documentation/device-mapper/dm-raid.txt).
2017-03-23 01:20:00 +01:00
Heinz Mauelshagen
1bf90dac77 Revert "raid: adjust to misordered raid table line output"
This reverts commit 1e4462dbfb
in favour of an enhanced solution avoiding changes in liblvm
completetly by checking the target versions in libdm and emitting
the respective parameter lines.
2017-03-23 01:19:41 +01:00
David Teigland
14c4d32247 commands: fix combined thin pool and vol create defs
Fixes command defs related to creating a new thin pool and
then a new thin lv in the new pool.

1. lvcreate --size --virtualsize --thinpool
   Needs a cmd def, it was missing.
   The def is unique by the three required
   options: size, virtualsize and thinpool.

2. lvcreate --size --virtualsize --thinpool VG
   Needs a cmd def, it was missing.
   The def is unique by the three required
   options: size, virtualsize and thinpool,
   and one required positional arg: VG.

3. lvcreate --thin --virtualsize --size LV_new|VG
   This existing def should not accept an optional
   --type thin, which if used makes it indistinct
   from another def.

4. lvcreate --size --virtualsize VG
   This existing def should not accept an optional
   --type thin or --thin, which if used makes it
   indistinct from other defs (e.g. 3)
2017-03-21 22:04:01 -05:00
David Teigland
3be2e61c9f Revert "lvcreate: continue to accept --thinpool with -L and -V but not -T"
This reverts commit 642d682d8d.

Using the thinpool option with this cmd def makes it
indistinct from other cmd defs where thinpool is a
required option.
2017-03-21 22:01:19 -05:00
Heinz Mauelshagen
7126fb13e7 metadata: cleanup flags definition to be consistent
Use shift bitops throughout segtype.h.
2017-03-22 00:29:49 +01:00
Heinz Mauelshagen
1810162b51 WHATS_NEW: adjust to misordered raid parameters 2017-03-21 18:18:58 +01:00
Heinz Mauelshagen
1e4462dbfb raid: adjust to misordered raid table line output
The libdevmapper interface compares existing table line retrieved from
the kernel to new table line created to decide if it can suppress a reload.
Any difference between input and output of the table line is taken to be a
change thus causing a table reload.

The dm-raid target started to misorder the raid parameters (e.g. 'raid10_copies')
starting with dm-raid target version 1.9.0 up to (excluding) 1.11.0.  This causes
runtime failures (limited to raid10 as of tests) and needs to be reversed to allow
e.g. old lvm2 uspace to run properly.

Check for the aforementioned version range and adjust creation of the table line
to the respective (mis)ordered sequence inside and correct order outside the range
(as described for the raid target in the kernels Documentation/device-mapper/dm-raid.txt).
2017-03-21 18:17:42 +01:00
Alasdair G Kergon
642d682d8d lvcreate: continue to accept --thinpool with -L and -V but not -T
lvcreate --thinpool POOL1 -L 100M --virtualsize 100M snapper_thinp

https://bugzilla.redhat.com/1434027

(The general rule is that a command is accepted if it is unambiguous.
The combination -L -V --thinpool uniquely identifies the operation.)
2017-03-20 22:04:37 +00:00
Alasdair G Kergon
b3e833c777 man-generator: Remove unused variable.
man-generator.c:2976:6: warning: variable "sep" set but not used
2017-03-20 16:55:30 +00:00
Tony Asleson
862ca6e8b7 lvmdbusd: Rename ee to got_external_event
This variable is global, make it more descriptive.
2017-03-20 10:08:39 -05:00
Tony Asleson
b65a9230a3 lvmdbusd: Update state during pv move
Periodically update the state during pv move so that all the different
dbus objects reflect something close to reality during the process.
2017-03-20 10:08:39 -05:00
Tony Asleson
3ead4fb7ac lvmdbusd: Limit state refreshes for udev events
Udev events can come in like a flood when something changes.  It really
doesn't do us any good to refresh the state of the service numerous times
when 1 would suffice.  We had something like this before, but it was
removed when we added the refresh thread.  However, we have since learned
that we need to sequence events in the correct order and block dbus
operations if we believe the state has been affected, thus udev events are
being processed on the main work queue.  This change limits spurious
work items from getting to the queue.
2017-03-20 10:08:39 -05:00
Tony Asleson
7eeb093fdd lvmdbusd: Call add_no_notify for *move commands
Missed this in change when "add_no_notify" was added.  This was causing
extra external events to process when we did moves.
2017-03-20 10:08:38 -05:00
Tony Asleson
2dc71fc291 lvmdbusd: Only disable notify_dbus after getting external event
If we always disable the sending of notify dbus events then in the case
where all the users are lvm dbus users we will be in udev handling mode
until at least 1 external lvm command occurs.  Instead we will not disable
notify dbus until after we get at least 1 external event.  This makes the
service get into the correct mode of operation faster.
2017-03-20 10:08:38 -05:00
Zdenek Kabelac
17b56a4aed tests: early detect leaking error dev
lvconvert should not leak 'error' device.

(This patch is not fix the problem, just makes it more easily visible
instead of more confusing 'clvmd' trace).
2017-03-20 14:18:50 +01:00
David Teigland
07040942ed man: advise against mirrored mirror log 2017-03-17 11:54:39 -05:00
David Teigland
8d7be8f5df help: align option list in pv/lv/vgchange cases
Align one-required options like is done for
optional options.
2017-03-17 11:23:38 -05:00
Heinz Mauelshagen
fec2ea76cf raid: check target version for shrink support
Starting with dm-raid target version 1.9.0 shrinking of mapped devices is supported.
Check for support being present in lvresize and lvreduce.

Related: rhbz1394048
2017-03-17 16:46:33 +01:00
Heinz Mauelshagen
17a8f3d6f0 raid: conditionally reject convert to striped/raid; fix
Fix a logic flaw introduced in commit 17bee733d1
preventing e.g. striped -> raid5 conversions.

Related: rhbz1191935
Related: rhbz1366296
2017-03-17 16:03:35 +01:00
Heinz Mauelshagen
6ebf39da91 WHATS_NEW: conditionally reject raid convert 2017-03-17 14:51:10 +01:00
Heinz Mauelshagen
76709aaf39 raid: cleanup; remove unused function
Remove unused function (lv_has_constant_stripes() is used instead).
2017-03-17 14:24:44 +01:00
Zdenek Kabelac
07ea9887d3 tests: raise min dm cache version
Since we want to test different cache policies with profiles mq&smq
raise version to 1.8.

TODO: maybe split in more tests so older targets can test here as well.
N.B.: passthrough is also not supported with version 1.3
2017-03-17 14:22:33 +01:00
Zdenek Kabelac
4a271e7ee7 properties: only thin-pool provides discards
Quering non-thin-pool segment for discard property may lead
to intenal error if the segment had set 'out-of-range' value,
so only thin-pool is allowed, for other it returns NULL.
2017-03-17 14:22:33 +01:00
Zdenek Kabelac
d211c98581 lvm2app: correct internal API changes
Internal library gets more strict about setting discard and
zero_new_blocks parameter.
2017-03-17 14:22:33 +01:00
Heinz Mauelshagen
e0ea569045 raid: cleanup
Move function _raid45_to_raid54_wrapper() to avoid superfluous declaration.
2017-03-17 14:14:42 +01:00
Heinz Mauelshagen
1520fec3e8 raid: name variables consistently
Related: rhbz1191935
Related: rhbz1366296
2017-03-17 14:04:03 +01:00
Heinz Mauelshagen
17bee733d1 raid: conditionally reject convert to striped/raid0*
If SubLVs to be removed still exist after an image removing
conversion (i.e. "lvconvert --yes --force --stripes N "
with N < total stripes) any request to convert to a different
striped/raid* level has to be rejected until after those freed
SubLVs got removed by running the aforementioned lvconvert again.

Add tests to check conversion to striped/raid* gets rejected.
Enhance a test comment.

Related: rhbz1191935
Related: rhbz1366296
2017-03-17 13:58:54 +01:00
Alasdair G Kergon
5e7bc8d854 man: Build man-generator in tools dir.
Use ln to make a copy of command.c for compilation with different DEFS
then handle dependencies the normal way.
2017-03-16 23:10:40 +00:00
Alasdair G Kergon
270ed9bc90 man: Preserve template variables in pre-generated pages. 2017-03-16 23:08:59 +00:00
Alasdair G Kergon
0c74afa1c6 make.tmpl: Support per-object DEFS.
Same as CFLAGS.
2017-03-16 23:03:03 +00:00
Alasdair G Kergon
2d00767394 tools: Avoid man-generator compilation warnings.
Unused variables and make fns with missing prototypes static.
2017-03-16 22:39:04 +00:00
Heinz Mauelshagen
ad4158bac7 man: lvmraid(7) clarifications 2017-03-16 23:10:57 +01:00
Heinz Mauelshagen
4a3e30d102 WHATS_NEW: ensure raid6 upconversion restrictions 2017-03-16 22:33:08 +01:00
Heinz Mauelshagen
b917b12e2c WHATS_NEW: adjust mirror+raid DSOs to lvconvert --repair 2017-03-16 22:27:30 +01:00
Heinz Mauelshagen
b0336e8b3c lvconvert: ensure upconversion restrictions
Ensure minimum number of 3 data stripes on conversions to raid6.

Add test for it.

Resolves: rhbz1432675
2017-03-16 22:10:32 +01:00
Heinz Mauelshagen
76b843a4bf test: adjust to proper dm-raid target version
Adjust to final target version 1.10.1 supporting reshape
properly and to recently changed report field specifications
(e.g. rehape_len_le) to allow these tests to run.

Lower mirror region size to suite the tiny test VG.
2017-03-16 21:17:58 +01:00
Heinz Mauelshagen
a37bb7b2a5 dmeventd: adjust mirror/raid DSOs to new repair design
Previous commit 506d88a2ec introduced disabling lvmetad on repairs.

Avoid calling lvscan and use of any --config options altogether
in the mirror and raid DSOs.

Related: rhbz1380521
2017-03-16 21:05:05 +01:00
David Teigland
73d028023a lvmetad: fix bug in snprintf of disable reason 2017-03-16 12:15:40 -05:00
David Teigland
c8719d4e94 WHATS_NEW: disable lvmetad for repair 2017-03-16 11:56:19 -05:00
David Teigland
506d88a2ec lvconvert: disable lvmetad for repair
Repairing missing devices does not work reliably
with lvmetad, so disable lvmetad before repair.
A standard lvmetad refresh (pvscan --cache) will
enable lvmetad again.
2017-03-16 11:50:36 -05:00
Heinz Mauelshagen
e5b6f2685a dmeventd: reintroduce fix mirror DSO to work with lvmetad
Commit 07ded8059c assumed that the mirror is blocked which is not the case.

It is accessible, degraded and in need of repair because some of its legs
(partially) failed.  Any auto-repair via dmeventd fails though because
of lvmetad not providing proper data about the failed PV(s).  That's why
this workaround got introduced in commit 76f6951c3e until we get to
the lvmetad interaction core issue.

Mind any mirror auto-repair failure is caused by such lvmetad interaction
problems not yet solved so disabling lvmetad works as a resort as elaborated
on in the related bz.

Reintroducing the interim solution.

Resolves: rhbz1380521
2017-03-16 14:19:06 +01:00
Marian Csontos
a87715b6fd spec: Disable sanlock only, keep lockd_dlm enabled 2017-03-16 13:03:25 +01:00
Marian Csontos
19b65a3d76 spec: Replace remaining %define by %global 2017-03-16 13:03:24 +01:00
Marian Csontos
7067514c9b spec: Use %global instead of %define for constants
Using %define is now discouraged by Fedora Packaging Guidelines
2017-03-16 13:03:24 +01:00
Marian Csontos
5ba82a16db spec: Update requirements for lockd
lockd requires sanlock >= 3.3.0
2017-03-16 13:03:24 +01:00
Marian Csontos
cf0bf4b314 spec: Profiles are not %config(noreplace)
These files are just examples and should not be edited by user.
2017-03-16 13:02:24 +01:00
189 changed files with 3690 additions and 3596 deletions

View File

@@ -1 +1 @@
2.02.169(2)-git (2016-11-30)
2.02.170(2)-git (2017-04-13)

View File

@@ -1 +1 @@
1.02.138-git (2016-11-30)
1.02.139-git (2017-04-13)

View File

@@ -1,10 +1,38 @@
Version 2.02.169 -
=====================================
Version 2.02.170 - 13th April 2017
==================================
Introduce global/fsadm_executable to make fsadm path configurable.
Look for limited thin pool metadata size when using 16G metadata.
Add lvconvert pool creation rule disallowing options with poolmetadata.
Fix lvconvert when the same LV is incorrectly reused in options.
Fix lvconvert VG name validation in option values.
Fix missing lvmlockd LV locks in lvchange and lvconvert.
Fix dmeventd setup for lvchange --poll.
Fix use of --poll and --monitor with lvchange and vgchange.
Disallow lvconvert of hidden LV to a pool.
Ignore --partial option when not used for activation.
Allow --activationmode option with lvchange --refresh.
Better message on lvconvert --regionsize
Allow valid lvconvert --regionsize change
Add raid10 alias raid10_near
Handle insufficient PVs on lvconvert takeover
Fix SIGINT blocking to prevent corrupted metadata
Fix systemd unit existence check for lvmconf --services --startstopservices.
Check and use PATH_MAX buffers when creating vgrename device paths.
Version 2.02.169 - 28th March 2017
==================================
Automatically decide whether '-' in a man page is a hyphen or a minus sign.
Add build-time configuration command line to 'lvm version' output.
Handle known table line parameter order change in specific raid target vsns.
Conditionally reject raid convert to striped/raid0* after reshape.
Ensure raid6 upconversion restrictions.
Adjust mirror & raid dmeventd plugins for new lvconvert --repair behaviour.
Disable lvmetad when lvconvert --repair is run.
Remove obsolete lvmchange binary - convert to built-in command.
Lvdisplay [-m] shows more informations for cached volumes.
Show more information for cached volumes in lvdisplay [-m].
Add option for lvcreate/lvconvert --cachemetadataformat auto|1|2.
Support cache segment with configurable metadata format.
Add allocation/cache_metadata_format profilable setttings.
Add allocation/cache_metadata_format profilable settings.
Use function cache_set_params() for both lvcreate and lvconvert.
Skip rounding on cache chunk size boudary when create cache LV.
Improve cache_set_params support for chunk_size selection.
@@ -14,7 +42,7 @@ Version 2.02.169 -
Support conversion of raid type, stripesize and number of disks
Reject writemostly/writebehind in lvchange during resynchronization.
Deactivate active origin first before removal for improved workflow.
Fix regression of accepting options --type and -m with lvresize (2.02.158).
Fix regression of accepting both --type and -m with lvresize. (2.02.158)
Add lvconvert --swapmetadata, new specific way to swap pool metadata LVs.
Add lvconvert --startpoll, new specific way to start polling conversions.
Add lvconvert --mergethin, new specific way to merge thin snapshots.
@@ -27,9 +55,9 @@ Version 2.02.169 -
Match every command run to one command definition.
Specify every allowed command definition/syntax in command-lines.in.
Add extra memory page when limiting pthread stack size in clvmd.
Support striped/raid0* <-> raid10_near conversions
Support shrinking of RaidLvs
Support region size changes on existing RaidLVs
Support striped/raid0* <-> raid10_near conversions.
Support shrinking of RaidLVs.
Support region size changes on existing RaidLVs.
Avoid parallel usage of cpg_mcast_joined() in clvmd with corosync.
Support raid6_{ls,rs,la,ra}_6 segment types and conversions from/to it.
Support raid6_n_6 segment type and conversions from/to it.

View File

@@ -1,23 +1,32 @@
Version 1.02.138 -
=====================================
Version 1.02.139 - 13th April 2017
==================================
Fix assignment in _target_version() when dm task can't run.
Flush stdout on each iteration when using --count or --interval.
Show detailed error message when execvp fails while starting dmfilemapd.
Fix segmentation fault when dmfilemapd is run with no arguments.
Numerous minor dmfilemapd fixes from coverity.
Version 1.02.138 - 28th March 2017
==================================
Support additional raid5/6 configurations.
Provide dm_tree_node_add_cache_target@base compatible symbol.
Support DM_CACHE_FEATURE_METADATA2, new cache metadata format 2.
Improve code to handle mode mask for cache nodes.
Cache status check for passthrough also require trailing space.
Add extra memory page when limiting pthread stack size in dmeventd.
Avoids immediate resume when preloaded device is smaller.
Do not suppress kernel key description in dmsetup table output.
Do not suppress kernel key description in dmsetup table output for dm-crypt.
Support configurable command executed from dmeventd thin plugin.
Support new R|r human readable units output format.
Thin dmeventd plugin reacts faster on lvextend failure path with umount.
Add dm_stats_bind_from_fd() to bind a stats handle from a file descriptor.
Do not try call callback when reverting activation on error path.
Fix file mapping for extents with physically adjacent extents.
Fix file mapping for extents with physically adjacent extents in dmstats.
Validation vsnprintf result in runtime translate of dm_log (1.02.136).
Separate filemap extent allocation from region table.
Fix segmentation fault when filemap region creation fails.
Fix performance of region cleanup for failed filemap creation.
Fix very slow region deletion with many regions.
Separate filemap extent allocation from region table in dmstats.
Fix segmentation fault when filemap region creation fails in dmstats.
Fix performance of region cleanup for failed filemap creation in dmstats.
Fix very slow region deletion with many regions in dmstats.
Version 1.02.137 - 30th November 2016
=====================================

View File

@@ -389,6 +389,17 @@ allocation {
# Cache pool metadata and data will always use different PVs.
cache_pool_metadata_require_separate_pvs = 0
# Configuration option allocation/cache_metadata_format.
# Sets default metadata format for new cache.
#
# Accepted values:
# 0 Automatically detected best available format
# 1 Original format
# 2 Improved 2nd. generation format
#
# This configuration option has an automatic default value.
# cache_metadata_format = 0
# Configuration option allocation/cache_mode.
# The default cache mode used for new cache.
#
@@ -403,17 +414,6 @@ allocation {
# This configuration option has an automatic default value.
# cache_mode = "writethrough"
# Configuration option allocation/cache_metadata_format.
# Sets default metadata format for new cache.
#
# Accepted values:
# 0 Automatically detected best available format
# 1 Original format
# 2 Improved 2nd. generation format
#
# This configuration option has an automatic default value.
# cache_metadata_format = 0
# Configuration option allocation/cache_policy.
# The default cache policy used for new cache volume.
# Since kernel 4.2 the default policy is smq (Stochastic multiqueue),
@@ -1069,6 +1069,12 @@ global {
# This configuration option has an automatic default value.
# cache_repair_options = [ "" ]
# Configuration option global/fsadm_executable.
# The full path to the fsadm command.
# LVM uses this command to help with lvresize -r operations.
# This configuration option has an automatic default value.
# fsadm_executable = "@FSADM_PATH@"
# Configuration option global/system_id_source.
# The method LVM uses to set the local system ID.
# Volume Groups can also be given a system ID (by vgcreate, vgchange,

41
configure vendored
View File

@@ -699,6 +699,7 @@ HAVE_VALGRIND
HAVE_REALTIME
HAVE_LIBDL
BLKDEACTIVATE
FSADM_PATH
FSADM
ELDFLAGS
DM_LIB_PATCHLEVEL
@@ -821,8 +822,8 @@ THIN_CHECK_CMD
HAVE_FULL_RELRO
HAVE_PIE
POW_LIB
LIBOBJS
ALLOCA
LIBOBJS
SORT
WC
CHMOD
@@ -3015,6 +3016,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
CONFIGURE_LINE="$0 $@"
ac_config_headers="$ac_config_headers include/configure.h"
@@ -6078,7 +6080,7 @@ fi
done
for ac_header in termios.h sys/statvfs.h sys/timerfd.h linux/magic.h linux/fiemap.h
for ac_header in termios.h sys/statvfs.h sys/timerfd.h sys/vfs.h linux/magic.h linux/fiemap.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -6271,6 +6273,26 @@ _ACEOF
fi
ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
_ACEOF
$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
else
case " $LIBOBJS " in
*" fileblocks.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
;;
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
if ${ac_cv_struct_tm+:} false; then :
@@ -15298,6 +15320,14 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
FSADM_PATH="$lvm_exec_prefix/sbin/fsadm"
cat >>confdefs.h <<_ACEOF
#define FSADM_PATH "$FSADM_PATH"
_ACEOF
################################################################################
if test "$BUILD_DMEVENTD" = yes; then
@@ -15473,6 +15503,12 @@ LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'`
LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[(.]' '{print $3}'`
LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
cat >>confdefs.h <<_ACEOF
#define LVM_CONFIGURE_LINE "$CONFIGURE_LINE"
_ACEOF
################################################################################
@@ -15632,6 +15668,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
################################################################################

View File

@@ -15,6 +15,7 @@ AC_PREREQ(2.69)
################################################################################
dnl -- Process this file with autoconf to produce a configure script.
AC_INIT
CONFIGURE_LINE="$0 $@"
AC_CONFIG_SRCDIR([lib/device/dev-cache.h])
AC_CONFIG_HEADERS([include/configure.h])
@@ -105,7 +106,7 @@ AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h \
sys/time.h sys/types.h sys/utsname.h sys/wait.h time.h \
unistd.h], , [AC_MSG_ERROR(bailing out)])
AC_CHECK_HEADERS(termios.h sys/statvfs.h sys/timerfd.h linux/magic.h linux/fiemap.h)
AC_CHECK_HEADERS(termios.h sys/statvfs.h sys/timerfd.h sys/vfs.h linux/magic.h linux/fiemap.h)
case "$host_os" in
linux*)
@@ -120,6 +121,7 @@ AC_C_CONST
AC_C_INLINE
AC_CHECK_MEMBERS([struct stat.st_rdev])
AC_CHECK_TYPES([ptrdiff_t])
AC_STRUCT_ST_BLOCKS
AC_STRUCT_TM
AC_TYPE_OFF_T
AC_TYPE_PID_T
@@ -1893,6 +1895,10 @@ test "$prefix" != NONE && clvmd_prefix=$prefix
CLVMD_PATH="$clvmd_prefix/sbin/clvmd"
AC_DEFINE_UNQUOTED(CLVMD_PATH, ["$CLVMD_PATH"], [Path to clvmd binary.])
FSADM_PATH="$lvm_exec_prefix/sbin/fsadm"
AC_DEFINE_UNQUOTED(FSADM_PATH, ["$FSADM_PATH"], [Path to fsadm binary.])
################################################################################
dnl -- dmeventd pidfile and executable path
if test "$BUILD_DMEVENTD" = yes; then
@@ -2001,6 +2007,8 @@ LVM_MINOR=`echo "$VER" | $AWK -F '.' '{print $2}'`
LVM_PATCHLEVEL=`echo "$VER" | $AWK -F '[[(.]]' '{print $3}'`
LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'`
AC_DEFINE_UNQUOTED(LVM_CONFIGURE_LINE, "$CONFIGURE_LINE", [configure command line used])
################################################################################
AC_SUBST(APPLIB)
AC_SUBST(AWK)
@@ -2067,6 +2075,7 @@ AC_SUBST(DMFILEMAPD)
AC_SUBST(DM_LIB_PATCHLEVEL)
AC_SUBST(ELDFLAGS)
AC_SUBST(FSADM)
AC_SUBST(FSADM_PATH)
AC_SUBST(BLKDEACTIVATE)
AC_SUBST(HAVE_LIBDL)
AC_SUBST(HAVE_REALTIME)

View File

@@ -182,7 +182,7 @@ int cluster_send(struct clog_request *rq)
}
/*
* Once the request heads for the cluster, the luid looses
* Once the request heads for the cluster, the luid loses
* all its meaning.
*/
rq->u_rq.luid = 0;

View File

@@ -377,7 +377,7 @@ static int _clog_ctr(char *uuid, uint64_t luid,
uint32_t block_on_error = 0;
int disk_log;
char disk_path[128];
char disk_path[PATH_MAX];
int unlink_path = 0;
long page_size;
int pages;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2015 Red Hat, Inc. All rights reserved.
* Copyright (C) 2005-2017 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
@@ -25,7 +25,6 @@
struct dso_state {
struct dm_pool *mem;
char cmd_lvscan[512];
char cmd_lvconvert[512];
};
@@ -99,21 +98,14 @@ static int _get_mirror_event(struct dso_state *state, char *params)
return r;
}
static int _remove_failed_devices(const char *cmd_lvscan, const char *cmd_lvconvert,
const char *device)
static int _remove_failed_devices(const char *cmd_lvconvert, const char *device)
{
if (!dmeventd_lvm2_run_with_lock(cmd_lvscan))
log_warn("WARNING: Re-scan of mirrored device %s failed.", device);
/* if repair goes OK, report success even if lvscan has failed */
if (!dmeventd_lvm2_run_with_lock(cmd_lvconvert)) {
log_error("Repair of mirrored device %s failed.", device);
return 0;
}
if (!dmeventd_lvm2_run_with_lock(cmd_lvscan))
log_warn("WARNING: Re-scan of mirrored device %s failed.", device);
log_info("Repair of mirrored device %s finished successfully.", device);
return 1;
@@ -154,9 +146,7 @@ void process_event(struct dm_task *dmt,
break;
case ME_FAILURE:
log_error("Device failure in %s.", device);
if (!_remove_failed_devices(state->cmd_lvscan,
state->cmd_lvconvert,
device))
if (!_remove_failed_devices(state->cmd_lvconvert, device))
/* FIXME Why are all the error return codes unused? Get rid of them? */
log_error("Failed to remove faulty devices in %s.",
device);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2005-2016 Red Hat, Inc. All rights reserved.
* Copyright (C) 2005-2017 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
@@ -22,7 +22,6 @@
struct dso_state {
struct dm_pool *mem;
char cmd_lvscan[512];
char cmd_lvconvert[512];
uint64_t raid_devs[RAID_DEVS_ELEMS];
int failed;
@@ -74,8 +73,6 @@ static int _process_raid_event(struct dso_state *state, char *params, const char
goto out; /* already reported */
state->failed = 1;
if (!dmeventd_lvm2_run_with_lock(state->cmd_lvscan))
log_warn("WARNING: Re-scan of RAID device %s failed.", device);
/* if repair goes OK, report success even if lvscan has failed */
if (!dmeventd_lvm2_run_with_lock(state->cmd_lvconvert)) {
@@ -136,9 +133,7 @@ int register_device(const char *device,
if (!dmeventd_lvm2_init_with_pool("raid_state", state))
goto_bad;
if (!dmeventd_lvm2_command(state->mem, state->cmd_lvscan, sizeof(state->cmd_lvscan),
"lvscan --cache", device) ||
!dmeventd_lvm2_command(state->mem, state->cmd_lvconvert, sizeof(state->cmd_lvconvert),
if (!dmeventd_lvm2_command(state->mem, state->cmd_lvconvert, sizeof(state->cmd_lvconvert),
"lvconvert --config devices{ignore_suspended_devices=1} "
"--repair --use-policies", device))
goto_bad;

View File

@@ -60,7 +60,7 @@ install_dmfilemapd_dynamic: dmfilemapd
install_dmfilemapd_static: dmfilemapd.static
$(INSTALL_PROGRAM) -D $< $(staticdir)/$(<F)
install_dmfilemapd: $(INSTALL_DMEVENTD_TARGETS)
install_dmfilemapd: $(INSTALL_DMFILEMAPD_TARGETS)
install: install_dmfilemapd

View File

@@ -55,7 +55,7 @@ struct filemap_monitor {
/* monitoring heuristics */
int64_t blocks; /* allocated blocks, from stat.st_blocks */
int64_t nr_regions;
uint64_t nr_regions;
int deleted;
};
@@ -151,7 +151,7 @@ static int _is_open_in_pid(pid_t pid, const char *path)
if (dm_snprintf(path_buf, sizeof(path_buf),
DEFAULT_PROC_DIR "%d/fd", pid) < 0) {
log_error("Could not format pid path.");
goto bad;
return 0;
}
/*
@@ -160,12 +160,13 @@ static int _is_open_in_pid(pid_t pid, const char *path)
if (dm_snprintf(deleted_path, sizeof(deleted_path), "%s %s",
path, PROC_FD_DELETED_STR) < 0) {
log_error("Could not format check path.");
return 0;
}
pid_d = opendir(path_buf);
if (!pid_d) {
log_error("Could not open proc path: %s.", path_buf);
goto bad;
return 0;
}
while ((pid_dp = readdir(pid_d)) != NULL) {
@@ -179,13 +180,16 @@ static int _is_open_in_pid(pid_t pid, const char *path)
}
link_buf[len] = '\0';
if (!strcmp(deleted_path, link_buf)) {
closedir(pid_d);
if (closedir(pid_d))
log_sys_error("closedir", path_buf);
return 1;
}
}
bad:
closedir(pid_d);
if (closedir(pid_d))
log_sys_error("closedir", path_buf);
return 0;
}
@@ -221,15 +225,19 @@ static int _is_open(const char *path)
while ((proc_dp = readdir(proc_d)) != NULL) {
if (!isdigit(proc_dp->d_name[0]))
continue;
pid = strtol(proc_dp->d_name, NULL, 10);
pid = (pid_t) strtol(proc_dp->d_name, NULL, 10);
if (!pid)
continue;
if (_is_open_in_pid(pid, path)) {
closedir(proc_d);
if (closedir(proc_d))
log_sys_error("closedir", DEFAULT_PROC_DIR);
return 1;
}
}
closedir(proc_d);
if (closedir(proc_d))
log_sys_error("closedir", DEFAULT_PROC_DIR);
return 0;
}
@@ -272,7 +280,7 @@ static int _parse_args(int argc, char **argv, struct filemap_monitor *fm)
fm->nr_regions = 1;
/* parse <fd> */
fm->fd = strtol(argv[0], &endptr, 10);
fm->fd = (int) strtol(argv[0], &endptr, 10);
if (*endptr) {
_early_log("Could not parse file descriptor: %s", argv[0]);
return 0;
@@ -297,7 +305,7 @@ static int _parse_args(int argc, char **argv, struct filemap_monitor *fm)
return 0;
}
if (argv[0] != '/') {
if (*argv[0] != '/') {
_early_log("Path argument must specify an absolute path.");
return 0;
}
@@ -326,7 +334,7 @@ static int _parse_args(int argc, char **argv, struct filemap_monitor *fm)
/* parse [<foreground>[<verbose>]] */
if (argc) {
_foreground = strtol(argv[0], &endptr, 10);
_foreground = (int) strtol(argv[0], &endptr, 10);
if (*endptr) {
_early_log("Could not parse debug argument: %s.",
argv[0]);
@@ -335,7 +343,7 @@ static int _parse_args(int argc, char **argv, struct filemap_monitor *fm)
argc--;
argv++;
if (argc) {
_verbose = strtol(argv[0], &endptr, 10);
_verbose = (int) strtol(argv[0], &endptr, 10);
if (*endptr) {
_early_log("Could not parse verbose "
"argument: %s", argv[0]);
@@ -401,13 +409,13 @@ static int _filemap_monitor_set_notify(struct filemap_monitor *fm)
* and does not fork or exec.
*/
if ((inotify_fd = inotify_init1(IN_NONBLOCK)) < 0) {
_early_log("Failed to initialise inotify.");
log_sys_error("inotify_init1", "IN_NONBLOCK");
return 0;
}
if ((watch_fd = inotify_add_watch(inotify_fd, fm->path,
IN_MODIFY | IN_DELETE_SELF)) < 0) {
_early_log("Failed to add inotify watch.");
log_sys_error("inotify_add_watch", fm->path);
return 0;
}
fm->inotify_fd = inotify_fd;
@@ -525,6 +533,7 @@ static void _filemap_monitor_destroy(struct filemap_monitor *fm)
_filemap_monitor_close_fd(fm);
}
dm_free((void *) fm->program_id);
dm_free(fm->path);
}
static int _filemap_monitor_check_same_file(int fd1, int fd2)
@@ -551,19 +560,22 @@ static int _filemap_monitor_check_file_unlinked(struct filemap_monitor *fm)
{
char path_buf[PATH_MAX];
char link_buf[PATH_MAX];
int same, fd, len;
int same, fd;
ssize_t len;
fm->deleted = 0;
if ((fd = open(fm->path, O_RDONLY)) < 0)
goto check_unlinked;
if ((same = _filemap_monitor_check_same_file(fm->fd, fd)) < 0)
return 0;
same = _filemap_monitor_check_same_file(fm->fd, fd);
if (close(fd))
log_error("Error closing fd %d", fd);
if (same < 0)
return 0;
if (same)
return 1;
@@ -578,24 +590,27 @@ check_unlinked:
log_error("Could not format pid path.");
return 0;
}
if ((len = readlink(path_buf, link_buf, sizeof(link_buf))) < 0) {
if ((len = readlink(path_buf, link_buf, sizeof(link_buf) - 1)) < 0) {
log_error("readlink failed for " DEFAULT_PROC_DIR "/%d/fd/%d.",
getpid(), fm->fd);
return 0;
}
link_buf[len] = '\0';
/*
* Try to re-open the file, from the path now reported in /proc/pid/fd.
*/
if ((fd = open(link_buf, O_RDONLY)) < 0)
fm->deleted = 1;
else
same = _filemap_monitor_check_same_file(fm->fd, fd);
if ((same = _filemap_monitor_check_same_file(fm->fd, fd)) < 0)
return 0;
if ((fd > 0) && close(fd))
if ((fd >= 0) && close(fd))
log_error("Error closing fd %d", fd);
if (same < 0)
return 0;
/* Should not happen with normal /proc. */
if ((fd > 0) && !same) {
log_error("File descriptor mismatch: %d and %s (read from %s) "
@@ -646,7 +661,7 @@ static int _daemonise(struct filemap_monitor *fm)
}
}
for (fd = sysconf(_SC_OPEN_MAX) - 1; fd > STDERR_FILENO; fd--) {
for (fd = (int) sysconf(_SC_OPEN_MAX) - 1; fd > STDERR_FILENO; fd--) {
if (fd == fm->fd)
continue;
close(fd);
@@ -674,7 +689,7 @@ static int _update_regions(struct dm_stats *dms, struct filemap_monitor *fm)
fm->group_id, regions[0]);
fm->group_id = regions[0];
}
dm_free(regions);
fm->nr_regions = nr_regions;
return 1;
}
@@ -786,8 +801,10 @@ int main(int argc, char **argv)
{
struct filemap_monitor fm;
if (!_parse_args(argc, argv, &fm))
if (!_parse_args(argc, argv, &fm)) {
dm_free(fm.path);
return 1;
}
_setup_logging();

View File

@@ -11,7 +11,8 @@ import subprocess
from . import cfg
from .cmdhandler import options_to_cli_args
import dbus
from .utils import pv_range_append, pv_dest_ranges, log_error, log_debug
from .utils import pv_range_append, pv_dest_ranges, log_error, log_debug,\
add_no_notify
import os
import threading
@@ -42,6 +43,10 @@ def _move_merge(interface_name, command, job_state):
# the command always as we will be getting periodic output from them on
# the status of the long running operation.
command.insert(0, cfg.LVM_CMD)
# Instruct lvm to not register an event with us
command = add_no_notify(command)
process = subprocess.Popen(command, stdout=subprocess.PIPE,
env=os.environ,
stderr=subprocess.PIPE, close_fds=True)
@@ -59,6 +64,10 @@ def _move_merge(interface_name, command, job_state):
(device, ignore, percentage) = line_str.split(':')
job_state.Percent = round(
float(percentage.strip()[:-1]), 1)
# While the move is in progress we need to periodically update
# the state to reflect where everything is at.
cfg.load()
except ValueError:
log_error("Trying to parse percentage which failed for %s" %
line_str)

View File

@@ -26,7 +26,7 @@ bus = None
args = None
# Set to true if we are depending on external events for updates
ee = False
got_external_event = False
# Shared state variable across all processes
run = multiprocessing.Value('i', 1)

View File

@@ -206,7 +206,7 @@ class Manager(AutomatedProperties):
utils.log_debug("ExternalEvent received, disabling "
"udev monitoring")
# We are dependent on external events now to stay current!
cfg.ee = True
cfg.got_external_event = True
r = RequestEntry(
-1, Manager._external_event, (command,), None, None, False)

View File

@@ -16,9 +16,33 @@ from . import utils
observer = None
observer_lock = threading.RLock()
_udev_lock = threading.RLock()
_udev_count = 0
def udev_add():
global _udev_count
with _udev_lock:
if _udev_count == 0:
_udev_count += 1
# Place this on the queue so any other operations will sequence
# behind it
r = RequestEntry(
-1, _udev_event, (), None, None, False)
cfg.worker_q.put(r)
def udev_complete():
global _udev_count
with _udev_lock:
if _udev_count > 0:
_udev_count -= 1
def _udev_event():
utils.log_debug("Processing udev event")
udev_complete()
cfg.load()
@@ -44,10 +68,7 @@ def filter_event(action, device):
refresh = True
if refresh:
# Place this on the queue so any other operations will sequence behind it
r = RequestEntry(
-1, _udev_event, (), None, None, False)
cfg.worker_q.put(r)
udev_add()
def add():

View File

@@ -510,16 +510,19 @@ def add_no_notify(cmdline):
:rtype: list
"""
if 'help' in cmdline:
return cmdline
# Only after we have seen an external event will be disable lvm from sending
# us one when we call lvm
if cfg.got_external_event:
if 'help' in cmdline:
return cmdline
if '--config' in cmdline:
for i, arg in enumerate(cmdline):
if arg == '--config':
cmdline[i] += "global/notify_dbus=0"
break
else:
cmdline.extend(['--config', 'global/notify_dbus=0'])
if '--config' in cmdline:
for i, arg in enumerate(cmdline):
if arg == '--config':
cmdline[i] += "global/notify_dbus=0"
break
else:
cmdline.extend(['--config', 'global/notify_dbus=0'])
return cmdline

View File

@@ -25,6 +25,7 @@
#define LVMETAD_DISABLE_REASON_LVM1 "LVM1"
#define LVMETAD_DISABLE_REASON_DUPLICATES "DUPLICATES"
#define LVMETAD_DISABLE_REASON_VGRESTORE "VGRESTORE"
#define LVMETAD_DISABLE_REASON_REPAIR "REPAIR"
struct volume_group;

View File

@@ -203,8 +203,9 @@ struct vg_info {
#define GLFL_DISABLE_REASON_LVM1 0x00000008
#define GLFL_DISABLE_REASON_DUPLICATES 0x00000010
#define GLFL_DISABLE_REASON_VGRESTORE 0x00000020
#define GLFL_DISABLE_REASON_REPAIR 0x00000040
#define GLFL_DISABLE_REASON_ALL (GLFL_DISABLE_REASON_DIRECT | GLFL_DISABLE_REASON_LVM1 | GLFL_DISABLE_REASON_DUPLICATES | GLFL_DISABLE_REASON_VGRESTORE)
#define GLFL_DISABLE_REASON_ALL (GLFL_DISABLE_REASON_DIRECT | GLFL_DISABLE_REASON_REPAIR | GLFL_DISABLE_REASON_LVM1 | GLFL_DISABLE_REASON_DUPLICATES | GLFL_DISABLE_REASON_VGRESTORE)
#define VGFL_INVALID 0x00000001
@@ -2355,6 +2356,8 @@ static response set_global_info(lvmetad_state *s, request r)
if ((reason = daemon_request_str(r, "disable_reason", NULL))) {
if (strstr(reason, LVMETAD_DISABLE_REASON_DIRECT))
reason_flags |= GLFL_DISABLE_REASON_DIRECT;
if (strstr(reason, LVMETAD_DISABLE_REASON_REPAIR))
reason_flags |= GLFL_DISABLE_REASON_REPAIR;
if (strstr(reason, LVMETAD_DISABLE_REASON_LVM1))
reason_flags |= GLFL_DISABLE_REASON_LVM1;
if (strstr(reason, LVMETAD_DISABLE_REASON_DUPLICATES))
@@ -2418,8 +2421,9 @@ static response get_global_info(lvmetad_state *s, request r)
pid = (int)daemon_request_int(r, "pid", 0);
if (s->flags & GLFL_DISABLE) {
snprintf(reason, REASON_BUF_SIZE - 1, "%s%s%s%s",
snprintf(reason, REASON_BUF_SIZE - 1, "%s%s%s%s%s",
(s->flags & GLFL_DISABLE_REASON_DIRECT) ? LVMETAD_DISABLE_REASON_DIRECT "," : "",
(s->flags & GLFL_DISABLE_REASON_REPAIR) ? LVMETAD_DISABLE_REASON_REPAIR "," : "",
(s->flags & GLFL_DISABLE_REASON_LVM1) ? LVMETAD_DISABLE_REASON_LVM1 "," : "",
(s->flags & GLFL_DISABLE_REASON_DUPLICATES) ? LVMETAD_DISABLE_REASON_DUPLICATES "," : "",
(s->flags & GLFL_DISABLE_REASON_VGRESTORE) ? LVMETAD_DISABLE_REASON_VGRESTORE "," : "");

View File

@@ -148,6 +148,9 @@
/* Library version */
#undef DM_LIB_VERSION
/* Path to fsadm binary. */
#undef FSADM_PATH
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM
@@ -491,6 +494,9 @@
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
/* Define to 1 if you have the <sys/inotify.h> header file. */
#undef HAVE_SYS_INOTIFY_H
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
@@ -626,6 +632,9 @@
/* Define to 1 to include code that uses lvmpolld. */
#undef LVMPOLLD_SUPPORT
/* configure command line used */
#undef LVM_CONFIGURE_LINE
/* Path to lvm binary. */
#undef LVM_PATH

View File

@@ -260,6 +260,11 @@ static int _info_run(const char *dlid, struct dm_info *dminfo,
start *= seg_status->seg->le;
length *= _seg_len(seg_status->seg);
/* Uses max DM_THIN_MAX_METADATA_SIZE sectors for metadata device */
if (lv_is_thin_pool_metadata(seg_status->seg->lv) &&
(length > DM_THIN_MAX_METADATA_SIZE))
length = DM_THIN_MAX_METADATA_SIZE;
do {
target = dm_get_next_target(dmt, target, &target_start,
&target_length, &target_name, &target_params);

5
lib/cache/lvmetad.c vendored
View File

@@ -66,7 +66,7 @@ static int _log_debug_inequality(const char *name, struct dm_config_node *a, str
log_debug_lvmetad("VG %s metadata inequality at %s / %s: %s / %s",
name, a->key, b->key, av->v.str, bv->v.str);
else if (a->v->type == DM_CFG_INT && b->v->type == DM_CFG_INT)
log_debug_lvmetad("VG %s metadata inequality at %s / %s: " FMTi64 " / " FMTi64,
log_debug_lvmetad("VG %s metadata inequality at %s / %s: " FMTd64 " / " FMTd64,
name, a->key, b->key, av->v.i, bv->v.i);
else
log_debug_lvmetad("VG %s metadata inequality at %s / %s: type %d / type %d",
@@ -2874,6 +2874,9 @@ int lvmetad_is_disabled(struct cmd_context *cmd, const char **reason)
} else if (strstr(reply_reason, LVMETAD_DISABLE_REASON_DIRECT)) {
*reason = "the disable flag was set directly";
} else if (strstr(reply_reason, LVMETAD_DISABLE_REASON_REPAIR)) {
*reason = "a repair command was run";
} else if (strstr(reply_reason, LVMETAD_DISABLE_REASON_LVM1)) {
*reason = "LVM1 metadata was found";

View File

@@ -258,6 +258,39 @@ static void _destroy(struct segment_type *segtype)
}
#ifdef DEVMAPPER_SUPPORT
/*
* Parse and look for kernel symbol in /proc/kallsyms
* this could be our only change to figure out there is
* cache policy symbol already in the monolithic kernel
* where 'modprobe dm-cache-smq' will simply not work
*/
static int _lookup_kallsyms(const char *symbol)
{
static const char _syms[] = "/proc/kallsyms";
int ret = 0;
char *line = NULL;
size_t len;
FILE *s;
if (!(s = fopen(_syms, "r")))
log_sys_debug("fopen", _syms);
else {
while (getline(&line, &len, s) != -1)
if (strstr(line, symbol)) {
ret = 1; /* Found symbol */
log_debug("Found kernel symbol%s.", symbol); /* space is in symbol */
break;
}
free(line);
if (fclose(s))
log_sys_debug("fclose", _syms);
}
return ret;
}
static int _target_present(struct cmd_context *cmd,
const struct lv_segment *seg __attribute__((unused)),
unsigned *attributes __attribute__((unused)))
@@ -270,14 +303,15 @@ static int _target_present(struct cmd_context *cmd,
unsigned cache_alias;
const char feature[12];
const char module[12]; /* check dm-%s */
const char ksymbol[12]; /* check for kernel symbol */
const char *aliasing;
} _features[] = {
/* Assumption: cache >=1.9 always aliases MQ policy */
{ 1, 10, CACHE_FEATURE_METADATA2, 0, "metadata2" },
/* Assumption: cache >=1.9 always aliases MQ policy */
{ 1, 9, CACHE_FEATURE_POLICY_SMQ, CACHE_FEATURE_POLICY_MQ, "policy_smq", "cache-smq",
" and aliases cache-mq" },
{ 1, 8, CACHE_FEATURE_POLICY_SMQ, 0, "policy_smq", "cache-smq" },
{ 1, 3, CACHE_FEATURE_POLICY_MQ, 0, "policy_mq", "cache-mq" },
" smq_exit", " and aliases cache-mq" },
{ 1, 8, CACHE_FEATURE_POLICY_SMQ, 0, "policy_smq", "cache-smq", " smq_exit" },
{ 1, 3, CACHE_FEATURE_POLICY_MQ, 0, "policy_mq", "cache-mq", " mq_init" },
};
static const char _lvmconf[] = "global/cache_disabled_features";
static unsigned _attrs = 0;
@@ -323,7 +357,8 @@ static int _target_present(struct cmd_context *cmd,
}
if (((maj > _features[i].maj) ||
(maj == _features[i].maj && min >= _features[i].min)) &&
module_present(cmd, _features[i].module)) {
((_features[i].ksymbol[0] && _lookup_kallsyms(_features[i].ksymbol)) ||
module_present(cmd, _features[i].module))) {
log_debug_activation("Cache policy %s is available%s.",
_features[i].module,
_features[i].aliasing ? : "");

View File

@@ -1035,6 +1035,10 @@ cfg_array(global_cache_check_options_CFG, "cache_check_options", global_CFG_SECT
cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_CACHE_REPAIR_OPTIONS_CONFIG, vsn(2, 2, 108), NULL, 0, NULL,
"List of options passed to the cache_repair command.\n")
cfg(global_fsadm_executable_CFG, "fsadm_executable", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, DEFAULT_FSADM_PATH, vsn(2, 2, 170), "@FSADM_PATH@", 0, NULL,
"The full path to the fsadm command.\n"
"LVM uses this command to help with lvresize -r operations.\n")
cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_SYSTEM_ID_SOURCE, vsn(2, 2, 117), NULL, 0, NULL,
"The method LVM uses to set the local system ID.\n"
"Volume Groups can also be given a system ID (by vgcreate, vgchange,\n"

View File

@@ -135,6 +135,8 @@
#define DEFAULT_CACHE_METADATA_FORMAT CACHE_METADATA_FORMAT_UNSELECTED /* Autodetect */
#define DEFAULT_CACHE_MODE "writethrough"
#define DEFAULT_FSADM_PATH FSADM_PATH
#define DEFAULT_UMASK 0077
#define DEFAULT_FORMAT "lvm2"

View File

@@ -128,8 +128,8 @@ int import_pv(const struct format_type *fmt, struct dm_pool *mem,
int generate_lvm1_system_id(struct cmd_context *cmd, char *s, const char *prefix)
{
if (dm_snprintf(s, NAME_LEN, "%s%s%lu",
prefix, cmd->hostname, time(NULL)) < 0) {
if (dm_snprintf(s, NAME_LEN, "%s%s" FMTu64,
prefix, cmd->hostname, (uint64_t)time(NULL)) < 0) {
log_error("Generated LVM1 format system_id too long");
return 0;
}

View File

@@ -350,7 +350,7 @@ static int _print_header(struct cmd_context *cmd, struct formatter *f,
_utsname.version, _utsname.machine);
if (cmd->system_id && *cmd->system_id)
outf(f, "creation_host_system_id = \"%s\"", cmd->system_id);
outf(f, "creation_time = %lu\t# %s", t, ctime(&t));
outf(f, "creation_time = " FMTu64 "\t# %s", (uint64_t)t, ctime(&t));
return 1;
}

View File

@@ -220,7 +220,12 @@ char *lvseg_segtype_dup(struct dm_pool *mem, const struct lv_segment *seg)
char *lvseg_discards_dup(struct dm_pool *mem, const struct lv_segment *seg)
{
return dm_pool_strdup(mem, get_pool_discards_name(seg->discards));
if (lv_is_thin_pool(seg->lv))
return dm_pool_strdup(mem, get_pool_discards_name(seg->discards));
log_error("Cannot query non thin-pool segment of LV %s for discards property.",
display_lvname(seg->lv));
return NULL;
}
char *lvseg_kernel_discards_dup_with_info_and_seg_status(struct dm_pool *mem, const struct lv_with_info_and_seg_status *lvdm)

View File

@@ -4567,13 +4567,13 @@ static int _request_confirmation(const struct logical_volume *lv,
}
enum fsadm_cmd_e { FSADM_CMD_CHECK, FSADM_CMD_RESIZE };
#define FSADM_CMD "fsadm"
#define FSADM_CMD_MAX_ARGS 6
#define FSADM_CHECK_FAILS_FOR_MOUNTED 3 /* shell exist status code */
/*
* FSADM_CMD --dry-run --verbose --force check lv_path
* FSADM_CMD --dry-run --verbose --force resize lv_path size
* fsadm --dry-run --verbose --force check lv_path
* fsadm --dry-run --verbose --force resize lv_path size
*/
static int _fsadm_cmd(enum fsadm_cmd_e fcmd,
struct logical_volume *lv,
@@ -4588,7 +4588,7 @@ static int _fsadm_cmd(enum fsadm_cmd_e fcmd,
const char *argv[FSADM_CMD_MAX_ARGS + 2];
unsigned i = 0;
argv[i++] = FSADM_CMD;
argv[i++] = find_config_tree_str(cmd, global_fsadm_executable_CFG, NULL);
if (test_mode())
argv[i++] = "--dry-run";
@@ -4773,6 +4773,19 @@ static int _lvresize_check(struct logical_volume *lv,
return 0;
}
if (lv_is_raid(lv) &&
lp->resize == LV_REDUCE) {
unsigned attrs;
const struct segment_type *segtype = first_seg(lv)->segtype;
if (!segtype->ops->target_present ||
!segtype->ops->target_present(lv->vg->cmd, NULL, &attrs) ||
!(attrs & RAID_FEATURE_SHRINK)) {
log_error("RAID module does not support shrinking.");
return 0;
}
}
if (lp->use_policies && !lv_is_cow(lv) && !lv_is_thin_pool(lv)) {
log_error("Policy-based resize is supported only for snapshot and thin pool volumes.");
return 0;

View File

@@ -39,22 +39,6 @@ static int _check_restriping(uint32_t new_stripes, struct logical_volume *lv)
return 1;
}
__attribute__ ((__unused__))
/* Check that all lv has segments have exactly the required number of areas */
static int _check_num_areas_in_lv_segments(struct logical_volume *lv, unsigned num_areas)
{
struct lv_segment *seg;
dm_list_iterate_items(seg, &lv->segments)
if (seg->area_count != num_areas) {
log_error("For this operation LV %s needs exactly %u data areas per segment.",
display_lvname(lv), num_areas);
return 0;
}
return 1;
}
/*
* Check if reshape is supported in the kernel.
*/
@@ -171,6 +155,33 @@ char *top_level_lv_name(struct volume_group *vg, const char *lv_name)
return new_lv_name;
}
/* Get available and removed SubLVs for @lv */
static int _get_available_removed_sublvs(const struct logical_volume *lv, uint32_t *available_slvs, uint32_t *removed_slvs)
{
uint32_t s;
struct lv_segment *seg = first_seg(lv);
*available_slvs = 0;
*removed_slvs = 0;
if (!lv_is_raid(lv))
return 1;
for (s = 0; s < seg->area_count; s++) {
struct logical_volume *slv;
if (seg_type(seg, s) != AREA_LV || !(slv = seg_lv(seg, s))) {
log_error(INTERNAL_ERROR "Missing image sub lv in area %" PRIu32 " of LV %s.",
s, display_lvname(lv));
return_0;
}
(slv->status & LV_REMOVE_AFTER_RESHAPE) ? (*removed_slvs)++ : (*available_slvs)++;
}
return 1;
}
static int _lv_is_raid_with_tracking(const struct logical_volume *lv,
struct logical_volume **tracking)
{
@@ -740,6 +751,11 @@ static int _reorder_raid10_near_seg_areas(struct lv_segment *seg, enum raid0_rai
uint32_t *idx, stripes = seg->area_count;
unsigned i = 0;
if (!stripes) {
log_error(INTERNAL_ERROR "stripes may not be 0.");
return 0;
}
/* Internal sanity checks... */
if (!(conv == reorder_to_raid10_near || conv == reorder_from_raid10_near))
return_0;
@@ -926,11 +942,12 @@ static int _shift_and_rename_image_components(struct lv_segment *seg)
static char *_generate_raid_name(struct logical_volume *lv,
const char *suffix, int count)
{
const char *format = (count >= 0) ? "%s_%s_%u" : "%s_%s";
char name[NAME_LEN], *lvname;
int historical;
if (dm_snprintf(name, sizeof(name), format, lv->name, suffix, count) < 0) {
if (dm_snprintf(name, sizeof(name),
(count >= 0) ? "%s_%s_%u" : "%s_%s",
lv->name, suffix, count) < 0) {
log_error("Failed to new raid name for %s.",
display_lvname(lv));
return NULL;
@@ -1575,7 +1592,6 @@ static int _lv_free_reshape_space_with_status(struct logical_volume *lv, enum al
*/
if (!_lv_alloc_reshape_space(lv, alloc_end, &where, NULL))
return_0;
seg->extents_copied = first_seg(lv)->area_len;
if (!lv_reduce(lv, total_reshape_len))
return_0;
@@ -1690,7 +1706,7 @@ static int _reshape_adjust_to_size(struct logical_volume *lv,
/* Externally visible LV size w/o reshape space */
lv->le_count = seg->len = new_le_count;
lv->size = (uint64_t) (lv->le_count - new_image_count * _reshape_len_per_dev(seg)) * lv->vg->extent_size;
lv->size = (uint64_t) (lv->le_count - new_image_count * (uint32_t) _reshape_len_per_dev(seg)) * lv->vg->extent_size;
/* seg->area_len does not change */
if (old_image_count < new_image_count) {
@@ -1821,7 +1837,7 @@ static int _raid_reshape_remove_images(struct logical_volume *lv,
const unsigned new_stripes, const unsigned new_stripe_size,
struct dm_list *allocate_pvs, struct dm_list *removal_lvs)
{
uint32_t active_lvs, current_le_count, reduced_le_count, removed_lvs, s;
uint32_t available_slvs, current_le_count, reduced_le_count, removed_slvs, s;
uint64_t extend_le_count;
unsigned devs_health, devs_in_sync;
struct lv_segment *seg = first_seg(lv);
@@ -1875,7 +1891,7 @@ static int _raid_reshape_remove_images(struct logical_volume *lv,
log_print_unless_silent("If that leaves the logical volume larger than %llu extents due to stripe rounding,",
(unsigned long long) extend_le_count);
log_print_unless_silent("you may want to grow the content afterwards (filesystem etc.)");
log_warn("WARNING: too remove freed stripes after the conversion has finished, you have to run \"lvconvert --stripes %u %s\"",
log_warn("WARNING: to remove freed stripes after the conversion has finished, you have to run \"lvconvert --stripes %u %s\"",
new_stripes, display_lvname(lv));
if (!force) {
@@ -1916,26 +1932,15 @@ static int _raid_reshape_remove_images(struct logical_volume *lv,
* -> remove the freed up images and reduce LV size
*
*/
for (active_lvs = removed_lvs = s = 0; s < seg->area_count; s++) {
struct logical_volume *slv;
if (!seg_lv(seg, s) || !(slv = seg_lv(seg, s))) {
log_error("Missing image sub lv off LV %s.", display_lvname(lv));
return 0;
}
if (slv->status & LV_REMOVE_AFTER_RESHAPE)
removed_lvs++;
else
active_lvs++;
}
if (!_get_available_removed_sublvs(lv, &available_slvs, &removed_slvs))
return_0;
if (devs_in_sync != new_image_count) {
log_error("No correct kernel/lvm active LV count on %s.", display_lvname(lv));
return 0;
}
if (active_lvs + removed_lvs != old_image_count) {
if (available_slvs + removed_slvs != old_image_count) {
log_error ("No correct kernel/lvm total LV count on %s.", display_lvname(lv));
return 0;
}
@@ -1971,6 +1976,7 @@ static int _raid_reshape_remove_images(struct logical_volume *lv,
* Reshape: keep images in RAID @lv but change stripe size or data copies
*
*/
static const char *_get_segtype_alias(const struct segment_type *segtype);
static int _raid_reshape_keep_images(struct logical_volume *lv,
const struct segment_type *new_segtype,
int yes, int force, int *force_repair,
@@ -1984,14 +1990,12 @@ static int _raid_reshape_keep_images(struct logical_volume *lv,
if (seg->segtype != new_segtype)
log_print_unless_silent("Converting %s LV %s to %s.",
lvseg_name(seg), display_lvname(lv), new_segtype->name);
if (!yes && yes_no_prompt("Are you sure you want to convert %s LV %s? [y/n]: ",
lvseg_name(seg), display_lvname(lv)) == 'n') {
if (!yes && yes_no_prompt("Are you sure you want to convert %s LV %s to %s? [y/n]: ",
lvseg_name(seg), display_lvname(lv), new_segtype->name) == 'n') {
log_error("Logical volume %s NOT converted.", display_lvname(lv));
return 0;
}
seg->stripe_size = new_stripe_size;
/*
* Reshape layout alogorithm or chunksize:
*
@@ -2005,8 +2009,22 @@ static int _raid_reshape_keep_images(struct logical_volume *lv,
* The dm-raid target is able to use the space whereever it
* is found by appropriately selecting forward or backward reshape.
*/
if (seg->area_count != 2 &&
alloc_reshape_space &&
if (seg->segtype != new_segtype) {
const char *alias = _get_segtype_alias(seg->segtype);
if (!strcmp(alias, new_segtype->name))
alloc_reshape_space = 0;
}
if (seg->stripe_size != new_stripe_size)
alloc_reshape_space = 1;
seg->stripe_size = new_stripe_size;
if (seg->area_count == 2)
alloc_reshape_space = 0;
if (alloc_reshape_space &&
!_lv_alloc_reshape_space(lv, where, NULL, allocate_pvs))
return 0;
@@ -2081,7 +2099,7 @@ static int _activate_sub_lvs_excl_local(struct logical_volume *lv, uint32_t star
display_lvname(lv));
for (s = start_idx; s < seg->area_count; s++)
if (!_activate_sub_lv_excl_local(seg_lv(seg, s)) ||
!_activate_sub_lv_excl_local(seg_metalv(seg, s)))
(seg->meta_areas && !_activate_sub_lv_excl_local(seg_metalv(seg, s))))
return 0;
return 1;
@@ -2207,9 +2225,9 @@ static int _raid_reshape(struct logical_volume *lv,
log_print_unless_silent("No change in RAID LV %s layout, freeing reshape space.", display_lvname(lv));
if (where_it_was == alloc_none) {
log_print_unless_silent("LV %s does not have reshape space allocated.",
display_lvname(lv));
return 1;
log_error("LV %s does not have reshape space allocated.",
display_lvname(lv));
return 0;
}
if (!_lv_update_reload_fns_reset_eliminate_lvs(lv, 0, NULL, NULL))
@@ -2305,7 +2323,8 @@ static int _raid_reshape(struct logical_volume *lv,
} if (!_vg_write_commit_backup(lv->vg))
return 0;
return 1; // force_repair ? _lv_cond_repair(lv) : 1;
return 1;
/* FIXME force_repair ? _lv_cond_repair(lv) : 1; */
}
/*
@@ -2325,6 +2344,8 @@ static int _raid_reshape(struct logical_volume *lv,
* 1 -> allowed reshape request
* 2 -> prohibited reshape request
* 3 -> allowed region size change request
*
* FIXME Use alternative mechanism - separate parameter or enum.
*/
static int _reshape_requested(const struct logical_volume *lv, const struct segment_type *segtype,
const int data_copies, const uint32_t region_size,
@@ -2364,108 +2385,35 @@ static int _reshape_requested(const struct logical_volume *lv, const struct segm
display_lvname(lv));
return 2;
}
#if 0
if ((_lv_is_duplicating(lv) || lv_is_duplicated(lv)) &&
((seg_is_raid1(seg) ? 0 : (stripes != _data_rimages_count(seg, seg->area_count))) ||
data_copies != seg->data_copies))
goto err;
if ((!seg_is_striped(seg) && segtype_is_raid10_far(segtype)) ||
(seg_is_raid10_far(seg) && !segtype_is_striped(segtype))) {
if (data_copies == seg->data_copies &&
region_size == seg->region_size) {
log_error("Can't convert %sraid10_far.",
seg_is_raid10_far(seg) ? "" : "to ");
goto err;
}
}
if (seg_is_raid10_far(seg)) {
if (stripes != _data_rimages_count(seg, seg->area_count)) {
log_error("Can't change stripes in raid10_far.");
goto err;
}
if (stripe_size != seg->stripe_size) {
log_error("Can't change stripe size in raid10_far.");
goto err;
}
}
#endif
if (seg_is_any_raid10(seg) && seg->area_count > 2 &&
stripes && stripes < seg->area_count - seg->segtype->parity_devs) {
log_error("Can't remove stripes from raid10");
goto err;
return 2;
}
if (data_copies != seg->data_copies) {
if (seg_is_raid10_near(seg))
return 0;
#if 0
if (seg_is_raid10_far(seg))
return segtype_is_raid10_far(segtype) ? 1 : 0;
if (seg_is_raid10_offset(seg)) {
log_error("Can't change number of data copies on %s LV %s.",
lvseg_name(seg), display_lvname(lv));
goto err;
}
#endif
}
#if 0
/* raid10_{near,offset} case */
if ((seg_is_raid10_near(seg) && segtype_is_raid10_offset(segtype)) ||
(seg_is_raid10_offset(seg) && segtype_is_raid10_near(segtype))) {
if (stripes >= seg->area_count)
return 1;
goto err;
}
/*
* raid10_far is not reshapable in MD at all;
* lvm/dm adds reshape capability to add/remove data_copies
*/
if (seg_is_raid10_far(seg) && segtype_is_raid10_far(segtype)) {
if (stripes && stripes == seg->area_count &&
data_copies > 1 &&
data_copies <= seg->area_count &&
data_copies != seg->data_copies)
return 1;
goto err;
} else if (seg_is_any_raid10(seg) && segtype_is_any_raid10(segtype) &&
data_copies > 1 && data_copies != seg->data_copies)
goto err;
#endif
/* Change layout (e.g. raid5_ls -> raid5_ra) keeping # of stripes */
if (seg->segtype != segtype) {
if (stripes && stripes != _data_rimages_count(seg, seg->area_count))
goto err;
return 2;
return 1;
}
if (stripes && stripes == _data_rimages_count(seg, seg->area_count) &&
stripe_size == seg->stripe_size) {
stripe_size == seg->stripe_size &&
region_size == seg->region_size) {
log_error("LV %s already has %u stripes.",
display_lvname(lv), stripes);
return 2;
}
return (stripes || stripe_size) ? 1 : 0;
err:
#if 0
if (lv_is_duplicated(lv))
log_error("Conversion of duplicating sub LV %s rejected.", display_lvname(lv));
else
log_error("Use \"lvconvert --duplicate --type %s ... %s.", segtype->name, display_lvname(lv));
#endif
return 2;
}
/*
@@ -2980,9 +2928,11 @@ static int _raid_remove_images(struct logical_volume *lv, int yes,
return 0;
}
first_seg(lv)->area_count = new_count;
/* Convert to linear? */
if (new_count == 1) {
if (!yes && yes_no_prompt("Are you sure you want to convert %s LV %s to type %s loosing all resilience? [y/n]: ",
if (!yes && yes_no_prompt("Are you sure you want to convert %s LV %s to type %s losing all resilience? [y/n]: ",
lvseg_name(first_seg(lv)), display_lvname(lv), SEG_TYPE_NAME_LINEAR) == 'n') {
log_error("Logical volume %s NOT converted to \"%s\".",
display_lvname(lv), SEG_TYPE_NAME_LINEAR);
@@ -3006,13 +2956,11 @@ static int _raid_remove_images(struct logical_volume *lv, int yes,
/*
* Eliminate the extracted LVs
*/
if (!dm_list_empty(removal_lvs)) {
if (!_deactivate_and_remove_lvs(lv->vg, removal_lvs))
return_0;
if (!_deactivate_and_remove_lvs(lv->vg, removal_lvs))
return_0;
if (!vg_write(lv->vg) || !vg_commit(lv->vg))
return_0;
}
if (!lv_update_and_reload_origin(lv))
return_0;
backup(lv->vg);
@@ -3062,7 +3010,15 @@ int lv_raid_change_image_count(struct logical_volume *lv, int yes, uint32_t new_
const uint32_t new_region_size, struct dm_list *allocate_pvs)
{
struct lv_segment *seg = first_seg(lv);
const char *level = seg->area_count == 1 ? "raid1 with " : "";
const char *resil = new_count < seg->area_count ? "reducing" : "enhancing";
if (new_count != 1 && /* Already prompted for in _raid_remove_images() */
!yes && yes_no_prompt("Are you sure you want to convert %s LV %s to %s%u images %s resilience? [y/n]: ",
lvseg_name(first_seg(lv)), display_lvname(lv), level, new_count, resil) == 'n') {
log_error("Logical volume %s NOT converted.", display_lvname(lv));
return 0;
}
if (new_region_size) {
seg->region_size = new_region_size;
_check_and_adjust_region_size(lv);
@@ -3116,9 +3072,9 @@ int lv_raid_split(struct logical_volume *lv, int yes, const char *split_name,
return 0;
}
/* Split on a 2-legged raid1 LV causes loosing all resilience */
/* Split on a 2-legged raid1 LV causes losing all resilience */
if (new_count == 1 &&
!yes && yes_no_prompt("Are you sure you want to split %s LV %s loosing all resilience? [y/n]: ",
!yes && yes_no_prompt("Are you sure you want to split %s LV %s losing all resilience? [y/n]: ",
lvseg_name(first_seg(lv)), display_lvname(lv)) == 'n') {
log_error("Logical volume %s NOT split.", display_lvname(lv));
return 0;
@@ -3158,8 +3114,7 @@ int lv_raid_split(struct logical_volume *lv, int yes, const char *split_name,
}
/* Get first item */
dm_list_iterate_items(lvl, &data_list)
break;
lvl = (struct lv_list *) dm_list_first(&data_list);
lvl->lv->name = split_name;
@@ -3259,9 +3214,9 @@ int lv_raid_split_and_track(struct logical_volume *lv,
return 0;
}
/* Split and track changes on a 2-legged raid1 LV causes loosing resilience for newly written data. */
/* Split and track changes on a 2-legged raid1 LV causes losing resilience for newly written data. */
if (seg->area_count == 2 &&
!yes && yes_no_prompt("Are you sure you want to split and track %s LV %s loosing resilience for any newly written data? [y/n]: ",
!yes && yes_no_prompt("Are you sure you want to split and track %s LV %s losing resilience for any newly written data? [y/n]: ",
lvseg_name(seg), display_lvname(lv)) == 'n') {
log_error("Logical volume %s NOT split.", display_lvname(lv));
return 0;
@@ -4467,6 +4422,12 @@ static const char *_get_segtype_alias(const struct segment_type *segtype)
if (!strcmp(segtype->name, SEG_TYPE_NAME_RAID6_ZR))
return SEG_TYPE_NAME_RAID6;
if (!strcmp(segtype->name, SEG_TYPE_NAME_RAID10))
return SEG_TYPE_NAME_RAID10_NEAR;
if (!strcmp(segtype->name, SEG_TYPE_NAME_RAID10_NEAR))
return SEG_TYPE_NAME_RAID10;
return "";
}
@@ -4633,7 +4594,7 @@ static int _raid1_to_mirrored_wrapper(TAKEOVER_FN_ARGS)
if (!_raid_in_sync(lv))
return_0;
if (!yes && yes_no_prompt("Are you sure you want to convert %s back to the older \"%s\" type? [y/n]: ",
if (!yes && yes_no_prompt("Are you sure you want to convert %s back to the older %s type? [y/n]: ",
display_lvname(lv), SEG_TYPE_NAME_MIRROR) == 'n') {
log_error("Logical volume %s NOT converted to \"%s\".",
display_lvname(lv), SEG_TYPE_NAME_MIRROR);
@@ -4666,7 +4627,7 @@ static int _clear_meta_lvs(struct logical_volume *lv)
struct lv_segment_area *tmp_areas;
const struct segment_type *tmp_segtype;
struct dm_list meta_lvs;
struct lv_list *lvl_array, *lvl;
struct lv_list *lvl;
int is_raid45n10 = seg_is_raid4(seg) || seg_is_raid5_n(seg) || seg_is_raid10(seg);
/* Reject non-raid0_meta/raid4/raid5_n segment types cautiously */
@@ -4674,9 +4635,6 @@ static int _clear_meta_lvs(struct logical_volume *lv)
(!seg_is_raid0_meta(seg) && !is_raid45n10))
return_0;
if (!(lvl_array = dm_pool_alloc(lv->vg->vgmem, seg->area_count * sizeof(*lvl_array))))
return_0;
dm_list_init(&meta_lvs);
tmp_segtype = seg->segtype;
tmp_areas = seg->meta_areas;
@@ -4827,8 +4785,80 @@ static int _shift_parity_dev(struct lv_segment *seg)
return 1;
}
/*
* raid4 <-> raid5_n helper
*
* On conversions between raid4 and raid5_n, the parity SubLVs need
* to be switched between beginning and end of the segment areas.
*
* The metadata devices reflect the previous positions within the RaidLV,
* thus need to be cleared in order to allow the kernel to start the new
* mapping and recreate metadata with the proper new position stored.
*/
static int _raid45_to_raid54_wrapper(TAKEOVER_FN_ARGS)
{
struct lv_segment *seg = first_seg(lv);
struct dm_list removal_lvs;
uint32_t region_size = seg->region_size;
dm_list_init(&removal_lvs);
if (!(seg_is_raid4(seg) && segtype_is_raid5_n(new_segtype)) &&
!(seg_is_raid5_n(seg) && segtype_is_raid4(new_segtype))) {
log_error("LV %s has to be of type raid4 or raid5_n to allow for this conversion.",
display_lvname(lv));
return 0;
}
/* Necessary when convering to raid0/striped w/o redundancy. */
if (!_raid_in_sync(lv)) {
log_error("Unable to convert %s while it is not in-sync.",
display_lvname(lv));
return 0;
}
log_debug_metadata("Converting LV %s from %s to %s.", display_lvname(lv),
(seg_is_raid4(seg) ? SEG_TYPE_NAME_RAID4 : SEG_TYPE_NAME_RAID5_N),
(seg_is_raid4(seg) ? SEG_TYPE_NAME_RAID5_N : SEG_TYPE_NAME_RAID4));
/* Archive metadata */
if (!archive(lv->vg))
return_0;
if (!_rename_area_lvs(lv, "_")) {
log_error("Failed to rename %s LV %s MetaLVs.", lvseg_name(seg), display_lvname(lv));
return 0;
}
if (!_clear_meta_lvs(lv))
return_0;
/* Shift parity SubLV pair "PDD..." <-> "DD...P" on raid4 <-> raid5_n conversion */
if( !_shift_parity_dev(seg))
return 0;
/* Don't resync */
init_mirror_in_sync(1);
seg->region_size = new_region_size ?: region_size;
seg->segtype = new_segtype;
if (!_lv_update_reload_fns_reset_eliminate_lvs(lv, 0, &removal_lvs, NULL))
return_0;
init_mirror_in_sync(0);
if (!_rename_area_lvs(lv, NULL)) {
log_error("Failed to rename %s LV %s MetaLVs.", lvseg_name(seg), display_lvname(lv));
return 0;
}
if (!lv_update_and_reload(lv))
return_0;
return 1;
}
/* raid45610 -> raid0* / stripe, raid5_n -> raid4 */
static int _raid45_to_raid54_wrapper(TAKEOVER_FN_ARGS);
static int _takeover_downconvert_wrapper(TAKEOVER_FN_ARGS)
{
int rename_sublvs = 0;
@@ -4875,13 +4905,6 @@ static int _takeover_downconvert_wrapper(TAKEOVER_FN_ARGS)
} else
*res_str = '\0';
if (!yes && yes_no_prompt("Are you sure you want to convert \"%s\" LV %s to \"%s\" type%s? [y/n]: ",
lvseg_name(seg), display_lvname(lv), new_segtype->name, res_str) == 'n') {
log_error("Logical volume %s NOT converted to \"%s\"",
display_lvname(lv), new_segtype->name);
return 0;
}
/* Archive metadata */
if (!archive(lv->vg))
return_0;
@@ -4974,79 +4997,6 @@ static int _takeover_downconvert_wrapper(TAKEOVER_FN_ARGS)
return 1;
}
/*
* raid4 <-> raid5_n helper
*
* On conversions between raid4 and raid5_n, the parity SubLVs need
* to be switched between beginning and end of the segment areas.
*
* The metadata devices reflect the previous positions within the RaidLV,
* thus need to be cleared in order to allow the kernel to start the new
* mapping and recreate metadata with the proper new position stored.
*/
static int _raid45_to_raid54_wrapper(TAKEOVER_FN_ARGS)
{
struct lv_segment *seg = first_seg(lv);
struct dm_list removal_lvs;
uint32_t region_size = seg->region_size;
dm_list_init(&removal_lvs);
if (!(seg_is_raid4(seg) && segtype_is_raid5_n(new_segtype)) &&
!(seg_is_raid5_n(seg) && segtype_is_raid4(new_segtype))) {
log_error("LV %s has to be of type raid4 or raid5_n to allow for this conversion.",
display_lvname(lv));
return 0;
}
/* Necessary when convering to raid0/striped w/o redundancy. */
if (!_raid_in_sync(lv)) {
log_error("Unable to convert %s while it is not in-sync.",
display_lvname(lv));
return 0;
}
log_debug_metadata("Converting LV %s from %s to %s.", display_lvname(lv),
(seg_is_raid4(seg) ? SEG_TYPE_NAME_RAID4 : SEG_TYPE_NAME_RAID5_N),
(seg_is_raid4(seg) ? SEG_TYPE_NAME_RAID5_N : SEG_TYPE_NAME_RAID4));
/* Archive metadata */
if (!archive(lv->vg))
return_0;
if (!_rename_area_lvs(lv, "_")) {
log_error("Failed to rename %s LV %s MetaLVs.", lvseg_name(seg), display_lvname(lv));
return 0;
}
if (!_clear_meta_lvs(lv))
return_0;
/* Shift parity SubLV pair "PDD..." <-> "DD...P" on raid4 <-> raid5_n conversion */
if( !_shift_parity_dev(seg))
return 0;
/* Don't resync */
init_mirror_in_sync(1);
seg->region_size = new_region_size ?: region_size;
seg->segtype = new_segtype;
if (!_lv_update_reload_fns_reset_eliminate_lvs(lv, 0, &removal_lvs, NULL))
return_0;
init_mirror_in_sync(0);
if (!_rename_area_lvs(lv, NULL)) {
log_error("Failed to rename %s LV %s MetaLVs.", lvseg_name(seg), display_lvname(lv));
return 0;
}
if (!lv_update_and_reload(lv))
return_0;
return 1;
}
static int _striped_to_raid0_wrapper(struct logical_volume *lv,
const struct segment_type *new_segtype,
uint32_t new_stripes,
@@ -5073,6 +5023,7 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS)
{
uint32_t extents_copied, region_size, seg_len, stripe_size;
struct lv_segment *seg = first_seg(lv);
const struct segment_type *initial_segtype = seg->segtype;
struct dm_list removal_lvs;
dm_list_init(&removal_lvs);
@@ -5087,6 +5038,19 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS)
return 0;
}
if (segtype_is_any_raid6(new_segtype)) {
uint32_t min_areas = 3;
if (seg_is_raid4(seg) || seg_is_any_raid5(seg))
min_areas = 4;
if (seg->area_count < min_areas) {
log_error("Minimum of %" PRIu32 " stripes needed for conversion from %s to %s.",
min_areas, lvseg_name(seg), new_segtype->name);
return 0;
}
}
if (seg_is_any_raid5(seg) && segtype_is_any_raid6(new_segtype) && seg->area_count < 4) {
log_error("Minimum of 3 stripes needed for conversion from %s to %s.",
lvseg_name(seg), new_segtype->name);
@@ -5137,7 +5101,7 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS)
/* Add metadata LVs */
if (seg_is_raid0(seg)) {
log_debug_metadata("Adding metadata LVs to %s.", display_lvname(lv));
if (!_raid0_add_or_remove_metadata_lvs(lv, 1 /* update_and_reload */, allocate_pvs, NULL))
if (!_raid0_add_or_remove_metadata_lvs(lv, 0 /* update_and_reload */, allocate_pvs, NULL))
return 0;
/* raid0_meta -> raid4 needs clearing of MetaLVs in order to avoid raid disk role change issues in the kernel */
}
@@ -5147,7 +5111,6 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS)
!_clear_meta_lvs(lv))
return_0;
extents_copied = seg->extents_copied;
seg_len = seg->len;
stripe_size = seg->stripe_size;
@@ -5166,8 +5129,28 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS)
log_debug_metadata("Adding %" PRIu32 " component LV pair(s) to %s.",
new_image_count - lv_raid_image_count(lv),
display_lvname(lv));
if (!_lv_raid_change_image_count(lv, 1, new_image_count, allocate_pvs, NULL, 0, 1))
if (!_lv_raid_change_image_count(lv, 1, new_image_count, allocate_pvs, NULL, 0, 1)) {
/*
* Rollback to initial type raid0/striped after failure to upconvert
* to raid4/5/6/10 elminating any newly allocated metadata devices
* (raid4/5 -> raid6 doesn't need any explicit changes after
* the allocation of the additional sub LV pair failed)
*
* - initial type is raid0 -> just remove remove metadata devices
*
* - initial type is striped -> convert back to it (removes metadata devices)
*/
if (segtype_is_raid0(initial_segtype) &&
!_raid0_add_or_remove_metadata_lvs(lv, 0, NULL, &removal_lvs))
return_0;
if (segtype_is_striped_target(initial_segtype) &&
!_convert_raid0_to_striped(lv, 0, &removal_lvs))
return_0;
if (!_eliminate_extracted_lvs(lv->vg, &removal_lvs)) /* Updates vg */
return_0;
return 0;
}
seg = first_seg(lv);
}
@@ -5214,7 +5197,8 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS)
_pre_raid_add_legs, NULL))
return 0;
if (segtype_is_raid4(new_segtype)) {
if (segtype_is_raid4(new_segtype) &&
seg->area_count != 2) {
/* We had to rename SubLVs because of collision free shifting, rename back... */
if (!_rename_area_lvs(lv, NULL))
return_0;
@@ -5409,7 +5393,7 @@ static int _takeover_from_raid1_to_raid0_meta(TAKEOVER_FN_ARGS)
static int _takeover_from_raid1_to_raid1(TAKEOVER_FN_ARGS)
{
return _takeover_unsupported_yet(lv, new_stripes, new_segtype);
return _takeover_unsupported(lv, new_segtype, 0, 0, 0, 0, new_stripes, 0, 0, NULL);
}
static int _takeover_from_raid1_to_raid10(TAKEOVER_FN_ARGS)
@@ -5781,15 +5765,9 @@ static int _set_convenient_raid1456_segtype_to(const struct lv_segment *seg_from
replaced:
if (!(*segtype = get_segtype_from_flag(cmd, seg_flag)))
return_0;
log_warn("Replaced LV type %s with possible type %s.",
segtype_sav->name, (*segtype)->name);
if (!yes && yes_no_prompt("Do you want to convert %s LV %s to %s? [y/n]: ",
segtype_sav->name, display_lvname(seg_from->lv),
(*segtype)->name) == 'n') {
log_error("Logical volume %s NOT converted.", display_lvname(seg_from->lv));
return 0;
}
if (segtype_sav != *segtype)
log_warn("Replaced LV type %s with possible type %s.",
segtype_sav->name, (*segtype)->name);
return 1;
}
@@ -5814,9 +5792,10 @@ static int _region_size_change_requested(struct logical_volume *lv, int yes, con
return_0;
if (region_size == seg->region_size) {
log_print_unless_silent("Region size wouldn't change on %s LV %s.",
lvseg_name(seg), display_lvname(lv));
return 1;
log_error("Region size is already %s on %s LV %s.",
display_size(lv->vg->cmd, region_size),
lvseg_name(seg), display_lvname(lv));
return 0;
}
if (!_check_region_size_constraints(lv, seg->segtype, region_size, seg->stripe_size))
@@ -5901,6 +5880,15 @@ static int _conversion_options_allowed(const struct lv_segment *seg_from,
r = 0;
}
if (r &&
strcmp((*segtype_to)->name, SEG_TYPE_NAME_MIRROR) && /* "mirror" is prompted for later */
!yes && yes_no_prompt("Are you sure you want to convert %s LV %s to %s type? [y/n]: ",
lvseg_name(seg_from), display_lvname(seg_from->lv),
(*segtype_to)->name) == 'n') {
log_error("Logical volume %s NOT converted.", display_lvname(seg_from->lv));
r = 0;
}
return r;
}
@@ -5950,8 +5938,9 @@ int lv_raid_convert(struct logical_volume *lv,
struct lv_segment *seg = first_seg(lv);
uint32_t stripes = new_stripes, stripe_size;
uint32_t new_image_count = seg->area_count;
uint32_t region_size = new_region_size;
uint32_t region_size;
uint32_t data_copies = seg->data_copies;
uint32_t available_slvs, removed_slvs;
takeover_fn_t takeover_fn;
new_segtype = new_segtype ? : seg->segtype;
@@ -6003,6 +5992,17 @@ int lv_raid_convert(struct logical_volume *lv,
return 0;
}
/* Prohibit any takeover in case sub LVs to be removed still exist after a previous reshape */
if (!_get_available_removed_sublvs(lv, &available_slvs, &removed_slvs))
return 0;
if (removed_slvs) {
log_error("Can't convert %s LV %s to %s containing sub LVs to remove after a reshape.",
lvseg_name(seg), display_lvname(lv), new_segtype->name);
log_error("Run \"lvconvert --stripes %" PRIu32 " %s\" first.",
seg->area_count - removed_slvs - 1, display_lvname(lv));
return 0;
}
/*
* Check acceptible options mirrors, region_size,
* stripes and/or stripe_size have been provided.
@@ -6017,7 +6017,29 @@ int lv_raid_convert(struct logical_volume *lv,
/* Exit without doing activation checks if the combination isn't possible */
if (_takeover_not_possible(takeover_fn))
return takeover_fn(lv, new_segtype, yes, force, new_image_count, 0, new_stripes, stripe_size,
region_size, allocate_pvs);
region_size, allocate_pvs);
/*
* User requested "--type raid*" without neither
* requesting a reshape nor a takeover.
*
* I.e. the raid level is the same but no layout,
* stripesize or number of stripes change is required.
*
* Check if a regionsize change is required.
*/
if (seg->segtype == new_segtype && new_region_size) {
if (seg->region_size != new_region_size) {
log_verbose("Converting %s LV %s to regionsize %s.",
lvseg_name(first_seg(lv)), display_lvname(lv),
display_size(lv->vg->cmd, new_region_size));
return _region_size_change_requested(lv, yes, new_region_size);
} else {
log_error("Can't convert %s LV %s without a region size change.",
lvseg_name(seg), display_lvname(lv));
return 0;
}
}
log_verbose("Converting %s from %s to %s.",
display_lvname(lv), lvseg_name(first_seg(lv)),

View File

@@ -1,6 +1,6 @@
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
* Copyright (C) 2004-2016 Red Hat, Inc. All rights reserved.
* Copyright (C) 2004-2017 Red Hat, Inc. All rights reserved.
*
* This file is part of LVM2.
*
@@ -28,50 +28,50 @@ struct dm_config_node;
struct dev_manager;
/* Feature flags */
#define SEG_CAN_SPLIT 0x0000000000000001ULL
#define SEG_AREAS_STRIPED 0x0000000000000002ULL
#define SEG_AREAS_MIRRORED 0x0000000000000004ULL
#define SEG_SNAPSHOT 0x0000000000000008ULL
#define SEG_FORMAT1_SUPPORT 0x0000000000000010ULL
#define SEG_VIRTUAL 0x0000000000000020ULL
#define SEG_CANNOT_BE_ZEROED 0x0000000000000040ULL
#define SEG_MONITORED 0x0000000000000080ULL
#define SEG_REPLICATOR 0x0000000000000100ULL
#define SEG_REPLICATOR_DEV 0x0000000000000200ULL
#define SEG_RAID 0x0000000000000400ULL
#define SEG_THIN_POOL 0x0000000000000800ULL
#define SEG_THIN_VOLUME 0x0000000000001000ULL
#define SEG_CACHE 0x0000000000002000ULL
#define SEG_CACHE_POOL 0x0000000000004000ULL
#define SEG_MIRROR 0x0000000000008000ULL
#define SEG_ONLY_EXCLUSIVE 0x0000000000010000ULL /* In cluster only exlusive activation */
#define SEG_CAN_ERROR_WHEN_FULL 0x0000000000020000ULL
#define SEG_CAN_SPLIT (1ULL << 0)
#define SEG_AREAS_STRIPED (1ULL << 1)
#define SEG_AREAS_MIRRORED (1ULL << 2)
#define SEG_SNAPSHOT (1ULL << 3)
#define SEG_FORMAT1_SUPPORT (1ULL << 4)
#define SEG_VIRTUAL (1ULL << 5)
#define SEG_CANNOT_BE_ZEROED (1ULL << 6)
#define SEG_MONITORED (1ULL << 7)
#define SEG_REPLICATOR (1ULL << 8)
#define SEG_REPLICATOR_DEV (1ULL << 9)
#define SEG_RAID (1ULL << 10)
#define SEG_THIN_POOL (1ULL << 11)
#define SEG_THIN_VOLUME (1ULL << 12)
#define SEG_CACHE (1ULL << 13)
#define SEG_CACHE_POOL (1ULL << 14)
#define SEG_MIRROR (1ULL << 15)
#define SEG_ONLY_EXCLUSIVE (1ULL << 16) /* In cluster only exlusive activation */
#define SEG_CAN_ERROR_WHEN_FULL (1ULL << 17)
#define SEG_RAID0 0x0000000000040000ULL
#define SEG_RAID0_META 0x0000000000080000ULL
#define SEG_RAID1 0x0000000000100000ULL
#define SEG_RAID10_NEAR 0x0000000000200000ULL
#define SEG_RAID0 (1ULL << 18)
#define SEG_RAID0_META (1ULL << 19)
#define SEG_RAID1 (1ULL << 20)
#define SEG_RAID10_NEAR (1ULL << 21)
#define SEG_RAID10 SEG_RAID10_NEAR
#define SEG_RAID4 0x0000000000400000ULL
#define SEG_RAID5_N 0x0000000000800000ULL
#define SEG_RAID5_LA 0x0000000001000000ULL
#define SEG_RAID5_LS 0x0000000002000000ULL
#define SEG_RAID5_RA 0x0000000004000000ULL
#define SEG_RAID5_RS 0x0000000008000000ULL
#define SEG_RAID4 (1ULL << 22)
#define SEG_RAID5_N (1ULL << 23)
#define SEG_RAID5_LA (1ULL << 24)
#define SEG_RAID5_LS (1ULL << 25)
#define SEG_RAID5_RA (1ULL << 26)
#define SEG_RAID5_RS (1ULL << 27)
#define SEG_RAID5 SEG_RAID5_LS
#define SEG_RAID6_NC 0x0000000010000000ULL
#define SEG_RAID6_NR 0x0000000020000000ULL
#define SEG_RAID6_ZR 0x0000000040000000ULL
#define SEG_RAID6_LA_6 0x0000000080000000ULL
#define SEG_RAID6_LS_6 0x0000000100000000ULL
#define SEG_RAID6_RA_6 0x0000000200000000ULL
#define SEG_RAID6_RS_6 0x0000000400000000ULL
#define SEG_RAID6_N_6 0x0000000800000000ULL
#define SEG_RAID6_NC (1ULL << 28)
#define SEG_RAID6_NR (1ULL << 29)
#define SEG_RAID6_ZR (1ULL << 30)
#define SEG_RAID6_LA_6 (1ULL << 31)
#define SEG_RAID6_LS_6 (1ULL << 32)
#define SEG_RAID6_RA_6 (1ULL << 33)
#define SEG_RAID6_RS_6 (1ULL << 34)
#define SEG_RAID6_N_6 (1ULL << 35)
#define SEG_RAID6 SEG_RAID6_ZR
#define SEG_STRIPED_TARGET 0x0000008000000000ULL
#define SEG_STRIPED_TARGET (1ULL << 39)
#define SEG_UNKNOWN 0x8000000000000000ULL
#define SEG_UNKNOWN (1ULL << 63)
#define SEG_TYPE_NAME_LINEAR "linear"
#define SEG_TYPE_NAME_STRIPED "striped"
@@ -89,6 +89,7 @@ struct dev_manager;
#define SEG_TYPE_NAME_RAID0_META "raid0_meta"
#define SEG_TYPE_NAME_RAID1 "raid1"
#define SEG_TYPE_NAME_RAID10 "raid10"
#define SEG_TYPE_NAME_RAID10_NEAR "raid10_near"
#define SEG_TYPE_NAME_RAID4 "raid4"
#define SEG_TYPE_NAME_RAID5 "raid5"
#define SEG_TYPE_NAME_RAID5_N "raid5_n"
@@ -137,11 +138,12 @@ struct dev_manager;
#define segtype_is_raid6_rs_6(segtype) ((segtype)->flags & SEG_RAID6_RS_6 ? 1 : 0)
#define segtype_is_raid6_la_6(segtype) ((segtype)->flags & SEG_RAID6_LA_6 ? 1 : 0)
#define segtype_is_raid6_ra_6(segtype) ((segtype)->flags & SEG_RAID6_RA_6 ? 1 : 0)
#define segtype_is_any_raid10(segtype) ((segtype)->flags & SEG_RAID10 ? 1 : 0)
#define segtype_is_raid10(segtype) ((segtype)->flags & SEG_RAID10 ? 1 : 0)
#define segtype_is_raid10_near(segtype) segtype_is_raid10(segtype)
/* FIXME: once raid10_offset supported */
#define segtype_is_raid10_offset(segtype) 0 // ((segtype)->flags & SEG_RAID10_OFFSET ? 1 : 0)
#define segtype_is_raid10_near(segtype) ((segtype)->flags & SEG_RAID10_NEAR ? 1 : 0)
/* FIXME: once raid10_{far,offset} supported */
#define segtype_is_raid10_far(segtype) 0 /* FIXME ((segtype)->flags & SEG_RAID10_FAR ? 1 : 0 */
#define segtype_is_raid10_offset(segtype) 0 /* FIXME ((segtype)->flags & SEG_RAID10_OFFSET ? 1 : 0 */
#define segtype_is_any_raid10(segtype) (segtype_is_raid10(segtype) || segtype_is_raid10_near(segtype) || segtype_is_raid10_far(segtype) || segtype_is_raid10_offset(segtype))
#define segtype_is_raid_with_meta(segtype) (segtype_is_raid(segtype) && !segtype_is_raid0(segtype))
#define segtype_is_striped_raid(segtype) (segtype_is_raid(segtype) && !segtype_is_raid1(segtype))
#define segtype_is_reshapable_raid(segtype) ((segtype_is_striped_raid(segtype) && !segtype_is_any_raid0(segtype)) || segtype_is_raid10_near(segtype) || segtype_is_raid10_offset(segtype))
@@ -286,7 +288,8 @@ struct segment_type *init_unknown_segtype(struct cmd_context *cmd,
#define RAID_FEATURE_RAID0 (1U << 1) /* version 1.7 */
#define RAID_FEATURE_RESHAPING (1U << 2) /* version 1.8 */
#define RAID_FEATURE_RAID4 (1U << 3) /* ! version 1.8 or 1.9.0 */
#define RAID_FEATURE_RESHAPE (1U << 4) /* version 1.10.1 */
#define RAID_FEATURE_SHRINK (1U << 4) /* version 1.9.0 */
#define RAID_FEATURE_RESHAPE (1U << 5) /* version 1.10.1 */
#ifdef RAID_INTERNAL
int init_raid_segtypes(struct cmd_context *cmd, struct segtype_library *seglib);

View File

@@ -100,9 +100,10 @@ int attach_thin_external_origin(struct lv_segment *seg,
external_lv->status &= ~LVM_WRITE;
}
// TODO: should we mark even origin read-only ?
//if (lv_is_cache(external_lv)) /* read-only corigin of cache LV */
// seg_lv(first_seg(external_lv), 0)->status &= ~LVM_WRITE;
/* FIXME Mark origin read-only?
if (lv_is_cache(external_lv)) // read-only corigin of cache LV
seg_lv(first_seg(external_lv), 0)->status &= ~LVM_WRITE;
*/
}
return 1;

View File

@@ -22,7 +22,7 @@
static sigset_t _oldset;
static int _signals_blocked = 0;
static volatile sig_atomic_t _sigint_caught = 0;
static volatile sig_atomic_t _handler_installed;
static volatile sig_atomic_t _handler_installed = 0;
/* Support 3 level nesting, increase if needed more */
#define MAX_SIGINTS 3
@@ -67,7 +67,7 @@ void sigint_allow(void)
* Do not overwrite the backed-up handler data -
* just increase nesting count.
*/
if (++_handler_installed >= MAX_SIGINTS)
if (++_handler_installed > MAX_SIGINTS)
return;
/* Grab old sigaction for SIGINT: shall not fail. */
@@ -85,7 +85,7 @@ void sigint_allow(void)
if (sigprocmask(0, NULL, &sigs))
log_sys_debug("sigprocmask", "");
if ((_oldmasked[_handler_installed] = sigismember(&sigs, SIGINT))) {
if ((_oldmasked[_handler_installed - 1] = sigismember(&sigs, SIGINT))) {
sigdelset(&sigs, SIGINT);
if (sigprocmask(SIG_SETMASK, &sigs, NULL))
log_sys_debug("sigprocmask", "SIG_SETMASK");

View File

@@ -473,6 +473,7 @@ static int _raid_target_present(struct cmd_context *cmd,
const struct raid_feature _features[] = {
{ 1, 3, 0, RAID_FEATURE_RAID10, SEG_TYPE_NAME_RAID10 },
{ 1, 7, 0, RAID_FEATURE_RAID0, SEG_TYPE_NAME_RAID0 },
{ 1, 9, 0, RAID_FEATURE_SHRINK, "shrinking" },
{ 1, 10, 1, RAID_FEATURE_RESHAPE, "reshaping" },
};
@@ -598,6 +599,7 @@ static const struct raid_type {
{ SEG_TYPE_NAME_RAID0_META, 0, SEG_RAID0_META | SEG_AREAS_STRIPED },
{ SEG_TYPE_NAME_RAID1, 0, SEG_RAID1 | SEG_AREAS_MIRRORED },
{ SEG_TYPE_NAME_RAID10, 0, SEG_RAID10 | SEG_AREAS_MIRRORED },
{ SEG_TYPE_NAME_RAID10_NEAR,0, SEG_RAID10_NEAR | SEG_AREAS_MIRRORED },
{ SEG_TYPE_NAME_RAID4, 1, SEG_RAID4 },
{ SEG_TYPE_NAME_RAID5, 1, SEG_RAID5 },
{ SEG_TYPE_NAME_RAID5_N, 1, SEG_RAID5_N },

View File

@@ -1008,7 +1008,7 @@ static int _translate_time_items(struct dm_report *rh, struct time_info *info,
dm_pool_free(info->mem, info->ti_list);
info->ti_list = NULL;
if (dm_snprintf(buf, sizeof(buf), "@%ld:@%ld", t1, t2) == -1) {
if (dm_snprintf(buf, sizeof(buf), "@" FMTd64 ":@" FMTd64, (int64_t)t1, (int64_t)t2) == -1) {
log_error("_translate_time_items: dm_snprintf failed");
return 0;
}
@@ -1063,10 +1063,10 @@ static void *_lv_time_handler_get_dynamic_value(struct dm_report *rh,
struct dm_pool *mem,
const char *data_in)
{
time_t t1, t2;
int64_t t1, t2;
time_t *result;
if (sscanf(data_in, "@%ld:@%ld", &t1, &t2) != 2) {
if (sscanf(data_in, "@" FMTd64 ":@" FMTd64, &t1, &t2) != 2) {
log_error("Failed to get value for parsed time specification.");
return NULL;
}
@@ -1076,8 +1076,8 @@ static void *_lv_time_handler_get_dynamic_value(struct dm_report *rh,
return NULL;
}
result[0] = t1;
result[1] = t2;
result[0] = (time_t) t1; /* Validate range for 32b arch ? */
result[1] = (time_t) t2;
return result;
}

View File

@@ -108,6 +108,7 @@ static const struct {
*/
{ SEG_RAID5_LS, "raid5"}, /* same as "raid5_ls" (default for MD also) */
{ SEG_RAID6_ZR, "raid6"}, /* same as "raid6_zr" */
{ SEG_RAID10, "raid10_near"}, /* same as "raid10" */
};
/* Some segment types have a list of areas of other devices attached */
@@ -1734,9 +1735,11 @@ static int _dm_tree_deactivate_children(struct dm_tree_node *dnode,
!child->callback(child, DM_NODE_CALLBACK_DEACTIVATED,
child->callback_data))
stack;
// FIXME: We need to let lvremove pass,
// so for now deactivation ignores check result
//r = 0; // FIXME: _node_clear_table() without callback ?
/* FIXME Deactivation must currently ignore failure
* here so that lvremove can continue: we need an
* alternative way to handle this state without
* setting r=0. Or better, skip calling thin_check
* entirely if the device is about to be removed. */
if (dm_tree_node_num_children(child, 0) &&
!_dm_tree_deactivate_children(child, uuid_prefix, uuid_prefix_len, level + 1))
@@ -2375,6 +2378,50 @@ static int _get_params_count(uint64_t *bits)
return r;
}
/*
* Get target version (major, minor and patchlevel) for @target_name
*
* FIXME: this function is derived from liblvm.
* Integrate with move of liblvm functions
* to libdm in future library layer purge
* (e.g. expose as API dm_target_version()?)
*/
static int _target_version(const char *target_name, uint32_t *maj,
uint32_t *min, uint32_t *patchlevel)
{
int r = 0;
struct dm_task *dmt;
struct dm_versions *target, *last_target = NULL;
log_very_verbose("Getting target version for %s", target_name);
if (!(dmt = dm_task_create(DM_DEVICE_LIST_VERSIONS)))
return_0;
if (!dm_task_run(dmt)) {
log_debug_activation("Failed to get %s target versions", target_name);
/* Assume this was because LIST_VERSIONS isn't supported */
*maj = *min = *patchlevel = 0;
r = 1;
} else
for (target = dm_task_get_versions(dmt);
target != last_target;
last_target = target, target = (struct dm_versions *)((char *) target + target->next))
if (!strcmp(target_name, target->name)) {
*maj = target->version[0];
*min = target->version[1];
*patchlevel = target->version[2];
log_very_verbose("Found %s target "
"v%" PRIu32 ".%" PRIu32 ".%" PRIu32 ".",
target_name, *maj, *min, *patchlevel);
r = 1;
break;
}
dm_task_destroy(dmt);
return r;
}
static int _raid_emit_segment_line(struct dm_task *dmt, uint32_t major,
uint32_t minor, struct load_segment *seg,
uint64_t *seg_start, char *params,
@@ -2382,6 +2429,7 @@ static int _raid_emit_segment_line(struct dm_task *dmt, uint32_t major,
{
uint32_t i;
uint32_t area_count = seg->area_count / 2;
uint32_t maj, min, patchlevel;
int param_count = 1; /* mandatory 'chunk size'/'stripe size' arg */
int pos = 0;
unsigned type;
@@ -2411,67 +2459,95 @@ static int _raid_emit_segment_line(struct dm_task *dmt, uint32_t major,
type = seg->type;
if (type == SEG_RAID0_META)
type = SEG_RAID0;
#if 0
/* Kernel only expects "raid10", not "raid10_{far,offset}" */
else if (type == SEG_RAID10_FAR ||
type == SEG_RAID10_OFFSET) {
param_count += 2;
type = SEG_RAID10_NEAR;
}
#endif
EMIT_PARAMS(pos, "%s %d %u",
// type == SEG_RAID10_NEAR ? "raid10" : _dm_segtypes[type].target,
type == SEG_RAID10 ? "raid10" : _dm_segtypes[type].target,
param_count, seg->stripe_size);
#if 0
if (seg->type == SEG_RAID10_FAR)
EMIT_PARAMS(pos, " raid10_format far");
else if (seg->type == SEG_RAID10_OFFSET)
EMIT_PARAMS(pos, " raid10_format offset");
#endif
if (seg->data_copies > 1 && type == SEG_RAID10)
EMIT_PARAMS(pos, " raid10_copies %u", seg->data_copies);
if (seg->flags & DM_NOSYNC)
EMIT_PARAMS(pos, " nosync");
else if (seg->flags & DM_FORCESYNC)
EMIT_PARAMS(pos, " sync");
if (seg->region_size)
EMIT_PARAMS(pos, " region_size %u", seg->region_size);
/* If seg-data_offset == 1, kernel needs a zero offset to adjust to it */
if (seg->data_offset)
EMIT_PARAMS(pos, " data_offset %d", seg->data_offset == 1 ? 0 : seg->data_offset);
if (seg->delta_disks)
EMIT_PARAMS(pos, " delta_disks %d", seg->delta_disks);
for (i = 0; i < area_count; i++)
if (seg->rebuilds[i/64] & (1ULL << (i%64)))
EMIT_PARAMS(pos, " rebuild %u", i);
for (i = 0; i < area_count; i++)
if (seg->writemostly[i/64] & (1ULL << (i%64)))
EMIT_PARAMS(pos, " write_mostly %u", i);
if (seg->writebehind)
EMIT_PARAMS(pos, " max_write_behind %u", seg->writebehind);
if (!_target_version("raid", &maj, &min, &patchlevel))
return_0;
/*
* Has to be before "min_recovery_rate" or the kernels
* check will fail when both set and min > previous max
* Target version prior to 1.9.0 and >= 1.11.0 emit
* order of parameters as of kernel target documentation
*/
if (seg->max_recovery_rate)
EMIT_PARAMS(pos, " max_recovery_rate %u",
seg->max_recovery_rate);
if (maj > 1 || (maj == 1 && (min < 9 || min >= 11))) {
if (seg->flags & DM_NOSYNC)
EMIT_PARAMS(pos, " nosync");
else if (seg->flags & DM_FORCESYNC)
EMIT_PARAMS(pos, " sync");
if (seg->min_recovery_rate)
EMIT_PARAMS(pos, " min_recovery_rate %u",
seg->min_recovery_rate);
for (i = 0; i < area_count; i++)
if (seg->rebuilds[i/64] & (1ULL << (i%64)))
EMIT_PARAMS(pos, " rebuild %u", i);
if (seg->min_recovery_rate)
EMIT_PARAMS(pos, " min_recovery_rate %u",
seg->min_recovery_rate);
if (seg->max_recovery_rate)
EMIT_PARAMS(pos, " max_recovery_rate %u",
seg->max_recovery_rate);
for (i = 0; i < area_count; i++)
if (seg->writemostly[i/64] & (1ULL << (i%64)))
EMIT_PARAMS(pos, " write_mostly %u", i);
if (seg->writebehind)
EMIT_PARAMS(pos, " max_write_behind %u", seg->writebehind);
if (seg->region_size)
EMIT_PARAMS(pos, " region_size %u", seg->region_size);
if (seg->data_copies > 1 && type == SEG_RAID10)
EMIT_PARAMS(pos, " raid10_copies %u", seg->data_copies);
if (seg->delta_disks)
EMIT_PARAMS(pos, " delta_disks %d", seg->delta_disks);
/* If seg-data_offset == 1, kernel needs a zero offset to adjust to it */
if (seg->data_offset)
EMIT_PARAMS(pos, " data_offset %d", seg->data_offset == 1 ? 0 : seg->data_offset);
/* Target version >= 1.9.0 && < 1.11.0 had a table line parameter ordering flaw */
} else {
if (seg->data_copies > 1 && type == SEG_RAID10)
EMIT_PARAMS(pos, " raid10_copies %u", seg->data_copies);
if (seg->flags & DM_NOSYNC)
EMIT_PARAMS(pos, " nosync");
else if (seg->flags & DM_FORCESYNC)
EMIT_PARAMS(pos, " sync");
if (seg->region_size)
EMIT_PARAMS(pos, " region_size %u", seg->region_size);
/* If seg-data_offset == 1, kernel needs a zero offset to adjust to it */
if (seg->data_offset)
EMIT_PARAMS(pos, " data_offset %d", seg->data_offset == 1 ? 0 : seg->data_offset);
if (seg->delta_disks)
EMIT_PARAMS(pos, " delta_disks %d", seg->delta_disks);
for (i = 0; i < area_count; i++)
if (seg->rebuilds[i/64] & (1ULL << (i%64)))
EMIT_PARAMS(pos, " rebuild %u", i);
for (i = 0; i < area_count; i++)
if (seg->writemostly[i/64] & (1ULL << (i%64)))
EMIT_PARAMS(pos, " write_mostly %u", i);
if (seg->writebehind)
EMIT_PARAMS(pos, " max_write_behind %u", seg->writebehind);
if (seg->max_recovery_rate)
EMIT_PARAMS(pos, " max_recovery_rate %u",
seg->max_recovery_rate);
if (seg->min_recovery_rate)
EMIT_PARAMS(pos, " min_recovery_rate %u",
seg->min_recovery_rate);
}
/* Print number of metadata/data device pairs */
EMIT_PARAMS(pos, " %u", area_count);
@@ -2742,7 +2818,7 @@ static int _emit_segment(struct dm_task *dmt, uint32_t major, uint32_t minor,
struct load_segment *seg, uint64_t *seg_start)
{
char *params;
size_t paramsize = 4096;
size_t paramsize = 4096; /* FIXME: too small for long RAID lines when > 64 devices supported */
int ret;
do {

View File

@@ -680,8 +680,8 @@ static void _check_group_regions_present(struct dm_stats *dms,
for (; i > 0; i = dm_bit_get_next(regions, i))
if (!_stats_region_present(&dms->regions[i])) {
log_warn("Group descriptor " FMTi64 " contains "
"non-existent region_id " FMTi64 ".",
log_warn("Group descriptor " FMTd64 " contains "
"non-existent region_id " FMTd64 ".",
group_id, i);
dm_bit_clear(regions, i);
}
@@ -4181,21 +4181,23 @@ int dm_stats_get_group_descriptor(const struct dm_stats *dms,
* Resize the group bitmap corresponding to group_id so that it can
* contain at least num_regions members.
*/
static int _stats_resize_group(struct dm_stats_group *group, int num_regions)
static int _stats_resize_group(struct dm_stats_group *group,
uint64_t num_regions)
{
int last_bit = dm_bit_get_last(group->regions);
uint64_t last_bit = dm_bit_get_last(group->regions);
dm_bitset_t new, old;
if (last_bit >= num_regions) {
log_error("Cannot resize group bitmap to %d with bit %d set.",
num_regions, last_bit);
log_error("Cannot resize group bitmap to " FMTu64
" with bit " FMTu64 " set.", num_regions, last_bit);
return 0;
}
log_very_verbose("Resizing group bitmap from %d to %d (last_bit: %d).",
group->regions[0], num_regions, last_bit);
log_very_verbose("Resizing group bitmap from " FMTu32 " to " FMTu64
" (last_bit: " FMTu64 ").", group->regions[0],
num_regions, last_bit);
new = dm_bitset_create(NULL, num_regions);
new = dm_bitset_create(NULL, (unsigned) num_regions);
if (!new) {
log_error("Could not allocate memory for new group bitmap.");
return 0;
@@ -4217,7 +4219,7 @@ static int _stats_group_file_regions(struct dm_stats *dms, uint64_t *region_ids,
dm_bitset_t regions = dm_bitset_create(NULL, dms->nr_regions);
uint64_t i, group_id = DM_STATS_GROUP_NOT_PRESENT;
char *members = NULL;
int buflen;
size_t buflen;
if (!regions) {
log_error("Cannot map file: failed to allocate group bitmap.");
@@ -4401,10 +4403,14 @@ static struct _extent *_stats_get_extents_for_file(struct dm_pool *mem, int fd,
unsigned long flags = 0;
uint64_t *buf;
/* grow temporary extent table in the pool */
if (!dm_pool_begin_object(mem, sizeof(*extents)))
return NULL;
buf = dm_zalloc(STATS_FIE_BUF_LEN);
if (!buf) {
log_error("Could not allocate memory for FIEMAP buffer.");
return NULL;
goto bad;
}
/* initialise pointers into the ioctl buffer. */
@@ -4415,10 +4421,6 @@ static struct _extent *_stats_get_extents_for_file(struct dm_pool *mem, int fd,
*count = (STATS_FIE_BUF_LEN - sizeof(*fiemap))
/ sizeof(struct fiemap_extent);
/* grow temporary extent table in the pool */
if (!dm_pool_begin_object(mem, sizeof(*extents)))
return NULL;
flags = FIEMAP_FLAG_SYNC;
do {
@@ -4472,7 +4474,7 @@ bad:
#define MATCH_EXTENT(e, s, l) \
(((e).start == (s)) && ((e).len == (l)))
static struct _extent *_find_extent(size_t nr_extents, struct _extent *extents,
static struct _extent *_find_extent(uint64_t nr_extents, struct _extent *extents,
uint64_t start, uint64_t len)
{
size_t i;
@@ -4509,8 +4511,9 @@ static int _stats_unmap_regions(struct dm_stats *dms, uint64_t group_id,
{
struct dm_stats_region *region = NULL;
struct dm_stats_group *group = NULL;
int64_t nr_kept, nr_old, i;
uint64_t nr_kept, nr_old;
struct _extent ext;
int64_t i;
group = &dms->groups[group_id];
@@ -4540,8 +4543,9 @@ static int _stats_unmap_regions(struct dm_stats *dms, uint64_t group_id,
ext.id = i;
nr_kept++;
dm_pool_grow_object(mem, &ext,
sizeof(ext));
if (!dm_pool_grow_object(mem, &ext, sizeof(ext)))
goto out;
log_very_verbose("Kept region " FMTu64, i);
} else {
@@ -4563,12 +4567,12 @@ static int _stats_unmap_regions(struct dm_stats *dms, uint64_t group_id,
log_error("Could not finalize region extent table.");
goto out;
}
log_very_verbose("Kept " FMTi64 " of " FMTi64 " old extents",
log_very_verbose("Kept " FMTd64 " of " FMTd64 " old extents",
nr_kept, nr_old);
log_very_verbose("Found " FMTu64 " new extents",
*count - nr_kept);
return nr_kept;
return (int) nr_kept;
out:
dm_pool_abandon_object(mem);
return -1;
@@ -4591,15 +4595,15 @@ static uint64_t *_stats_map_file_regions(struct dm_stats *dms, int fd,
uint64_t *count, int *regroup)
{
struct _extent *extents = NULL, *old_extents = NULL;
uint64_t *regions = NULL, fail_region;
uint64_t *regions = NULL, fail_region, i, num_bits;
struct dm_stats_group *group = NULL;
struct dm_pool *extent_mem = NULL;
struct _extent *old_ext;
char *hist_arg = NULL;
int update, num_bits;
struct statfs fsbuf;
int64_t nr_kept = 0, i;
int64_t nr_kept = 0;
struct stat buf;
int update;
update = _stats_group_id_present(dms, group_id);
@@ -4684,9 +4688,10 @@ static uint64_t *_stats_map_file_regions(struct dm_stats *dms, int fd,
*/
for (i = 0; i < *count; i++) {
if (update) {
if ((old_ext = _find_extent(nr_kept, old_extents,
extents[i].start,
extents[i].len))) {
if ((old_ext = _find_extent((uint64_t) nr_kept,
old_extents,
extents[i].start,
extents[i].len))) {
regions[i] = old_ext->id;
continue;
}
@@ -4742,7 +4747,8 @@ out_remove:
* single list operation and call _stats_delete_region() directly
* to avoid a @stats_list ioctl and list parsing for each region.
*/
dm_stats_list(dms, NULL);
if (!dm_stats_list(dms, NULL))
goto out;
fail_region = i;
_stats_cleanup_region_ids(dms, regions, fail_region);
@@ -4775,7 +4781,8 @@ uint64_t *dm_stats_create_regions_from_fd(struct dm_stats *dms, int fd,
}
if (!(regions = _stats_map_file_regions(dms, fd, bounds, precise,
-1, &count, &regroup)))
DM_STATS_GROUP_NOT_PRESENT,
&count, &regroup)))
return NULL;
if (!group)
@@ -5030,7 +5037,7 @@ int dm_stats_start_filemapd(int fd, uint64_t group_id, const char *path,
}
execvp(args[0], args);
log_error("execvp() failed.");
log_sys_error("execvp", args[0]);
if (!foreground)
_exit(127);
return 0;

View File

@@ -566,7 +566,21 @@ static lv_create_params_t _lvm_lv_params_create_thin_pool(vg_t vg,
if (lvcp) {
lvcp->vg = vg;
lvcp->lvp.discards = (thin_discards_t) discard;
switch (discard) {
case LVM_THIN_DISCARDS_IGNORE:
lvcp->lvp.discards = THIN_DISCARDS_IGNORE;
break;
case LVM_THIN_DISCARDS_NO_PASSDOWN:
lvcp->lvp.discards = THIN_DISCARDS_NO_PASSDOWN;
break;
case LVM_THIN_DISCARDS_PASSDOWN:
lvcp->lvp.discards = THIN_DISCARDS_PASSDOWN;
break;
default:
log_error("Invalid discard argument %d for thin pool creation.", discard);
return NULL;
}
lvcp->lvp.zero_new_blocks = THIN_ZERO_YES;
if (chunk_size)
lvcp->lvp.chunk_size = chunk_size;

View File

@@ -13,7 +13,7 @@
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
SHELL = /bin/sh
SHELL = @SHELL@
@SET_MAKE@
@@ -416,7 +416,7 @@ endif
.LIBPATTERNS = lib%.so lib%.a
%.o: %.c
$(CC) -c $(INCLUDES) $(DEFS) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
$(CC) -c $(INCLUDES) $(DEFS) $(DEFS_$@) $(WFLAGS) $(WCFLAGS) $(CFLAGS) $(CFLAGS_$@) $< -o $@
%.o: %.cpp
$(CXX) -c $(INCLUDES) $(DEFS) $(WFLAGS) $(CXXFLAGS) $(CXXFLAGS_$@) $< -o $@

View File

@@ -32,8 +32,8 @@ LVMRAIDMAN = lvmraid.7
MAN5=lvm.conf.5
MAN7=lvmsystemid.7 lvmreport.7
MAN8=lvm.8 lvmconf.8 lvmdump.8 lvm-config.8 lvm-dumpconfig.8 lvm-fullreport.8 \
lvm-lvpoll.8 lvcreate.8 lvchange.8 lvmconfig.8 lvconvert.8 lvdisplay.8 \
MAN8=lvm.8 lvmconf.8 lvmdump.8 lvm-fullreport.8 lvm-lvpoll.8 \
lvcreate.8 lvchange.8 lvmconfig.8 lvconvert.8 lvdisplay.8 \
lvextend.8 lvreduce.8 lvremove.8 lvrename.8 lvresize.8 lvs.8 \
lvscan.8 pvchange.8 pvck.8 pvcreate.8 pvdisplay.8 pvmove.8 pvremove.8 \
pvresize.8 pvs.8 pvscan.8 vgcfgbackup.8 vgcfgrestore.8 vgchange.8 \
@@ -41,6 +41,7 @@ MAN8=lvm.8 lvmconf.8 lvmdump.8 lvm-config.8 lvm-dumpconfig.8 lvm-fullreport.8 \
vgimport.8 vgimportclone.8 vgmerge.8 vgmknodes.8 vgreduce.8 vgremove.8 \
vgrename.8 vgs.8 vgscan.8 vgsplit.8 \
lvmsar.8 lvmsadc.8 lvmdiskscan.8
MAN8SO=lvm-config.8 lvm-dumpconfig.8
MAN8DM=dmsetup.8 dmstats.8
MAN8CLUSTER=
MAN8SYSTEMD_GENERATORS=lvm2-activation-generator.8
@@ -117,13 +118,13 @@ MAN5DIR=$(mandir)/man5
MAN7DIR=$(mandir)/man7
MAN8DIR=$(mandir)/man8
MANGENERATOR=./man-generator
MANGENERATOR=$(top_builddir)/tools/man-generator
TESTMAN=test.gen
include $(top_builddir)/make.tmpl
CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8:%.8_gen=%.8) $(MAN8CLUSTER) \
$(MAN8SYSTEMD_GENERATORS) $(MAN8DM) $(MANGENERATOR) $(TESTMAN)
CLEAN_TARGETS+=$(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8:%.8=%.8_gen) $(MAN8CLUSTER) \
$(MAN8SYSTEMD_GENERATORS) $(MAN8DM) $(TESTMAN)
DISTCLEAN_TARGETS+=$(FSADMMAN) $(BLKDEACTIVATEMAN) $(DMEVENTDMAN) \
$(LVMETADMAN) $(LVMPOLLDMAN) $(LVMLOCKDMAN) $(CLVMDMAN) $(CMIRRORDMAN) \
$(LVMCACHEMAN) $(LVMTHINMAN) $(LVMDBUSDMAN) $(LVMRAIDMAN) \
@@ -135,27 +136,26 @@ all: man device-mapper
device-mapper: $(MAN8DM)
man: $(MAN5) $(MAN7) $(MAN8) $(MAN8CLUSTER) $(MAN8SYSTEMD_GENERATORS)
man: $(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8CLUSTER) $(MAN8SYSTEMD_GENERATORS)
all_man: man
$(MAN5) $(MAN7) $(MAN8) $(MAN8DM) $(MAN8CLUSTER) $(MAN8SYSTEMD_GENERATORS): Makefile
$(MANGENERATOR): Makefile
$(CC) -DMAN_PAGE_GENERATOR -I$(top_builddir)/tools $(CFLAGS) $(top_srcdir)/tools/command.c -o $@
$(MAN5) $(MAN7) $(MAN8) $(MAN8SO) $(MAN8DM) $(MAN8CLUSTER) $(MAN8SYSTEMD_GENERATORS): Makefile
# Test whether or not the man page generator works
$(TESTMAN): $(MANGENERATOR)
$(TESTMAN): $(MANGENERATOR) Makefile
- $(MANGENERATOR) --primary lvmconfig > $@
SEE_ALSO=$(srcdir)/see_also.end
.PRECIOUS: %.8_gen
%.8_gen: $(srcdir)/%.8_des $(srcdir)/%.8_end $(MANGENERATOR) $(TESTMAN)
( \
if [ ! -s $(TESTMAN) ] ; then \
echo "Copying pre-generated $@" ; \
echo "Copying pre-generated template $@" ; \
else \
echo "Generating $@" ; \
echo "Generating template $@" ; \
fi \
)
( \
@@ -171,20 +171,76 @@ SEE_ALSO=$(srcdir)/see_also.end
) > $@
define SUBSTVARS
echo "Generating $@" ; $(SED) -e "s+#VERSION#+$(LVM_VERSION)+;s+#DEFAULT_SYS_DIR#+$(DEFAULT_SYS_DIR)+;s+#DEFAULT_ARCHIVE_DIR#+$(DEFAULT_ARCHIVE_DIR)+;s+#DEFAULT_BACKUP_DIR#+$(DEFAULT_BACKUP_DIR)+;s+#DEFAULT_PROFILE_DIR#+$(DEFAULT_PROFILE_DIR)+;s+#DEFAULT_CACHE_DIR#+$(DEFAULT_CACHE_DIR)+;s+#DEFAULT_LOCK_DIR#+$(DEFAULT_LOCK_DIR)+;s+#CLVMD_PATH#+/data/lvmtest/usr/sbin/clvmd+;s+#LVM_PATH#+/data/lvmtest/sbin/lvm+;s+#DEFAULT_RUN_DIR#+/var/run/lvm+;s+#DEFAULT_PID_DIR#+/var/run+;s+#SYSTEMD_GENERATOR_DIR#+$(SYSTEMD_GENERATOR_DIR)+;s+#DEFAULT_MANGLING#+$(DEFAULT_MANGLING)+;" $< > $@
echo "Generating $@"
$(SED) -e "s+#VERSION#+$(LVM_VERSION)+" \
-e "s+#DEFAULT_SYS_DIR#+$(DEFAULT_SYS_DIR)+" \
-e "s+#DEFAULT_ARCHIVE_DIR#+$(DEFAULT_ARCHIVE_DIR)+" \
-e "s+#DEFAULT_BACKUP_DIR#+$(DEFAULT_BACKUP_DIR)+" \
-e "s+#DEFAULT_PROFILE_DIR#+$(DEFAULT_PROFILE_DIR)+" \
-e "s+#DEFAULT_CACHE_DIR#+$(DEFAULT_CACHE_DIR)+" \
-e "s+#DEFAULT_LOCK_DIR#+$(DEFAULT_LOCK_DIR)+" \
-e "s+#CLVMD_PATH#+/data/lvmtest/usr/sbin/clvmd+" \
-e "s+#LVM_PATH#+/data/lvmtest/sbin/lvm+" \
-e "s+#DEFAULT_RUN_DIR#+/var/run/lvm+" \
-e "s+#DEFAULT_PID_DIR#+/var/run+" \
-e "s+#SYSTEMD_GENERATOR_DIR#+$(SYSTEMD_GENERATOR_DIR)+" \
-e "s+#DEFAULT_MANGLING#+$(DEFAULT_MANGLING)+" $< > $@
endef
# Escape any '-':
#
# - multiple (>= 2)
# - in ' -'
# - in ranges
# - in middle of options (e.g. '--use-policies') and their arguments
# - in symbolic use (e.g. '->')
# - in "$vg-$lv"
# - in single one in '\\f.-'
define ESCAPEHYPHENS
$(SED) -i -e "s+\([ [:alpha:]]\)-\{7\}+\1\\\-\\\-\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{6\}+\1\\\-\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{5\}+\1\\\-\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{4\}+\1\\\-\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{3\}+\1\\\-\\\-\\\-+g" \
-e "s+\([ [:alpha:]]\)-\{2\}+\1\\\-\\\-+g" \
-e "s+\([^\]\)-\([[:alnum:]\?]\)+\1\\\-\2+g" \
-e "s+ --+\\\-\\\-+g" \
-e "s+|-|+|\\\-|+g" \
-e "s+|-\\\-+\\\-\\\-+g" \
-e "s+ -\"+ \\\-\"+g" \
-e "s+'--'+'\\\-\\\-'+g" \
-e "s+^--+\\\-\\\-+g" \
-e "s+\([[:alnum:]]\) - \([[:alnum:]]\)+\1 \\\- \2+g" \
-e "s+\(<\)-+\1\\\-+g" \
-e "s+[^\\]-\(>\)+\\\-\1+g" \
-e "s+\([[:alnum:]]\{2,\}\)\\\-\([[:alnum:]]\{2,\}\)+\1-\2+g" \
-e "s+\(\\\-\\\-[[:alnum:]]\{2,\}\)-+\1\\\-+g" \
-e "s+\(lvm2\-activation\)+lvm2\\\-activation+" \
-e "s+\([^\\]\)-pool+\1\\\-pool+g" \
-e "s+\([[:digit:]]\)-\([[:digit:]]\)+\1\\\-\2+g" \
-e "s+\\\-git+\-git+g" \
-e "s+\(vg.*\)\-lv+\1\\\-lv+g" \
-e "s+\([[:digit:]]\{4\}\)\\\-\([[:digit:]]\{2\}\)\\\-\([[:digit:]]\{2\}\)+\1-\2-\3+g" $@
endef
%.5: $(srcdir)/%.5_main
$(SUBSTVARS)
$(ESCAPEHYPHENS)
%.7: $(srcdir)/%.7_main
$(SUBSTVARS)
$(ESCAPEHYPHENS)
%.8: $(srcdir)/%.8_main
$(SUBSTVARS)
$(ESCAPEHYPHENS)
%.8: %.8_gen
$(SUBSTVARS)
$(ESCAPEHYPHENS)
$(MAN8SO): lvmconfig.8
echo ".so $<" > $@
install_man5: $(MAN5)
$(INSTALL) -d $(MAN5DIR)
@@ -194,9 +250,9 @@ install_man7: $(MAN7)
$(INSTALL) -d $(MAN7DIR)
$(INSTALL_DATA) $(MAN7) $(MAN7DIR)/
install_man8: $(MAN8) $(MAN8GENERATED)
install_man8: $(MAN8) $(MAN8SO)
$(INSTALL) -d $(MAN8DIR)
$(INSTALL_DATA) $(MAN8) $(MAN8GENERATED) $(MAN8DIR)/
$(INSTALL_DATA) $(MAN8) $(MAN8SO) $(MAN8DIR)/
install_lvm2: install_man5 install_man7 install_man8
@@ -222,7 +278,7 @@ install_all_man: install install_systemd_generators
pregenerated_man: all
for i in $(srcdir)/*.8_des; do \
CMD=`basename $$i .8_des`; \
cat $${CMD}.8 > $(srcdir)/$$CMD.8_pregen ; \
cat $${CMD}.8_gen > $(srcdir)/$$CMD.8_pregen ; \
done
generate: pregenerated_man

View File

@@ -3,13 +3,13 @@
blkdeactivate \(em utility to deactivate block devices
.SH SYNOPSIS
.B blkdeactivate
.RB [ \-d \ \fIdm_options\fP ]
.RB [ \-e ]
.RB [ \-h ]
.RB [ \-l \ \fIlvm_options\fP ]
.RB [ \-m \ \fImpath_options\fP ]
.RB [ \-u ]
.RB [ \-v ]
.RB [ -d \ \fIdm_options\fP ]
.RB [ -e ]
.RB [ -h ]
.RB [ -l \ \fIlvm_options\fP ]
.RB [ -m \ \fImpath_options\fP ]
.RB [ -u ]
.RB [ -v ]
.RI [ device ]
.SH DESCRIPTION
The blkdeactivate utility deactivates block devices. For mounted
@@ -22,7 +22,7 @@ based devices are handled using the \fBdmsetup\fP(8) command.
MD devices are handled using the \fBmdadm\fP(8) command.
.SH OPTIONS
.TP
.BR \-d ", " \-\-dmoption \ \fIdm_options\fP
.BR -d ", " --dmoption \ \fIdm_options\fP
Comma separated list of device-mapper specific options.
Accepted \fBdmsetup\fP(8) options are:
.RS
@@ -32,16 +32,16 @@ Retry removal several times in case of failure.
Force device removal.
.RE
.TP
.BR \-e ", " \-\-errors
.BR -e ", " --errors
Show errors reported from tools called by \fBblkdeactivate\fP. Without this
option, any error messages from these external tools are suppressed and the
\fBblkdeactivate\fP itself provides only a summary message to indicate
the device was skipped.
.TP
.BR \-h ", " \-\-help
.BR -h ", " --help
Display the help text.
.TP
.BR \-l ", " \-\-lvmoption \ \fIlvm_options\fP
.BR -l ", " --lvmoption \ \fIlvm_options\fP
Comma-separated list of LVM specific options:
.RS
.IP \fIretry\fP
@@ -52,7 +52,7 @@ Deactivating the Volume Group as a whole is quicker than deactivating
each Logical Volume separately.
.RE
.TP
.BR \-m ", " \-\-mpathoption \ \fImpath_options\fP
.BR -m ", " --mpathoption \ \fImpath_options\fP
Comma-separated list of device-mapper multipath specific options:
.RS
.IP \fIdisablequeueing\fP
@@ -62,12 +62,12 @@ all the paths are unavailable for any underlying device-mapper multipath
device.
.RE
.TP
.BR \-u ", " \-\-umount
.BR -u ", " --umount
Unmount a mounted device before trying to deactivate it.
Without this option used, a device that is mounted is not deactivated.
.TP
.BR \-v ", " \-\-verbose
Run in verbose mode. Use \-\-vv for even more verbose mode.
.BR -v ", " --verbose
Run in verbose mode. Use --vv for even more verbose mode.
.SH EXAMPLES
.
Deactivate all supported block devices found in the system, skipping mounted
@@ -81,14 +81,14 @@ Deactivate all supported block devices found in the system, unmounting any
mounted devices first, if possible.
.BR
#
.B blkdeactivate \-u
.B blkdeactivate -u
.BR
.P
Deactivate the device /dev/vg/lvol0 together with all its holders, unmounting
any mounted devices first, if possible.
.BR
#
.B blkdeactivate \-u /dev/vg/lvol0
.B blkdeactivate -u /dev/vg/lvol0
.BR
.P
Deactivate all supported block devices found in the system. If the deactivation
@@ -96,14 +96,14 @@ of a device-mapper device fails, retry it. Deactivate the whole
Volume Group at once when processing an LVM Logical Volume.
.BR
#
.B blkdeactivate \-u \-d retry \-l wholevg
.B blkdeactivate -u -d retry -l wholevg
.BR
.P
Deactivate all supported block devices found in the system. If the deactivation
of a device-mapper device fails, retry it and force removal.
.BR
#
.B blkdeactivate \-d force,retry
.B blkdeactivate -d force,retry
.
.SH SEE ALSO
.BR dmsetup (8),

View File

@@ -8,22 +8,22 @@ clvmd \(em cluster LVM daemon
.
.ad l
.B clvmd
.RB [ \-C ]
.RB [ \-d
.RB [ -C ]
.RB [ -d
.RI [ value ]]
.RB [ \-E
.RB [ -E
.IR lock_uuid ]
.RB [ \-f ]
.RB [ \-h ]
.RB [ \-I
.RB [ -f ]
.RB [ -h ]
.RB [ -I
.IR cluster_manager ]
.RB [ \-R ]
.RB [ \-S ]
.RB [ \-t
.RB [ -R ]
.RB [ -S ]
.RB [ -t
.IR timeout ]
.RB [ \-T
.RB [ -T
.IR start_timeout ]
.RB [ \-V ]
.RB [ -V ]
.ad b
.
.SH DESCRIPTION
@@ -35,12 +35,12 @@ if a node in the cluster does not have this daemon running.
.SH OPTIONS
.
.HP
.BR \-C
.BR -C
.br
Only valid if \fB\-d\fP is also specified.
Only valid if \fB-d\fP is also specified.
Tells all clvmds in a cluster to enable/disable debug logging.
Without this switch, only the local clvmd will change its debug level to that
given with \fB\-d\fP.
given with \fB-d\fP.
.br
This does not work correctly if specified on the command-line that starts clvmd.
If you want to start clvmd \fBand\fP
@@ -48,14 +48,14 @@ enable cluster-wide logging then the command needs to be issued twice, eg:
.br
.BR clvmd
.br
.BR clvmd\ \-d2
.BR clvmd\ -d2
.
.HP
.BR \-d
.BR -d
.RI [ value ]
.br
Set debug logging level.
If \fB\-d\fP is specified without a \fIvalue\fP
If \fB-d\fP is specified without a \fIvalue\fP
then 1 is assumed. \fIValue\fP can be:
.PD 0
.IP
@@ -63,30 +63,30 @@ then 1 is assumed. \fIValue\fP can be:
\(em Disabled
.IP
.BR 1
\(em Sends debug logs to stderr (implies \fB\-f\fP)
\(em Sends debug logs to stderr (implies \fB-f\fP)
.IP
.BR 2
\(em Sends debug logs to \fBsyslog\fP(3)
.PD
.
.HP
.BR \-E
.BR -E
.IR lock_uuid
.br
Pass lock uuid to be reacquired exclusively when clvmd is restarted.
.
.HP
.BR \-f
.BR -f
.br
Don't fork, run in the foreground.
.
.HP
.BR \-h
.BR -h
.br
Show help information.
.
.HP
.BR \-I
.BR -I
.IR cluster_manager
.br
Selects the cluster manager to use for locking and internal
@@ -94,24 +94,24 @@ communications. As it is quite possible to have multiple managers available on
the same system you might have to manually specify this option to override the
search.
By default, omit \fB-I\fP is equivalent to \fB\-Iauto\fP.
By default, omit \fB-I\fP is equivalent to \fB-Iauto\fP.
Clvmd will use the first cluster manager that succeeds,
and it checks them in a predefined order
.BR cman ,
.BR corosync ,
.BR openais .
The available managers will be listed by order as part of the
\fBclvmd \-h\fP output.
\fBclvmd -h\fP output.
.
.HP
.BR \-R
.BR -R
.br
Tells all the running instance of \fBclvmd\fP in the cluster to reload their device cache and
re-read the lvm configuration file \fBlvm.conf\fP(5). This command should be run whenever the
devices on a cluster system are changed.
.
.HP
.BR \-S
.BR -S
.br
Tells the running \fBclvmd\fP to exit and reexecute itself, for example at the
end of a package upgrade. The new instance is instructed to reacquire
@@ -120,7 +120,7 @@ methods of restarting the daemon have the side effect of changing
exclusive LV locks into shared locks.)
.
.HP
.BR \-t
.BR -t
.IR timeout
.br
Specifies the \fItimeout\fP for commands to run around the cluster. This should not
@@ -129,7 +129,7 @@ may need to increase this on systems with very large disk farms.
The default is 60 seconds.
.
.HP
.BR \-T
.BR -T
.IR start_timeout
.br
Specifies the start timeout for \fBclvmd\fP daemon startup. If the
@@ -147,10 +147,10 @@ The default is \fB0\fP (no timeout) and the value is in seconds. Don't set this
small or you will experience spurious errors. 10 or 20 seconds might be
sensible.
This timeout will be ignored if you start \fBclvmd\fP with the \fB\-d\fP.
This timeout will be ignored if you start \fBclvmd\fP with the \fB-d\fP.
.
.HP
.BR \-V
.BR -V
.br
Display the version of the cluster LVM daemon.
.

View File

@@ -3,7 +3,7 @@
cmirrord \(em cluster mirror log daemon
.SH SYNOPSIS
\fBcmirrord\fR [\fB\-f\fR] [\fB\-h\fR]
\fBcmirrord\fR [\fB-f\fR] [\fB-h\fR]
.SH DESCRIPTION
\fBcmirrord\fP is the daemon that tracks mirror log information in a cluster.
@@ -26,9 +26,9 @@ ignored. Active cluster mirrors should be shutdown before stopping the cluster
mirror log daemon.
.SH OPTIONS
.IP "\fB\-f\fR, \fB\-\-foreground\fR" 4
.IP "\fB-f\fR, \fB--foreground\fR" 4
Do not fork and log to the terminal.
.IP "\fB\-h\fR, \fB\-\-help\fR" 4
.IP "\fB-h\fR, \fB--help\fR" 4
Print usage.
.SH SEE ALSO

View File

@@ -7,15 +7,15 @@ dmeventd \(em Device-mapper event daemon
.SH SYNOPSIS
.
.B dmeventd
.RB [ \-d
.RB [ \-d
.RB [ \-d ]]]
.RB [ \-f ]
.RB [ \-h ]
.RB [ \-l ]
.RB [ \-R ]
.RB [ \-V ]
.RB [ \-? ]
.RB [ -d
.RB [ -d
.RB [ -d ]]]
.RB [ -f ]
.RB [ -h ]
.RB [ -l ]
.RB [ -R ]
.RB [ -V ]
.RB [ -? ]
.
.SH DESCRIPTION
.
@@ -27,46 +27,46 @@ particular events occur.
.SH OPTIONS
.
.HP
.BR \-d
.BR -d
.br
Repeat from 1 to 3 times (
.BR \-d ,
.BR \-dd ,
.BR \-ddd
.BR -d ,
.BR -dd ,
.BR -ddd
) to increase the detail of
debug messages sent to syslog.
Each extra d adds more debugging information.
.
.HP
.BR \-f
.BR -f
.br
Don't fork, run in the foreground.
.
.HP
.BR \-h
.BR -h
.br
Show help information.
.
.HP
.BR \-l
.BR -l
.br
Log through stdout and stderr instead of syslog.
This option works only with option \-f, otherwise it is ignored.
This option works only with option -f, otherwise it is ignored.
.
.HP
.BR \-?
.BR -?
.br
Show help information on stderr.
.
.HP
.BR \-R
.BR -R
.br
Replace a running dmeventd instance. The running dmeventd must be version
2.02.77 or newer. The new dmeventd instance will obtain a list of devices and
events to monitor from the currently running daemon.
.
.HP
.BR \-V
.BR -V
.br
Show version of dmeventd.
.

View File

@@ -23,12 +23,12 @@ dmsetup \(em low level logical volume management
. ad l
. BR create
. IR device_name
. RB [ -u | \-\-uuid
. RB [ -u | --uuid
. IR uuid ]
. RB \%[ \-\-addnodeoncreate | \-\-addnodeonresume ]
. RB \%[ \-n | \-\-notable | \-\-table
. RB \%[ --addnodeoncreate | --addnodeonresume ]
. RB \%[ -n | --notable | --table
. IR \%table | table_file ]
. RB [ \-\-readahead
. RB [ --readahead
. RB \%[ + ] \fIsectors | auto | none ]
. ad b
..
@@ -39,7 +39,7 @@ dmsetup \(em low level logical volume management
.de CMD_DEPS
. ad l
. BR deps
. RB [ \-o
. RB [ -o
. IR options ]
. RI [ device_name ...]
. ad b
@@ -50,7 +50,7 @@ dmsetup \(em low level logical volume management
.B dmsetup
.de CMD_HELP
. BR help
. RB [ \-c | \-C | \-\-columns ]
. RB [ -c | -C | --columns ]
..
.CMD_HELP
.
@@ -67,18 +67,18 @@ dmsetup \(em low level logical volume management
.de CMD_INFOLONG
. ad l
. BR info
. BR \-c | \-C | \-\-columns
. RB [ \-\-count
. BR -c | -C | --columns
. RB [ --count
. IR count ]
. RB [ \-\-interval
. RB [ --interval
. IR seconds ]
. RB \%[ \-\-nameprefixes ]
. RB \%[ \-\-noheadings ]
. RB [ \-o
. RB \%[ --nameprefixes ]
. RB \%[ --noheadings ]
. RB [ -o
. IR fields ]
. RB [ \-O | \-\-sort
. RB [ -O | --sort
. IR sort_fields ]
. RB [ \-\-separator
. RB [ --separator
. IR separator ]
. RI [ device_name ]
. ad b
@@ -91,7 +91,7 @@ dmsetup \(em low level logical volume management
. ad l
. BR load
. IR device_name
. RB [ \-\-table
. RB [ --table
. IR table | table_file ]
. ad b
..
@@ -102,12 +102,12 @@ dmsetup \(em low level logical volume management
.de CMD_LS
. ad l
. BR ls
. RB [ \-\-target
. RB [ --target
. IR target_type ]
. RB [ \-\-exec
. RB [ --exec
. IR command ]
. RB [ \-\-tree ]
. RB [ \-o
. RB [ --tree ]
. RB [ -o
. IR options ]
. ad b
..
@@ -145,7 +145,7 @@ dmsetup \(em low level logical volume management
. ad l
. BR reload
. IR device_name
. RB [ \-\-table
. RB [ --table
. IR table | table_file ]
. ad b
..
@@ -156,9 +156,9 @@ dmsetup \(em low level logical volume management
.de CMD_REMOVE
. ad l
. BR remove
. RB [ \-f | \-\-force ]
. RB [ \-\-retry ]
. RB [ \-\-deferred ]
. RB [ -f | --force ]
. RB [ --retry ]
. RB [ --deferred ]
. IR device_name ...
. ad b
..
@@ -168,8 +168,8 @@ dmsetup \(em low level logical volume management
.B dmsetup
.de CMD_REMOVE_ALL
. BR remove_all
. RB [ \-f | \-\-force ]
. RB [ \-\-deferred ]
. RB [ -f | --force ]
. RB [ --deferred ]
..
.CMD_REMOVE_ALL
.
@@ -187,7 +187,7 @@ dmsetup \(em low level logical volume management
.de CMD_RENAME_UUID
. BR rename
. IR device_name
. BR \-\-setuuid
. BR --setuuid
. IR uuid
..
.CMD_RENAME_UUID
@@ -198,10 +198,10 @@ dmsetup \(em low level logical volume management
. ad l
. BR resume
. IR device_name ...
. RB [ \-\-addnodeoncreate | \-\-addnodeonresume ]
. RB [ \-\-noflush ]
. RB [ \-\-nolockfs ]
. RB \%[ \-\-readahead
. RB [ --addnodeoncreate | --addnodeonresume ]
. RB [ --noflush ]
. RB [ --nolockfs ]
. RB \%[ --readahead
. RB \%[ + ] \fIsectors | auto | none ]
. ad b
..
@@ -244,9 +244,9 @@ dmsetup \(em low level logical volume management
.de CMD_STATUS
. ad l
. BR status
. RB [ \-\-target
. RB [ --target
. IR target_type ]
. RB [ \-\-noflush ]
. RB [ --noflush ]
. RI [ device_name ...]
. ad b
..
@@ -257,8 +257,8 @@ dmsetup \(em low level logical volume management
.de CMD_SUSPEND
. ad l
. BR suspend
. RB [ \-\-nolockfs ]
. RB [ \-\-noflush ]
. RB [ --nolockfs ]
. RB [ --noflush ]
. IR device_name ...
. ad b
..
@@ -269,9 +269,9 @@ dmsetup \(em low level logical volume management
.de CMD_TABLE
. ad l
. BR table
. RB [ \-\-target
. RB [ --target
. IR target_type ]
. RB [ \-\-showkeys ]
. RB [ --showkeys ]
. RI [ device_name ...]
. ad b
..
@@ -342,7 +342,7 @@ dmsetup \(em low level logical volume management
.de CMD_WAIT
. ad l
. BR wait
. RB [ \-\-noflush ]
. RB [ --noflush ]
. IR device_name
. RI [ event_nr ]
. ad b
@@ -355,9 +355,9 @@ dmsetup \(em low level logical volume management
. ad l
. BR wipe_table
. IR device_name ...
. RB [ \-f | \-\-force ]
. RB [ \-\-noflush ]
. RB [ \-\-nolockfs ]
. RB [ -f | --force ]
. RB [ --noflush ]
. RB [ --nolockfs ]
. ad b
..
.CMD_WIPE_TABLE
@@ -383,70 +383,70 @@ The second argument is the logical device name or uuid.
Invoking the dmsetup tool as \fBdevmap_name\fP
(which is not normally distributed and is supported
only for historical reasons) is equivalent to
.BI \%dmsetup\ info\ \-c\ \-\-noheadings\ \-j \ major\ \-m \ minor \c
.BI \%dmsetup\ info\ -c\ --noheadings\ -j \ major\ -m \ minor \c
\fR.
.\" dot above here fixes -Thtml rendering for next HP option
.
.SH OPTIONS
.
.HP
.BR \-\-addnodeoncreate
.BR --addnodeoncreate
.br
Ensure \fI/dev/mapper\fP node exists after \fBdmsetup create\fP.
.
.HP
.BR \-\-addnodeonresume
.BR --addnodeonresume
.br
Ensure \fI/dev/mapper\fP node exists after \fBdmsetup resume\fP (default with udev).
.
.HP
.BR \-\-checks
.BR --checks
.br
Perform additional checks on the operations requested and report
potential problems. Useful when debugging scripts.
In some cases these checks may slow down operations noticeably.
.
.HP
.BR \-c | \-C | \-\-columns
.BR -c | -C | --columns
.br
Display output in columns rather than as Field: Value lines.
.
.HP
.BR \-\-count
.BR --count
.IR count
.br
Specify the number of times to repeat a report. Set this to zero
continue until interrupted. The default interval is one second.
.
.HP
.BR \-f | \-\-force
.BR -f | --force
.br
Try harder to complete operation.
.
.HP
.BR \-h | \-\-help
.BR -h | --help
.br
Outputs a summary of the commands available, optionally including
the list of report fields (synonym with \fBhelp\fP command).
.
.HP
.BR \-\-inactive
.BR --inactive
.br
When returning any table information from the kernel report on the
inactive table instead of the live table.
Requires kernel driver version 4.16.0 or above.
.
.HP
.BR \-\-interval
.BR --interval
.IR seconds
.br
Specify the interval in seconds between successive iterations for
repeating reports. If \fB\-\-interval\fP is specified but \fB\-\-count\fP
repeating reports. If \fB--interval\fP is specified but \fB--count\fP
is not, reports will continue to repeat until interrupted.
The default interval is one second.
.
.HP
.BR \-\-manglename
.BR --manglename
.BR auto | hex | none
.br
Mangle any character not on a whitelist using mangling_mode when
@@ -466,69 +466,69 @@ Mangling mode could be also set through
environment variable.
.
.HP
.BR \-j | \-\-major
.BR -j | --major
.IR major
.br
Specify the major number.
.
.HP
.BR \-m | \-\-minor
.BR -m | --minor
.IR minor
.br
Specify the minor number.
.
.HP
.BR \-n | \-\-notable
.BR -n | --notable
.br
When creating a device, don't load any table.
.
.HP
.BR \-\-nameprefixes
.BR --nameprefixes
.br
Add a "DM_" prefix plus the field name to the output. Useful with
\fB\-\-noheadings\fP to produce a list of
\fB--noheadings\fP to produce a list of
field=value pairs that can be used to set environment variables
(for example, in
.BR udev (7)
rules).
.
.HP
.BR \-\-noheadings
.BR --noheadings
Suppress the headings line when using columnar output.
.
.HP
.BR \-\-noflush
.BR --noflush
Do not flush outstading I/O when suspending a device, or do not
commit thin-pool metadata when obtaining thin-pool status.
.
.HP
.BR \-\-nolockfs
.BR --nolockfs
.br
Do not attempt to synchronize filesystem eg, when suspending a device.
.
.HP
.BR \-\-noopencount
.BR --noopencount
.br
Tell the kernel not to supply the open reference count for the device.
.
.HP
.BR \-\-noudevrules
.BR --noudevrules
.br
Do not allow udev to manage nodes for devices in device-mapper directory.
.
.HP
.BR \-\-noudevsync
.BR --noudevsync
.br
Do not synchronise with udev when creating, renaming or removing devices.
.
.HP
.BR \-o | \-\-options
.BR -o | --options
.IR options
.br
Specify which fields to display.
.
.HP
.BR \-\-readahead
.BR --readahead
.RB [ + ] \fIsectors | auto | none
.br
Specify read ahead size in units of sectors.
@@ -539,12 +539,12 @@ smaller than the value chosen by the kernel.
The value \fBnone\fP is equivalent to specifying zero.
.
.HP
.BR \-r | \-\-readonly
.BR -r | --readonly
.br
Set the table being loaded read-only.
.
.HP
.BR \-S | \-\-select
.BR -S | --select
.IR selection
.br
Display only rows that match \fIselection\fP criteria. All rows are displayed
@@ -557,14 +557,14 @@ selection operators, check the output of \fBdmsetup\ info\ -c\ -S\ help\fP
command.
.
.HP
.BR \-\-table
.BR --table
.IR table
.br
Specify a one-line table directly on the command line.
See below for more information on the table format.
.
.HP
.BR \-\-udevcookie
.BR --udevcookie
.IR cookie
.br
Use cookie for udev synchronisation.
@@ -573,29 +573,29 @@ multiple different devices. It's not adviced to combine different
operations on the single device.
.
.HP
.BR \-u | \-\-uuid
.BR -u | --uuid
.br
Specify the \fIuuid\fP.
.
.HP
.BR \-y | \-\-yes
.BR -y | --yes
.br
Answer yes to all prompts automatically.
.
.HP
.BR \-v | \-\-verbose
.RB [ \-v | \-\-verbose ]
.BR -v | --verbose
.RB [ -v | --verbose ]
.br
Produce additional output.
.
.HP
.BR \-\-verifyudev
.BR --verifyudev
.br
If udev synchronisation is enabled, verify that udev operations get performed
correctly and try to fix up the device nodes afterwards if not.
.
.HP
.BR \-\-version
.BR --version
.br
Display the library and kernel driver version.
.br
@@ -612,7 +612,7 @@ Destroys the table in the inactive table slot for device_name.
.br
Creates a device with the given name.
If \fItable\fP or \fItable_file\fP is supplied, the table is loaded and made live.
Otherwise a table is read from standard input unless \fB\-\-notable\fP is used.
Otherwise a table is read from standard input unless \fB--notable\fP is used.
The optional \fIuuid\fP can be used in place of
device_name in subsequent dmsetup commands.
If successful the device will appear in table and for live
@@ -682,7 +682,7 @@ Device names on output can be customised by following options:
\fBdevno\fP (major and minor pair, used by default),
\fBblkdevname\fP (block device name),
\fBdevname\fP (map name for device-mapper devices, equal to blkdevname otherwise).
\fB\-\-tree\fP displays dependencies between devices as a tree.
\fB--tree\fP displays dependencies between devices as a tree.
It accepts a comma-separate list of \fIoptions\fP.
Some specify the information displayed against each node:
.BR device / nodevice ;
@@ -705,11 +705,11 @@ If neither is supplied, reads a table from standard input.
Ensure existing device-mapper \fIdevice_name\fP and UUID is in the correct mangled
form containing only whitelisted characters (supported by udev) and do
a rename if necessary. Any character not on the whitelist will be mangled
based on the \fB\-\-manglename\fP setting. Automatic rename works only for device
based on the \fB--manglename\fP setting. Automatic rename works only for device
names and not for device UUIDs because the kernel does not allow changing
the UUID of active devices. Any incorrect UUIDs are reported only and they
must be manually corrected by deactivating the device first and then
reactivating it with proper mangling mode used (see also \fB\-\-manglename\fP).
reactivating it with proper mangling mode used (see also \fB--manglename\fP).
.
.HP
.CMD_MESSAGE
@@ -728,16 +728,16 @@ driver, adding, changing or removing nodes as necessary.
.CMD_REMOVE
.br
Removes a device. It will no longer be visible to dmsetup. Open devices
cannot be removed, but adding \fB\-\-force\fP will replace the table with one
that fails all I/O. \fB\-\-deferred\fP will enable deferred removal of open
cannot be removed, but adding \fB--force\fP will replace the table with one
that fails all I/O. \fB--deferred\fP will enable deferred removal of open
devices - the device will be removed when the last user closes it. The deferred
removal feature is supported since version 4.27.0 of the device-mapper
driver available in upstream kernel version 3.13. (Use \fBdmsetup version\fP
to check this.) If an attempt to remove a device fails, perhaps because a process run
from a quick udev rule temporarily opened the device, the \fB\-\-retry\fP
from a quick udev rule temporarily opened the device, the \fB--retry\fP
option will cause the operation to be retried for a few seconds before failing.
Do NOT combine
\fB\-\-force\fP and \fB\-\-udevcookie\fP, as udev may start to process udev
\fB--force\fP and \fB--udevcookie\fP, as udev may start to process udev
rules in the middle of error target replacement and result in nondeterministic
result.
.
@@ -746,8 +746,8 @@ result.
.br
Attempts to remove all device definitions i.e. reset the driver. This also runs
\fBmknodes\fP afterwards. Use with care! Open devices cannot be removed, but
adding \fB\-\-force\fP will replace the table with one that fails all I/O.
\fB\-\-deferred\fP will enable deferred removal of open devices - the device
adding \fB--force\fP will replace the table with one that fails all I/O.
\fB--deferred\fP will enable deferred removal of open devices - the device
will be removed when the last user closes it. The deferred removal feature is
supported since version 4.27.0 of the device-mapper driver available in
upstream kernel version 3.13.
@@ -797,8 +797,8 @@ for more details.
.CMD_STATUS
.br
Outputs status information for each of the device's targets.
With \fB\-\-target\fP, only information relating to the specified target type
any is displayed. With \fB\-\-noflush\fP, the thin target (from version 1.3.0)
With \fB--target\fP, only information relating to the specified target type
any is displayed. With \fB--noflush\fP, the thin target (from version 1.3.0)
doesn't commit any outstanding changes to disk before reporting its statistics.
.HP
@@ -808,9 +808,9 @@ Suspends a device. Any I/O that has already been mapped by the device
but has not yet completed will be flushed. Any further I/O to that
device will be postponed for as long as the device is suspended.
If there's a filesystem on the device which supports the operation,
an attempt will be made to sync it first unless \fB\-\-nolockfs\fP is specified.
an attempt will be made to sync it first unless \fB--nolockfs\fP is specified.
Some targets such as recent (October 2006) versions of multipath may support
the \fB\-\-noflush\fP option. This lets outstanding I/O that has not yet reached the
the \fB--noflush\fP option. This lets outstanding I/O that has not yet reached the
device to remain unflushed.
.
.HP
@@ -818,10 +818,10 @@ device to remain unflushed.
.br
Outputs the current table for the device in a format that can be fed
back in using the create or load commands.
With \fB\-\-target\fP, only information relating to the specified target type
With \fB--target\fP, only information relating to the specified target type
is displayed.
Real encryption keys are suppressed in the table output for the crypt
target unless the \fB\-\-showkeys\fP parameter is supplied. Kernel key
target unless the \fB--showkeys\fP parameter is supplied. Kernel key
references prefixed with \fB:\fP are not affected by the parameter and get
displayed always.
.
@@ -855,7 +855,7 @@ The output is a cookie value. Normally we don't need to create cookies since
dmsetup creates and destroys them for each action automatically. However, we can
generate one explicitly to group several actions together and use only one
cookie instead. We can define a cookie to use for each relevant command by using
\fB\-\-udevcookie\fP option. Alternatively, we can export this value into the environment
\fB--udevcookie\fP option. Alternatively, we can export this value into the environment
of the dmsetup process as \fBDM_UDEV_COOKIE\fP variable and it will be used automatically
with all subsequent commands until it is unset.
Invoking this command will create system-wide semaphore that needs to be cleaned
@@ -888,10 +888,10 @@ Outputs version information.
.CMD_WAIT
.br
Sleeps until the event counter for device_name exceeds event_nr.
Use \fB\-v\fP to see the event number returned.
Use \fB-v\fP to see the event number returned.
To wait until the next event is triggered, use \fBinfo\fP to find
the last event number.
With \fB\-\-noflush\fP, the thin target (from version 1.3.0) doesn't commit
With \fB--noflush\fP, the thin target (from version 1.3.0) doesn't commit
any outstanding changes to disk before reporting its statistics.
.
.HP
@@ -1005,11 +1005,11 @@ Defaults to "\fI/dev\fP" and must be an absolute path.
.TP
.B DM_UDEV_COOKIE
A cookie to use for all relevant commands to synchronize with udev processing.
It is an alternative to using \fB\-\-udevcookie\fP option.
It is an alternative to using \fB--udevcookie\fP option.
.TP
.B DM_DEFAULT_NAME_MANGLING_MODE
A default mangling mode. Defaults to "\fB#DEFAULT_MANGLING#\fP"
and it is an alternative to using \fB\-\-manglename\fP option.
and it is an alternative to using \fB--manglename\fP option.
.
.SH AUTHORS
.

View File

@@ -1,21 +1,21 @@
.TH DMSTATS 8 "Jun 23 2016" "Linux" "MAINTENANCE COMMANDS"
.de OPT_PROGRAMS
. RB \%[ \-\-allprograms | \-\-programid
. RB \%[ --allprograms | --programid
. IR id ]
..
.
.de OPT_REGIONS
. RB \%[ \-\-allregions | \-\-regionid
. RB \%[ --allregions | --regionid
. IR id ]
..
.de OPT_OBJECTS
. RB [ \-\-area ]
. RB [ \-\-region ]
. RB [ \-\-group ]
. RB [ --area ]
. RB [ --region ]
. RB [ --group ]
..
.de OPT_FOREGROUND
. RB [ \-\-foreground ]
. RB [ --foreground ]
..
.
.\" Print units suffix, use with arg to print human
@@ -57,13 +57,13 @@ dmstats \(em device-mapper statistics management
. ad l
. IR command
. IR device_name " |"
. BR \-\-major
. BR --major
. IR major
. BR \-\-minor
. BR --minor
. IR minor " |"
. BR \-u | \-\-uuid
. BR -u | --uuid
. IR uuid
. RB \%[ \-v | \-\-verbose]
. RB \%[ -v | --verbose]
. ad b
..
.CMD_COMMAND
@@ -85,26 +85,26 @@ dmstats \(em device-mapper statistics management
.de CMD_CREATE
. ad l
. BR create
. IR device_name... | file_path... | \fB\-\-alldevices
. RB [ \-\-areas
. IR nr_areas | \fB\-\-areasize
. IR device_name... | file_path... | \fB--alldevices
. RB [ --areas
. IR nr_areas | \fB--areasize
. IR area_size ]
. RB [ \-\-bounds
. RB [ --bounds
. IR \%histogram_boundaries ]
. RB [ \-\-filemap ]
. RB [ \-\-follow
. RB [ --filemap ]
. RB [ --follow
. IR follow_mode ]
. OPT_FOREGROUND
. RB [ \-\-nomonitor ]
. RB [ \-\-nogroup ]
. RB [ \-\-precise ]
. RB [ \-\-start
. RB [ --nomonitor ]
. RB [ --nogroup ]
. RB [ --precise ]
. RB [ --start
. IR start_sector
. BR \-\-length
. IR length | \fB\-\-segments ]
. RB \%[ \-\-userdata
. BR --length
. IR length | \fB--segments ]
. RB \%[ --userdata
. IR user_data ]
. RB [ \-\-programid
. RB [ --programid
. IR id ]
. ad b
..
@@ -115,7 +115,7 @@ dmstats \(em device-mapper statistics management
.de CMD_DELETE
. ad l
. BR delete
. IR device_name | \fB\-\-alldevices
. IR device_name | \fB--alldevices
. OPT_PROGRAMS
. OPT_REGIONS
. ad b
@@ -127,10 +127,10 @@ dmstats \(em device-mapper statistics management
.de CMD_GROUP
. ad l
. BR group
. RI [ device_name | \fB\-\-alldevices ]
. RB [ \-\-alias
. RI [ device_name | \fB--alldevices ]
. RB [ --alias
. IR name ]
. RB [ \-\-regions
. RB [ --regions
. IR regions ]
. ad b
..
@@ -140,7 +140,7 @@ dmstats \(em device-mapper statistics management
.de CMD_HELP
. ad l
. BR help
. RB [ \-c | \-C | \-\-columns ]
. RB [ -c | -C | --columns ]
. ad b
..
.CMD_HELP
@@ -151,14 +151,14 @@ dmstats \(em device-mapper statistics management
. ad l
. BR list
. RI [ device_name ]
. RB [ \-\-histogram ]
. RB [ --histogram ]
. OPT_PROGRAMS
. RB [ \-\-units
. RB [ --units
. IR units ]
. OPT_OBJECTS
. RB \%[ \-\-nosuffix ]
. RB [ \-\-notimesuffix ]
. RB \%[ \-v | \-\-verbose]
. RB \%[ --nosuffix ]
. RB [ --notimesuffix ]
. RB \%[ -v | --verbose]
. ad b
..
.CMD_LIST
@@ -169,7 +169,7 @@ dmstats \(em device-mapper statistics management
. ad l
. BR print
. RI [ device_name ]
. RB [ \-\-clear ]
. RB [ --clear ]
. OPT_PROGRAMS
. OPT_REGIONS
. ad b
@@ -182,24 +182,24 @@ dmstats \(em device-mapper statistics management
. ad l
. BR report
. RI [ device_name ]
. RB [ \-\-interval
. RB [ --interval
. IR seconds ]
. RB [ \-\-count
. RB [ --count
. IR count ]
. RB [ \-\-units
. RB [ --units
. IR units ]
. RB [ \-\-histogram ]
. RB [ --histogram ]
. OPT_PROGRAMS
. OPT_REGIONS
. OPT_OBJECTS
. RB [ \-O | \-\-sort
. RB [ -O | --sort
. IR sort_fields ]
. RB [ \-S | \-\-select
. RB [ -S | --select
. IR selection ]
. RB [ \-\-units
. RB [ --units
. IR units ]
. RB [ \-\-nosuffix ]
. RB \%[ \-\-notimesuffix ]
. RB [ --nosuffix ]
. RB \%[ --notimesuffix ]
. ad b
..
.CMD_REPORT
@@ -208,8 +208,8 @@ dmstats \(em device-mapper statistics management
.de CMD_UNGROUP
. ad l
. BR ungroup
. RI [ device_name | \fB\-\-alldevices ]
. RB [ \-\-groupid
. RI [ device_name | \fB--alldevices ]
. RB [ --groupid
. IR id ]
. ad b
..
@@ -220,9 +220,9 @@ dmstats \(em device-mapper statistics management
. ad l
. BR update_filemap
. IR file_path
. RB [ \-\-groupid
. RB [ --groupid
. IR id ]
. RB [ \-\-follow
. RB [ --follow
. IR follow_mode ]
. OPT_FOREGROUND
. ad b
@@ -248,47 +248,47 @@ control, and reporting behaviour.
When no device argument is given dmstats will by default operate on all
device-mapper devices present. The \fBcreate\fP and \fBdelete\fP
commands require the use of \fB\-\-alldevices\fP when used in this way.
commands require the use of \fB--alldevices\fP when used in this way.
.
.SH OPTIONS
.
.HP
.BR \-\-alias
.BR --alias
.IR name
.br
Specify an alias name for a group.
.
.HP
.BR \-\-alldevices
.BR --alldevices
.br
If no device arguments are given allow operation on all devices when
creating or deleting regions.
.
.HP
.BR \-\-allprograms
.BR --allprograms
.br
Include regions from all program IDs for list and report operations.
.br
.HP
.BR \-\-allregions
.BR --allregions
.br
Include all present regions for commands that normally accept a single
region identifier.
.
.HP
.BR \-\-area
.BR --area
.br
When peforming a list or report, include objects of type area in the
results.
.
.HP
.BR \-\-areas
.BR --areas
.IR nr_areas
.br
Specify the number of statistics areas to create within a new region.
.
.HP
.BR \-\-areasize
.BR --areasize
.IR area_size \c
.RB [ \c
.UNITS
@@ -298,25 +298,25 @@ optional suffix selects units of:
.HELP_UNITS
.
.HP
.BR \-\-clear
.BR --clear
.br
When printing statistics counters, also atomically reset them to zero.
.
.HP
.BR \-\-count
.BR --count
.IR count
.br
Specify the iteration count for repeating reports. If the count
argument is zero reports will continue to repeat until interrupted.
.
.HP
.BR \-\-group
.BR --group
.br
When peforming a list or report, include objects of type group in the
results.
.
.HP
.BR \-\-filemap
.BR --filemap
.br
Instead of creating regions on a device as specified by command line
options, open the file found at each \fBfile_path\fP argument, and
@@ -324,7 +324,7 @@ create regions corresponding to the locations of the on-disk extents
allocated to the file(s).
.
.HP
.BR \-\-nomonitor
.BR --nomonitor
.br
Disable the \fBdmfilemapd\fP daemon when creating new file mapped
groups. Normally the device-mapper filemap monitoring daemon,
@@ -336,7 +336,7 @@ Regions in the group may still be updated with the
\fBupdate_filemap\fP command, or by starting the daemon manually.
.
.HP
.BR \-\-follow
.BR --follow
.IR follow_mode
.br
Specify the \fBdmfilemapd\fP file following mode. The file map
@@ -371,20 +371,20 @@ In either mode, the daemon exits automatically if the monitored group
is removed.
.
.HP
.BR \-\-foreground
.BR --foreground
.br
Specify that the \fBdmfilemapd\fP daemon should run in the foreground.
The daemon will not fork into the background, and will replace the
\fBdmstats\fP command that started it.
.
.HP
.BR \-\-groupid
.BR --groupid
.IR id
.br
Specify the group to operate on.
.
.HP
.BR \-\-bounds
.BR --bounds
.IR histogram_boundaries \c
.RB [ ns | us | ms | s ]
.br
@@ -398,22 +398,22 @@ or \fBs\fP may be given after each value to specify units of
nanoseconds, microseconds, miliseconds or seconds respectively.
.
.HP
.BR \-\-histogram
.BR --histogram
.br
When used with the \fBreport\fP and \fBlist\fP commands select default
fields that emphasize latency histogram data.
.
.HP
.BR \-\-interval
.BR --interval
.IR seconds
.br
Specify the interval in seconds between successive iterations for
repeating reports. If \fB\-\-interval\fP is specified but
\fB\-\-count\fP is not,
repeating reports. If \fB--interval\fP is specified but
\fB--count\fP is not,
reports will continue to repeat until interrupted.
.
.HP
.BR \-\-length
.BR --length
.IR length \c
.RB [ \c
.UNITS
@@ -423,55 +423,55 @@ suffix selects units of:
.HELP_UNITS
.
.HP
.BR \-j | \-\-major
.BR -j | --major
.IR major
.br
Specify the major number.
.
.HP
.BR \-m | \-\-minor
.BR -m | --minor
.IR minor
.br
Specify the minor number.
.
.HP
.BR \-\-nogroup
.BR --nogroup
.br
When creating regions mapping the extents of a file in the file
system, do not create a group or set an alias.
.
.HP
.BR \-\-nosuffix
.BR --nosuffix
.br
Suppress the suffix on output sizes. Use with \fB\-\-units\fP
Suppress the suffix on output sizes. Use with \fB--units\fP
(except h and H) if processing the output.
.
.HP
.BR \-\-notimesuffix
.BR --notimesuffix
.br
Suppress the suffix on output time values. Histogram boundary values
will be reported in units of nanoseconds.
.
.HP
.BR \-o | \-\-options
.BR -o | --options
.br
Specify which report fields to display.
.
.HP
.BR \-O | \-\-sort
.BR -O | --sort
.IR sort_fields
.br
Sort output according to the list of fields given. Precede any
sort field with '\fB-\fP' for a reverse sort on that column.
.
.HP
.BR \-\-precise
.BR --precise
.br
Attempt to use nanosecond precision counters when creating new
statistics regions.
.
.HP
.BR \-\-programid
.BR --programid
.IR id
.br
Specify a program ID string. When creating new statistics regions this
@@ -480,19 +480,19 @@ program ID in order to select only regions with a matching value. The
default program ID for dmstats-managed regions is "dmstats".
.
.HP
.BR \-\-region
.BR --region
.br
When peforming a list or report, include objects of type region in the
results.
.
.HP
.BR \-\-regionid
.BR --regionid
.IR id
.br
Specify the region to operate on.
.
.HP
.BR \-\-regions
.BR --regions
.IR region_list
.br
Specify a list of regions to group. The group list is a comma-separated
@@ -500,23 +500,23 @@ list of region identifiers. Continuous sequences of identifiers may be
expressed as a hyphen separated range, for example: '1-10'.
.
.HP
.BR \-\-relative
.BR --relative
.br
If displaying the histogram report show relative (percentage) values
instead of absolute counts.
.
.HP
.BR \-S | \-\-select
.BR -S | --select
.IR selection
.br
Display only rows that match \fIselection\fP criteria. All rows with the
additional "selected" column (\fB\-o selected\fP) showing 1 if the row matches
additional "selected" column (\fB-o selected\fP) showing 1 if the row matches
the \fIselection\fP and 0 otherwise. The selection criteria are defined by
specifying column names and their valid values while making use of
supported comparison operators.
.
.HP
.BR \-\-start
.BR --start
.IR start \c
.RB [ \c
.UNITS
@@ -526,18 +526,18 @@ optional suffix selects units of:
.HELP_UNITS
.
.HP
.BR \-\-segments
.BR --segments
.br
When used with \fBcreate\fP, create a new statistics region for each
target contained in the given device(s). This causes a separate region
to be allocated for each segment of the device.
The newly created regions are automatically placed into a group unless
the \fB\-\-nogroup\fP option is given. When grouping is enabled a group
alias may be specified using the \fB\-\-alias\fP option.
the \fB--nogroup\fP option is given. When grouping is enabled a group
alias may be specified using the \fB--alias\fP option.
.
.HP
.BR \-\-units
.BR --units
.RI [ units ] \c
.RB [ h | H | \c
.UNITS
@@ -546,10 +546,10 @@ Set the display units for report output.
All sizes are output in these units:
.RB ( h )uman-readable,
.HELP_UNITS
Can also specify custom units e.g. \fB\-\-units\ 3M\fP.
Can also specify custom units e.g. \fB--units\ 3M\fP.
.
.HP
.BR \-\-userdata
.BR --userdata
.IR user_data
.br
Specify user data (a word) to be stored with a new region. The value
@@ -558,12 +558,12 @@ information), and stored with the region in the aux_data field provided
by the kernel. Whitespace is not permitted.
.
.HP
.BR \-u | \-\-uuid
.BR -u | --uuid
.br
Specify the uuid.
.
.HP
.BR \-v | \-\-verbose " [" \-v | \-\-verbose ]
.BR -v | --verbose " [" -v | --verbose ]
.br
Produce additional output.
.
@@ -580,17 +580,17 @@ regions (with the exception of in-flight IO counters).
.br
Creates one or more new statistics regions on the specified device(s).
The region will span the entire device unless \fB\-\-start\fP and
\fB\-\-length\fP or \fB\-\-segments\fP are given. The \fB\-\-start\fP an
\fB\-\-length\fP options allow a region of arbitrary length to be placed
at an arbitrary offset into the device. The \fB\-\-segments\fP option
The region will span the entire device unless \fB--start\fP and
\fB--length\fP or \fB--segments\fP are given. The \fB--start\fP an
\fB--length\fP options allow a region of arbitrary length to be placed
at an arbitrary offset into the device. The \fB--segments\fP option
causes a new region to be created for each target in the corresponding
device-mapper device's table.
If the \fB\-\-precise\fP option is used the command will attempt to
If the \fB--precise\fP option is used the command will attempt to
create a region using nanosecond precision counters.
If \fB\-\-bounds\fP is given a latency histogram will be tracked for
If \fB--bounds\fP is given a latency histogram will be tracked for
the new region. The boundaries of the histogram bins are given as a
comma separated list of latency values. There is an implicit lower bound
of zero on the first bin and an implicit upper bound of infinity (or the
@@ -601,7 +601,7 @@ ms, or s may be given after each value to specify units of nanoseconds,
microseconds, miliseconds or seconds respectively, so for example, 10ms
is equivalent to 10000000. Latency values with a precision of less than
one milisecond can only be used when precise timestamps are enabled: if
\fB\-\-precise\fP is not given and values less than one milisecond are
\fB--precise\fP is not given and values less than one milisecond are
used it will be enabled automatically.
An optional \fBprogram_id\fP or \fBuser_data\fP string may be associated
@@ -616,7 +616,7 @@ By default dmstats creates regions with a \fBprogram_id\fP of
On success the \fBregion_id\fP of the newly created region is printed
to stdout.
If the \fB\-\-filemap\fP option is given with a regular file, or list
If the \fB--filemap\fP option is given with a regular file, or list
of files, as the \fBfile_path\fP argument, instead of creating regions
with parameters specified on the command line, \fBdmstats\fP will open
the files located at \fBfile_path\fP and create regions corresponding to
@@ -624,20 +624,20 @@ the physical extents allocated to the file. This can be used to monitor
statistics for individual files in the file system, for example, virtual
machine images, swap areas, or large database files.
To work with the \fB\-\-filemap\fP option, files must be located on a
To work with the \fB--filemap\fP option, files must be located on a
local file system, backed by a device-mapper device, that supports
physical extent data using the FIEMAP ioctl (Ext4 and XFS for e.g.).
By default regions that map a file are placed into a group and the
group alias is set to the basename of the file. This behaviour can be
overridden with the \fB\-\-alias\fP and \fB\-\-nogroup\fP options.
overridden with the \fB--alias\fP and \fB--nogroup\fP options.
Creating a group that maps a file automatically starts a daemon,
\fBdmfilemapd\fP to monitor the file and update the mapping as the
extents allocated to the file change. This behaviour can be disabled
using the \fB\-\-nomonitor\fP option.
using the \fB--nomonitor\fP option.
Use the \fB\-\-group\fP option to only display information for groups
Use the \fB--group\fP option to only display information for groups
when listing and reporting.
.
.HP
@@ -648,12 +648,12 @@ by the region are released and the region will not appear in the output
of subsequent list, print, or report operations.
All regions registered on a device may be removed using
\fB\-\-allregions\fP.
\fB--allregions\fP.
To remove all regions on all devices both \fB\-\-allregions\fP and
\fB\-\-alldevices\fP must be used.
To remove all regions on all devices both \fB--allregions\fP and
\fB--alldevices\fP must be used.
If a \fB\-\-groupid\fP is given instead of a \fB\-\-regionid\fP the
If a \fB--groupid\fP is given instead of a \fB--regionid\fP the
command will attempt to delete the group and all regions that it
contains.
@@ -666,8 +666,8 @@ will also be removed.
Combine one or more statistics regions on the specified device into a
group.
The list of regions to be grouped is specified with \fB\-\-regions\fP
and an optional alias may be assigned with \fB\-\-alias\fP. The set of
The list of regions to be grouped is specified with \fB--regions\fP
and an optional alias may be assigned with \fB--alias\fP. The set of
regions is given as a comma-separated list of region identifiers. A
continuous range of identifers spanning from \fBR1\fP to \fBR2\fP may
be expressed as '\fBR1\fP-\fBR2\fP'.
@@ -693,21 +693,21 @@ the list of report fields.
.CMD_LIST
.br
List the statistics regions, areas, or groups registered on the device.
If the \fB\-\-allprograms\fP switch is given all regions will be listed
If the \fB--allprograms\fP switch is given all regions will be listed
regardless of region program ID values.
By default only regions and groups are included in list output. If
\fB\-v\fP or \fB\-\-verbose\fP is given the report will also include a
\fB-v\fP or \fB--verbose\fP is given the report will also include a
row of information for each configured group and for each area contained
in each region displayed.
Regions that contain a single area are by default omitted from the
verbose list since their properties are identical to the area that they
contain - to view all regions regardless of the number of areas present
use \fB\-\-region\fP). To also view the areas contained within regions
use \fB\-\-area\fP.
use \fB--region\fP). To also view the areas contained within regions
use \fB--area\fP.
If \fB\-\-histogram\fP is given the report will include the bin count
If \fB--histogram\fP is given the report will include the bin count
and latency boundary values for any configured histograms.
.HP
.CMD_PRINT
@@ -720,20 +720,20 @@ present regions.
.br
Start a report for the specified object or for all present objects. If
the count argument is specified, the report will repeat at a fixed
interval set by the \fB\-\-interval\fP option. The default interval is
interval set by the \fB--interval\fP option. The default interval is
one second.
If the \fB\-\-allprograms\fP switch is given, all regions will be
If the \fB--allprograms\fP switch is given, all regions will be
listed, regardless of region program ID values.
If the \fB\-\-histogram\fP is given the report will include the histogram
If the \fB--histogram\fP is given the report will include the histogram
values and latency boundaries.
If the \fB\-\-relative\fP is used the default histogram field displays
If the \fB--relative\fP is used the default histogram field displays
bin values as a percentage of the total number of I/Os.
Object types (areas, regions and groups) to include in the report are
selected using the \fB\-\-area\fP, \fB\-\-region\fP, and \fB\-\-group\fP
selected using the \fB--area\fP, \fB--region\fP, and \fB--group\fP
options.
.
.HP
@@ -742,12 +742,12 @@ options.
Remove an existing group and return all the group's regions to their
original state.
The group to be removed is specified using \fB\-\-groupid\fP.
The group to be removed is specified using \fB--groupid\fP.
.HP
.CMD_UPDATE_FILEMAP
.br
Update a group of \fBdmstats\fP regions specified by \fBgroup_id\fP,
that were previously created with \fB\-\-filemap\fP, either directly,
that were previously created with \fB--filemap\fP, either directly,
or by starting the monitoring daemon, \fBdmfilemapd\fP.
This will add and remove regions to reflect changes in the allocated
@@ -758,11 +758,11 @@ Use of this command is not normally needed since the \fBdmfilemapd\fP
daemon will automatically monitor filemap groups and perform these
updates when required.
If a filemapped group was created with \fB\-\-nomonitor\fP, or the
If a filemapped group was created with \fB--nomonitor\fP, or the
daemon has been killed, the \fBupdate_filemap\fP can be used to
manually force an update or start a new daemon.
Use \fB\-\-nomonitor\fP to force a direct update and disable starting
Use \fB--nomonitor\fP to force a direct update and disable starting
the monitoring daemon.
.
.SH REGIONS, AREAS, AND GROUPS
@@ -786,8 +786,8 @@ The group metadata is stored with the first (lowest numbered)
the group and other group members will be returned to their prior
state.
By default new regions span the entire device. The \fB\-\-start\fP and
\fB\-\-length\fP options allows a region of any size to be placed at any
By default new regions span the entire device. The \fB--start\fP and
\fB--length\fP options allows a region of any size to be placed at any
location on the device.
Using offsets it is possible to create regions that map individual
@@ -798,7 +798,7 @@ and data aggregation.
A region may be either divided into the specified number of equal-sized
areas, or into areas of the given size by specifying one of
\fB\-\-areas\fP or \fB\-\-areasize\fP when creating a region with the
\fB--areas\fP or \fB--areasize\fP when creating a region with the
\fBcreate\fP command. Depending on the size of the areas and the device
region the final area within the region may be smaller than requested.
.P
@@ -827,7 +827,7 @@ reference the group.
.
.SH FILE MAPPING
.
Using \fB\-\-filemap\fP, it is possible to create regions that
Using \fB--filemap\fP, it is possible to create regions that
correspond to the extents of a file in the file system. This allows
IO statistics to be monitored on a per-file basis, for example to
observe large database files, virtual machine images, or other files
@@ -843,7 +843,7 @@ group, and the group alias is set to the \fBbasename(3)\fP of the
file. This allows statistics to be reported for the file as a whole,
aggregating values for the regions making up the group. To see only
the whole file (group) when using the \fBlist\fP and \fBreport\fP
commands, use \fB\-\-group\fP.
commands, use \fB--group\fP.
Since it is possible for the file to change after the initial
group of regions is created, the \fBupdate_filemap\fP command, and
@@ -888,8 +888,8 @@ progressively out-of-date as extents are added and removed (in this
case the daemon can be re-started or the group updated manually with
the \fBupdate_filemap\fP command).
See the \fBcreate\fP command and \fB\-\-filemap\fP, \fB\-\-follow\fP,
and \fB\-\-nomonitor\fP options for further information.
See the \fBcreate\fP command and \fB--filemap\fP, \fB--follow\fP,
and \fB--nomonitor\fP options for further information.
.
.P
.B Limitations
@@ -984,11 +984,11 @@ when a statistics region is created.
.TP
.B region_start
The region start location. Display units are selected by the
\fB\-\-units\fP option.
\fB--units\fP option.
.TP
.B region_len
The length of the region. Display units are selected by the
\fB\-\-units\fP option.
\fB--units\fP option.
.TP
.B area_id
Area identifier. Area identifiers are assigned by the device-mapper
@@ -1001,11 +1001,11 @@ identifiers exist.
.TP
.B area_start
The area start location. Display units are selected by the
\fB\-\-units\fP option.
\fB--units\fP option.
.TP
.B area_len
The length of the area. Display units are selected by the
\fB\-\-units\fP option.
\fB--units\fP option.
.TP
.B area_count
The number of areas in this region.
@@ -1157,7 +1157,7 @@ vg00/lvol1: Created new region with 1 area(s) as region ID 0
Create a 32M region 1G into device d0
.br
#
.B dmstats create \-\-start 1G \-\-length 32M d0
.B dmstats create --start 1G --length 32M d0
.br
d0: Created new region with 1 area(s) as region ID 0
.P
@@ -1165,7 +1165,7 @@ Create a whole-device region with 8 areas on every device
.br
.br
#
.B dmstats create \-\-areas 8
.B dmstats create --areas 8
.br
vg00-lvol1: Created new region with 8 area(s) as region ID 0
.br
@@ -1183,21 +1183,21 @@ Delete all regions on all devices
.br
.br
#
.B dmstats delete \-\-alldevices \-\-allregions
.B dmstats delete --alldevices --allregions
.P
Create a whole-device region with areas 10GiB in size on vg00/lvol1
using dmsetup
.br
.br
#
.B dmsetup stats create \-\-areasize 10G vg00/lvol1
.B dmsetup stats create --areasize 10G vg00/lvol1
.br
vg00-lvol1: Created new region with 5 area(s) as region ID 1
.P
Create a 1GiB region with 16 areas at the start of vg00/lvol1
.br
#
.B dmstats create \-\-start 0 \-\-len 1G \-\-areas=16 vg00/lvol1
.B dmstats create --start 0 --len 1G --areas=16 vg00/lvol1
.br
vg00-lvol1: Created new region with 16 area(s) as region ID 0
.P
@@ -1218,7 +1218,7 @@ Display five statistics reports for vg00/lvol1 at an interval of one second
.br
.br
#
.B dmstats report \-\-interval 1 \-\-count 5 vg00/lvol1
.B dmstats report --interval 1 --count 5 vg00/lvol1
.br
#
.B dmstats report
@@ -1235,7 +1235,7 @@ Create one region for reach target contained in device vg00/lvol1
.br
.br
#
.B dmstats create \-\-segments vg00/lvol1
.B dmstats create --segments vg00/lvol1
.br
vg00-lvol1: Created new region with 1 area(s) as region ID 0
.br
@@ -1262,7 +1262,7 @@ images/vm3.img: Created new group with 2 region(s) as group ID 1560.
Print raw counters for region 4 on device d0
.br
#
.B dmstats print \-\-regionid 4 d0
.B dmstats print --regionid 4 d0
.br
2097152+65536 0 0 0 0 29 0 264 701 0 41 701 0 41
.

View File

@@ -35,32 +35,32 @@ filesystem.
.SH OPTIONS
.
.HP
.BR \-e | \-\-ext\-offline
.BR -e | --ext-offline
.br
Unmount ext2/ext3/ext4 filesystem before doing resize.
.
.HP
.BR \-f | \-\-force
.BR -f | --force
.br
Bypass some sanity checks.
.
.HP
.BR \-h | \-\-help
.BR -h | --help
.br
Display the help text.
.
.HP
.BR \-n | \-\-dry\-run
.BR -n | --dry-run
.br
Print commands without running them.
.
.HP
.BR \-v | \-\-verbose
.BR -v | --verbose
.br
Be more verbose.
.
.HP
.BR \-y | \-\-yes
.BR -y | --yes
.br
Answer "yes" at any prompts.
.
@@ -87,7 +87,7 @@ If \fI/dev/vg/test\fP contains ext2/ext3/ext4
filesystem it will be unmounted prior the resize.
All [y/n] questions will be answered 'y'.
.sp
.B fsadm \-e \-y resize /dev/vg/test 1000M
.B fsadm -e -y resize /dev/vg/test 1000M
.
.SH ENVIRONMENT VARIABLES
.

View File

@@ -1,4 +1,4 @@
.SH EXAMPLES
Change LV permission to read-only:
.sp
.B lvchange \-pr vg00/lvol1
.B lvchange -pr vg00/lvol1

View File

@@ -1,6 +1,6 @@
.TH LVCHANGE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVCHANGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvchange \- Change the attributes of logical volume(s)
lvchange - Change the attributes of logical volume(s)
.
.SH SYNOPSIS
\fBlvchange\fP \fIoption_args\fP \fIposition_args\fP
@@ -323,6 +323,14 @@ required, after which the others are optional.
[ \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP ]
.ad b
.br
.ad l
[ \fB--poll\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.RE
.br
@@ -384,6 +392,14 @@ Activate or deactivate an LV.
.ad b
.br
.ad l
[ \fB--poll\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--ignorelockingfailure\fP ]
.ad b
.br
@@ -407,9 +423,17 @@ Reactivate an LV using the latest metadata.
.ad b
.br
.ad l
[ \fB--activationmode\fP \fBpartial\fP|\fBdegraded\fP|\fBcomplete\fP ]
.ad b
.br
.ad l
[ \fB--poll\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.RE
.br
@@ -421,10 +445,6 @@ Start or stop monitoring an LV from dmeventd.
\fBlvchange\fP \fB--monitor\fP \fBy\fP|\fBn\fP \fIVG\fP|\fILV\fP|\fITag\fP|\fISelect\fP ...
.br
.RS 4
.ad l
[ \fB--poll\fP \fBy\fP|\fBn\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.RE
.br
@@ -455,6 +475,18 @@ Make the minor device number persistent for an LV.
[ \fB-j\fP|\fB--major\fP \fINumber\fP ]
.ad b
.br
.ad l
[ \fB-a\fP|\fB--activate\fP \fBy\fP|\fBn\fP|\fBay\fP ]
.ad b
.br
.ad l
[ \fB--poll\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--monitor\fP \fBy\fP|\fBn\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.RE
.br
@@ -840,10 +872,10 @@ ignore the devices LVM creates.
.ad l
\fB-P\fP|\fB--partial\fP
.br
When set, the tools will do their best to provide access to VGs
that are only partially available (one or more PVs belonging
to the VG are missing from the system). Metadata may not be
changed with this option.
Commands will do their best to activate LVs with missing PV extents.
Missing extents may be replaced with error or zero segments
according to the lvm.conf missing_stripe_filler setting.
Metadata may not be changed with this option.
.ad b
.HP
.ad l
@@ -1092,7 +1124,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.SH EXAMPLES
Change LV permission to read-only:
.sp
.B lvchange \-pr vg00/lvol1
.B lvchange -pr vg00/lvol1
.SH SEE ALSO
.BR lvm (8)

View File

@@ -4,9 +4,20 @@ The LV type is also called the segment type or segtype.
To display the current LV type, run the command:
.B lvs \-o name,segtype
.B lvs -o name,segtype
.I LV
In some cases, an LV is a single device mapper (dm) layer above physical
devices. In other cases, hidden LVs (dm devices) are layered between the
visible LV and physical devices. LVs in the middle layers are called sub LVs.
A command run on a visible LV sometimes operates on a sub LV rather than
the specified LV. In other cases, a sub LV must be specified directly on
the command line.
Sub LVs can be displayed with the command:
.B lvs -a
The
.B linear
type is equivalent to the
@@ -20,45 +31,41 @@ type is deprecated and the
.B raid1
type should be used. They are both implementations of mirroring.
In some cases, an LV is a single device mapper (dm) layer above physical
devices. In other cases, hidden LVs (dm devices) are layered between the
visible LV and physical devices. LVs in the middle layers are called sub LVs.
A command run on a visible LV sometimes operates on a sub LV rather than
the specified LV. In other cases, a sub LV must be specified directly on
the command line.
Striped raid types are
.B raid0/raid0_meta
,
.B raid5
(an alias for raid5_ls),
.B raid6
(an alias for raid6_zr) and
.B raid10
(an alias for raid10_near).
\fBraid0/raid0_meta\fP,
\fBraid5\fP (an alias for raid5_ls),
\fBraid6\fP (an alias for raid6_zr) and
\fBraid10\fP (an alias for raid10_near).
As opposed to mirroring, raid5 and raid6 stripe data and calculate parity
blocks. The parity blocks can be used for data block recovery in case devices
fail. A maximum number of one device in a raid5 LV may fail and two in case
of raid6. Striped raid types typically rotate the parity blocks for performance
reasons thus avoiding contention on a single device. Layouts of raid5 rotating
parity blocks can be one of left-asymmetric (raid5_la), left-symmetric (raid5_ls
with alias raid5), right-asymmetric (raid5_ra), right-symmetric (raid5_rs) and raid5_n,
which doesn't rotate parity blocks. Any \"_n\" layouts allow for conversion between
raid levels (raid5_n -> raid6 or raid5_n -> striped/raid0/raid0_meta).
raid6 layouts are zero-restart (raid6_zr with alias raid6), next-restart (raid6_nr),
next-continue (raid6_nc). Additionally, special raid6 layouts for raid level conversions
between raid5 and raid6 are raid6_ls_6, raid6_rs_6, raid6_la_6 and raid6_ra_6. Those
correspond to their raid5 counterparts (e.g. raid5_rs can be directly converted to raid6_rs_6
and vice-versa).
raid10 (an alias for raid10_near) is currently limited to one data copy and even number of
sub LVs. This is a mirror group layout thus a single sub LV may fail per mirror group
without data loss.
Striped raid types support converting the layout, their stripesize
and their number of stripes.
blocks. The parity blocks can be used for data block recovery in case
devices fail. A maximum number of one device in a raid5 LV may fail, and
two in case of raid6. Striped raid types typically rotate the parity and
data blocks for performance reasons, thus avoiding contention on a single
device. Specific arrangements of parity and data blocks (layouts) can be
used to optimize I/O performance, or to convert between raid levels. See
\fBlvmraid\fP(7) for more information.
The striped raid types combined with raid1 allow for conversion from linear -> striped/raid0/raid0_meta
and vice-versa by e.g. linear <-> raid1 <-> raid5_n (then adding stripes) <-> striped/raid0/raid0_meta.
Layouts of raid5 rotating parity blocks can be: left-asymmetric
(raid5_la), left-symmetric (raid5_ls with alias raid5), right-asymmetric
(raid5_ra), right-symmetric (raid5_rs) and raid5_n, which doesn't rotate
parity blocks. Layouts of raid6 are: zero-restart (raid6_zr with alias
raid6), next-restart (raid6_nr), and next-continue (raid6_nc).
Sub LVs can be displayed with the command
.B lvs -a
Layouts including _n allow for conversion between raid levels (raid5_n to
raid6 or raid5_n to striped/raid0/raid0_meta). Additionally, special raid6
layouts for raid level conversions between raid5 and raid6 are:
raid6_ls_6, raid6_rs_6, raid6_la_6 and raid6_ra_6. Those correspond to
their raid5 counterparts (e.g. raid5_rs can be directly converted to
raid6_rs_6 and vice-versa).
raid10 (an alias for raid10_near) is currently limited to one data copy
and even number of sub LVs. This is a mirror group layout, thus a single
sub LV may fail per mirror group without data loss.
Striped raid types support converting the layout, their stripesize and
their number of stripes.
The striped raid types combined with raid1 allow for conversion from
linear -> striped/raid0/raid0_meta and vice-versa by e.g. linear <-> raid1
<-> raid5_n (then adding stripes) <-> striped/raid0/raid0_meta.

View File

@@ -20,19 +20,19 @@ the current metadata LV with LV2 (for repair purposes.)
.SH EXAMPLES
Convert a linear LV to a two-way mirror LV.
.br
.B lvconvert \-\-type mirror \-\-mirrors 1 vg/lvol1
.B lvconvert --type mirror --mirrors 1 vg/lvol1
Convert a linear LV to a two-way RAID1 LV.
.br
.B lvconvert \-\-type raid1 \-\-mirrors 1 vg/lvol1
.B lvconvert --type raid1 --mirrors 1 vg/lvol1
Convert a mirror LV to use an in\-memory log.
Convert a mirror LV to use an in-memory log.
.br
.B lvconvert \-\-mirrorlog core vg/lvol1
.B lvconvert --mirrorlog core vg/lvol1
Convert a mirror LV to use a disk log.
.br
.B lvconvert \-\-mirrorlog disk vg/lvol1
.B lvconvert --mirrorlog disk vg/lvol1
Convert a mirror or raid1 LV to a linear LV.
.br
@@ -40,73 +40,73 @@ Convert a mirror or raid1 LV to a linear LV.
Convert a mirror LV to a raid1 LV with the same number of images.
.br
.B lvconvert \-\-type raid1 vg/lvol1
.B lvconvert --type raid1 vg/lvol1
Convert a linear LV to a two-way mirror LV, allocating new extents from specific
PV ranges.
.br
.B lvconvert \-\-mirrors 1 vg/lvol1 /dev/sda:0\-15 /dev/sdb:0\-15
.B lvconvert --mirrors 1 vg/lvol1 /dev/sda:0-15 /dev/sdb:0-15
Convert a mirror LV to a linear LV, freeing physical extents from a specific PV.
.br
.B lvconvert \-\-type linear vg/lvol1 /dev/sda
.B lvconvert --type linear vg/lvol1 /dev/sda
Split one image from a mirror or raid1 LV, making it a new LV.
.br
.B lvconvert \-\-splitmirrors 1 \-\-name lv_split vg/lvol1
.B lvconvert --splitmirrors 1 --name lv_split vg/lvol1
Split one image from a raid1 LV, and track changes made to the raid1 LV
while the split image remains detached.
.br
.B lvconvert \-\-splitmirrors 1 \-\-trackchanges vg/lvol1
.B lvconvert --splitmirrors 1 --trackchanges vg/lvol1
Merge an image (that was previously created with \-\-splitmirrors and
\-\-trackchanges) back into the original raid1 LV.
Merge an image (that was previously created with --splitmirrors and
--trackchanges) back into the original raid1 LV.
.br
.B lvconvert \-\-mergemirrors vg/lvol1_rimage_1
.B lvconvert --mergemirrors vg/lvol1_rimage_1
Replace PV /dev/sdb1 with PV /dev/sdf1 in a raid1/4/5/6/10 LV.
.br
.B lvconvert \-\-replace /dev/sdb1 vg/lvol1 /dev/sdf1
.B lvconvert --replace /dev/sdb1 vg/lvol1 /dev/sdf1
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
.B lvconvert --replace /dev/sdb1 --replace /dev/sdc1 --replace /dev/sdd1
.RS
.B vg/lvol1 /dev/sd[fgh]1
.RE
Replace the maximum of 2 PVs /dev/sd[bc]1 with PVs /dev/sd[gh]1 in a raid6 LV.
.br
.B lvconvert \-\-replace /dev/sdb1 \-\-replace /dev/sdc1 vg/lvol1 /dev/sd[gh]1
.B lvconvert --replace /dev/sdb1 --replace /dev/sdc1 vg/lvol1 /dev/sd[gh]1
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.
is used as an external read-only origin for the new thin LV.
.br
.B lvconvert \-\-type thin \-\-thinpool vg/tpool1 vg/lvol1
.B lvconvert --type thin --thinpool vg/tpool1 vg/lvol1
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
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
.B lvconvert --type thin --thinpool vg/tpool1
.RS
.B \-\-originname external vg/lvol1
.B --originname external vg/lvol1
.RE
Convert an LV to a cache pool LV using another specified LV for cache pool
metadata.
.br
.B lvconvert \-\-type cache-pool \-\-poolmetadata vg/poolmeta1 vg/lvol1
.B lvconvert --type cache-pool --poolmetadata vg/poolmeta1 vg/lvol1
Convert an LV to a cache LV using the specified cache pool and chunk size.
.br
.B lvconvert \-\-type cache \-\-cachepool vg/cpool1 \-c 128 vg/lvol1
.B lvconvert --type cache --cachepool vg/cpool1 -c 128 vg/lvol1
Detach and keep the cache pool from a cache LV.
.br
.B lvconvert \-\-splitcache vg/lvol1
.B lvconvert --splitcache vg/lvol1
Detach and remove the cache pool from a cache LV.
.br
.B lvconvert \-\-uncache vg/lvol1
.B lvconvert --uncache vg/lvol1

View File

@@ -1,6 +1,6 @@
.TH LVCONVERT 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVCONVERT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvconvert \- Change logical volume layout
lvconvert - Change logical volume layout
.
.SH SYNOPSIS
\fBlvconvert\fP \fIoption_args\fP \fIposition_args\fP
@@ -240,9 +240,20 @@ The LV type is also called the segment type or segtype.
To display the current LV type, run the command:
.B lvs \-o name,segtype
.B lvs -o name,segtype
.I LV
In some cases, an LV is a single device mapper (dm) layer above physical
devices. In other cases, hidden LVs (dm devices) are layered between the
visible LV and physical devices. LVs in the middle layers are called sub LVs.
A command run on a visible LV sometimes operates on a sub LV rather than
the specified LV. In other cases, a sub LV must be specified directly on
the command line.
Sub LVs can be displayed with the command:
.B lvs -a
The
.B linear
type is equivalent to the
@@ -256,48 +267,44 @@ type is deprecated and the
.B raid1
type should be used. They are both implementations of mirroring.
In some cases, an LV is a single device mapper (dm) layer above physical
devices. In other cases, hidden LVs (dm devices) are layered between the
visible LV and physical devices. LVs in the middle layers are called sub LVs.
A command run on a visible LV sometimes operates on a sub LV rather than
the specified LV. In other cases, a sub LV must be specified directly on
the command line.
Striped raid types are
.B raid0/raid0_meta
,
.B raid5
(an alias for raid5_ls),
.B raid6
(an alias for raid6_zr) and
.B raid10
(an alias for raid10_near).
\fBraid0/raid0_meta\fP,
\fBraid5\fP (an alias for raid5_ls),
\fBraid6\fP (an alias for raid6_zr) and
\fBraid10\fP (an alias for raid10_near).
As opposed to mirroring, raid5 and raid6 stripe data and calculate parity
blocks. The parity blocks can be used for data block recovery in case devices
fail. A maximum number of one device in a raid5 LV may fail and two in case
of raid6. Striped raid types typically rotate the parity blocks for performance
reasons thus avoiding contention on a single device. Layouts of raid5 rotating
parity blocks can be one of left-asymmetric (raid5_la), left-symmetric (raid5_ls
with alias raid5), right-asymmetric (raid5_ra), right-symmetric (raid5_rs) and raid5_n,
which doesn't rotate parity blocks. Any \"_n\" layouts allow for conversion between
raid levels (raid5_n -> raid6 or raid5_n -> striped/raid0/raid0_meta).
raid6 layouts are zero-restart (raid6_zr with alias raid6), next-restart (raid6_nr),
next-continue (raid6_nc). Additionally, special raid6 layouts for raid level conversions
between raid5 and raid6 are raid6_ls_6, raid6_rs_6, raid6_la_6 and raid6_ra_6. Those
correspond to their raid5 counterparts (e.g. raid5_rs can be directly converted to raid6_rs_6
and vice-versa).
raid10 (an alias for raid10_near) is currently limited to one data copy and even number of
sub LVs. This is a mirror group layout thus a single sub LV may fail per mirror group
without data loss.
Striped raid types support converting the layout, their stripesize
and their number of stripes.
blocks. The parity blocks can be used for data block recovery in case
devices fail. A maximum number of one device in a raid5 LV may fail, and
two in case of raid6. Striped raid types typically rotate the parity and
data blocks for performance reasons, thus avoiding contention on a single
device. Specific arrangements of parity and data blocks (layouts) can be
used to optimize I/O performance, or to convert between raid levels. See
\fBlvmraid\fP(7) for more information.
The striped raid types combined with raid1 allow for conversion from linear -> striped/raid0/raid0_meta
and vice-versa by e.g. linear <-> raid1 <-> raid5_n (then adding stripes) <-> striped/raid0/raid0_meta.
Layouts of raid5 rotating parity blocks can be: left-asymmetric
(raid5_la), left-symmetric (raid5_ls with alias raid5), right-asymmetric
(raid5_ra), right-symmetric (raid5_rs) and raid5_n, which doesn't rotate
parity blocks. Layouts of raid6 are: zero-restart (raid6_zr with alias
raid6), next-restart (raid6_nr), and next-continue (raid6_nc).
Sub LVs can be displayed with the command
.B lvs -a
Layouts including _n allow for conversion between raid levels (raid5_n to
raid6 or raid5_n to striped/raid0/raid0_meta). Additionally, special raid6
layouts for raid level conversions between raid5 and raid6 are:
raid6_ls_6, raid6_rs_6, raid6_la_6 and raid6_ra_6. Those correspond to
their raid5 counterparts (e.g. raid5_rs can be directly converted to
raid6_rs_6 and vice-versa).
raid10 (an alias for raid10_near) is currently limited to one data copy
and even number of sub LVs. This is a mirror group layout, thus a single
sub LV may fail per mirror group without data loss.
Striped raid types support converting the layout, their stripesize and
their number of stripes.
The striped raid types combined with raid1 allow for conversion from
linear -> striped/raid0/raid0_meta and vice-versa by e.g. linear <-> raid1
<-> raid5_n (then adding stripes) <-> striped/raid0/raid0_meta.
.SH USAGE
Convert LV to linear.
.br
@@ -1090,7 +1097,8 @@ storage space, usually on a separate device from the data being mirrored.
\fBcore\fP is not persistent; the log is kept only in memory.
In this case, the mirror must be synchronized (by copying LV data from
the first device to others) each time the LV is activated, e.g. after reboot.
\fBmirrored\fP is a persistent log that is itself mirrored.
\fBmirrored\fP is a persistent log that is itself mirrored, but
should be avoided. Instead, use the raid1 type for log redundancy.
.ad b
.HP
.ad l
@@ -1416,7 +1424,7 @@ Alternate command forms, advanced command usage, and listing of all valid syntax
.P
Convert LV to type mirror (also see type raid1),
.br
(also see lvconvert --mirrors).
(also see lvconvert \-\-mirrors).
.br
.P
\fBlvconvert\fP \fB--type\fP \fBmirror\fP \fILV\fP
@@ -1473,7 +1481,7 @@ Change the type of mirror log used by a mirror LV.
Convert LV to a thin LV, using the original LV as an external origin
.br
(infers --type thin).
(infers \-\-type thin).
.br
.P
\fBlvconvert\fP \fB-T\fP|\fB--thin\fP \fB--thinpool\fP \fILV\fP \fILV\fP\fI_linear_striped_cache_raid\fP
@@ -1520,7 +1528,7 @@ Convert LV to a thin LV, using the original LV as an external origin
.br
-
Convert LV to type cache (infers --type cache).
Convert LV to type cache (infers \-\-type cache).
.br
.P
\fBlvconvert\fP \fB-H\fP|\fB--cache\fP \fB--cachepool\fP \fILV\fP \fILV\fP\fI_linear_striped_thinpool_raid\fP
@@ -1605,11 +1613,11 @@ Swap metadata LV in a thin pool or cache pool (for repair only).
.br
-
Merge LV that was split from a mirror (variant, use --mergemirrors).
Merge LV that was split from a mirror (variant, use \-\-mergemirrors).
.br
Merge thin LV into its origin LV (variant, use --mergethin).
Merge thin LV into its origin LV (variant, use \-\-mergethin).
.br
Merge COW snapshot LV into its origin (variant, use --mergesnapshot).
Merge COW snapshot LV into its origin (variant, use \-\-mergesnapshot).
.br
.P
\fBlvconvert\fP \fB--merge\fP \fIVG\fP|\fILV\fP\fI_linear_striped_snapshot_thin_raid\fP|\fITag\fP ...
@@ -1685,7 +1693,7 @@ origin LV (first arg) to reverse a splitsnapshot command.
.br
-
Poll LV to continue conversion (also see --startpoll).
Poll LV to continue conversion (also see \-\-startpoll).
.br
.P
\fBlvconvert\fP \fILV\fP\fI_mirror_raid\fP
@@ -1718,19 +1726,19 @@ the current metadata LV with LV2 (for repair purposes.)
.SH EXAMPLES
Convert a linear LV to a two-way mirror LV.
.br
.B lvconvert \-\-type mirror \-\-mirrors 1 vg/lvol1
.B lvconvert --type mirror --mirrors 1 vg/lvol1
Convert a linear LV to a two-way RAID1 LV.
.br
.B lvconvert \-\-type raid1 \-\-mirrors 1 vg/lvol1
.B lvconvert --type raid1 --mirrors 1 vg/lvol1
Convert a mirror LV to use an in\-memory log.
Convert a mirror LV to use an in-memory log.
.br
.B lvconvert \-\-mirrorlog core vg/lvol1
.B lvconvert --mirrorlog core vg/lvol1
Convert a mirror LV to use a disk log.
.br
.B lvconvert \-\-mirrorlog disk vg/lvol1
.B lvconvert --mirrorlog disk vg/lvol1
Convert a mirror or raid1 LV to a linear LV.
.br
@@ -1738,76 +1746,76 @@ Convert a mirror or raid1 LV to a linear LV.
Convert a mirror LV to a raid1 LV with the same number of images.
.br
.B lvconvert \-\-type raid1 vg/lvol1
.B lvconvert --type raid1 vg/lvol1
Convert a linear LV to a two-way mirror LV, allocating new extents from specific
PV ranges.
.br
.B lvconvert \-\-mirrors 1 vg/lvol1 /dev/sda:0\-15 /dev/sdb:0\-15
.B lvconvert --mirrors 1 vg/lvol1 /dev/sda:0-15 /dev/sdb:0-15
Convert a mirror LV to a linear LV, freeing physical extents from a specific PV.
.br
.B lvconvert \-\-type linear vg/lvol1 /dev/sda
.B lvconvert --type linear vg/lvol1 /dev/sda
Split one image from a mirror or raid1 LV, making it a new LV.
.br
.B lvconvert \-\-splitmirrors 1 \-\-name lv_split vg/lvol1
.B lvconvert --splitmirrors 1 --name lv_split vg/lvol1
Split one image from a raid1 LV, and track changes made to the raid1 LV
while the split image remains detached.
.br
.B lvconvert \-\-splitmirrors 1 \-\-trackchanges vg/lvol1
.B lvconvert --splitmirrors 1 --trackchanges vg/lvol1
Merge an image (that was previously created with \-\-splitmirrors and
\-\-trackchanges) back into the original raid1 LV.
Merge an image (that was previously created with --splitmirrors and
--trackchanges) back into the original raid1 LV.
.br
.B lvconvert \-\-mergemirrors vg/lvol1_rimage_1
.B lvconvert --mergemirrors vg/lvol1_rimage_1
Replace PV /dev/sdb1 with PV /dev/sdf1 in a raid1/4/5/6/10 LV.
.br
.B lvconvert \-\-replace /dev/sdb1 vg/lvol1 /dev/sdf1
.B lvconvert --replace /dev/sdb1 vg/lvol1 /dev/sdf1
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
.B lvconvert --replace /dev/sdb1 --replace /dev/sdc1 --replace /dev/sdd1
.RS
.B vg/lvol1 /dev/sd[fgh]1
.RE
Replace the maximum of 2 PVs /dev/sd[bc]1 with PVs /dev/sd[gh]1 in a raid6 LV.
.br
.B lvconvert \-\-replace /dev/sdb1 \-\-replace /dev/sdc1 vg/lvol1 /dev/sd[gh]1
.B lvconvert --replace /dev/sdb1 --replace /dev/sdc1 vg/lvol1 /dev/sd[gh]1
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.
is used as an external read-only origin for the new thin LV.
.br
.B lvconvert \-\-type thin \-\-thinpool vg/tpool1 vg/lvol1
.B lvconvert --type thin --thinpool vg/tpool1 vg/lvol1
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
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
.B lvconvert --type thin --thinpool vg/tpool1
.RS
.B \-\-originname external vg/lvol1
.B --originname external vg/lvol1
.RE
Convert an LV to a cache pool LV using another specified LV for cache pool
metadata.
.br
.B lvconvert \-\-type cache-pool \-\-poolmetadata vg/poolmeta1 vg/lvol1
.B lvconvert --type cache-pool --poolmetadata vg/poolmeta1 vg/lvol1
Convert an LV to a cache LV using the specified cache pool and chunk size.
.br
.B lvconvert \-\-type cache \-\-cachepool vg/cpool1 \-c 128 vg/lvol1
.B lvconvert --type cache --cachepool vg/cpool1 -c 128 vg/lvol1
Detach and keep the cache pool from a cache LV.
.br
.B lvconvert \-\-splitcache vg/lvol1
.B lvconvert --splitcache vg/lvol1
Detach and remove the cache pool from a cache LV.
.br
.B lvconvert \-\-uncache vg/lvol1
.B lvconvert --uncache vg/lvol1
.SH SEE ALSO
.BR lvm (8)

View File

@@ -1,8 +1,8 @@
lvcreate creates a new LV in a VG. For standard LVs, this requires
allocating logical extents from the VG's free physical extents. If there
is not enough free space, then the VG can be extended (see
\fBvgextend\fP(8)) with other PVs, or existing LVs can be reduced or
removed (see \fBlvremove\fP, \fBlvreduce\fP.)
is not enough free space, the VG can be extended with other PVs
(\fBvgextend\fP(8)), or existing LVs can be reduced or removed
(\fBlvremove\fP(8), \fBlvreduce\fP(8).)
To control which PVs a new LV will use, specify one or more PVs as
position args at the end of the command line. lvcreate will allocate
@@ -19,7 +19,7 @@ unique PVs be available in the VG for allocation.
Thin pools (for thin provisioning) and cache pools (for caching) are
represented by special LVs with types thin-pool and cache-pool (see
\fBlvmthin\fP(7) and \fBlvmcache\fP(7)). The pool LVs are not usable as
standard block devices, but the LV names act references to the pools.
standard block devices, but the LV names act as references to the pools.
Thin LVs are thinly provisioned from a thin pool, and are created with a
virtual size rather than a physical size. A cache LV is the combination of
@@ -27,10 +27,9 @@ a standard LV with a cache pool, used to cache active portions of the LV
to improve performance.
.SS Usage notes
In the usage section below, \fB--size\fP \fISize\fP can be replaced
with \fB--extents\fP \fINumber\fP. See both descriptions
the options section.
with \fB--extents\fP \fINumber\fP. See descriptions in the options section.
In the usage section below, \fB--name\fP is omitted from the required
options, even though it is typically used. When the name is not
options, even though it is typically used. When the name is not
specified, a new LV name is generated with the "lvol" prefix and a unique
numeric suffix. Also see the description in the options section.
numeric suffix.

View File

@@ -3,56 +3,56 @@
Create a striped LV with 3 stripes, a stripe size of 8KiB and a size of 100MiB.
The LV name is chosen by lvcreate.
.br
.B lvcreate \-i 3 \-I 8 \-L 100m vg00
.B lvcreate -i 3 -I 8 -L 100m vg00
Create a raid1 LV with two images, and a useable 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
.B lvcreate --type raid1 -m1 -L 500m -n mylv vg00
Create a mirror LV with two images, and a useable 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
.B lvcreate --type mirror -m1 -L 500m -n mylv vg00
Create a mirror LV with 2 images, and a useable 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
.B lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
Create a copy\-on\-write snapshot of an LV:
Create a copy-on-write snapshot of an LV:
.br
.B lvcreate \-\-snapshot \-\-size 100m \-\-name mysnap vg00/mylv
.B lvcreate --snapshot --size 100m --name mysnap vg00/mylv
Create a copy\-on\-write snapshot with a size sufficient
Create a copy-on-write snapshot with a size sufficient
for overwriting 20% of the size of the original LV.
.br
.B lvcreate \-s \-l 20%ORIGIN \-n mysnap vg00/mylv
.B lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
Create a sparse LV with 1TiB of virtual space, and actual space just under
100MiB.
.br
.B lvcreate \-\-snapshot \-\-virtualsize 1t \-\-size 100m \-\-name mylv vg00
.B lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
Create a linear LV with a usable size of 64MiB on specific physical extents.
.br
.B lvcreate \-L 64m \-n mylv vg00 /dev/sda:0\-7 /dev/sdb:0\-7
.B lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
Create a RAID5 LV with a usable size of 5GiB, 3 stripes, a stripe size of
64KiB, using a total of 4 devices (including one for parity).
.br
.B lvcreate \-\-type raid5 \-L 5G \-i 3 \-I 64 \-n mylv vg00
.B lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
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
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).
.br
.B lvcreate \-\-config allocation/raid_stripe_all_devices=1
.B lvcreate --config allocation/raid_stripe_all_devices=1
.RS
.B \-\-type raid5 \-l 100%FREE \-n mylv vg00
.B --type raid5 -l 100%FREE -n mylv vg00
.RE
Create RAID10 LV with a usable size of 5GiB, using 2 stripes, each on
@@ -62,36 +62,36 @@ differently:
but \fB-m\fP specifies the number of images in addition
to the first image).
.br
.B lvcreate \-\-type raid10 \-L 5G \-i 2 \-m 1 \-n mylv vg00
.B lvcreate --type raid10 -L 5G -i 2 -m 1 -n mylv vg00
Create a 1TiB thin LV, first creating a new thin pool for it, where
the thin pool has 100MiB of space, uses 2 stripes, has a 64KiB stripe
size, and 256KiB chunk size.
.br
.B lvcreate \-\-type thin \-\-name mylv \-\-thinpool mypool
.B lvcreate --type thin --name mylv --thinpool mypool
.RS
.B \-V 1t \-L 100m \-i 2 \-I 64 \-c 256 vg00
.B -V 1t -L 100m -i 2 -I 64 -c 256 vg00
.RE
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
.B lvcreate --snapshot --name mysnap vg00/thinvol
Create a thin snapshot of the read-only inactive LV named "origin"
which becomes an external origin for the thin snapshot LV.
.br
.B lvcreate \-\-snapshot \-\-name mysnap \-\-thinpool mypool vg00/origin
.B lvcreate --snapshot --name mysnap --thinpool mypool vg00/origin
Create a cache pool from a fast physical device. The cache pool can
then be used to cache an LV.
.br
.B lvcreate \-\-type cache-pool \-L 1G \-n my_cpool vg00 /dev/fast1
.B lvcreate --type cache-pool -L 1G -n my_cpool vg00 /dev/fast1
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.
.br
.B lvcreate \-\-type cache \-\-cachepool my_cpool
.B lvcreate --type cache --cachepool my_cpool
.RS
.B \-L 100G \-n mylv vg00 /dev/slow1
.B -L 100G -n mylv vg00 /dev/slow1
.RE

View File

@@ -1,6 +1,6 @@
.TH LVCREATE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVCREATE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvcreate \- Create a logical volume
lvcreate - Create a logical volume
.
.SH SYNOPSIS
\fBlvcreate\fP \fIoption_args\fP \fIposition_args\fP
@@ -244,9 +244,9 @@ lvcreate \- Create a logical volume
.SH DESCRIPTION
lvcreate creates a new LV in a VG. For standard LVs, this requires
allocating logical extents from the VG's free physical extents. If there
is not enough free space, then the VG can be extended (see
\fBvgextend\fP(8)) with other PVs, or existing LVs can be reduced or
removed (see \fBlvremove\fP, \fBlvreduce\fP.)
is not enough free space, the VG can be extended with other PVs
(\fBvgextend\fP(8)), or existing LVs can be reduced or removed
(\fBlvremove\fP(8), \fBlvreduce\fP(8).)
To control which PVs a new LV will use, specify one or more PVs as
position args at the end of the command line. lvcreate will allocate
@@ -263,7 +263,7 @@ unique PVs be available in the VG for allocation.
Thin pools (for thin provisioning) and cache pools (for caching) are
represented by special LVs with types thin-pool and cache-pool (see
\fBlvmthin\fP(7) and \fBlvmcache\fP(7)). The pool LVs are not usable as
standard block devices, but the LV names act references to the pools.
standard block devices, but the LV names act as references to the pools.
Thin LVs are thinly provisioned from a thin pool, and are created with a
virtual size rather than a physical size. A cache LV is the combination of
@@ -271,13 +271,12 @@ a standard LV with a cache pool, used to cache active portions of the LV
to improve performance.
.SS Usage notes
In the usage section below, \fB--size\fP \fISize\fP can be replaced
with \fB--extents\fP \fINumber\fP. See both descriptions
the options section.
with \fB--extents\fP \fINumber\fP. See descriptions in the options section.
In the usage section below, \fB--name\fP is omitted from the required
options, even though it is typically used. When the name is not
options, even though it is typically used. When the name is not
specified, a new LV name is generated with the "lvol" prefix and a unique
numeric suffix. Also see the description in the options section.
numeric suffix.
.SH USAGE
Create a linear LV.
.br
@@ -301,7 +300,7 @@ Create a linear LV.
.RE
-
Create a striped LV (infers --type striped).
Create a striped LV (infers \-\-type striped).
.br
.P
\fBlvcreate\fP \fB-i\fP|\fB--stripes\fP \fINumber\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
@@ -323,7 +322,7 @@ Create a striped LV (infers --type striped).
.RE
-
Create a raid1 or mirror LV (infers --type raid1|mirror).
Create a raid1 or mirror LV (infers \-\-type raid1|mirror).
.br
.P
\fBlvcreate\fP \fB-m\fP|\fB--mirrors\fP \fINumber\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
@@ -570,7 +569,7 @@ Create a cache pool.
.RE
-
Create a thin LV in a thin pool (infers --type thin).
Create a thin LV in a thin pool (infers \-\-type thin).
.br
.P
\fBlvcreate\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] \fB--thinpool\fP \fILV\fP\fI_thinpool\fP \fIVG\fP
@@ -599,7 +598,7 @@ Create a thin LV in a thin pool (infers --type thin).
Create a thin LV that is a snapshot of an existing thin LV
.br
(infers --type thin).
(infers \-\-type thin).
.br
.P
\fBlvcreate\fP \fB-s\fP|\fB--snapshot\fP \fILV\fP\fI_thin\fP
@@ -659,7 +658,7 @@ Create a thin LV that is a snapshot of an external origin LV.
Create a thin LV, first creating a thin pool for it,
.br
where the new thin pool is named by the --thinpool arg.
where the new thin pool is named by the \-\-thinpool arg.
.br
.P
\fBlvcreate\fP \fB--type\fP \fBthin\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
@@ -716,7 +715,7 @@ Create a cache LV, first creating a new origin LV,
.br
then combining it with the existing cache pool named
.br
by the --cachepool arg.
by the \-\-cachepool arg.
.br
.P
\fBlvcreate\fP \fB--type\fP \fBcache\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
@@ -927,7 +926,7 @@ New LVs are made active by default.
\fBn\fP makes the LV inactive, or unavailable, only when possible.
In some cases, creating an LV requires it to be active.
For example, COW snapshots of an active origin LV can only
be created in the active state (this does not apply to thin snapshots.)
be created in the active state (this does not apply to thin snapshots).
The --zero option normally requires the LV to be active.
If autoactivation \fBay\fP is used, the LV is only activated
if it matches an item in lvm.conf activation/auto_activation_volume_list.
@@ -1200,7 +1199,8 @@ storage space, usually on a separate device from the data being mirrored.
\fBcore\fP is not persistent; the log is kept only in memory.
In this case, the mirror must be synchronized (by copying LV data from
the first device to others) each time the LV is activated, e.g. after reboot.
\fBmirrored\fP is a persistent log that is itself mirrored.
\fBmirrored\fP is a persistent log that is itself mirrored, but
should be avoided. Instead, use the raid1 type for log redundancy.
.ad b
.HP
.ad l
@@ -1394,7 +1394,7 @@ When creating a RAID 4/5/6 LV, this number does not include the extra
devices that are required for parity. The largest number depends on
the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and
when unspecified, the default depends on the RAID type
(raid0: 2, raid10: 4, raid4/5: 3, raid6: 5.)
(raid0: 2, raid10: 2, raid4/5: 3, raid6: 5.)
To stripe a new raid LV across all PVs by default,
see lvm.conf allocation/raid_stripe_all_devices.
.ad b
@@ -1606,7 +1606,7 @@ Create a linear LV.
.RE
-
Create a striped LV (also see lvcreate --stripes).
Create a striped LV (also see lvcreate \-\-stripes).
.br
.P
\fBlvcreate\fP \fB--type\fP \fBstriped\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
@@ -1632,7 +1632,7 @@ Create a striped LV (also see lvcreate --stripes).
.RE
-
Create a mirror LV (also see --type raid1).
Create a mirror LV (also see \-\-type raid1).
.br
.P
\fBlvcreate\fP \fB--type\fP \fBmirror\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
@@ -1672,7 +1672,7 @@ Create a mirror LV (also see --type raid1).
Create a COW snapshot LV of an origin LV
.br
(also see --snapshot).
(also see \-\-snapshot).
.br
.P
\fBlvcreate\fP \fB--type\fP \fBsnapshot\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fILV\fP
@@ -1708,7 +1708,7 @@ Create a COW snapshot LV of an origin LV
Create a sparse COW snapshot LV of a virtual origin LV
.br
(also see --snapshot).
(also see \-\-snapshot).
.br
.P
\fBlvcreate\fP \fB--type\fP \fBsnapshot\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
@@ -1766,7 +1766,7 @@ Create a sparse COW snapshot LV of a virtual origin LV.
.RE
-
Create a thin pool (infers --type thin-pool).
Create a thin pool (infers \-\-type thin-pool).
.br
.P
\fBlvcreate\fP \fB-T\fP|\fB--thin\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fIVG\fP
@@ -1816,9 +1816,9 @@ Create a thin pool (infers --type thin-pool).
.RE
-
Create a thin pool named by the --thinpool arg
Create a thin pool named by the \-\-thinpool arg
.br
(infers --type thin-pool).
(infers \-\-type thin-pool).
.br
.P
\fBlvcreate\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fB--thinpool\fP \fILV\fP\fI_new\fP \fIVG\fP
@@ -1872,9 +1872,9 @@ Create a thin pool named by the --thinpool arg
.RE
-
Create a cache pool named by the --cachepool arg
Create a cache pool named by the \-\-cachepool arg
.br
(variant, uses --cachepool in place of --name).
(variant, uses \-\-cachepool in place of \-\-name).
.br
.P
\fBlvcreate\fP \fB--type\fP \fBcache-pool\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
@@ -1967,7 +1967,7 @@ Create a thin LV in a thin pool.
Create a thin LV in a thin pool named in the first arg
.br
(variant, also see --thinpool for naming pool).
(variant, also see \-\-thinpool for naming pool).
.br
.P
\fBlvcreate\fP \fB--type\fP \fBthin\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] \fILV\fP\fI_thinpool\fP
@@ -1992,7 +1992,7 @@ Create a thin LV in a thin pool named in the first arg
Create a thin LV in the thin pool named in the first arg
.br
(variant, infers --type thin, also see --thinpool for
(variant, infers \-\-type thin, also see \-\-thinpool for
.br
naming pool.)
.br
@@ -2046,7 +2046,7 @@ Create a thin LV that is a snapshot of an existing thin LV.
Create a thin LV that is a snapshot of an existing thin LV
.br
(infers --type thin).
(infers \-\-type thin).
.br
.P
\fBlvcreate\fP \fB-T\fP|\fB--thin\fP \fILV\fP\fI_thin\fP
@@ -2071,7 +2071,7 @@ Create a thin LV that is a snapshot of an existing thin LV
Create a thin LV that is a snapshot of an external origin LV
.br
(infers --type thin).
(infers \-\-type thin).
.br
.P
\fBlvcreate\fP \fB-s\fP|\fB--snapshot\fP \fB--thinpool\fP \fILV\fP\fI_thinpool\fP \fILV\fP
@@ -2096,14 +2096,14 @@ Create a thin LV that is a snapshot of an external origin LV
Create a thin LV, first creating a thin pool for it,
.br
where the new thin pool is named by the --thinpool arg
where the new thin pool is named by the \-\-thinpool arg
.br
(variant, infers --type thin).
(variant, infers \-\-type thin).
.br
.P
\fBlvcreate\fP \fB-T\fP|\fB--thin\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
\fBlvcreate\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
.RS 5
\fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fB--thinpool\fP \fILV\fP\fI_new\fP
\fB--thinpool\fP \fILV\fP\fI_new\fP
.RE
.br
.RS 4
@@ -2112,6 +2112,10 @@ where the new thin pool is named by the --thinpool arg
.ad b
.br
.ad l
[ \fB-T\fP|\fB--thin\fP ]
.ad b
.br
.ad l
[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
.ad b
.br
@@ -2124,7 +2128,60 @@ where the new thin pool is named by the --thinpool arg
.ad b
.br
.ad l
[ \fB--type\fP \fBthin\fP ]
[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
.ad b
.br
.ad l
[ \fB--poolmetadataspare\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP ]
.ad b
.br
.ad l
[ \fB--errorwhenfull\fP \fBy\fP|\fBn\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.RE
.br
.RS 4
[ \fIPV\fP ... ]
.RE
-
Create a thin LV, first creating a thin pool for it,
.br
where the new thin pool is named by the \-\-thinpool arg
.br
(variant, infers \-\-type thin).
.br
.P
\fBlvcreate\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT] \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT]
.RS 5
\fB--thinpool\fP \fILV\fP\fI_new\fP \fIVG\fP
.RE
.br
.RS 4
.ad l
[ \fB-l\fP|\fB--extents\fP \fINumber\fP[PERCENT] ]
.ad b
.br
.ad l
[ \fB-T\fP|\fB--thin\fP ]
.ad b
.br
.ad l
[ \fB-c\fP|\fB--chunksize\fP \fISize\fP[k|UNIT] ]
.ad b
.br
.ad l
[ \fB-i\fP|\fB--stripes\fP \fINumber\fP ]
.ad b
.br
.ad l
[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
.ad b
.br
.ad l
@@ -2216,7 +2273,7 @@ where the new thin pool is named in the first arg,
.br
or the new thin pool name is generated when the first
.br
arg is a VG name (variant, infers --type thin).
arg is a VG name (variant, infers \-\-type thin).
.br
.P
\fBlvcreate\fP \fB-T\fP|\fB--thin\fP \fB-V\fP|\fB--virtualsize\fP \fISize\fP[m|UNIT]
@@ -2242,10 +2299,6 @@ arg is a VG name (variant, infers --type thin).
.ad b
.br
.ad l
[ \fB--type\fP \fBthin\fP ]
.ad b
.br
.ad l
[ \fB--poolmetadatasize\fP \fISize\fP[m|UNIT] ]
.ad b
.br
@@ -2271,13 +2324,13 @@ arg is a VG name (variant, infers --type thin).
Create a thin LV, first creating a thin pool for it
.br
(infers --type thin).
(infers \-\-type thin).
.br
Create a sparse snapshot of a virtual origin LV
.br
(infers --type snapshot).
(infers \-\-type snapshot).
.br
Chooses --type thin or --type snapshot according to
Chooses \-\-type thin or \-\-type snapshot according to
.br
config setting sparse_segtype_default.
.br
@@ -2290,10 +2343,6 @@ config setting sparse_segtype_default.
.ad b
.br
.ad l
[ \fB-T\fP|\fB--thin\fP ]
.ad b
.br
.ad l
[ \fB-s\fP|\fB--snapshot\fP ]
.ad b
.br
@@ -2310,7 +2359,7 @@ config setting sparse_segtype_default.
.ad b
.br
.ad l
[ \fB--type\fP \fBthin\fP ]
[ \fB--type\fP \fBsnapshot\fP ]
.ad b
.br
.ad l
@@ -2341,7 +2390,7 @@ Create a cache LV, first creating a new origin LV,
.br
then combining it with the existing cache pool named
.br
by the --cachepool arg (variant, infers --type cache).
by the \-\-cachepool arg (variant, infers \-\-type cache).
.br
.P
\fBlvcreate\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fB--cachepool\fP \fILV\fP\fI_cachepool\fP \fIVG\fP
@@ -2399,7 +2448,7 @@ Create a cache LV, first creating a new origin LV,
.br
then combining it with the existing cache pool named
.br
in the first arg (variant, also use --cachepool).
in the first arg (variant, also use \-\-cachepool).
.br
.P
\fBlvcreate\fP \fB--type\fP \fBcache\fP \fB-L\fP|\fB--size\fP \fISize\fP[m|UNIT] \fILV\fP\fI_cachepool\fP
@@ -2463,7 +2512,7 @@ first creating a new origin LV, then combining it with
.br
the existing cache pool named in the first arg
.br
(variant, infers --type cache, also use --cachepool).
(variant, infers \-\-type cache, also use \-\-cachepool).
.br
When LV is not a cache pool, convert the specified LV
.br
@@ -2528,56 +2577,56 @@ to type cache after creating a new cache pool LV to use
Create a striped LV with 3 stripes, a stripe size of 8KiB and a size of 100MiB.
The LV name is chosen by lvcreate.
.br
.B lvcreate \-i 3 \-I 8 \-L 100m vg00
.B lvcreate -i 3 -I 8 -L 100m vg00
Create a raid1 LV with two images, and a useable 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
.B lvcreate --type raid1 -m1 -L 500m -n mylv vg00
Create a mirror LV with two images, and a useable 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
.B lvcreate --type mirror -m1 -L 500m -n mylv vg00
Create a mirror LV with 2 images, and a useable 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
.B lvcreate --type mirror -m1 --mirrorlog core -L 500m -n mylv vg00
Create a copy\-on\-write snapshot of an LV:
Create a copy-on-write snapshot of an LV:
.br
.B lvcreate \-\-snapshot \-\-size 100m \-\-name mysnap vg00/mylv
.B lvcreate --snapshot --size 100m --name mysnap vg00/mylv
Create a copy\-on\-write snapshot with a size sufficient
Create a copy-on-write snapshot with a size sufficient
for overwriting 20% of the size of the original LV.
.br
.B lvcreate \-s \-l 20%ORIGIN \-n mysnap vg00/mylv
.B lvcreate -s -l 20%ORIGIN -n mysnap vg00/mylv
Create a sparse LV with 1TiB of virtual space, and actual space just under
100MiB.
.br
.B lvcreate \-\-snapshot \-\-virtualsize 1t \-\-size 100m \-\-name mylv vg00
.B lvcreate --snapshot --virtualsize 1t --size 100m --name mylv vg00
Create a linear LV with a usable size of 64MiB on specific physical extents.
.br
.B lvcreate \-L 64m \-n mylv vg00 /dev/sda:0\-7 /dev/sdb:0\-7
.B lvcreate -L 64m -n mylv vg00 /dev/sda:0-7 /dev/sdb:0-7
Create a RAID5 LV with a usable size of 5GiB, 3 stripes, a stripe size of
64KiB, using a total of 4 devices (including one for parity).
.br
.B lvcreate \-\-type raid5 \-L 5G \-i 3 \-I 64 \-n mylv vg00
.B lvcreate --type raid5 -L 5G -i 3 -I 64 -n mylv vg00
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
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).
.br
.B lvcreate \-\-config allocation/raid_stripe_all_devices=1
.B lvcreate --config allocation/raid_stripe_all_devices=1
.RS
.B \-\-type raid5 \-l 100%FREE \-n mylv vg00
.B --type raid5 -l 100%FREE -n mylv vg00
.RE
Create RAID10 LV with a usable size of 5GiB, using 2 stripes, each on
@@ -2587,38 +2636,38 @@ differently:
but \fB-m\fP specifies the number of images in addition
to the first image).
.br
.B lvcreate \-\-type raid10 \-L 5G \-i 2 \-m 1 \-n mylv vg00
.B lvcreate --type raid10 -L 5G -i 2 -m 1 -n mylv vg00
Create a 1TiB thin LV, first creating a new thin pool for it, where
the thin pool has 100MiB of space, uses 2 stripes, has a 64KiB stripe
size, and 256KiB chunk size.
.br
.B lvcreate \-\-type thin \-\-name mylv \-\-thinpool mypool
.B lvcreate --type thin --name mylv --thinpool mypool
.RS
.B \-V 1t \-L 100m \-i 2 \-I 64 \-c 256 vg00
.B -V 1t -L 100m -i 2 -I 64 -c 256 vg00
.RE
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
.B lvcreate --snapshot --name mysnap vg00/thinvol
Create a thin snapshot of the read-only inactive LV named "origin"
which becomes an external origin for the thin snapshot LV.
.br
.B lvcreate \-\-snapshot \-\-name mysnap \-\-thinpool mypool vg00/origin
.B lvcreate --snapshot --name mysnap --thinpool mypool vg00/origin
Create a cache pool from a fast physical device. The cache pool can
then be used to cache an LV.
.br
.B lvcreate \-\-type cache-pool \-L 1G \-n my_cpool vg00 /dev/fast1
.B lvcreate --type cache-pool -L 1G -n my_cpool vg00 /dev/fast1
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.
.br
.B lvcreate \-\-type cache \-\-cachepool my_cpool
.B lvcreate --type cache --cachepool my_cpool
.RS
.B \-L 100G \-n mylv vg00 /dev/slow1
.B -L 100G -n mylv vg00 /dev/slow1
.RE
.SH SEE ALSO

View File

@@ -1,6 +1,6 @@
.TH LVDISPLAY 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVDISPLAY 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvdisplay \- Display information about a logical volume
lvdisplay - Display information about a logical volume
.
.SH SYNOPSIS
\fBlvdisplay\fP
@@ -48,10 +48,6 @@ and more, using a more compact and configurable output format.
.ad b
.br
.ad l
[ \fB-P\fP|\fB--partial\fP ]
.ad b
.br
.ad l
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.ad b
.br
@@ -343,15 +339,6 @@ See lvmreport(7) for more information about reporting.
.ad b
.HP
.ad l
\fB-P\fP|\fB--partial\fP
.br
When set, the tools will do their best to provide access to VGs
that are only partially available (one or more PVs belonging
to the VG are missing from the system). Metadata may not be
changed with this option.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending

View File

@@ -2,7 +2,7 @@ lvextend extends the size of an LV. This requires allocating logical
extents from the VG's free physical extents. If the extension adds a new
LV segment, the new segment will use the existing segment type of the LV.
Extending a copy\-on\-write snapshot LV adds space for COW blocks.
Extending a copy-on-write snapshot LV adds space for COW blocks.
Use \fBlvconvert\fP(8) to change the number of data images in a RAID or
mirrored LV.

View File

@@ -1,14 +1,14 @@
.SH EXAMPLES
Extend the size of an LV by 54MiB, using a specific PV.
.br
.B lvextend \-L +54 vg01/lvol10 /dev/sdk3
.B lvextend -L +54 vg01/lvol10 /dev/sdk3
Extend the size of an LV by the amount of free
space on PV /dev/sdk3. This is equivalent to specifying
"\-l +100%PVS" on the command line.
"-l +100%PVS" on the command line.
.br
.B lvextend vg01/lvol01 /dev/sdk3
Extend an LV by 16MiB using specific physical extents.
.br
.B lvextend \-L+16m vg01/lvol01 /dev/sda:8\-9 /dev/sdb:8\-9
.B lvextend -L+16m vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9

View File

@@ -1,6 +1,6 @@
.TH LVEXTEND 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVEXTEND 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvextend \- Add space to a logical volume
lvextend - Add space to a logical volume
.
.SH SYNOPSIS
\fBlvextend\fP \fIoption_args\fP \fIposition_args\fP
@@ -126,7 +126,7 @@ lvextend extends the size of an LV. This requires allocating logical
extents from the VG's free physical extents. If the extension adds a new
LV segment, the new segment will use the existing segment type of the LV.
Extending a copy\-on\-write snapshot LV adds space for COW blocks.
Extending a copy-on-write snapshot LV adds space for COW blocks.
Use \fBlvconvert\fP(8) to change the number of data images in a RAID or
mirrored LV.
@@ -528,7 +528,7 @@ When creating a RAID 4/5/6 LV, this number does not include the extra
devices that are required for parity. The largest number depends on
the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and
when unspecified, the default depends on the RAID type
(raid0: 2, raid10: 4, raid4/5: 3, raid6: 5.)
(raid0: 2, raid10: 2, raid4/5: 3, raid6: 5.)
To stripe a new raid LV across all PVs by default,
see lvm.conf allocation/raid_stripe_all_devices.
.ad b
@@ -633,17 +633,17 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.SH EXAMPLES
Extend the size of an LV by 54MiB, using a specific PV.
.br
.B lvextend \-L +54 vg01/lvol10 /dev/sdk3
.B lvextend -L +54 vg01/lvol10 /dev/sdk3
Extend the size of an LV by the amount of free
space on PV /dev/sdk3. This is equivalent to specifying
"\-l +100%PVS" on the command line.
"-l +100%PVS" on the command line.
.br
.B lvextend vg01/lvol01 /dev/sdk3
Extend an LV by 16MiB using specific physical extents.
.br
.B lvextend \-L+16m vg01/lvol01 /dev/sda:8\-9 /dev/sdb:8\-9
.B lvextend -L+16m vg01/lvol01 /dev/sda:8-9 /dev/sdb:8-9
.SH SEE ALSO
.BR lvm (8)

View File

@@ -1,5 +0,0 @@
This command is the same as \fBlvmconfig\fP(8).
lvm config produces formatted output from the LVM configuration tree. The
sources of the configuration data include \fBlvm.conf\fP(5) and command
line settings from \-\-config.

View File

View File

@@ -1,471 +0,0 @@
.TH LVM CONFIG 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.SH NAME
lvm config \- Display and manipulate configuration information
.
.SH SYNOPSIS
\fBlvm config\fP
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
.br
.SH DESCRIPTION
This command is the same as \fBlvmconfig\fP(8).
lvm config produces formatted output from the LVM configuration tree. The
sources of the configuration data include \fBlvm.conf\fP(5) and command
line settings from \-\-config.
.SH USAGE
\fBlvm config\fP
.br
.RS 4
.ad l
[ \fB-f\fP|\fB--file\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB-l\fP|\fB--list\fP ]
.ad b
.br
.ad l
[ \fB--atversion\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--typeconfig\fP \fBcurrent\fP|\fBdefault\fP|\fBdiff\fP|\fBfull\fP|\fBlist\fP|\fBmissing\fP|\fBnew\fP|\fBprofilable\fP|\fBprofilable-command\fP|\fBprofilable-metadata\fP ]
.ad b
.br
.ad l
[ \fB--ignoreadvanced\fP ]
.ad b
.br
.ad l
[ \fB--ignoreunsupported\fP ]
.ad b
.br
.ad l
[ \fB--ignorelocal\fP ]
.ad b
.br
.ad l
[ \fB--mergedconfig\fP ]
.ad b
.br
.ad l
[ \fB--metadataprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--sinceversion\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--showdeprecated\fP ]
.ad b
.br
.ad l
[ \fB--showunsupported\fP ]
.ad b
.br
.ad l
[ \fB--validate\fP ]
.ad b
.br
.ad l
[ \fB--withsummary\fP ]
.ad b
.br
.ad l
[ \fB--withcomments\fP ]
.ad b
.br
.ad l
[ \fB--withspaces\fP ]
.ad b
.br
.ad l
[ \fB--unconfigured\fP ]
.ad b
.br
.ad l
[ \fB--withversions\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.RE
.br
.RS 4
[ \fIString\fP ... ]
.RE
Common options for lvm:
.
.RS 4
.ad l
[ \fB-d\fP|\fB--debug\fP ]
.ad b
.br
.ad l
[ \fB-h\fP|\fB--help\fP ]
.ad b
.br
.ad l
[ \fB-q\fP|\fB--quiet\fP ]
.ad b
.br
.ad l
[ \fB-t\fP|\fB--test\fP ]
.ad b
.br
.ad l
[ \fB-v\fP|\fB--verbose\fP ]
.ad b
.br
.ad l
[ \fB-y\fP|\fB--yes\fP ]
.ad b
.br
.ad l
[ \fB--commandprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--config\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--longhelp\fP ]
.ad b
.br
.ad l
[ \fB--profile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--version\fP ]
.ad b
.RE
.SH OPTIONS
.HP
.ad l
\fB--atversion\fP \fIString\fP
.br
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
at this LVM version will be considered only. This can be used
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.
.ad b
.HP
.ad l
\fB--commandprofile\fP \fIString\fP
.br
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.ad b
.HP
.ad l
\fB--config\fP \fIString\fP
.br
Config settings for the command. These override lvm.conf settings.
The String arg uses the same format as lvm.conf,
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.ad b
.HP
.ad l
\fB-d\fP|\fB--debug\fP ...
.br
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).
.ad b
.HP
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.ad b
.HP
.ad l
\fB-f\fP|\fB--file\fP \fIString\fP
.br
Write output to the named file.
.ad b
.HP
.ad l
\fB-h\fP|\fB--help\fP
.br
Display help text.
.ad b
.HP
.ad l
\fB--ignoreadvanced\fP
.br
Exclude advanced configuration settings from the output.
.ad b
.HP
.ad l
\fB--ignorelocal\fP
.br
Ignore local section.
.ad b
.HP
.ad l
\fB--ignoreunsupported\fP
.br
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.
.ad b
.HP
.ad l
\fB-l\fP|\fB--list\fP
.br
List config settings with summarizing comment. This is the same as using
options --typeconfig list --withsummary.
.ad b
.HP
.ad l
\fB--longhelp\fP
.br
Display long help text.
.ad b
.HP
.ad l
\fB--mergedconfig\fP
.br
When the command is run with --config
and/or --commandprofile (or using LVM_COMMAND_PROFILE
environment variable), --profile, or --metadataprofile,
merge all the contents of the "config cascade" before displaying it.
Without merging, only the configuration at the front of the
cascade is displayed.
See \fBlvm.conf\fP(5) for more information about config.
.ad b
.HP
.ad l
\fB--metadataprofile\fP \fIString\fP
.br
The metadata profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending
on the command.
.ad b
.HP
.ad l
\fB-q\fP|\fB--quiet\fP ...
.br
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer no.
.ad b
.HP
.ad l
\fB--showdeprecated\fP
.br
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
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.
.ad b
.HP
.ad l
\fB--showunsupported\fP
.br
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.
.ad b
.HP
.ad l
\fB--sinceversion\fP \fIString\fP
.br
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.
.ad b
.HP
.ad l
\fB-t\fP|\fB--test\fP
.br
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.
.ad b
.HP
.ad l
\fB--typeconfig\fP \fBcurrent\fP|\fBdefault\fP|\fBdiff\fP|\fBfull\fP|\fBlist\fP|\fBmissing\fP|\fBnew\fP|\fBprofilable\fP|\fBprofilable-command\fP|\fBprofilable-metadata\fP
.br
See lvmreport(7).
.ad b
.HP
.ad l
\fB--unconfigured\fP
.br
Internal option used for generating config file during build.
.ad b
.HP
.ad l
\fB--validate\fP
.br
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
merged configuration tree, also use --mergedconfig.
The validation is done even if lvm.conf config/checks is disabled.
.ad b
.HP
.ad l
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.ad b
.HP
.ad l
\fB--version\fP
.br
Display version information.
.ad b
.HP
.ad l
\fB--withcomments\fP
.br
Display a full comment for each configuration node. For deprecated
settings, also display comments about deprecation.
.ad b
.HP
.ad l
\fB--withspaces\fP
.br
Where appropriate, add more spaces in output for better readability.
.ad b
.HP
.ad l
\fB--withsummary\fP
.br
Display a one line comment for each configuration node.
.ad b
.HP
.ad l
\fB--withversions\fP
.br
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.
.ad b
.HP
.ad l
\fB-y\fP|\fB--yes\fP
.br
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.ad b
.SH VARIABLES
.HP
\fIString\fP
.br
See the option description for information about the string content.
.HP
\fISize\fP[UNIT]
.br
Size is an input number that accepts an optional unit.
Input units are always treated as base two values, regardless of
capitalization, e.g. 'k' and 'K' both refer to 1024.
The default input unit is specified by letter, followed by |UNIT.
UNIT represents other possible input units: \fBbBsSkKmMgGtTpPeE\fP.
b|B is bytes, s|S is sectors of 512 bytes, k|K is kilobytes,
m|M is megabytes, g|G is gigabytes, t|T is terabytes,
p|P is petabytes, e|E is exabytes.
(This should not be confused with the output control --units, 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 a required VG parameter.
.SH SEE ALSO
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
.BR pvchange (8)
.BR pvck (8)
.BR pvcreate (8)
.BR pvdisplay (8)
.BR pvmove (8)
.BR pvremove (8)
.BR pvresize (8)
.BR pvs (8)
.BR pvscan (8)
.BR vgcfgbackup (8)
.BR vgcfgrestore (8)
.BR vgchange (8)
.BR vgck (8)
.BR vgcreate (8)
.BR vgconvert (8)
.BR vgdisplay (8)
.BR vgexport (8)
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
.BR vgremove (8)
.BR vgrename (8)
.BR vgs (8)
.BR vgscan (8)
.BR vgsplit (8)
.BR lvcreate (8)
.BR lvchange (8)
.BR lvconvert (8)
.BR lvdisplay (8)
.BR lvextend (8)
.BR lvreduce (8)
.BR lvremove (8)
.BR lvrename (8)
.BR lvresize (8)
.BR lvs (8)
.BR lvscan (8)
.BR lvm2-activation-generator (8)
.BR blkdeactivate (8)
.BR lvmdump (8)
.BR dmeventd (8)
.BR lvmetad (8)
.BR lvmpolld (8)
.BR lvmlockd (8)
.BR lvmlockctl (8)
.BR clvmd (8)
.BR cmirrord (8)
.BR lvmdbusd (8)
.BR lvmsystemid (7)
.BR lvmreport (7)
.BR lvmraid (7)
.BR lvmthin (7)
.BR lvmcache (7)

View File

@@ -1,5 +0,0 @@
This command is the same as \fBlvmconfig\fP(8).
lvm dumpconfig produces formatted output from the LVM configuration tree. The
sources of the configuration data include \fBlvm.conf\fP(5) and command
line settings from \-\-config.

View File

@@ -1,471 +0,0 @@
.TH LVM DUMPCONFIG 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.SH NAME
lvm dumpconfig \- Display and manipulate configuration information
.
.SH SYNOPSIS
\fBlvm dumpconfig\fP
.br
[ \fIoption_args\fP ]
.br
[ \fIposition_args\fP ]
.br
.SH DESCRIPTION
This command is the same as \fBlvmconfig\fP(8).
lvm dumpconfig produces formatted output from the LVM configuration tree. The
sources of the configuration data include \fBlvm.conf\fP(5) and command
line settings from \-\-config.
.SH USAGE
\fBlvm dumpconfig\fP
.br
.RS 4
.ad l
[ \fB-f\fP|\fB--file\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB-l\fP|\fB--list\fP ]
.ad b
.br
.ad l
[ \fB--atversion\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--typeconfig\fP \fBcurrent\fP|\fBdefault\fP|\fBdiff\fP|\fBfull\fP|\fBlist\fP|\fBmissing\fP|\fBnew\fP|\fBprofilable\fP|\fBprofilable-command\fP|\fBprofilable-metadata\fP ]
.ad b
.br
.ad l
[ \fB--ignoreadvanced\fP ]
.ad b
.br
.ad l
[ \fB--ignoreunsupported\fP ]
.ad b
.br
.ad l
[ \fB--ignorelocal\fP ]
.ad b
.br
.ad l
[ \fB--mergedconfig\fP ]
.ad b
.br
.ad l
[ \fB--metadataprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--sinceversion\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--showdeprecated\fP ]
.ad b
.br
.ad l
[ \fB--showunsupported\fP ]
.ad b
.br
.ad l
[ \fB--validate\fP ]
.ad b
.br
.ad l
[ \fB--withsummary\fP ]
.ad b
.br
.ad l
[ \fB--withcomments\fP ]
.ad b
.br
.ad l
[ \fB--withspaces\fP ]
.ad b
.br
.ad l
[ \fB--unconfigured\fP ]
.ad b
.br
.ad l
[ \fB--withversions\fP ]
.ad b
.br
[ COMMON_OPTIONS ]
.RE
.br
.RS 4
[ \fIString\fP ... ]
.RE
Common options for lvm:
.
.RS 4
.ad l
[ \fB-d\fP|\fB--debug\fP ]
.ad b
.br
.ad l
[ \fB-h\fP|\fB--help\fP ]
.ad b
.br
.ad l
[ \fB-q\fP|\fB--quiet\fP ]
.ad b
.br
.ad l
[ \fB-t\fP|\fB--test\fP ]
.ad b
.br
.ad l
[ \fB-v\fP|\fB--verbose\fP ]
.ad b
.br
.ad l
[ \fB-y\fP|\fB--yes\fP ]
.ad b
.br
.ad l
[ \fB--commandprofile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--config\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
.ad l
[ \fB--longhelp\fP ]
.ad b
.br
.ad l
[ \fB--profile\fP \fIString\fP ]
.ad b
.br
.ad l
[ \fB--version\fP ]
.ad b
.RE
.SH OPTIONS
.HP
.ad l
\fB--atversion\fP \fIString\fP
.br
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
at this LVM version will be considered only. This can be used
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.
.ad b
.HP
.ad l
\fB--commandprofile\fP \fIString\fP
.br
The command profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.ad b
.HP
.ad l
\fB--config\fP \fIString\fP
.br
Config settings for the command. These override lvm.conf settings.
The String arg uses the same format as lvm.conf,
or may use section/field syntax.
See \fBlvm.conf\fP(5) for more information about config.
.ad b
.HP
.ad l
\fB-d\fP|\fB--debug\fP ...
.br
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).
.ad b
.HP
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
For testing and debugging.
.ad b
.HP
.ad l
\fB-f\fP|\fB--file\fP \fIString\fP
.br
Write output to the named file.
.ad b
.HP
.ad l
\fB-h\fP|\fB--help\fP
.br
Display help text.
.ad b
.HP
.ad l
\fB--ignoreadvanced\fP
.br
Exclude advanced configuration settings from the output.
.ad b
.HP
.ad l
\fB--ignorelocal\fP
.br
Ignore local section.
.ad b
.HP
.ad l
\fB--ignoreunsupported\fP
.br
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.
.ad b
.HP
.ad l
\fB-l\fP|\fB--list\fP
.br
List config settings with summarizing comment. This is the same as using
options --typeconfig list --withsummary.
.ad b
.HP
.ad l
\fB--longhelp\fP
.br
Display long help text.
.ad b
.HP
.ad l
\fB--mergedconfig\fP
.br
When the command is run with --config
and/or --commandprofile (or using LVM_COMMAND_PROFILE
environment variable), --profile, or --metadataprofile,
merge all the contents of the "config cascade" before displaying it.
Without merging, only the configuration at the front of the
cascade is displayed.
See \fBlvm.conf\fP(5) for more information about config.
.ad b
.HP
.ad l
\fB--metadataprofile\fP \fIString\fP
.br
The metadata profile to use for command configuration.
See \fBlvm.conf\fP(5) for more information about profiles.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending
on the command.
.ad b
.HP
.ad l
\fB-q\fP|\fB--quiet\fP ...
.br
Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer no.
.ad b
.HP
.ad l
\fB--showdeprecated\fP
.br
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
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.
.ad b
.HP
.ad l
\fB--showunsupported\fP
.br
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.
.ad b
.HP
.ad l
\fB--sinceversion\fP \fIString\fP
.br
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.
.ad b
.HP
.ad l
\fB-t\fP|\fB--test\fP
.br
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.
.ad b
.HP
.ad l
\fB--typeconfig\fP \fBcurrent\fP|\fBdefault\fP|\fBdiff\fP|\fBfull\fP|\fBlist\fP|\fBmissing\fP|\fBnew\fP|\fBprofilable\fP|\fBprofilable-command\fP|\fBprofilable-metadata\fP
.br
See lvmreport(7).
.ad b
.HP
.ad l
\fB--unconfigured\fP
.br
Internal option used for generating config file during build.
.ad b
.HP
.ad l
\fB--validate\fP
.br
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
merged configuration tree, also use --mergedconfig.
The validation is done even if lvm.conf config/checks is disabled.
.ad b
.HP
.ad l
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
of messages sent to stdout and stderr.
.ad b
.HP
.ad l
\fB--version\fP
.br
Display version information.
.ad b
.HP
.ad l
\fB--withcomments\fP
.br
Display a full comment for each configuration node. For deprecated
settings, also display comments about deprecation.
.ad b
.HP
.ad l
\fB--withspaces\fP
.br
Where appropriate, add more spaces in output for better readability.
.ad b
.HP
.ad l
\fB--withsummary\fP
.br
Display a one line comment for each configuration node.
.ad b
.HP
.ad l
\fB--withversions\fP
.br
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.
.ad b
.HP
.ad l
\fB-y\fP|\fB--yes\fP
.br
Do not prompt for confirmation interactively but always assume the
answer yes. Use with extreme caution.
(For automatic no, see -qq.)
.ad b
.SH VARIABLES
.HP
\fIString\fP
.br
See the option description for information about the string content.
.HP
\fISize\fP[UNIT]
.br
Size is an input number that accepts an optional unit.
Input units are always treated as base two values, regardless of
capitalization, e.g. 'k' and 'K' both refer to 1024.
The default input unit is specified by letter, followed by |UNIT.
UNIT represents other possible input units: \fBbBsSkKmMgGtTpPeE\fP.
b|B is bytes, s|S is sectors of 512 bytes, k|K is kilobytes,
m|M is megabytes, g|G is gigabytes, t|T is terabytes,
p|P is petabytes, e|E is exabytes.
(This should not be confused with the output control --units, 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 a required VG parameter.
.SH SEE ALSO
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
.BR pvchange (8)
.BR pvck (8)
.BR pvcreate (8)
.BR pvdisplay (8)
.BR pvmove (8)
.BR pvremove (8)
.BR pvresize (8)
.BR pvs (8)
.BR pvscan (8)
.BR vgcfgbackup (8)
.BR vgcfgrestore (8)
.BR vgchange (8)
.BR vgck (8)
.BR vgcreate (8)
.BR vgconvert (8)
.BR vgdisplay (8)
.BR vgexport (8)
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
.BR vgremove (8)
.BR vgrename (8)
.BR vgs (8)
.BR vgscan (8)
.BR vgsplit (8)
.BR lvcreate (8)
.BR lvchange (8)
.BR lvconvert (8)
.BR lvdisplay (8)
.BR lvextend (8)
.BR lvreduce (8)
.BR lvremove (8)
.BR lvrename (8)
.BR lvresize (8)
.BR lvs (8)
.BR lvscan (8)
.BR lvm2-activation-generator (8)
.BR blkdeactivate (8)
.BR lvmdump (8)
.BR dmeventd (8)
.BR lvmetad (8)
.BR lvmpolld (8)
.BR lvmlockd (8)
.BR lvmlockctl (8)
.BR clvmd (8)
.BR cmirrord (8)
.BR lvmdbusd (8)
.BR lvmsystemid (7)
.BR lvmreport (7)
.BR lvmraid (7)
.BR lvmthin (7)
.BR lvmcache (7)

View File

@@ -1,6 +1,6 @@
.TH LVM FULLREPORT 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVM FULLREPORT 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvm fullreport \- Display full report
lvm fullreport - Display full report
.
.SH SYNOPSIS
\fBlvm fullreport\fP
@@ -29,10 +29,6 @@ if information changes between commands.
.ad b
.br
.ad l
[ \fB-P\fP|\fB--partial\fP ]
.ad b
.br
.ad l
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.ad b
.br
@@ -325,15 +321,6 @@ See lvmreport(7) for more information about reporting.
.ad b
.HP
.ad l
\fB-P\fP|\fB--partial\fP
.br
When set, the tools will do their best to provide access to VGs
that are only partially available (one or more PVs belonging
to the VG are missing from the system). Metadata may not be
changed with this option.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending

View File

@@ -1,6 +1,6 @@
.TH LVM LVPOLL 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVM LVPOLL 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvm lvpoll \- Continue already initiated poll operation on a logical volume
lvm lvpoll - Continue already initiated poll operation on a logical volume
.
.SH SYNOPSIS
\fBlvm lvpoll\fP \fIoption_args\fP \fIposition_args\fP

View File

@@ -1,4 +1,4 @@
.TH LVM 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
.TH LVM 8 "LVM TOOLS #VERSION#" "Red Hat, Inc." \" -*- nroff -*-
.
.SH NAME
.
@@ -36,7 +36,7 @@ as "vg0/lvol0". Where a list of VGs is required but is left empty,
a list of all VGs will be substituted. Where a list of LVs is required
but a VG is given, a list of all the LVs in that VG will be substituted.
So \fBlvdisplay vg0\fP will display all the LVs in "vg0".
Tags can also be used - see \fB\-\-addtag\fP below.
Tags can also be used - see \fB--addtag\fP below.
.P
One advantage of using the built-in shell is that configuration
information gets cached internally between commands.
@@ -47,7 +47,7 @@ executed directly if the first line is #! followed by the absolute
path of \fBlvm\fP.
.P
Additional hyphens within option names are ignored. For example,
\fB\-\-readonly\fP and \fB\-\-read\-only\fP are both accepted.
\fB--readonly\fP and \fB--read-only\fP are both accepted.
.
.SH BUILT-IN COMMANDS
.
@@ -313,7 +313,7 @@ those ranges on the specified Physical Volumes are considered.
Then they try each allocation policy in turn, starting with the strictest
policy (\fBcontiguous\fP) and ending with the allocation policy specified
using \fB\-\-alloc\fP or set as the default for the particular Logical
using \fB--alloc\fP or set as the default for the particular Logical
Volume or Volume Group concerned. For each policy, working from the
lowest-numbered Logical Extent of the empty Logical Volume space that
needs to be filled, they allocate as much space as possible according to
@@ -371,7 +371,7 @@ restrictions described above applied to each step leave the tools no
discretion over the layout.
To view the way the allocation process currently works in any specific
case, read the debug logging output, for example by adding \fB\-vvvv\fP to
case, read the debug logging output, for example by adding \fB-vvvv\fP to
a command.
.
.SH LOGICAL VOLUME TYPES
@@ -409,7 +409,7 @@ 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 overriden by direct use of \fB\-\-commandprofile\fP command line option.
is overriden 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 lvm2 command

View File

@@ -1,4 +1,4 @@
.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Red Hat, Inc." \" -*- nroff -*-
.SH NAME
lvm.conf \(em Configuration file for LVM2
.SH SYNOPSIS
@@ -14,7 +14,7 @@ The settings defined in lvm.conf can be overridden by any
of these extended configuration methods:
.TP
.B direct config override on command line
The \fB\-\-config ConfigurationString\fP command line option takes the
The \fB--config ConfigurationString\fP command line option takes the
ConfigurationString as direct string representation of the configuration
to override the existing configuration. The ConfigurationString is of
exactly the same format as used in any LVM configuration file.
@@ -34,7 +34,7 @@ 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
\fB--commandprofile ProfileName\fP command line option that is recognised by
all LVM2 commands.
The \fBmetadata profile\fP is used to override selected configuration
@@ -46,8 +46,8 @@ processed, the profile is applied automatically. If Volume Group and
any of its Logical Volumes have different profiles defined, the profile
defined for the Logical Volume is preferred. The metadata profile can be
attached/detached by using the \fBlvchange\fP and \fBvgchange\fP commands
and their \fB\-\-metadataprofile ProfileName\fP and
\fB\-\-detachprofile\fP options or the \fB\-\-metadataprofile\fP
and their \fB--metadataprofile ProfileName\fP and
\fB--detachprofile\fP options or the \fB--metadataprofile\fP
option during creation when using \fBvgcreate\fP or \fBlvcreate\fP command.
The \fBvgs\fP and \fBlvs\fP reporting commands provide \fB-o vg_profile\fP
and \fB-o lv_profile\fP output options to show the metadata profile
@@ -65,8 +65,8 @@ For this purpose, there's the \fBcommand_profile_template.profile\fP
(for metadata profiles) which contain all settings that are customizable
by profiles of certain type. Users are encouraged to copy these template
profiles and edit them as needed. Alternatively, the
\fBlvmconfig \-\-file <ProfileName.profile> \-\-type profilable-command <section>\fP
or \fBlvmconfig \-\-file <ProfileName.profile> \-\-type profilable-metadata <section>\fP
\fBlvmconfig --file <ProfileName.profile> --type profilable-command <section>\fP
or \fBlvmconfig --file <ProfileName.profile> --type profilable-metadata <section>\fP
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).
@@ -166,30 +166,30 @@ See the man page
Command to print a list of all possible config settings, with their
default values:
.br
.B lvmconfig \-\-type default
.B lvmconfig --type default
Command to print a list of all possible config settings, with their
default values, and a full description of each as a comment:
.br
.B lvmconfig \-\-type default --withcomments
.B lvmconfig --type default --withcomments
Command to print a list of all possible config settings, with their
current values (configured, non-default values are shown):
.br
.B lvmconfig \-\-type current
.B lvmconfig --type current
Command to print all config settings that have been configured with a
different value than the default (configured, non-default values are
shown):
.br
.B lvmconfig \-\-type diff
.B lvmconfig --type diff
Command to print a single config setting, with its default value,
and a full description, where "Section" refers to the config section,
e.g. global, and "Setting" refers to the name of the specific setting,
e.g. umask:
.br
.B lvmconfig \-\-type default --withcomments Section/Setting
.B lvmconfig --type default --withcomments Section/Setting
.SH FILES

View File

@@ -1,6 +1,6 @@
.TH "LVM2-ACTIVATION-GENERATOR" "8" "LVM TOOLS #VERSION#" "Red Hat, Inc" "\""
.SH "NAME"
lvm2-activation-generator \- generator for systemd units to activate LVM2 volumes on boot
lvm2-activation-generator - generator for systemd units to activate LVM2 volumes on boot
.SH SYNOPSIS
.B #SYSTEMD_GENERATOR_DIR#/lvm2-activation-generator
.sp
@@ -12,7 +12,7 @@ option is used). Otherwise, if \fBlvmetad\fP(8) is enabled,
the lvm2-activation-generator exits immediately without generating
any systemd units and LVM2 fully relies on event-based activation
to activate the LVM2 volumes instead using the \fBpvscan\fP(8)
(pvscan \-\-cache -aay) call that is a part of \fBudev\fP(8) rules.
(pvscan --cache -aay) call that is a part of \fBudev\fP(8) rules.
These systemd units are generated by lvm2-activation-generator:
.sp

View File

@@ -36,11 +36,11 @@ The primary method for using a cache type logical volume:
Create an LV or identify an existing LV to be the origin LV.
.B lvcreate \-n OriginLV \-L LargeSize VG SlowPVs
.B lvcreate -n OriginLV -L LargeSize VG SlowPVs
.I Example
.br
# lvcreate \-n lvol0 \-L 100G vg
# lvcreate -n lvol0 -L 100G vg
.SS 1. create CacheDataLV
@@ -49,11 +49,11 @@ Create the cache data LV. This LV will hold data blocks from the
OriginLV. The size of this LV is the size of the cache and will be
reported as the size of the cache pool LV.
.B lvcreate \-n CacheDataLV \-L CacheSize VG FastPVs
.B lvcreate -n CacheDataLV -L CacheSize VG FastPVs
.I Example
.br
# lvcreate \-n cache0 \-L 10G vg /dev/fast
# lvcreate -n cache0 -L 10G vg /dev/fast
.SS 2. create CacheMetaLV
@@ -62,11 +62,11 @@ Create the cache metadata LV. This LV will hold cache pool metadata. The
size of this LV should be 1000 times smaller than the cache data LV, with
a minimum size of 8MiB.
.B lvcreate \-n CacheMetaLV \-L MetaSize VG FastPVs
.B lvcreate -n CacheMetaLV -L MetaSize VG FastPVs
.I Example
.br
# lvcreate \-n cache0meta \-L 12M vg /dev/fast
# lvcreate -n cache0meta -L 12M vg /dev/fast
.nf
# lvs -a vg
@@ -88,14 +88,14 @@ CacheDataLV is renamed CachePoolLV_cdata and becomes hidden.
.br
CacheMetaLV is renamed CachePoolLV_cmeta and becomes hidden.
.B lvconvert \-\-type cache-pool \-\-poolmetadata VG/CacheMetaLV
.B lvconvert --type cache-pool --poolmetadata VG/CacheMetaLV
.RS
.B VG/CacheDataLV
.RE
.I Example
.br
# lvconvert \-\-type cache\-pool \-\-poolmetadata vg/cache0meta vg/cache0
# lvconvert --type cache-pool --poolmetadata vg/cache0meta vg/cache0
.nf
# lvs -a vg
@@ -118,11 +118,11 @@ CacheLV takes the name of OriginLV.
.br
OriginLV is renamed OriginLV_corig and becomes hidden.
.B lvconvert \-\-type cache \-\-cachepool VG/CachePoolLV VG/OriginLV
.B lvconvert --type cache --cachepool VG/CachePoolLV VG/OriginLV
.I Example
.br
# lvconvert \-\-type cache \-\-cachepool vg/cache0 vg/lvol0
# lvconvert --type cache --cachepool vg/cache0 vg/lvol0
.nf
# lvs -a vg
@@ -198,21 +198,21 @@ pool sub-LVs redundant.
.I Example
.nf
0. Create an origin LV we wish to cache
# lvcreate \-L 10G \-n lv1 vg /dev/slow_devs
# lvcreate -L 10G -n lv1 vg /dev/slow_devs
1. Create a 2-way RAID1 cache data LV
# lvcreate \-\-type raid1 \-m 1 \-L 1G -n cache1 vg \\
# lvcreate --type raid1 -m 1 -L 1G -n cache1 vg \\
/dev/fast1 /dev/fast2
2. Create a 2-way RAID1 cache metadata LV
# lvcreate \-\-type raid1 \-m 1 \-L 8M -n cache1meta vg \\
# lvcreate --type raid1 -m 1 -L 8M -n cache1meta vg \\
/dev/fast1 /dev/fast2
3. Create a cache pool LV combining cache data LV and cache metadata LV
# lvconvert \-\-type cache\-pool \-\-poolmetadata vg/cache1meta vg/cache1
# lvconvert --type cache-pool --poolmetadata vg/cache1meta vg/cache1
4. Create a cached LV by combining the cache pool LV and origin LV
# lvconvert \-\-type cache \-\-cachepool vg/cache1 vg/lv1
# lvconvert --type cache --cachepool vg/cache1 vg/lv1
.fi
.SS Cache mode
@@ -229,11 +229,11 @@ from the cache pool back to the origin LV. This mode will increase
performance, but the loss of a device associated with the cache pool LV
can result in lost data.
With the \-\-cachemode option, the cache mode can be set when creating a
With the --cachemode option, the cache mode can be set when creating a
cache LV, or changed on an existing cache LV. The current cache mode of a
cache LV can be displayed with the cache_mode reporting option:
.B lvs \-o+cache_mode VG/CacheLV
.B lvs -o+cache_mode VG/CacheLV
.BR lvm.conf (5)
.B allocation/cache_mode
@@ -243,21 +243,21 @@ defines the default cache mode.
.I Example
.nf
0. Create an origin LV we wish to cache (yours may already exist)
# lvcreate \-L 10G \-n lv1 vg /dev/slow
# lvcreate -L 10G -n lv1 vg /dev/slow
1. Create a cache data LV
# lvcreate \-L 1G \-n cache1 vg /dev/fast
# lvcreate -L 1G -n cache1 vg /dev/fast
2. Create a cache metadata LV
# lvcreate \-L 8M \-n cache1meta vg /dev/fast
# lvcreate -L 8M -n cache1meta vg /dev/fast
3. Create a cache pool LV
# lvconvert \-\-type cache\-pool \-\-poolmetadata vg/cache1meta vg/cache1
# lvconvert --type cache-pool --poolmetadata vg/cache1meta vg/cache1
4. Create a cache LV by combining the cache pool LV and origin LV,
and use the writethrough cache mode.
# lvconvert \-\-type cache \-\-cachepool vg/cache1 \\
\-\-cachemode writethrough vg/lv1
# lvconvert --type cache --cachepool vg/cache1 \\
--cachemode writethrough vg/lv1
.fi
@@ -275,18 +275,18 @@ The "mq" policy has a number of tunable parameters. The defaults are
chosen to be suitable for the majority of systems, but in special
circumstances, changing the settings can improve performance.
With the \-\-cachepolicy and \-\-cachesettings options, the cache policy
With the --cachepolicy and --cachesettings options, the cache policy
and settings can be set when creating a cache LV, or changed on an
existing cache LV (both options can be used together). The current cache
policy and settings of a cache LV can be displayed with the cache_policy
and cache_settings reporting options:
.B lvs \-o+cache_policy,cache_settings VG/CacheLV
.B lvs -o+cache_policy,cache_settings VG/CacheLV
.I Example
.nf
Change the cache policy and settings of an existing cache LV.
# lvchange \-\-cachepolicy mq \-\-cachesettings \\
# lvchange --cachepolicy mq --cachesettings \\
\(aqmigration_threshold=2048 random_threshold=4\(aq vg/lv1
.fi
@@ -306,7 +306,7 @@ defines the default cache settings.
\&
The size of data blocks managed by a cache pool can be specified with the
\-\-chunksize option when the cache LV is created. The default unit
--chunksize option when the cache LV is created. The default unit
is KiB. The value must be a multiple of 32KiB between 32KiB and 1GiB.
Using a chunk size that is too large can result in wasteful use of the
@@ -318,7 +318,7 @@ CPU time searching for chunks, and excessive memory tracking chunks.
Command to display the cache pool LV chunk size:
.br
.B lvs \-o+chunksize VG/CacheLV
.B lvs -o+chunksize VG/CacheLV
.BR lvm.conf (5)
.B cache_pool_chunk_size
@@ -327,7 +327,7 @@ controls the default chunk size used when creating a cache LV.
The default value is shown by:
.br
.B lvmconfig \-\-type default allocation/cache_pool_chunk_size
.B lvmconfig --type default allocation/cache_pool_chunk_size
.SS Spare metadata LV
@@ -349,7 +349,7 @@ the same VG.
.B lvcreate -n CacheDataLV -L CacheSize VG
.br
.B lvconvert --type cache\-pool VG/CacheDataLV
.B lvconvert --type cache-pool VG/CacheDataLV
.SS Create a new cache LV without an existing origin LV
@@ -360,9 +360,9 @@ A cache LV can be created using an existing cache pool without an existing
origin LV. A new origin LV is created and linked to the cache pool in a
single step.
.B lvcreate \-\-type cache \-L LargeSize \-n CacheLV
.B lvcreate --type cache -L LargeSize -n CacheLV
.RS
.B \-\-cachepool VG/CachePoolLV VG SlowPVs
.B --cachepool VG/CachePoolLV VG SlowPVs
.RE
@@ -374,7 +374,7 @@ A cache pool LV can be created with a single lvcreate command, rather than
using lvconvert on existing LVs. This one command creates a cache data
LV, a cache metadata LV, and combines the two into a cache pool LV.
.B lvcreate \-\-type cache\-pool \-L CacheSize \-n CachePoolLV VG FastPVs
.B lvcreate --type cache-pool -L CacheSize -n CachePoolLV VG FastPVs
.SS Convert existing LVs to cache types

View File

@@ -4,19 +4,19 @@
lvmconf \(em LVM configuration modifier
.SH "SYNOPSIS"
.B lvmconf
.RB [ \-\-disable-cluster ]
.RB [ \-\-enable-cluster ]
.RB [ \-\-enable-halvm ]
.RB [ \-\-disable-halvm ]
.RB [ \-\-file
.RB [ --disable-cluster ]
.RB [ --enable-cluster ]
.RB [ --enable-halvm ]
.RB [ --disable-halvm ]
.RB [ --file
.RI < configfile >]
.RB [ \-\-lockinglib
.RB [ --lockinglib
.RI < lib >]
.RB [ \-\-lockinglibdir
.RB [ --lockinglibdir
.RI < dir >]
.RB [ \-\-services ]
.RB [ \-\-mirrorservice ]
.RB [ \-\-startstopservices ]
.RB [ --services ]
.RB [ --mirrorservice ]
.RB [ --startstopservices ]
.SH "DESCRIPTION"
lvmconf is a script that modifies the locking configuration in
@@ -26,42 +26,42 @@ changes in the lvm configuration if needed.
.SH "OPTIONS"
.TP
.BR \-\-disable-cluster
.BR --disable-cluster
Set \fBlocking_type\fR to the default non-clustered type. Also reset
lvmetad use to its default.
.TP
.BR \-\-enable-cluster
.BR --enable-cluster
Set \fBlocking_type\fR to the default clustered type on this system.
Also disable lvmetad use as it is not yet supported in clustered environment.
.TP
.BR \-\-disable-halvm
.BR --disable-halvm
Set \fBlocking_type\fR to the default non-clustered type. Also reset
lvmetad use to its default.
.TP
.BR \-\-enable-halvm
.BR --enable-halvm
Set \fBlocking_type\fR suitable for HA LVM use.
Also disable lvmetad use as it is not yet supported in HA LVM environment.
.TP
.BR \-\-file " <" \fIconfigfile >
.BR --file " <" \fIconfigfile >
Apply the changes to \fIconfigfile\fP instead of the default
\fI#DEFAULT_SYS_DIR#/lvm.conf\fP.
.TP
.BR \-\-lockinglib " <" \fIlib >
.BR --lockinglib " <" \fIlib >
Set external \fBlocking_library\fR locking library to load if an external locking type is used.
.TP
.BR \-\-lockinglibdir " <" \fIdir >
.BR --lockinglibdir " <" \fIdir >
.TP
.BR \-\-services
.BR --services
In addition to setting the lvm configuration, also enable or disable related Systemd or SysV
clvmd and lvmetad services. This script does not configure services provided by cluster resource
agents.
.TP
.BR \-\-mirrorservice
Also enable or disable optional cmirrord service when handling services (applicable only with \-\-services).
.BR --mirrorservice
Also enable or disable optional cmirrord service when handling services (applicable only with --services).
.TP
.BR \-\-startstopservices
.BR --startstopservices
In addition to enabling or disabling related services, start or stop them immediately
(applicable only with \-\-services).
(applicable only with --services).
.SH FILES
.I #DEFAULT_SYS_DIR#/lvm.conf

View File

@@ -1,3 +1,4 @@
lvmconfig produces formatted output from the LVM configuration tree. The
lvmconfig, lvm config, lvm dumpconfig (for compatibility reasons, to be phased out) produce
formatted output from the LVM configuration tree. The
sources of the configuration data include \fBlvm.conf\fP(5) and command
line settings from \-\-config.
line settings from --config.

View File

@@ -1,6 +1,6 @@
.TH LVMCONFIG 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVMCONFIG 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvmconfig \- Display and manipulate configuration information
lvmconfig - Display and manipulate configuration information
.
.SH SYNOPSIS
\fBlvmconfig\fP
@@ -10,9 +10,10 @@ lvmconfig \- Display and manipulate configuration information
[ \fIposition_args\fP ]
.br
.SH DESCRIPTION
lvmconfig produces formatted output from the LVM configuration tree. The
lvmconfig, lvm config, lvm dumpconfig (for compatibility reasons, to be phased out) produce
formatted output from the LVM configuration tree. The
sources of the configuration data include \fBlvm.conf\fP(5) and command
line settings from \-\-config.
line settings from --config.
.SH USAGE
\fBlvmconfig\fP
.br

View File

@@ -8,8 +8,8 @@ lvmdbusd \(em LVM D-Bus daemon
.
.ad l
.B lvmdbusd
.RB [ \-\-debug \]
.RB [ \-\-udev \]
.RB [ --debug \]
.RB [ --udev \]
.ad b
.
.SH DESCRIPTION
@@ -22,12 +22,12 @@ as root.
.SH OPTIONS
.
.HP
.BR \-\-debug
.BR --debug
.br
Enable debug statements
.
.HP
.BR \-\-udev
.BR --udev
.br
Use udev events to trigger updates
.

View File

@@ -1,6 +1,6 @@
.TH LVMDISKSCAN 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVMDISKSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvmdiskscan \- List devices that may be used as physical volumes
lvmdiskscan - List devices that may be used as physical volumes
.
.SH SYNOPSIS
\fBlvmdiskscan\fP

View File

@@ -3,16 +3,16 @@
lvmdump \(em create lvm2 information dumps for diagnostic purposes
.SH SYNOPSIS
.B lvmdump
.RB [ \-a ]
.RB [ \-c ]
.RB [ \-d
.RB [ -a ]
.RB [ -c ]
.RB [ -d
.IR directory ]
.RB [ \-h ]
.RB [ \-l ]
.RB [ \-m ]
.RB [ \-p ]
.RB [ \-s ]
.RB [ \-u ]
.RB [ -h ]
.RB [ -l ]
.RB [ -m ]
.RB [ -p ]
.RB [ -s ]
.RB [ -u ]
.SH DESCRIPTION
lvmdump is a tool to dump various information concerning LVM2.
By default, it creates a tarball suitable for submission along
@@ -34,69 +34,69 @@ The content of the tarball is as follows:
.br
- list of files present /sys/devices/virtual/block
.br
- if enabled with \-m, metadata dump will be also included
- if enabled with -m, metadata dump will be also included
.br
- if enabled with \-a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included
- if enabled with -a, debug output of vgscan, pvscan and list of all available volume groups, physical volumes and logical volumes will be included
.br
- if enabled with \-c, cluster status info
- if enabled with -c, cluster status info
.br
- if enabled with \-l, lvmetad state if running
- if enabled with -l, lvmetad state if running
.br
- if enabled with \-p, lvmpolld state if running
- if enabled with -p, lvmpolld state if running
.br
- if enabled with \-s, system info and context
- if enabled with -s, system info and context
.br
- if enabled with \-u, udev info and context
- if enabled with -u, udev info and context
.SH OPTIONS
.TP
.B \-a
.B -a
Advanced collection.
\fBWARNING\fR: if lvm is already hung, then this script may hang as well
if \fB\-a\fR is used.
if \fB-a\fR is used.
.TP
.B \-c
.B -c
If clvmd is running, gather cluster data as well.
.TP
.B \-d \fIdirectory
.B -d \fIdirectory
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
.B -h
Print help message
.TP
.B \-l
.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
.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
.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.
.TP
.B \-s
.B -s
Gather system info and context. Currently, this encompasses info gathered
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
.B -u
Gather udev info and context: /etc/udev/udev.conf file, udev daemon version
(output of 'udevadm info \-\-version' command), udev rules currently used in the system
(output of 'udevadm info --version' command), udev rules currently used in the system
(content of /lib/udev/rules.d and /etc/udev/rules.d directory),
list of files in /lib/udev directory and dump of current udev
database content (the output of 'udevadm info \-\-export\-db' command).
database content (the output of 'udevadm info --export-db' command).
.SH ENVIRONMENT VARIABLES
.TP
\fBLVM_BINARY\fP

View File

@@ -4,18 +4,18 @@ lvmetad \(em LVM metadata cache daemon
.SH SYNOPSIS
.B lvmetad
.RB [ \-l
.RB [ -l
.IR level [,level...]]
.RB [ \-p
.RB [ -p
.IR pidfile_path ]
.RB [ \-s
.RB [ -s
.IR socket_path ]
.RB [ \-t
.RB [ -t
.IR timeout_value ]
.RB [ \-f ]
.RB [ \-h ]
.RB [ \-V ]
.RB [ \-? ]
.RB [ -f ]
.RB [ -h ]
.RB [ -V ]
.RB [ -? ]
.SH DESCRIPTION
@@ -26,7 +26,7 @@ the normal work of the system. lvmetad can be a disadvantage when disk
event notifications from the system are unreliable.
lvmetad does not read metadata from disks itself. Instead, it relies on
an LVM command, like pvscan \-\-cache, to read metadata from disks and
an LVM command, like pvscan --cache, to read metadata from disks and
send it to lvmetad to be cached.
New LVM disks that appear on the system must be scanned before lvmetad
@@ -34,8 +34,8 @@ knows about them. If lvmetad does not know about a disk, then LVM
commands using lvmetad will also not know about it. When disks are added
or removed from the system, lvmetad must be updated.
lvmetad is usually combined with event\-based system services that
automatically run pvscan \-\-cache on disks added or removed. This way,
lvmetad is usually combined with event-based system services that
automatically run pvscan --cache on disks added or removed. This way,
the cache is automatically updated with metadata from new disks when they
appear. LVM udev rules and systemd services implement this automation.
Automatic scanning is usually combined with automatic activation. For
@@ -44,7 +44,7 @@ more information, see
If lvmetad is started or restarted after disks have been added to the
system, or if the global_filter has changed, the cache must be updated.
This can be done by running pvscan \-\-cache, or it will be done
This can be done by running pvscan --cache, or it will be done
automatically by the next LVM command that's run.
When lvmetad is not used, LVM commands revert to scanning disks for LVM
@@ -56,7 +56,7 @@ revert to scanning disks. A warning will also be printed which includes
the reason why lvmetad is not being used. The most common reason is the
existence of duplicate PVs (lvmetad cannot cache data for duplicate PVs.)
Once duplicates have been resolved, the lvmetad cache is can be updated
with pvscan \-\-cache and commands will return to using the cache.
with pvscan --cache and commands will return to using the cache.
Use of lvmetad is enabled/disabled by:
.br
@@ -65,7 +65,7 @@ Use of lvmetad is enabled/disabled by:
For more information on this setting, see:
.br
.B lvmconfig \-\-withcomments global/use_lvmetad
.B lvmconfig --withcomments global/use_lvmetad
To ignore disks from LVM at the system level, e.g. lvmetad, pvscan use:
.br
@@ -74,42 +74,42 @@ To ignore disks from LVM at the system level, e.g. lvmetad, pvscan use:
For more information on this setting, see
.br
.B lvmconfig \-\-withcomments devices/global_filter
.B lvmconfig --withcomments devices/global_filter
.SH OPTIONS
To run the daemon in a test environment both the pidfile_path and the
socket_path should be changed from the defaults.
.TP
.B \-f
.B -f
Don't fork, but run in the foreground.
.TP
.BR \-h ", " \-?
.BR -h ", " -?
Show help information.
.TP
.B \-l \fIlevels
.B -l \fIlevels
Specify the levels of log messages to generate as a comma separated list.
Messages are logged by syslog.
Additionally, when \-f is given they are also sent to standard error.
Additionally, when -f is given they are also sent to standard error.
Possible levels are: all, fatal, error, warn, info, wire, debug.
.TP
.B \-p \fIpidfile_path
.B -p \fIpidfile_path
Path to the pidfile. This overrides both the built-in default
(#DEFAULT_PID_DIR#/lvmetad.pid) and the environment variable
\fBLVM_LVMETAD_PIDFILE\fP. This file is used to prevent more
than one instance of the daemon running simultaneously.
.TP
.B \-s \fIsocket_path
.B -s \fIsocket_path
Path to the socket file. This overrides both the built-in default
(#DEFAULT_RUN_DIR#/lvmetad.socket) and the environment variable
\fBLVM_LVMETAD_SOCKET\fP. To communicate successfully with lvmetad,
all LVM2 processes should use the same socket path.
.TP
.B \-t \fItimeout_value
.B -t \fItimeout_value
The daemon may shutdown after being idle for the given time (in seconds). When the
option is omitted or the value given is zero the daemon never shutdowns on idle.
.TP
.B \-V
.B -V
Display the version of lvmetad daemon.
.SH ENVIRONMENT VARIABLES
.TP

View File

@@ -11,41 +11,41 @@ This command interacts with
lvmlockctl [options]
.B \-\-help | \-h
.B --help | -h
Show this help information.
.B \-\-quit | \-q
.B --quit | -q
Tell lvmlockd to quit.
.B \-\-info | \-i
.B --info | -i
Print lock state information from lvmlockd.
.B \-\-dump | \-d
.B --dump | -d
Print log buffer from lvmlockd.
.B \-\-wait | \-w 0|1
.B --wait | -w 0|1
Wait option for other commands.
.B \-\-force | \-f 0|1
.B --force | -f 0|1
Force option for other commands.
.B \-\-kill | \-k
.B --kill | -k
.I vgname
Kill access to the VG when sanlock cannot renew lease.
.B \-\-drop | \-r
.B --drop | -r
.I vgname
Clear locks for the VG when it is unused after kill (-k).
.B \-\-gl\-enable | \-E
.B --gl-enable | -E
.I vgname
Tell lvmlockd to enable the global lock in a sanlock VG.
.B \-\-gl\-disable | \-D
.B --gl-disable | -D
.I vgname
Tell lvmlockd to disable the global lock in a sanlock VG.
.B \-\-stop\-lockspaces | \-S
.B --stop-lockspaces | -S
Stop all lockspaces.
@@ -73,28 +73,28 @@ forcibly deactivate the VG. For more, see
.SS drop
This should only be run after a VG has been successfully deactivated
following an lvmlockctl \-\-kill command. It clears the stale lockspace
following an lvmlockctl --kill command. It clears the stale lockspace
from lvmlockd. In the future, this may become automatic along with an
automatic handling of \-\-kill. For more, see
automatic handling of --kill. For more, see
.BR lvmlockd (8).
.SS gl\-enable
.SS gl-enable
This enables the global lock in a sanlock VG. This is necessary if the VG
that previously held the global lock is removed. For more, see
.BR lvmlockd (8).
.SS gl\-disable
.SS gl-disable
This disables the global lock in a sanlock VG. This is necessary if the
global lock has mistakenly been enabled in more than one VG. The global
lock should be disabled in all but one sanlock VG. For more, see
.BR lvmlockd (8).
.SS stop\-lockspaces
.SS stop-lockspaces
This tells lvmlockd to stop all lockspaces. It can be useful to stop
lockspaces for VGs that the vgchange \-\-lock\-stop comand can no longer
lockspaces for VGs that the vgchange --lock-stop comand can no longer
see, or to stop the dlm global lockspace which is not directly stopped by
the vgchange command. The wait and force options can be used with this
command.

View File

@@ -33,50 +33,50 @@ dlm: uses network communication and a cluster manager.
lvmlockd [options]
For default settings, see lvmlockd \-h.
For default settings, see lvmlockd -h.
.B \-\-help | \-h
.B --help | -h
Show this help information.
.B \-\-version | \-V
.B --version | -V
Show version of lvmlockd.
.B \-\-test | \-T
.B --test | -T
Test mode, do not call lock manager.
.B \-\-foreground | \-f
.B --foreground | -f
Don't fork.
.B \-\-daemon\-debug | \-D
.B --daemon-debug | -D
Don't fork and print debugging to stdout.
.B \-\-pid\-file | \-p
.B --pid-file | -p
.I path
Set path to the pid file.
.B \-\-socket\-path | \-s
.B --socket-path | -s
.I path
Set path to the socket to listen on.
.B \-\-syslog\-priority | \-S err|warning|debug
.B --syslog-priority | -S err|warning|debug
Write log messages from this level up to syslog.
.B \-\-gl\-type | \-g sanlock|dlm
.B --gl-type | -g sanlock|dlm
Set global lock type to be sanlock or dlm.
.B \-\-host\-id | \-i
.B --host-id | -i
.I num
Set the local sanlock host id.
.B \-\-host\-id\-file | \-F
.B --host-id-file | -F
.I path
A file containing the local sanlock host_id.
.B \-\-sanlock\-timeout | \-o
.B --sanlock-timeout | -o
.I seconds
Override the default sanlock I/O timeout.
.B \-\-adopt | \-A 0|1
.B --adopt | -A 0|1
Adopt locks from a previous instance of lvmlockd.
@@ -84,7 +84,7 @@ For default settings, see lvmlockd \-h.
.SS Initial set up
Using LVM with lvmlockd for the first time includes some one\-time set up
Using LVM with lvmlockd for the first time includes some one-time set up
steps:
.SS 1. choose a lock manager
@@ -111,7 +111,7 @@ use_lvmlockd = 1
.I sanlock
.br
Assign each host a unique host_id in the range 1\-2000 by setting
Assign each host a unique host_id in the range 1-2000 by setting
.br
/etc/lvm/lvmlocal.conf local/host_id
@@ -133,7 +133,7 @@ systemctl start corosync dlm
.SS 5. create VG on shared devices
vgcreate \-\-shared <vgname> <devices>
vgcreate --shared <vgname> <devices>
The shared option sets the VG lock type to sanlock or dlm depending on
which lock manager is running. LVM commands will perform locking for the
@@ -141,7 +141,7 @@ VG using lvmlockd. lvmlockd will use the chosen lock manager.
.SS 6. start VG on all hosts
vgchange \-\-lock\-start
vgchange --lock-start
lvmlockd requires shared VGs to be started before they are used. This is
a lock manager operation to start (join) the VG lockspace, and it may take
@@ -156,7 +156,7 @@ LVs in a shared VG.
An LV activated exclusively on one host cannot be activated on another.
When multiple hosts need to use the same LV concurrently, the LV can be
activated with a shared lock (see lvchange options \-aey vs \-asy.)
activated with a shared lock (see lvchange options -aey vs -asy.)
(Shared locks are disallowed for certain LV types that cannot be used from
multiple hosts.)
@@ -177,7 +177,7 @@ start lvmlockd
start lock manager
.br
\[bu]
vgchange \-\-lock\-start
vgchange --lock-start
.br
\[bu]
activate LVs in shared VGs
@@ -189,7 +189,7 @@ The shut down sequence is the reverse:
deactivate LVs in shared VGs
.br
\[bu]
vgchange \-\-lock\-stop
vgchange --lock-stop
.br
\[bu]
stop lock manager
@@ -227,7 +227,7 @@ activate the VG will fail without the necessary locks.
A "local VG" is meant to be used by a single host. It has no lock type or
lock type "none". LVM commands and lvmlockd do not perform locking for
these VGs. A local VG typically exists on local (non\-shared) devices and
these VGs. A local VG typically exists on local (non-shared) devices and
cannot be used concurrently from different hosts.
If a local VG does exist on shared devices, it should be owned by a single
@@ -252,8 +252,8 @@ using lvmlockd. From a host not using lvmlockd, visible lockd VGs are
ignored in the same way as foreign VGs (see
.BR lvmsystemid (7).)
The \-\-shared option for reporting and display commands causes lockd VGs
to be displayed on a host not using lvmlockd, like the \-\-foreign option
The --shared option for reporting and display commands causes lockd VGs
to be displayed on a host not using lvmlockd, like the --foreign option
does for foreign VGs.
@@ -275,7 +275,7 @@ Creates a clvm VG when clvm is configured.
.P
.B vgcreate \-\-shared <vgname> <devices>
.B vgcreate --shared <vgname> <devices>
.IP \[bu] 2
Requires lvmlockd to be configured and running.
.IP \[bu] 2
@@ -288,7 +288,7 @@ lvmlockd obtains locks from the selected lock manager.
.P
.B vgcreate \-c|\-\-clustered y <vgname> <devices>
.B vgcreate -c|--clustered y <vgname> <devices>
.IP \[bu] 2
Requires clvm to be configured and running.
.IP \[bu] 2
@@ -343,29 +343,29 @@ global lock will be available, and LVM will be fully operational.
When a new lockd VG is created, its lockspace is automatically started on
the host that creates it. Other hosts need to run 'vgchange
\-\-lock\-start' to start the new VG before they can use it.
--lock-start' to start the new VG before they can use it.
From the 'vgs' command, lockd VGs are indicated by "s" (for shared) in the
sixth attr field. The specific lock type and lock args for a lockd VG can
be displayed with 'vgs \-o+locktype,lockargs'.
be displayed with 'vgs -o+locktype,lockargs'.
lockd VGs need to be "started" and "stopped", unlike other types of VGs.
See the following section for a full description of starting and stopping.
vgremove of a lockd VG will fail if other hosts have the VG started.
Run vgchange \-\-lock-stop <vgname> on all other hosts before vgremove.
Run vgchange --lock-stop <vgname> on all other hosts before vgremove.
(It may take several seconds before vgremove recognizes that all hosts
have stopped a sanlock VG.)
.SS starting and stopping VGs
Starting a lockd VG (vgchange \-\-lock\-start) causes the lock manager to
Starting a lockd VG (vgchange --lock-start) causes the lock manager to
start (join) the lockspace for the VG on the host where it is run. This
makes locks for the VG available to LVM commands on the host. Before a VG
is started, only LVM commands that read/display the VG are allowed to
continue without locks (and with a warning).
Stopping a lockd VG (vgchange \-\-lock\-stop) causes the lock manager to
Stopping a lockd VG (vgchange --lock-stop) causes the lock manager to
stop (leave) the lockspace for the VG on the host where it is run. This
makes locks for the VG inaccessible to the host. A VG cannot be stopped
while it has active LVs.
@@ -390,24 +390,24 @@ A lockd VG can be stopped if all LVs are deactivated.
All lockd VGs can be started/stopped using:
.br
vgchange \-\-lock-start
vgchange --lock-start
.br
vgchange \-\-lock-stop
vgchange --lock-stop
Individual VGs can be started/stopped using:
.br
vgchange \-\-lock\-start <vgname> ...
vgchange --lock-start <vgname> ...
.br
vgchange \-\-lock\-stop <vgname> ...
vgchange --lock-stop <vgname> ...
To make vgchange not wait for start to complete:
.br
vgchange \-\-lock\-start \-\-lock\-opt nowait ...
vgchange --lock-start --lock-opt nowait ...
lvmlockd can be asked directly to stop all lockspaces:
.br
lvmlockctl \-\-stop\-lockspaces
lvmlockctl --stop-lockspaces
To start only selected lockd VGs, use the lvm.conf
activation/lock_start_list. When defined, only VG names in this list are
@@ -429,7 +429,7 @@ Scripts or programs on a host that automatically start VGs will use the
"auto" option to indicate that the command is being run automatically by
the system:
vgchange \-\-lock\-start \-\-lock\-opt auto [<vgname> ...]
vgchange --lock-start --lock-opt auto [<vgname> ...]
Without any additional configuration, including the "auto" option has no
effect; all VGs are started unless restricted by lock_start_list.
@@ -545,7 +545,7 @@ If the situation arises where more than one sanlock VG contains a global
lock, the global lock should be manually disabled in all but one of them
with the command:
lvmlockctl \-\-gl\-disable <vgname>
lvmlockctl --gl-disable <vgname>
(The one VG with the global lock enabled must be visible to all hosts.)
@@ -555,7 +555,7 @@ and subsequent LVM commands will fail to acquire it. In this case, the
global lock needs to be manually enabled in one of the remaining sanlock
VGs with the command:
lvmlockctl \-\-gl\-enable <vgname>
lvmlockctl --gl-enable <vgname>
A small sanlock VG dedicated to holding the global lock can avoid the case
where the GL lock must be manually enabled after a vgremove.
@@ -593,7 +593,7 @@ cannot be acquired, the LV is not activated and an error is reported.
This would happen if the LV is active exclusively on another host. If the
LV type prohibits shared access, such as a snapshot, the command will
report an error and fail.
The shared mode is intended for a multi\-host/cluster application or
The shared mode is intended for a multi-host/cluster application or
file system.
LV types that cannot be used concurrently
from multiple hosts include thin, cache, raid, mirror, and snapshot.
@@ -638,18 +638,18 @@ acquired by other hosts. The VG must be forcibly deactivated on the host
with the expiring lease before other hosts can acquire its locks.
When the sanlock daemon detects that the lease storage is lost, it runs
the command lvmlockctl \-\-kill <vgname>. This command emits a syslog
the command lvmlockctl --kill <vgname>. This command emits a syslog
message stating that lease storage is lost for the VG and LVs must be
immediately deactivated.
If no LVs are active in the VG, then the lockspace with an expiring lease
will be removed, and errors will be reported when trying to use the VG.
Use the lvmlockctl \-\-drop command to clear the stale lockspace from
Use the lvmlockctl --drop command to clear the stale lockspace from
lvmlockd.
If the VG has active LVs when the lock storage is lost, the LVs must be
quickly deactivated before the lockspace lease expires. After all LVs are
deactivated, run lvmlockctl \-\-drop <vgname> to clear the expiring
deactivated, run lvmlockctl --drop <vgname> to clear the expiring
lockspace from lvmlockd. If all LVs in the VG are not deactivated within
about 40 seconds, sanlock will reset the host using the local watchdog.
The machine reset is effectively a severe form of "deactivating" LVs
@@ -692,7 +692,7 @@ vgchange --lock-stop <vgname>
.IP \[bu] 2
Change the VG lock type to none:
.br
vgchange \-\-lock\-type none <vgname>
vgchange --lock-type none <vgname>
.IP \[bu] 2
Change the dlm cluster name on the host or move the VG to the new cluster.
@@ -704,7 +704,7 @@ cat /sys/kernel/config/dlm/cluster/cluster_name
.IP \[bu] 2
Change the VG lock type back to dlm which sets the new cluster name:
.br
vgchange \-\-lock\-type dlm <vgname>
vgchange --lock-type dlm <vgname>
.IP \[bu] 2
Start the VG on hosts to use it:
@@ -728,12 +728,12 @@ cat /sys/kernel/config/dlm/cluster/cluster_name
.IP \[bu] 2
Change the VG lock type to none:
.br
vgchange \-\-lock\-type none \-\-force <vgname>
vgchange --lock-type none --force <vgname>
.IP \[bu] 2
Change the VG lock type back to dlm which sets the new cluster name:
.br
vgchange \-\-lock\-type dlm <vgname>
vgchange --lock-type dlm <vgname>
.IP \[bu] 2
Start the VG on hosts to use it:
@@ -749,18 +749,18 @@ lvmlockd must be configured and running as described in USAGE.
Change a local VG to a lockd VG with the command:
.br
vgchange \-\-lock\-type sanlock|dlm <vgname>
vgchange --lock-type sanlock|dlm <vgname>
Start the VG on hosts to use it:
.br
vgchange \-\-lock\-start <vgname>
vgchange --lock-start <vgname>
.SS changing a lockd VG to a local VG
Stop the lockd VG on all hosts, then run:
.br
vgchange \-\-lock\-type none <vgname>
vgchange --lock-type none <vgname>
To change a VG from one lockd type to another (i.e. between sanlock and
dlm), first change it to a local VG, then to the new type.
@@ -773,15 +773,15 @@ All LVs must be inactive to change the lock type.
First change the clvm VG to a local VG. Within a running clvm cluster,
change a clvm VG to a local VG with the command:
vgchange \-cn <vgname>
vgchange -cn <vgname>
If the clvm cluster is no longer running on any nodes, then extra options
can be used to forcibly make the VG local. Caution: this is only safe if
all nodes have stopped using the VG:
vgchange \-\-config 'global/locking_type=0 global/use_lvmlockd=0'
vgchange --config 'global/locking_type=0 global/use_lvmlockd=0'
.RS
\-cn <vgname>
-cn <vgname>
.RE
After the VG is local, follow the steps described in "changing a local VG
@@ -830,7 +830,7 @@ lvm.conf must be configured to use either lvmlockd (use_lvmlockd=1) or
clvmd (locking_type=3), but not both.
.IP \[bu] 2
vgcreate \-\-shared creates a lockd VG, and vgcreate \-\-clustered y
vgcreate --shared creates a lockd VG, and vgcreate --clustered y
creates a clvm VG.
.IP \[bu] 2
@@ -839,7 +839,7 @@ need for network clustering.
.IP \[bu] 2
lvmlockd defaults to the exclusive activation mode whenever the activation
mode is unspecified, i.e. \-ay means \-aey, not \-asy.
mode is unspecified, i.e. -ay means -aey, not -asy.
.IP \[bu] 2
lvmlockd commands always apply to the local host, and never have an effect
@@ -856,13 +856,13 @@ lvmlockd saves the cluster name for a lockd VG using dlm. Only hosts in
the matching cluster can use the VG.
.IP \[bu] 2
lvmlockd requires starting/stopping lockd VGs with vgchange \-\-lock-start
and \-\-lock-stop.
lvmlockd requires starting/stopping lockd VGs with vgchange --lock-start
and --lock-stop.
.IP \[bu] 2
vgremove of a sanlock VG may fail indicating that all hosts have not
stopped the VG lockspace. Stop the VG on all hosts using vgchange
\-\-lock-stop.
--lock-stop.
.IP \[bu] 2
vgreduce or pvmove of a PV in a sanlock VG will fail if it holds the

View File

@@ -3,22 +3,22 @@
lvmpolld \(em LVM poll daemon
.SH SYNOPSIS
.B lvmpolld
.RB [ \-l | \-\-log
.RB [ -l | --log
.RI { all | wire | debug }]
.RB [ \-p | \-\-pidfile
.RB [ -p | --pidfile
.IR pidfile_path ]
.RB [ \-s | \-\-socket
.RB [ -s | --socket
.IR socket_path ]
.RB [ \-B | \-\-binary
.RB [ -B | --binary
.IR lvm_binary_path ]
.RB [ \-t | \-\-timeout
.RB [ -t | --timeout
.IR timeout_value ]
.RB [ \-f | \-\-foreground ]
.RB [ \-h | \-\-help ]
.RB [ \-V | \-\-version ]
.RB [ -f | --foreground ]
.RB [ -h | --help ]
.RB [ -V | --version ]
.B lvmpolld
.RB [ \-\-dump ]
.RB [ --dump ]
.SH DESCRIPTION
lvmpolld is polling daemon for LVM. The daemon receives requests for polling
of already initialised operations originating in LVM2 command line tool.
@@ -33,48 +33,48 @@ external factors.
lvmpolld is used by LVM only if it is enabled in \fBlvm.conf\fP(5) by
specifying the \fBglobal/use_lvmpolld\fP setting. If this is not defined in the
LVM configuration explicitly then default setting is used instead (see the
output of \fBlvmconfig \-\-type default global/use_lvmpolld\fP command).
output of \fBlvmconfig --type default global/use_lvmpolld\fP command).
.SH OPTIONS
To run the daemon in a test environment both the pidfile_path and the
socket_path should be changed from the defaults.
.TP
.BR \-f ", " \-\-foreground
.BR -f ", " --foreground
Don't fork, but run in the foreground.
.TP
.BR \-h ", " \-\-help
.BR -h ", " --help
Show help information.
.TP
.IR \fB\-l\fP ", " \fB\-\-log\fP " {" all | wire | debug }
.IR \fB-l\fP ", " \fB--log\fP " {" all | wire | debug }
Select the type of log messages to generate.
Messages are logged by syslog.
Additionally, when \-f is given they are also sent to standard error.
Additionally, when -f is given they are also sent to standard error.
There are two classes of messages: wire and debug. Selecting 'all' supplies both
and is equivalent to a comma-separated list \-l wire,debug.
and is equivalent to a comma-separated list -l wire,debug.
.TP
.BR \-p ", " \-\-pidfile " " \fIpidfile_path
.BR -p ", " --pidfile " " \fIpidfile_path
Path to the pidfile. This overrides both the built-in default
(#DEFAULT_PID_DIR#/lvmpolld.pid) and the environment variable
\fBLVM_LVMPOLLD_PIDFILE\fP. This file is used to prevent more
than one instance of the daemon running simultaneously.
.TP
.BR \-s ", " \-\-socket " " \fIsocket_path
.BR -s ", " --socket " " \fIsocket_path
Path to the socket file. This overrides both the built-in default
(#DEFAULT_RUN_DIR#/lvmpolld.socket) and the environment variable
\fBLVM_LVMPOLLD_SOCKET\fP.
.TP
.BR \-t ", " \-\-timeout " " \fItimeout_value
.BR -t ", " --timeout " " \fItimeout_value
The daemon may shutdown after being idle for the given time (in seconds). When the
option is omitted or the value given is zero the daemon never shutdowns on idle.
.TP
.BR \-B ", " \-\-binary " " \fIlvm_binary_path
.BR -B ", " --binary " " \fIlvm_binary_path
Optional path to alternative LVM binary (default: #LVM_PATH#). Use for
testing purposes only.
.TP
.BR \-V ", " \-\-version
.BR -V ", " --version
Display the version of lvmpolld daemon.
.TP
.B \-\-dump
.B --dump
Contact the running lvmpolld daemon to obtain the complete state and print it
out in a raw format.
.SH ENVIRONMENT VARIABLES

File diff suppressed because it is too large Load Diff

View File

@@ -99,21 +99,21 @@ The primary method for using lvm thin provisioning:
Create an LV that will hold thin pool data.
.B lvcreate \-n ThinDataLV \-L LargeSize VG
.B lvcreate -n ThinDataLV -L LargeSize VG
.I Example
.br
# lvcreate \-n pool0 \-L 10G vg
# lvcreate -n pool0 -L 10G vg
.SS 2. create ThinMetaLV
Create an LV that will hold thin pool metadata.
.B lvcreate \-n ThinMetaLV \-L SmallSize VG
.B lvcreate -n ThinMetaLV -L SmallSize VG
.I Example
.br
# lvcreate \-n pool0meta \-L 1G vg
# lvcreate -n pool0meta -L 1G vg
# lvs
LV VG Attr LSize
@@ -129,17 +129,17 @@ ThinMetaLV is renamed to hidden ThinPoolLV_tmeta.
The new ThinPoolLV takes the previous name of ThinDataLV.
.fi
.B lvconvert \-\-type thin-pool \-\-poolmetadata VG/ThinMetaLV VG/ThinDataLV
.B lvconvert --type thin-pool --poolmetadata VG/ThinMetaLV VG/ThinDataLV
.I Example
.br
# lvconvert \-\-type thin-pool \-\-poolmetadata vg/pool0meta vg/pool0
# lvconvert --type thin-pool --poolmetadata vg/pool0meta vg/pool0
# lvs vg/pool0
LV VG Attr LSize Pool Origin Data% Meta%
pool0 vg twi-a-tz-- 10.00g 0.00 0.00
# lvs \-a
# lvs -a
LV VG Attr LSize
pool0 vg twi-a-tz-- 10.00g
[pool0_tdata] vg Twi-ao---- 10.00g
@@ -157,17 +157,17 @@ The --thinpool argument specifies which thin pool will
contain the ThinLV.
.fi
.B lvcreate \-n ThinLV \-V VirtualSize \-\-thinpool ThinPoolLV VG
.B lvcreate -n ThinLV -V VirtualSize --thinpool ThinPoolLV VG
.I Example
.br
Create a thin LV in a thin pool:
.br
# lvcreate \-n thin1 \-V 1T \-\-thinpool pool0 vg
# lvcreate -n thin1 -V 1T --thinpool pool0 vg
Create another thin LV in the same thin pool:
.br
# lvcreate \-n thin2 \-V 1T \-\-thinpool pool0 vg
# lvcreate -n thin2 -V 1T --thinpool pool0 vg
# lvs vg/thin1 vg/thin2
LV VG Attr LSize Pool Origin Data%
@@ -179,28 +179,28 @@ Create another thin LV in the same thin pool:
Create snapshots of an existing ThinLV or SnapLV.
.br
Do not specify
.BR \-L ", " \-\-size
.BR -L ", " --size
when creating a thin snapshot.
.br
A size argument will cause an old COW snapshot to be created.
.B lvcreate \-n SnapLV \-\-snapshot VG/ThinLV
.B lvcreate -n SnapLV --snapshot VG/ThinLV
.br
.B lvcreate \-n SnapLV \-\-snapshot VG/PrevSnapLV
.B lvcreate -n SnapLV --snapshot VG/PrevSnapLV
.I Example
.br
Create first snapshot of an existing ThinLV:
.br
# lvcreate \-n thin1s1 \-s vg/thin1
# lvcreate -n thin1s1 -s vg/thin1
Create second snapshot of the same ThinLV:
.br
# lvcreate \-n thin1s2 \-s vg/thin1
# lvcreate -n thin1s2 -s vg/thin1
Create a snapshot of the first snapshot:
.br
# lvcreate \-n thin1s1s1 \-s vg/thin1s1
# lvcreate -n thin1s1s1 -s vg/thin1s1
# lvs vg/thin1s1 vg/thin1s2 vg/thin1s1s1
LV VG Attr LSize Pool Origin
@@ -211,14 +211,14 @@ Create a snapshot of the first snapshot:
.SS 6. activate SnapLV
Thin snapshots are created with the persistent "activation skip"
flag, indicated by the "k" attribute. Use \-K with lvchange
flag, indicated by the "k" attribute. Use -K with lvchange
or vgchange to activate thin snapshots with the "k" attribute.
.B lvchange \-ay \-K VG/SnapLV
.B lvchange -ay -K VG/SnapLV
.I Example
.br
# lvchange \-ay \-K vg/thin1s1
# lvchange -ay -K vg/thin1s1
# lvs vg/thin1s1
LV VG Attr LSize Pool Origin
@@ -226,7 +226,7 @@ or vgchange to activate thin snapshots with the "k" attribute.
.SH Thin Topics
.B Alternate syntax for specifying type thin\-pool
.B Alternate syntax for specifying type thin-pool
.br
.B Automatic pool metadata LV
.br
@@ -286,17 +286,17 @@ A thin data LV can be converted to a thin pool LV without specifying a
thin pool metadata LV. LVM automatically creates a metadata LV from the
same VG.
.B lvcreate \-n ThinDataLV \-L LargeSize VG
.B lvcreate -n ThinDataLV -L LargeSize VG
.br
.B lvconvert \-\-type thin\-pool VG/ThinDataLV
.B lvconvert --type thin-pool VG/ThinDataLV
.I Example
.br
.nf
# lvcreate \-n pool0 \-L 10G vg
# lvconvert \-\-type thin\-pool vg/pool0
# lvcreate -n pool0 -L 10G vg
# lvconvert --type thin-pool vg/pool0
# lvs \-a
# lvs -a
pool0 vg twi-a-tz-- 10.00g
[pool0_tdata] vg Twi-ao---- 10.00g
[pool0_tmeta] vg ewi-ao---- 16.00m
@@ -312,18 +312,18 @@ separate physical devices. To do that, specify the device name(s)
at the end of the lvcreate line. It can be especially helpful
to use fast devices for the metadata LV.
.B lvcreate \-n ThinDataLV \-L LargeSize VG LargePV
.B lvcreate -n ThinDataLV -L LargeSize VG LargePV
.br
.B lvcreate \-n ThinMetaLV \-L SmallSize VG SmallPV
.B lvcreate -n ThinMetaLV -L SmallSize VG SmallPV
.br
.B lvconvert \-\-type thin\-pool \-\-poolmetadata VG/ThinMetaLV VG/ThinDataLV
.B lvconvert --type thin-pool --poolmetadata VG/ThinMetaLV VG/ThinDataLV
.I Example
.br
.nf
# lvcreate \-n pool0 \-L 10G vg /dev/sdA
# lvcreate \-n pool0meta \-L 1G vg /dev/sdB
# lvconvert \-\-type thin\-pool \-\-poolmetadata vg/pool0meta vg/pool0
# lvcreate -n pool0 -L 10G vg /dev/sdA
# lvcreate -n pool0meta -L 1G vg /dev/sdB
# lvconvert --type thin-pool --poolmetadata vg/pool0meta vg/pool0
.fi
.BR lvm.conf (5)
@@ -340,18 +340,18 @@ controls the default PV usage for thin pool creation.
To tolerate device failures, use raid for the pool data LV and
pool metadata LV. This is especially recommended for pool metadata LVs.
.B lvcreate \-\-type raid1 \-m 1 \-n ThinMetaLV \-L SmallSize VG PVA PVB
.B lvcreate --type raid1 -m 1 -n ThinMetaLV -L SmallSize VG PVA PVB
.br
.B lvcreate \-\-type raid1 \-m 1 \-n ThinDataLV \-L LargeSize VG PVC PVD
.B lvcreate --type raid1 -m 1 -n ThinDataLV -L LargeSize VG PVC PVD
.br
.B lvconvert \-\-type thin\-pool \-\-poolmetadata VG/ThinMetaLV VG/ThinDataLV
.B lvconvert --type thin-pool --poolmetadata VG/ThinMetaLV VG/ThinDataLV
.I Example
.br
.nf
# lvcreate \-\-type raid1 \-m 1 \-n pool0 \-L 10G vg /dev/sdA /dev/sdB
# lvcreate \-\-type raid1 \-m 1 \-n pool0meta \-L 1G vg /dev/sdC /dev/sdD
# lvconvert \-\-type thin\-pool \-\-poolmetadata vg/pool0meta vg/pool0
# lvcreate --type raid1 -m 1 -n pool0 -L 10G vg /dev/sdA /dev/sdB
# lvcreate --type raid1 -m 1 -n pool0meta -L 1G vg /dev/sdC /dev/sdD
# lvconvert --type thin-pool --poolmetadata vg/pool0meta vg/pool0
.fi
@@ -361,7 +361,7 @@ pool metadata LV. This is especially recommended for pool metadata LVs.
The first time a thin pool LV is created, lvm will create a spare
metadata LV in the VG. This behavior can be controlled with the
option \-\-poolmetadataspare y|n. (Future thin pool creations will
option --poolmetadataspare y|n. (Future thin pool creations will
also attempt to create the pmspare LV if none exists.)
To create the pmspare ("pool metadata spare") LV, lvm first creates
@@ -376,11 +376,11 @@ explicitly.
.I Example
.br
.nf
# lvcreate \-n pool0 \-L 10G vg
# lvcreate \-n pool0meta \-L 1G vg
# lvconvert \-\-type thin\-pool \-\-poolmetadata vg/pool0meta vg/pool0
# lvcreate -n pool0 -L 10G vg
# lvcreate -n pool0meta -L 1G vg
# lvconvert --type thin-pool --poolmetadata vg/pool0meta vg/pool0
# lvs \-a
# lvs -a
[lvol0_pmspare] vg ewi-------
pool0 vg twi---tz--
[pool0_tdata] vg Twi-------
@@ -424,7 +424,7 @@ details of damaged thin metadata to get the best advice on recovery.
Command to repair a thin pool:
.br
.B lvconvert \-\-repair VG/ThinPoolLV
.B lvconvert --repair VG/ThinPoolLV
Repair performs the following steps:
@@ -452,7 +452,7 @@ If metadata is manually restored with thin_repair directly,
the pool metadata LV can be manually swapped with another LV
containing new metadata:
.B lvconvert \-\-thinpool VG/ThinPoolLV \-\-poolmetadata VG/NewThinMetaLV
.B lvconvert --thinpool VG/ThinPoolLV --poolmetadata VG/NewThinMetaLV
.SS Activation of thin snapshots
@@ -474,29 +474,29 @@ by normal activation commands. The skipping behavior does not
apply to deactivation commands.
A snapshot LV with the "k" attribute can be activated using
the \-K (or \-\-ignoreactivationskip) option in addition to the
standard \-ay (or \-\-activate y) option.
the -K (or --ignoreactivationskip) option in addition to the
standard -ay (or --activate y) option.
Command to activate a thin snapshot LV:
.br
.B lvchange \-ay \-K VG/SnapLV
.B lvchange -ay -K VG/SnapLV
The persistent "activation skip" flag can be turned off during
lvcreate, or later with lvchange using the \-kn
(or \-\-setactivationskip n) option.
It can be turned on again with \-ky (or \-\-setactivationskip y).
lvcreate, or later with lvchange using the -kn
(or --setactivationskip n) option.
It can be turned on again with -ky (or --setactivationskip y).
When the "activation skip" flag is removed, normal activation
commands will activate the LV, and the \-K activation option is
commands will activate the LV, and the -K activation option is
not needed.
Command to create snapshot LV without the activation skip flag:
.br
.B lvcreate \-kn \-n SnapLV \-s VG/ThinLV
.B lvcreate -kn -n SnapLV -s VG/ThinLV
Command to remove the activation skip flag from a snapshot LV:
.br
.B lvchange \-kn VG/SnapLV
.B lvchange -kn VG/SnapLV
.BR lvm.conf (5)
.B auto_set_activation_skip
@@ -531,7 +531,7 @@ the thin pool LV.
Command to extend thin pool data space:
.br
.B lvextend \-L Size VG/ThinPoolLV
.B lvextend -L Size VG/ThinPoolLV
.I Example
.br
@@ -542,7 +542,7 @@ Command to extend thin pool data space:
pool0 vg twi-a-tz-- 10.00g 26.96
2. Double the amount of physical space in the thin pool LV.
# lvextend \-L+10G vg/pool0
# lvextend -L+10G vg/pool0
3. The percentage of used data blocks is half the previous value.
# lvs
@@ -560,24 +560,24 @@ fstrim on the file system using a thin LV.
\&
The available metadata space in a thin pool LV can be displayed
with the lvs \-o+metadata_percent command.
with the lvs -o+metadata_percent command.
Command to extend thin pool metadata space:
.br
.B lvextend \-\-poolmetadatasize Size VG/ThinPoolLV
.B lvextend --poolmetadatasize Size VG/ThinPoolLV
.I Example
.br
1. A thin pool LV is using 12.40% of its metadata blocks.
.nf
# lvs \-oname,size,data_percent,metadata_percent vg/pool0
# lvs -oname,size,data_percent,metadata_percent vg/pool0
LV LSize Data% Meta%
pool0 20.00g 13.48 12.40
.fi
2. Display a thin pool LV with its component thin data LV and thin metadata LV.
.nf
# lvs \-a \-oname,attr,size vg
# lvs -a -oname,attr,size vg
LV Attr LSize
pool0 twi-a-tz-- 20.00g
[pool0_tdata] Twi-ao---- 20.00g
@@ -586,12 +586,12 @@ Command to extend thin pool metadata space:
3. Double the amount of physical space in the thin metadata LV.
.nf
# lvextend \-\-poolmetadatasize +12M vg/pool0
# lvextend --poolmetadatasize +12M vg/pool0
.fi
4. The percentage of used metadata blocks is half the previous value.
.nf
# lvs \-a \-oname,size,data_percent,metadata_percent vg
# lvs -a -oname,size,data_percent,metadata_percent vg
LV LSize Data% Meta%
pool0 20.00g 13.48 6.20
[pool0_tdata] 20.00g
@@ -619,12 +619,12 @@ of the file system by 1%. Removing the 1G file restores the virtual
thin pool. The fstrim command restores the physical space to the thin pool.
.nf
# lvs \-a \-oname,attr,size,pool_lv,origin,data_percent,metadata_percent vg
# lvs -a -oname,attr,size,pool_lv,origin,data_percent,metadata_percent vg
LV Attr LSize Pool Origin Data% Meta%
pool0 twi-a-tz-- 10.00g 47.01 21.03
thin1 Vwi-aotz-- 100.00g pool0 2.70
# df \-h /mnt/X
# df -h /mnt/X
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg-thin1 99G 1.1G 93G 2% /mnt/X
@@ -634,7 +634,7 @@ Filesystem Size Used Avail Use% Mounted on
pool0 vg twi-a-tz-- 10.00g 57.01 25.26
thin1 vg Vwi-aotz-- 100.00g pool0 3.70
# df \-h /mnt/X
# df -h /mnt/X
/dev/mapper/vg-thin1 99G 2.1G 92G 3% /mnt/X
# rm /mnt/X/1Gfile
@@ -643,10 +643,10 @@ thin1 vg Vwi-aotz-- 100.00g pool0 3.70
pool0 vg twi-a-tz-- 10.00g 57.01 25.26
thin1 vg Vwi-aotz-- 100.00g pool0 3.70
# df \-h /mnt/X
# df -h /mnt/X
/dev/mapper/vg-thin1 99G 1.1G 93G 2% /mnt/X
# fstrim \-v /mnt/X
# fstrim -v /mnt/X
# lvs
pool0 vg twi-a-tz-- 10.00g 47.01 21.03
@@ -673,7 +673,7 @@ default.
Command to start or stop dmeventd monitoring a thin pool LV:
.br
.B lvchange \-\-monitor {y|n} VG/ThinPoolLV
.B lvchange --monitor {y|n} VG/ThinPoolLV
The current dmeventd monitoring status of a thin pool LV can be displayed
with the command lvs -o+seg_monitor.
@@ -777,7 +777,7 @@ system. This can result in file system corruption for non-journaled file
systems that may require fsck. When a thin pool returns errors for writes
to a thin LV, any file system is subject to losing unsynced user data.
The 60 second timeout can be changed or disabled with the dm\-thin\-pool
The 60 second timeout can be changed or disabled with the dm-thin-pool
kernel module option
.B no_space_timeout.
This option sets the number of seconds that thin pools will queue writes.
@@ -836,7 +836,7 @@ When metadata space is exhausted, the lvs command displays 100 under Meta%
for the thin pool LV:
.nf
# lvs \-o lv_name,size,data_percent,metadata_percent vg/pool0
# lvs -o lv_name,size,data_percent,metadata_percent vg/pool0
LV LSize Data% Meta%
pool0 100.00
.fi
@@ -850,11 +850,11 @@ repair.
1. Deactivate the thin pool LV, or reboot the system if this is not possible.
2. Repair thin pool with lvconvert \-\-repair.
2. Repair thin pool with lvconvert --repair.
.br
See "Metadata check and repair".
3. Extend pool metadata space with lvextend \-\-poolmetadatasize.
3. Extend pool metadata space with lvextend --poolmetadatasize.
.br
See "Manually manage free metadata space of a thin pool LV".
@@ -872,7 +872,7 @@ these presets. (See "Automatically extend thin pool LV".)
Command to extend a thin pool data LV using presets:
.br
.B lvextend \-\-use\-policies VG/ThinPoolLV
.B lvextend --use-policies VG/ThinPoolLV
The command uses these settings:
@@ -888,12 +888,12 @@ autoextend the LV by this much additional space.
To see the default values of these settings, run:
.B lvmconfig \-\-type default \-\-withcomment
.B lvmconfig --type default --withcomment
.RS
.B activation/thin_pool_autoextend_threshold
.RE
.B lvmconfig \-\-type default \-\-withcomment
.B lvmconfig --type default --withcomment
.RS
.B activation/thin_pool_autoextend_percent
.RE
@@ -919,12 +919,12 @@ For the profile_dir location, run:
.IP \[bu] 2
Attach the profile to an LV, using the command:
.br
.B lvchange \-\-metadataprofile ProfileName VG/ThinPoolLV
.B lvchange --metadataprofile ProfileName VG/ThinPoolLV
.IP \[bu] 2
Extend the LV using the profile settings:
.br
.B lvextend \-\-use\-policies VG/ThinPoolLV
.B lvextend --use-policies VG/ThinPoolLV
.P
@@ -954,7 +954,7 @@ file with the profile also needs to be moved.
.IP \[bu] 2
Only certain settings can be used in a VG or LV profile, see:
.br
.B lvmconfig \-\-type profilable-metadata.
.B lvmconfig --type profilable-metadata.
.IP \[bu] 2
An LV without a profile of its own will inherit the VG profile.
@@ -967,9 +967,9 @@ Remove a profile from an LV using the command:
.IP \[bu] 2
Commands can also have profiles applied to them. The settings that can be
applied to a command are different than the settings that can be applied
to a VG or LV. See lvmconfig \-\-type profilable\-command. To apply a
to a VG or LV. See lvmconfig --type profilable-command. To apply a
profile to a command, write a profile, save it in the profile directory,
and run the command using the option: \-\-commandprofile ProfileName.
and run the command using the option: --commandprofile ProfileName.
.SS Zeroing
@@ -978,20 +978,20 @@ and run the command using the option: \-\-commandprofile ProfileName.
When a thin pool provisions a new data block for a thin LV, the
new block is first overwritten with zeros. The zeroing mode is
indicated by the "z" attribute displayed by lvs. The option \-Z
(or \-\-zero) can be added to commands to specify the zeroing mode.
indicated by the "z" attribute displayed by lvs. The option -Z
(or --zero) can be added to commands to specify the zeroing mode.
Command to set the zeroing mode when creating a thin pool LV:
.br
.B lvconvert \-\-type thin\-pool \-Z{y|n}
.B lvconvert --type thin-pool -Z{y|n}
.br
.RS
.B \-\-poolmetadata VG/ThinMetaLV VG/ThinDataLV
.B --poolmetadata VG/ThinMetaLV VG/ThinDataLV
.RE
Command to change the zeroing mode of an existing thin pool LV:
.br
.B lvchange \-Z{y|n} VG/ThinPoolLV
.B lvchange -Z{y|n} VG/ThinPoolLV
If zeroing mode is changed from "n" to "y", previously provisioned
blocks are not zeroed.
@@ -1024,27 +1024,27 @@ mode.
Command to display the current discard mode of a thin pool LV:
.br
.B lvs \-o+discards VG/ThinPoolLV
.B lvs -o+discards VG/ThinPoolLV
Command to set the discard mode when creating a thin pool LV:
.br
.B lvconvert \-\-discards {ignore|nopassdown|passdown}
.B lvconvert --discards {ignore|nopassdown|passdown}
.br
.RS
.B \-\-type thin\-pool \-\-poolmetadata VG/ThinMetaLV VG/ThinDataLV
.B --type thin-pool --poolmetadata VG/ThinMetaLV VG/ThinDataLV
.RE
Command to change the discard mode of an existing thin pool LV:
.br
.B lvchange \-\-discards {ignore|nopassdown|passdown} VG/ThinPoolLV
.B lvchange --discards {ignore|nopassdown|passdown} VG/ThinPoolLV
.I Example
.br
.nf
# lvs \-o name,discards vg/pool0
# lvs -o name,discards vg/pool0
pool0 passdown
# lvchange \-\-discards ignore vg/pool0
# lvchange --discards ignore vg/pool0
.fi
.BR lvm.conf (5)
@@ -1058,7 +1058,7 @@ controls the default discards mode used when creating a thin pool.
\&
The size of data blocks managed by a thin pool can be specified with the
\-\-chunksize option when the thin pool LV is created. The default unit
--chunksize option when the thin pool LV is created. The default unit
is KiB. The value must be a multiple of 64KiB between 64KiB and 1GiB.
When a thin pool is used primarily for the thin provisioning feature, a
@@ -1067,12 +1067,12 @@ reduces copying time and consumes less space.
Command to display the thin pool LV chunk size:
.br
.B lvs \-o+chunksize VG/ThinPoolLV
.B lvs -o+chunksize VG/ThinPoolLV
.I Example
.br
.nf
# lvs \-o name,chunksize
# lvs -o name,chunksize
pool0 64.00k
.fi
@@ -1083,7 +1083,7 @@ controls the default chunk size used when creating a thin pool.
The default value is shown by:
.br
.B lvmconfig \-\-type default allocation/thin_pool_chunk_size
.B lvmconfig --type default allocation/thin_pool_chunk_size
.SS Size of pool metadata LV
@@ -1096,10 +1096,10 @@ need a larger metadata LV. Thin pool metadata LV sizes can be from 2MiB
to 16GiB.
When using lvcreate to create what will become a thin metadata LV, the
size is specified with the \-L|\-\-size option.
size is specified with the -L|--size option.
When an LVM command automatically creates a thin metadata LV, the size is
specified with the \-\-poolmetadatasize option. When this option is not
specified with the --poolmetadatasize option. When this option is not
given, LVM automatically chooses a size based on the data size and chunk
size.
@@ -1119,14 +1119,14 @@ to take thin snapshots of external, read only LVs. Writes to the
snapshot are stored in the thin pool, and the external LV is used
to read unwritten parts of the thin snapshot.
.B lvcreate \-n SnapLV \-s VG/ExternalOriginLV \-\-thinpool VG/ThinPoolLV
.B lvcreate -n SnapLV -s VG/ExternalOriginLV --thinpool VG/ThinPoolLV
.I Example
.br
.nf
# lvchange \-an vg/lve
# lvchange \-\-permission r vg/lve
# lvcreate \-n snaplve \-s vg/lve \-\-thinpool vg/pool0
# lvchange -an vg/lve
# lvchange --permission r vg/lve
# lvcreate -n snaplve -s vg/lve --thinpool vg/pool0
# lvs vg/lve vg/snaplve
LV VG Attr LSize Pool Origin Data%
@@ -1144,29 +1144,29 @@ standard LV. At the same time, the existing LV is converted to a
read only external LV with a new name. Unwritten portions of the
thin LV are read from the external LV.
The new name given to the existing LV can be specified with
\-\-originname, otherwise the existing LV will be given a default
--originname, otherwise the existing LV will be given a default
name, e.g. lvol#.
Convert ExampleLV into a read only external LV with the new name
NewExternalOriginLV, and create a new thin LV that is given the previous
name of ExampleLV.
.B lvconvert \-\-type thin \-\-thinpool VG/ThinPoolLV
.B lvconvert --type thin --thinpool VG/ThinPoolLV
.br
.RS
.B \-\-originname NewExternalOriginLV VG/ExampleLV
.B --originname NewExternalOriginLV VG/ExampleLV
.RE
.I Example
.br
.nf
# lvcreate \-n lv_example \-L 10G vg
# lvcreate -n lv_example -L 10G vg
# lvs
lv_example vg -wi-a----- 10.00g
# lvconvert \-\-type thin \-\-thinpool vg/pool0
\-\-originname lv_external \-\-thin vg/lv_example
# lvconvert --type thin --thinpool vg/pool0
--originname lv_external --thin vg/lv_example
# lvs
LV VG Attr LSize Pool Origin
@@ -1184,18 +1184,18 @@ rather than using lvconvert on existing LVs.
This one command creates a thin data LV, a thin metadata LV,
and combines the two into a thin pool LV.
.B lvcreate \-\-type thin\-pool \-L LargeSize \-n ThinPoolLV VG
.B lvcreate --type thin-pool -L LargeSize -n ThinPoolLV VG
.I Example
.br
.nf
# lvcreate \-\-type thin\-pool \-L8M -n pool0 vg
# lvcreate --type thin-pool -L8M -n pool0 vg
# lvs vg/pool0
LV VG Attr LSize Pool Origin Data%
pool0 vg twi-a-tz-- 8.00m 0.00
# lvs \-a
# lvs -a
pool0 vg twi-a-tz-- 8.00m
[pool0_tdata] vg Twi-ao---- 8.00m
[pool0_tmeta] vg ewi-ao---- 8.00m
@@ -1211,27 +1211,27 @@ lvcreate command. This one command creates a thin data LV,
a thin metadata LV, combines the two into a thin pool LV,
and creates a thin LV in the new pool.
.br
\-L LargeSize specifies the physical size of the thin pool LV.
-L LargeSize specifies the physical size of the thin pool LV.
.br
\-V VirtualSize specifies the virtual size of the thin LV.
-V VirtualSize specifies the virtual size of the thin LV.
.B lvcreate \-\-type thin \-V VirtualSize \-L LargeSize
.B lvcreate --type thin -V VirtualSize -L LargeSize
.RS
.B \-n ThinLV \-\-thinpool VG/ThinPoolLV
.B -n ThinLV --thinpool VG/ThinPoolLV
.RE
Equivalent to:
.br
.B lvcreate \-\-type thin\-pool \-L LargeSize VG/ThinPoolLV
.B lvcreate --type thin-pool -L LargeSize VG/ThinPoolLV
.br
.B lvcreate \-n ThinLV \-V VirtualSize \-\-thinpool VG/ThinPoolLV
.B lvcreate -n ThinLV -V VirtualSize --thinpool VG/ThinPoolLV
.I Example
.br
.nf
# lvcreate \-L8M \-V2G \-n thin1 \-\-thinpool vg/pool0
# lvcreate -L8M -V2G -n thin1 --thinpool vg/pool0
# lvs \-a
# lvs -a
pool0 vg twi-a-tz-- 8.00m
[pool0_tdata] vg Twi-ao---- 8.00m
[pool0_tmeta] vg ewi-ao---- 8.00m
@@ -1244,7 +1244,7 @@ Equivalent to:
\&
A thin snapshot can be merged into its origin thin LV using the lvconvert
\-\-merge command. The result of a snapshot merge is that the origin thin
--merge command. The result of a snapshot merge is that the origin thin
LV takes the content of the snapshot LV, and the snapshot LV is removed.
Any content that was unique to the origin thin LV is lost after the merge.
@@ -1253,7 +1253,7 @@ LVs are open, e.g. mounted. If a merge is initiated while the LVs are open,
the effect of the merge is delayed until the origin thin LV is next
activated.
.B lvconvert \-\-merge VG/SnapLV
.B lvconvert --merge VG/SnapLV
.I Example
.br
@@ -1264,7 +1264,7 @@ activated.
thin1 vg Vwi-a-tz-- 100.00g pool0
thin1s1 vg Vwi-a-tz-k 100.00g pool0 thin1
# lvconvert \-\-merge vg/thin1s1
# lvconvert --merge vg/thin1s1
# lvs vg
LV VG Attr LSize Pool Origin
@@ -1292,7 +1292,7 @@ file1 file2 file3
# ls /mnt/Xs
file3 file4 file5
# lvconvert \-\-merge vg/thin1s1
# lvconvert --merge vg/thin1s1
Logical volume vg/thin1s1 contains a filesystem in use.
Delaying merge since snapshot is open.
Merging of thin snapshot thin1s1 will occur on next activation.
@@ -1300,7 +1300,7 @@ Merging of thin snapshot thin1s1 will occur on next activation.
# umount /mnt/X
# umount /mnt/Xs
# lvs \-a vg
# lvs -a vg
LV VG Attr LSize Pool Origin
pool0 vg twi-a-tz-- 10.00g
[pool0_tdata] vg Twi-ao---- 10.00g
@@ -1308,8 +1308,8 @@ Merging of thin snapshot thin1s1 will occur on next activation.
thin1 vg Owi-a-tz-- 100.00g pool0
[thin1s1] vg Swi-a-tz-k 100.00g pool0 thin1
# lvchange \-an vg/thin1
# lvchange \-ay vg/thin1
# lvchange -an vg/thin1
# lvchange -ay vg/thin1
# mount /dev/vg/thin1 /mnt/X
@@ -1330,18 +1330,18 @@ file system on the origin LV.
If the snapshot LV is writable, mounting will recover the log to clear the
dummy transaction, but will require skipping the uuid check:
mount /dev/VG/SnapLV /mnt \-o nouuid
mount /dev/VG/SnapLV /mnt -o nouuid
Or, the uuid can be changed on disk before mounting:
xfs_admin \-U generate /dev/VG/SnapLV
xfs_admin -U generate /dev/VG/SnapLV
.br
mount /dev/VG/SnapLV /mnt
If the snapshot LV is readonly, the log recovery and uuid check need to be
skipped while mounting readonly:
mount /dev/VG/SnapLV /mnt \-o ro,nouuid,norecovery
mount /dev/VG/SnapLV /mnt -o ro,nouuid,norecovery
.SH SEE ALSO
.BR lvm (8),

View File

@@ -1,5 +1,5 @@
lvreduce reduces the size of an LV. The freed logical extents are returned
to the VG to be used by other LVs. A copy\-on\-write snapshot LV can also
to the VG to be used by other LVs. A copy-on-write snapshot LV can also
be reduced if less space is needed to hold COW blocks. Use
\fBlvconvert\fP(8) to change the number of data images in a RAID or
mirrored LV.

View File

@@ -2,4 +2,4 @@
Reduce the size of an LV by 3 logical extents:
.br
.B lvreduce \-l \-3 vg00/lvol1
.B lvreduce -l -3 vg00/lvol1

View File

@@ -1,6 +1,6 @@
.TH LVREDUCE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVREDUCE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvreduce \- Reduce the size of a logical volume
lvreduce - Reduce the size of a logical volume
.
.SH SYNOPSIS
\fBlvreduce\fP \fIoption_args\fP \fIposition_args\fP
@@ -9,7 +9,7 @@ lvreduce \- Reduce the size of a logical volume
.br
.SH DESCRIPTION
lvreduce reduces the size of an LV. The freed logical extents are returned
to the VG to be used by other LVs. A copy\-on\-write snapshot LV can also
to the VG to be used by other LVs. A copy-on-write snapshot LV can also
be reduced if less space is needed to hold COW blocks. Use
\fBlvconvert\fP(8) to change the number of data images in a RAID or
mirrored LV.
@@ -314,7 +314,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
Reduce the size of an LV by 3 logical extents:
.br
.B lvreduce \-l \-3 vg00/lvol1
.B lvreduce -l -3 vg00/lvol1
.SH SEE ALSO
.BR lvm (8)

View File

@@ -1,7 +1,7 @@
.SH EXAMPLES
Remove an active LV without asking for confirmation.
.br
.B lvremove \-f vg00/lvol1
.B lvremove -f vg00/lvol1
Remove all LVs the specified VG.
.br

View File

@@ -1,6 +1,6 @@
.TH LVREMOVE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVREMOVE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvremove \- Remove logical volume(s) from the system
lvremove - Remove logical volume(s) from the system
.
.SH SYNOPSIS
\fBlvremove\fP \fIposition_args\fP
@@ -304,7 +304,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.SH EXAMPLES
Remove an active LV without asking for confirmation.
.br
.B lvremove \-f vg00/lvol1
.B lvremove -f vg00/lvol1
Remove all LVs the specified VG.
.br

View File

@@ -1,6 +1,6 @@
.TH LVRENAME 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVRENAME 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvrename \- Rename a logical volume
lvrename - Rename a logical volume
.
.SH SYNOPSIS
\fBlvrename\fP \fIposition_args\fP

View File

@@ -2,4 +2,4 @@
Extend an LV by 16MB using specific physical extents:
.br
.B lvresize \-L+16M vg1/lv1 /dev/sda:0\-1 /dev/sdb:0\-1
.B lvresize -L+16M vg1/lv1 /dev/sda:0-1 /dev/sdb:0-1

View File

@@ -1,6 +1,6 @@
.TH LVRESIZE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVRESIZE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvresize \- Resize a logical volume
lvresize - Resize a logical volume
.
.SH SYNOPSIS
\fBlvresize\fP \fIoption_args\fP \fIposition_args\fP
@@ -470,7 +470,7 @@ When creating a RAID 4/5/6 LV, this number does not include the extra
devices that are required for parity. The largest number depends on
the RAID type (raid0: 64, raid10: 32, raid4/5: 63, raid6: 62), and
when unspecified, the default depends on the RAID type
(raid0: 2, raid10: 4, raid4/5: 3, raid6: 5.)
(raid0: 2, raid10: 2, raid4/5: 3, raid6: 5.)
To stripe a new raid LV across all PVs by default,
see lvm.conf allocation/raid_stripe_all_devices.
.ad b
@@ -569,7 +569,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
Extend an LV by 16MB using specific physical extents:
.br
.B lvresize \-L+16M vg1/lv1 /dev/sda:0\-1 /dev/sdb:0\-1
.B lvresize -L+16M vg1/lv1 /dev/sda:0-1 /dev/sdb:0-1
.SH SEE ALSO
.BR lvm (8)

View File

@@ -1,6 +1,6 @@
.TH LVS 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVS 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvs \- Display information about logical volumes
lvs - Display information about logical volumes
.
.SH SYNOPSIS
\fBlvs\fP
@@ -28,10 +28,6 @@ lvs produces formatted output about LVs.
.ad b
.br
.ad l
[ \fB-P\fP|\fB--partial\fP ]
.ad b
.br
.ad l
[ \fB-S\fP|\fB--select\fP \fIString\fP ]
.ad b
.br
@@ -339,15 +335,6 @@ See lvmreport(7) for more information about reporting.
.ad b
.HP
.ad l
\fB-P\fP|\fB--partial\fP
.br
When set, the tools will do their best to provide access to VGs
that are only partially available (one or more PVs belonging
to the VG are missing from the system). Metadata may not be
changed with this option.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending

View File

@@ -1,6 +1,6 @@
.TH LVSCAN 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH LVSCAN 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
lvscan \- List all logical volumes in all volume groups
lvscan - List all logical volumes in all volume groups
.
.SH SYNOPSIS
\fBlvscan\fP \fIoption_args\fP
@@ -45,10 +45,6 @@ Common options for command:
.ad b
.br
.ad l
[ \fB-P\fP|\fB--partial\fP ]
.ad b
.br
.ad l
[ \fB--ignorelockingfailure\fP ]
.ad b
.br
@@ -184,15 +180,6 @@ Display long help text.
.ad b
.HP
.ad l
\fB-P\fP|\fB--partial\fP
.br
When set, the tools will do their best to provide access to VGs
that are only partially available (one or more PVs belonging
to the VG are missing from the system). Metadata may not be
changed with this option.
.ad b
.HP
.ad l
\fB--profile\fP \fIString\fP
.br
An alias for --commandprofile or --metadataprofile, depending

View File

@@ -3,4 +3,4 @@
Disallow the allocation of physical extents on a PV (e.g. because of
disk errors, or because it will be removed after freeing it).
.br
.B pvchange \-x n /dev/sdk1
.B pvchange -x n /dev/sdk1

View File

@@ -1,6 +1,6 @@
.TH PVCHANGE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH PVCHANGE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvchange \- Change attributes of physical volume(s)
pvchange - Change attributes of physical volume(s)
.
.SH SYNOPSIS
\fBpvchange\fP \fIoption_args\fP \fIposition_args\fP
@@ -369,7 +369,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
Disallow the allocation of physical extents on a PV (e.g. because of
disk errors, or because it will be removed after freeing it).
.br
.B pvchange \-x n /dev/sdk1
.B pvchange -x n /dev/sdk1
.SH SEE ALSO
.BR lvm (8)

View File

@@ -2,7 +2,7 @@
If the partition table is corrupted or lost on /dev/sda, and you suspect
there was an LVM partition at approximately 100 MiB, then this
area of the disk can be scanned using the \fB\-\-labelsector\fP
area of the disk can be scanned using the \fB--labelsector\fP
parameter with a value of 204800 (100 * 1024 * 1024 / 512 = 204800).
.br
.B pvck \-\-labelsector 204800 /dev/sda
.B pvck --labelsector 204800 /dev/sda

View File

@@ -1,6 +1,6 @@
.TH PVCK 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH PVCK 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvck \- Check the consistency of physical volume(s)
pvck - Check the consistency of physical volume(s)
.
.SH SYNOPSIS
\fBpvck\fP \fIposition_args\fP
@@ -204,10 +204,10 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
If the partition table is corrupted or lost on /dev/sda, and you suspect
there was an LVM partition at approximately 100 MiB, then this
area of the disk can be scanned using the \fB\-\-labelsector\fP
area of the disk can be scanned using the \fB--labelsector\fP
parameter with a value of 204800 (100 * 1024 * 1024 / 512 = 204800).
.br
.B pvck \-\-labelsector 204800 /dev/sda
.B pvck --labelsector 204800 /dev/sda
.SH SEE ALSO
.BR lvm (8)

View File

@@ -9,4 +9,4 @@ partitioning (sector 7 is the lowest aligned logical block, the 4KiB
sectors start at LBA -1, and consequently sector 63 is aligned on a 4KiB
boundary) manually account for this when initializing for use by LVM.
.br
.B pvcreate \-\-dataalignmentoffset 7s /dev/sdb
.B pvcreate --dataalignmentoffset 7s /dev/sdb

View File

@@ -1,6 +1,6 @@
.TH PVCREATE 8 "LVM TOOLS 2.02.169(2)-git (2016-11-30)" "Red Hat, Inc."
.TH PVCREATE 8 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.SH NAME
pvcreate \- Initialize physical volume(s) for use by LVM
pvcreate - Initialize physical volume(s) for use by LVM
.
.SH SYNOPSIS
\fBpvcreate\fP \fIposition_args\fP
@@ -420,7 +420,7 @@ partitioning (sector 7 is the lowest aligned logical block, the 4KiB
sectors start at LBA -1, and consequently sector 63 is aligned on a 4KiB
boundary) manually account for this when initializing for use by LVM.
.br
.B pvcreate \-\-dataalignmentoffset 7s /dev/sdb
.B pvcreate --dataalignmentoffset 7s /dev/sdb
.SH SEE ALSO
.BR lvm (8)

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