From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 7 01:13:52 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CD0A16A4CE for ; Sat, 7 Aug 2004 01:13:52 +0000 (GMT) Received: from web61309.mail.yahoo.com (web61309.mail.yahoo.com [216.155.196.152]) by mx1.FreeBSD.org (Postfix) with SMTP id C1EA743D58 for ; Sat, 7 Aug 2004 01:13:51 +0000 (GMT) (envelope-from stheg_olloydson@yahoo.com) Message-ID: <20040807011351.51693.qmail@web61309.mail.yahoo.com> Received: from [67.34.130.149] by web61309.mail.yahoo.com via HTTP; Fri, 06 Aug 2004 18:13:51 PDT Date: Fri, 6 Aug 2004 18:13:51 -0700 (PDT) From: stheg olloydson To: questions@FreeBSD.ORG MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailman-Approved-At: Sat, 07 Aug 2004 12:16:35 +0000 cc: hackers@FreeBSD.ORG Subject: Re: Fwd: How to read bad blocks error message & marking of same X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Aug 2004 01:13:52 -0000 it was said: > > >>>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). Hello, A tool that all may find useful is SpinRite 6.0 available from Gibson Research at http://www.grc.com/sr/spinrite.htm. It's not open source or freeware but anybody with an Intel, AMD, or TiVO system that uses a harddrive ought to have it. Note: I am in no way affiliated with Gibson Research, other than having used SpinRite since the days of manually interleaving MFM drives. HTH, Stheg __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail