| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
# This is an example cron.daily file, which one could use to do a cheap |
| 4 |
# daily check of the RAID arrays. You might be better off setting up a |
| 5 |
# proper monitoring system though. |
| 6 |
|
| 7 |
test -x /usr/bin/cciss_vol_status || exit 0 |
| 8 |
|
| 9 |
STATUS=0 |
| 10 |
|
| 11 |
if [ -d /proc/driver/cciss ]; then |
| 12 |
DEVS=`grep -h 'cciss/c.*d0:' /proc/driver/cciss/cciss* |awk -F: '{print "/dev/" $1}'` |
| 13 |
OUTPUT=`/usr/bin/cciss_vol_status $DEVS` |
| 14 |
if [ $? -ne 0 ]; then |
| 15 |
printf "%s\n" "$OUTPUT" |
| 16 |
exit 1 |
| 17 |
fi |
| 18 |
fi |
| 19 |
|
| 20 |
# FIXME: This cronjob should also look at the scsi generic nodes |
| 21 |
# (/dev/sg*?) to cover the hpsa driver, fibre-attached MSA1000 family |
| 22 |
# devices, or the hpahcisr software RAID driver (see cciss_vol_status(8) |
| 23 |
# about how to choose the correct nodes -- i don't use these other |
| 24 |
# devices, so I cannot verify how to check them cleanly) |
| 25 |
# |
| 26 |
# -- Daniel Kahn Gillmor <[email protected]> |
| 27 |
# Mon, 20 Sep 2010 18:12:31 -0400 |
| 28 |
|
| 29 |
exit 0 |