mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
96626f64fa
This patch allows users to create cache LVs with 'lvcreate'. An origin or a cache pool LV must be created first. Then, while supplying the origin or cache pool to the lvcreate command, the cache can be created. Ex1: Here the cache pool is created first, followed by the origin which will be cached. ~> lvcreate --type cache_pool -L 500M -n cachepool vg /dev/small_n_fast ~> lvcreate --type cache -L 1G -n lv vg/cachepool /dev/large_n_slow Ex2: Here the origin is created first, followed by the cache pool - allowing a cache LV to be created covering the origin. ~> lvcreate -L 1G -n lv vg /dev/large_n_slow ~> lvcreate --type cache -L 500M -n cachepool vg/lv /dev/small_n_fast The code determines which type of LV was supplied (cache pool or origin) by checking its type. It ensures the right argument was given by ensuring that the origin is larger than the cache pool. If the user wants to remove just the cache for an LV. They specify the LV's associated cache pool when removing: ~> lvremove vg/cachepool If the user wishes to remove the origin, but leave the cachepool to be used for another LV, they specify the cache LV. ~> lvremove vg/lv In order to remove it all, specify both LVs. This patch also includes tests to create and remove cache pools and cache LVs. |
||
---|---|---|
.. | ||
activate | ||
cache | ||
cache_segtype | ||
commands | ||
config | ||
datastruct | ||
device | ||
display | ||
error | ||
filters | ||
format1 | ||
format_pool | ||
format_text | ||
freeseg | ||
label | ||
locking | ||
log | ||
metadata | ||
mirror | ||
misc | ||
mm | ||
properties | ||
raid | ||
replicator | ||
report | ||
snapshot | ||
striped | ||
thin | ||
unknown | ||
uuid | ||
zero | ||
Makefile.in |