From koma2@timedia.co.jp  Tue Sep 20 06:31:02 2005
Return-Path: <koma2@timedia.co.jp>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7509816A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Sep 2005 06:31:02 +0000 (GMT)
	(envelope-from koma2@timedia.co.jp)
Received: from timedia.co.jp (nurikabe.timedia.co.jp [218.225.123.151])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 29D3143D46
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 20 Sep 2005 06:31:01 +0000 (GMT)
	(envelope-from koma2@timedia.co.jp)
Received: by koma2-45.wins.timedia.co.jp (Postfix, from userid 1000)
	id 9C5BB114BA; Tue, 20 Sep 2005 15:31:00 +0900 (JST)
Message-Id: <20050920063100.9C5BB114BA@koma2-45.wins.timedia.co.jp>
Date: Tue, 20 Sep 2005 15:31:00 +0900 (JST)
From: KOMATSU Shinichiro <koma2@lovepeers.org>
Reply-To: KOMATSU Shinichiro <koma2@lovepeers.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: fsck_ffs(8): An alternate super block location for UFS2 is not mentioned.
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         86362
>Category:       docs
>Synopsis:       fsck_ffs(8): An alternate super block location for UFS2 is not mentioned.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 20 06:40:00 GMT 2005
>Closed-Date:    Mon Oct 03 15:04:42 GMT 2005
>Last-Modified:  Mon Oct 03 15:04:42 GMT 2005
>Originator:     KOMATSU Shinichiro
>Release:        FreeBSD 5.4-RELEASE-p5 i386
>Organization:
>Environment:
FreeBSD 5.4-RELEASE-p5 i386

>Description:

According to fsck_ffs(8), alternate super block is located at block 32,
but this value is for UFS1 and 160 is the right value for UFS2.

>How-To-Repeat:

newfs(8) says super-block backup is locate at block 160 as follows:

# newfs /dev/md0
 /dev/md0: 100.0MB (204800 sectors) block size 16384, fragment size 2048
         using 4 cylinder groups of 25.02MB, 1601 blks, 3264 inodes.
 super-block backups (for fsck -b #) at:
  160, 51392, 102624, 153856

>Fix:

Index: fsck_ffs.8
===================================================================
RCS file: /home/ncvs/src/sbin/fsck_ffs/fsck_ffs.8,v
retrieving revision 1.31
diff -u -r1.31 fsck_ffs.8
--- fsck_ffs.8	2 Jul 2004 21:45:01 -0000	1.31
+++ fsck_ffs.8	20 Sep 2005 06:08:59 -0000
@@ -173,8 +173,8 @@
 .It Fl b
 Use the block specified immediately after the flag as
 the super block for the file system.
-Block 32 is usually
-an alternate super block.
+An alternate super block is usually located at block 32 for UFS1,
+and block 160 for UFS2.
 .It Fl c
 Convert the file system to the specified level.
 Note that the level of a file system can only be raised.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: delphij 
State-Changed-When: Tue Sep 20 08:06:42 GMT 2005 
State-Changed-Why:  
MFC Reminder 


Responsible-Changed-From-To: freebsd-doc->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Tue Sep 20 08:06:42 GMT 2005 
Responsible-Changed-Why:  
Take 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86362 
State-Changed-From-To: patched->closed 
State-Changed-By: delphij 
State-Changed-When: Mon Oct 3 15:03:57 GMT 2005 
State-Changed-Why:  
The patch was merged back to RELENG_5 and RELENG_6 some days ago, 
but I forgot to close it.  Thanks for your submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86362 
>Unformatted:
