Re: Map a disk LBA to filename?

Dave Chinner
2008-10-30T05:23:29Z

On Tue, Oct 28, 2008 at 10:38:27AM +0100, KELEMEN Peter wrote:
> * Carsten Aulbert (carsten.aulbert@aei.mpg.de) [20081028 10:14]:
>
> > Is it possible that blocks != bsized_blocks?
>
> xfs_bmap(8) talks in basic blocks (512 bytes).
> 660 div 8 = 82, so try:
>
> blockget -b 82 -n

I think all of you need to know about the "convert" command ;)

e.g. to do the above conversion correctly:

xfs_db> convert daddr 660 fsb
0x52 (82)

The xfs_db man page tells you all the different formats that can
be converted between. The convert command automatically takes into
account the geometry of the filesystem where appropriate (e.g.
filesystem block size).

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com