Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Dec 1999 17:43:29 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        Rahul Dhesi <dhesi@rahul.net>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: how to rewrite the data field replaceable unit? 
Message-ID:  <199912140143.RAA02097@mass.cdrom.com>
In-Reply-To: Your message of "Mon, 13 Dec 1999 13:45:56 PST." <19991213214557.609873FF03@bolero.rahul.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> [ FreeBSD 3.0 Release ]
> I have a scsi disk with two unreadable blocks.  The error messages
> generated by the kernel include this:
> 
>    (da2:ahc0:0:2:0) Unrecovered read error - recommend rewrite the data field replaceable unit: 20 sks:80,a0
> 
> I would like to follow the recommendation.  How do I rewrite the data
> field replaceable unit?  What exactly is a data field replaceable unit?

That's two things, 'data' and 'field replaceable unit'.  The FRU code 
tells you which part of the drive is failing - in this case the vendor 
code for the broken bit is '20'.

> I did check with 'camcontrol modepage -m 1 -P 3' and confirmed that the
> values of AWRE and ARRE are both 1.  So the SCSI disk is already doing
> all the bad block mapping that it can.

The error message actually makes more sense once you understand how 
bad-block forwarding works.  The drive will never forward a block if it 
involves losing the data that it can't get out of the block.

ie.

Error while writing -> write data to replacement block, forward block
Recovered read error -> move data to replacement block, forward block
Unrecovered read error -> return read error, do not forward block

In order to have the block forwarded (replaced), you need to put the drive
in a situation where it can guarantee that no data loss will occur.  The 
easiest way to do this is to work out which file contains the bad block, 
and copy it somewhere else, then delete the original.  Things are a bit 
harder if the bad block is buried in some metadata somewhere.

You can also unmount the drive and write to the block manually (write a 
small program that seeks to the bad block and then writes to it).

-- 
\\ Give a man a fish, and you feed him for a day. \\  Mike Smith
\\ Tell him he should learn how to fish himself,  \\  msmith@freebsd.org
\\ and he'll hate you for a lifetime.             \\  msmith@cdrom.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912140143.RAA02097>