Linux, RHEL 5.5, No raid controller.

Hi, I want to monitor if a drive has failed using output in /var/log/messages. Logs are already collected using a central monitoring solution that i have no control over. Everything seams to run nicely, only one problem. I need to now how a disk failure looks like. I need specific strings to match against.

Is there any way to create run a simulation? Or can I have some example output?

I played a little with echo 1 > /sys/bus/scsi/devices/0:0:0:0/delete and not nice errors like "rejecting I/O to dead device", is that a safe string to grep against?

I also have smartd running, maybe is that a better solution?

link|improve this question

20% accept rate
smartd is a better solution. Go with that. It'll even auto email you on a failure. And it has a test mode. – Sirex Dec 15 '10 at 11:54
I disagree. smartd will catch only a limited subset of errors that are actually caught by SMART. Running smartd is a good idea, but there's nothing wrong with a two-pronged approach. – jgoldschrafe Dec 15 '10 at 15:01
smartd is already running, I already have some smart-data in the logs, and that's nice. What i want is a reliable way to identify a disc failure. I guess everything is already set up correctly to log a disc failure. What I need is a way so catch these messages, and for that I need some string to match against. Any good way to simulate a disk failure? – nsg Dec 15 '10 at 15:43
feedback

1 Answer

If someone else need an example output, for future needs:

Jun 29 13:18:25 hostname smartd[4605]: Device: /dev/sda, failed to read SMART Attribute Data
Jun 29 13:18:25 hostname smartd[4605]: Device: /dev/sdb, 142760417951744 Offline uncorrectable sectors
link|improve this answer
If you have more/better examples, please share. – nsg Jul 12 '11 at 13:04
feedback

Your Answer

 
or
required, but never shown

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