Closed davidmwilkinson closed 3 years ago
This is a duplicate of #71.
I cannot speak for @kdave but I guess a PR would be welcome. I have modified according to your commit on systems where I use btrfs, and it works.
Thanks for the analysis and fix #94.
I noticed this past month that the scrub job happened twice:
I had changed my scrub period to start at 4AM every 1st of the month prior to this. However, when I check via systemctl what the next trigger time is, it still reports that it's scheduled to start at midnight on July 1:
systemctl shows 2 entries for
TimersCalendar
when investigating:Upon inspection, this same thing occurs with the other periods I'd overridden:
But not with trim, which I had left disabled with the 'none' period:
After some digging, I found this:
The last paragraph of the section describes the change I'm proposing. Changing the drop-in files for the timers to this:
will reset the list of timers and respect only the period specified in the /etc/sysconfig/btrfsmaintenance file. Without this change, the default period is always used in addition to the values explicitly specified.
I've forked and made a commit for what I believe the change should be here: https://github.com/davidmwilkinson/btrfsmaintenance/commit/aa7cbc3c3054b8c3c8f353f04c0b588b946a8e70
I can open a PR if desired, but since it's a one line change it's up to you