On 07/15/2011 03:59 PM, Christian Hesse wrote:
> Ok, I do have a kernel with discard on dm-crypt support now. How do I
> set this option allow_discards for my device using dmsetup? dmsetup's
> manpage does not tell anything about it.
Backup your data, really. Note there could be still bugs.
You have to manually reload table with discard enabled for now,
it is quite complicated and dangerous because you will manipulate with
master key string directly:
1) Activate device using cryptsetup, remember active table for your device,
including key:
# dmsetup table --showkeys
table will look like "0 1234 crypt aes-xts-plain64 0 8:2 8192"
(with different parameters according to your device,
do not forget --showkeys option)
2) Reload table with discard enabled, (add " 1 allow_discards"
to the end of table line)
# dmsetup load --" 1 allow_discards"
3) activate new table
# dmsetup resume
(check that dmsetup table again - it should print discard support now)
Alternatively, you can activate table directly (instead of cryptsetup)
# dmsetup create --table " 1 allow_discards")
If you do not understand what are you doing here, please _wait_ until there
is official userspace support.
Any mistake here will cause data corruption or complete data loss!
Milan
_______________________________________________
dm-crypt mailing list
[email protected]http://www.saout.de/mailman/listinfo/dm-crypt