Print Friendly

Monitoring an LSI MegaRAID Array

Using the Check a Console Command task it is possible to scan the output of a vendor supplied command-line utility for potential alert conditions. This guide describes regular checks on the health of an LSI RAID array using the StorCLI utility (formerly MegaCLI).

DISCLAIMER: The information provided herein is intended as an example only. No representation is made as to its accuracy, completeness or suitability for a particular purpose or platform (see also the Winserver Wingman EULA). Please test your own implementation thoroughly in the specific environment within which it need function and ensure that it operates as required.

Tested On: Windows Server 2012 R2 with LSI MegaRAID 9240-4i SAS Controller

Command Line

Consult accompanying documentation, the vendor's website or any help text available from the utility itself to determine an appropriate command line to execute. In this case we need only append the parameter show to produce a useful summary which should highlight any problems.

Open a DOS window 'as Administrator' and pipe the output of this command to a text file;

"C:\Program Files\MegaRAID\StorCLI64.exe" show > C:\RAID.txt

Which will create a file that contains something like the following;

Status Code = 0
Status = Success
Description = None
Number of Controllers = 1
Host Name = SERVER2012
Operating System  = Windows Server 2012
System Overview :
Ctl Model                 Ports PDs DGs DNOpt VDs VNOpt BBU  sPR DS EHS ASOs Hlth 
  0 LSIMegaRAIDSAS9240-4i     8   4   2     0   2     0 Msng On  -  Y      1 Opt  
Ctl=Controller Index|DGs=Drive groups|VDs=Virtual drives|Fld=Failed
PDs=Physical drives|DNOpt=DG NotOptimal|VNOpt=VD NotOptimal|Opt=Optimal
Msng=Missing|Dgd=Degraded|NdAtn=Need Attention|Unkwn=Unknown
sPR=Scheduled Patrol Read|DS=DimmerSwitch|EHS=Emergency Hot Spare
Y=Yes|N=No|ASOs=Advanced Software Options|BBU=Battery backup unit
Hlth=Health|Safe=Safe-mode boot

Task Configuration

At the very least we want to check that the last column in the controller status line contains the text Opt but as this fragment appears multiple times in the key below it we'd need to match this using a regular expression along the following lines;


However it's simpler and arguably more thorough to do a plain text search for the expected values beginning at column VNOpt (explained in the key as the number of virtual drives that are non-optimal) through to the overall Hlth column - by simply copying and pasting from our text file;

Check the RAID controller status summary each hour.

Task Parameters

Task Type: Check a Console Command

Frequency: 1 Hour

Execute: C:\Program Files\MegaRAID\StorCLI64.exe

Arguments: show

CAUTION On: (command) ...does not run or its output; does not contain the fragment; Status = Success

FAILURE On: (command) ...runs and its output; does not contain the fragment; 0 Msng On  -  Y      1 Opt

14 August 2016