[smartmontools-support] Differences in test report results: xselftest vs selftest

Daniel Fishman quantera at gmail.com
Fri Apr 26 13:59:06 CEST 2024



On 4/25/24 18:58, Christian Franke wrote:

> 
> Are any read error reported in the SMART error logs?
> 
> If not, run a read test with badblocks or GNU ddrescue. If read errors occur, the last ones should appear in the error logs. Errors detected by self-tests only usually do not.
> 

Indeed, there were some errors in the "SMART Extended Comprehensive Error Log",
(the xerror log) but those reported blocks were readable. I ran badblocks
(in read-only mode), and then it did find some bad blocks which appeared in the
log above as well - and those ones were unreadable (with hdparm)

Strange thing though: when I test a reported block (the ones that appeared
after execution of badblocks) by 'hdparm --read-sector <num> /dev/sdc', I
get an error, and 'Device Error Count' in xerror log increases. But when
I ran what I think should be an equivalent dd command:

'dd if=/dev/sdc of=/dev/null bs=512 count=1 seek=<num>'

I neither get any error, nor does device error count increases. It also doesn't
happen when I convert block number to a file system block (using (int)((L-S)*512/B)
formula from the wiki) and adjust the command as follows (B is 4096 in my case):

'dd if=/dev/sdc1 of=/dev/null bs=4096 count=1 seek=<adjusted num>'

Is there a reason for that? I suppose that there is a good reason why wiki
instructs to use 'dd' and only if it doesn't work - use hdparm (probably
because it adds confidence that there was no error in converting LBA to
file system block) - and therefore I would also prefer to use dd both for
actually overwriting the block, and for reading it (and getting error)
to make sure that I don't fix something wrong.



More information about the Smartmontools-support mailing list