From owner-freebsd-stable Mon Dec 13 17:40:42 1999 Delivered-To: freebsd-stable@freebsd.org Received: from mass.cdrom.com (mass.cdrom.com [204.216.28.184]) by hub.freebsd.org (Postfix) with ESMTP id 7973A14E1A for ; Mon, 13 Dec 1999 17:40:40 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id RAA02097; Mon, 13 Dec 1999 17:43:29 -0800 (PST) (envelope-from msmith@mass.cdrom.com) Message-Id: <199912140143.RAA02097@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Rahul Dhesi Cc: freebsd-stable@freebsd.org Subject: Re: how to rewrite the data field replaceable unit? In-reply-to: Your message of "Mon, 13 Dec 1999 13:45:56 PST." <19991213214557.609873FF03@bolero.rahul.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 13 Dec 1999 17:43:29 -0800 From: Mike Smith Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > [ 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