From owner-freebsd-questions@FreeBSD.ORG Sat Aug 7 00:11:28 2004 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 95BFF16A4CE; Sat, 7 Aug 2004 00:11:28 +0000 (GMT) Received: from VARK.homeunix.com (adsl-69-107-119-143.dsl.pltn13.pacbell.net [69.107.119.143]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DCF043D5A; Sat, 7 Aug 2004 00:11:28 +0000 (GMT) (envelope-from das@FreeBSD.ORG) Received: from VARK.homeunix.com (localhost [127.0.0.1]) by VARK.homeunix.com (8.12.11/8.12.10) with ESMTP id i770BmBG021432; Fri, 6 Aug 2004 17:11:48 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.homeunix.com (8.12.11/8.12.10/Submit) id i770BmWf021431; Fri, 6 Aug 2004 17:11:48 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Fri, 6 Aug 2004 17:11:48 -0700 From: David Schultz To: Gary Corcoran Message-ID: <20040807001148.GA21379@VARK.homeunix.com> Mail-Followup-To: Gary Corcoran , Dan Nelson , freebsd-hackers@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG, DH References: <20040804181012.71953.qmail@web20423.mail.yahoo.com> <16658.61027.827002.280086@guru.mired.org> <4113D950.8000502@comcast.net> <20040806193843.GB11465@dan.emsphone.com> <4113E456.8020700@comcast.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4113E456.8020700@comcast.net> cc: freebsd-hackers@FreeBSD.ORG cc: Dan Nelson cc: freebsd-questions@FreeBSD.ORG cc: DH Subject: Re: Fwd: How to read bad blocks error message & marking of same 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: Sat, 07 Aug 2004 00:11:28 -0000 On Fri, Aug 06, 2004, Gary Corcoran wrote: > Dan Nelson wrote: > > >In the last episode (Aug 06), Gary Corcoran said: > > > >>Mike Meyer wrote: > >> > >> > >>>Modern drives deal with bad block substitution all by themselves. > >> > >>Umm - not quite, right? That is, if a block "goes bad" and you get a > >>read error, the drive isn't going to do any "substituting" at that > >>point. You'll just continue to get the read error if you try to > >>access (read) that block. It's only when you allow another *write* > >>to that block (e.g. by deleting the original file and writing new > >>files) that the drive will automatically substitute a spare block for > >>the one that went bad. > > > > > >SCSI drives, at least, may do automatic reallocation on both reads and > >writes ( camcontrol mode da0 -m 1, the ARRE and AWRE flags ). If the > >drive had to reread the block or had to use ECC to recover data, AND > >the entire block was recovered, it will relocate the data if ARRE is > >set. > > Good to know, although I stopped buying SCSI disks (for home use) > years ago. I presumed the more common case these days, that we > were talking about IDE disks. In fact doesn't this (from the original > question): > > ad0s1a: hard error > > necessarily refer to an ATA (IDE) disk? I don't believe any (current) > ATA disks will do automatic reallocation on reads, will they? Though > of course serial ATA drives seem to be "the future" and are taking > on more and more SCSI-like features as time goes by. Both ATA and SCSI drives may relocate blocks that were difficult to read (e.g. correctable errors, took multiple attempts, etc). But if the block can't be recovered at all, the drive will still report an error to the OS (in addition to relocation).