diff --git a/disks_checks.sh b/disks_checks.sh index 250da8b..0adf81d 100755 --- a/disks_checks.sh +++ b/disks_checks.sh @@ -19,7 +19,7 @@ ## The first part of this script checks for disk usage and alerts if it exceeds 94% ## The second part of this script checks for missing disks on btrfs raid1 devices and alerts ntfy in case of missing devices -## The third part of this script checks for read/write errors on disks in mounted partitions and alerts ntfy in case of errors (WARNING: only checked with 1 or 2 max disks in array) +## The third part of this script checks for read/write errors on disks in mounted partitions and alerts ntfy in case of errors (WARNING: only checked with 1 or 2 max disks in array) TODO: add detection for how many disk in array and change script (the -gt part) # the ntfy instance where you are senfing alerts to: topicurl=https://NTFY_SERVER_IP/disk_alerts @@ -60,6 +60,7 @@ if (btrfs fi show | grep -wic "Some devices missing"); then fi ### check errors on btrfs devices +#TODO: add detection for how many disk in array and change script (the -gt part) # get list of btrfs mounted partition, put all results in a single line separated by a comma and remove the last comma mounted_btrfs_partitions="$(mount | grep btrfs | awk '{print $3}' | tr '\n' ',' | awk '{sub(/,$/,""); print}')"