1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-09 12:58:41 +03:00
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
..
2018-11-06 14:18:41 -06:00
2016-01-21 12:11:37 +01:00
2018-11-06 14:18:41 -06:00
2017-07-10 14:58:33 +02:00
2016-01-21 12:11:37 +01:00
2017-03-28 16:11:35 +01:00
2018-11-06 14:18:41 -06:00
2018-11-06 14:18:41 -06:00
2018-07-09 15:29:12 +02:00
2016-01-21 12:11:37 +01:00
2016-01-21 12:11:37 +01:00
2017-06-27 00:27:36 +02:00
2018-07-09 15:29:16 +02:00
2018-11-06 14:18:41 -06:00
2018-06-15 11:03:55 -05:00
2016-01-21 12:11:37 +01:00
2018-07-11 11:26:42 -05:00
2018-07-11 11:26:42 -05:00
2018-07-11 11:26:42 -05:00
2016-06-28 02:30:31 +01:00
2018-06-15 11:03:55 -05:00
2018-07-11 11:26:42 -05:00
2018-07-11 11:26:42 -05:00
2016-01-21 12:11:37 +01:00
2018-06-08 14:36:59 +02:00
2018-07-11 11:26:42 -05:00
2016-01-21 12:11:37 +01:00
2018-06-13 14:14:03 -05:00
2016-01-21 12:11:37 +01:00
2018-06-08 14:18:09 +01:00
2018-11-06 14:18:41 -06:00
2018-11-06 14:18:41 -06:00
2018-04-30 16:55:02 -05:00
2018-07-11 11:26:42 -05:00
2018-11-05 17:25:11 +01:00
2018-07-11 11:26:42 -05:00
2018-07-11 11:26:42 -05:00
2018-05-10 16:03:19 -05:00
2018-07-11 11:26:42 -05:00
2018-07-11 11:26:42 -05:00
2018-07-11 11:26:42 -05:00
2018-06-12 09:46:11 -05:00
2018-06-12 09:46:11 -05:00
2018-07-11 11:26:42 -05:00
2018-07-11 11:26:42 -05:00