LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   adding --allow-discards to cryptsetup in initrd to allow TRIM in LVM/encrypted SSD (https://www.linuxquestions.org/questions/slackware-14/adding-allow-discards-to-cryptsetup-in-initrd-to-allow-trim-in-lvm-encrypted-ssd-4175485820/)

mostlyharmless 11-25-2013 08:10 AM

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.

mostlyharmless 12-05-2013 07:51 PM

Well, OK, I guess the answer for me, at this point is (a). Seems to work OK.


All times are GMT -5. The time now is 07:40 AM.