On Fedora 21, looks like there's a new systemd unit "fstrim.timer"
which is disabled by default. Easily enabled with 'systemctl enable
fstrim.timer' and will issue trim for all mounted trim supporting
volumes once per week.
[root@f21s ~]# systemctl status fstrim.timer
● fstrim.timer - Discard unused blocks once a week
Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; disabled)
Active: inactive (dead)
Docs: man:fstrim
[root@f21s ~]# cat /usr/lib/systemd/system/fstrim.timer
[Unit]
Description=Discard unused blocks once a week
Documentation=man:fstrim
[Timer]
OnCalendar=weekly
AccuracySec=1h
Persistent=true
[Install]
WantedBy=multi-user.target
[root@f21s ~]# cat /usr/lib/systemd/system/fstrim.service
[Unit]
Description=Discard unused blocks
[Service]
Type=oneshot
ExecStart=/usr/sbin/fstrim -a
Chris Murphy
On Fedora 21, looks like there's a new systemd unit
"fstrim.timer"
which is disabled by default. Easily enabled with 'systemctl enable
fstrim.timer' and will issue trim for all mounted trim supporting
volumes once per week.