From owner-freebsd-questions@FreeBSD.ORG Thu Sep 1 06:57:18 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 886851065672 for ; Thu, 1 Sep 2011 06:57:18 +0000 (UTC) (envelope-from bc979@lafn.org) Received: from zoom.lafn.org (zoom.lafn.org [75.101.116.66]) by mx1.freebsd.org (Postfix) with ESMTP id 62A0C8FC08 for ; Thu, 1 Sep 2011 06:57:18 +0000 (UTC) Received: from [10.0.1.2] (pool-108-23-64-87.lsanca.fios.verizon.net [108.23.64.87]) (authenticated bits=0) by zoom.lafn.org (8.14.3/8.14.2) with ESMTP id p816Iw10097534 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 31 Aug 2011 23:18:59 -0700 (PDT) (envelope-from bc979@lafn.org) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1244.3) From: Doug Hardie In-Reply-To: <87vctc6hvp.fsf@oak.localnet> Date: Wed, 31 Aug 2011 23:18:58 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201108311826.p7VIQRCY068730@mail.r-bonomi.com> <4e5f24c3.agV2UHzbjHEXght8%perryh@pluto.rain.com> <87vctc6hvp.fsf@oak.localnet> To: FreeBSD Mailing List X-Mailer: Apple Mail (2.1244.3) X-Virus-Scanned: clamav-milter 0.97 at zoom.lafn.org X-Virus-Status: Clean 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 06:57:18 -0000 On 31 August 2011, at 20:50, Carl Johnson wrote: > perryh@pluto.rain.com writes: >=20 >> Robert Bonomi wrote: >>=20 >>>> Aug 31 05:13:24 da kernel: ad6: WARNING - READ_DMA UDMA ICRC >>>> error (retrying request) LBA=3D107491647 >>>> ... I looked at bsdlabel a it's partition f, /home. But what >>>> is the file name? >>>=20 >>> 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. >>=20 >> 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). >>=20 >> 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. >=20 > 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. I created a utility some years ago that did that for UFS. I believe it = works for UFS2 but haven't verified it. If you want to try it, send me = a note and I'll ship you the code direct. -- Doug=