Hi,
I installed TW on a new laptop with an NVMe SSD as the internal drive. Installation detected the SSD and configured fstrim.timer to run once a week. I thought that was cool. But, when I checked journalctl, I found that fstrim is actually running more often than once a week (see CODE block below).
I am guessing that fstrim.timer is running every time I power on (or reboot) the laptop. Is that right? If so, is that a good idea? I am new to NVMe and I do not want to cause unnecessary wear just because I power off the laptop at night or reboot often when testing. Is there some parameter that I can set so that fstrim will run just once a week and NOT at every power on/reboot?
Thanks.
#sudo journalctl -u fstrim.timer
Aug 08 01:34:14 laptop.test systemd[1]: Started Discard unused blocks once a week.
Aug 08 04:35:05 laptop.test systemd[1]: fstrim.timer: Deactivated successfully.
Aug 08 04:35:05 laptop.test systemd[1]: Stopped Discard unused blocks once a week.
-- Boot 4af963e71de544f3acb913a6855936c9 --
Aug 08 18:57:16 laptop.test systemd[1]: Started Discard unused blocks once a week.
Aug 09 04:10:13 laptop.test systemd[1]: fstrim.timer: Deactivated successfully.
Aug 09 04:10:13 laptop.test systemd[1]: Stopped Discard unused blocks once a week.
-- Boot 4f43953df7b042c4a93a91a9cb8ca6aa --
Aug 09 20:15:13 laptop.test systemd[1]: Started Discard unused blocks once a week.
Aug 11 01:51:14 laptop.test systemd[1]: fstrim.timer: Deactivated successfully.
Aug 11 01:51:14 laptop.test systemd[1]: Stopped Discard unused blocks once a week.
-- Boot c80c463bb9304aa784f06d141d7c6156 --
Aug 11 11:29:41 laptop.test systemd[1]: Started Discard unused blocks once a week.
#systemctl list-timers
NEXT LEFT LAST PASSED UNIT ACTIVATES
Fri 2022-08-12 00:00:00 PDT 3h 17min left Thu 2022-08-11 00:00:06 PDT 20h ago logrotate.timer logrotate.service
Fri 2022-08-12 00:00:00 PDT 3h 17min left Thu 2022-08-11 00:00:06 PDT 20h ago man-db.timer man-db.service
Fri 2022-08-12 00:03:52 PDT 3h 21min left Thu 2022-08-11 01:27:06 PDT 19h ago backup-rpmdb.timer backup-rpmdb.service
Fri 2022-08-12 01:07:52 PDT 4h 25min left Thu 2022-08-11 01:38:34 PDT 19h ago backup-sysconfig.timer backup-sysconfig.service
Fri 2022-08-12 01:26:15 PDT 4h 44min left Thu 2022-08-11 00:44:06 PDT 19h ago check-battery.timer check-battery.service
Fri 2022-08-12 11:44:13 PDT 15h left Thu 2022-08-11 11:44:13 PDT 8h ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Mon 2022-08-15 01:39:21 PDT 3 days left Mon 2022-08-08 01:34:14 PDT 3 days ago fstrim.timer fstrim.service
7 timers listed.
#systemctl status 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 2022-08-11 11:29:41 PDT; 8h ago
Until: Thu 2022-08-11 11:29:41 PDT; 8h ago
Trigger: Mon 2022-08-15 01:39:21 PDT; 3 days left
Triggers: ● fstrim.service
Docs: man:fstrim
#lspci | grep SSD
05:00.0 Non-Volatile memory controller: Sandisk Corp WD Black SN750 / PC SN730 NVMe SSD