xfs
[Top] [All Lists]

Re: can't remove dir

To: linux-xfs@xxxxxxxxxxx
Subject: Re: can't remove dir
From: David Chinner <dgc@xxxxxxx>
Date: Mon, 22 Oct 2007 09:50:52 +1000
In-reply-to: <20071019101008.GA28175@xxxxxxxxxx>
References: <20070914080926.GA30150@xxxxxxxxxx> <46EA9741.6060303@xxxxxxxxxxx> <20071017161504.GA13077@xxxxxxxxxx> <20071017212434.GB995458@xxxxxxx> <20071018131116.GA11957@xxxxxxxxxx> <20071018220714.GM995458@xxxxxxx> <20071019101008.GA28175@xxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Fri, Oct 19, 2007 at 12:10:08PM +0200, Louis-David Mitterrand wrote:
> On Fri, Oct 19, 2007 at 08:07:14AM +1000, David Chinner wrote:
> > On Thu, Oct 18, 2007 at 03:11:16PM +0200, Louis-David Mitterrand wrote:
> > > On Thu, Oct 18, 2007 at 07:24:39AM +1000, David Chinner wrote:
> > > > On Wed, Oct 17, 2007 at 06:15:04PM +0200, Louis-David Mitterrand wrote:
> > > > > Using a 2.6.23 kernel and after a clean xfs_repair-2.9.4 run I can't 
> > > > > remove that file:
> > > > > 
> > > > > sylla:/# rm /lost+found/3912672557
> > > > > rm: cannot remove `/lost+found/3912672557': Operation not permitted
> > > > > 
> > > > > sylla:/# ls -li /lost+found/3912672557                                
> > > > >  
> > > > > 3912672557 lrwxrwxrwx 1 root root 9 2006-04-09 19:10 
> > > > > /lost+found/3912672557 -> unix.7.gz
> > > > 
> > > > Can you post the output of:
> > > > 
> > > > # xfs_db -r -c "inode 3912672557" -c "p" <device>
> > > 
> > > Here:
> > > 
> > > core.magic = 0x494e
> > > core.mode = 0120777
> > > core.version = 1
> > > core.format = 1 (local)
> > > core.nlinkv1 = 1
> > .....
> > > core.immutable = 1
> >   ^^^^^^^^^^^^^^^^^^
> > 
> > You can't remove this link until you remove the immutable flag.
> > 
> > # xfs_io -r -c "chattr -i" /lost+found/3912672557
> 
> sylla:~# xfs_io -r -c "chattr -i" /lost+found/3912672557 
> /lost+found/3912672557: No such file or directory

Strange. This implies that lookup can't find inode # 3912672557.
We know it is there...

How many other files in the directory? Can you get the inode number
for the lost+found directory and dump that with xfs_db (as per above)?

Also, what happens if you "touch /lost+found/unix.7.gz" and try again?

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group


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