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.
(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.
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 11:38 PM.|