[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



That url is an interesting read, but it seems overly complex.

The author went to a lot of work to get to the badblock reallocation part:

>> To force the disk to reallocate this bad block we'll write zeros to
>> the bad block, and sync the disk:
-----------------------------------------------------------------------------------------------
>> root]# dd if=/dev/zero of=/dev/hda3 bs=4096 count=1 seek=2269012
>> root]# sync

I did not know dd had a seek option as opposed to a skip option, but
assuming it does what it implies then a simple pair of dd's would
work.  Just use the raw device, not that partition and use 512 bs and
seek to the bad LBA.

Greg


On 6/25/05, Scott Warfield <magius at wittsend.com> wrote:
> You can use smartctl.
> 
> Here's an example of how to use it.
&gt; <a  rel="nofollow" href="http://smartmontools.sourceforge.net/BadBlockHowTo.txt";>http://smartmontools.sourceforge.net/BadBlockHowTo.txt</a>
&gt; 
&gt; 
&gt; 
&gt; -----Original Message-----
&gt; From: ale-bounces at ale.org [<a  rel="nofollow" href="mailto:ale-bounces";>mailto:ale-bounces</a> at ale.org] On Behalf Of Greg
&gt; Freemyer
&gt; Sent: Saturday, June 25, 2005 2:09 PM
&gt; To: Atlanta Linux Enthusiasts
&gt; Subject: Re: [ale] possible to use hard drives that have bad blocks ?
&gt; 
&gt; On 6/25/05, Courtney Thomas &lt;ccthomas at joimail.com&gt; wrote:
&gt; &gt; I've got a couple of HDs that when I:
&gt; &gt;
&gt; &gt; dd if=/dev/hdX of=/dev/null bs=1m
&gt; &gt;
&gt; &gt; I get a single instance of something like:
&gt; &gt;
&gt; &gt; FAILURE - READ_DMA status=51 &lt;READY, DSC, ERROR&gt; error=40
&gt; &gt; &lt;UNCORRECTABLE&gt; LBA=19194112 Input/output error
&gt; &gt;
&gt; &gt; My question is: does this signify a single bad block and is there a
&gt; &gt; way to identify this error to some program that can block it's use, so
&gt; &gt; the drive can be used ?
&gt; &gt;
&gt; &gt; Thank you,
&gt; &gt; Courtney
&gt; &gt;
&gt; 
&gt; LBA is the Logical Block Address of the physical sector on the drive.
&gt; 
&gt; If indeed your only seeing one LBA address that is consistently bad you
&gt; should be able fix it.
&gt; 
&gt; If your a C programmer, you could open /dev/hdX, lseek to LBA * 512 and try
&gt; to read a sector (512) bytes.  It should cause the same error.
&gt;  If not, try (LBA - 1) * 512.
&gt; 
&gt; If you can find the sector, then modify your code to write to the sector.
&gt; That should either refresh the sector with a stronger magnetic field, or
&gt; cause an internal disk problem that causes the disk to reassign the sector
&gt; internally.
&gt; 
&gt; I would try the above before I started looking at filesystem level
&gt; solutions.
&gt; 
&gt; Unfortunately, I don't know of a standard Linux tool to do the above, but
&gt; I'm sure there is one.  (dd with the skip option is very slow because it
&gt; actually reads everything being skipped).
&gt; 
&gt; Greg
&gt; --
&gt; Greg Freemyer
&gt; The Norcross Group
&gt; Forensics for the 21st Century
&gt; _______________________________________________
&gt; Ale mailing list
&gt; Ale at ale.org
&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>
&gt; 
&gt; 


-- 
Greg Freemyer
The Norcross Group
Forensics for the 21st Century


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00769" href="msg00769.html">[ale] possible to use hard drives that have bad blocks ?</a></strong>
<ul><li><em>From:</em> greg.freemyer at gmail.com (Greg Freemyer)</li></ul></li>
<li><strong><a name="00770" href="msg00770.html">[ale] possible to use hard drives that have bad blocks ?</a></strong>
<ul><li><em>From:</em> magius at wittsend.com (Scott Warfield)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00770.html">[ale] possible to use hard drives that have bad blocks ?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00772.html">[ale] Export from Evolution?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00770.html">[ale] possible to use hard drives that have bad blocks ?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00776.html">[ale] possible to use hard drives that have bad blocks ?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00771"><strong>Date</strong></a></li>
<li><a href="threads.html#00771"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>