Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 11-25-2013, 08:10 AM   #1
Senior Member
Registered: Jan 2008
Distribution: Arch/Knoppix
Posts: 1,638
Blog Entries: 14

Rep: Reputation: 194Reputation: 194
adding --allow-discards to cryptsetup in initrd to allow TRIM in LVM/encrypted SSD

What is the best way of activating TRIM on my LVM encrypted SSD?

I have enabled discard in /etc/lvm/lvm.conf issue_discards=1
and also added discard to the options in fstab, with ext4, which supports TRIM
For the final piece I need to add --allow-discards after luksOpen in the cryptsetup command.

Should I

(a) manually modify the init file in my initrd-tree and remake the initrd.gz, and will that work when the system switches to the real root and changes the names of the LUKS containers from lukssdx to their other names, ie cryptvg?

(b) do something more elegant? Suggestions welcome!

(c) forget about it, TRIM is useless or LUKS is insecure with TRIM etc.
Old 12-05-2013, 07:51 PM   #2
Senior Member
Registered: Jan 2008
Distribution: Arch/Knoppix
Posts: 1,638
Blog Entries: 14

Original Poster
Rep: Reputation: 194Reputation: 194
Well, OK, I guess the answer for me, at this point is (a). Seems to work OK.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I use trim with luks+lvm on ssd? pengStudent Slackware 5 05-16-2013 11:15 AM
SSD reset, TRIM? malloc Linux - Hardware 3 01-19-2013 06:13 PM
Encrypted LVM on a SAN with SSD fast cache drives failure Ladowny Linux - Virtualization and Cloud 0 12-07-2011 07:06 AM
[SOLVED] TRIM on SSD mira.mikes Linux - Kernel 8 01-08-2011 06:36 PM
Encrypted LVM needs a initrd Zmyrgel Slackware 3 09-10-2006 09:46 AM

All times are GMT -5. The time now is 02:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration