How to check all S.M.A.R.T. logs location

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.

1

2 Answers

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
3

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like