Closed CorrosiveTruths closed 3 years ago
Continued from #65
Probably easier to reset the OnCalendar in /etc/systemd/system/btrfs-trim.timer.d/schedule.conf.
E.g.: OnCalendar= OnCalendar=Monday 15:45
I've setup btrfsmaintenance on my Debian Buster system and I've noticed that the issue is still there
I also observe this. Given OnCalendar=
can be specified multiple times (see systemd.timer(5)), the files schedule.conf must indeed be:
[Timer]
OnCalendar=
OnCalendar=Monday 15:45
Fixed by #94.
Affects all timers used in btrfsmaintenance.
Using btrfs-trim as an example:
I set the trim to run every Monday at 15:45 with the following setting. /etc/default/btrfsmaintenance BTRFS_TRIM_PERIOD="Monday 15:45"
Ran the refresh script with systemctl restart btrfsmaintenance-refresh
Ran fine at the allotted time, but then when I check the status of the timer.
systemctl status btrfs-trim.timer Loaded: loaded (/lib/systemd/system/btrfs-trim.timer; enabled; vendor preset: disabled) Drop-In: /etc/systemd/system/btrfs-trim.timer.d └─schedule.conf Trigger: Fri 2019-02-01 00:00:00 GMT; 3 days left
It will run next on the 1st (Friday) of the month at 0:00.
The timer is sourcing both OnCalendar=monthly from the timer section of /lib/systemd/system/btrfs-trim.timer and OnCalendar=Monday 15:45 from the timer section of /etc/systemd/system/btrfs-trim.timer.d/schedule.conf
Removing the OnCalendar=monthly from the timer section of /lib/systemd/system/btrfs-trim.timer and re-running the refresh script fixes the issue.
That won't persist after the package is updated though, so the workaround I'm using is to copy /lib/systemd/system/btrfs-trim.timer as /etc/systemd/system/btrfs-trim.timer and remove the OnCalendar=monthly from the timer section as systemd will read that file instead of the /lib version.