Subject: Re: Is the "df" command reporting accurately?
To: port-Mac68k netbsd mailing list <port-mac68k@netbsd.org>
From: Josh Kuperman <josh@saratoga.lib.ny.us>
List: port-mac68k
Date: 02/07/2001 14:22:39
At first, when I posted this I thought something was fishy with /home
or even that I might somehow have the wrong df command.

> roberta# df
> Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
> /dev/sd0a       62487    14610     41628      25%    /
> /dev/sd0e      992264   883059      9978      98%    /var
> /dev/sd0g      882193   273902    520071      34%    /usr
> /dev/sd0f     1184662  1004683     61512      94%    /home
> kernfs              1        1         0     100%    /kern
> procfs              4        4         0     100%    /proc
> /dev/cd0c      367272   367272         0     100%    /cdrom

I have decided to reinstall using the sysinstall method anyhow, but it
is clear to me that there is a lot wrong with this picture. Way too
much to fix without reinstalling (reinstalling is still trivial at
this point - I don't have anything I need to preserve). It is also
somewhat difficult to even tell when 1KB and 512B blocks are being
reported by some of the programs or why. du seems to report 1k blocks
regardless, contrary to what the man pages say about the -k
option. What size does the system actually use?  Am I safe in assuming
1K blocks. And one of the reasons I have decided to reinstall was that
I based some estimates of what I needed on the output of the df
command, so I thought I might actually need > 70MB for var. Is it
documented how much disk space is used by a basic install? I'll find
out, but now I'm assumming I can probably get by with less than 50M
for a /var directory.

here is the disklabel output.

roberta# disklabel /dev/sd0
# /dev/sd0c:
type: SCSI
disk: FIREBALL_TM1280
label: fictitious
flags:
bytes/sector: 512
sectors/track: 183
tracks/cylinder: 2
sectors/cylinder: 366
cylinders: 6810
total sectors: 2503872
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

7 partitions:
#        size   offset     fstype   [fsize bsize   cpg]
  a:   130000    41056     4.2BSD        0     0     0   # (Cyl.  112*- 467*)
  b:   204000   171056       swap                        # (Cyl.  467*- 1024*)
  c:  2503872        0     unused        0     0         # (Cyl.    0 - 6841*)
  d:    40960       96        HFS                        # (Cyl.    0*- 112*)
  e:   228816  1875056     4.2BSD        0     0     0   # (Cyl. 5123*- 5748*)
  f:   400000  2103872     4.2BSD        0     0     0   # (Cyl. 5748*- 6841*)
  g:  1500000   375056     4.2BSD        0     0     0   # (Cyl. 1024*- 5123*)
disklabel: boot block size 0
disklabel: super block size 0

current df output with a newfs /home

roberta# df
Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
/dev/sd0a       62487    14642     41596      26%    /
/dev/sd0e      992264   883612      9425      98%    /var
/dev/sd0g      882193   273902    520071      34%    /usr
kernfs              1        1         0     100%    /kern
procfs              4        4         0     100%    /proc
/dev/cd0c      367272   367272         0     100%    /cdrom
/dev/sd0f      192806    12683    170482       6%    /home


diskusage reported from home and var:

roberta# du -Psc /home
12683   /home
12683   total

roberta# du -Psc /var
1419    /var
1419    total

 
roberta# du -Pcsx /
14642   /
14642   total

-- 
Josh Kuperman                       
josh@saratoga.lib.ny.us