Subject: Re: overfilling mfs partitions larger than 600M causes kernel
To: Hernani Marques Madeira <hernani@vecirex.net>
From: Tim Kelly <hockey@dialectronics.com>
List: port-macppc
Date: 11/18/2004 11:21:03
Hi Hernani,

> I tested it using hpcarm and running
> 2.0_RC4 NetBSD 2.0_RC4 
> from
> Tue Nov  9 22:36:35 CET 2004 (sources got earlier on that day).
> 
> 1. attempt with 600 megs:
> [snip]
>  mkdir /mfs
>  mount_mfs -s 600m ffs /mfs
> UVM: pid 502 (mount_mfs), uid 0 killed: out of swap
> killed
> [/snip]
> -> nothing mounted at /mfs

Seems reasonably behaved.

> 3. attempt (after booting up again) with 300 megs:
> [snip]
>  mount_mfs -s 300m ffs /mfs
>  mount -t mfs
> mfs:316 on /tmp type mfs (synchronous, local)
> mfs:338 on /mfs type mfs (synchronous, local)
>  df -h /mfs
> Filesystem    Size     Used     Avail Capacity  Mounted on
> mfs:338       291M     1.0K      276M     0%    /mfs
> cp -R /usr/* /mfs
> [/snip]
> -> system hangs completely (without any output)

Any possibility this has dropped into ddb on a serial port?

> 6. attempt (after booting up again) with 8 megs (15M free)
> [snip]
>  mount_mfs -s 8m ffs /mfs
>  cp -R /usr/* /mfs
> # ... messages that filesystem /mfs is full and that's no space left
> # ...
>  df -h /mfs
> Filesystem	Size	Used	Avail Capacity	Mounted on
> mfs:493		7.5M	7.5M	-381K	105%	/mfs
> [/snip]
> -> system continues to work properly

So it is possible that on your architecture this works only if the mfs
is smaller than free. What is your swap size? Does the mount_mfs command
work if the partition is smaller than swap, but the box crashes when it
gets filled?

Regardless of the size of the mfs partition, the last message is the
only one exhibiting proper behavior once the partition is actually
created and mounted. Under no circumstances should overfilling a
partition cause the kernel to panic (one can imagine the problems if it
were a single partition install and it became overfilled).

tim