From owner-freebsd-questions@FreeBSD.ORG Wed Aug 31 18:25:12 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 695A8106566C for ; Wed, 31 Aug 2011 18:25:12 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id 37DF78FC13 for ; Wed, 31 Aug 2011 18:25:11 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id p7VIQRCY068730; Wed, 31 Aug 2011 13:26:27 -0500 (CDT) Date: Wed, 31 Aug 2011 13:26:27 -0500 (CDT) From: Robert Bonomi Message-Id: <201108311826.p7VIQRCY068730@mail.r-bonomi.com> To: basarevych@gmail.com, freebsd-questions@freebsd.org In-Reply-To: Cc: 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: Wed, 31 Aug 2011 18:25:12 -0000 > From owner-freebsd-questions@freebsd.org Tue Aug 30 22:14:58 2011 > Date: Wed, 31 Aug 2011 06:11:24 +0300 > From: Ross > To: freebsd-questions@freebsd.org > Subject: Is there way to get filename for specific LBA? > > Aug 31 05:13:24 da kernel: ad6: WARNING - READ_DMA UDMA ICRC error > (retrying request) LBA=107491647 > # dd if=/dev/ad6 of=/dev/null bs=1m seek=107491647 count=1 > dd: /dev/null: Inappropriate ioctl for device > > Another question: why does it fail? *I* would call that a 'bug'. > > > # dd if=/dev/ad6 of=/var/tmp/xxxx bs=1m seek=107491647 count=1 > 1+0 records in > 1+0 records out > 1048576 bytes transferred in 0.026658 secs (39334650 bytes/sec) > > So no errors. 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.