Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Milan Broz <mbroz-H+wXaHxf7aLQT0dZR+AlfA <at> public.gmane.org>
Subject: Re: Status of trim for SSds?
Newsgroups: gmane.linux.kernel.device-mapper.dm-crypt
Date: Friday 15th July 2011 14:48:01 UTC (over 5 years ago)
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
 
CD: 3ms