Skip to content

Set RandomizedDelaySec=1h in btrfs-scrub@.timer

Moviuro requested to merge moviuro/btrfs-progs:main into main

Because the timer is Persistent, RandomizedDelaySec= is applied every time the machine boots. systemd.timer(5) states:

Persistent= [...] Such triggering is nonetheless subject to the delay imposed by RandomizedDelaySec=.

This causes the timer's next occurence to be set "far" into the future every time the machine boots. For machines that are not up for extended periods of time, this causes the timer to never actually trigger.

As archlinux ships kernels very often (more than once a week, even for LTS), if users are expected to reboot after each kernel update, the btrfs scrub job has a high chance of never actually running on their machines.

Merge request reports