Enable SSD Trim Support in Fedora 23

Posted on Wed 18 November 2015 in misc

# systemctl enable fstrim.timer
Created symlink from /etc/systemd/system/multi-user.target.wants/fstrim.timer to /usr/lib/systemd/system/fstrim.timer.
# systemctl start fstrim.timer
# 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 Wed 2015-11-18 08:28:03 EST; 4s ago
     Docs: man:fstrim

Nov 18 08:28:03 bender systemd[1]: Started Discard unused blocks once a week.
Nov 18 08:28:03 bender systemd[1]: Starting Discard unused blocks once a week.

For a one-off trim:

# fstrim -av
/mnt/tmp: 2 GiB (2088632320 bytes) trimmed
/home: 238 GiB (255537582080 bytes) trimmed
/boot: 337 MiB (353354752 bytes) trimmed
/: 43.8 GiB (47024533504 bytes) trimmed