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
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
mdadm
automatically sends root an email when a fault happens. You just have to have a mail server, such aspostfix
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 [email protected] for /dev/sdb:
/dev/sdb -m [email protected]
(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