Subject: fdesc (LKM) corrupting file systems?
To: current users <current-users@NetBSD.ORG>
From: Paul Goyette <paul@pgoyette.bdt.com>
List: current-users
Date: 12/22/1996 06:09:31
Just a heads-up to y'all...

In the past month, I've experienced serious file system corruption on at
least five occassions.  It seems that large chunks of files with
consecutive i-node numbers get mercilessly trashed.  A `ls -l' on these
files (or directories!) shows that they've been magically transformed into
block or char specials.  Running fsck(8) complains about all sorts of
things:  contiguous chunks of i-nodes are "partially allocated" and some
directories have "empty blocks" are the most common, although there's
almost always one or two "unknown file type" errors as well.

The most recent experience was earlier this morning, when I reviewed my
daily security log and noticed that nearly all of /dev had apparently
disappeared yet several executables in /usr/libexec (like cc1obj, cc1plus,
lint1, and lint2) and a few text files from /usr/share/doc were now
specials!  BTW, /dev and /usr are on two separate drives, sd0a and sd1g. 
So, I immediately shutdown to single user, dismounted all of my file
systems, and fsck'd everything, twice!  Then, I rebooted single user and
ran fsck again immediately, and more corruption had shown up!

The only changes I've made recently (other than updating to -current a few
times) has been to remove all the fs code (except ufs) from the kernel and
load them as LKMs, _AND_ I've been mounting an fdesc partition on top of
/dev using the mount(8) option `-o union' as recommended in the man page
for fdesc.

I'm now running without the fdesc file system mounted, and I'll keep y'all
posted.  But it sure looks like the fdesc lkm screws something up royally,
most likely during system shutdown time.

PS  If anyone needs more details about this problem, let me know.  I would
send in a send-pr but I still can't reliably reproduce the problem and I'm
getting so tired of losing chunks of my file systems I really don't want
to experiment too much!