Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 2002 05:36:42 -0700
From:      "Philip J. Koenig" <pjklist@ekahuna.com>
To:        Questions@FreeBSD.ORG
Cc:        Axel Scheepers <axel@axel.truedestiny.net>
Subject:   Re: Disk bad sector question
Message-ID:  <20020526123642862.AAA448@empty1.ekahuna.com@pc02.ekahuna.com>
In-Reply-To: <20020526125120.B43810@mars.thuis>
References:  <20020519122229533.AAA405@empty1.ekahuna.com@pc02.ekahuna.com>; from pjklist@ekahuna.com on Sun, May 19, 2002 at 05:22:30AM -0700

next in thread | previous in thread | raw e-mail | index | archive | help
On 26 May 2002, at 12:51, Axel Scheepers boldly uttered: 

> On Sun, May 19, 2002 at 05:22:30AM -0700, Philip J. Koenig wrote:
> > Yep, I already used camcontrol to view the original and grown defect 
> > lists after seeing these errors.
> > 
> > And I know I can try copying data to the sectors in question and 
> > force them to be remapped, etc.  But I want to take a look at the 
> > affected files first and recover as much as I can from them, before I 
> > do that.  I didn't see how camcontrol would help in that respect.
> > 
> > I guess I'd be rather surprised if there is no way to figure out 
> > which sectors are assigned to which inodes or files..
> > 
> 
> My bad, I read your post to quickly, sorry.
> You might find the information in /usr/src/sys/ufs/ufs interesting,
> mostly dinode.h I think. That contains the layout of an inode as it's
> present on an ufs filesystem and contains an array of the disk
> blocks it's using. Then you could try to read those sectors with dd,
> I hear there's a modified version which handles i/o errors a bit better
> but retrieving it will be a hard job.


Not a problem.  I found out one way to ascertain what files are 
affected -- do a dump/restore and see which files have errors either 
saving or restoring. :-)  I found a few that way, but I'm sure there 
are others that wouldn't show up like that.

Lucky for me, all the files were A) non-critical and B) part of the 
base system and thus rebuilt with make world.  I've been using the 
new disk for a few days now.

FWIW, I see Linux has some utilities which might come in handy on 
FreeBSD.  One called "badblocks" that can find bad blocks and another 
called "dumpe2fs" (derived from Berkeley's "dumpfs") that with a -b 
option will also produce a list that can be used by "e2fsck" to mark 
the blocks bad.

(looks like dumpfs might've told me what I wanted to know, if I had 
*any* idea how to decipher its output :-)


Phil


--
Philip J. Koenig                                       pjklist@ekahuna.com
Electric Kahuna Systems -- Computers & Communications for the New Millenium


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020526123642862.AAA448>