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

fstrim and monitoring for disks #8314

Open
dsseng opened this issue Feb 13, 2024 · 4 comments
Open

fstrim and monitoring for disks #8314

dsseng opened this issue Feb 13, 2024 · 4 comments

Comments

@dsseng
Copy link
Member

dsseng commented Feb 13, 2024

Feature Request

Support periodic FS trimming would not only help bare metal installs, but also thin-provisioned VMs.

hwmon could be useful as well for admins to be able to get CPU/disk/mainboard temperature etc.

Description

Basically the request. Unsure if these can be enabled via extensions, but perhaps these should be available by default, at least discards/fstrim. Maybe this is achievable using stuff like discard=async as well, but some admins use periodic TRIM.

I could possibly develop fstrim stuff if I have time

@onedr0p
Copy link

onedr0p commented Feb 14, 2024

Looks like fstrim can be added as a system extension

https://github.com/siderolabs/extensions?tab=readme-ov-file#tools

There's another issues that touches on your temperature query: #7639

@smira
Copy link
Member

smira commented Feb 14, 2024

Talos already supports some fstrim-related operations on disk wipes. We have some plans for Volume support in Talos, and fstrim might be part of that.

@M4t7e
Copy link

M4t7e commented Nov 5, 2024

It seems trimming is not supported for encrypted volumes. I just used Longhorn with a LUKS2 encrypted volume and tried to trim manually via the Longhorn UI. That responds with this error: unable to trim filesystem for volume test: failed to find valid mountpoint

Discards need to be enabled as they are not by default according to their docs

Enter into the node host the volume is attached to. Enable flag discards for the encrypted volume. The passphrase is recorded in the corresponding secret:
cryptsetup --allow-discards --persistent refresh <Longhorn volume name>

Directly use Longhorn UI to trim the volume or execute fstrim for the mount point of /dev/mapper/ manually.

I thought allow_discards can be enabled with EncryptionConfig.options, but they are only for "additional --perf parameters". Is there any way to enable that for encrypted volumes?

See also: longhorn/longhorn#7836

@onedr0p
Copy link

onedr0p commented Dec 7, 2024

According to the docs looks like xfs_scrub will bring in TRIM support for the OS drive, there's a PR here for Talos.

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

4 participants