From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 29 14:58:16 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 6069A16A4CE for ; Mon, 29 Mar 2004 14:58:16 -0800 (PST) Received: from wjv.com (user38.net339.fl.sprint-hsd.net [65.40.24.38]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9062B43D41 for ; Mon, 29 Mar 2004 14:58:15 -0800 (PST) (envelope-from bv@bilver.wjv.com) Received: from bilver.wjv.com (localhost.wjv.com [127.0.0.1]) by wjv.com (8.12.10/8.12.11) with ESMTP id i2TMw4hM068060 for ; Mon, 29 Mar 2004 17:58:05 -0500 (EST) (envelope-from bv@bilver.wjv.com) Received: (from bv@localhost) by bilver.wjv.com (8.12.10/8.12.11/Submit) id i2TMw43B068059 for freebsd-hackers@freebsd.org; Mon, 29 Mar 2004 17:58:04 -0500 (EST) (envelope-from bv) Date: Mon, 29 Mar 2004 17:58:04 -0500 From: Bill Vermillion To: freebsd-hackers@freebsd.org Message-ID: <20040329225804.GA67918@wjv.com> References: <20040329200043.E089616A507@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040329200043.E089616A507@hub.freebsd.org> Organization: W.J.Vermillion / Orlando - Winter Park ReplyTo: bv@wjv.com User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on bilver.wjv.com Subject: Re: fsck fails - mark sectors as bad? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: bv@wjv.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2004 22:58:16 -0000 > Message: 4 > Date: Sun, 28 Mar 2004 18:43:03 -0500 > From: "Dan Langille" > Subject: fsck fails - mark sectors as bad? > To: freebsd-hackers@FreeBSD.org > Message-ID: <40671CB7.1003.71EBDCAB@localhost> > Content-Type: text/plain; charset=US-ASCII > I had a hard drive failure. I'm trying to get as much data off it as > I can before I restore from backup. I have mounted the drive in > another box and I'm attempting to salvage what I can. > I thought I might be able to mark the bad sectors as bad, and get the > file system mounted. [fsck out put deleted in this reply - wjv ] ... > this froze up and I found this in /var/log/messages: > Mar 28 17:11:31 tmp /kernel: ad2s1a: hard error reading fsbn 6399 of > 3168-3295 (ad2s1 bn 6399; cn 0 tn 101 sn 36) trying PIO mode > Mar 28 17:11:31 tmp /kernel: ad2: DMA problem fallback to PIO mode > Mar 28 17:11:36 tmp /kernel: ad2s1a: hard error reading fsbn 6415 of > 3168-3295 (ad2s1 bn 6415; cn 0 tn 101 sn 52) status=59 error=4 > 0 > Mar 28 17:11:41 tmp /kernel: ad2s1a: hard error reading fsbn 3187 > (ad2s1 bn 3187; cn 0 tn 50 sn 37) status=59 error=40 > Mar 28 17:11:46 tmp /kernel: ad2s1a: hard error reading fsbn 3188 > (ad2s1 bn 3188; cn 0 tn 50 sn 38) status=59 error=40 > Mar 28 17:11:51 tmp /kernel: ad2s1a: hard error reading fsbn 3189 > (ad2s1 bn 3189; cn 0 tn 50 sn 39) status=59 error=40 > Mar 28 17:11:56 tmp /kernel: ad2s1a: hard error reading fsbn 3190 > (ad2s1 bn 3190; cn 0 tn 50 sn 40) status=59 error=40 > Mar 28 17:12:01 tmp /kernel: ad2s1a: hard error reading fsbn 3191 > (ad2s1 bn 3191; cn 0 tn 50 sn 41) status=59 error=40 > Mar 28 17:12:06 tmp /kernel: ad2s1a: hard error reading fsbn 3192 > (ad2s1 bn 3192; cn 0 tn 50 sn 42) status=59 error=40 > Mar 28 17:12:11 tmp /kernel: ad2s1a: hard error reading fsbn 3194 > (ad2s1 bn 3194; cn 0 tn 50 sn 44) status=59 error=40 > Mar 28 17:13:24 tmp /kernel: ad2: READ command timeout tag=0 serv=0 - > resetting > Mar 28 17:13:24 tmp /kernel: ata1: resetting devices .. ata1-slave: > ATA identify retries exceeded > Mar 28 17:13:24 tmp /kernel: done > Definately some bad sectors there. But you should be able to moun that drive in a read only mode. In read only you can get by without an fsck, and often this is the only way to be able to get to the data. When you get the data off be sure to check it's integrity as depending on what is read or how it is read you could have blocks of junk or blocks of nulls. I've been lucky and never had one corrupt this badly needing to mount RO in at least 10 years, so I've never had to do this on a current BSD type FS - just the old S51 and early FFS on commercial Unix systems. Bill > End of freebsd-hackers Digest, Vol 54, Issue 1 > ********************************************** -- Bill Vermillion - bv @ wjv . com