Initial import of binutils 2.22 on the new vendor branch
[dragonfly.git] / contrib / lvm2 / dist / man / pvmove.8.in
1 .TH PVMOVE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
2 .SH NAME
3 pvmove \- move physical extents
4 .SH SYNOPSIS
5 .B pvmove
6 [\-\-abort]
7 [\-\-alloc AllocationPolicy]
8 [\-b|\-\-background]
9 [\-d|\-\-debug] [\-h|\-\-help] [\-i|\-\-interval Seconds]
10 [\-\-noudevsync] [\-v|\-\-verbose] [\-n|\-\-name LogicalVolume]
11 [SourcePhysicalVolume[:PE[-PE]...] [DestinationPhysicalVolume[:PE[-PE]...]...]]
12 .SH DESCRIPTION
13 .B pvmove
14 allows you to move the allocated physical extents (PEs) on
15 .I SourcePhysicalVolume
16 to one or more other physical volumes (PVs).
17 You can optionally specify a source
18 .I LogicalVolume
19 in which case only extents used by that LV will be moved to 
20 free (or specified) extents on
21 .IR DestinationPhysicalVolume (s).
22 If no
23 .I DestinationPhysicalVolume
24 is specified, the normal allocation rules for the volume group are used.
25
26 If \fBpvmove\fP gets interrupted for any reason (e.g. the machine crashes)
27 then run \fBpvmove\fP again without any PhysicalVolume arguments to
28 restart any moves that were in progress from the last checkpoint.
29 Alternatively use \fBpvmove --abort\fP at any time to abort them
30 at the last checkpoint.
31
32 You can run more than one pvmove at once provided they are moving data
33 off different SourcePhysicalVolumes, but additional pvmoves will ignore
34 any logical volumes already in the process of being changed, so some
35 data might not get moved.
36
37 \fBpvmove\fP works as follows:
38
39 1. A temporary 'pvmove' logical volume is created to store
40 details of all the data movements required.
41
42 2. Every logical volume in the volume group is searched
43 for contiguous data that need moving
44 according to the command line arguments.
45 For each piece of data found, a new segment is added to the end of the
46 pvmove LV.
47 This segment takes the form of a temporary mirror to copy the data 
48 from the original location to a newly-allocated location. 
49 The original LV is updated to use the new temporary mirror segment
50 in the pvmove LV instead of accessing the data directly.
51
52 3. The volume group metadata is updated on disk.
53
54 4. The first segment of the pvmove logical volume is activated and starts
55 to mirror the first part of the data.  Only one segment is mirrored at once
56 as this is usually more efficient.
57
58 5. A daemon repeatedly checks progress at the specified time interval.
59 When it detects that the first temporary mirror is in-sync,
60 it breaks that mirror so that only the new location for that data gets used 
61 and writes a checkpoint into the volume group metadata on disk.
62 Then it activates the mirror for the next segment of the pvmove LV.
63
64 6. When there are no more segments left to be mirrored, 
65 the temporary logical volume is removed and the volume group metadata 
66 is updated so that the logical volumes reflect the new data locations.
67
68 Note that this new process cannot support the original LVM1
69 type of on-disk metadata.  Metadata can be converted using \fBvgconvert\fP(8).
70
71 .SH OPTIONS
72 .TP
73 .I \-\-abort
74 Abort any moves in progress.
75 .TP
76 .I \-\-noudevsync
77 Disable udev synchronisation. The
78 process will not wait for notification from udev.
79 It will continue irrespective of any possible udev processing
80 in the background.  You should only use this if udev is not running
81 or has rules that ignore the devices LVM2 creates.
82 .TP
83 .I \-b, \-\-background
84 Run the daemon in the background.
85 .TP
86 .I \-i, \-\-interval Seconds
87 Report progress as a percentage at regular intervals.
88 .TP
89 .I \-n, \-\-name " \fILogicalVolume\fR"
90 Move only the extents belonging to
91 .I LogicalVolume
92 from
93 .I SourcePhysicalVolume
94 instead of all allocated extents to the destination physical volume(s).
95
96 .SH EXAMPLES
97 To move all logical extents of any logical volumes on
98 .B /dev/hda4
99 to free physical extents elsewhere in the volume group, giving verbose
100 runtime information, use:
101 .sp
102 \       pvmove -v /dev/hda4
103 .sp
104 .SH SEE ALSO
105 .BR lvm (8),
106 .BR vgconvert (8)