Date: Fri, 1 Feb 2008 12:22:14 -0500 From: Martin Cracauer <cracauer@cons.org> To: freebsd-fs@freebsd.org Subject: fsck and mount disagree on whether superblocks are usable Message-ID: <20080201172214.GA55957@cons.org>
next in thread | raw e-mail | index | archive | help
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 <cracauer@cons.org> http://www.cons.org/cracauer/ FreeBSD - where you want to go, today. http://www.freebsd.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080201172214.GA55957>