hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Hosting Security and Technology Tutorials : 3Ware Daily RAID Health Report
Reply

Hosting Security and Technology Tutorials Tutorials related to server security or the like.
Forum Jump

3Ware Daily RAID Health Report

Reply Post New Thread In Hosting Security and Technology Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-15-2006, 04:54 AM
MjrGaelic MjrGaelic is offline
Junior Guru Wannabe
 
Join Date: Jan 2004
Location: Alberta, Canada
Posts: 75

3Ware Daily RAID Health Report


Platform: Linux (CentOS 4.2 of at this writing)
Card: 3Ware Escalade 7506-x Series ATA RAID Controller

I'm really into piece of mind when it comes to my server. One of the critical peices is the RAID Controller. I wouldn't operate a mission critical solution without it.

This lil piece of code checks the status and alarm history of the RAID controller and emails it to me daily.

create a file in your /etc/cron.daily directory. We'll call it say "raidhealth"

Code:
# 3Ware CLI RAID Report 
# Written for my Escalade 7506-4LP 
# 
# You will need the tw_cli file which you can download free 
# from www.3ware.com - save this file in your /sbin directory 
# 
# File is free for use by all but comes as is with no warranty 
# 

################################## 
# variables that you need to set # 
################################## 

email='you@yourdomain.com'    # email where the reports are sent 

################################## 
#      do not edit below         # 
################################## 

hostname=`/bin/hostname` 

# pipe output from the 3Ware CLI to a text file 
/sbin/tw_cli info c0 > /tmp/raidhealth.txt 
echo "" >> /tmp/raidhealth.txt 
echo "" >> /tmp/raidhealth.txt 
/sbin/tw_cli alarms > /tmp/raidalarms.txt 

# combine that text to one file for reporting 
cat /tmp/raidhealth.txt /tmp/raidalarms.txt > /tmp/raidreport.txt 

# send me a copy of that output via email 
mail $email -s"3Ware RAID health report for $hostname" < /tmp/raidreport.txt 

# now clean up the text files we made 
rm -rf /tmp/raidhealth.txt 
rm -rf /tmp/raidalarms.txt 
rm -rf /tmp/raidreport.txt
Save and quit. chmod 755 this file. Now you'll get daily reports from your server about your 3Ware RAID Controller.

Your daily output will look like:
Code:
Controller: c0 
------------- 
Driver: 1.02.00.036 
Model: 7506-4LP 
FW: FE7X 1.05.00.056 
BIOS: BE7X 1.08.00.046 
Monitor: ME7X 1.01.00.038 
Serial #: B14001A3380518 
PCB: Rev4 
PCHIP: 1.30-66 
ACHIP: 3.20 


# of units: 1 
Unit 0: RAID 5 152.66 GB ( 320168960 blocks): OK 

# of ports: 4 
Port 0: Maxtor 6Y080L0 Y30VFXVE 76.33 GB (160086528 blocks): OK(unit 0) 
Port 1: Maxtor 6Y080L0 Y30VH33E 76.33 GB (160086528 blocks): OK(unit 0) 
Port 2: Maxtor 6Y080L0 Y30CPLSE 76.33 GB (160086528 blocks): OK(unit 0) 



Alarms Report for Controller /c0 
Date Severity Alarm Message 
----------------------------------------------------- 
No Alarms Found.
Nothing fancy, but I like it.

Reply With Quote


Sponsored Links
  #2  
Old 03-04-2006, 10:30 PM
propcgamer propcgamer is offline
Aspiring Evangelist
 
Join Date: Oct 2002
Posts: 437
nice job

Reply With Quote
  #3  
Old 03-10-2006, 01:27 AM
Ryan F Ryan F is offline
Junior Guru
 
Join Date: Oct 2002
Posts: 226
This will also work in most cases:

http://www.thetiredwebmaster.com/lin...at-raid-array/

I've had this running for a while now on a couple of systems with hardware RAID cards and it works very well.

Ryan

Reply With Quote
Sponsored Links
  #4  
Old 03-11-2006, 02:57 AM
Eng.Ahmed Eng.Ahmed is offline
New Member
 
Join Date: Feb 2006
Posts: 0
great .. thanks very much

Reply With Quote
  #5  
Old 05-15-2006, 12:30 PM
HostingScala HostingScala is offline
Newbie
 
Join Date: Apr 2006
Posts: 12
Thanks! This is exactly were I was looking for!

Reply With Quote
  #6  
Old 05-15-2006, 05:12 PM
funkytaco funkytaco is offline
Web Hosting Guru
 
Join Date: Mar 2005
Posts: 290
3ware also provides an official tool they call 3DM. It's http based and can alert you of degraded arrays and such.

Q. What does 3ware's 3DM do?
3DM allows you to configure and monitor your storage remotely via a Web browser.
Management features include hot swap capability, error logging, remote configuration, version
details and rebuild pacing. 3DM also alerts you, via email, of critical events such as drive
failures

http://www.3ware.com/supportfaq/3ware_FAQ.pdf

Reply With Quote
  #7  
Old 06-02-2006, 04:46 AM
jmaskell jmaskell is offline
Junior Guru
 
Join Date: Sep 2004
Location: Sussex, England
Posts: 193
Whenever this script runs, I get the following:

Quote:
/etc/cron.daily/raidhealth:

/etc/cron.daily/raidhealth: line 23: /sbin/tw_cli: No such file or directory
/etc/cron.daily/raidhealth: line 26: /sbin/tw_cli: No such file or directory
/etc/cron.daily/raidhealth: line 32: syntax error near unexpected token `newline'
/etc/cron.daily/raidhealth: line 32: `mail $email -s"3Ware RAID health report for $hostname" < '
I assume there is some required software missing, any pointers?

Reply With Quote
  #8  
Old 06-02-2006, 06:27 AM
MjrGaelic MjrGaelic is offline
Junior Guru Wannabe
 
Join Date: Jan 2004
Location: Alberta, Canada
Posts: 75
# You will need the tw_cli file which you can download free
# from www.3ware.com - save this file in your /sbin directory

http://www.3ware.com/support/downloa....4.asp?SNO=867

Reply With Quote
  #9  
Old 06-02-2006, 06:29 AM
MjrGaelic MjrGaelic is offline
Junior Guru Wannabe
 
Join Date: Jan 2004
Location: Alberta, Canada
Posts: 75
..........................

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Swedish Police Raid Web Host PRQ, Take Down File-Sharing and Streaming Sites Web Hosting News 2012-10-02 11:19:32
Search Warrants Used in Raid Against Megaupload Suspect Found Illegal Web Hosting News 2012-06-28 15:11:49
Web Host Myhosting.com Launches HackerWise Security Scanning Service Web Hosting News 2011-12-14 17:30:34
FBI Confiscates Servers from Swiss Web Host DigitalOne's Virginia Site Web Hosting News 2011-06-22 14:00:40
eleven Email Security Report Finds Decrease in US Spam Web Hosting News 2011-06-16 19:17:06


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?