Hi all,
First off: I'm a total noob when it comes to BTRFS as i have never used it.
But it somehow got my attention while browsing these forums.
While reading the mentioned guide i noticed some bad info and because that thread is closed i could not reply to it, thats why this new thread
I noticed a mentioning of /lib/systemd/system/fstrim.timer and /etc/systemd/system/timers.target.wants/fstrim.timer and even a post trying to edit that last file.
Here comes the correction to the bad info related to these files:
So the correct way to adjust the frequency that fstrim.service runs is to:
And put the below inside the file that gets created (By default = /etc/systemd/system/fstrim.timer.d/override.conf)
The "OnCalendar=" clears the previous frequency, if you don't use that then it will run "monthly" additionally to the pre-configured value(s).
You can check the configs applied using: (which in my case produces)
And to check the actual used timers for the fstrim.service: (I removed my override.conf and it's directory)
All that said, BTRFS looks very interesting and im sure i will try it one day.
First off: I'm a total noob when it comes to BTRFS as i have never used it.
But it somehow got my attention while browsing these forums.
While reading the mentioned guide i noticed some bad info and because that thread is closed i could not reply to it, thats why this new thread
I noticed a mentioning of /lib/systemd/system/fstrim.timer and /etc/systemd/system/timers.target.wants/fstrim.timer and even a post trying to edit that last file.
Here comes the correction to the bad info related to these files:
- You should never need to access /etc/systemd/system/timers.target.wants/fstrim.timer because it is only a symbolic link to the actual file used...
- The correct way to adjust settings related to any unit as an administrator is to use "systemctl edit <unitname>" (See: systemctl(1))
So the correct way to adjust the frequency that fstrim.service runs is to:
Code:
sudo systemctl edit fstrim.[B]timer[/B]
Code:
[Timer] OnCalendar= OnCalendar=monthly
You can check the configs applied using: (which in my case produces)
Code:
> systemctl cat fstrim.timer # /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 # /etc/systemd/system/fstrim.timer.d/override.conf [Timer] OnCalendar= OnCalendar=monthly
Code:
> systemctl list-timers fstrim NEXT LEFT LAST PASSED UNIT ACTIVATES Mon 2020-08-03 00:00:00 +03 5 days left Mon 2020-07-27 00:00:03 +03 1 day 14h ago fstrim.timer fstrim.service 1 timers listed. Pass --all to see loaded but inactive timers, too.
Comment