NetBSD Problem Report #8177
Received: (qmail 29029 invoked from network); 8 Aug 1999 19:50:53 -0000
Message-Id: <199908081950.MAA20068@nooksack.ldc.cs.wwu.edu>
Date: Sun, 8 Aug 1999 12:50:52 -0700 (PDT)
From: nate@portents.com
Reply-To: nate@portents.com
To: gnats-bugs@gnats.netbsd.org
Subject: mkfs can make a file system that passes fsck, but df reports bogus info
X-Send-Pr-Version: www-1.0
>Number: 8177
>Category: install
>Synopsis: mkfs can make a file system that passes fsck, but df reports bogus info
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: install-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Aug 08 13:05:00 +0000 1999
>Closed-Date: Mon Dec 18 06:26:52 +0000 2000
>Last-Modified: Mon Dec 18 06:26:52 +0000 2000
>Originator: Nathan Raymond
>Release: 1.4 mac68k
>Organization:
>Environment:
NetBSD speedbump 1.4 NetBSD 1.4 (GENERIC) #0: Sat May 8 20:54:59 PDT 1999 root2@c610:/usr/src/sys/arch/mac68k/compile/GENERIC mac68k
>Description:
I formatted a 2GB partition on a 3GB drive successfully with Mkfs 1.45 and noticed that df reported the empty partition was 37% full (about the size of the 1GB partition!), yet it was an empty partition:
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/sd1a 3038071 1014244 1720019 37% /pub
The output of "du /pub":
8 /pub/lost+found
9 /pub
Unmounting the drive and running fsck -f returned no errors. After rebooting it was still there. Someone recommended changing the fslevel, so I changed it from a level 1 to a level 2 with:
fsck -T ffs:"-c 2" /pub
Remounted, problem still persisted. Then changed it to a level 3, still there. Finally gave up, and since it was an empty partition, ran newfs on it in netbsd. The output of df is now accurate:
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/sd1a 2023869 1 1922674 0% /pub
Here is the top output of dumpfs on the Mkfs formatted fslevel 3 file system and the newfs formatted file system, for comaprison:
Before with Mkfs and fsck -T ffs:"-c 3" /pub:
Endian big-endian magic 11954 time Sat Aug 7 09:01:53 1999
cylgrp dynamic inodes 4.4BSD fslevel 3
nbfree 252977 ndir 2 nifree 505339 nffree 11
ncg 329 ncyl 5264 size 2092290 blocks 3038071
bsize 8192 shift 13 mask 0xffffe000
fsize 1024 shift 10 mask 0xfffffc00
frag 8 shift 3 fsbtodb 1
cpg 16 bpg 795 fpg 6360 ipg 1536
minfree 10% optim space maxcontig 1 maxbpg 2048
rotdelay 4ms headswitch 0us trackseek 0us rps 60
ntrak 5 nsect 159 npsect 159 spc 795
symlinklen 60 trackskew 0 interleave 1 contigsumsize 0
nindir 2048 inopb 64 nspf 2
sblkno 16 cblkno 24 iblkno 32 dblkno 224
sbsize 3072 cgsize 2048 cgoffset 80 cgmask 0xfffffff8
csaddr 224 cssize 6144 shift 9 mask 0xfffffe00
cgrotor 0 fmod 0 ronly 0 clean 0x01
After newfs:
Endian big-endian magic 11954 time Sat Aug 7 19:42:45 1999
cylgrp dynamic inodes 4.4BSD fslevel 3
nbfree 252982 ndir 1 nifree 510717 nffree 12
ncg 285 ncyl 4549 size 2092290 blocks 2023869
bsize 8192 shift 13 mask 0xffffe000
fsize 1024 shift 10 mask 0xfffffc00
frag 8 shift 3 fsbtodb 1
cpg 16 bpg 920 fpg 7360 ipg 1792
minfree 5% optim time maxcontig 8 maxbpg 2048
rotdelay 0ms headswitch 0us trackseek 0us rps 60
ntrak 5 nsect 184 npsect 184 spc 920
symlinklen 60 trackskew 0 interleave 1 contigsumsize 8
nindir 2048 inopb 64 nspf 2
sblkno 16 cblkno 24 iblkno 32 dblkno 256
sbsize 2048 cgsize 2048 cgoffset 96 cgmask 0xfffffff8
csaddr 256 cssize 5120 shift 9 mask 0xfffffe00
cgrotor 0 fmod 0 ronly 0 clean 0x01
>How-To-Repeat:
Seems to have to do with formatting two partitions on a drive (maybe a large drive?) with Mkfs, though its very strange that the bogus info in one of those partitions is coming up as clean in fsck. I guess this could be a bug in Mkfs, fsck, and/or the kernel.
>Fix:
No real fix, just a workaround (use newfs if possible). I have no idea where the real problem lies.
>Release-Note:
>Audit-Trail:
From: proff@suburbia.net
To: nate@portents.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: install/8177: mkfs can make a file system that passes fsck, but df reports bogus info
Date: Mon, 9 Aug 1999 06:14:41 +1000 (EST)
> No real fix, just a workaround (use newfs if possible). I have no idea where the real problem lies.
bogus disklables? You didn't show them.
From: Frederick Bruckman <fb@enteract.com>
To: nate@portents.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: install/8177: mkfs can make a file system that passes fsck, but
df reports bogus info
Date: Sun, 8 Aug 1999 14:23:25 -0500 (CDT)
On Sun, 8 Aug 1999 nate@portents.com wrote:
> ntrak 5 nsect 159 npsect 159 spc 795
^^^
> After newfs:
> ntrak 5 nsect 184 npsect 184 spc 920
^^^
That's interesting, and odd, that the default geometry is different.
What happens if you change 159 -> 184 in the Mkfs dialog box?
State-Changed-From-To: open->closed
State-Changed-By: hubertf
State-Changed-When: Sun Dec 17 22:25:28 PST 2000
State-Changed-Why:
Please see if this still happens with NetBSD 1.5.
If so, let us know by submitting a new PR; Be sure
to include all the parameters you give to Mkfs if so
(I'm assuming Mkfs is some MacOS tool, not the NetBSD
mkfs that was shipped ages ago).
- Hubert
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.