1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/man/lvconvert.8_end

117 lines
3.5 KiB
Plaintext
Raw Normal View History

2021-04-16 16:57:01 +03:00
.
.SH NOTES
2021-04-16 16:57:01 +03:00
.
This previous command syntax would perform two different operations:
.br
\fBlvconvert --thinpool\fP \fILV1\fP \fB--poolmetadata\fP \fILV2\fP
.br
If LV1 was not a thin pool, the command would convert LV1 to
a thin pool, optionally using a specified LV for metadata.
But, if LV1 was already a thin pool, the command would swap
the current metadata LV with LV2 (for repair purposes.)
2021-04-16 16:57:01 +03:00
.P
In the same way, this previous command syntax would perform two different
operations:
.br
\fBlvconvert --cachepool\fP \fILV1\fP \fB--poolmetadata\fP \fILV2\fP
.br
If LV1 was not a cache pool, the command would convert LV1 to
a cache pool, optionally using a specified LV for metadata.
But, if LV1 was already a cache pool, the command would swap
the current metadata LV with LV2 (for repair purposes.)
2021-04-16 16:57:01 +03:00
.
2017-02-11 01:20:19 +03:00
.SH EXAMPLES
2021-04-16 16:57:01 +03:00
.
2017-02-11 01:20:19 +03:00
Convert a linear LV to a two-way mirror LV.
.br
.B lvconvert --type mirror --mirrors 1 vg/lvol1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Convert a linear LV to a two-way RAID1 LV.
.br
.B lvconvert --type raid1 --mirrors 1 vg/lvol1
2021-04-16 16:57:01 +03:00
.P
Convert a mirror LV to use an in-memory log.
2017-02-11 01:20:19 +03:00
.br
.B lvconvert --mirrorlog core vg/lvol1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Convert a mirror LV to use a disk log.
.br
.B lvconvert --mirrorlog disk vg/lvol1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Convert a mirror or raid1 LV to a linear LV.
.br
.B lvconvert --type linear vg/lvol1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Convert a mirror LV to a raid1 LV with the same number of images.
.br
.B lvconvert --type raid1 vg/lvol1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Convert a linear LV to a two-way mirror LV, allocating new extents from specific
PV ranges.
.br
.B lvconvert --mirrors 1 vg/lvol1 /dev/sda:0-15 /dev/sdb:0-15
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Convert a mirror LV to a linear LV, freeing physical extents from a specific PV.
.br
.B lvconvert --type linear vg/lvol1 /dev/sda
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Split one image from a mirror or raid1 LV, making it a new LV.
.br
.B lvconvert --splitmirrors 1 --name lv_split vg/lvol1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Split one image from a raid1 LV, and track changes made to the raid1 LV
while the split image remains detached.
.br
.B lvconvert --splitmirrors 1 --trackchanges vg/lvol1
2021-04-16 16:57:01 +03:00
.P
Merge an image (that was previously created with --splitmirrors and
--trackchanges) back into the original raid1 LV.
2017-02-11 01:20:19 +03:00
.br
.B lvconvert --mergemirrors vg/lvol1_rimage_1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Replace PV /dev/sdb1 with PV /dev/sdf1 in a raid1/4/5/6/10 LV.
.br
.B lvconvert --replace /dev/sdb1 vg/lvol1 /dev/sdf1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Replace 3 PVs /dev/sd[b-d]1 with PVs /dev/sd[f-h]1 in a raid1 LV.
.br
.B lvconvert --replace /dev/sdb1 --replace /dev/sdc1 --replace /dev/sdd1
2017-02-11 01:20:19 +03:00
.RS
.B vg/lvol1 /dev/sd[fgh]1
.RE
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Replace the maximum of 2 PVs /dev/sd[bc]1 with PVs /dev/sd[gh]1 in a raid6 LV.
.br
.B lvconvert --replace /dev/sdb1 --replace /dev/sdc1 vg/lvol1 /dev/sd[gh]1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Convert an LV into a thin LV in the specified thin pool. The existing LV
is used as an external read-only origin for the new thin LV.
2017-02-11 01:20:19 +03:00
.br
.B lvconvert --type thin --thinpool vg/tpool1 vg/lvol1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Convert an LV into a thin LV in the specified thin pool. The existing LV
is used as an external read-only origin for the new thin LV, and is
2017-02-11 01:20:19 +03:00
renamed "external".
.br
.B lvconvert --type thin --thinpool vg/tpool1
2017-02-11 01:20:19 +03:00
.RS
.B --originname external vg/lvol1
2017-02-11 01:20:19 +03:00
.RE
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Convert an LV to a cache pool LV using another specified LV for cache pool
metadata.
.br
.B lvconvert --type cache-pool --poolmetadata vg/poolmeta1 vg/lvol1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Convert an LV to a cache LV using the specified cache pool and chunk size.
.br
.B lvconvert --type cache --cachepool vg/cpool1 -c 128 vg/lvol1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Detach and keep the cache pool from a cache LV.
.br
.B lvconvert --splitcache vg/lvol1
2021-04-16 16:57:01 +03:00
.P
2017-02-11 01:20:19 +03:00
Detach and remove the cache pool from a cache LV.
.br
.B lvconvert --uncache vg/lvol1