From 0b6ad08b5be56852b78a1dee81af06779c7dd7ad Mon Sep 17 00:00:00 2001 From: Tristan PILAT Date: Wed, 22 Apr 2020 17:53:26 +0200 Subject: [PATCH] Add RAID check --- evocheck.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/evocheck.sh b/evocheck.sh index af476ee..45e48e2 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -106,6 +106,15 @@ check_tmoutprofile(){ } check_raidok(){ + egrep 'sd.*RAID' /var/run/dmesg.boot 1> /dev/null 2>&1 + RESULT=$? + if [ $RESULT -eq 0 ]; then + raid_device=$(egrep 'sd.*RAID' /var/run/dmesg.boot | awk '{ print $1 }') + raid_status=$(bioctl $raid_device | grep softraid | awk '{ print $3 }') + if [ $raid_status != "Online" ]; then + failed "IS_RAIDOK" "One of the RAID disk members is faulty. Use bioctl -h $raid_device for more informations" + fi + fi } check_evobackup(){