Good day,

I have set up an ubuntu 10.04 LTS server with RAID 1. How can I can ensure that I am warned when the raid array fails. Is there a script to run that can check this and generate an email if there are issues?



mdadm automatically sends root an email when a fault happens. You just have to have a mail server, such as postfix installed on the server and configured to store or forward root's mail somewhere you will read it.


Check if your disk is smartmon compliant by # smartctl -i /dev/hda

Then install smartmon # apt-get install smartmontools

Enable smart by editing /etc/default/smartmontools file. Smart Configuration file: /etc/smartd.conf Start/Stop smart: /etc/init.d/smartmontools start | stop

You can put following directives in Smart Configuration file: (a) Send an email to marlin@yourdomain.com for /dev/sdb:

/dev/sdb -m marlin@yourdomain.com

(b) Read error log: # smartctl -l error /dev/hdb

(c) Testing hard disk (short or long test): # smartctl -t short /dev/hdb

# smartctl -t long /dev/hdb

  • Doesn't that require a postfix installation and further configuration? I remember it being a pain in the a.., but if it's running it can be a lifesaver – Sentry Oct 18 '12 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.