On Tue, Oct 27, 2009 at 19:18, Adam Thompson <span dir="ltr">&lt;<a href="mailto:athompso@athompso.net">athompso@athompso.net</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; ">
<div>All modern drives (IDE, SATA, SCSI &amp; SAS, anyway) reserve an entire track (or more) for bad-sector remapping.  The firmware automatically remaps any sector that requires more than X number of retries to read or write successfully.  This is done transparently to the user, operating system, ATAPI controller, etc. - it&#39;s handled 100% internally.</div>
</blockquote><div><br></div>Updating my own information, it seems that many drives only attempt to reallocate bad sectors on WRITE, and *not* on read.  The *destructive* SMART &quot;Long&quot; test causes every sector to be re-written, which will accomplish this goal, but at the cost of losing all your data.<div>
<br></div><div>Windows&#39; ScanDisk program (or CHKDSK, under some versions of Windows) can do a non-destructive surface scan that only tests READS.</div><div><br></div><div>Gibson Research (GRC)&#39;s SpinRite (<a href="http://www.grc.com/spinrite.htm">http://www.grc.com/spinrite.htm</a>) is the only program that I know and would recommend, that I know can do NON-destructive full-disk read-write testing.  It has several limitations, including its US$90 price, but Steve Gibson &quot;wrote the book&quot; on HDD testing and it shows.  FYI, if you think $90 is too much money, consider that Steve (the author) only writes in one programming language - x86 assembly!</div>
<div><br></div><div>Reportedly, some vendor diagnostics can do non-destructive write testing, but the current versions of Seagate SeaTools and WD DataLifeguard do not appear to have this functionality, and Fujitsu, HGST, Toshiba, and Samsung don&#39;t produce drive test utilities [any more].</div>
<div><br></div><div>It would be fairly simple to implement something that does this in Linux with a shell script, something that looped over X megabytes of space, dd(1)&#39;d 1MB of data at a time to a temporary file, dd(1)&#39;d it right back to the drive at offset X.  The implementation is left as an exercise for the reader :-).</div>
<div><div class="gmail_quote"><br></div>-- <br>-Adam Thompson<br> &lt;<a href="mailto:athompso@athompso.net">athompso@athompso.net</a>&gt;<br><br>
</div>