From: Bill Jones (bjones@cambria.columbus.oh.us)
Date: 10/30/92


From: bjones@cambria.columbus.oh.us (Bill Jones)
Subject: Re: problem with extfs:  ext_readdir: bad directory entry
Date: Fri, 30 Oct 1992 06:30:48 GMT

Michael Pereckas (pereckas@uxa.cso.uiuc.edu) wrote:
: ext_readdir: bad directory entry
: dev=835, dir=2094, offset=1016, rec_len=0, name_len=0
: total 0
: 2 msp ~/t %
:
: efsck reports the bad directory entry, but it seems unable to do
: anything about it. I've tried the -a, -r, and -S options with no
: luck. I can't delete the directory and I can't unlink it with rm -d.
: Is there anything I can do besides backup, mkefs, restore?

Step 1: Get used to it. It happens to me at least once a day on my news
spool and I have seen it reported whenever a large amount of disk access is
done on an extfs. Maybe someday it will be taken care of :)

Step 2: Use the following as a guide (if anyone has anything better, I'd be
glad to hear of it -- particularly if it is simpler. I have the following
in a shell script to do this unattended but it took me a week to debug and I
still don;t trust it).

        mv foo .foo (foo is the bad directory)
        mkdir foo
        mv .foo/* foo
        rm -rf .foo &

At this point, the rm will lock up and not let itself be killed. If the
system locks or fails on any of the other three commands, the contents of
the directory are lost -- period. Once the system locks (or you reach the
last step), reboot (using another VC if you have to) and run efsck -r (or
-a) on the partition. This should report one inode and one zone not in use
but then you're home free -- until the next time.

: --
: Michael Pereckas pereckas@uxa.cso.uiuc.edu
: Have you used the term ``nasal demons'' today?

Bill

-- 
============================================================================
Bill Jones
bjones@cambria.columbus.oh.us
============================================================================