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

NAME

6       lvconvert - convert a logical volume from linear to mirror or snapshot
7

SYNOPSIS

9       lvconvert   -m|--mirrors   Mirrors  [--mirrorlog  {disk|core|mirrored}]
10       [--corelog] [-R|--regionsize MirrorLogRegionSize]  [-A|--alloc  Alloca‐
11       tionPolicy]   [-b|--background]  [-f|--force]  [-i|--interval  Seconds]
12       [-h|-?|--help]   [--stripes   Stripes   [-I|--stripesize   StripeSize]]
13       [--noudevsync] [-v|--verbose] [-y|--yes] [--version]
14       LogicalVolume[Path] [PhysicalVolume[Path][:PE[-PE]]...]
15
16       lvconvert --splitmirrors Images --name SplitLogicalVolumeName
17       MirrorLogicalVolume[Path] [SplittablePhysicalVolume[Path][:PE[-PE]]...]
18
19       lvconvert   -s|--snapshot   [-c|--chunksize  ChunkSize]  [-h|-?|--help]
20       [--noudevsync] [-v|--verbose] [-Z|--zero y|n] [--version]
21       OriginalLogicalVolume[Path] SnapshotLogicalVolume[Path]
22
23       lvconvert    --merge    [-b|--background]    [-i|--interval    Seconds]
24       [-h|-?|--help]     [-v|--verbose]    [--version]    SnapshotLogicalVol‐
25       ume[Path]...
26
27       lvconvert  --repair  [-h|-?|--help]  [-v|--verbose]  [--version]  Logi‐
28       calVolume[Path] [PhysicalVolume[Path]...]
29

DESCRIPTION

31       lvconvert is used to change the segment type (i.e. linear, mirror, etc)
32       or characteristics of a logical volume.  For example,  it  can  add  or
33       remove the redundant images of a logical volume, change the log type of
34       a mirror, or designate a logical volume as a snapshot repository.
35       If the conversion requires allocation of physical extents (for example,
36       when  converting  from  linear  to  mirror) and you specify one or more
37       PhysicalVolumes (optionally with ranges of physical  extents),  alloca‐
38       tion  of physical extents will be restricted to these physical extents.
39       If the conversion frees physical extents (for example, when  converting
40       from a mirror to a linear, or reducing mirror legs) and you specify one
41       or more PhysicalVolumes, the freed extents come first from  the  speci‐
42       fied PhysicalVolumes.
43

OPTIONS

