Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Share Post: Digg Delicious Reddit Twitter StumbleUpon
[CentOS] Adaptec RAID 2405 arcconf monitoring
02-10-2011, 12:17 PM (This post was last modified: 03-14-2011 03:05 PM by quad3datwork.)
Post: #1
[CentOS] Adaptec RAID 2405 arcconf monitoring
Get Adaptec Storage Manager from here here and extract it somewhere.

Once extracted, the only file you need is ./cmdline/arcconf. I copied it to /usr/sbin/ and chmod +x it.

Install compatibility C++ libraries first:
Code:
yum install compat-libstdc++-33
Otherwise you'll get this error when you try to run arcconf:
Quote:./arcconf: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

Run following to see your array status:
Code:
/usr/sbin/arcconf getconfig 1

PHP Code:
Controllers found1
----------------------------------------------------------------------
Controller information
----------------------------------------------------------------------
   
Controller Status                        Optimal
   Channel description                      
SAS/SATA
   Controller Model                         
Adaptec 2045
   Controller Serial Number                 
8A1710420E1
   Physical Slot                            
1
   Temperature                              
39 C102 F (Normal)
   
Installed memory                         128 MB
   Copyback                                 
Disabled
   Background consistency check             
Disabled
   Automatic Failover                       
Enabled
   
Global task priority                     High
   Performance Mode                         
: Default/Dynamic
   Stayawake period                         
Disabled
   Spinup limit internal drives             
0
   Spinup limit external drives             
0
   Defunct disk drive count                 
0
   Logical devices
/Failed/Degraded          1/0/0
   SSDs assigned to MaxIQ Cache pool        
0
   Maximum SSDs allowed in MaxIQ Cache pool 
8
   NCQ status                               
Enabled
   Statistics data collection mode          
Enabled
   
--------------------------------------------------------
   
Controller Version Information
   
--------------------------------------------------------
   
BIOS                                     5.2-(17544)
   
Firmware                                 5.2-(17544)
   
Driver                                   1.1-(2461)
   
Boot Flash                               5.2-(17544)

----------------------------------------------------------------------
Logical device information
----------------------------------------------------------------------
Logical device number 0
   Logical device name                      
4x1tb
   RAID level                               
10
   Status of logical device                 
Optimal
   Size                                     
1906676 MB
   Stripe
-unit size                         256 KB
   Read
-cache mode                          Enabled
   MaxIQ preferred cache setting            
Disabled
   MaxIQ cache setting                      
Disabled
   Write
-cache mode                         Disabled (write-through)
   
Write-cache setting                      Disabled (write-through)
   
Partitioned                              Yes
   
Protected by Hot-Spare                   No
   Bootable                                 
Yes
   Failed stripes                           
No
   Power settings                           
Disabled
   
--------------------------------------------------------
   
Logical device segment information
   
--------------------------------------------------------
   
Group 0Segment 0                       Present (0,1)      WD-WMATV0356546
   Group 0
Segment 1                       Present (0,2)      WD-WMATV0318596
   Group 1
Segment 0                       Present (0,0)      WD-WMATV0357021
   Group 1
Segment 1                       Present (0,3)      WD-WMATV0315213


----------------------------------------------------------------------
Physical Device information
----------------------------------------------------------------------
      
Device #0
         
Device is a Hard drive
         State                              
Online
         Supported                          
Yes
         Transfer Speed                     
SATA 1.5 Gb/s
         Reported Channel
,Device(T:L)       : 0,0(0:0)
         
Vendor                             WDC
         Model                              
WD1002FBYS-0
         Firmware                           
03.00C05
         Serial number                      
WD-WMATV0357021
         Size                               
953869 MB
         Write Cache                        
Enabled (write-back)
         
FRU                                None
         S
.M.A.R.T.                         : No
         S
.M.A.R.Twarnings                0
         Power State                        
Full rpm
         Supported Power States             
Full rpm,Powered off
         SSD                                
No
         MaxIQ Cache Capable                
No
         MaxIQ Cache Assigned               
No
         NCQ status                         
Enabled
      Device 
#1
         
Device is a Hard drive
         State                              
Online
         Supported                          
Yes
         Transfer Speed                     
SATA 1.5 Gb/s
         Reported Channel
,Device(T:L)       : 0,1(1:0)
         
Vendor                             WDC
         Model                              
WD1002FBYS-0
         Firmware                           
03.00C05
         Serial number                      
WD-WMATV0356546
         Size                               
953869 MB
         Write Cache                        
Enabled (write-back)
         
FRU                                None
         S
.M.A.R.T.                         : No
         S
