From owner-freebsd-current@FreeBSD.ORG Wed Dec 1 11:26:51 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7393E106566C for ; Wed, 1 Dec 2010 11:26:51 +0000 (UTC) (envelope-from pho@holm.cc) Received: from relay01.pair.com (relay01.pair.com [209.68.5.15]) by mx1.freebsd.org (Postfix) with SMTP id 237BB8FC13 for ; Wed, 1 Dec 2010 11:26:50 +0000 (UTC) Received: (qmail 20725 invoked from network); 1 Dec 2010 11:00:09 -0000 Received: from 93.166.52.54 (HELO x2.osted.lan) (93.166.52.54) by relay01.pair.com with SMTP; 1 Dec 2010 11:00:09 -0000 X-pair-Authenticated: 93.166.52.54 Received: from x2.osted.lan (localhost [127.0.0.1]) by x2.osted.lan (8.14.3/8.14.3) with ESMTP id oB1B08dA051482; Wed, 1 Dec 2010 12:00:08 +0100 (CET) (envelope-from pho@x2.osted.lan) Received: (from pho@localhost) by x2.osted.lan (8.14.3/8.14.3/Submit) id oB1B08t5051481; Wed, 1 Dec 2010 12:00:08 +0100 (CET) (envelope-from pho) Date: Wed, 1 Dec 2010 12:00:08 +0100 From: Peter Holm To: Garrett Cooper Message-ID: <20101201110008.GA50719@x2.osted.lan> References: <1FA8A18C-9350-4C2D-B034-768566ACB718@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1FA8A18C-9350-4C2D-B034-768566ACB718@gmail.com> User-Agent: Mutt/1.4.2.3i Cc: Marshall Kirk McKusick , Kostik Belousov , current@freebsd.org Subject: Re: How a full fsck screwed up my SU+J filesystem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2010 11:26:51 -0000 On Wed, Dec 01, 2010 at 01:28:06AM -0800, Garrett Cooper wrote: > So... I was doing a portmaster -af today because vlc stopped playing audio (for some reason ... I kind of went on a pkg_cutleaves rampage and probably deinstalled too much stuff), and the machine hardlocked during an upgrade. I did a soft reboot and saw messages along the lines of "your journal and filesystem mount time mismatched; running a full fsck". I figured "ok, sure..." and let it do it's thing. Problem was that it pruned a lot of stuff from my /usr partition -- including the .sujournal !!! So now it's stuck at Mounting local file systems: stating: > > Failed to find journal. Use tunefs to create one > Failed to start journal: 2 > > (I assume the 2 means ENOENT). All of the above were printf(9)'s from the kernel. > Now the machine won't continue in multiuser mode (doesn't respond to interrupts, no panic, etc). Going into ddb, I don't see anything in info_threads (just a bunch of references to sched_switch, a few to fork_trampoline, cpustop_handler, and kdb_enter). I'm going to try and massage the machine back to life from single user mode, but the fact that this died in this way (i.e. .sujournal getting nuked by a full fsck) is a bit disheartening for SU+J :(... It would be nice if at least the fsck aborted before going and nuking the journal :/... (or at the very least if the file wasn't removable -- i.e. SF_NOUNLINK). > Here's to hoping I can resuscitate the filesystem... > Thanks, > -Garrett_______________________________________________ Thank you for reporting this. I was able to reproduce the problem by: tunefs -j enable /dev/md5a mount /dev/md5a /mnt chflags 0 /mnt/.sujournal rm -f /mnt/.sujournal umount /mnt mount /dev/md5a /mnt The mount(1) is now stuck in mntref. http://people.freebsd.org/~pho/stress/log/kostik404.txt A sequence of "tunefs -j disable" + "tunefs -j enable" should get you going. -- Peter