This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
computing:storage:adaptec_raid_monitoring [2011/11/01 13:09] 127.0.0.1 external edit |
computing:storage:adaptec_raid_monitoring [2015/03/28 13:03] (current) gcooper |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Adaptec RAID Monitoring ====== | ====== Adaptec RAID Monitoring ====== | ||
- | http:// | + | http:// |
http:// | http:// | ||
- | **Rules** | + | ===== Rules ===== |
+ | |||
+ | | ||
+ | | ||
+ | *Hot-Swap SATA is a myth | ||
+ | * Always back up a degraded array before screwing with it | ||
+ | * Be afraid! | ||
+ | * Never buy Adaptec RAID controllers | ||
+ | * Especially SATA/SAS | ||
+ | * Never trust the output of '' | ||
+ | | ||
+ | |||
+ | ===== Adaptec CLI Tools ===== | ||
+ | |||
+ | These commands download and extract the '' | ||
+ | |||
+ | < | ||
+ | wget ftp:// | ||
+ | rpm2cpio StorMan-4.11.i386.rpm | cpio -ivmur '*arcconf' | ||
+ | </ | ||
+ | |||
+ | Name it ''/ | ||
+ | |||
+ | < | ||
+ | chmod +x / | ||
+ | arcconf getstatus 1 | ||
+ | arcconf getconfig 1 | ||
+ | </ | ||
+ | |||
+ | ===== Monitoring Script ===== | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # raidmon.sh | ||
+ | # | ||
+ | # The intent of this script is to be run frequently from cron to alert a | ||
+ | # sysadmin to RAID problems with Adaptec controllers | ||
+ | |||
+ | # Who to send alerts to | ||
+ | ALERT=" | ||
- | * Never pull a SATA drive out of a running array - shut the server down first. Hot-Swap SATA is a myth. | + | # Where is the arcconf utility |
- | * Always back up a degraded array before screwing with it. Be afraid. | + | ARCCONF="/ |
- | * Never buy Adaptec RAID controllers - especially SATA/SAS | + | |
- | * Never trust the output of arcconf | + | |
- | **Adaptec CLI Tools** | + | # note: this only tests the first array even if there is more than one |
+ | RAIDSTATUS=`$ARCCONF getconfig 1 | awk '/ | ||
- | These commands download and extract the ' | + | if [ " |
+ | then | ||
+ | $ARCCONF getstatus 1 | mail -s "RAID Problem Report for ${HOSTNAME}" | ||
+ | fi | ||
- | '' | + | exit 0 |
- | rpm2cpio StorMan-4.11.i386.rpm | cpio -ivmur ' | + | </file> |
- | '' | + | |
- | Name it "/ | + | ===== Monitor with cron ===== |
- | '' | + | Add to ''/ |
- | arcconf getstatus 1\\ | + | |
- | arcconf getconfig 1'' | + | |
- | **Monitoring Script** | + | < |
+ | # check for RAID array problems every 10 minutes and send out a message | ||
+ | */10 * * * * root / | ||
+ | </ | ||
- | ''# | + | ==== SME Server ==== |
- | # raidmon.sh\\ | + | |
- | #\\ | + | |
- | # The intent of this script is to be run frequently from cron to alert a\\ | + | |
- | # sysadmin to RAID problems with Adaptec controllers\\ | + | |
- | \\ | + | |
- | # Who to send alerts to\\ | + | |
- | ALERT=" | + | |
- | \\ | + | |
- | # Where is the arcconf utility\\ | + | |
- | ARCCONF="/ | + | |
- | \\ | + | |
- | # note: this only tests the first array even if there is more than one\\ | + | |
- | RAIDSTATUS=`$ARCCONF getconfig 1 | awk '/ | + | |
- | \\ | + | |
- | if [ " | + | |
- | then\\ | + | |
- | $ARCCONF getstatus 1 | mail -s "RAID Problem Report for ${HOSTNAME}" | + | |
- | fi\\ | + | |
- | \\ | + | |
- | exit 0'' | + | |
- | **Monitor with cron** | + | < |
+ | mkdir -p / | ||
+ | vi / | ||
+ | </ | ||
- | Add to / | + | Modify per above, then: |
- | \\ | + | |
- | ''# | + | |
- | */10 * * * * root / | + | |
- | \\ | + | |
- | **SME Server** | + | |
- | '' | + | < |
- | vi / | + | expand-template / |
- | \\ | + | cat / |
- | (modify per above)\\ | + | </ |
- | \\ | + | |
- | '' | + | |
- | cat / | + |