[comp.os.minix] Problem with large hard disk partition

7103_300@uwovax.uwo.ca (Eric Smith) (01/10/89)

   A friend recently ran into a problem installing Minix on his
Megafile 60. Mounting a large (32Mb) partition followed by a smaller
one produced a "file table overflow" message. Trying to mount both
of them from /etc/rc produced a fatal file system panic. Apparently
mount reads a lot of information from disk, and a 32Mb partition's
super block info, etc. fills up the buffer cache. We recompiled
Minix with a bigger buffer cache, and the problem went away.
So if you ever plan on using Minix on a big (>16Mb) partition, I would
suggest applying the following patch:

*** fs/const.h.orig	Thu Nov 14 20:35:46 1988
--- fs/const.h	Thu Jan  9 20:49:48 1989
***************
*** 1,7 ****
  /* Tables sizes */
  #define NR_ZONE_NUMS       9	/* # zone numbers in an inode */
! #define NR_BUFS           20	/* # blocks in the buffer cache */
! #define NR_BUF_HASH       32	/* size of buf hash table; MUST BE POWER OF 2*/
  #define NR_FDS            20	/* max file descriptors per process */
  #define NR_FILPS          64	/* # slots in filp table */
  #define I_MAP_SLOTS        4	/* max # of blocks in the inode bit map */
--- 1,7 ----
  /* Tables sizes */
  #define NR_ZONE_NUMS       9	/* # zone numbers in an inode */
! #define NR_BUFS           40	/* # blocks in the buffer cache */
! #define NR_BUF_HASH       64	/* size of buf hash table; MUST BE POWER OF 2*/
  #define NR_FDS            20	/* max file descriptors per process */
  #define NR_FILPS          64	/* # slots in filp table */
  #define I_MAP_SLOTS        4	/* max # of blocks in the inode bit map */
============================================================
Eric R. Smith                      email:
Dept. of Mathematics               7103_300@uwovax.uwo.ca
University of Western Ontario      7103_300@uwovax.bitnet
London, Ont. Canada N6A 5B7    (a shared mailbox: put my name on
ph: (519) 661-3638              the Subj: line, please!)

hyc@math.lsa.umich.edu (Howard Chu) (01/15/89)

In article <1226@uwovax.uwo.ca> 7103_300@uwovax.uwo.ca (Eric Smith) writes:
>
>   A friend recently ran into a problem installing Minix on his
>Megafile 60. Mounting a large (32Mb) partition followed by a smaller
>one produced a "file table overflow" message. Trying to mount both
>of them from /etc/rc produced a fatal file system panic. Apparently
>mount reads a lot of information from disk, and a 32Mb partition's
>super block info, etc. fills up the buffer cache. We recompiled
>Minix with a bigger buffer cache, and the problem went away.

I encountered this problem, or a similar one, but the circumstances
are too odd for me to believe it's really the size of the buffer cache
that's the culprit.

I have a 47 meg partition. I had to change mkfs before I could actually
use it, but I was then able to mount it with no trouble. I added it into
my /etc/rc, and went away. Next time I tried to boot Minix, filesystem
panic, out of buffers (20). Hmmm....

I interrupt after booting, so /etc/rc doesn't get executed. Ok, fine.
Mount the partition, boom. Panic. Reboot, mount a floppy, try to see
what's happening. (All of my sources are on that 47 meg partition. If
I can't mount it, I'm in Big Trouble....) Mount the partition. Ok. No
crash. What happened?

Turns out that I can mount the big partition with no trouble, if I mount
a small one first. Why is this, I wonder. Then I can continue to mount
any number of small partitions. But, if I just mount the small partition,
followed by the big one, and then try to unmount the small one, panic. Same
as before. Haven't examined the code yet, but I suspect a signed/unsigned
short problem...
--
  /
 /_ , ,_.                      Howard Chu
/ /(_/(__                University of Michigan
    /           Computing Center          College of LS&A
   '              Unix Project          Information Systems