Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing 'discard' option for encrypted device in /etc/crypttab #108

Closed
o-alquimista opened this issue Jan 16, 2022 · 1 comment
Closed

Comments

@o-alquimista
Copy link

o-alquimista commented Jan 16, 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

  1. Install elementary, selecting the default encrypted setup the installer offers.
  2. 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

Expected contents of /etc/crypttab:

cryptdata UUID=51f61b21-5e03-4446-a244-6c399769f909 none luks,discard

Actual contents of /etc/crypttab:

cryptdata UUID=51f61b21-5e03-4446-a244-6c399769f909 none luks

Currently TRIM is only working on the boot partitions. It's important to let the TRIM command pass through to the root partition too.

To fix this:

  1. Edit /etc/crypttab and add the missing discard option to the cryptdata entry.
  2. Rebuild the initramfs sudo update-initramfs -u -k all (reference).
  3. Reboot.

OS Version

6.1 (Jólnir)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

@o-alquimista
Copy link
Author

Moved to elementary/installer#674

@o-alquimista o-alquimista closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant