Thread (2 messages) 2 messages, 2 authors, 2003-04-14

RE: Ways to query RAID status

From: Sean Kormilo <hidden>
Date: 2003-04-14 18:49:51

Vicky,
I am currently monitoring the /proc/mdstat file for the current status, i.e. if there was a Failure detected, if it is currently in the rebuild stage and if there is only one disk currently active, as well as if it is in a good state. This is being done from a perl daemon that is a System V startup process, but it can easily be moved to a C program. 

What some initial testing has found is that during the query of the mdstat file, it was preventing some of our other processes from running. The initial theory is that the opening/closing of the mdstat file to read it is the culprit. So I am looking into moving it to C and monitoring it via an ioctl call with the hopes of streamlining the status checking process. 

Where would I find the appropriate ioctl calls to make in my program? 

Thanks again Sean for the quick response.
Just in case you want it, I've attached my rebuild ioctl patch to this
email.

The md user interface ioctls are defined in the
include/linux/raid/md_u.h file in the kernel source directory.

That being said, I'd still recommend looking at mdadm since it has the
ability to monitor raid arrays. It may already do what you want to do
and save you the hassel of building your own.

Sean.


-- 

Sean C. Kormilo, STORM Software Architect, Nortel Networks
              email: skormilo@nortelnetworks.com
  

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help