From: Stephen Tweedie (sct@dcs.ed.ac.uk)
Date: 05/30/93


From: sct@dcs.ed.ac.uk (Stephen Tweedie)
Subject: Re: ext2fs CRASH help!
Date: 30 May 1993 18:49:03 GMT

On 28 May 93 14:31:48 GMT, rohrer@fncrd6.fnal.gov (Keith Rohrer) said:

> Last week, I had the problem that when I filled my /usr partition
> (ext2) with anything (after awhile I was just catting /dev/zero >
> test.blob) I got out- of-space errors with 2700 or so blocks, and
> scads of inodes, still free. I ended up re-mke2fs'ing the partition
> to fix it. e2fsck showed no problems whatsoever. Anyone else had
> this sort of bomb? (the partition may have been made with 0.2
> mke2fs, but I was using the 0.3 e2fs patches and programs; kernel is
> 0.99.9)

A couple of possibilities:

Were you perhaps falling victim to the fact that ext2fs reserves a
variable amount of partition space for use by root? You can set the
percentage of space reserved during mke2fs. Reserving space serves
the twin purposes of preventing a filesystem from becoming so full
that you get bad fragmentation (which all filesystems suffer from),
and preventing over-zealous users from starving critical daemon
programs of useable disk space.

"df" on an ext2fs filesystem should show the full filesystem size and
the disk space both used and available, but the used and free disk
space will not add up to the full size if there is a root-reserved
limit in place. In fact, if you log on as root and continue to fill
the filesystem beyond that limit, "df" will report the disk free space
as negative, and the useage will be 100% or greater. This is intended
behaviour!

Secondly, ext2fs respects the FSIZE system resource limit (set by the
bash builtin "ulimit" command), which limits the maximum size of any
file. I have known people fall foul of this because they had a ulimit
command in their profile which was intended to limit the size of core
files (ulimit -c), but they used the wrong ulimit option and ended up
limiting file sizes.

Cheers,
 Stephen.