mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
2aed2a41f7
To create a new cache or writecache LV with a single command: lvcreate --type cache|writecache -n Name -L Size --cachedevice PVfast VG [PVslow ...] - A new main linear|striped LV is created as usual, using the specified -n Name and -L Size, and using the optionally specified PVslow devices. - Then, a new cachevol LV is created internally, using PVfast specified by the cachedevice option. - Then, the cachevol is attached to the main LV, converting the main LV to type cache|writecache. Include --cachesize Size to specify the size of cache|writecache to create from the specified --cachedevice PVs, otherwise the entire cachedevice PV is used. The --cachedevice option can be repeated to create the cache from multiple devices, or the cachedevice option can contain a tag name specifying a set of PVs to allocate the cache from. To create a new cache or writecache LV with a single command using an existing cachevol LV: lvcreate --type cache|writecache -n Name -L Size --cachevol LVfast VG [PVslow ...] - A new main linear|striped LV is created as usual, using the specified -n Name and -L Size, and using the optionally specified PVslow devices. - Then, the cachevol LVfast is attached to the main LV, converting the main LV to type cache|writecache. In cases where more advanced types (for the main LV or cachevol LV) are needed, they should be created independently and then combined with lvconvert. Example ------- user creates a new VG with one slow device and one fast device: $ vgcreate vg /dev/slow1 /dev/fast1 user creates a new 8G main LV on /dev/slow1 that uses all of /dev/fast1 as a writecache: $ lvcreate --type writecache --cachedevice /dev/fast1 -n main -L 8G vg /dev/slow1 Example ------- user creates a new VG with two slow devs and two fast devs: $ vgcreate vg /dev/slow1 /dev/slow2 /dev/fast1 /dev/fast2 user creates a new 8G main LV on /dev/slow1 and /dev/slow2 that uses all of /dev/fast1 and /dev/fast2 as a writecache: $ lvcreate --type writecache --cachedevice /dev/fast1 --cachedevice /dev/fast2 -n main -L 8G vg /dev/slow1 /dev/slow2 Example ------- A user has several slow devices and several fast devices in their VG, the slow devs have tag @slow, the fast devs have tag @fast. user creates a new 8G main LV on the slow devs with a 2G writecache on the fast devs: $ lvcreate --type writecache -n main -L 8G --cachedevice @fast --cachesize 2G vg @slow |
||
---|---|---|
.. | ||
.exported_symbols | ||
.gitignore | ||
args.h | ||
cmdnames.h | ||
command-lines.in | ||
command.c | ||
command.h | ||
commands.h | ||
dumpconfig.c | ||
errors.h | ||
formats.c | ||
license.inc | ||
lv_props.h | ||
lv_types.h | ||
lvchange.c | ||
lvconvert_poll.c | ||
lvconvert_poll.h | ||
lvconvert.c | ||
lvcreate.c | ||
lvdisplay.c | ||
lvextend.c | ||
lvm2cmd-static.c | ||
lvm2cmd.c | ||
lvm2cmd.h | ||
lvm2cmdline.h | ||
lvm-static.c | ||
lvm.c | ||
lvmcmdlib.c | ||
lvmcmdline.c | ||
lvmdiskscan.c | ||
lvpoll.c | ||
lvreduce.c | ||
lvremove.c | ||
lvrename.c | ||
lvresize.c | ||
lvscan.c | ||
Makefile.in | ||
polldaemon.c | ||
pvchange.c | ||
pvck.c | ||
pvcreate.c | ||
pvdisplay.c | ||
pvmove_poll.c | ||
pvmove_poll.h | ||
pvmove.c | ||
pvremove.c | ||
pvresize.c | ||
pvscan.c | ||
reporter.c | ||
segtypes.c | ||
stub.h | ||
tags.c | ||
tool.h | ||
toollib.c | ||
toollib.h | ||
tools.h | ||
vals.h | ||
vgcfgbackup.c | ||
vgcfgrestore.c | ||
vgchange.c | ||
vgck.c | ||
vgcreate.c | ||
vgdisplay.c | ||
vgexport.c | ||
vgextend.c | ||
vgimport.c | ||
vgimportclone.c | ||
vgmerge.c | ||
vgmknodes.c | ||
vgreduce.c | ||
vgremove.c | ||
vgrename.c | ||
vgscan.c | ||
vgsplit.c |