imap scripts # cat check-raid.sh
cat /proc/mdstat | grep -q "_"
if [ $? -eq 0 ]
then
dmesg | grep "error\|sda\|sdb\|disk"
mdstat /dev/md2 --detail
cat /proc/mdstat
cat /proc/mdstat | mail -s "mdstat disk error" me@gmail.com
fi