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 majord...@freebsd.org with "unsubscribe freebsd-hackers" in the body of the message