1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +03:00
Commit Graph

531 Commits

Author SHA1 Message Date
Zdenek Kabelac
630fcab420 man: show lv name for lvs
Make it more obvious that either just vg name or lv name or path could
be passed as an argument.
2014-08-15 15:06:44 +02:00
Petr Rockai
ab1887fe47 man: Update the lvscan manpage with a section on --cache. 2014-07-22 22:48:41 +02:00
Zdenek Kabelac
b51f1b3df6 man: lvconvert poolmetadataspare
Add missing description for --poolmetadataspare option.
2014-07-22 22:41:41 +02:00
David Teigland
864ff3cb18 man: rework lvmcache to match lvmthin
Reorganize and rewrite parts to match lvmthin(7).
2014-07-22 15:12:02 -05:00
David Teigland
fe5b282a4a man: lvmcache updates
- use the lvconvert --cachepool syntax to match the lvmthin style
- rewrite removal information
- very minor formatting adjustments
2014-07-21 15:41:42 -05:00
David Teigland
1fe487043d man: use macros for indenting in lvmthin 2014-07-21 10:28:20 -05:00
David Teigland
3e4f24115a man: lvmthin fix line breaks
The html rendering inserted some unpleasant line breaks,
so insert better breaks explicitly.
2014-07-11 15:15:03 -05:00
Zdenek Kabelac
c0ebe78ef8 lvconvert: fix mirror path
lvconvert rewrite commit missed proper handling
of mirror path for --corelog and --mirrorlog options.
Document this even in man page.
2014-07-11 14:12:35 +02:00
Zdenek Kabelac
4bbfac359c man: lvconvert update
Update lvconvert doc for conversion of pools
(thin and cache pools and volumes)

Various more cleanups.
2014-07-11 13:32:23 +02:00
Jonathan Brassow
be75076dfc activation: Add "degraded" activation mode
Currently, we have two modes of activation, an unnamed nominal mode
(which I will refer to as "complete") and "partial" mode.  The
"complete" mode requires that a volume group be 'complete' - that
is, no missing PVs.  If there are any missing PVs, no affected LVs
are allowed to activate - even RAID LVs which might be able to
tolerate a failure.  The "partial" mode allows anything to be
activated (or at least attempted).  If a non-redundant LV is
missing a portion of its addressable space due to a device failure,
it will be replaced with an error target.  RAID LVs will either
activate or fail to activate depending on how badly their
redundancy is compromised.

This patch adds a third option, "degraded" mode.  This mode can
be selected via the '--activationmode {complete|degraded|partial}'
option to lvchange/vgchange.  It can also be set in lvm.conf.
The "degraded" activation mode allows RAID LVs with a sufficient
level of redundancy to activate (e.g. a RAID5 LV with one device
failure, a RAID6 with two device failures, or RAID1 with n-1
failures).  RAID LVs with too many device failures are not allowed
to activate - nor are any non-redundant LVs that may have been
affected.  This patch also makes the "degraded" mode the default
activation mode.

The degraded activation mode does not yet work in a cluster.  A
new cluster lock flag (LCK_DEGRADED_MODE) will need to be created
to make that work.  Currently, there is limited space for this
extra flag and I am looking for possible solutions.  One possible
solution is to usurp LCK_CONVERT, as it is not used.  When the
locking_type is 3, the degraded mode flag simply gets dropped and
the old ("complete") behavior is exhibited.
2014-07-09 22:56:11 -05:00
Peter Rajnoha
da545ce3b4 tools: add --binary arg to pvs,vgs,lvs and {pv,vg,lv}display -C and report/binary_values_as_numeric lvm.conf option
The --binary option, if used, causes all the binary values reported
in reporting commands to be displayed as "0" or "1" instead of descriptive
literal values (value "unknown" is still used for values that could not be
determined).

Also, add report/binary_values_as_numeric lvm.conf option with the same
functionality as the --binary option (the --binary option prevails
if both --binary cmd option and report/binary_values_as_numeric lvm.conf
option is used at the same time). The report/binary_values_as_numeric is
also profilable.

