I would like to create a COW device for an existing block device using dmsetup
. The block device is:
# blockdev --getsz /dev/loop0
3534848
I am trying to use a 256M ramdisk as the backing store:
# blockdev --getsz /dev/zram1
524288
I am using the following command, which appears to match the documentation as well as other sources:
# dmsetup create mysnap --table '0 3534848 snapshot /dev/loop0 /dev/zram1 N 4'
But it fails with:
device-mapper: reload ioctl on mysnap failed: Invalid argument
Command failed
And the kernel provides the following additional information:
[ 8372.346442] device-mapper: table: 253:11: snapshot: Couldn't create exception store
[ 8372.346454] device-mapper: ioctl: error adding target to table
I am hoping someone can explain why the above command is resulting in an error.