btrfsmaintenance icon indicating copy to clipboard operation
btrfsmaintenance copied to clipboard

Scrubs on different filesystems in parallel?

Open tsweet64 opened this issue 8 months ago • 1 comments

Hello, thanks for this project. I have a question. I notice that the btrfs-scrub.{timer,service} will scrub each filesystem one by one. While not a huge deal, this means that my system spends about 4 days scrubbing each month when it could get it all in one day if each FS were scrubbed in parallel, so it's less likely it can finish completely without interruption by reboots, etc. Does setting BTRFS_ALLOW_CONCURRENCY fix this without causing other trouble? Or would it just make more sense to enable the [email protected] that comes with btrfs-progs?

tsweet64 avatar Apr 05 '25 00:04 tsweet64

The BTRFS_ALLOW_CONCURRENCY works for different tasks, eg. balance vs scrub, not for the same task and the code.

What you ask for is possible, the scrub would be a template service and added for each configured mount point. It may be possible to actually use the service files to enforce either the ordering or allow parallel execution, ie. no need to keep two ways how to run scrub. What I don't know how to do is to transfer the sysconfig to the actual services after change.

kdave avatar Aug 27 '25 16:08 kdave