smartctl
To check hard disk for errors, run
1 |
/usr/sbin/smartctl -q errorsonly -H -l selftest -l error /dev/sda |
Here is an example of HDD with errors
1 2 3 4 5 6 7 8 9 |
# smartctl -q errorsonly -H -l selftest -l error /dev/sda ATA Error Count: 8259 (device log contains only the most recent five errors) Error 8259 occurred at disk power-on lifetime: 8324 hours (346 days + 20 hours) Error 8258 occurred at disk power-on lifetime: 8324 hours (346 days + 20 hours) Error 8257 occurred at disk power-on lifetime: 8324 hours (346 days + 20 hours) Error 8256 occurred at disk power-on lifetime: 8324 hours (346 days + 20 hours) Error 8255 occurred at disk power-on lifetime: 8324 hours (346 days + 20 hours) # |
To get detailed, result, run
1 |
smartctl -a -d ata /dev/sda |