quick script to check the status of a linux raid 3ware controller
3ware is a pretty common controller in linux boxes, there is a command utility tw_cli to check the status. You can automate the checking via a simple bash script that you can put into your cron. here is some code
#!/bin/bash
com=`/path_to_ tw_cli/tw_cli info c0 u0 status | awk ‘{print $4}’`
echo $com
if [ “$com” = “DEGRADED” ];
then
mail -s “RAID Warning” you@domain.com < body
fi
Posted: February 12th, 2008 under Linux, Disaster Recovery.
Comments: none
Write a comment