Subject: Re: disabling disk error recovery/wiping a defective disk
To: Christos Zoulas <christos@tac.gw.com>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: netbsd-users
Date: 05/30/2005 20:00:55
In message <f6vrm2-1hc.ln1@morgoth.gw.com>, Christos Zoulas writes:
>In article <20050530172721.GA948@aragorn.net-tex.de>,
>Stefan Schumacher  <stefan@net-tex.de> wrote:
>>-=-=-=-=-=-
>>
>>Also sprach Steven M. Bellovin (smb@cs.columbia.edu)
>>> I have a disk with enough unreadable portions that it's being replaced 
>>> under warranty by the vendor.  I would like to overwrite whatever 
>>> portions of the disk I can.  Trying to do that in a straight-forward 
>>> fashion runs afoul of the error recovery code; it slows down the 
>>> attempt or even prevents it.  Any suggestions on what to do?  (This is 
>>> an SATA disk on -current/i386.)
>>
>>If you know which sectors are FUBARed you could build slices around
>>them and wipe that working slices with a wiper or dd.
>>
>>Some HDs also come with a vendormade software that disables defunc
>>blocks, maybe this would be a way. 
>
>I think for this kind of application we can add an ioctl that sets the
>retry count at the driver level to 0.
>

That would be a good idea, though I'm not convinced that it's 
sufficient -- at one point, I had two processes wedged in an infinite 
retry loop, it seemed; even 'kill -9' didn't help.  

Someone recommended Darik's Boot and Nuke; I'm going to try it.  (I 
need to scrub the disk before I return it to Dell.)

		--Steven M. Bellovin, http://www.cs.columbia.edu/~smb