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


From: bjones@cambria.columbus.oh.us (Bill Jones)
Subject: Re: corrupt directory on efs partition
Date: Fri, 16 Oct 1992 23:53:21 GMT

Ed Carp (erc@unislc.uucp) wrote:
: I've posted this to the mailing list, but got no replies, except a post by
: Darren Drake of the same problem.

I have reported the same problem to the newsgroup twice and heard absolutely
nothing about it. At least you had better luck than me. :)

: The efs driver is reporting a "bad directory entry", and gives the error
: message: "bad directory: rec_len(0) too short". efsck will report it, but
: not fix it. Anyone know how to fix this? I can't delete the directory in
: question - do I have to zero out the inode for the directory, then run
: efsck? Anyone ported fsdb yet?? :) :)

If you cannot delete the directory, there is nothing you can do except back
up everything and run mkefs again (If I am wrong I would REALLY like to
know). But what I have found is that even though it appears I cannot remove
the offending directory, it is in fact removed. Sample session

cd /usr/spool/news/alt/sci
mv physics .physics
mkdir physics
mv .physics/* physics
[error messages here which I assume concern the bad rec_len]
rm -rf .physics

Here the system will hang. If I switch to another VC and run reboot, then
run efsck on the offending partition, the bad directory entry will be gone
and the inode and zone will be reported as unused. It is then easy to fix.

As I reported earlier, this behavior only occurs on my news spool where I am
getting heavy read/write action. My /usr/users directory, which is a
partition with an efs, does not have these problems. I assume that this is
due to either the lack of constant read/write action or because of the size
of the partition (news spool = 266 MB; /usr/users = 160 MB; problem did not
occur when the news spool was about 80 MB in size).

: --
: Ed Carp, N7EKG erc@apple.com 801/538-0177

Bill

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