Jan 6, 2013

openSUSE Forums: How to enable TRIM on Luks-encrypted SSD on boot?

openSUSE Forums
openSUSE Forums
How to enable TRIM on Luks-encrypted SSD on boot?
Jan 6th 2013, 16:05

Hi,

I recently bought an Intel 520 SSD on which I installed Opensuse 12.2 within an Luks-encrypted LVM container for an ext4-filesystem. My kernel (3.XX) and Cryptsetup (1.5), as well as the file-system (Ext4) support TRIM-commands through the "discard" option as I understand it; enabled through "/etc/fstab". However for TRIM to fully work, the "discard" option has to be passed onto the crypto filesystem. This can be done manually when opening the container through
Code:

cryptsetup luksOpen --allow-discards /dev/sda2  cr_sda2
and the successfull result verified through
Code:

dmsetup table /dev/mapper/cr_sda2 --showkeys
. However adding either "discard" or "allow-discards" to my "/etc/crypttab"does not have any effect after reboot, despite rebuilding the boot-environment with "mkinitrd".
Code:

cr_sda2 /dev/sda2 none luks,discard,allow-discards
Btw I'm using a boot partition for grub2 etc. (sda1).


What have I done wrong? Any ideas on how to make this work on boot?

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

No comments: