Date: Wed, 04 Sep 2002 21:16:46 +0200 From: Daniel Rock <D.Rock@t-online.de> To: Bruce Evans <bde@zeta.org.au> Cc: current@FreeBSD.ORG Subject: Re: fsck cannot find superblock Message-ID: <3D765C1E.8040701@t-online.de> References: <20020904171953.I460-100000@gamplex.bde.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
Bruce Evans schrieb:
>On Tue, 3 Sep 2002, D. Rock wrote:
>
>
>
>>with 'uncommon' block sizes fsck seems to have problems finding the
>>superblock:
>>
>># newfs -i 10240 -b 4096 -f 512 /dev/ad1d
>>Reduced frags per cylinder group from 26208 to 26200 to enlarge last cyl group
>>/dev/ad1d: 409.6MB (838860 sectors) block size 4096, fragment size 512
>> using 33 cylinder groups of 12.79MB, 3275 blks, 1312 inodes.
>>super-block backups (for fsck -b #) at:
>> 32, 26232, 52432, 78632, 104832, 131032, 157232, 183432, 209632, 235832,
>> 262032, 288232, 314432, 340632, 366832, 393032, 419232, 445432, 471632,
>> 497832, 524032, 550232, 576432, 602632, 628832, 655032, 681232, 707432,
>> 733632, 759832, 786032, 812232, 838432
>># fsck /dev/ad1d
>>** /dev/ad1d
>>Cannot find file system superblock
>>
>>LOOK FOR ALTERNATE SUPERBLOCKS? [yn] n
>>
>>
>
>fsck_ffs has no problems here with (whole) md disk of the same size.
>Perhaps I have fixed the problem without noticing. dumpfs or comparison
>with a non-broken filesystem of the same size might show the problem.
>
>Bruce
>
>
I have attached the label of the offending disk and an output of a
dumpfs on a freshly created file system with the following options:
newfs -b 4096 -f 4096 /dev/ad1d
newfs -b 8192 -f 8192 /dev/ad1d
The problem seems to be introduced with the UFS2 import. In
src/sbin/fsck_ffs/setup.c the sanity checks are more tightly formulated.
Especially one check was added:
sblock.fs_bsize >= SBLOCKSIZE
this fails on 4K file systems, because fs_bsize is only 4096, but
SBLOCKSIZE is defined as 8192. The sanity checks for searching alternate
superblocks are more relaxed (in readsb() the first if branch is
entered, not the else branch), so during searching for alternate
superblocks the very same sb that was rejected in the first run (at
offset 8192) will be used.
Possible solutions:
* remove above sanity check
* does SBLOCKSIZE really have to be 8192, in real it is much smaller
(less than 2KB)
* drop support for 4K block sizes completely, but this breaks
backwards compatibility
Daniel
[-- Attachment #2 --]
# /dev/ad1c:
type: ESDI
disk: ad0s1
label:
flags:
bytes/sector: 512
sectors/track: 252
tracks/cylinder: 4
sectors/cylinder: 1008
cylinders: 2482
sectors/unit: 2501856
rpm: 4500
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 0
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
b: 462996 2038860 swap # (Cyl. 2022*- 2481*)
c: 2501856 0 unused 0 0 # (Cyl. 0 - 2481)
d: 838860 0 4.2BSD 512 4096 26200 # (Cyl. 0 - 832*)
e: 1200000 838860 4.2BSD 2048 8192 48388 # (Cyl. 832*- 2022*)
[-- Attachment #3 --]
magic 11954 (UFS1) time Wed Sep 4 20:33:22 2002
id [ 3d7651f2 4b7c67bc ]
ncg 8 size 104857 blocks 103972
bsize 4096 shift 12 mask 0xfffff000
fsize 4096 shift 12 mask 0xfffff000
frag 1 shift 0 fsbtodb 3
minfree 8% optim time symlinklen 60
maxbpg 512 maxcontig 32 contigsumsize 16
nbfree 103971 ndir 1 nifree 27389 nffree 0
cpg 1 bpg 13681 fpg 13681 ipg 3424
nindir 1024 inopb 32 nspf 8 maxfilesize 4402345721855
sbsize 4096 cgsize 4096 cgoffset 0 cgmask 0xffffffff
csaddr 114 cssize 4096
rotdelay 0ms rps 60 trackskew 0 interleave 1
nsect 109448 npsect 109448 spc 109448
sblkno 4 cblkno 6 iblkno 7 dblkno 114
cgrotor 0 fmod 0 ronly 0 clean 1
flags none
cs[].cs_(nbfree,ndir,nifree,nffree):
(13565,1,3421,0) (13571,0,3424,0) (13571,0,3424,0) (13571,0,3424,0)
(13571,0,3424,0) (13571,0,3424,0) (13571,0,3424,0) (8980,0,3424,0)
cylinders in last group 1
blocks in last group 9090
cg 0:
magic 90255 tell 6000 time Wed Sep 4 20:33:22 2002
cgx 0 ncyl 1 niblk 3424 ndblk 13681
nbfree 13565 ndir 1 nifree 3421 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 0 0 0 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 116-13680
inodes used: 0-2
blks free: 116-13680
cg 1:
magic 90255 tell 3577000 time Wed Sep 4 20:33:22 2002
cgx 1 ncyl 1 niblk 3424 ndblk 13681
nbfree 13571 ndir 0 nifree 3424 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 0 0 1 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 0-3, 114-13680
inodes used:
blks free: 0-3, 114-13680
cg 2:
magic 90255 tell 6ae8000 time Wed Sep 4 20:33:22 2002
cgx 2 ncyl 1 niblk 3424 ndblk 13681
nbfree 13571 ndir 0 nifree 3424 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 0 0 1 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 0-3, 114-13680
inodes used:
blks free: 0-3, 114-13680
cg 3:
magic 90255 tell a059000 time Wed Sep 4 20:33:22 2002
cgx 3 ncyl 1 niblk 3424 ndblk 13681
nbfree 13571 ndir 0 nifree 3424 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 0 0 1 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 0-3, 114-13680
inodes used:
blks free: 0-3, 114-13680
cg 4:
magic 90255 tell d5ca000 time Wed Sep 4 20:33:22 2002
cgx 4 ncyl 1 niblk 3424 ndblk 13681
nbfree 13571 ndir 0 nifree 3424 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 0 0 1 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 0-3, 114-13680
inodes used:
blks free: 0-3, 114-13680
cg 5:
magic 90255 tell 10b3b000 time Wed Sep 4 20:33:22 2002
cgx 5 ncyl 1 niblk 3424 ndblk 13681
nbfree 13571 ndir 0 nifree 3424 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 0 0 1 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 0-3, 114-13680
inodes used:
blks free: 0-3, 114-13680
cg 6:
magic 90255 tell 140ac000 time Wed Sep 4 20:33:22 2002
cgx 6 ncyl 1 niblk 3424 ndblk 13681
nbfree 13571 ndir 0 nifree 3424 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 0 0 1 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 0-3, 114-13680
inodes used:
blks free: 0-3, 114-13680
cg 7:
magic 90255 tell 1761d000 time Wed Sep 4 20:33:22 2002
cgx 7 ncyl 1 niblk 3424 ndblk 9090
nbfree 8980 ndir 0 nifree 3424 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 0 0 1 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 0-3, 114-9089
inodes used:
blks free: 0-3, 114-9089
[-- Attachment #4 --]
magic 11954 (UFS1) time Wed Sep 4 20:36:41 2002
id [ 3d7652b9 7ac04d77 ]
ncg 4 size 52428 blocks 52209
bsize 8192 shift 13 mask 0xffffe000
fsize 8192 shift 13 mask 0xffffe000
frag 1 shift 0 fsbtodb 4
minfree 8% optim time symlinklen 60
maxbpg 1024 maxcontig 16 contigsumsize 16
nbfree 52208 ndir 1 nifree 13309 nffree 0
cpg 1 bpg 13108 fpg 13108 ipg 3328
nindir 2048 inopb 64 nspf 16 maxfilesize 70403120791551
sbsize 8192 cgsize 8192 cgoffset 0 cgmask 0xffffffff
csaddr 56 cssize 8192
rotdelay 0ms rps 60 trackskew 0 interleave 1
nsect 209728 npsect 209728 spc 209728
sblkno 2 cblkno 3 iblkno 4 dblkno 56
cgrotor 0 fmod 0 ronly 0 clean 1
flags none
cs[].cs_(nbfree,ndir,nifree,nffree):
(13050,1,3325,0) (13054,0,3328,0) (13054,0,3328,0) (13050,0,3328,0)
cylinders in last group 1
blocks in last group 13104
cg 0:
magic 90255 tell 6000 time Wed Sep 4 20:36:41 2002
cgx 0 ncyl 1 niblk 3328 ndblk 13108
nbfree 13050 ndir 1 nifree 3325 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 0 0 0 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 58-13107
inodes used: 0-2
blks free: 58-13107
cg 1:
magic 90255 tell 666e000 time Wed Sep 4 20:36:41 2002
cgx 1 ncyl 1 niblk 3328 ndblk 13108
nbfree 13054 ndir 0 nifree 3328 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 1 0 0 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 0-1, 56-13107
inodes used:
blks free: 0-1, 56-13107
cg 2:
magic 90255 tell ccd6000 time Wed Sep 4 20:36:41 2002
cgx 2 ncyl 1 niblk 3328 ndblk 13108
nbfree 13054 ndir 0 nifree 3328 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 1 0 0 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 0-1, 56-13107
inodes used:
blks free: 0-1, 56-13107
cg 3:
magic 90255 tell 1333e000 time Wed Sep 4 20:36:41 2002
cgx 3 ncyl 1 niblk 3328 ndblk 13104
nbfree 13050 ndir 0 nifree 3328 nffree 0
rotor 0 irotor 0 frotor 0
frsum
sum of frsum: 0
clusters 1-8: 0 1 0 0 0 0 0 0
clusters 9-15: 0 0 0 0 0 0 0
clusters size 16 and over: 1
clusters free: 0-1, 56-13103
inodes used:
blks free: 0-1, 56-13103
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D765C1E.8040701>
