Check for hard disk errors / signs of failure on CentOS Server

What's the best way to check for HDD errors and early signs of failure on CentOS?


I would recommend installing smartmon (http://sourceforge.net/apps/trac/smartmontools/wiki) to your machine this is some software which can check the health of your disks otherwise its going to be checking /var/log/messages or /var/log/syslog for any mentions of scsi errors


dmesg

The kernel will log any diagnostic messages about I/O devices, so you can check those messages out with the dmesg command.


SMART monitoring is a good way. As root, smartctl -a /dev/hda, where hda is the drive you want... could be hdb, sda, etc. Also recommend setting your email address in /etc/aliases as the person who should get root's mail.

That's a very vague answer though. If you have a server made by any of the big manufacturers (Dell, HP, etc), chances are there are better monitoring capabilities available.


You can run fsck on the device to check for errors.