Bad Block on 4.5
David Kelly
dkelly at hiwaay.net
Mon Mar 28 16:19:18 PST 2005
On Mon, Mar 28, 2005 at 04:12:55PM -0500, Lowell Gilbert wrote:
>
> If the drive has reallocation enabled already, you need to buy a new
> disk. If it doesn't, though, enabling it may be all you need to do.
> The "What do I do when I have bad blocks on my hard drive?" entry in
> the FreeBSD FAQ will explain this for you:
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/troubleshoot.html#AWRE
"Yeah but..." I think both SCSI and ATA will reallocate a block which
the controller *detects* is going bad early enough to copy the data from
old to new. But if the block suddenly goes bad when reading the wrongest
answer from the drive would be a block of null data. The drive responds
with error, without reallocating the bad block, and if the OS can't
recover everything comes to a halt for the operator to manually force a
replacement block to be allocated knowning full well that a file has
been corrupted.
That is something that would be nice for FreeBSD, that if the drive
reported absolutely that there was a problem with a bad block then the
OS would automagically associate the problem block with a file, salvage
what it could of the file and park it somewhere such as lost+found,
instruct the HD to make its repair, and log the event by way of the
usual means. "File /home/user/dummydata.txt lost 512 bytes at offset
65536 due to disk media error and has been moved to /home/lost+found."
I've been fortunate over the past many years that I have not had more
drive problems. The past 4 months 2 of my 10 HD's exhibited such a
problem. One was an old 1st generation IBM ATA-100 15G drive. The other
was a fairly new Hitachi SATA drive. Both seem to be working fine once
the IBM/Hitachi utility was used to rescan and clear the error.
--
David Kelly N4HHE, dkelly at HiWAAY.net
========================================================================
Whom computers would destroy, they must first drive mad.
More information about the freebsd-questions
mailing list