[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Weird fs problems



on Thu, Feb 27, 2003 at 09:36:52AM -0700, Sean Burbidge (sean@medialeague.com) wrote:
> I am having a strange problem on my system where I am unable to remove 
> directories, even if they are empty.  This is showing up in two 
> locations:
> 
> First, with dpkg and apt-get.  If I try to apt-get a package, I get 
> this error:
> 
> rm: cannot remove directory `/var/lib/dpkg/tmp.ci': Directory not empty
> dpkg: error processing /var/cache/apt/archives/mcrypt_2.6.3-1_i386.deb 
> (--unpack):
>  subprocess rm cleanup returned error exit status 1
> Errors were encountered while processing:
>  /var/cache/apt/archives/mcrypt_2.6.3-1_i386.deb
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> 
> I am unable to delete the directory /var/lib/dpkg/tmp.ci, even though 
> the filesystem sees it as a directory.  I have even tried removing it 
> using debugfs and chattr -u tmp.ci, all to no avail.  There are NO 
> files in there (used ls -la).  Using apt 0.5.4 and dpkg 1.9.20 on 
> unstable 2.4.17.

Check also with 'lsof'.  It's possible that there are open files in the
directory.  If these have been deleted, there are no files visible, but
the filehandle can still point here.

Another possibility is filesystem corruption.  This is best tested by
restarting the system (a drastic measure IMO, but sometimes necessary).

Double-check that the filesystem is mounted writeable.  Use /proc/mounts
rather than /etc/mounts (or the output of the 'mount' command to verify
this.  'mount' uses /etc/mounts, and may have incorrect information.

> Additionally, I have a couple of directories that I am also unable to
> remove using the same methods described above.  I can rename these
> directories, but cannot delete them, even though there are absolutely
> NO files in them.
> 
> I am running an ext3 filesystem, and have performed a forced fsck on
> the drive (fsck -fvc /dev/sda3) and it passes all of the tests.

I think I remember similar problems but don't recall the workaround ATM.

Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
   Comic tragedy:  MobiliX sued by comix publisher over iX trademark
     http://mobilix.org/mobilix_asterix.html



Reply to: