Subject: Re: "no inodes free", but still 40% (73MB) left on disk
To: None <netbsd-help@NetBSD.org>
From: henry nelson <netb@irm.nara.kindai.ac.jp>
List: netbsd-help
Date: 11/06/2003 12:20:07
On Tue, Nov 04, 2003 at 05:07:23PM -0800, Jeremy C. Reed wrote:
> On Wed, 5 Nov 2003, henry nelson wrote:
> > I've been trying to just unpak (not use) pkgsrc.tar.gz, but it won't go on
> > the partition I made for it.  I tried: "gzip -dc pkgsrc.tar.gz | tar xf -",
[...]
> >           1K-blocks  Used  Avail  Capacity
> > /dev/sd0e   190600  107988 73082    59%    /usr/pkgsrc
> 
> Try "df -i" to see inode usage too.
> 
> > Is it because pkgsrc has a huge number of very small files?  Could I use
> 
> It has many files. I don't know if I counted right (as listed in
> CVS/Entries so I wouldn't count my extra junk), but I came up with 41049

Thought I'd go ahead and follow up on this with the result, since a question
came to mind about the cutoff sizes for the default values of newfs -b and -i.

What I did was halve the block size and double the density of inodes, i.e.,
use the default values for a partition with data size < 20MB.  That gave the
following result just after unpaxing pkgsrc.tar.gz.
          1K-blocks  Used  Avail  Capacity  iused  ifree  %iused    Mounted
/dev/sd0e   184968  160914 14805    91%     68577  23965    74%   /usr/pkgsrc

Now my question: Any gurus out there who know the rationale for the <20MB,
<1024MB, >=1024MB data size space cutoff points for determining the default
block size and inode density?

I'm about as stingy as they come when it comes to hdd space, but even I don't
use any disk with less than 512MB on a halfway serious install.  The smallest
partition I do is 51MB (10%).  So my question is, isn't <20MB some remnant of
ancient times when workstations still had 200MB hdds?  I could see the sizes
go up to <96MB and <1024MB, and another default cutoff point added at <4096.
(Of course now that I've studied up on newfs a little, the defaults aren't so
important anymore, except for sysinstall, which uses them.)

henry