[Top] [All Lists]

Re: Empty dir can't be removed ... because it's not empty?

To: Rafa Grimán <rafagriman@xxxxxxxxx>
Subject: Re: Empty dir can't be removed ... because it's not empty?
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 11 Jan 2012 09:10:24 +1100
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <201201102126.35268.rafagriman@xxxxxxxxx>
References: <201201102126.35268.rafagriman@xxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Jan 10, 2012 at 09:26:35PM +0100, Rafa Grimán wrote:
> Hi all :)
> My /home is on an XFS partition all to it's own. The other day the lights 
> went 
> out and when I rebooted, there's an empty directory that can't be erased. 
> This 
> directory is a subdirectory in ~/.kde4/

Is your system using barriers (i.e. mounting with nobarrier option,
or hardware that doesn't support FUA)? Directory corruption like
this on power failure is a classic sign of a voltile drive cache
being lost on power failure.

The output of dmesg from a system boot will tell us what hardware
you have...

> The funny thing about this is that I can rename the directory, but I can't 
> delete it:
> [root@mine albumcovers]# ls
> .  ..  cache
> [root@mine albumcovers]# ls -lah cache/
> total 0
> drwx------ 1 rafa users  6 Jan 10 02:23 .
> drwx------ 3 rafa users 18 Jan 10 02:23 ..

It's link count is 3, meaning that it thinks that there is an entry
in the directory. You need to run xfs_repair to fix it (and whatever
else is broken).


Dave Chinner

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