Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-maximum-upload-file-size domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/news.numlock.ch/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the math-captcha domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/news.numlock.ch/public_html/wp-includes/functions.php on line 6114
Mac OS X Snow Leopard Server: Send e-mail alert if RAID 1 degraded/fails/goes offline – A changelog by Daniel Mettler

Mac OS X Snow Leopard Server: Send e-mail alert if RAID 1 degraded/fails/goes offline

By default, Mac OS X Snow Leopard Server (and later versions likely too) doesn’t send any e-mail alerts when a RAID set degraded. Fortunately, sending such a notification can be implemented using a script, as explained in http://serverfault.com/questions/153956/mac-os-x-server-10-6-apples-software-mirrored-raid-worth-it:

# vi /etc/periodic/daily/150.check-raid

# cat /etc/periodic/daily/150.check-raid

#!/bin/sh
# This script checks for any degraded/offline/failed/whatever software
# RAIDs, and if any are found emails a note to an admin.  To use it,
# replace the ADMIN_EMAIL value with your own email address, drop it in
# /etc/periodic/daily, and change the owner to root.  This’ll make it
# run its check every morning at 3:15am.
#
# Warning: this script doesn’t check anything other than software RAIDs
# built with the Apple (i.e. Disk Utility) RAID tools.  It does not check
# any hardware RAIDs (including Apple’s RAID card), or even any third-party
# software RAIDs.  If “diskutil listraid” doesn’t list it, it’s not going
# to be checked.
#

ADMIN_EMAIL=”youradmin@somewhere.com”

if diskutil listraid | grep “^Status:” | grep -qv “Online$”; then
diskutil listraid | mail -s ‘RAID problem detected’ “$ADMIN_EMAIL”
fi


# chmod a+x /etc/periodic/daily/150.check-raid

Of course this requires that your server can actually send outgoing e-mail messages which may need some manual configuration, as explained in:

Mac OS X Snow Leopard Server: Configuring outgoing SMTP authentication for postfix

[Edit 20130401: Clarified the phrasing, anonymized data]

Leave a Reply

Your email address will not be published. Required fields are marked *

4 × = 28

This site uses Akismet to reduce spam. Learn how your comment data is processed.