should I enable TRIM for my SSD drives on EOS?
(fstrim.service)
Absolutely yes, but if you enable fstrim make sure that discard (continuous TRIM) is disabled for your disks in /etc/fstab
for example if you see entry like:
UUID=ebf74332-5a35-422b-9b69-63412f2a6900 / ext4 defaults,noatime,discard 0 1
Just remove discard
UUID=ebf74332-5a35-422b-9b69-63412f2a6900 / ext4 defaults,noatime 0 1
i can only try making some marketing for our WIKI:
I am confused, I was under the assumption trim is enabled by default for SSD’s? Or is this not the case?
Yes it is, the one called continuous TRIM ( /etc/fstab
), however it is recommended to disable it (solution) and use periodic TRIM with fstrim.service
Hmm - discard wasn’t there.
Ran hdparm -I /dev/sda
Is there another method for determining the type of trim being enabled? Little skeptical of doing the arch wiki method as it mentions (warns) that you might experience data loss running that command.
That’s pretty weird though, by default Arch should use discard for any SSD / NVME drives…
For continuous TRIM that’s pretty much it:
cat "/etc/fstab" | grep -E "discard"
Should return nothing if it’s not in use.
For checking if periodic TRIM is enabled:
systemctl status fstrim.timer
Should be Loaded and Active
Ran: cat “/etc/fstab” | grep -E “discard”
Just came back to another prompt, nothing appeared.
Ran systemctl status fstrim.timer - looks like its not active.
To enabled periodic TRIM
sudo systemctl enable fstrim.timer
sudo systemctl start fstrim.timer
Then try again, should be working
systemctl status fstrim.timer
P.S. You can also change weekly to daily here in that file, but weekly should be fine:
cat "/usr/lib/systemd/system/fstrim.timer"
Sorry for jacking the thread but like this topic.
So now its enabled, does this require any intervention to have it run automatically on reboot?
Nope, should be working just fine on every boot now, well you can test it of course
P.S. Once i’ll get more time i’ll make a writeup on drives…That topic is hot for a reason
appreciate it - just weird that it wasn’t set to discard or fstrim