Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I monitor the status of a RAID array on an Intel controller from a Windows application?

I need to check the status of a RAID array on an Intel controller from my Windows application periodically (or be notified about a status change). Specifically, what I need is to find out whether a RAID 5 array is healthy or one of its disks is missing.

I tried parsing output of raidcfg32 (available from the Intel site, see this readme), but it works only with one of servers my application need to monitor. On other servers raidcfg32 reports an ‘unsupported hardware’ error. I also tried CmdTool2, but it was unable to find the controller altogether.

The only remaining option of RAID array monitoring supplied by Intel is a bunch of GUI applications (Intel Matrix Storage Management Console, Intel Rapid Storage Technology).

The controllers in question are: ESB2, 631xESB/632xESB.

I believe I have read through the few posts here on Stack Overflow that are relevant to my problem, and none of them contains an answer. In an answer to the question ‘Can I get Raid disk status by using PS?’, for instance, what is suggested actually allows to check if the controller, not the array, is healthy (it always is).

What am I looking for is an automated way of accessing the status information (from a .NET application, to be specific). Any option is good, be it via WMI, a .NET or native API, console output parsing or whatever.

I find it confusing that the suggested way of monitoring RAID status is via a GUI application. What approaches are used in enterprise deployments with tens of servers to do this programmatically?

like image 207
Helgi Avatar asked Feb 27 '23 11:02

Helgi


1 Answers

I've been looking for this also. I have ICHxxx series controllers and am trying to get a contact at Intel to respond about the existance of a public API, but I'm not optimistic.

Here's what I've come up with for the short-term. Intel records the RAID events to the Windows Event Log under "IAANTmon". So you can use System.Diagnostics.EventLog, hooking the EventWrittenEventHandler, then filtering for "IAANTmon".

        EventLog eLog = new EventLog("Application");
        eLog.EntryWritten += new EntryWrittenEventHandler(OnEntryWrittenEvent);
        eLog.EnableRaisingEvents = true;

and

    public static void OnEntryWrittenEvent(object source, EntryWrittenEventArgs e)
    {
        if (e.Entry.Source == "IAANTmon")
        {
         ...
        }
    }
like image 182
EJA Avatar answered Apr 28 '23 07:04

EJA