Received: (from majordomo@localhost) by oss.sgi.com (8.11.2/8.11.3) id f6JEeFd28822 for linux-xfs-outgoing; Thu, 19 Jul 2001 07:40:15 -0700 Received: from sgi.com (sgi.SGI.COM [192.48.153.1]) by oss.sgi.com (8.11.2/8.11.3) with SMTP id f6JEeCV28798 for ; Thu, 19 Jul 2001 07:40:13 -0700 Received: from zeus-fddi.americas.sgi.com (zeus-fddi.americas.sgi.com [128.162.8.103]) by sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam: SGI does not authorize the use of its proprietary systems or networks for unsolicited or bulk email from the Internet.) via ESMTP id HAA09534 for ; Thu, 19 Jul 2001 07:39:57 -0700 (PDT) mail_from (lord@sgi.com) Received: from daisy-e185.americas.sgi.com (daisy.americas.sgi.com [128.162.185.214]) by zeus-fddi.americas.sgi.com (8.9.3/americas-smart-nospam1.1) with ESMTP id JAA2470400; Thu, 19 Jul 2001 09:38:47 -0500 (CDT) Received: from jen.americas.sgi.com (IDENT:root@jen.americas.sgi.com [128.162.187.49]) by daisy-e185.americas.sgi.com (SGI-8.9.3/SGI-server-1.7) with ESMTP id JAA32719; Thu, 19 Jul 2001 09:38:47 -0500 (CDT) Received: from jen.americas.sgi.com by jen.americas.sgi.com (8.11.2/SGI-client-1.7) via ESMTP id f6JEdcd31931; Thu, 19 Jul 2001 09:39:38 -0500 Message-Id: <200107191439.f6JEdcd31931@jen.americas.sgi.com> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Nathan Scott cc: Wolfgang Henselmann-Weiss , Daniel Moore , linux-xfs@oss.sgi.com Subject: Re: XFS problems In-Reply-To: Message from Nathan Scott of "Thu, 19 Jul 2001 21:33:48 +1000." <20010719213347.A196344@wobbly.melbourne.sgi.com> Date: Thu, 19 Jul 2001 09:39:38 -0500 From: Steve Lord Sender: owner-linux-xfs@oss.sgi.com Precedence: bulk > On Thu, Jul 19, 2001 at 09:15:15AM +0200, Wolfgang Henselmann-Weiss wrote: > > > > syslog output is ... > > |Jul 19 09:08:48 wolfi kernel: XFS: SB sanity check 2 failed > > |Jul 19 09:08:48 wolfi kernel: XFS: SB validate failed > > > > Hmmm ... that looks grim - the error comes from here, in the > XFS kernel code (xfs_mount.c): > > if (sbp->sb_dblocks == 0 || > sbp->sb_dblocks > > (xfs_drfsbno_t)sbp->sb_agcount * sbp->sb_agblocks || > sbp->sb_dblocks < (xfs_drfsbno_t)(sbp->sb_agcount - 1) * > sbp->sb_agblocks + XFS_MIN_AG_BLOCKS) { > cmn_err(CE_WARN, "XFS: SB sanity check 2 failed"); > return XFS_ERROR(EFSCORRUPTED); > } > > So, it seems mkfs might be coming up with bad data.. haven't ever > seen that before. Could you run xfs_db on the device, and print > the superblock & send us that? Something like: > > # xfs_db -c sb -c p /dev/foo > > and we should be able to narrow it down to one of those 3 condition. > > thanks. > > -- > Nathan OK, this is very interesting, the mkfs output: |wolfi:/etc # mkfs.xfs -f /dev/hde7 |meta-data=/dev/hde7 isize=256 agcount=16, agsize=262144 blks |data = bsize=4096 blocks=3932200, imaxpct=25 | = sunit=0 swidth=0 blks, unwritten=0 |naming =version 2 bsize=4096 |log =internal log bsize=4096 blocks=1200 |realtime =none extsz=65536 blocks=0, rtextents=0 This shows that mkfs picked an allocation group size which left a very small allocation group at the end of the filesystem. You have 16 allocation groups, 16 * 262144 = 4194304 file system blocks, but you only actually have 3932200 blocks. 15 allocation groups take 3932160 leaving a huge 40 blocks for the last one, this fails the test in the mount code which Nathan posted. You could fool mkfs into thinking the device is slightly smaller for now by doing this: mkfs -t xfs -f -d 3932160b /dev/hde7 I think this will then mount. Clearly mkfs should not be building a filesystem which does not mount! Steve