Provide control to initiate btrfs balance on btrfs-formatted array devices and single cache device.

Remove preset btrfs balance options; btrfs-raid1 is default only for initial creation of multi-device pool.
DeviceInfo shows all check/balance/scrub operations but greyed out depending on arry started state.
This commit is contained in:
Tom Mortensen
2017-03-30 09:08:50 -07:00
parent f282325491
commit 04ac51eda5
2 changed files with 32 additions and 24 deletions
+3 -1
View File
@@ -5,7 +5,9 @@
case "$1" in
'start')
exec /sbin/btrfs balance start $3 $2 &>/dev/null &
options=$3
[[ -z "${options// }" ]] && options="--full-balance"
exec /sbin/btrfs balance start $options $2 &>/dev/null &
;;
'status')
/sbin/btrfs balance status $2