Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question

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.

share|improve this answer

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 for /dev/sdb:

/dev/sdb -m

(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

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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