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

Defrag: Allow to set target extent size #110

Open yennor opened 1 year ago

yennor commented 1 year ago

I've had a DB file with 500 000 extends which just never got defraged. After looking into it, I found that the defrag command by default uses -t 32m . After doing the defrag with a lot bigger -t value, I managed to get the extends down to 5000. So it would be cool if we could set the -t value in the config.