xfs
[Top] [All Lists]

Re: Map a disk LBA to filename?

To: Michal Soltys <nozo@xxxxxxxxxxxxxx>
Subject: Re: Map a disk LBA to filename?
From: Carsten Aulbert <carsten.aulbert@xxxxxxxxxx>
Date: Mon, 27 Oct 2008 14:54:35 +0100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <4905BC13.3030402@xxxxxxxxxxxxxx>
References: <4905A3FB.6080709@xxxxxxxxxx> <20081027114945.GE4985@disturbed> <4905B48A.8010108@xxxxxxxxxx> <4905BC13.3030402@xxxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.17 (X11/20080925)
Hi Michal

Michal Soltys wrote:
> 
> Wouldn't something like (under xfs_db) :
> 
> getblock -b #block -n
> ncheck -i #inode
> 
> where required #inode is reported by getblock
> 
> do the thing ?
> 

Sounds nice, but my (ancient? 2.8.11) version of xfs_db does not know
getblock (only blockget) since that also matches the command line and
the usage looks about to be right, I'm currently trying that one, e.g.

smartctl reports a bad LBA at 36922326. fdisk tells me the partition
starts at 31069773, hence the block under question is 5852553.

xfs_info tells be a bsize of 4096 which I take as the block size, thus
the xfs block to look at should be 731569, right?

xfs_db> blockget -b 731569 -n
setting block 0/731569 to free1
setting block 0/731569 to free2
xfs_db>

hmm, no inode number. Does that mean this block is not used by any file
currently - which might be perfectly fine since this partition is only
31% full.

Everything right so far?

Cheers

Carsten

<Prev in Thread] Current Thread [Next in Thread>