Add script-drives-fix-btrfs-full
This commit is contained in:
17
script-drives-fix-btrfs-full
Normal file
17
script-drives-fix-btrfs-full
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Fix the btrfs out of space error
|
||||||
|
# Copyright 2021 Bryan C. Roessler
|
||||||
|
|
||||||
|
[[ -f functions ]] && . functions || exit 1
|
||||||
|
|
||||||
|
is_root
|
||||||
|
|
||||||
|
fs=( "/mnt/array" "/mnt/backup" )
|
||||||
|
|
||||||
|
# Discard empty blocks
|
||||||
|
for f in "${fs[@]}"; do
|
||||||
|
btrfs balance start -dusage=0 "$f"
|
||||||
|
btrfs balance start -musage=0 "$f"
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $?
|
||||||
Reference in New Issue
Block a user