Fstrim on EL9 with nvme0n1

Yeah, RHEL pretty much always had services disabled by default, whereas for example Debian always had them enabled. Debian in fact has fstrim.timer enabled by default, like it does with Apache, Postfix, MySQL etc.

In terms of security, at least for services that open ports it’s best to have them disabled by default. The fstrim.timer one though could be enabled by default, it can cause a performance hit when it runs, but if it’s only doing that once a week perhaps it won’t be noticeable anyway. But then that was the same when using discard in fstab.

We can use ansible playbooks to configure our servers accordingly, and I use these once I have a base install to enable the stuff I would want running on a server, one of which could be for fstrim.timer. It would be easy enough to have the playbook check the disk types from Ansible facts in the server, and enable fstrim.timer if it has SSD/NVMe.

1 Like