Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A Perl script for checking software RAID status OS X Server
Since I have a couple of Mac OS X Server boxes running on non-XServe hardware using Apple's built in software RAID feature, I needed a way to monitor the status of mirrored RAIDs (that is, a way to be notified when one disk blows up, before the entire system fails because the other disk blows up). So I wrote a Perl script that will parse the output of diskutil checkRAID and, if any RAID sets are degraded, will email a warning to a specified email address. You should ideally run this as, say, an hourly cronjob as a non-root user, on a machine that is able to send mail via the unix mail command.

Obviously this isn't terribly sophisticated. I'm sure it'll work for striped disk arrays as well, but there's little point -- once a stripe is degraded, you're going to be restoring from backup. If Apple allows more sophisticated RAIDs in the future (0+1, 5, etc.), then hopefully they'll also provide robust monitoring tools.

You can download the script from my .mac page.

[robg adds: I haven't tested this one...]
  • Currently 2.22 / 5
  You rated: 5 / 5 (9 votes cast)

A Perl script for checking software RAID status | 1 comments | Create New Account
Click here to return to the 'A Perl script for checking software RAID status' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A Perl script for checking software RAID status
Authored by: fulmar2 on Oct 27, '10 10:14:11AM

Thanks for this!!!

[ Reply to This | # ]