xfs
[Top] [All Lists]

Re: Find file for inode

To: linux-xfs@xxxxxxxxxxx
Subject: Re: Find file for inode
From: Chris Wedgwood <cw@xxxxxxxx>
Date: Sat, 20 Aug 2005 10:57:30 -0700
In-reply-to: <20050820093341.GA15491@butterblume>
References: <20050820093341.GA15491@butterblume>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Sat, Aug 20, 2005 at 11:33:41AM +0200, Markus Meyer wrote:

> My Smartmontools reported a defect block on one of my disks with an
> XFS on them.

Details?

> So I wanted to follow the Badblocks-Howto [1] to find the
> corresponding Inode and the file that I can "repair" the block and
> restore the file. But I have no idea how to accomplish this on XFS.

If it's a small number of bad blocks and they are not increasing over
time; you can stomp over them which in most cases will cause the drive
to reallocate them (Reallocated_Sector_Ct) and then you can run
xfs_repair to fix any filesystem nasties.

Chances are though some of the errors are in data blocks. I have a
perl script somewhere to find which file contain(s) a given blocks
(basically xfs_bmap on all files for agiven volume and scan this).
I'll have to see where I put it if you want it.


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