Created
August 6, 2020 15:06
-
-
Save lanefu/98d5799a6f8ca0bbba0ef03fa0225ffd to your computer and use it in GitHub Desktop.
btrfs progressive balance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
diskpath=/ | |
echo before | |
btrfs filesystem usage ${diskpath} | |
for i in 0 5 10 15 20 25 30 40 50 60 70 80 90 100 | |
do | |
echo "${0}: Running with ${i}%" | |
btrfs filesystem usage ${diskpath} | |
sudo btrfs balance start -dusage=$i -musage=$i ${diskpath} | |
done | |
echo after | |
btrfs filesystem usage ${diskpath} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment