Is there way to get filename for specific LBA?

Carl Johnson carlj at
Thu Sep 1 03:50:26 UTC 2011

perryh at writes:

> Robert Bonomi <bonomi at> 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 at

More information about the freebsd-questions mailing list