A question about SSD and trim with luks.
by camerabambai from LinuxQuestions.org on (#5AM9H)
I'm on Slackware current, first time with a SSD encrypted
I see those parts in rc.S
Code:# <luks_name> <device> <password> <options>
#
# <luks_name>: This is the name of your LUKS volume.
# For example: crypt-home
#
# <device>: This is the device containing your LUKS volume.
# For example: /dev/sda2
#
# <password>: This is either the volume password in plain text, or the name of
# a key file. Use 'none' to interactively enter password on boot.
#
# <options>: Comma-separated list of options. Note that there must be a
# password field for any options to be picked up (use a password of 'none' to
# get a password prompt at boot). The following options are supported:
#
# discard -- this will cause --allow-discards to be passed to the cryptsetup
# program while opening the LUKS volume.This is referred for crypttab, so if I put my root device in /etc/crypttab, and I put in options discard I'm sure on boot my encrypted ssd will accept the discard/trim(I want to use periodically, not the continuous discard/trim).?
Or I must change something even for initrd?
How to check if all works?
A fstrim -Av is sufficient at reboot to check? Thanks


I see those parts in rc.S
Code:# <luks_name> <device> <password> <options>
#
# <luks_name>: This is the name of your LUKS volume.
# For example: crypt-home
#
# <device>: This is the device containing your LUKS volume.
# For example: /dev/sda2
#
# <password>: This is either the volume password in plain text, or the name of
# a key file. Use 'none' to interactively enter password on boot.
#
# <options>: Comma-separated list of options. Note that there must be a
# password field for any options to be picked up (use a password of 'none' to
# get a password prompt at boot). The following options are supported:
#
# discard -- this will cause --allow-discards to be passed to the cryptsetup
# program while opening the LUKS volume.This is referred for crypttab, so if I put my root device in /etc/crypttab, and I put in options discard I'm sure on boot my encrypted ssd will accept the discard/trim(I want to use periodically, not the continuous discard/trim).?
Or I must change something even for initrd?
How to check if all works?
A fstrim -Av is sufficient at reboot to check? Thanks