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

Enable fstrim on LUKS encrypted partitions #31

Open
hferreiro opened this issue Mar 20, 2020 · 3 comments
Open

Enable fstrim on LUKS encrypted partitions #31

hferreiro opened this issue Mar 20, 2020 · 3 comments
Labels
enhancement New feature or request upstream Issue reported, fixed or related to upstream projects

Comments

@hferreiro
Copy link

Apparently, the Silverblue edition, in contrast with Workstation, is missing /etc/crypttab in the initramfs, preventing the trimming of the root and home partitions: https://bugzilla.redhat.com/show_bug.cgi?id=1801539.

@tpopela
Copy link
Contributor

tpopela commented Mar 27, 2020

There are several ways of how to achieve it mentioned in the bug:

rpm-ostree initramfs --enable --arg=-I --arg=/etc/crypttab but this will rebuild the initramfs on each new deployment.

or

You can just add rd.luks.options=discard to the kargs. That way rpm-ostree doesn't have to rebuild the initramfs on each new deployment. You can do that by rpm-ostree kargs --append=rd.luks.options=discard

the question is though whether we should do this automatically after we enabled it for Fedora Workstation in 32+ - https://fedoraproject.org/wiki/Changes/EnableFSTrimTimer

@hferreiro
Copy link
Author

Thanks, I was aware of those options, I just wanted to bring it to your attention so that this works by default from F32 onwards.

@A6GibKm
Copy link

A6GibKm commented Mar 27, 2020

When I run systemctl start fstrim.service with rd.luks.options=discard enabled my home is not being trimmed on a system with LUKS 1, but it is trimmed on my machine with LUKS 2. Is this normal?

EDIT: For some reason the discard option was missing in /etc/crypttab on my LUKS1 machine.

@travier travier added enhancement New feature or request help wanted stale Old issues that need an update and removed help wanted labels Aug 19, 2022
@travier travier changed the title enable fstrim on LUKS encrypted partitions Enable fstrim on LUKS encrypted partitions May 15, 2023
@travier travier added need-info Further information is requested f37 Related to Fedora 37 f38 Related to Fedora 38 f39 Related to Fedora 39 labels May 15, 2023
@travier travier added upstream Issue reported, fixed or related to upstream projects and removed need-info Further information is requested f37 Related to Fedora 37 stale Old issues that need an update f38 Related to Fedora 38 f39 Related to Fedora 39 labels May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request upstream Issue reported, fixed or related to upstream projects
Projects
None yet
Development

No branches or pull requests

4 participants