TRIM the Fat

I haven’t had much time to play around with the laptop since swapping the HDD for SSD. So last night I finally made time to finish the installation.

The last step remaining was to setup TRIM so that it would work properly. There are a couple of ways you can do this. You can create a cron job to run fstrim periodically. I chose the alternate route of configuring a timer through systemctl.

The first step was to enable the timer. Here I’m logged in as root so I don’t have to sudo. If it works correctly you should see that it’s created a new symlink.

systemctl enable fstrim.timer
Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/fstrim.timer.

Once the timer has been enabled you can start it so it will run once per week.

systemctl start fstrim.timer

And finally, you can display the status to make sure it’s active and running.

systemctl status fstrim.timer 
fstrim.timer - Discard unused blocks once a week
   Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: disabled)
   Active: active (waiting) since Mon 2016-02-29 23:08:53 EST; 12s ago
     Docs: man:fstrim
Feb 29 23:08:53 fedlap systemd[1]: Started Discard unused blocks once a week.
Feb 29 23:08:53 fedlap systemd[1]: Starting Discard unused blocks once a week.

Post to Twitter

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.