From owner-freebsd-current Wed Dec 11 10:51:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA6EB37B401 for ; Wed, 11 Dec 2002 10:51:10 -0800 (PST) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id C385643EA9 for ; Wed, 11 Dec 2002 10:51:05 -0800 (PST) (envelope-from nate@rootlabs.com) Received: (qmail 31176 invoked by uid 1000); 11 Dec 2002 18:51:06 -0000 Date: Wed, 11 Dec 2002 10:51:06 -0800 (PST) From: Nate Lawson To: Kirk McKusick Cc: current@freebsd.org Subject: Re: Data corruption in soft updates? In-Reply-To: <200212100309.gBA39h59001465@beastie.mckusick.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 9 Dec 2002, Kirk McKusick wrote: > Date: Mon, 9 Dec 2002 18:04:03 -0800 (PST) > From: Nate Lawson > > I started getting kernel messages of "bad inode". I quickly > rebooted to single user and ran fsck and got a huge set of > errors. See this partial log (600KB gzipped): > > http://www.root.org/~nate/fsck.gz > > It appears that you are getting all those errors (BAD block) > because fsck thinks that your filesystem is smaller than it > really is. If you do a dumpfs on the filesystem and check > the size (about line 5), I expect that you will find that > all those bad blocks exceed that size. It might be interesting > to check one or more of the alternate blocks to see if they > have a different size. If so, using an alternate should help. > If not, then the question is why all those out of range blocks > were allocated. I did some poking around. First I did dumpfs as requested (80 KB): http://www.root.org/~nate/dumpfs1.gz Then I tried fsck_ffs with -b 32 and it corrected a few small things but didn't appear to have any problems: http://www.root.org/~nate/fsck2 Then I ran dumpfs on the updated fs and diffed the output to the previous dumpfs: http://www.root.org/~nate/dumpfs2.diff So it looks like now all I have to do is copy the sb backup at 32 to the default sb. I looked around fsdb but can't see how to do this. If I knew the right offset, I'd use dd. The question is, what corrupted the default sb? I DID see the "updating sb size" kernel message when booting the first time with the new kernel. -Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message