Log in

No account? Create an account
brad's life [entries|archive|friends|userinfo]
Brad Fitzpatrick

[ website | bradfitz.com ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

megaraid ioctl hell [Nov. 12th, 2004|10:30 pm]
Brad Fitzpatrick
Anybody got specs on the /dev/megadev ioctl interface, enough to write an open source command-line utility to check drive state?

The existing closed-source tools "megamgr" and "megamon" are the most piss-poor and non-scriptable pieces of crap I've ever seen.

The old MegaRAID driver at least had a human-readable /proc interface in Linux 2.4, but if you want to use Linux 2.6 (and there are dozens of reasons, mostly performance) then you're stuck with the legacy driver (older than the one Linux 2.4) or the new one without a human-readable (script-parsable) /proc interface.

So I'm stuck inferring the interface from the source, which is a pain. (I could move the 2.4 driver to 2.6, but the old driver is kinda deprecated for a reason, and it'd be painful enough that I'd rather figure out the ioctl stuff)

Judging from mailing lists, there isn't a sysadmin in the world that's happy with managing/monitoring these cards under Linux.

If I write an open-source utilty to do it, I'll be a god among men.

Update: okay, not so much of a pain as I thought. drivers/scsi/megaraid/mbox_defs.h seems to be the goldmine.