You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After performing an encrypted install of elementary on an SSD, the TRIM command will not work on the root partition because it's missing a configuration option.
Steps to Reproduce
Install elementary, selecting the default encrypted setup the installer offers.
Boot the newly installed system and run sudo fstrim -av
Expected Behavior
Expected output of sudo fstrim -av:
/boot/efi: 251,7 MiB (263872512 bytes) trimmed on /dev/nvme0n1p1
/boot: 11,2 MiB (11714560 bytes) trimmed on /dev/nvme0n1p2
/: 3,3 GiB (3517906944 bytes) trimmed on /dev/mapper/data-root
Actual output of sudo fstrim -av:
/boot/efi: 251,7 MiB (263872512 bytes) trimmed on /dev/nvme0n1p1
/boot: 11,2 MiB (11714560 bytes) trimmed on /dev/nvme0n1p2
Currently TRIM is only working on the boot partitions. It's important to let the TRIM command pass through to the root partition too. Ubuntu and Fedora are already doing this.
To fix this:
Edit /etc/crypttab and add the missing discard option to the cryptdata entry.
Rebuild the initramfs sudo update-initramfs -u -k all(reference).
Reboot.
OS Version
6.1 (Jólnir)
Software Version
Latest release (I have run all updates)
Log Output
No response
Hardware Info
No response
The text was updated successfully, but these errors were encountered:
o-alquimista
changed the title
Missing 'discard' option for encrypted device in /etc/crypttab
SSD TRIM not working on encrypted root partition
Dec 8, 2022
What Happened?
After performing an encrypted install of elementary on an SSD, the TRIM command will not work on the root partition because it's missing a configuration option.
Steps to Reproduce
sudo fstrim -av
Expected Behavior
Expected output of
sudo fstrim -av
:Actual output of
sudo fstrim -av
:Expected contents of
/etc/crypttab
:Actual contents of
/etc/crypttab
:Currently TRIM is only working on the boot partitions. It's important to let the TRIM command pass through to the root partition too. Ubuntu and Fedora are already doing this.
To fix this:
/etc/crypttab
and add the missing discard option to thecryptdata
entry.sudo update-initramfs -u -k all
(reference).OS Version
6.1 (Jólnir)
Software Version
Latest release (I have run all updates)
Log Output
No response
Hardware Info
No response
The text was updated successfully, but these errors were encountered: