Subject: Re: can newfs do a surface scan or otherwise id bad disk blocks reported on a previous Win32 partition?
To: None <port-i386@netbsd.org>
From: Ernst du Toit <et@houseofet.com>
List: port-i386
Date: 11/13/2002 14:26:38
The IDE disks I've worked with generally remap behind the scenes until the
spare blocks run out. Only then do you see the bad blocks appear.

The Drive Fitness Software does a destructive read/write/read to the every
user space part of the disk and maps any bad blocks found away. It also
seems to increase the spare block map - probably at the cost of disk
space.

I've had to run this tool twice on my disk now and everytime the bad
blocks goes away for about 6 months. The day for replacement is getting
closer though :)

--et

> Please don't specify Reply-To if you really want to set.
>
> In message <59170.210.54.88.120.1037148945.squirrel@alph.houseofet.com>
> 	on Wed, 13 Nov 2002 13:55:45 +1300 (NZDT),
> 	"Ernst du Toit" <et@houseofet.com> wrote:
>> If the laptop drive is an IBM device it can map and flag the bad
>> blocks in the drive firmware tables. Non IBM drives can also be tested
>> but I'm not sure if the blocks can be flagged in firmware.
> In general, IDE hard disks (not too old one) have a function replace bad
> block with spare one.  But it happens on writing to a sector.
>
> So, writing whole disk with dd(1) might repair those bad sectors.
>
> # dd if=/dev/zero of=/dev/rwd0d
>
> More better way is writing a program "check and write" for each
> sector.  (Once I wrote a such program.)
>
> If bad sectors couldn't recover, you had better think replace the disk
> drive or be patient with bad blocks.  :-(
>
> --
> Takahiro Kambe <taca@back-street.net>