Strange case of filesystem corruption?
Bill Vermillion
bv at wjv.com
Mon Sep 5 19:17:09 PDT 2005
In the last exciting episode of the Mikhail Teterin saga
on Mon, Sep 05, 2005 at 21:37 , Mikhail Teterin as heard to say:
> On Monday 05 September 2005 08:38 pm, Eric Anderson wrote:
> = Mikhail Teterin wrote:
> = > Can this be explained by anything other than a (nasty) bug?
> = > % ls -la audio/shorten/files
> = > total 0
> = > % rmdir audio/shorten/files
> = > rmdir: audio/shorten/files: Directory not empty
> = > This is on 5.4-stable from July 21 -- up ever since... Thanks!
> [...]
> = Can you show permissions on the directories audio, shorten, and files?
> Well, ls of the directory succeds above, so it can not be the permission
> problem. But here:
> % cd audio/shorten
> % ls -lds
> 2 drwxrwxr-x 4 mi wheel 512 Jul 21 01:13 .
> % ls -loas files
> total 0
> % rmdir files
> rmdir: files: Directory not empty
> = Also - what is your securelevel set to
> Default.
> = and have you checked to see if there are processes with any open files
> = in those directories?
> I doubt there are any, and why would that affect anything anyway? Here:
You could check to be sure by running 'lsof'. That should remove
all doubts.
> % mkdir /tmp/q
> % touch /tmp/q/meow
> % tail -F /tmp/q/meow &
> [2] 39947
> % rm /tmp/q/meow
> % rmdir /tmp/q
>
> In other words, the directory (/tmp/q) is removable even if a process
> (tail) still has a deleted file (meow) in it opened.
>
> On Monday 05 September 2005 08:42 pm, Beecher Rintoul wrote:
> = Try rm -R audio/shorten/files
>
> Thank you, but I'm afraid, it may succeed in deleting the directory,
> while I try to figure out, what is happening -- the directory is empty
> according to ls, but not empty according to rmdir.
I've seen this fairly recenlty in a 4.x [it's either 9, 10, or 11 -
and I don't remember which server it was on so I can't verify the
version number].
And I'm sorry I don't remember exactly what I did to fix it, as
I tried many ways before I got the right one.
Every now and then almost every Unix system does something that is
almost unfathomable.
Bill
--
Bill Vermillion - bv @ wjv . com
More information about the freebsd-fs
mailing list