User Tools

Site Tools


computing:storage:adaptec_raid_monitoring

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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://www.adaptec.com/en-US/downloads/storage_manager/sm?productId=SAS-3405&dn=Adaptec+RAID+3405\\+http://www.adaptec.com/en-US/downloads/storage_manager/sm?productId=SAS-3405&dn=Adaptec+RAID+3405 
 http://download.adaptec.com/pdfs/user_guides/CLI_v6_10_Users_Guide.pdf http://download.adaptec.com/pdfs/user_guides/CLI_v6_10_Users_Guide.pdf
  
-**Rules**+===== Rules ===== 
 + 
 +  Never pull a SATA drive out of a running array 
 +    *Shut the server down first 
 +    *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 ''arcconf'' 
 +    Carefully reboot the server and verify using the BIOS 
 + 
 +===== Adaptec CLI Tools ===== 
 + 
 +These commands download and extract the ''arcconf'' tool: 
 + 
 +<file> 
 +wget ftp://ftp.supermicro.com/CDR-LPZCR1_1.11_for_AOC-LPZCR1_AOC-SOZCR1/ASM/ASM4859/linux/StorMan-4.11.i386.rpm 
 +rpm2cpio StorMan-4.11.i386.rpm | cpio -ivmur '*arcconf' 
 +</file> 
 + 
 +Name it ''/usr/sbin/arcconf''
 + 
 +<file> 
 +chmod +x /usr/sbin/arcconf 
 +arcconf getstatus 1 
 +arcconf getconfig 1 
 +</file> 
 + 
 +===== Monitoring Script ===== 
 + 
 +<file> 
 +#!/bin/bash 
 +# 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="you@yourdomain.com"
  
-  * 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="/usr/sbin/arcconf"
-  * Never buy Adaptec RAID controllers - especially SATA/SAS +
-  * Never trust the output of arcconf - carefully reboot the server and verify using the BIOS.+
  
-**Adaptec CLI Tools**+# note: this only tests the first array even if there is more than one 
 +RAIDSTATUS=`$ARCCONF getconfig 1 | awk '/Status of logical device/ {print $6; exit}'`
  
-These commands download and extract the 'arcconf' tool:+if [ "$RAIDSTATUS" != "Optimal"
 +then 
 +$ARCCONF getstatus 1 | mail -s "RAID Problem Report for ${HOSTNAME}" "$ALERT" 
 +fi
  
-''wget %%ftp://ftp.supermicro.com/CDR-LPZCR1_1.11_for_AOC-LPZCR1_AOC-SOZCR1/ASM/ASM4859/linux/StorMan-4.11.i386.rpm%%\\ +exit 0 
-rpm2cpio StorMan-4.11.i386.rpm | cpio -ivmur '*arcconf'\\ +</file>
-''+
  
-Name it "/usr/sbin/arcconf".+===== Monitor with cron =====
  
-''chmod +x /usr/sbin/arcconf\\ +Add to ''/etc/crontab'':
-arcconf getstatus 1\\ +
-arcconf getconfig 1''\\+
  
-**Monitoring Script**+<file> 
 +# check for RAID array problems every 10 minutes and send out a message 
 +*/10 * * * * root /root/raidmon.sh 2>&
 +</file>
  
-''#!/bin/bash\\ +==== 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="gcooper@sonoracomm.com"\\ +
-\\ +
-# Where is the arcconf utility\\ +
-ARCCONF="/usr/sbin/arcconf"\\ +
-\\ +
-# note: this only tests the first array even if there is more than one\\ +
-RAIDSTATUS=`$ARCCONF getconfig 1 | awk '/Status of logical device/ {print $6; exit}'`\\ +
-\\ +
-if [ "$RAIDSTATUS" !"Optimal" ]\\ +
-then\\ +
-$ARCCONF getstatus 1 | mail -s "RAID Problem Report for ${HOSTNAME}" "$ALERT"\\ +
-fi\\ +
-\\ +
-exit 0''\\+
  
-**Monitor with cron**+<file> 
 +mkdir -p /etc/e-smith/templates-custom/etc/crontab 
 +vi /etc/e-smith/templates-custom/etc/crontab/40raidmon 
 +</file>
  
-Add to /etc/crontab:\\ +Modify per above, then:
-\\ +
-''# check for RAID array problems every 10 minutes and send out a message\\ +
-*/10 * * * * root /root/raidmon.sh 2>&1''\\ +
-\\ +
-**SME Server**+
  
-''mkdir -p /etc/e-smith/templates-custom/etc/crontab\\ +<file> 
-vi /etc/e-smith/templates-custom/etc/crontab/40raidmon''\\ +expand-template /etc/crontab 
-\\ +cat /etc/crontab 
-(modify per above)\\ +</file>
-\\ +
-''expand-template /etc/crontab\\ +
-cat /etc/crontab''+
computing/storage/adaptec_raid_monitoring.1320174540.txt.gz · Last modified: 2011/12/19 10:49 (external edit)