This makes it easier to use and check lvm reporting command output in scripts.
2014-07-04 15:40:17 +02:00
Zdenek Kabelac
eadcea2dae thin: repaired LV uses _meta%d
Don't leave 'regular' LV with reserved suffix for a user.
After succefull repair use 'normal' (non-reserved) LV name
for backup of original metadata.
2014-06-30 12:15:13 +02:00
Peter Rajnoha
b41aa985d7 man: do not mention '(i)nherited' for alloc policy in vg_attr field
VG has nothing to inherit from...
2014-06-26 15:15:10 +02:00
Alasdair G Kergon
867b92b031 man: More /dev/vg and /dev/mapper documentation. 2014-06-23 14:01:31 +01:00
David Teigland
e96a4856e6 man: lvmthin
Clean up inconsistencies in the last change.
Improve some bad formatting.
2014-06-18 14:30:57 -05:00
Peter Rajnoha
fc6e2a703b man: add man page entry for dmsetup info -c -S/--select + minor cleanups 2014-06-18 13:48:27 +02:00
Jonathan Brassow
5ebff6cc9f pvmove: Enable all-or-nothing (atomic) pvmoves
pvmove can be used to move single LVs by name or multiple LVs that
lie within the specified PV range (e.g. /dev/sdb1:0-1000).  When
moving more than one LV, the portions of those LVs that are in the
range to be moved are added to a new temporary pvmove LV.  The LVs
then point to the range in the pvmove LV, rather than the PV
range.

Example 1:
	We have two LVs in this example.  After they were
	created, the first LV was grown, yeilding two segments
	in LV1.  So, there are two LVs with a total of three
	segments.

	Before pvmove:
	      ---------  ---------   ---------
	      | LV1s0 |  | LV2s0 |   | LV1s1 |
	      ---------  ---------   ---------
	         |           |           |
	   -------------------------------------
	PV | 000 - 255 | 256 - 511 | 512 - 767 |
	   -------------------------------------

	After pvmove inserts the temporary pvmove LV:
	          ---------   ---------   ---------
	          | LV1s0 |   | LV2s0 |   | LV1s1 |
	          ---------   ---------   ---------
	              |           |           |
	        -------------------------------------
	pvmove0 |   seg 0   |   seg 1   |   seg 2   |
	        -------------------------------------
	              |           |           |
	        -------------------------------------
	PV      | 000 - 255 | 256 - 511 | 512 - 767 |
	        -------------------------------------

	Each of the affected LV segments now point to a
	range of blocks in the pvmove LV, which purposefully
	corresponds to the segments moved from the original
	LVs into the temporary pvmove LV.

The current implementation goes on from here to mirror the temporary
pvmove LV by segment.  Further, as the pvmove LV is activated, only
one of its segments is actually mirrored (i.e. "moving") at a time.
The rest are either complete or not addressed yet.  If the pvmove
is aborted, those segments that are completed will remain on the
destination and those that are not yet addressed or in the process
of moving will stay on the source PV.  Thus, it is possible to have
a partially completed move - some LVs (or certain segments of LVs)
on the source PV and some on the destination.

Example 2:
	What 'example 1' might look if it was half-way
	through the move.
	             ---------   ---------   ---------
	             | LV1s0 |   | LV2s0 |   | LV1s1 |
	             ---------   ---------   ---------
	                 |           |           |
	           -------------------------------------
	pvmove0    |   seg 0   |   seg 1   |   seg 2   |
	           -------------------------------------
	                 |           |           |
	                 |     -------------------------
	source PV        |     | 256 - 511 | 512 - 767 |
	                 |     -------------------------
	                 |           ||
	           -------------------------
	dest PV    | 000 - 255 | 256 - 511 |
	           -------------------------

This update allows the user to specify that they would like the
pvmove mirror created "by LV" rather than "by segment".  That is,
the pvmove LV becomes an image in an encapsulating mirror along
with the allocated copy image.

