From owner-freebsd-questions@FreeBSD.ORG Thu Sep 1 03:50:26 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 570CA106566B for ; Thu, 1 Sep 2011 03:50:26 +0000 (UTC) (envelope-from carlj@peak.org) Received: from redcondor2.peak.org (redcondor2.peak.org [69.59.192.56]) by mx1.freebsd.org (Postfix) with ESMTP id 80AF88FC13 for ; Thu, 1 Sep 2011 03:50:25 +0000 (UTC) Received: from zmail-mta02.peak.org ([207.55.16.112]) by redcondor2.peak.org ({6c724cae-de34-4c5f-b615-3072b86419fa}) via TCP (outbound) with ESMTP id 20110901035023937 for ; Thu, 01 Sep 2011 03:50:23 +0000 X-RC-FROM: X-RC-RCPT: Received: from maple.localnet (unknown [207.55.106.132]) by zmail-mta02.peak.org (Postfix) with ESMTPSA id 511304891C3 for ; Wed, 31 Aug 2011 20:50:22 -0700 (PDT) Received: from oak.localnet (oak.localnet [IPv6:2001:1938:266::6f:616b]) by maple.localnet (Postfix) with ESMTP id C360361F84 for ; Wed, 31 Aug 2011 20:50:19 -0700 (PDT) Received: from oak.localnet (localhost.localnet [127.0.0.1]) by oak.localnet (Postfix) with ESMTP id 2C59BCD94 for ; Wed, 31 Aug 2011 20:50:19 -0700 (PDT) Received: (from carlj@localhost) by oak.localnet (8.14.4/8.14.4/Submit) id p813oIXV002717; Wed, 31 Aug 2011 20:50:18 -0700 (PDT) (envelope-from carlj@peak.org) X-Authentication-Warning: oak.localnet: carlj set sender to carlj@peak.org using -f From: Carl Johnson To: freebsd-questions@freebsd.org References: <201108311826.p7VIQRCY068730@mail.r-bonomi.com> <4e5f24c3.agV2UHzbjHEXght8%perryh@pluto.rain.com> Mail-Followup-To: freebsd-questions@freebsd.org Date: Wed, 31 Aug 2011 20:50:18 -0700 In-Reply-To: <4e5f24c3.agV2UHzbjHEXght8%perryh@pluto.rain.com> (perryh@pluto.rain.com's message of "Wed, 31 Aug 2011 23:22:59 -0700") Message-ID: <87vctc6hvp.fsf@oak.localnet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: Is there way to get filename for specific LBA? 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: Thu, 01 Sep 2011 03:50:26 -0000 perryh@pluto.rain.com writes: > Robert Bonomi wrote: > >> > Aug 31 05:13:24 da kernel: ad6: WARNING - READ_DMA UDMA ICRC >> > error (retrying request) LBA=107491647 >> > ... I looked at bsdlabel a it's partition f, /home. But what >> > is the file name? >> >> There's *no* easy way to find out. You'll have to grovel through >> all the filesystem metadata, and the layers of index blocks for >> every file until you find the 'rgiht' one. > > This is what "icheck -B" was for, but icheck(8) no longer exists and > that particular bit of functionality does not seem to be provided in > fsck(8). > > One current userland utility (other than fsck) which does know > how to grovel through the metadata and index blocks is dump(8), > but you'd have to hack on it to report which inode was using a > particular block. It looks like the best bet would be fsdb, assuming that it is a UFS file system. That does have a 'findblk' command to find a file containing a block, but you would need to calculate the block offset in the filesystem first. It doesn't look like it would be easy, as was said earlier. -- Carl Johnson carlj@peak.org