Last active
September 25, 2017 22:30
-
-
Save dominicusin/a51a8688929c7ec81f53b79eb398694c to your computer and use it in GitHub Desktop.
btrfs optimisation
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
for filesystem in $(mount -t btrfs | awk '{print $3}' ) | |
do | |
mount -o remount,clear_cache $filesystem | |
btrfs balance start -v -f --full-balance -dconvert=single,usage=99 -mconvert=single,usage=99 -sconvert=single,usage=99 $filesystem | |
btrfs filesystem defragment -v -r -czlib -f $filesystem | |
btrfs scrub start -BdRf $filesystem | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment