I'm running Ubuntu 10.04 on top of a RAID-1 array. Out of curiosity, I decided to bring up the "Disk Utility" program to inspect the status of my array. To my surprise, the array was listed as "Degraded", with one of the drives being faulty. Had my other drive failed, I would have lost all my data. Is there a way to setup Ubuntu to automatically notify me via email or some other means when RAID is degraded?
It seems strange to have such great software RAID support in Ubuntu, and then throw it all away by not communicating RAID failures to the user. I was thinking of writing a cron job to monitor "cat /proc/mdstat" and send me an email if the "failed drive" pattern was seen, but I don't want to reinvent the wheel.