Subject: Re: file system annoyances and such...
To: Erik Vogan <vogan@auriga.rose.brandeis.edu>
From: Ken Nakata <kenn@remus.rutgers.edu>
List: macbsd-general
Date: 07/10/1995 17:21:18
> 	Now, on to the question and the details.  I've got a fully (sort 
> of) functional install of macBSD 1.0B, and I was happily compiling 
> -current for personal use and gratification.  I have a 60 meg root, a 230 
> meg /usr, and a 180 meg /home.  All -current work takes place on the 
> /home partition.
>
> [...] Well, during the compile I received a panic and dropped to 
> the kernel debugger.  I don't remember the initial panic, but I rebooted, 
> and had to run fsck manually.  I got many dupped inodes, many pathnames 
> that were to be removed, many dup/bad inodes to be cleared, and all the 
> tables needed to be rebuilt.  These errors were all reported on the /home 
> partition where the compile had been taking place.

Sounds like the "bad dir" panic I still keep getting once in a while,
when I'm compiling a big stuff (like kernel, or user land stuffs)
although kernels compiled from this month's source seem to be much
more stable than the earlier ones.

> No matter how many 
> times I ran fsck manually, it complained that there were missing bits in 
> the allocation table, did I want to fix them ? [ I ran it twelve times in 
> a row to be sure! ].

This is odd... although I'm not sure because I usually just do "newfs"
on the damaged partitions if the damage is severe (newfs runs much
faster than MacOS side MKFS).

Are you sure the said partitions were UNmounted when you ran fsck?

> 	I rebooted, recopied the -current sources files from the mac 
> side, and the copied died with a panic: trying to free free block.  More 
> fsck manually, more dups, pathnames to clear, dups/bad to clear, tables 
> to be rebuilt, etc.  Repeat five to six times.  Suspicion starting to 
> dawn - something is wrong here!  Then, the problem spread to the /usr 
> partition.

I'm sorry for you.  Right now, only practical selfdefense measure I
can tell you is to make back-ups as frequently as possible.  I make
incremental tar back-ups for my /, /usr, /usr/src, and /usr/local fs's
(all on sd0) nightly into /home fs which is on sd1.  So, even if I
lose most of my partitions, I'll be in good shape as long as /home is
safe (which most of the time is the case as you describe... "bad dir"
panic would destroy those fs's that were in use at the moment of
panic).

And one other thing; DO NOT DO "c sync" OR "c reboot" from kernel
debugger if "bad dir" dropps you at kdb.  It is my personal experience
that the damage will be much more severe if I do.

> 	So ... I did what any person who has sold himself on an 
> experimental OS would do - I punted.  I brought up the macOS mkfs, did a 
> mkfs on all three volumes (/, /usr, /home, but NOT swap), and set to 
> reinstalling all the base distribution binaries + X11.  Half way through 
> installing misc.tgz the installer bails with a panic: trying to free free 
> block !!!!

Hmmm.... this is strange... I've never experienced this kind of
behavior.  It might be some peculiarlity with Silverlining, but I have
no idea...

kenn