[OPEN] Ensure that trim is working for my SSD

First check the forums - Do not know where to put it then put it here
Post Reply
DizzyRope
recruit crewman
Posts: 1
Joined: Mon May 17, 2021 10:54 pm

[OPEN] Ensure that trim is working for my SSD

Post by DizzyRope »

I brought a SSD recently and I read the arch wiki about SSDs but I have one thing that confuses me is that there are two services for fstrim: fstrim.service and fstrim.timer. However, when I look on other websites they all just enable fstrim.timer and not fstrim.service. So my question is it fine to have fstrim.service inactive?

The commands I used so far:
1)

Code: Select all

sudo systemctl enable fstrim.timer
2)

Code: Select all

sudo systemctl enable fstrim.timer
Should I also enable fstrim.service?
1)

Code: Select all

sudo systemctl enable fstrim.service
2)

Code: Select all

sudo systemctl enable fstrim.service

User avatar
erikdubois
Captain
Posts: 4131
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

Re: [OPEN] Ensure that trim is working for my SSD

Post by erikdubois »

timer is a kind of count down - randomizer to let the service start

if you did not enable the service - nothing will be started by the time and you will have an error since the timer wants to start a service that is not there.

Interesting read

https://www.addictivetips.com/ubuntu-li ... -on-linux/
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.

DizzyRope
recruit crewman
Posts: 1
Joined: Mon May 17, 2021 10:54 pm

Re: [OPEN] Ensure that trim is working for my SSD

Post by DizzyRope »

if you did not enable the service - nothing will be started by the time
That makes sense lol and thanks for the link !

I get this error when I run

Code: Select all

sudo systemctl enable fstrim.service

Code: Select all

The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.
 
Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.
Last edited by DizzyRope on Tue May 18, 2021 10:55 pm, edited 2 times in total.

User avatar
erikdubois
Captain
Posts: 4131
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

Re: [OPEN] Ensure that trim is working for my SSD

Post by erikdubois »

I suppose the timers are supposed to activate it.
You can probably read that in the system file.
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.

Post Reply

Return to “General Questions”