From nobody@FreeBSD.org  Thu Aug 16 19:16:00 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2A854106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 Aug 2012 19:16:00 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 160D68FC0A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 Aug 2012 19:16:00 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q7GJFxIa053245
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 16 Aug 2012 19:15:59 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q7GJFxXw053241;
	Thu, 16 Aug 2012 19:15:59 GMT
	(envelope-from nobody)
Message-Id: <201208161915.q7GJFxXw053241@red.freebsd.org>
Date: Thu, 16 Aug 2012 19:15:59 GMT
From: Dieter <freebsd@sopwith.solgatos.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Newfs creates a filesystem that does not pass fsck.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         170676
>Category:       bin
>Synopsis:       newfs(8) creates a filesystem that does not pass fsck.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 16 19:20:09 UTC 2012
>Closed-Date:    
>Last-Modified:  Thu Aug 16 20:58:34 UTC 2012
>Originator:     Dieter
>Release:        8.2-RELEASE amd64
>Organization:
>Environment:
8.2-RELEASE amd64
>Description:
Newfs creates a filesystem that does not pass fsck.

newfs -e 100000000 -b 65536 -f 8192 -g 67108864 -h 16 -i 67108864 -U
 -o space -L 68data /dev/ada2

density reduced from 67108864 to 14860288
/dev/ada2: 2861588.5MB (5860533168 sectors) block size 65536,
 fragment size 8192
 using 789 cylinder groups of 3628.00MB, 58048 blks, 256 inodes.
 with soft updates
super-block backups (for fsck -b #) at:
 256, 7430400, 14860544, 22290688 [ ... ]

Fsck is unhappy:
fsck -fp -t ffs /dev/ufs/68data
/dev/ufs/68data: SUMMARY INFORMATION BAD (SALVAGED)
/dev/ufs/68data: 2 files, 2 used, 366264367 free (23 frags, 45783043 blocks,
 0.0% fragmentation)

Fsck successfully fixed the problem, a second fsck is now happy:
/dev/ufs/68data: 2 files, 2 used, 366264367 free (23 frags, 45783043 blocks,
 0.0% fragmentation)

>How-To-Repeat:
newfs -e 100000000 -b 65536 -f 8192 -g 67108864 -h 16 -i 67108864 -U
 -o space -L 68data /dev/ada2

Adjust partition as needed for your system.

The run fsck and observe complaint.

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:
