From owner-freebsd-fs Tue Oct 30 11:20:29 2001 Delivered-To: freebsd-fs@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 1C0F537B407 for ; Tue, 30 Oct 2001 11:20:25 -0800 (PST) Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA31957; Tue, 30 Oct 2001 11:17:49 -0800 (PST) Date: Tue, 30 Oct 2001 11:17:49 -0800 (PST) From: Julian Elischer To: Bruce Evans Cc: Alexander Leidinger , fs@FreeBSD.ORG Subject: Re: physical block no -> name of file (FFS)? In-Reply-To: <20011031044552.U4473-100000@delplex.bde.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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