xfs
[Top] [All Lists]

Re: Find file for inode

To: linux-xfs@xxxxxxxxxxx
Subject: Re: Find file for inode
From: Federico Sevilla III <jijo@xxxxxxxxxxx>
Date: Sat, 20 Aug 2005 17:54:50 +0800
In-reply-to: <20050820095005.GI2340@xxxxxxxxxxx>
Mail-followup-to: linux-xfs@xxxxxxxxxxx
References: <20050820093341.GA15491@butterblume> <20050820095005.GI2340@xxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Sat, Aug 20, 2005 at 05:50:05PM +0800, Federico Sevilla III wrote:
> 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. 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.  Is there anyone around who can help me? Well there aren't that
> > many docs around and the man pages are not a big help (or maybe I'm
> > just blind).
> > 
> > I'm running Debian Linux under 2.6.12. 
> 
> AFAIK you can't do this with XFS. The best thing to do will be to
> replace your hard drive. If you can't do that, try running
> badblocks(8) in non-destructive read-write mode. This will attempt to
> read and then write on every block of your drive. The write, in
> particular, should trigger a remap using your drive's spare blocks,
> and may "fix" things.

I was a tad too quick with that reply. In hindsight, I'm not sure if the
procedure in the Badblocks HOWTO that you linked to can or cannot be
done with XFS. Maybe there's something that can be conjured up using
xfs_db(8). We can wait for the XFS experts to chime in.

The badblocks(8) approach holds, though. You can even give it start and
end blocks, to limit the area it will "scrub". Check the manual page for
more information.

 --> Jijo

-- 
Federico Sevilla III : jijo.free.net.ph : When we speak of free software
GNU/Linux Specialist : GnuPG 0x93B746BE : we refer to freedom, not price.


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