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 found: 1
----------------------------------------------------------------------
Controller information
----------------------------------------------------------------------
Controller Status : Optimal
Channel description : SAS/SATA
Controller Model : Adaptec 2045
Controller Serial Number : 8A1710420E1
Physical Slot : 1
Temperature : 39 C/ 102 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-0 (17544)
Firmware : 5.2-0 (17544)
Driver : 1.1-5 (2461)
Boot Flash : 5.2-0 (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 0, Segment 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.T. warnings : 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.T. warnings : 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.T. warnings : 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.T. warnings : 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!

)
I also included a bash script that you can cron it for monitoring. Shoot your an email and all the good stuff.
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.