kdave / btrfsmaintenance

Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag on selected mountpoints or directories.
GNU General Public License v2.0
897 stars 79 forks source link

possible confusion in documentation regarding paths/mountpoints #89

Open Termuellinator opened 3 years ago

Termuellinator commented 3 years ago

First of all - thanks for this project :)

I've just set it up and for an initial baseline i ran the defrag, balance and scrub scripts. In the config file i've set / and /home to be scrubbed, which are subvolumes on the same btrfs partiton.

sudo btrfs scrub status / now returns the exact same output as sudo btrfs scrub status /home - thus making the impression that scrub is run across all subvolumes and not just the provided mountpoint. I couldn't find anything about that in the btrfs documentation though so i thought i'd post it here.

For BTRFS_DEFRAG_PATHS it is explicitly mentioned that it doesn't cross mountpoints, for BTRFS_BALANCE_MOUNTPOINTS and BTRFS_SCRUB_MOUNTPOINTS it isn't 100% clear to me if it does or not. As i've assumed the "does not cross" rule applies to all settings, balance and scrub is run multiple times.

Now that i look at it, the differentiation between _PATHS and _MOUNTPOINTS kind of indicates this, but maybe it would be good to include a hint to that in the comments for the respecting settings? Or am i totally wrong with my conclusion that scrub and balance cross subvolumes?