Test If Linux Server SCSI / SATA / SSD Hard Disk Going Bad

Originally published at: https://www.cyberciti.biz/tips/linux-find-out-if-harddisk-failing.html

One of our regular readers sends us a question:    How can I test if my hard disk is going bad? I see few errors in /var/log/messages file.
I/O errors in /var/log/messages indicate that something is wrong with the hard disk and it may be failing. You can check the hard drive for errors using the smartctl command, which is control and monitor utility for SMART disks under Linux / UNIX like operating systems.