1PVMOVE(8)                   System Manager's Manual                  PVMOVE(8)
2
3
4

NAME

6       pvmove - move physical extents
7

SYNOPSIS

9       pvmove    [--abort]    [--alloc   AllocationPolicy]   [-b/--background]
10       [-d/--debug]   [-h/--help]   [-i/--interval   Seconds]   [-v/--verbose]
11       [-n/--name  LogicalVolume] [SourcePhysicalVolume[:PE[-PE]...] [Destina‐
12       tionPhysicalVolume[:PE[-PE]...]...]]
13

DESCRIPTION

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

OPTIONS

67       --abort
68              Abort any moves in progress.
69
70       -b, --background
71              Run the daemon in the background.
72
73       -i, --interval Seconds
74              Report progress as a percentage at regular intervals.
75
76       -n, --name  LogicalVolume
77              Move only the extents belonging to  LogicalVolume  from  Source‐
78              PhysicalVolume  instead of all allocated extents to the destina‐
79              tion physical volume(s).
80
81

EXAMPLES

83       To move all logical extents of any logical volumes on /dev/hda4 to free
84       physical  extents elsewhere in the volume group, giving verbose runtime
85       information, use:
86
87            pvmove -v /dev/hda4
88
89

SEE ALSO

91       lvm(8),vgconvert(8)
92
93
94
95Sistina Software UK                LVM TOOLS                         PVMOVE(8)
Impressum