.M.A.R.Twarnings                0
         Power State                        
Full rpm
         Supported Power States             
Full rpm,Powered off
         SSD                                
No
         MaxIQ Cache Capable                
No
         MaxIQ Cache Assigned               
No
         NCQ status                         
Enabled
      Device 
#2
         
Device is a Hard drive
         State                              
Online
         Supported                          
Yes
         Transfer Speed                     
SATA 1.5 Gb/s
         Reported Channel
,Device(T:L)       : 0,2(2:0)
         
Vendor                             WDC
         Model                              
WD1002FBYS-0
         Firmware                           
03.00C05
         Serial number                      
WD-WMATV0318596
         Size                               
953869 MB
         Write Cache                        
Enabled (write-back)
         
FRU                                None
         S
.M.A.R.T.                         : No
         S
.M.A.R.Twarnings                0
         Power State                        
Full rpm
         Supported Power States             
Full rpm,Powered off
         SSD                                
No
         MaxIQ Cache Capable                
No
         MaxIQ Cache Assigned               
No
         NCQ status                         
Enabled
      Device 
#3
         
Device is a Hard drive
         State                              
Online
         Supported                          
Yes
         Transfer Speed                     
SATA 1.5 Gb/s
         Reported Channel
,Device(T:L)       : 0,3(3:0)
         
Vendor                             WDC
         Model                              
WD1002FBYS-0
         Firmware                           
03.00C05
         Serial number                      
WD-WMATV0315213
         Size                               
953869 MB
         Write Cache                        
Enabled (write-back)
         
FRU                                None
         S
.M.A.R.T.                         : No
         S
.M.A.R.Twarnings                0
         Power State                        
Full rpm
         Supported Power States             
Full rpm,Powered off
         SSD                                
No
         MaxIQ Cache Capable                
No
         MaxIQ Cache Assigned               
No
         NCQ status                         
Enabled


Command completed successfully

(Sorry to use PHP code wrap. Regular quoting looks really ugly! Big Grin)

I also included a bash script that you can cron it for monitoring. Shoot your an email and all the good stuff. Cool
Code:
#!/bin/bash

EMAILS="YOUR_EMAIL_HERE@YOUR_DOMAIN.COM"
DATE=`date '+%F_%H:%M:%S'`
DETECTOR=`/usr/sbin/arcconf getconfig 1 |grep -i optimal |wc -l`
REPEAT=`find /tmp -mmin +10 -name .raid_email.txt`



if [ "$DETECTOR" -ne "2" ]
then
        [[ ! -f "/tmp/.raid_email.txt" ]] && touch /tmp/.raid_email.txt

        if [ -n "$REPEAT" ]
        then
                touch /tmp/.raid_email.txt
        elif [ -z "$REPEAT" ]
        then
                exit 1
        fi

cat > /tmp/raid_email.txt << EOF

################################################################################​######
   `hostname -f` is having RAID ARRAY failure. Please check ASAP!!!
################################################################################​######

"/usr/sbin/arcconf getconfig 1"
The time now is... `echo $DATE`

=============
SHORT REPORT:
=============
`/usr/sbin/arcconf getconfig 1 |grep -i "Controller Status"`
`/usr/sbin/arcconf getconfig 1 |grep -i "Status of logical device"`



============
FULL REPORT:
============
`/usr/sbin/arcconf getconfig 1`
EOF

        cat /tmp/raid_email.txt |mailx -s "`hostname -f` RAID FAILURE!!!" $EMAILS
        rm -f /tmp/raid_email.txt 2>/dev/null
fi


exit 0

It'll only fire an email every 10 minutes no matter how you set it in cron. If you want to set it lower, change the "-mmin +10" to something like "-mmin +5". That'll fire it every 5 minutes. I put this feature in because 99% of the time people would cron this minutely. Well, getting an email about your RAID array about to fail is nice... but it gets quite annoying after about 20 emails or so.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [CentOS] Good repositories? quad3datwork 2 811 12-09-2011 08:02 PM
Last Post: aatish910
  [CentOS][HowTo] Install Nagios NRPE quad3datwork 3 1,549 03-31-2011 11:33 PM
Last Post: Sree
  [CentOS] Monitor HDs with Smartmontools quad3datwork 1 1,091 03-04-2011 01:58 PM
Last Post: quad3datwork
  Nagios memory monitoring quad3datwork 0 293 01-27-2011 01:18 PM
Last Post: quad3datwork

Forum Jump:


User(s) browsing this thread: 2 Guest(s)

System Administrator (SysAdmin) Forum - SysAdminTalk.Net