Categories
User Help

cache_writeback of thin-provisioning-tools running failed

I use Ubuntu 16.04 with kernel 5.4 and thin-provisioning-tools version 0.8.5

I want to test the cache_xml and cache_writeback tools of thin-provisioning, but it failed.

I have two SSD as RAID0 and use them to be a dm-cache device.

blockdev --getsz /dev/sdb
    937703088
blockdev --getsz /dev/sdc
    937703088

sudo dmsetup remove_all
sudo dmsetup create test-dev-260074 --table "0 8192 linear /dev/sdb 0"
sudo dmsetup create test-dev-693500 --table "0 1048576 linear /dev/sdb 8192"
sudo dmsetup create test-dev-671419 --table "0 8388608 linear /dev/sdc 0"
sudo dd if=/dev/zero of=/dev/mapper/test-dev-260074 bs=512 count=8 seek=0

Create a random cache xml

sudo cache_xml create --block-size 64 --nr-cache-blocks 16384 --nr-mappings 16384 --dirty-percent 50 > metadata.xml

Restore cache to cache device

sudo cache_restore   -i metadata.xml -o /dev/mapper/test-dev-260074

Write back dirty data to the data device

sudo cache_writeback --metadata-device /dev/mapper/test-dev-260074 --fast-device /dev/mapper/test-dev-693500 --origin-device /dev/mapper/test-dev-671419 --buffer-size-meg 16

Copying data: [==================================================]   100%
8126/8126 blocks successfully copied.
Updating metadata ... clearing dirty flag for block 0
clearing dirty flag for block 2
clearing dirty flag for block 3
clearing dirty flag for block 4
clearing dirty flag for block 5
clearing dirty flag for block 10
clearing dirty flag for block 12
...
clearing dirty flag for block 2539
clearing dirty flag for block 2540
clearing dirty flag for block 2543
clearing dirty flag for block 2545

attempt to write lock block 13 concurrently

echo $?
$> 1

I don’t know why this fail, and the document doesn’t tell very clearly.

Leave a Reply

Your email address will not be published. Required fields are marked *