Subject: df block count + minfree == disk full
To: None <port-mac68k@netbsd.org>
From: Balazs Bela Kosaras <bbk201@is8.nyu.edu>
List: port-mac68k
Date: 09/24/1999 10:32:14
The block counts as given by df (see below) cannot possible be right. The
df man page offers the following explanation:

Note that the printed count of available blocks takes minfree into
account, and thus will be negative when the number of free blocks on the
filesystem is less than minfree.

That's fine, but how can the used block count be so high when the /tmp
directory is supposed to be cleared at boot time? The result is that ed/vi
cannot create a file because it thinks that /tmp is full (see below). (As
root, ed/vi doesn't complain about /tmp being full, of course.) Am I
pushing my luck with large partitions or is this something else?

Another weird thing has to do with nsectors and ntracks. Mkfs uses 218
sectors/track and 5 tracks/cylinder to format the partitions. disklabel
now shows 217 sectors/track; at other times, disklabel reports 32
sectors/track and 64 tracks/cylinder. Is this relevant at all here?

Any suggestions?
Thanks in advance	--Balazs


# cat /etc/fstab
/dev/sd0a	/	ffs	rw 1 1
/dev/sd0b	none	swap	sw 0 0
/dev/sd0g	/var	ffs	rw 1 2
/dev/sd0d	/usr	ffs	rw 1 3
/dev/sd0e	/usr/local	ffs	rw 1 4
/dev/sd0f	/home	ffs	rw 1 5
/dev/sd0h	/tmp	ffs	rw 1 6
kern		/kern	kernfs	rw 0 0
proc		/proc	procfs	rw 0 0


# disklabel sd0
# /dev/rsd0c:
type: SCSI
disk: DDRS-34560
label: fictitious
flags:
bytes/sector: 512
sectors/track: 217
tracks/cylinder: 5
sectors/cylinder: 1085
cylinders: 8192
total sectors: 8925000
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# milliseconds
track-to-track seek: 0	# milliseconds
drivedata: 0 

8 partitions:
#        size   offset     fstype   [fsize bsize   cpg]
  a:   195110     1201     4.2BSD        0     0     0   # (Cyl. 1*-180*)
  b:   262690   309671       swap                        # (Cyl. 285*-527*)
  c:  8925000        0     unused        0     0         # (Cyl. 0 - 8225*)
  d:  1024600   572361     4.2BSD        0     0     0   # (Cyl. 527*-1471*)
  e:  4393790  1596961     4.2BSD        0     0     0   # (Cyl. 1471*-5521*)
  f:  1464960  5990751     4.2BSD        0     0     0   # (Cyl. 5521*-6871*)
  g:   113360   196311     4.2BSD        0     0     0   # (Cyl. 180*-285*)
  h:   584240  7455711     4.2BSD        0     0     0   # (Cyl. 6871*-7410*)
disklabel: boot block size 0
disklabel: super block size 0


# df -i
Filesystem  1K-blocks     Used    Avail Capacity iused   ifree  %iused
Mounted on
/dev/sd0a       94274    11418    73428    13%     464   24110   1% /
/dev/sd0d      645268   253248   327493    43%    8829  112001   7% /usr
/dev/sd0g      149033    94872    39257    70%      89   14245   0% /var
/dev/sd0e     2773599   645301  1850938    25%      26  516068   0% /usr/local
/dev/sd0f     3483213  2773613   361278    88%       9  172021   0% /home
/dev/sd0h     3766068  3483222   -93761   102%       2   69628   0% /tmp
kernfs              1        1        0   100%       0       0 100% /kern
procfs              4        4        0   100%      15     261   5% /proc


% ed
P
*a
this is a text file
.
*w somefile


/tmp: write failed, file system is full

No space left on device
?
*Q
%