Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Sep 1999 17:48:31 -0500 (CDT)
From:      David Scheidt <dscheidt@tumbolia.com>
To:        Evren Yurtesen <yurtesen@ispro.net.tr>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: nobody knows the answer?
Message-ID:  <Pine.NEB.3.96.990901173018.99471A-100000@shell-3.enteract.com>
In-Reply-To: <37CD9E7C.FB04E606@ispro.net.tr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2 Sep 1999, Evren Yurtesen wrote:

> I am using 3.2-Stable and I have a 9GB disk drive used as cache for
> squid proxy. I have changed the min free space with tunefs program to 0
> but now I have a problem. Even though I have 250MB free space on the
> file system, I get file system full error.

You have almost certainly run out of file fragments.  Space on FFS
filesystems is allocated in the from of blocks, which are divided into
fragments.  These blocks are not the same as the physical disk blocks, but
are a number of sequential disk blocks.  The default FFS block size is 8KB.
Each FFS block is subdivided into fragments.  The default is 8 fragments per
block, giving a default frag size of 1KB.  

A file on an FFS filesystem is made up some number of full blocks, except
for the last block in a file, which may be a partial block.  One of the
reasons that FFS reserves 8% of the disk space for its own use is to
efficently handle fragmented blocks.  When a file is extended, the
filesystem tries to allocate a full block for it.  Having this reserve means
that it is unlikely that the filesystem will run out of full blocks.

What has likely happened on your machine is that you have lots of small
files, which take up, say, 5 frags of a block.  That leaves you with a bunch
of fragmented blocks that cannot contain a whole file.  Since FFS can't
split a file over multiple fragmented blocks, you are told you are out of
space.  df(1) reports the amount of free fragments.  Since you don't have
any free full blocks, you can't extend files.  

To prevent this from happening again, increase the the min free space back
to its default setting.  You will not have this problem again, and you will
very likely see a substantial improvement in filesystem speed.  Most of the
tunefs(8) tunables are not something that need to tuned by the user.  If you
are tuning them, you should have a full understand of what the tunables do,
and what the side effects of fiddling with them are.  


David Scheidt



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96.990901173018.99471A-100000>