Example 3:
	A pvmove that is performed "by LV" rather than "by segment".

	                   ---------   ---------
	                   | LV1s0 |   | LV2s0 |
	                   ---------   ---------
	                       |           |
	                 -------------------------
	        pvmove0  |  * LV-level mirror *  |
	                 -------------------------
                             /                \
	   pvmove_mimage0   /          pvmove_mimage1
	   -------------------------   -------------------------
	   |   seg 0   |   seg 1   |   |   seg 0   |   seg 1   |
	   -------------------------   -------------------------
	        |            |               |           |
	   -------------------------   -------------------------
	   | 000 - 255 | 256 - 511 |   | 000 - 255 | 256 - 511 |
	   -------------------------   -------------------------
	           source PV                    dest PV

The thing that differentiates a pvmove done in this way and a simple
"up-convert" from linear to mirror is the preservation of the
distinct segments.  A normal up-convert would simply allocate the
necessary space with no regard for segment boundaries.  The pvmove
operation must preserve the segments because they are the critical
boundary between the segments of the LVs being moved.  So, when the
pvmove copy image is allocated, all corresponding segments must be
allocated.  The code that merges ajoining segments that are part of
the same LV when the metadata is written must also be avoided in
this case.  This method of mirroring is unique enough to warrant its
own definitional macro, MIRROR_BY_SEGMENTED_LV.  This joins the two
existing macros: MIRROR_BY_SEG (for original pvmove) and MIRROR_BY_LV
(for user created mirrors).

The advantages of performing pvmove in this way is that all of the
LVs affected can be moved together.  It is an all-or-nothing approach
that leaves all LV segments on the source PV if the move is aborted.
Additionally, a mirror log can be used (in the future) to provide tracking
of progress; allowing the copy to continue where it left off in the event
there is a deactivation.
2014-06-17 22:59:36 -05:00
Peter Rajnoha
94316dfe9d report: select: add man pages for report selection feature 2014-06-17 16:27:21 +02:00
Zdenek Kabelac
494db11004 snapshot: %ORIGIN is relative to data size
Let's use the size of origin as the real base for percenta calculation,
and 'silenly' add needed metadata space for snapshot.

So now command   'lvcreate -s -l100%ORIGIN vg/lv' should always create a
snapshot to handle full device overwrite.
2014-06-17 13:41:01 +02:00
Zdenek Kabelac
cd6d6fc24e snapshot: report proper error message
Expresing -lXX%LV is not valid for snapshot, but error message for
snapshost case was not complete and missed %ORIGIN.
Also document correct settings for in manpage properly where
it missed %PVS.
2014-06-17 13:36:33 +02:00
Zdenek Kabelac
f845afe7cf man: dmsetup manglename
More updates to manglename option.
Add reference to LVM2 resource page, since for a long time,
this is the right places for sources for libdevmapper....
2014-06-11 11:11:10 +02:00
Zdenek Kabelac
4db71422a2 man: kiB uppercase 2014-06-11 11:10:56 +02:00
Zdenek Kabelac
d13efac51b man: update lvmthin
Improve graphics form of page and use shorter correct and suggested
forms of thin pool manipulation commands.
2014-06-11 11:10:55 +02:00
Zdenek Kabelac
e156837636 man: more compliant 2014-06-11 11:10:55 +02:00
Zdenek Kabelac
0896987633 man: properly escape -
Dash should be using '\' to be typographically correct.
2014-06-11 11:10:55 +02:00
Zdenek Kabelac
4956091027 man: use bullets 2014-06-11 11:10:55 +02:00
Zdenek Kabelac
d2b60c6e35 man: advertise lvmcache, lvmthin
Add references to new man pages so they get known.
2014-06-11 11:10:54 +02:00
Zdenek Kabelac
93c2614e56 man: document DM_DEFAULT_NAME_MANGLING_MODE
Document DM_DEFAULT_NAME_MANGLING_MODE environmental variable.
(its default setting is build time configurable)
2014-06-05 17:47:21 +02:00
Zdenek Kabelac
965592340d man: cleanup dmsetup
Add few bold texts.
2014-05-26 22:57:20 +02:00
Zdenek Kabelac
3cb2658fb7 dmsetup: add warning
Warn when --udevcookie/DM_UDEV_COOKIE is used with 'dmsetup remove --force'.

