*BSD News Article 67540


Return to BSD News archive

#! rnews 3384 bsd
Newsgroups: comp.unix.bsd.bsdi.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!spool.mu.edu!usenet.eel.ufl.edu!europa.chnt.gtegsc.com!ra.nrl.navy.mil!news.math.psu.edu!news.cse.psu.edu!uwm.edu!vixen.cso.uiuc.edu!newsfeed.internetmci.com!in1.uu.net!news.new-york.net!spcuna!spcvxb!terry
From: terry@spcvxb.spc.edu (Terry Kennedy, Operations Mgr.)
Subject: Re: Dispute over number of files
X-Nntp-Posting-Host: spcvxa.spc.edu
References: <4md2k5$ep1@antares.en.com>
Sender: news@spcuna.spc.edu (Network News)
X-Nntp-Posting-User: TERRY
Organization: St. Peter's College, US
Date: Fri, 3 May 1996 15:59:02 GMT
Message-ID: <1996May3.105902.1@spcvxb.spc.edu>
Lines: 51

In article <4md2k5$ep1@antares.en.com>, MML Staff <mml@4you.com> writes:
> If anyone can provide factual information about the Unix file 
> system (especially BSDI; if it's different) that supports either
> my argument or the presence providers, please respond.  Post
> your response rather them email, so that everyone (including
> the presence provider) can see.  Thanks.

  I think your provider is a little confused, particularly in the area of
minimum file sizes - you could have a 1K file and zillions of links to it
and still only be using 1K of disk space. Inodes (where directory entries
live) take up *some* space, but they're only 128 bytes, as this program
will demonstrate:

#include <sys/types.h>
#include <time.h>
#include <ufs/ufs/dinode.h>
main()
{
	printf("%d\n", sizeof(struct dinode));
}

  And these inodes are pre-allocated when the disk is initialized, so if
you use more inodes, the available disk space doesn't go down as long as
you don't actually create unique files. If they want to limit your disk
space, then a simple size limit will do it (as you noted).

  However, they may have initialized (newfs'd) the disk with a small num-
ber of inodes and they may be concerned with running out of inodes. Indeed,
the only way to fix that is to reinitialize the disk with more inodes. This
is a common mistake, particularly with news spool disks (as they have lots
of tiny files). You can easily see if this is a problem by using the "df -i"
command:

Filesystem    1K-blocks     Used    Avail Capacity iused   ifree  %iused  Mounted on
/dev/sd0a         63535     7838    52520    13%    1122   14236     7%   /
mfs:30            15871        1    15076     0%       1    3837     0%   /tmp
/dev/sd0d        254191     2842   238639     1%     462   60976     1%   /var
/dev/sd0e        254191        3   241478     0%       2   61436     0%   /tmp
/dev/sd0h       1334451   940998   326730    74%   82763  239795    26%   /usr
/dev/sd1a         63535     5590    54768     9%    1114   14244     7%   /backroot
/dev/sd1d        595535     2852   562906     1%     178  145740     0%   /news
/dev/sd1h       1246819   420775   763703    36%    3364  299994     1%   /sysprog

  If "%iused" is greater than "capacity", then the disk will likely run out
of inodes at some point. If it's less, the disk probably won't run out unless
the usage pattern changes greatly. Note that all of these partitions were
initialized with the default values.

	Terry Kennedy		  Operations Manager, Academic Computing
	terry@spcvxa.spc.edu	  St. Peter's College, Jersey City, NJ USA
        +1 201 915 9381 (voice)   +1 201 435-3662 (FAX)