1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

man: lvmcache naming updates

This commit is contained in:
David Teigland 2019-10-21 11:35:28 -05:00
parent 0c01a4c2a6
commit 018cf39316

View File

@ -44,10 +44,10 @@ cache.
.nf .nf
$ lvcreate -n fast -L Size vg /dev/fast $ lvcreate -n fast -L Size vg /dev/fast
$ lvs vg -o+devices $ lvs -a
LV VG Attr LSize Devices LV Attr Type Devices
fast vg -wi------- xx.00m /dev/fast(0) fast -wi------- linear /dev/fast
main vg -wi------- yyy.00m /dev/slow(0) main -wi------- linear /dev/slow
.fi .fi
.B 3. Start caching the main LV .B 3. Start caching the main LV
@ -64,35 +64,45 @@ using dm-writecache:
$ lvconvert --type writecache --cachevol fast vg/main $ lvconvert --type writecache --cachevol fast vg/main
using dm-cache with a cache pool: using dm-cache (with cachepool):
$ lvconvert --type cache --cachepool fastpool vg/main $ lvconvert --type cache --cachepool fast vg/main
.fi .fi
.B 4. Display LVs .B 4. Display LVs
Once the fast LV has been attached to the main LV, lvm reports the main LV Once the fast LV has been attached to the main LV, lvm reports the main LV
type as either \fBcache\fP or \fBwritecache\fP depending on the type used. type as either \fBcache\fP or \fBwritecache\fP depending on the type used.
While attached, the fast LV is hidden, and only displayed when lvs is While attached, the fast LV is hidden, and renamed with a _cvol or _cpool
given -a. The _corig or _wcorig LV represents the original LV without the suffix. It is displayed by lvs -a. The _corig or _wcorig LV represents
cache. the original LV without the cache.
.nf .nf
using dm-cache: using dm-cache:
$ lvs -a -o name,vgname,lvattr,origin,segtype,devices vg $ lvs -a
LV VG Attr Origin Type Devices LV Pool Type Devices
[fast] vg Cwi-aoC--- linear /dev/fast(xx) main [fast_cvol] cache main_corig(0)
main vg Cwi-a-C--- [main_corig] cache main_corig(0) [fast_cvol] linear /dev/fast
[main_corig] vg owi-aoC--- linear /dev/slow(0) [main_corig] linear /dev/slow
using dm-writecache: using dm-writecache:
$ lvs -a -o name,vgname,lvattr,origin,segtype,devices vg $ lvs -a
LV VG Attr Origin Type Devices LV Pool Type Devices
[fast] vg -wi-ao---- linear /dev/fast(xx) main [fast_cvol] writecache main_wcorig(0)
main vg Cwi-a----- [main_wcorig] writecache main_wcorig(0) [fast_cvol] linear /dev/fast
[main_wcorig] vg -wi-ao---- linear /dev/slow(0) [main_wcorig] linear /dev/slow
using dm-cache (with cachepool):
$ lvs -a
LV Pool Type Devices
main [fast_cpool] cache main_corig(0)
[fast_cpool] cache-pool fast_pool_cdata(0)
[fast_cpool_cdata] linear /dev/fast
[fast_cpool_cmeta] linear /dev/fast
[main_corig] linear /dev/slow
.fi .fi
.B 5. Use the main LV .B 5. Use the main LV
@ -106,7 +116,12 @@ changes the type of the main LV back to what it was before the cache was
attached. attached.
.nf .nf
$ lvconvert --splitcache vg/main $ lvconvert --splitcache vg/main
$ lvs -a
LV VG Attr Type Devices
fast vg -wi------- linear /dev/fast
main vg -wi------- linear /dev/slow
.fi .fi
@ -122,7 +137,7 @@ attached.
.I LV .I LV
.br .br
Pass this option a standard LV. With a cache vol, cache data and metadata Pass this option a standard LV. With a cachevol, cache data and metadata
are contained within the single LV. This is used with dm-writecache or are contained within the single LV. This is used with dm-writecache or
dm-cache. dm-cache.
@ -252,15 +267,15 @@ LV that references two sub LVs, one for data and one for metadata.
To create a cache pool from two separate LVs: To create a cache pool from two separate LVs:
.nf .nf
$ lvcreate -n fastpool -L DataSize vg /dev/fast1 $ lvcreate -n fast -L DataSize vg /dev/fast1
$ lvcreate -n fastpoolmeta -L MetadataSize vg /dev/fast2 $ lvcreate -n fastmeta -L MetadataSize vg /dev/fast2
$ lvconvert --type cache-pool --poolmetadata fastpoolmeta vg/fastpool $ lvconvert --type cache-pool --poolmetadata fastmeta vg/fast
.fi .fi
Then use the cache pool LV to start caching the main LV: Then use the cache pool LV to start caching the main LV:
.nf .nf
$ lvconvert --type cache --cachepool fastpool vg/main $ lvconvert --type cache --cachepool fast vg/main
.fi .fi
A variation of the same procedure automatically creates a cache pool when A variation of the same procedure automatically creates a cache pool when
@ -271,10 +286,9 @@ cache pool LV from the two specified LVs, and use the cache pool to start
caching the main LV. caching the main LV.
.nf .nf
$ lvcreate -n fastpool -L DataSize vg /dev/fast1 $ lvcreate -n fast -L DataSize vg /dev/fast1
$ lvcreate -n fastpoolmeta -L MetadataSize vg /dev/fast2 $ lvcreate -n fastmeta -L MetadataSize vg /dev/fast2
$ lvconvert --type cache --cachepool fastpool \\ $ lvconvert --type cache --cachepool fast --poolmetadata fastmeta vg/main
--poolmetadata fastpoolmeta vg/main
.fi .fi
.SS dm-cache cache modes .SS dm-cache cache modes
@ -433,7 +447,6 @@ normal lvcreate commands in which --type specifies the type of the newly
created LV. In this case, an LV with type cache-pool is being created, created LV. In this case, an LV with type cache-pool is being created,
and the existing main LV is being converted to type cache.) and the existing main LV is being converted to type cache.)
\&
.SH SEE ALSO .SH SEE ALSO
.BR lvm.conf (5), .BR lvm.conf (5),