How should enable and start TRIM on my SSD?

In January I installed Manjaro on my laptop. It has an ssd and an hdd.
Now, I can see trim isn’t active. Why? And, how can I start that?
Here is the info:

# /etc/fstab: static file system information.
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=C0EC-031C                            /boot/efi      vfat    umask=0077 0 2
UUID=8ee88a05-f1e2-466b-a466-2618187b792f /              ext4    defaults,noatime 0 1
UUID=0a149764-a23c-42ac-a17f-b126100b0a6f swap           swap    defaults,noatime 0 0
/dev/disk/by-uuid/f417ae0c-6b9f-45d7-affb-827b6ad26286 /mnt/misc_disk auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=misc_disk 0 0
○ fstrim.timer - Discard unused blocks once a week
     Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; disabled; vendor preset: disabled)
     Active: inactive (dead)
    Trigger: n/a
   Triggers: ● fstrim.service
       Docs: man:fstrim

You can start fstrim with systemctl enable --now fstrim.timer.
You can start fstrim manually with fstrim -Av on console.


I just use discard option in fstab for mounting all ssd devices
I recommend to read this Solid state drive - ArchWiki

Better is to use fstrim.timer. discard has a performance impact, and there’s always a chance that the underlying device ignores a discard operation if the amount of blocks to be discarded is too small.

The fstrim.timer however trims the device once a week — at midnight on Sunday, or if the machine was powered off at that point in time, it’ll run the trim operation upon the next boot — which guarantees that enough blocks will have been gathered for a full trim of all read/write mounted filesystems.

1 Like

What will be the impact of the systemctl enable --now fstrim.timer statement on the HDD?
Will that work normally?

See @Aragorn’s answer:

Fstrim only works with SSDs.

Thanks. Your first answer was selected as solution.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.