From owner-freebsd-questions@FreeBSD.ORG Tue Mar 29 00:19:18 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A1E116A4CE for ; Tue, 29 Mar 2005 00:19:18 +0000 (GMT) Received: from smtp.knology.net (smtp.knology.net [24.214.63.101]) by mx1.FreeBSD.org (Postfix) with SMTP id B40F543D5A for ; Tue, 29 Mar 2005 00:19:17 +0000 (GMT) (envelope-from dkelly@Grumpy.DynDNS.org) Received: (qmail 29555 invoked by uid 0); 29 Mar 2005 00:19:16 -0000 Received: from user-69-73-60-132.knology.net (HELO Grumpy.DynDNS.org) (69.73.60.132) by smtp8.knology.net with SMTP; 29 Mar 2005 00:19:16 -0000 Received: by Grumpy.DynDNS.org (Postfix, from userid 928) id 01B7E67C0; Mon, 28 Mar 2005 16:29:55 -0600 (CST) Date: Mon, 28 Mar 2005 16:29:55 -0600 From: David Kelly To: FreeBSD-Questions@FreeBSD.org Message-ID: <20050328222955.GA87700@Grumpy.DynDNS.org> References: <42486D35.6060304@palmedia.tv> <44br93325k.fsf@be-well.ilk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44br93325k.fsf@be-well.ilk.org> User-Agent: Mutt/1.4.2.1i Subject: Re: Bad Block on 4.5 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2005 00:19:18 -0000 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@HiWAAY.net ======================================================================== Whom computers would destroy, they must first drive mad.