Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd April 2014, 16:31
craig baker craig baker is offline
Senior Member
 
Join Date: Mar 2008
Posts: 119
Thanks: 0
Thanked 5 Times in 5 Posts
 
Default Anyone wondering about dell/ Perc raid support - and checking raid read on

I've got a poweredge 2970 and as you may know its raid utility is a version of LSI MegaCLI. But raid status is not shown by ISPCONFIG3 - until now.

the monitor page is located at
/usr/local/ispconfig/server/lib/classes/monitor_tools.inc.php

if you add this code:
--snip--

/*
* Check, if MegaCLI LSI RAID is enabled
*/
if (file_exists('/opt/MegaRAID/MegaCli/MegaCli64')) {
/*
* Fetch the output
*/
$data['output'] = shell_exec('/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL');

/*
* Then calc the state.
*/
$tmp = explode("\n", $data['output']);
$state = 'ok';
$state = $this->_setState($state,$data['output']);
}
--snip---
RIGHT before the block containing 'Check if we have mpt-status installed'

now you will find that checking raid status outputs useful (for us) information like:

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :ServerHD
RAID Level : Primary-6, Secondary-0, RAID Level Qualifier-3
Size : 1.817 TB
Sector Size : 512
Parity Size : 930.5 GB
State : Optimal
Strip Size : 64 KB
Number Of Drives : 6
Span Depth : 1
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk's Default
Encryption Type : None
Is VD Cached: No

and we see our Raid State is Optimal! Nothing to worry about.

but - you ask - what if it goes Bad? Then it would say Degraded or Failed.

here is a little script to email YOU when the unthinkable occurs:
--snip--
#!/bin/bash
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL > raidstate1.txt
cat raidstate1.txt | grep "Optimal" > /dev/null
if [[ $? -eq 1 ]];
then
cat raidstate1.txt | mailx -s 'Degraded RAID on '$HOSTNAME youremail@com
fi
--snip--
just cron this every 10 minutes and you will get a warning when Optimal is NOT present in the output.

enjoy!
cdb.
Reply With Quote
The Following User Says Thank You to craig baker For This Useful Post:
webguyz (4th April 2014)
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
MyDNS Install Problems - rezilient Installation/Configuration 4 18th April 2013 21:48
Installation -- pcre_exec.c:403: internal compiler error: Segmentation fault zerman Installation/Configuration 2 23rd September 2008 23:58
Ubuntu 8.04 server edition ISPconfig installation error malinens Installation/Configuration 4 30th July 2008 07:30
Update php shajazzi Server Operation 6 6th April 2008 18:20
ERROR: Could not configure PHP -- Ubuntu 6.06 djoseph74 Installation/Configuration 11 10th February 2008 05:48


All times are GMT +2. The time now is 22:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.