45       See lvm for common options.
46       Exactly  one  of  --splitmirrors,  --mirrors,  --repair,  --snapshot or
47       --merge arguments is required.
48
49       -m, --mirrors Mirrors
50              Specifies the degree of the mirror  you  wish  to  create.   For
51              example,  "-m  1" would convert the original logical volume to a
52              mirror volume with 2-sides; that is, a linear  volume  plus  one
53              copy.
54
55       --mirrorlog {disk|core|mirrored}
56              Specifies the type of log to use.  The default is disk, which is
57              persistent and requires a small amount of storage space, usually
58              on  a separate device from the data being mirrored.  Core may be
59              useful for short-lived mirrors: It means the mirror is  regener‐
60              ated  by copying the data from the first device again every time
61              the device is activated -  perhaps,  for  example,  after  every
62              reboot.   Using  "mirrored" will create a persistent log that is
63              itself mirrored.
64
65       --corelog
66              The optional argument "--corelog"  is  the  same  as  specifying
67              "--mirrorlog core".
68
69       -R, --regionsize MirrorLogRegionSize
70              A  mirror  is divided into regions of this size (in MB), and the
71              mirror log uses this granularity to track which regions  are  in
72              sync.
73
74       -b, --background
75              Run the daemon in the background.
76
77       -i, --interval Seconds
78              Report progress as a percentage at regular intervals.
79
80       --noudevsync
81              Disable  udev  synchronisation.  The  process  will not wait for
82              notification from udev.  It will continue  irrespective  of  any
83              possible udev processing in the background.  You should only use
84              this if udev is not running or has rules that ignore the devices
85              LVM2 creates.
86
87
88
89       --splitmirrors Images
90              The  number  of redundant Images of a mirror to be split off and
91              used to form a new logical volume.  A name must be supplied  for
92              the newly-split-off logical volume using the --name argument.
93
94
95       -n Name
96              The  name  to apply to a logical volume which has been split off
97              from a mirror logical volume.
98
99
100
101       -s, --snapshot
102              Create a snapshot from existing  logical  volume  using  another
103              existing logical volume as its origin.
104
105       -c, --chunksize ChunkSize
106              Power of 2 chunk size for the snapshot logical volume between 4k
107              and 512k.
108
109       -Z, --zero y|n
110              Controls zeroing of the first KB of data in  the  snapshot.   If
111              the volume is read-only the snapshot will not be zeroed.
112
113       --merge
114              Merges a snapshot into its origin volume.  To check if your ker‐
115              nel supports this feature, look for 'snapshot-merge' in the out‐
116              put  of 'dmsetup targets'.  If both the origin and snapshot vol‐
117              ume are not open the merge will start  immediately.   Otherwise,
118              the  merge  will start the first time either the origin or snap‐
119              shot are activated and both are closed.  Merging a snapshot into
120              an  origin that cannot be closed, for example a root filesystem,
121              is deferred until the next time the origin volume is  activated.
122              When  merging starts, the resulting logical volume will have the
123              origin's name, minor number and UUID.  While  the  merge  is  in
124              progress,  reads  or  writes  to  the origin appear as they were
125              directed to the snapshot being merged.  When the merge finishes,
126              the merged snapshot is removed.  Multiple snapshots may be spec‐
127              ified on the commandline or a @tag may be used to specify multi‐
128              ple snapshots be merged to their respective origin.
129
130
131
132       --repair
133              Repair  a mirror after suffering a disk failure. The mirror will
134              be brought back into a consistent state.  By default, the origi‐
135              nal  number of mirrors will be restored if possible.  Specify -y
136              on the command line to skip the prompts.  Use -f if you  do  not
137              want  any replacement.  Additionally, you may use --use-policies
138              to use the device replacement policy specified in lvm.conf, viz.
139              activation/mirror_log_fault_policy       or      activation/mir‐
140              ror_device_fault_policy.
141

Examples

143       "lvconvert -m1 vg00/lvol1"
144       converts the linear logical volume "vg00/lvol1"  to  a  two-way  mirror
145       logical volume.
146
147       "lvconvert --mirrorlog core vg00/lvol1"
148       converts a mirror with a disk log to a mirror with an in-memory log.
149
150       "lvconvert --mirrorlog disk vg00/lvol1"
151       converts a mirror with an in-memory log to a mirror with a disk log.
152
153       "lvconvert -m0 vg00/lvol1"
154       converts a mirror logical volume to a linear logical volume.
155
156       "lvconvert -s vg00/lvol1 vg00/lvol2"
157       converts  logical  volume  "vg00/lvol2"  to snapshot of original volume
158       "vg00/lvol1"
159
160       "lvconvert -m1 vg00/lvol1 /dev/sda:0-15 /dev/sdb:0-15"
161       converts linear logical volume "vg00/lvol1" to a two-way mirror,  using
162       physical  extents /dev/sda:0-15 and /dev/sdb:0-15 for allocation of new
163       extents.
164
165       "lvconvert -m0 vg00/lvmirror1 /dev/sda
166       converts mirror logical  volume  "vg00/lvmirror1"  to  linear,  freeing
167       physical extents from /dev/sda.
168
169       "lvconvert --merge vg00/lvol1_snap"
170       merges "vg00/lvol1_snap" into its origin.
171
172       "lvconvert --merge @some_tag"
173       If   vg00/lvol1,   vg00/lvol2,  and  vg00/lvol3  are  all  tagged  with
174       "some_tag" each snapshot logical volume will be merged serially,  e.g.:
175       vg00/lvol1,  then  vg00/lvol2,  then  vg00/lvol3.  If --background were
176       used it would start all snapshot logical volume merges in parallel.
177
178

SEE ALSO

180       lvm(8),  vgcreate(8),  lvremove(8),  lvrename(8),  lvextend(8),   lvre‐
181       duce(8), lvdisplay(8), lvscan(8)
182
183
184
185Red Hat, Inc           LVM TOOLS 2.02.84(2) (2011-02-09)          LVCONVERT(8)
Impressum