Btrfs scrub

Hi all,
I am thinking of turning on btrfs-scrub but wanted to limit IOReadBandwidthMax as per the wiki to not overheat my NVMe drive. I created /etc/systemd/system/btrfs-scrub@.d/override.conf with the following content:

IOReadBandwidthMax='/dev/disk/by-uuid/<UUID from fstab> 1K'

I figured with such a low number I could make sure the read was slow and the temp shouldn’t climb that much, but it quickly climbs regardless of the number I put in there. My thoughts are one: I really don’t understand how IOReadBandwidthMax works and two I should use something different other than by-uuid?

BTW I’m testing this by running systemctl start btrfs-scrub@var-log which is one my subvolumes.

Also if I understand scrub correctly once I have this configured correctly I should only have to do the root subvolume which would be btrfs-scrub@- is that correct as well?

Thanks in advance

Best way to not overheat your drive is to run the scrub when the system is idle. I use btrfsmaintenance (in the AUR, Github site is here:, schedule btrfs scrub and btrfs balance once per month, on all BTRFS-mounted devices. I’ve never had any errors reported related to drive temps getting out of hand.

Interesting, when I tested it my drive temps climbed to 80 pretty quickly which is why I’m trying to limit the IO as suggested in the Arch Wiki

As far as I know, scrub will always scrub the entire filesystem. It doesn’t matter which path or device you give it.

1 Like

After more reading and experimentation I finally have the working. First I had to create the drop-in for for the specific mount point, btrfs-scrub@- I also had the syntax for IOReadBandwidthMax incorrect, I was putting the entry in quotes and apparently you don’t need to add quotes. I also changed the reference from by-uuid to by-path and referenced the partition path.