Skip to main content

I'm stupid or something, but how to disassociate <b>dm-cache</b> from blo...

- 2013-04-16T11:34:17+0000 - Updated: 2013-04-16T11:34:17+0000
I'm stupid or something, but how to disassociate dm-cache from block device?
Shared with: Your extended circles, Tomasz Torcz
- 2013-04-16T12:38:46+0000
I'm no expert either but dont you just un mount it?
as in umount /dev/mapper/<cache>  then run dmsetup remove ble-cache
- 2013-04-16T12:45:05+0000
After that I cannot mount backstore device (without cache). There is probably some manual cache flush needed, but I can't find any info in documentation.
- 2013-04-16T13:04:04+0000 - Updated: 2013-04-16T13:06:30+0000
This is what I had scribble down in a file in my backup folder not sure how up2date or accurate it is ( note this is something I had gathered and plan test and to wiki-fy at somepoint ...

$ cat dmcache.txt
To create cache

# echo 0 131072 cache /dev/sdc /dev/sdb 0 8 65536 256 1 | dmsetup create mycache

To see cache table

# dmsetup table mycache

To see cache status

# dmsetup status mycache

To suspend cache

# dmsetup suspend mycache

To flush cache

# echo '0 67108864 cache 253:0 253:1 8:0 512 0 cleaner 0' | dmsetup reload mycache

To resume cache

# dmsetup resume mycache

To wait for cache

# dmsetup wait mycache

## echo '0 67108864 cache 253:0 253:1 8:0 512 1 writeback default 4 random_threshold 8 sequential_threshold 512' | dmsetup reload mycache
- 2013-04-16T14:39:19+0000
"cleaner", that was it. Thanks Jóhann!


Comments powered by Disqus