i just installed a 1TB kingston SSD, i cloned my HDD (with Debian 10) so nothing changed besides the performance, i want to set up TRIM for this SSD.
So i've done this:
$ sudo hdparm -I /dev/sda | grep -i TRIM * Data Set Management TRIM supported (limit 8 blocks) $ sudo systemctl cat fstrim.service # /lib/systemd/system/fstrim.service [Unit] Description=Discard unused blocks on filesystems from /etc/fstab Documentation=man:fstrim(8) [Service] Type=oneshot ExecStart=/sbin/fstrim -Av $ sudo systemctl status fstrim.timer ● fstrim.timer - Discard unused blocks once a week Loaded: loaded (/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled) Active: inactive (dead) Trigger: n/a Docs: man:fstrim As you can see in the output from the third command fstrim.timer is inactive, so to activate it i think i should do this:
$ sudo systemctl enable fstrim.service
which outputs:
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. and
$ sudo systemctl start fstrim.timer
which outputs:
Failed to start fstrim.timer: Unit -.mount is masked.
So i don't know what is happening there, i've already searched how to fix this but i can't find a proper answer, i hope someone can help me here, thank you in advance.
sudo systemctl unmask fstrim.timer