<div dir="ltr"><div dir="ltr"><br><div>Hi Christian,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 11 Jul 2021 at 09:28, Christian Franke <<a href="mailto:Christian.Franke@t-online.de">Christian.Franke@t-online.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Some recent drives support the "Pending Defects log". Try 'smartctl -l <br>
defects'. This is included in 'smartctl -x' but not in '-a'.<br></blockquote><div><br></div><div>Unfortunately, I guess this drive is too old to have the support for pending defect log information. '-x' switch didn't help either.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
After such a read scan, some of the bad LBAs should appear in the "SMART <br>
(Extended Comprehensive) Error Log."<br></blockquote><div><br></div><div>How do I print out this "Extended Comprehensive" error log? Is it the same '-x' switch you are referring to?</div><div> </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I often use GNU ddrescue (<a href="https://www.gnu.org/software/ddrescue/" rel="noreferrer" target="_blank">https://www.gnu.org/software/ddrescue/</a>) for <br>
read scans. It writes a map file of good/bad/non-tried byte ranges. This <br>
allows to interrupt the scan at any time and resume it later. There is <br>
also an option to limit the read rate.<br>
See the Bad Blocks HOWTO for a real world use case:<br>
<a href="https://www.smartmontools.org/wiki/BadBlockHowto#RecoveringamostlyunreadablesectorofaNotebookHDD" rel="noreferrer" target="_blank">https://www.smartmontools.org/wiki/BadBlockHowto#RecoveringamostlyunreadablesectorofaNotebookHDD</a></blockquote><div><br></div><div>I ran ''ddrescue" on the whole disk. But, the result is confusing. The "read errors" field contains 1, but the generated map file doesn't contain any bad sectors (status column with '-' character). I am including both the ddrescue output, the map file, and the relevant part from the 'smartctl -x' output so that someone can shed some light. I am specifically curious to find out 1 Current_Pending_Sector, 6 Offline_Uncorrectable, and the LBA(s) marked by the extended self-test. Also, I am not being able to add up why ddrescue reports one read error, but that is not reflected in the map file. I expected the read error to match with the LBA_of_first_error field of smartctl self-test.</div><div><br></div><div>=============</div><div>ddrescue output</div><div>=============</div><div># ddrescue --ask --verbose --binary-prefixes --idirect --force /dev/sdc /dev/null disk.map<br>GNU ddrescue 1.22<br>About to copy 1863 GiBytes<br>from '/dev/sdc' [UNKNOWN] (2000398934016)<br> to '/dev/null' (0)<br>Proceed (y/N)? y<br> Starting positions: infile = 0 B, outfile = 0 B<br> Copy block size: 128 sectors Initial skip size: 39168 sectors<br>Sector size: 512 Bytes<br><br> ipos: 1852 GiB, non-trimmed: 0 B, current rate: 22528 B/s<br> opos: 1852 GiB, non-scraped: 0 B, average rate: 79108 KiB/s<br>non-tried: 0 B, bad-sector: 0 B, error rate: 0 B/s<br> rescued: 1863 GiB, bad areas: 0, run time: 6h 51m 33s<br>pct rescued: 100.00%, read errors: 1, remaining time: n/a<br> time since last successful read: n/a<br>Finished<br></div><div><br></div><div><br></div><div><div>============</div><div>ddrescue map</div><div>============</div></div><div># cat disk.map <br># Mapfile. Created by GNU ddrescue version 1.22<br># Command line: ddrescue --ask --verbose --binary-prefixes --idirect --force /dev/sdc /dev/null disk.map<br># Start time: 2021-07-11 15:40:45<br># Current time: 2021-07-11 22:32:18<br># Finished<br># current_pos current_status current_pass<br>0x1CF0266FE00 + 1<br># pos size status<br>0x00000000 0x1D1C1116000 +<br></div><div><br></div><div><br></div><div><div>============</div><div>smartctl -x</div><div>============</div></div><div>SMART Attributes Data Structure revision number: 16 <br>Vendor Specific SMART Attributes with Thresholds: <br>ID# ATTRIBUTE_NAME FLAGS VALUE WORST THRESH FAIL RAW_VALUE <br> 1 Raw_Read_Error_Rate POSR-K 200 200 051 - 4 <br> 3 Spin_Up_Time POS--K 152 152 021 - 9375 <br> 4 Start_Stop_Count -O--CK 100 100 000 - 49 <br> 5 Reallocated_Sector_Ct PO--CK 200 200 140 - 0 <br> 7 Seek_Error_Rate -OSR-K 200 200 000 - 0 <br> 9 Power_On_Hours -O--CK 026 026 000 - 54390 <br> 10 Spin_Retry_Count -O--CK 100 253 000 - 0 <br> 11 Calibration_Retry_Count -O--CK 100 253 000 - 0 <br> 12 Power_Cycle_Count -O--CK 100 100 000 - 49 <br>192 Power-Off_Retract_Count -O--CK 200 200 000 - 38 <br>193 Load_Cycle_Count -O--CK 200 200 000 - 10 <br>194 Temperature_Celsius -O---K 122 100 000 - 30 <br>196 Reallocated_Event_Count -O--CK 200 200 000 - 0 <br>197 Current_Pending_Sector -O--CK 200 200 000 - 1 <br>198 Offline_Uncorrectable ----CK 200 200 000 - 6 <br>199 UDMA_CRC_Error_Count -O--CK 200 200 000 - 0 <br>200 Multi_Zone_Error_Rate ---R-- 200 200 000 - 7 </div><div><br></div><div>************************************************************************</div><div><br></div>SMART Extended Self-test Log Version: 1 (1 sectors)<br>Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error<br># 1 Selective offline Completed: read failure 90% 54367 3884004178<br># 2 Selective offline Completed without error 00% 54367 -<br># 3 Selective offline Completed: read failure 70% 54367 3884004178<br># 4 Selective offline Completed: read failure 90% 54367 3884004178<br># 5 Extended offline Aborted by host 70% 54367 -<br># 6 Extended offline Completed: read failure 90% 54268 3884004178<br># 7 Extended offline Completed without error 00% 54206 -<br># 8 Extended offline Completed without error 00% 54199 -<br># 9 Extended offline Completed: read failure 90% 54190 3884004178<br>#10 Short offline Completed without error 00% 54189 -<br>#11 Extended offline Completed without error 00% 53801 -<br>#12 Short captive Completed without error 00% 1530 -<br>1 of 5 failed self-tests are outdated by newer successful extended offline self-test # 7<br><br>SMART Selective self-test log data structure revision number 1<br> SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS<br> 1 3884004178 3884004178 Not_testing<br> 2 0 0 Not_testing<br> 3 0 0 Not_testing<br> 4 0 0 Not_testing<br> 5 0 0 Not_testing<br>Selective self-test flags (0x0):<br> After scanning selected spans, do NOT read-scan remainder of disk.<br>If Selective self-test is pending on power-up, resume after 0 minute delay.<br><br><div> <br></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><span><div><div dir="ltr"><p>Thanks & Regards,</p>
<div>Dipanjan</div></div></div></span></div></div></div>