xfs
[Top] [All Lists]

Re: Cannot delete a directory on a XFS file system

To: Eric Sandeen <sandeen@xxxxxxxxxxx>
Subject: Re: Cannot delete a directory on a XFS file system
From: "Grozdan Nikolov (openSUSE Linux)" <microchip@xxxxxxxxxx>
Date: Sun, 13 Jan 2008 22:38:51 +0100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <478A8256.8030000@xxxxxxxxxxx>
References: <200801131723.12626.microchip@xxxxxxxxxx> <alpine.DEB.0.999999.0801131448070.17216@xxxxxxxxxxxxxxxx> <478A8256.8030000@xxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: KMail/1.9.5
On Sunday 13 January 2008 22:27, you wrote:
> Justin Piszcz wrote:
> > On Sun, 13 Jan 2008, Grozdan Nikolov (openSUSE Linux) wrote:
> >> Hi,
> >>
> >> I have a small problem with XFS on a small 40 GB IDE disk that I use for
> >> my music collection. The disk (/dev/hdb) has only one partition on it
> >> formatted as XFS. On this partition, there is a directory that no matter
> >> what I do, I cannot delete it. I tried everything, in Konqueror,
> >> right-click on the directory and choose to delete it. As root on the
> >> console
> >> doing "rm -rf /media/data/DATA/MusicApps" ... but nothing works.
> >>
> >> When I try to "rm -rf" on this directory I get a message saying...
> >>
> >> rm: cannot remove directory `MusicApps/Loops/loops/Acid Loops/Bass':
> >> Directory not empty
> >>
> >> But the "Bass" directory is completely empty, there's nothing in there.
> >> Also when I unmount the file system and do a "xfs_check /dev/hdb1" I get
> >> a message saying...
> >>
> >> link count mismatch for inode 184549517 (name ?), nlink 3, counted 2
> >>
> >> I did several times "xfs_repair /dev/hdb1" but I still get the same
> >> result. xfs_check reports the same message and I still can't get rid of
> >> this empty directory. I'm using kernel 2.6.24-rc7, but it's the same
> >> with other kernels. I also did check the partition for bad block with
> >> the "badblocks" program, but nothing came out, so the disk is just fine.
> >>
> >> Any ideas how I can delete this directory?
> >
> > The developers get in on Monday :P
> >
> > But some things they will ask:
> >
> > 1. run xfs_info /dev/hdb1
> > 2. run (and capture the full output from the repair process)
>
> ... with very latest xfsprogs please.  If latest repair doesn't fix it,

I do not know what version is the latest of xfsprogs. I use my distro's 
default (2.8.11)

> using xfs_metadump to provide a filesystem image for Barry to reproduce
> with would be helpful.

I can't find xfs_metadump on my system. I only have xfsdump. Is this the same?

>
> > 3. run ls -lR on the dir that has problems
> > 4. run ls -li on the director(ies) that cannot be deleted for the inode
> > #s
>
> ls -a on the dir to be sure there are no hidden dotfiles

ls -a MusicApps

.  ..  Loops

ls -a "MusicApps/Loops/loops/Acid Loops/Bass"

.  ..

> ls -id on the dir to see if it is inode 184549517

ls -id "MusicApps/Loops/loops/Acid Loops/Bass"

184549517 MusicApps/Loops/loops/Acid Loops/Bass

>
> -Eric


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