{"id":3577,"date":"2013-01-15T19:24:42","date_gmt":"2013-01-15T17:24:42","guid":{"rendered":"http:\/\/mummila.net\/kommentit\/?p=3577"},"modified":"2013-01-16T09:44:22","modified_gmt":"2013-01-16T07:44:22","slug":"what-exactly-do-the-allow-discards-and-root_trim-linux-parameters-do","status":"publish","type":"post","link":"https:\/\/mummila.net\/kommentit\/2013\/01\/15\/what-exactly-do-the-allow-discards-and-root_trim-linux-parameters-do\/","title":{"rendered":"What exactly do the &#8217;allow-discards&#8217; and &#8217;root_trim&#8217; Linux parameters do?"},"content":{"rendered":"<p>A lot of SSD-related instructions online currently say you should add\u00a0<strong>allow-discards<\/strong>\u00a0and <strong>root_trim=yes<\/strong>\u00a0to your GRUB_CMDLINE_LINUX. I have yet to find one that says\u00a0<em>why<\/em>\u00a0you should do that, i.e. what exactly (if anything!) do those parameters do.\u00a0<strong>Where is the documentation on this and what does it say about those two parameters&#8217; purpose?<\/strong><\/p>\n<p>According to\u00a0<a href=\"http:\/\/code.google.com\/p\/cryptsetup\/wiki\/Cryptsetup140#wikimaincol\">Cryptsetup 1.4.0 Release Notes<\/a>,<\/p>\n<blockquote><p>Since kernel 3.1, dm-crypt devices optionally (not by default) support block discards (TRIM) commands. If you want to enable this operation, you have to enable it manually on every activation using &#8211;allow-discards<\/p>\n<pre><code>cryptsetup luksOpen --allow-discards \/dev\/sdb test_disk \r\n<\/code><\/pre>\n<\/blockquote>\n<p>but is it the same when passed to the kernel (via GRUB_CMDLINE_LINUX)?<\/p>\n<p><strong>Edit:<\/strong>\u00a0<a href=\"https:\/\/www.kernel.org\/doc\/Documentation\/kernel-parameters.txt\">Kernel.org&#8217;s list of kernel parameters<\/a>\u00a0doesn&#8217;t (currently, Jan 2013, at least) have either of these options.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A lot of SSD-related instructions say you should add allow-discards and root_trim=yes to your GRUB_CMDLINE_LINUX. Where is the documentation on this?<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3922],"tags":[27],"class_list":["post-3577","post","type-post","status-publish","format-standard","hentry","category-aiheeton","tag-linux","sijainti-ask-ubuntu"],"_links":{"self":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/3577","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/comments?post=3577"}],"version-history":[{"count":4,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/3577\/revisions"}],"predecessor-version":[{"id":3580,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/3577\/revisions\/3580"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/media?parent=3577"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/categories?post=3577"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/tags?post=3577"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}