When command is doing multiple ioctl operations on a single device,
it may invoke udev activity, that is colliding with further ioctl commands.
The result of such operation becomes unpredictable.
Use of --retry could partially help...
2014-05-26 22:56:30 +02:00
Zdenek Kabelac
496953fb39 cleanup: use y/n instead of y|n
Use same for of yes no query everywhere.
2014-05-22 12:01:43 +02:00
Peter Rajnoha
092659644a man: missing space between option name and value name 2014-05-21 15:51:28 +02:00
Peter Rajnoha
e78092fa3a man: more man page updates for --commandprofile and --metadataprofile split 2014-05-21 14:53:56 +02:00
Peter Rajnoha
b7431f69ed man: update lvm.conf man page for latest changes 2014-05-21 13:25:09 +02:00
Peter Rajnoha
97c91b020e man: update dumpconfig man page for latest changes 2014-05-21 11:01:19 +02:00
Zdenek Kabelac
1ddc68ccd7 man: call installers only when there are set vars.
When MAN7, MAN8CLUSTER or MAN8SYSTEMD_GENERATORS would be empty,
don't call respective INSTALL tools.
On older systems they even generate error causing abort
of makefile target.
2014-05-21 10:52:33 +02:00
Zdenek Kabelac
65b3fe9b05 man: cleanup style 2014-05-20 21:50:28 +02:00
Zdenek Kabelac
477351fc4d man: lvmcache
separate man page for lvm cache
2014-05-18 20:09:47 +02:00
Zdenek Kabelac
b73a786755 man: lvmcache
Migrate cache description into  man(7) entry
(like lvmthin).
2014-05-15 12:13:24 +02:00
Zdenek Kabelac
11bedf1baf display: print skipped prompt
Since decisions in the silent mode may not be always obvious,
print skipped prompt with answer 'n'.

Also document  '-qq' behaviour (single -q only shuts
logging, while -qq sets silent mode).
2014-05-15 12:11:35 +02:00
Zdenek Kabelac
309201a53b man:misc updates 2014-05-15 12:08:35 +02:00
David Teigland
42d7409da2 man: lvmthin cover snapshot merge and xfs
also fix a couple inconsistent example values.
2014-05-14 15:15:35 -05:00
David Teigland
044b796800 man: more lvmthin discard references
and some fixes from Tom.
2014-05-14 15:15:35 -05:00
Alasdair G Kergon
422b3b0fb5 man: Fix man7 dir dependency.
https://bugs.gentoo.org/510202
2014-05-13 11:18:13 +01:00
Peter Rajnoha
2b09def606 man: minor fixes in lvmetad man page
- better add reference to lvm dumpconfig --type default
   than stating that lvmetad is not enabled by default
 - substitute #DEFAULT_PID_DIR# with concrete value
2014-04-23 14:34:42 +02:00
Alasdair G Kergon
b5f8f452ac tools: Add --readonly support.
Offer lock-free access to display virtual machine or clustered VG metadata
while it might be in use.
2014-04-18 02:46:34 +01:00
Alasdair G Kergon
177ece01a9 reports: Use X for unknown LV attr when no dm.
It's safer not to tell people an LV is inactive when we aren't sure.
2014-04-18 02:23:39 +01:00
Peter Rajnoha
a6763c64a7 lvmdump: add -s to gather system info and context (currently systemd-related only)
This is sort of info we always ask people to retrieve when
inspecting problems in systemd environment so let's have this
as part of lvmdump directly.

The -s option does not need to be bound to systemd only. We could
add support for initscripts or any other system-wide/service tracking
info that can help us with debugging problems.
2014-04-15 15:27:30 +02:00
Zdenek Kabelac
db4cf30106 man: cleanup new params
Correcting cachemode args
2014-04-08 11:00:14 +02:00
David Teigland
2fd5c67f32 man: lvmthin clean up lvm.conf references 2014-04-04 09:51:56 -05:00