It would be nice if cciss_vol_status ebuild includes daily cronjob to check status of the arrays as proposed http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg826645.html here. Reproducible: Always
I would suggest a cronjob like this: #!/bin/bash cciss_vol_status /dev/cciss/c*d0 &> /dev/null if [ "$?" -eq 0 ]; then exit 0 fi cciss_vol_status /dev/cciss/c*d0 Please confirm that you agree with the basic premise of not e-mailing until something goes awry. Could you also test that the script behaves as expected on your system. I have tested on SmartArray P400i systems (DL365 G1 & DL385 G2).
I've already using this more then 3 month now without any problems: #!/bin/sh test -x /usr/bin/cciss_vol_status || exit 0 STATUS=0 if [ -d /proc/driver/cciss ]; then DEVS=`grep -h 'cciss/c.*d0:' /proc/driver/cciss/cciss* |awk -F: '{print "/dev/" $1}'` OUTPUT=`/usr/bin/cciss_vol_status $DEVS` if [ $? -ne 0 ]; then printf "%s\n" "$OUTPUT" exit 1 fi fi # FIXME: This cronjob should also look at the scsi generic nodes # (/dev/sg*?) to cover the hpsa driver, fibre-attached MSA1000 family # devices, orthehpahcisr software RAID driver (see cciss_vol_status(8) # about how to choose the correct nodes -- i don't use these other # devices, so i cannot verify how to check them cleanly) # exit 0 It basically the same as your suggestion (with some improvements such are checking for ciss drivers and calling cciss_vol_status only once), therefore any of them will do.
My apologies for the excessive delay Oleg, I lost track of this. It is in CVS now. +*cciss_vol_status-1.09-r1 (27 Jan 2012) + + 27 Jan 2012; Tony Vroon <chainsaw@gentoo.org> -cciss_vol_status-1.02.ebuild, + -cciss_vol_status-1.06.ebuild, +cciss_vol_status-1.09-r1.ebuild, + +files/cciss_vol_status.cron: + Added cron job to check volume status on a daily basis and e-mail for errors. + Suggestion & implementation by Oleg Gawriloff, closes bug #350029. Removed + old ebuilds.