This sorta works:
Warning - did not test on failed software raid yet.
checkraid.py
Tweaked for OS X 10.9 and later.
checkraid-10.10.py
To replace a failed drive - software raid 1 assumed:
diskutil list (get new disk name) diskutil appleraid list (get UUIDOFRAID) diskutil appleraid add member diskX UUIDOFRIAD diskutil appleraid remove UUIDOFFAILEDDISK UUIDOFRAID disktuil checkRAID (to see rebuild progress)