xfs
[Top] [All Lists]

Re: Map a disk LBA to filename?

To: Carsten Aulbert <carsten.aulbert@xxxxxxxxxx>
Subject: Re: Map a disk LBA to filename?
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 27 Oct 2008 22:49:45 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <4905A3FB.6080709@xxxxxxxxxx>
Mail-followup-to: Carsten Aulbert <carsten.aulbert@xxxxxxxxxx>, xfs@xxxxxxxxxxx
References: <4905A3FB.6080709@xxxxxxxxxx>
User-agent: Mutt/1.5.18 (2008-05-17)
On Mon, Oct 27, 2008 at 12:20:27PM +0100, Carsten Aulbert wrote:
> Hi all,
> 
> I have not found it in the archive, thus my question to all:
> 
> Along the lines of this doc
> http://smartmontools.sourceforge.net/BadBlockHowTo.txt
> 
> I would like to find out if that's also possible for XFS, i.e. I have a
> disk which tells me, that there is a problem with LBA x and I identify
> that this block is within the range of a largish XFS file system.
> 
> Now, I would like to identify the file which is possibly broken and
> repair it if I can without taking the machine down for hours running the
> manufacturers DOS tools. With simple ext[23] this is possible, but I'm
> not getting anywhere with reading xfs_db and xfs_ncheck man pages to get
> there.
> 
> Anyone here with a brief recipe I can get along with?

Use xfs_bmap to find the location on disk of the extents in each
file. Recurse over the filesystem until you find the file that owns
the block that went bad.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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