TRIM support is enabled by default in Fedora 32


As a long time Fedora user, I like to keep up with the planning discussions that go into each release. These discussions are super useful for understanding what is coming to Redhat Enterprise Linux and CentOS. One feature I’ve been keeping my eye on is the FSTRIM enabled by default feature. Using TRIM can free unused space on your storage arrays, and is especially important if you use thin provisioned storage devices. Well the day has finally come. In Fedora 32, the fstrim timer is now enabled by default:

$ cat /etc/fedora-release

Fedora release 32 (Thirty Two)

$ systemctl status -l fstrim.timer

● fstrim.timer - Discard unused blocks once a week
     Loaded: loaded (/usr/lib/systemd/system/fstrim.timer; enabled; vendor preset: enabled)
     Active: active (waiting) since Thu 2020-05-14 20:26:14 UTC; 44s ago
    Trigger: Mon 2020-05-18 00:00:00 UTC; 3 days left
   Triggers: ● fstrim.service
       Docs: man:fstrim

May 14 20:26:14 localhost.localdomain systemd[1]: Started Discard unused blocks once a week.

The timer is configured to kick off fstrim once a week, and within a one hour window:

$ cat /usr/lib/systemd/system/fstrim.timer

[Unit]
Description=Discard unused blocks once a week
Documentation=man:fstrim
ConditionVirtualization=!container

[Timer]
OnCalendar=weekly
AccuracySec=1h
Persistent=true

[Install]
WantedBy=timers.target

This is super cool, and should make a ton of storage engineers super happy!

This article was posted by on 2020-05-15 00:00:00 -0500 -0500