How to check all S.M.A.R.T. logs location
7,231
Solution 1
If you have installed smartmontools
, and enabled smartd
then all log entries are available in /var/log/syslog
:
grep "smartd" /var/log/syslog*
For /dev/sda
grep "smartd.*/dev/sda" /var/log/syslog*
An other example:
$ grep "smartd.*/dev.*failure" /var/log/syslog*
/var/log/syslog:May 14 10:46:58 sturm smartd[608]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 120 to 104
/var/log/syslog:May 14 10:46:58 sturm smartd[608]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 117 to 119
/var/log/syslog.1:May 13 05:30:33 sturm smartd[631]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 110 to 113
/var/log/syslog.1:May 13 11:19:26 sturm smartd[651]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 113 to 115
/var/log/syslog.1:May 13 11:49:26 sturm smartd[651]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 120 to 100
/var/log/syslog.1:May 13 11:49:26 sturm smartd[651]: Device: /dev/sdb [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 115 to 117
/var/log/syslog.1:May 13 15:49:27 sturm smartd[651]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 100 to 102
/var/log/syslog.1:May 13 19:49:26 sturm smartd[651]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 102 to 104
/var/log/syslog.1:May 14 10:16:58 sturm smartd[608]: Device: /dev/sda [SAT], SMART Prefailure Attribute: 1 Raw_Read_Error_Rate changed from 104 to 120
Solution 2
I believe that the log on the drive itself contains only the last 5 errors. If you want to see the LBAs, you could run badblocks from a terminal window.
sudo badblocks -sv /dev/sdX
That will run a complete surface check on your drive and show you the locations of any bad blocks.
Related videos on Youtube
Author by
Mustafa Lokhandwala
Updated on September 18, 2022Comments
-
Mustafa Lokhandwala over 1 year
As in S.M.A.R.T log:
device log contains only the most recent five errors
Is there a possibility to see all logged errors of a S.M.A.R.T Enabled disk?
smartctl -xall
or
smartctl -all
The two commands above just show the last five and I need to retrieve the LBAs with problems to write zeroes to it and check the S.M.A.R.T again.
-
A.B. almost 9 yearsFirst, your commands are wrong. Use this:
sudo smartctl --xall /dev/sda
andsudo smartctl --all /dev/sda
-
-
Terrance almost 9 yearsIt's a good answer, but this only works if you have already installed the
smartmontools
which are not installed by default. -
A.B. almost 9 yearsYes, that's true. I will change my answer. And +1 for your answer.
-
Terrance almost 9 yearsYou got my +1. It is always good to see more ways of doing things that sometimes you forget about. Thank you!