1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
lvm2/lib/metadata
Jonathan Brassow 96626f64fa cache: Code to allow the create/remove of cache LVs
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.
2014-02-04 16:50:16 -06:00
..
cache_manip.c cache pool: Add 'update_cache_pool_params' 2014-02-04 11:50:27 -06:00
lv_alloc.h cleanup: self compilable headers 2013-12-12 13:28:19 +01:00
lv_manip.c cache: Code to allow the create/remove of cache LVs 2014-02-04 16:50:16 -06:00
lv.c thin: merge display 2013-12-04 14:30:26 +01:00
lv.h cleanup: self compilable headers 2013-12-12 13:28:19 +01:00
merge.c cache: Code to allow the create/remove of cache LVs 2014-02-04 16:50:16 -06:00
metadata-exported.h cache: Code to allow the create/remove of cache LVs 2014-02-04 16:50:16 -06:00
metadata.c compilation: Rename tags variables to tagsl. 2014-01-30 21:09:28 +00:00
metadata.h compilation: Rename tags variables to tagsl. 2014-01-30 21:09:28 +00:00
mirror.c compilation: Rename tags variables to tagsl. 2014-01-30 21:09:28 +00:00
pool_manip.c cache/pool: Make the fns in pool_manip.c work with cache pools 2014-01-28 12:25:07 -06:00
pv_alloc.h cleanup: self compilable headers 2013-12-12 13:28:19 +01:00
pv_manip.c fix missing header 2013-11-22 21:00:55 +01:00
pv_map.c logging: classify log_debug messages 2013-01-07 22:30:29 +00:00
pv_map.h Track unreserved space for all alloc policies and then permit NORMAL to place 2012-02-01 02:10:45 +00:00
pv.c pre-release 2014-01-20 19:22:56 +00:00
pv.h cleanup: self compilable headers 2013-12-12 13:28:19 +01:00
raid_manip.c raid: add temporary activation for raid metadata clear 2014-02-04 14:51:05 +01:00
replicator_manip.c logging: classify log_debug messages 2013-01-07 22:30:29 +00:00
segtype.c clean: remove unneeded assign 2013-06-17 09:34:56 +02:00
segtype.h cache: New 'cachepool' segment type 2014-01-27 05:27:16 -06:00
snapshot_manip.c thin: snapshot merge support 2013-12-04 14:30:25 +01:00
thin_manip.c misc: disambiguate 'update_pool_params' 2014-02-04 09:58:35 -06:00
vg.c metadata.c: Call refactored vgreduce_single 2013-11-19 14:40:30 -06:00
vg.h cleanup: self compilable headers 2013-12-12 13:28:19 +01:00