Re: Map a disk LBA to filename?

Carsten Aulbert
2008-10-28T07:38:27Z

Dave Chinner wrote:

> Shouldn't be a problem with a filesystem that size. It's when you're
> dealing with tens of terabytes in a single filesystem that it can
> be a problem...

It used a bit less than 900MB, so no problem at all.

But I think I'm a bit stuck now, because I know not enough about the
conventions used:

# xfs_info /dev/sda6
meta-data=/dev/sda6 isize=256 agcount=16, agsize=7388267
blks
= sectsz=512 attr=1
data = bsize=4096 blocks=118212272, imaxpct=25
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
log =internal bsize=4096 blocks=32768, version=1
= sectsz=512 sunit=0 blks
realtime =none extsz=65536 blocks=0, rtextents=0

>From this I gather that this file system as about 118 million blocks for
data, each holding 4096 bytes, this is consistent with the file system
size as reported by df and the like.

However, when I look at a file on this FS, e.g.
ls -l /local/MCP/root/root.tar.bz2
---xr-xr-- 1 root root 134 Sep 26 15:20 /local/MCP/root/root.tar.bz2

where /local is in /dev/sda6 (nevermind the weird permissions).

Running xfs_bmap on this file gives:

# xfs_bmap -l /local/MCP/root/root.tar.bz2
/local/MCP/root/root.tar.bz2:
0: [0..7]: 847868600..847868607 8 blocks

But somehow this does not work out since 847868600>118212272.

Any idea where my logical error is?

Thanks

puzzled Carsten