diff --git a/check_btrfs/check_btrfs.sh b/check_btrfs/check_btrfs.sh index 3b3ec95..46d48d5 100755 --- a/check_btrfs/check_btrfs.sh +++ b/check_btrfs/check_btrfs.sh @@ -7,7 +7,7 @@ function smart_disks() { fi POOL=$1 - DISKS=$(btrfs device stats / | grep -oP "^\[[^\]]+\]" | sed 's/[][]//g' | sort -u) + DISKS=$(sudo btrfs device stats -c / | grep -oP "^\[[^\]]+\]" | sed 's/[][]//g' | sort -u) ERR_OUTPUT="" HIGHEST_RES=0 for disk in $DISKS; do @@ -50,7 +50,7 @@ function pool_errors() { return 3 fi - OUTPUT="$(btrfs device stats -c $1)" + OUTPUT="$(sudo btrfs device stats -c $1)" STATUS=$? if [[ $STATUS != 0 ]]; then