]> sourceware.org Git - lvm2.git/blame - man/pvmove.8.in
update reworded string
[lvm2.git] / man / pvmove.8.in
CommitLineData
5951ef33 1.TH PVMOVE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
f32e9b2f
AK
2.SH NAME
3pvmove \- move physical extents
4.SH SYNOPSIS
5.B pvmove
63bea03e
AK
6[\-\-abort]
7[\-\-alloc AllocationPolicy]
82dcb097 8[\-b|\-\-background]
c48b1005
PR
9[\-d|\-\-debug] [\-h|\-\-help] [\-i|\-\-interval Seconds]
10[\-\-noudevsync] [\-v|\-\-verbose] [\-n|\-\-name LogicalVolume]
9bd40d31 11[SourcePhysicalVolume[:PE[-PE]...] [DestinationPhysicalVolume[:PE[-PE]...]...]]
f32e9b2f
AK
12.SH DESCRIPTION
13.B pvmove
14allows you to move the allocated physical extents (PEs) on
15.I SourcePhysicalVolume
16to one or more other physical volumes (PVs).
17You can optionally specify a source
18.I LogicalVolume
19in which case only extents used by that LV will be moved to
20free (or specified) extents on
21.IR DestinationPhysicalVolume (s).
22If no
23.I DestinationPhysicalVolume
900a2676 24is specified, the normal allocation rules for the Volume Group are used.
f32e9b2f 25
5518374b
AK
26If \fBpvmove\fP gets interrupted for any reason (e.g. the machine crashes)
27then run \fBpvmove\fP again without any PhysicalVolume arguments to
05503c5e
AK
28restart any moves that were in progress from the last checkpoint.
29Alternatively use \fBpvmove --abort\fP at any time to abort them
30at the last checkpoint.
31
32You can run more than one pvmove at once provided they are moving data
33off different SourcePhysicalVolumes, but additional pvmoves will ignore
900a2676 34any Logical Volumes already in the process of being changed, so some
05503c5e
AK
35data might not get moved.
36
37\fBpvmove\fP works as follows:
38
900a2676 391. A temporary 'pvmove' Logical Volume is created to store
05503c5e
AK
40details of all the data movements required.
41
900a2676 422. Every Logical Volume in the Volume Group is searched
05503c5e
AK
43for contiguous data that need moving
44according to the command line arguments.
45For each piece of data found, a new segment is added to the end of the
46pvmove LV.
47This segment takes the form of a temporary mirror to copy the data
48from the original location to a newly-allocated location.
49The original LV is updated to use the new temporary mirror segment
50in the pvmove LV instead of accessing the data directly.
51
900a2676 523. The Volume Group metadata is updated on disk.
05503c5e 53
900a2676 544. The first segment of the pvmove Logical Volume is activated and starts
05503c5e
AK
55to mirror the first part of the data. Only one segment is mirrored at once
56as this is usually more efficient.
57
585. A daemon repeatedly checks progress at the specified time interval.
59When it detects that the first temporary mirror is in-sync,
60it breaks that mirror so that only the new location for that data gets used
900a2676 61and writes a checkpoint into the Volume Group metadata on disk.
05503c5e
AK
62Then it activates the mirror for the next segment of the pvmove LV.
63
646. When there are no more segments left to be mirrored,
900a2676
AK
65the temporary Logical Volume is removed and the Volume Group metadata
66is updated so that the Logical Volumes reflect the new data locations.
05503c5e
AK
67
68Note that this new process cannot support the original LVM1
69type of on-disk metadata. Metadata can be converted using \fBvgconvert\fP(8).
f32e9b2f 70
900a2676
AK
71N.B. The moving of mirrors, snapshots and their origins is not yet supported.
72
f32e9b2f
AK
73.SH OPTIONS
74.TP
5518374b 75.I \-\-abort
05503c5e
AK
76Abort any moves in progress.
77.TP
c48b1005
PR
78.I \-\-noudevsync
79Disable udev synchronisation. The
80process will not wait for notification from udev.
81It will continue irrespective of any possible udev processing
82in the background. You should only use this if udev is not running
83or has rules that ignore the devices LVM2 creates.
84.TP
d8ff86fd 85.I \-b, \-\-background
05503c5e 86Run the daemon in the background.
5518374b 87.TP
f32e9b2f
AK
88.I \-i, \-\-interval Seconds
89Report progress as a percentage at regular intervals.
90.TP
91.I \-n, \-\-name " \fILogicalVolume\fR"
92Move only the extents belonging to
93.I LogicalVolume
94from
95.I SourcePhysicalVolume
96instead of all allocated extents to the destination physical volume(s).
97
98.SH EXAMPLES
900a2676 99To move all Physical Extents that are used by simple Logical Volumes on
84d2039b 100.B /dev/sdb1
900a2676 101to free Physical Extents elsewhere in the Volume Group use:
f32e9b2f 102.sp
84d2039b
JEB
103\ pvmove /dev/sdb1
104.P
900a2676
AK
105Any mirrors, snapshots and their origins are left unchanged.
106.P
107Additionally, a specific destination device
108.B /dev/sdc1
109can be specified like this:
5951ef33 110.sp
84d2039b
JEB
111\ pvmove /dev/sdb1 /dev/sdc1
112.P
900a2676
AK
113To perform the action only on extents belonging to the single Logical Volume
114.B lvol1
115do this:
84d2039b
JEB
116.sp
117\ pvmove -n lvol1 /dev/sdb1 /dev/sdc1
118.P
119Rather than moving the contents of the entire device, it is possible to
900a2676
AK
120move a range of Physical Extents - for example numbers 1000 to 1999 inclusive on
121.B /dev/sdb1
122- like this:
84d2039b
JEB
123.sp
124\ pvmove /dev/sdb1:1000-1999
125.P
900a2676
AK
126To move a range of Physical Extents to a specific location (which must have
127sufficent free extents) use the form:
84d2039b
JEB
128.sp
129\ pvmove /dev/sdb1:1000-1999 /dev/sdc1
130.sp
900a2676
AK
131or
132.sp
133\ pvmove /dev/sdb1:1000-1999 /dev/sdc1:0-999
84d2039b 134.P
900a2676
AK
135If the source and destination are on the same disk, the
136.B anywhere
137allocation policy would be needed, like this:
138.sp
139\ pvmove --alloc anywhere /dev/sdb1:1000-1999 /dev/sdb1:0-999
140.P
141
142The part of a specific Logical Volume present within in a range of Physical
143Extents can also be picked out and moved, like this:
84d2039b
JEB
144.sp
145\ pvmove -n lvol1 /dev/sdb1:1000-1999 /dev/sdc1
f32e9b2f 146.SH SEE ALSO
5951ef33
AK
147.BR lvm (8),
148.BR vgconvert (8)
900a2676 149.BR pvs (8)
This page took 0.086967 seconds and 5 git commands to generate.