Hi,
I have Linux servers (CentOS 5.2) with my application running on them. The application is quite huge, as its database. And not developed for shutting down in the evening or during weekends as well.

Recently, on one server, there was a disk failure, where the database is stored. As my application was not intelligent enough to notice this failure, it keep on running, which causes database corruption...
Yes. The application was responsible for the database corruption.

So here is my problem:
I want to configure SMART demon, to get started automatically, search for the disks, and keep an eye on all disks. And at the moment it thinks that a disk is miss-behaving, it should run a shell script (which will stop my application service).

Can we configure smartd.conf to run some commands (or shell scripts) as soon as smartd catches a disk failure?

Can smart demon also detects any connectivity loss for remote storage (also called Network Attached Storage)?

I have gone through /etc/smartd.conf, but I can't find specific syntax to use, other than '-M' option, which is not clearly say that we 'can' run shell scripts. as per my understanding, this option is just to mention the email program to be used to send an email. However, it will be great if someone can provide a sample smartd.conf file which does all the things mentioned above.

Thanks for reading.
Your help is really appreciated.
-Dipak