From owner-freebsd-questions@FreeBSD.ORG Mon Dec 18 20:16:54 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DFBF16A412 for ; Mon, 18 Dec 2006 20:16:54 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.FreeBSD.org (Postfix) with ESMTP id A014D43CA3 for ; Mon, 18 Dec 2006 20:16:53 +0000 (GMT) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-29-241.bredband.comhem.se ([83.253.29.241]:53729 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with smtp (Exim 4.63) (envelope-from ) id 1GwOec-0001YA-6l for freebsd-questions@freebsd.org; Mon, 18 Dec 2006 21:00:06 +0100 Received: (qmail 25665 invoked from network); 18 Dec 2006 21:00:05 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with SMTP; 18 Dec 2006 21:00:05 +0100 Received: (qmail 98218 invoked by uid 1001); 18 Dec 2006 21:00:05 +0100 Date: Mon, 18 Dec 2006 21:00:05 +0100 From: Erik Trulsson To: Lowell Gilbert Message-ID: <20061218200005.GA98155@owl.midgard.homeip.net> Mail-Followup-To: Lowell Gilbert , Marc van Woerkom , freebsd-questions@freebsd.org References: <4586AE6D.3080704@fernuni-hagen.de> <444prtujsd.fsf@be-well.ilk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <444prtujsd.fsf@be-well.ilk.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-ACL-Warn: Too high rate of unknown addresses received from you X-Scan-Result: No virus found in message 1GwOec-0001YA-6l. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1GwOec-0001YA-6l d768d8acb65990d1355f78b0fbe62bef Cc: Marc van Woerkom , freebsd-questions@freebsd.org Subject: Re: Dealing with bad blocks on a hard disc X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Dec 2006 20:16:54 -0000 On Mon, Dec 18, 2006 at 01:43:30PM -0500, Lowell Gilbert wrote: > Marc van Woerkom writes: > > > Hi, > > > > my notebook's hard drive seems to be damaged: > > > > Dec 18 15:49:13 hokage kernel: ad0: FAILURE - READ_DMA > > status=51 error=40 LBA=9919567 > > Dec 18 15:49:13 hokage kernel: > > g_vfs_done():ad0s1f[READ(offset=1360723968, length=32768)]error = 5 > > Dec 18 15:49:13 hokage kernel: vnode_pager_getpages: I/O read error > > Dec 18 15:49:13 hokage kernel: vm_fault: pager read error, pid 1048 (cvsup) > > Dec 18 15:49:17 hokage kernel: ad0: FAILURE - READ_DMA > > status=51 error=40 LBA=9919567 > > Dec 18 15:49:17 hokage kernel: > > g_vfs_done():ad0s1f[READ(offset=1360723968, length=32768)]error = 5 > > Dec 18 15:49:17 hokage kernel: vnode_pager_getpages: I/O read error > > Dec 18 15:49:17 hokage kernel: vm_fault: pager read error, pid 1048 (cvsup) > > Dec 18 15:49:17 hokage kernel: pid 1048 (cvsup), uid 0: exited on signal 6 > > > > Is it possible to check the disc for bad blocks and to mark them as > > unusable, thus allowing me continue using the hard drive? > > That happens automatically on a disk like this one. Automatic remapping of bad blocks can only happen for *writes*. not reads. When you are writing, the disk knows what data is supposed to reside in the block - the data you trying to write - and can transparently write it to another block instead. When you encounter a bad block during a read the disk has no way of knowing what data was supposed to be there and therefore can't transparently remap the block since that would cause data loss. (Some RAID controllers are supposed to be able to handle this by reconstructing the data that was supposed to be in the bad block from the other disks in the RAID array, and then writing this to the bad block, thus triggering the disks transparent remapping of bad blocks.) (If the disk does succeed in reading a block, but only after several tries, it can of course also remap the block, but unrecoverable reads (which this seems to be a case of) cannot be handled thus.) > > > Or what would you recommend? > > Try a manufacturer's utility, if you can find one, but generally when > you reach the point where the OS is aware of disk block errors, it is > continuing to lose them at a high (and accelerating) rate. Usually, but not always. > > Also consider the "SMART" utilities, but be prepared to buy a new > disk. Also check the cables. It might just be something so simple as a bad cable. And if you haven't already done so, this is a very good time to start making backups of everything on that disk. (A bit late most likely, but hopefully not *too* late.) > > > Funny, I use FreeBSD about 10 years, this is the first time I have > > that problem and it seems not to be addressed in the handbook. > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/install.html#INSTALL-BAD-BLOCKS -- Erik Trulsson ertr1013@student.uu.se