1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/device
David Teigland 3ae5569570 Add dm-writecache support
dm-writecache is used like dm-cache with a standard LV
as the cache.

$ lvcreate -n main -L 128M -an foo /dev/loop0

$ lvcreate -n fast -L 32M -an foo /dev/pmem0

$ lvconvert --type writecache --cachepool fast foo/main

$ lvs -a foo -o+devices
  LV            VG  Attr       LSize   Origin        Devices
  [fast]        foo -wi-------  32.00m               /dev/pmem0(0)
  main          foo Cwi------- 128.00m [main_wcorig] main_wcorig(0)
  [main_wcorig] foo -wi------- 128.00m               /dev/loop0(0)

$ lvchange -ay foo/main

$ dmsetup table
foo-main_wcorig: 0 262144 linear 7:0 2048
foo-main: 0 262144 writecache p 253:4 253:3 4096 0
foo-fast: 0 65536 linear 259:0 2048

$ lvchange -an foo/main

$ lvconvert --splitcache foo/main

$ lvs -a foo -o+devices
  LV   VG  Attr       LSize   Devices
  fast foo -wi-------  32.00m /dev/pmem0(0)
  main foo -wi------- 128.00m /dev/loop0(0)
2018-11-06 14:18:41 -06:00
..
bcache-utils.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
bcache.c debug: missing backtrace 2018-11-05 17:25:11 +01:00
bcache.h metadata: prevent writing beyond metadata area 2018-10-29 16:53:17 -05:00
dev-cache.c cleanup: move cast to det_t into MKDEV macro 2018-11-05 17:25:11 +01:00
dev-cache.h Remove code for using files as devices 2018-06-21 09:33:21 -05:00
dev-dasd.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
dev-ext-udev-constants.h dev-type: check for DEVLINKS udev db variable existence if udev_device_get_is_initialized fn is not present 2016-09-06 13:21:29 +02:00
dev-ext.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
dev-io.c cov: drop uneeded header files 2018-10-15 17:49:44 +02:00
dev-luks.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
dev-lvm1-pool.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
dev-md.c scan: use full md filter when md 1.0 devices are present 2018-06-15 12:21:25 -05:00
dev-swap.c build: Don't generate symlinks in include/ dir 2018-05-14 10:30:20 +01:00
dev-type.c Add dm-writecache support 2018-11-06 14:18:41 -06:00
dev-type.h Add dm-writecache support 2018-11-06 14:18:41 -06:00
device-types.h devices: Recognise Veritas Dynamic Multipathing 2017-01-10 22:23:23 +00:00
device.h scan: work around udev problems by avoiding open RDWR 2018-06-20 14:08:12 -05:00