1LVCONVERT(8) System Manager's Manual LVCONVERT(8)
2
3
4
6 lvconvert - Change logical volume layout
7
9 lvconvert option_args position_args
10 [ option_args ]
11 [ position_args ]
12
13 --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
14 -b|--background
15 -H|--cache
16 --cachemetadataformat auto|1|2
17 --cachemode writethrough|writeback|passthrough
18 --cachepolicy String
19 --cachepool LV
20 --cachesettings String
21 -c|--chunksize Size[k|UNIT]
22 --commandprofile String
23 --config String
24 -d|--debug
25 --discards passdown|nopassdown|ignore
26 --driverloaded y|n
27 -f|--force
28 -h|--help
29 -i|--interval Number
30 --lockopt String
31 --longhelp
32 --merge
33 --mergemirrors
34 --mergesnapshot
35 --mergethin
36 --metadataprofile String
37 --mirrorlog core|disk
38 -m|--mirrors [+|-]Number
39 -n|--name String
40 --noudevsync
41 --originname LV
42 --poolmetadata LV
43 --poolmetadatasize Size[m|UNIT]
44 --poolmetadataspare y|n
45 --profile String
46 -q|--quiet
47 -r|--readahead auto|none|Number
48 -R|--regionsize Size[m|UNIT]
49 --repair
50 --replace PV
51 -s|--snapshot
52 --splitcache
53 --splitmirrors Number
54 --splitsnapshot
55 --startpoll
56 --stripes Number
57 -I|--stripesize Size[k|UNIT]
58 --swapmetadata
59 -t|--test
60 -T|--thin
61 --thinpool LV
62 --trackchanges
63 --type linear|striped|snapshot|mir‐
64 ror|raid|thin|cache|thin-pool|cache-pool
65 --uncache
66 --usepolicies
67 -v|--verbose
68 --version
69 -y|--yes
70 -Z|--zero y|n
71
73 lvconvert changes the LV type and includes utilities for LV data main‐
74 tenance. The LV type controls data layout and redundancy. The LV type
75 is also called the segment type or segtype.
76
77 To display the current LV type, run the command:
78
79 lvs -o name,segtype LV
80
81 In some cases, an LV is a single device mapper (dm) layer above physi‐
82 cal devices. In other cases, hidden LVs (dm devices) are layered
83 between the visible LV and physical devices. LVs in the middle layers
84 are called sub LVs. A command run on a visible LV sometimes operates
85 on a sub LV rather than the specified LV. In other cases, a sub LV
86 must be specified directly on the command line.
87
88 Sub LVs can be displayed with the command:
89
90 lvs -a
91
92 The linear type is equivalent to the striped type when one stripe
93 exists. In that case, the types can sometimes be used interchangably.
94
95 In most cases, the mirror type is deprecated and the raid1 type should
96 be used. They are both implementations of mirroring.
97
98 Striped raid types are raid0/raid0_meta, raid5 (an alias for raid5_ls),
99 raid6 (an alias for raid6_zr) and raid10 (an alias for raid10_near).
100
101 As opposed to mirroring, raid5 and raid6 stripe data and calculate par‐
102 ity blocks. The parity blocks can be used for data block recovery in
103 case devices fail. A maximum number of one device in a raid5 LV may
104 fail, and two in case of raid6. Striped raid types typically rotate the
105 parity and data blocks for performance reasons, thus avoiding con‐
106 tention on a single device. Specific arrangements of parity and data
107 blocks (layouts) can be used to optimize I/O performance, or to convert
108 between raid levels. See lvmraid(7) for more information.
109
110 Layouts of raid5 rotating parity blocks can be: left-asymmetric
111 (raid5_la), left-symmetric (raid5_ls with alias raid5), right-asymmet‐
112 ric (raid5_ra), right-symmetric (raid5_rs) and raid5_n, which doesn't
113 rotate parity blocks. Layouts of raid6 are: zero-restart (raid6_zr with
114 alias raid6), next-restart (raid6_nr), and next-continue (raid6_nc).
115
116 Layouts including _n allow for conversion between raid levels (raid5_n
117 to raid6 or raid5_n to striped/raid0/raid0_meta). Additionally, special
118 raid6 layouts for raid level conversions between raid5 and raid6 are:
119 raid6_ls_6, raid6_rs_6, raid6_la_6 and raid6_ra_6. Those correspond to
120 their raid5 counterparts (e.g. raid5_rs can be directly converted to
121 raid6_rs_6 and vice-versa).
122
123 raid10 (an alias for raid10_near) is currently limited to one data copy
124 and even number of sub LVs. This is a mirror group layout, thus a sin‐
125 gle sub LV may fail per mirror group without data loss.
126
127 Striped raid types support converting the layout, their stripesize and
128 their number of stripes.
129
130 The striped raid types combined with raid1 allow for conversion from
131 linear-> striped/raid0/raid0_meta and vice-versa by e.g. linear <->
132 raid1 <-> raid5_n (then adding stripes) <-> striped/raid0/raid0_meta.
133
135 Convert LV to linear.
136
137 lvconvert --type linear LV
138 [ COMMON_OPTIONS ]
139 [ PV ... ]
140 -
141
142 Convert LV to striped.
143
144 lvconvert --type striped LV
145 [ -I|--stripesize Size[k|UNIT] ]
146 [ -R|--regionsize Size[m|UNIT] ]
147 [ -i|--interval Number ]
148 [ --stripes Number ]
149 [ COMMON_OPTIONS ]
150 [ PV ... ]
151 -
152
153 Convert LV to raid or change raid layout
154 (a specific raid level must be used, e.g. raid1).
155
156 lvconvert --type raid LV
157 [ -m|--mirrors [+|-]Number ]
158 [ -I|--stripesize Size[k|UNIT] ]
159 [ -R|--regionsize Size[m|UNIT] ]
160 [ -i|--interval Number ]
161 [ --stripes Number ]
162 [ COMMON_OPTIONS ]
163 [ PV ... ]
164 -
165
166 Convert LV to raid1 or mirror, or change number of mirror images.
167
168 lvconvert -m|--mirrors [+|-]Number LV
169 [ -R|--regionsize Size[m|UNIT] ]
170 [ -i|--interval Number ]
171 [ --mirrorlog core|disk ]
172 [ COMMON_OPTIONS ]
173 [ PV ... ]
174 -
175
176 Convert raid LV to change number of stripe images.
177
178 lvconvert --stripes Number LV_raid
179 [ -i|--interval Number ]
180 [ -R|--regionsize Size[m|UNIT] ]
181 [ -I|--stripesize Size[k|UNIT] ]
182 [ COMMON_OPTIONS ]
183 [ PV ... ]
184 -
185
186 Convert raid LV to change the stripe size.
187
188 lvconvert -I|--stripesize Size[k|UNIT] LV_raid
189 [ -i|--interval Number ]
190 [ -R|--regionsize Size[m|UNIT] ]
191 [ COMMON_OPTIONS ]
192 -
193
194 Split images from a raid1 or mirror LV and use them to create a new LV.
195
196 lvconvert --splitmirrors Number -n|--name LV_new LV_cache_mirror_raid1
197 [ COMMON_OPTIONS ]
198 [ PV ... ]
199 -
200
201 Split images from a raid1 LV and track changes to origin for later
202 merge.
203
204 lvconvert --splitmirrors Number --trackchanges LV_cache_raid1
205 [ COMMON_OPTIONS ]
206 [ PV ... ]
207 -
208
209 Merge LV images that were split from a raid1 LV.
210
211 lvconvert --mergemirrors VG|LV_linear_raid|Tag ...
212 [ COMMON_OPTIONS ]
213 -
214
215 Convert LV to a thin LV, using the original LV as an external origin.
216
217 lvconvert --type thin --thinpool LV LV_linear_striped_thin_cache_raid
218 [ -T|--thin ]
219 [ -r|--readahead auto|none|Number ]
220 [ -c|--chunksize Size[k|UNIT] ]
221 [ -Z|--zero y|n ]
222 [ --originname LV_new ]
223 [ --poolmetadata LV ]
224 [ --poolmetadatasize Size[m|UNIT] ]
225 [ --poolmetadataspare y|n ]
226 [ --metadataprofile String ]
227 [ COMMON_OPTIONS ]
228 -
229
230 Convert LV to type cache.
231
232 lvconvert --type cache --cachepool LV LV_linear_striped_thinpool_raid
233 [ -H|--cache ]
234 [ -Z|--zero y|n ]
235 [ -r|--readahead auto|none|Number ]
236 [ -c|--chunksize Size[k|UNIT] ]
237 [ --cachemetadataformat auto|1|2 ]
238 [ --cachemode writethrough|writeback|passthrough ]
239 [ --cachepolicy String ]
240 [ --cachesettings String ]
241 [ --poolmetadata LV ]
242 [ --poolmetadatasize Size[m|UNIT] ]
243 [ --poolmetadataspare y|n ]
244 [ --metadataprofile String ]
245 [ COMMON_OPTIONS ]
246 -
247
248 Convert LV to type thin-pool.
249
250 lvconvert --type thin-pool LV_linear_striped_cache_raid
251 [ -I|--stripesize Size[k|UNIT] ]
252 [ -r|--readahead auto|none|Number ]
253 [ -c|--chunksize Size[k|UNIT] ]
254 [ -Z|--zero y|n ]
255 [ --stripes Number ]
256 [ --discards passdown|nopassdown|ignore ]
257 [ --poolmetadata LV ]
258 [ --poolmetadatasize Size[m|UNIT] ]
259 [ --poolmetadataspare y|n ]
260 [ --metadataprofile String ]
261 [ COMMON_OPTIONS ]
262 [ PV ... ]
263 -
264
265 Convert LV to type cache-pool.
266
267 lvconvert --type cache-pool LV_linear_striped_raid
268 [ -Z|--zero y|n ]
269 [ -r|--readahead auto|none|Number ]
270 [ -c|--chunksize Size[k|UNIT] ]
271 [ --cachemetadataformat auto|1|2 ]
272 [ --cachemode writethrough|writeback|passthrough ]
273 [ --cachepolicy String ]
274 [ --cachesettings String ]
275 [ --poolmetadata LV ]
276 [ --poolmetadatasize Size[m|UNIT] ]
277 [ --poolmetadataspare y|n ]
278 [ --metadataprofile String ]
279 [ COMMON_OPTIONS ]
280 [ PV ... ]
281 -
282
283 Separate and keep the cache pool from a cache LV.
284
285 lvconvert --splitcache LV_thinpool_cache_cachepool
286 [ COMMON_OPTIONS ]
287 -
288
289 Merge thin LV into its origin LV.
290
291 lvconvert --mergethin LV_thin ...
292 [ COMMON_OPTIONS ]
293 -
294
295 Merge COW snapshot LV into its origin.
296
297 lvconvert --mergesnapshot LV_snapshot ...
298 [ -i|--interval Number ]
299 [ COMMON_OPTIONS ]
300 -
301
302 Combine a former COW snapshot (second arg) with a former
303 origin LV (first arg) to reverse a splitsnapshot command.
304
305 lvconvert --type snapshot LV LV_linear_striped
306 [ -s|--snapshot ]
307 [ -c|--chunksize Size[k|UNIT] ]
308 [ -Z|--zero y|n ]
309 [ COMMON_OPTIONS ]
310 -
311
312 Replace failed PVs in a raid or mirror LV.
313 Repair a thin pool.
314 Repair a cache pool.
315
316 lvconvert --repair LV_thinpool_cache_cachepool_mirror_raid
317 [ -i|--interval Number ]
318 [ --usepolicies ]
319 [ --poolmetadataspare y|n ]
320 [ COMMON_OPTIONS ]
321 [ PV ... ]
322 -
323
324 Replace specific PV(s) in a raid LV with another PV.
325
326 lvconvert --replace PV LV_raid
327 [ COMMON_OPTIONS ]
328 [ PV ... ]
329 -
330
331 Poll LV to continue conversion.
332
333 lvconvert --startpoll LV_mirror_raid
334 [ COMMON_OPTIONS ]
335 -
336
337 Common options for command:
338 [ -b|--background ]
339 [ -f|--force ]
340 [ --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
341 ]
342 [ --noudevsync ]
343
344 Common options for lvm:
345 [ -d|--debug ]
346 [ -h|--help ]
347 [ -q|--quiet ]
348 [ -t|--test ]
349 [ -v|--verbose ]
350 [ -y|--yes ]
351 [ --commandprofile String ]
352 [ --config String ]
353 [ --driverloaded y|n ]
354 [ --lockopt String ]
355 [ --longhelp ]
356 [ --profile String ]
357 [ --version ]
358
360 --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
361 Determines the allocation policy when a command needs to allo‐
362 cate Physical Extents (PEs) from the VG. Each VG and LV has an
363 allocation policy which can be changed with vgchange/lvchange,
364 or overriden on the command line. normal applies common sense
365 rules such as not placing parallel stripes on the same PV.
366 inherit applies the VG policy to an LV. contiguous requires new
367 PEs be placed adjacent to existing PEs. cling places new PEs on
368 the same PV as existing PEs in the same stripe of the LV. If
369 there are sufficient PEs for an allocation, but normal does not
370 use them, anywhere will use them even if it reduces performance,
371 e.g. by placing two stripes on the same PV. Optional positional
372 PV args on the command line can also be used to limit which PVs
373 the command will use for allocation. See lvm(8) for more infor‐
374 mation about allocation.
375
376 -b|--background
377 If the operation requires polling, this option causes the com‐
378 mand to return before the operation is complete, and polling is
379 done in the background.
380
381 -H|--cache
382 Specifies the command is handling a cache LV or cache pool. See
383 --type cache and --type cache-pool. See lvmcache(7) for more
384 information about LVM caching.
385
386 --cachemetadataformat auto|1|2
387 Specifies the cache metadata format used by cache target.
388
389 --cachemode writethrough|writeback|passthrough
390 Specifies when writes to a cache LV should be considered com‐
391 plete. writeback considers a write complete as soon as it is
392 stored in the cache pool. writethough considers a write com‐
393 plete only when it has been stored in both the cache pool and on
394 the origin LV. While writethrough may be slower for writes, it
395 is more resilient if something should happen to a device associ‐
396 ated with the cache pool LV. With passthrough, all reads are
397 served from the origin LV (all reads miss the cache) and all
398 writes are forwarded to the origin LV; additionally, write hits
399 cause cache block invalidates. See lvmcache(7) for more informa‐
400 tion.
401
402 --cachepolicy String
403 Specifies the cache policy for a cache LV. See lvmcache(7) for
404 more information.
405
406 --cachepool LV
407 The name of a cache pool LV.
408
409 --cachesettings String
410 Specifies tunable values for a cache LV in "Key = Value" form.
411 Repeat this option to specify multiple values. (The default
412 values should usually be adequate.) The special string value
413 default switches settings back to their default kernel values
414 and removes them from the list of settings stored in LVM meta‐
415 data. See lvmcache(7) for more information.
416
417 -c|--chunksize Size[k|UNIT]
418 The size of chunks in a snapshot, cache pool or thin pool. For
419 snapshots, the value must be a power of 2 between 4KiB and
420 512KiB and the default value is 4. For a cache pool the value
421 must be between 32KiB and 1GiB and the default value is 64. For
422 a thin pool the value must be between 64KiB and 1GiB and the
423 default value starts with 64 and scales up to fit the pool meta‐
424 data size within 128MiB, if the pool metadata size is not speci‐
425 fied. The value must be a multiple of 64KiB. See lvmthin(7)
426 and lvmcache(7) for more information.
427
428 --commandprofile String
429 The command profile to use for command configuration. See
430 lvm.conf(5) for more information about profiles.
431
432 --config String
433 Config settings for the command. These override lvm.conf set‐
434 tings. The String arg uses the same format as lvm.conf, or may
435 use section/field syntax. See lvm.conf(5) for more information
436 about config.
437
438 -d|--debug ...
439 Set debug level. Repeat from 1 to 6 times to increase the detail
440 of messages sent to the log file and/or syslog (if configured).
441
442 --discards passdown|nopassdown|ignore
443 Specifies how the device-mapper thin pool layer in the kernel
444 should handle discards. ignore causes the thin pool to ignore
445 discards. nopassdown causes the thin pool to process discards
446 itself to allow reuse of unneeded extents in the thin pool.
447 passdown causes the thin pool to process discards itself (like
448 nopassdown) and pass the discards to the underlying device. See
449 lvmthin(7) for more information.
450
451 --driverloaded y|n
452 If set to no, the command will not attempt to use device-mapper.
453 For testing and debugging.
454
455 -f|--force ...
456 Override various checks, confirmations and protections. Use
457 with extreme caution.
458
459 -h|--help
460 Display help text.
461
462 -i|--interval Number
463 Report progress at regular intervals.
464
465 --lockopt String
466 Used to pass options for special cases to lvmlockd. See lvm‐
467 lockd(8) for more information.
468
469 --longhelp
470 Display long help text.
471
472 --merge
473 An alias for --mergethin, --mergemirrors, or --mergesnapshot,
474 depending on the type of LV.
475
476 --mergemirrors
477 Merge LV images that were split from a raid1 LV. See --split‐
478 mirrors with --trackchanges.
479
480 --mergesnapshot
481 Merge COW snapshot LV into its origin. When merging a snapshot,
482 if both the origin and snapshot LVs are not open, the merge will
483 start immediately. Otherwise, the merge will start the first
484 time either the origin or snapshot LV are activated and both are
485 closed. Merging a snapshot into an origin that cannot be closed,
486 for example a root filesystem, is deferred until the next time
487 the origin volume is activated. When merging starts, the result‐
488 ing LV will have the origin's name, minor number and UUID. While
489 the merge is in progress, reads or writes to the origin appear
490 as being directed to the snapshot being merged. When the merge
491 finishes, the merged snapshot is removed. Multiple snapshots
492 may be specified on the command line or a @tag may be used to
493 specify multiple snapshots be merged to their respective origin.
494
495 --mergethin
496 Merge thin LV into its origin LV. The origin thin LV takes the
497 content of the thin snapshot, and the thin snapshot LV is
498 removed. See lvmthin(7) for more information.
499
500 --metadataprofile String
501 The metadata profile to use for command configuration. See
502 lvm.conf(5) for more information about profiles.
503
504 --mirrorlog core|disk
505 Specifies the type of mirror log for LVs with the "mirror" type
506 (does not apply to the "raid1" type.) disk is a persistent log
507 and requires a small amount of storage space, usually on a sepa‐
508 rate device from the data being mirrored. core is not persis‐
509 tent; the log is kept only in memory. In this case, the mirror
510 must be synchronized (by copying LV data from the first device
511 to others) each time the LV is activated, e.g. after reboot.
512 mirrored is a persistent log that is itself mirrored, but should
513 be avoided. Instead, use the raid1 type for log redundancy.
514
515 -m|--mirrors [+|-]Number
516 Specifies the number of mirror images in addition to the origi‐
517 nal LV image, e.g. --mirrors 1 means there are two images of the
518 data, the original and one mirror image. Optional positional PV
519 args on the command line can specify the devices the images
520 should be placed on. There are two mirroring implementations:
521 "raid1" and "mirror". These are the names of the corresponding
522 LV types, or "segment types". Use the --type option to specify
523 which to use (raid1 is default, and mirror is legacy) Use
524 lvm.conf global/mirror_segtype_default and global/raid10_seg‐
525 type_default to configure the default types. The plus prefix +
526 can be used, in which case the number is added to the current
527 number of images, or the minus prefix - can be used, in which
528 case the number is subtracted from the current number of images.
529 See lvmraid(7) for more information.
530
531 -n|--name String
532 Specifies the name of a new LV. When unspecified, a default
533 name of "lvol#" is generated, where # is a number generated by
534 LVM.
535
536 --noudevsync
537 Disables udev synchronisation. The process will not wait for
538 notification from udev. It will continue irrespective of any
539 possible udev processing in the background. Only use this if
540 udev is not running or has rules that ignore the devices LVM
541 creates.
542
543 --originname LV
544 Specifies the name to use for the external origin LV when con‐
545 verting an LV to a thin LV. The LV being converted becomes a
546 read-only external origin with this name.
547
548 --poolmetadata LV
549 The name of a an LV to use for storing pool metadata.
550
551 --poolmetadatasize Size[m|UNIT]
552 Specifies the size of the new pool metadata LV.
553
554 --poolmetadataspare y|n
555 Enable or disable the automatic creation and management of a
556 spare pool metadata LV in the VG. A spare metadata LV is
557 reserved space that can be used when repairing a pool.
558
559 --profile String
560 An alias for --commandprofile or --metadataprofile, depending on
561 the command.
562
563 -q|--quiet ...
564 Suppress output and log messages. Overrides --debug and --ver‐
565 bose. Repeat once to also suppress any prompts with answer
566 'no'.
567
568 -r|--readahead auto|none|Number
569 Sets read ahead sector count of an LV. auto is the default
570 which allows the kernel to choose a suitable value automati‐
571 cally. none is equivalent to zero.
572
573 -R|--regionsize Size[m|UNIT]
574 Size of each raid or mirror synchronization region. lvm.conf
575 activation/raid_region_size can be used to configure a default.
576
577 --repair
578 Replace failed PVs in a raid or mirror LV, or run a repair util‐
579 ity on a thin pool. See lvmraid(7) and lvmthin(7) for more
580 information.
581
582 --replace PV
583 Replace a specific PV in a raid LV with another PV. The new PV
584 to use can be optionally specified after the LV. Multiple PVs
585 can be replaced by repeating this option. See lvmraid(7) for
586 more information.
587
588 -s|--snapshot
589 Combine a former COW snapshot LV with a former origin LV to
590 reverse a previous --splitsnapshot command.
591
592 --splitcache
593 Separates a cache pool from a cache LV, and keeps the unused
594 cache pool LV. Before the separation, the cache is flushed.
595 Also see --uncache.
596
597 --splitmirrors Number
598 Splits the specified number of images from a raid1 or mirror LV
599 and uses them to create a new LV. If --trackchanges is also
600 specified, changes to the raid1 LV are tracked while the split
601 LV remains detached. If --name is specified, then the images
602 are permanently split from the original LV and changes are not
603 tracked.
604
605 --splitsnapshot
606 Separates a COW snapshot from its origin LV. The LV that is
607 split off contains the chunks that differ from the origin LV
608 along with metadata describing them. This LV can be wiped and
609 then destroyed with lvremove.
610
611 --startpoll
612 Start polling an LV to continue processing a conversion.
613
614 --stripes Number
615 Specifies the number of stripes in a striped LV. This is the
616 number of PVs (devices) that a striped LV is spread across. Data
617 that appears sequential in the LV is spread across multiple
618 devices in units of the stripe size (see --stripesize). This
619 does not apply to existing allocated space, only newly allocated
620 space can be striped.
621
622 -I|--stripesize Size[k|UNIT]
623 The amount of data that is written to one device before moving
624 to the next in a striped LV.
625
626 --swapmetadata
627 Extracts the metadata LV from a pool and replaces it with
628 another specified LV. The extracted LV is preserved and given
629 the name of the LV that replaced it. Use for repair only. When
630 the metadata LV is swapped out of the pool, it can be activated
631 directly and used with thin provisioning tools: cache_dump(8),
632 cache_repair(8), cache_restore(8), thin_dump(8), thin_repair(8),
633 thin_restore(8).
634
635 -t|--test
636 Run in test mode. Commands will not update metadata. This is
637 implemented by disabling all metadata writing but nevertheless
638 returning success to the calling function. This may lead to
639 unusual error messages in multi-stage operations if a tool
640 relies on reading back metadata it believes has changed but
641 hasn't.
642
643 -T|--thin
644 Specifies the command is handling a thin LV or thin pool. See
645 --type thin, --type thin-pool, and --virtualsize. See
646 lvmthin(7) for more information about LVM thin provisioning.
647
648 --thinpool LV
649 The name of a thin pool LV.
650
651 --trackchanges
652 Can be used with --splitmirrors on a raid1 LV. This causes
653 changes to the original raid1 LV to be tracked while the split
654 images remain detached. This is a temporary state that allows
655 the read-only detached image to be merged efficiently back into
656 the raid1 LV later. Only the regions with changed data are
657 resynchronized during merge. While a raid1 LV is tracking
658 changes, operations on it are limited to merging the split image
659 (see --mergemirrors) or permanently splitting the image (see
660 --splitmirrors with --name.
661
662 --type linear|striped|snapshot|mir‐
663 ror|raid|thin|cache|thin-pool|cache-pool
664 The LV type, also known as "segment type" or "segtype". See
665 usage descriptions for the specific ways to use these types.
666 For more information about redundancy and performance (raid<N>,
667 mirror, striped, linear) see lvmraid(7). For thin provisioning
668 (thin, thin-pool) see lvmthin(7). For performance caching
669 (cache, cache-pool) see lvmcache(7). For copy-on-write snap‐
670 shots (snapshot) see usage definitions. Several commands omit
671 an explicit type option because the type is inferred from other
672 options or shortcuts (e.g. --stripes, --mirrors, --snapshot,
673 --virtualsize, --thin, --cache). Use inferred types with care
674 because it can lead to unexpected results.
675
676 --uncache
677 Separates a cache pool from a cache LV, and deletes the unused
678 cache pool LV. Before the separation, the cache is flushed.
679 Also see --splitcache.
680
681 --usepolicies
682 Perform an operation according to the policy configured in
683 lvm.conf or a profile.
684
685 -v|--verbose ...
686 Set verbose level. Repeat from 1 to 4 times to increase the
687 detail of messages sent to stdout and stderr.
688
689 --version
690 Display version information.
691
692 -y|--yes
693 Do not prompt for confirmation interactively but always assume
694 the answer yes. Use with extreme caution. (For automatic no,
695 see -qq.)
696
697 -Z|--zero y|n
698 For snapshots, this controls zeroing of the first 4KiB of data
699 in the snapshot. If the LV is read-only, the snapshot will not
700 be zeroed. For thin pools, this controls zeroing of provisioned
701 blocks. Provisioning of large zeroed chunks negatively impacts
702 performance.
703
705 VG
706 Volume Group name. See lvm(8) for valid names.
707
708 LV
709 Logical Volume name. See lvm(8) for valid names. An LV posi‐
710 tional arg generally includes the VG name and LV name, e.g.
711 VG/LV. LV followed by _<type> indicates that an LV of the given
712 type is required. (raid represents raid<N> type)
713
714 PV
715 Physical Volume name, a device path under /dev. For commands
716 managing physical extents, a PV positional arg generally accepts
717 a suffix indicating a range (or multiple ranges) of physical
718 extents (PEs). When the first PE is omitted, it defaults to the
719 start of the device, and when the last PE is omitted it defaults
720 to end. Start and end range (inclusive): PV[:PE-PE]... Start
721 and length range (counting from 0): PV[:PE+PE]...
722
723 Tag
724 Tag name. See lvm(8) for information about tag names and using
725 tags in place of a VG, LV or PV.
726
727 String
728 See the option description for information about the string con‐
729 tent.
730
731 Size[UNIT]
732 Size is an input number that accepts an optional unit. Input
733 units are always treated as base two values, regardless of capi‐
734 talization, e.g. 'k' and 'K' both refer to 1024. The default
735 input unit is specified by letter, followed by |UNIT. UNIT rep‐
736 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
737 bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is
738 megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
739 e|E is exabytes. (This should not be confused with the output
740 control --units, where capital letters mean multiple of 1000.)
741
743 See lvm(8) for information about environment variables used by lvm.
744 For example, LVM_VG_NAME can generally be substituted for a required VG
745 parameter.
746
748 Alternate command forms, advanced command usage, and listing of all
749 valid syntax for completeness.
750
751 Convert LV to type mirror (also see type raid1),
752 (also see lvconvert --mirrors).
753
754 lvconvert --type mirror LV
755 [ -m|--mirrors [+|-]Number ]
756 [ -R|--regionsize Size[m|UNIT] ]
757 [ -i|--interval Number ]
758 [ --mirrorlog core|disk ]
759 [ COMMON_OPTIONS ]
760 [ PV ... ]
761 -
762
763 Change the region size of an LV.
764
765 lvconvert -R|--regionsize Size[m|UNIT] LV_raid
766 [ COMMON_OPTIONS ]
767 -
768
769 Change the type of mirror log used by a mirror LV.
770
771 lvconvert --mirrorlog core|disk LV_mirror
772 [ COMMON_OPTIONS ]
773 [ PV ... ]
774 -
775
776 Convert LV to a thin LV, using the original LV as an external origin
777 (infers --type thin).
778
779 lvconvert -T|--thin --thinpool LV LV_linear_striped_thin_cache_raid
780 [ -r|--readahead auto|none|Number ]
781 [ -c|--chunksize Size[k|UNIT] ]
782 [ -Z|--zero y|n ]
783 [ --type thin ]
784 [ --originname LV_new ]
785 [ --poolmetadata LV ]
786 [ --poolmetadatasize Size[m|UNIT] ]
787 [ --poolmetadataspare y|n ]
788 [ --metadataprofile String ]
789 [ COMMON_OPTIONS ]
790 -
791
792 Convert LV to type cache (infers --type cache).
793
794 lvconvert -H|--cache --cachepool LV LV_linear_striped_thinpool_raid
795 [ -Z|--zero y|n ]
796 [ -r|--readahead auto|none|Number ]
797 [ -c|--chunksize Size[k|UNIT] ]
798 [ --type cache ]
799 [ --cachemetadataformat auto|1|2 ]
800 [ --cachemode writethrough|writeback|passthrough ]
801 [ --cachepolicy String ]
802 [ --cachesettings String ]
803 [ --poolmetadata LV ]
804 [ --poolmetadatasize Size[m|UNIT] ]
805 [ --poolmetadataspare y|n ]
806 [ --metadataprofile String ]
807 [ COMMON_OPTIONS ]
808 -
809
810 Separate and delete the cache pool from a cache LV.
811
812 lvconvert --uncache LV_thinpool_cache
813 [ COMMON_OPTIONS ]
814 -
815
816 Swap metadata LV in a thin pool or cache pool (for repair only).
817
818 lvconvert --swapmetadata --poolmetadata LV LV_thinpool_cachepool
819 [ -c|--chunksize Size[k|UNIT] ]
820 [ COMMON_OPTIONS ]
821 -
822
823 Merge LV that was split from a mirror (variant, use --mergemirrors).
824 Merge thin LV into its origin LV (variant, use --mergethin).
825 Merge COW snapshot LV into its origin (variant, use --mergesnapshot).
826
827 lvconvert --merge VG|LV_linear_striped_snapshot_thin_raid|Tag ...
828 [ -i|--interval Number ]
829 [ COMMON_OPTIONS ]
830 -
831
832 Separate a COW snapshot from its origin LV.
833
834 lvconvert --splitsnapshot LV_snapshot
835 [ COMMON_OPTIONS ]
836 -
837
838 Combine a former COW snapshot (second arg) with a former
839 origin LV (first arg) to reverse a splitsnapshot command.
840
841 lvconvert -s|--snapshot LV LV_linear_striped
842 [ -c|--chunksize Size[k|UNIT] ]
843 [ -Z|--zero y|n ]
844 [ --type snapshot ]
845 [ COMMON_OPTIONS ]
846 -
847
848 Poll LV to continue conversion (also see --startpoll)
849 or waits till conversion/mirror syncing is finished
850
851 lvconvert LV_mirror_raid
852 [ COMMON_OPTIONS ]
853 -
854
855
857 This previous command syntax would perform two different operations:
858 lvconvert --thinpool LV1 --poolmetadata LV2
859 If LV1 was not a thin pool, the command would convert LV1 to a thin
860 pool, optionally using a specified LV for metadata. But, if LV1 was
861 already a thin pool, the command would swap the current metadata LV
862 with LV2 (for repair purposes.)
863
864 In the same way, this previous command syntax would perform two differ‐
865 ent operations:
866 lvconvert --cachepool LV1 --poolmetadata LV2
867 If LV1 was not a cache pool, the command would convert LV1 to a cache
868 pool, optionally using a specified LV for metadata. But, if LV1 was
869 already a cache pool, the command would swap the current metadata LV
870 with LV2 (for repair purposes.)
871
873 Convert a linear LV to a two-way mirror LV.
874 lvconvert --type mirror --mirrors 1 vg/lvol1
875
876 Convert a linear LV to a two-way RAID1 LV.
877 lvconvert --type raid1 --mirrors 1 vg/lvol1
878
879 Convert a mirror LV to use an in-memory log.
880 lvconvert --mirrorlog core vg/lvol1
881
882 Convert a mirror LV to use a disk log.
883 lvconvert --mirrorlog disk vg/lvol1
884
885 Convert a mirror or raid1 LV to a linear LV.
886 lvconvert --type linear vg/lvol1
887
888 Convert a mirror LV to a raid1 LV with the same number of images.
889 lvconvert --type raid1 vg/lvol1
890
891 Convert a linear LV to a two-way mirror LV, allocating new extents from
892 specific PV ranges.
893 lvconvert --mirrors 1 vg/lvol1 /dev/sda:0-15 /dev/sdb:0-15
894
895 Convert a mirror LV to a linear LV, freeing physical extents from a
896 specific PV.
897 lvconvert --type linear vg/lvol1 /dev/sda
898
899 Split one image from a mirror or raid1 LV, making it a new LV.
900 lvconvert --splitmirrors 1 --name lv_split vg/lvol1
901
902 Split one image from a raid1 LV, and track changes made to the raid1 LV
903 while the split image remains detached.
904 lvconvert --splitmirrors 1 --trackchanges vg/lvol1
905
906 Merge an image (that was previously created with --splitmirrors and
907 --trackchanges) back into the original raid1 LV.
908 lvconvert --mergemirrors vg/lvol1_rimage_1
909
910 Replace PV /dev/sdb1 with PV /dev/sdf1 in a raid1/4/5/6/10 LV.
911 lvconvert --replace /dev/sdb1 vg/lvol1 /dev/sdf1
912
913 Replace 3 PVs /dev/sd[b-d]1 with PVs /dev/sd[f-h]1 in a raid1 LV.
914 lvconvert --replace /dev/sdb1 --replace /dev/sdc1 --replace /dev/sdd1
915 vg/lvol1 /dev/sd[fgh]1
916
917 Replace the maximum of 2 PVs /dev/sd[bc]1 with PVs /dev/sd[gh]1 in a
918 raid6 LV.
919 lvconvert --replace /dev/sdb1 --replace /dev/sdc1 vg/lvol1 /dev/sd[gh]1
920
921 Convert an LV into a thin LV in the specified thin pool. The existing
922 LV is used as an external read-only origin for the new thin LV.
923 lvconvert --type thin --thinpool vg/tpool1 vg/lvol1
924
925 Convert an LV into a thin LV in the specified thin pool. The existing
926 LV is used as an external read-only origin for the new thin LV, and is
927 renamed "external".
928 lvconvert --type thin --thinpool vg/tpool1
929 --originname external vg/lvol1
930
931 Convert an LV to a cache pool LV using another specified LV for cache
932 pool metadata.
933 lvconvert --type cache-pool --poolmetadata vg/poolmeta1 vg/lvol1
934
935 Convert an LV to a cache LV using the specified cache pool and chunk
936 size.
937 lvconvert --type cache --cachepool vg/cpool1 -c 128 vg/lvol1
938
939 Detach and keep the cache pool from a cache LV.
940 lvconvert --splitcache vg/lvol1
941
942 Detach and remove the cache pool from a cache LV.
943 lvconvert --uncache vg/lvol1
944
946 lvm(8) lvm.conf(5) lvmconfig(8)
947
948 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
949 pvresize(8) pvs(8) pvscan(8)
950
951 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
952 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
953 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
954 vgs(8) vgscan(8) vgsplit(8)
955
956 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
957 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
958
959 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
960 vate(8) lvmdump(8)
961
962 dmeventd(8) lvmetad(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) clvmd(8)
963 cmirrord(8) lvmdbusd(8)
964
965 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
966
967
968
969Red Hat, Inc. LVM TOOLS 2.02.180(2)-RHEL7 (2018-07-20) LVCONVERT(8)