Subject: Re: bad block on an IDE disk
To: Matthias Scheler <tron@lyssa.owl.de>
From: Brian Buhrow <buhrow@cats.ucsc.edu>
List: port-i386
Date: 07/14/1997 08:20:48
	I have used badsect to good effect for the exact type of thing you're
experiencing.  There used to be a bug whereby it would ry to mark the bad
sector using the block device rather than the raw device, but I believe
that has been fixed.  If it hasn't, it is a two liner to fix it and use it
anyway.
	What you do is run badsect with the sector (block) number and it then
marks the filesystem with a bad block.  Then you run fsck, which asks you
if you want to hold the bad block.  It will then put the file you are using
to hold the space in lost+found and you can delete it.  Now you have what
looks like a clean filesystem, at least from the perspective of the file
name space, and your bad block is locked out.  Note, however, that you
can't dd the filesystem from one place to another anymore.
-Brian

On Jul 12,  4:09pm, Matthias Scheler wrote:
} Subject: bad block on an IDE disk
} 	Hi,
} 
} one of my NetBSD 1.2 systems has a bad block on one of its hard disks:
} 
} Jul 12 15:38:51 jehova /netbsd: wd0e: hard error reading fsbn 227651 of 227648-227679 (wd0 bn 338915; cn 557 tn 6 sn 31)
} 
} Because I don't have time to replace that harddisk in the next few weeks
} I would like to know if there's a way to tell the filesystem not to touch
} that block again. For now I renamed the file with the bad block in it
} to keep the space occupied and redownloaded it.
} 
} -- 
} Matthias Scheler                                http://home.owl.de/~tron/
>-- End of excerpt from Matthias Scheler