Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2001 11:17:49 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Alexander Leidinger <Alexander@leidinger.net>, fs@FreeBSD.ORG
Subject:   Re: physical block no -> name of file  (FFS)?
Message-ID:  <Pine.BSF.4.21.0110301117270.26174-100000@InterJet.elischer.org>
In-Reply-To: <20011031044552.U4473-100000@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce, they already KNOW the bad block address.
they want to find what file it is in...


On Wed, 31 Oct 2001, Bruce Evans wrote:

> On Tue, 30 Oct 2001, Alexander Leidinger wrote:
> 
> > On 30 Okt, Bruce Evans wrote:
> > > Just back up the files and note which ones can't be read.  Better, compare
> > > them with a previous backup.
> >
> > Yes, this solves my problem (now that I know in which partition the bad
> > block is).
> >
> > But doesn't this need more resources than a dedicated program which only
> > traverses the metadata? On a busy system it may be worthwile to have
> > such a program (and I may be willing to write it).
> 
> It is not possible to detect unreadable files by traversing only their
> metadata.  Only unreadable metadata may be detected in this way.  Every
> block in every file must be read to see if it can be, erm, read.  It
> may be possible to find them all using dd on the disk device (with a
> block size of 1b so as not to miss any), but if there are a lot of
> them this probably won't be much faster than reading the files,
> especially if not all the bad blocks are in files, since the time for
> retrying the reads will dominate.
> 
> > >> But thanks for the hint, I haven't thought at looking into fsck, will do
> > >> it later.
> > >
> > > fsck is not very useful for the original problem of finding files with
> > > bad blocks in them, since it only accesses metadata.
> >
> > And the sequence of blocks which holds the content of a given file
> > isn't included in this metadata?
> 
> You still have to read them all to see if they are bad.  The filesystem
> is likely to be better optimized for doing this than any simple program.
> 
> Bruce
> 
> 


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0110301117270.26174-100000>