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