Ask Your Question

activating discards in dm-crypt

asked 2011-11-11 05:56:18 -0500

koebi gravatar image

updated 2014-09-29 01:28:42 -0500

mether gravatar image

Hello all,

after a couple of years of ubuntu, I decided to give that shiny new fedora a try, mostly because I wanted to be able to trim the encrypted ssd upon bootup.

I know that fedoras new kernel allows to pass trim commands through dm-crypt, but how can I activate this feature?

Similarily I want to activate trim for the swap device, where is the script or service defined that activates swap devices?

Thanks everyone!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-11-11 13:12:27 -0500

mooninite gravatar image

updated 2011-11-11 13:17:29 -0500

First, please note that TRIM support through dm-crypt is considered experimental.

There are also possible security implications of this, too, so if you need complete security you're better off using a rotating disc that won't need TRIM.

With that out of the way, you should read the rough documentation that was posted on the LKML.

I believe you have to compile the latest cryptsetup tools, too, to enable discard. It isn't as simple as passing a kernel parameter or a mount option.

edit flag offensive delete link more

Question Tools


Asked: 2011-11-11 05:56:18 -0500

Seen: 456 times

Last updated: Nov 11 '11