From owner-freebsd-hardware Sat Dec 23 21:42:32 2000 From owner-freebsd-hardware@FreeBSD.ORG Sat Dec 23 21:42:30 2000 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 9B45C37B400; Sat, 23 Dec 2000 21:42:28 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id QAA02191; Sun, 24 Dec 2000 16:42:16 +1100 Date: Sun, 24 Dec 2000 16:42:42 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: Jake Khuon Cc: freebsd-hardware@FreeBSD.ORG, sos@FreeBSD.ORG Subject: Re: fixing hard read errors In-Reply-To: <200012211046.eBLAjwd11062@Espresso.NEEBU.Net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 21 Dec 2000, Jake Khuon wrote: > I've started taking corruption errors on the drive. > > Dec 20 23:37:50 Mocha /kernel: ad0: HARD READ ERROR blk# 19527354 > Dec 20 23:37:56 Mocha /kernel: ad0: HARD READ ERROR blk# 19527354 status=59 > error=40 > Dec 20 23:37:57 Mocha /kernel: ad0: DMA problem fallback to PIO mode > > Right now, I've had to set the fsck flag to 0 in /etc/fs and am doing a > forcemount of /usr in /etc/rc before the other mounts just to keep me going. > > Is there a way to use badsect to map these out? When I try, I get this: > > badsect /usr/BAD 19527354 > block 19527354 out of range of file system > Don't forget to run ``fsck /dev/rad0s2f'' The block number printed by the ad driver is relative to the start of the disk, but the block number for badsect must be relative to the start of the filesystem (ad0s2f). Disk drivers should use the standard function for reporting disk errors (diskerr()) so that more information, including the filesystem-relative block number, is printed. From subr_disklabel.c: --- /* * Disk error is the preface to plaintive error messages * about failing disk transfers. It prints messages of the form hp0g: hard error reading fsbn 12345 of 12344-12347 (hp0 bn %d cn %d tn %d sn %d) --- Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message