From owner-freebsd-fs@FreeBSD.ORG Fri Feb 1 17:41:55 2008 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1769F16A41A for ; Fri, 1 Feb 2008 17:41:55 +0000 (UTC) (envelope-from cracauer@koef.zs64.net) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by mx1.freebsd.org (Postfix) with ESMTP id 9096D13C461 for ; Fri, 1 Feb 2008 17:41:54 +0000 (UTC) (envelope-from cracauer@koef.zs64.net) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by koef.zs64.net (8.14.2/8.14.2) with ESMTP id m11HMERq057338 for ; Fri, 1 Feb 2008 18:22:14 +0100 (CET) (envelope-from cracauer@koef.zs64.net) Received: (from cracauer@localhost) by koef.zs64.net (8.14.2/8.14.2/Submit) id m11HMEtU057337 for freebsd-fs@freebsd.org; Fri, 1 Feb 2008 12:22:14 -0500 (EST) (envelope-from cracauer) Date: Fri, 1 Feb 2008 12:22:14 -0500 From: Martin Cracauer To: freebsd-fs@freebsd.org Message-ID: <20080201172214.GA55957@cons.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: fsck and mount disagree on whether superblocks are usable X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2008 17:41:55 -0000 This is not an emergency but I find it odd. Mount and fsck agree on whether superblocks are usable. Mount can mount readonly, but fsck can use neither the primary superblock nor the alternatives. Here the long story: Just for kicks I replicated a harddrive, while dd'ing off /dev/ad0 with live (read/write mounts) filesystems and all partition tables and disklabels. Restored to a different drive I have everything, all partitions are there and I can mount readonly. The filesystem is of course dirty, hence the readonly mount. However, fsck refuses to run. BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE [who did that all-uppercase, anyway?] Allowing it to look for alternate superblocks I get: BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE WITH THOSE IN FIRST ALTERNATE LOOK FOR ALTERNATE SUPERBLOCKS? [yn] y 32 is not a file system superblock 28756320 is not a file system superblock 57512608 is not a file system superblock 86268896 is not a file system superblock 115025184 is not a file system superblock 143781472 is not a file system superblock 172537760 is not a file system superblock 201294048 is not a file system superblock 230050336 is not a file system superblock 258806624 is not a file system superblock SEARCH FOR ALTERNATE SUPER-BLOCK FAILED. YOU MUST USE THE -b OPTION TO FSCK TO SPECIFY THE LOCATION OF AN ALTERNATE SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(8). Why would the superblocks be entirely unrecognizable by fsck when mount can mount the filesystem just fine (readonly)? Here are the fields for the primary superblock as printed on the original machine, printed from a modified fsck: .fs_sblkno 40 .fs_cblkno 48 .fs_iblkno 56 .fs_dblkno 3000 .fs_ncg 831 .fs_bsize 16384 .fs_fsize 2048 .fs_frag 8 .fs_bmask -16384 .fs_fmask -2048 .fs_bshift 14 .fs_fshift 11 .fs_fragshift 3 .fs_fsbtodb 2 .fs_sbsize 2048 .fs_nindir 2048 .fs_inopb 64 .fs_cssize 14336 .fs_ipg 23552 .fs_fpg 94064 .fs_magic 424935705 Here is the same print for the fsck that refuses to run on the other machine: .fs_sblkno 40 .fs_cblkno 48 .fs_iblkno 56 .fs_dblkno 3000 .fs_ncg 753 .fs_bsize 16384 .fs_fsize 2048 .fs_frag 8 .fs_bmask -16384 .fs_fmask -2048 .fs_bshift 14 .fs_fshift 11 .fs_fragshift 3 .fs_fsbtodb 2 .fs_sbsize 2048 .fs_nindir 2048 .fs_inopb 64 .fs_cssize 12288 .fs_ipg 23552 .fs_fpg 94064 .fs_magic 424935705 Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ FreeBSD - where you want to go, today. http://www.freebsd.org/