Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

Regards

share|improve this question

2 Answers 2

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 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

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

 
discard

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.