From owner-freebsd-bugs@FreeBSD.ORG Wed Nov 21 07:42:33 2007 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9002E16A419; Wed, 21 Nov 2007 07:42:33 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail34.syd.optusnet.com.au (mail34.syd.optusnet.com.au [211.29.133.218]) by mx1.freebsd.org (Postfix) with ESMTP id 15A0D13C45A; Wed, 21 Nov 2007 07:42:32 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-219-213.carlnfd3.nsw.optusnet.com.au (c211-30-219-213.carlnfd3.nsw.optusnet.com.au [211.30.219.213]) by mail34.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id lAL7gRB9012941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Nov 2007 18:42:29 +1100 Date: Wed, 21 Nov 2007 18:42:27 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Bruce Evans In-Reply-To: <20071121170349.X81263@delplex.bde.org> Message-ID: <20071121182210.T81418@delplex.bde.org> References: <200711210234.lAL2Y7cU041129@www.freebsd.org> <20071121170349.X81263@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Yuri , freebsd-gnats-submit@freebsd.org, freebsd-bugs@freebsd.org Subject: Re: misc/118160: unable to mount / rw while booting 7.0-BETA3 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Nov 2007 07:42:33 -0000 On Wed, 21 Nov 2007, Bruce Evans wrote: > I can now see a plausible way to reach the bad state: > - after booting, the root device is mounted on / r/o with no problems > - mistype a mount command or have $true generate a wrong mount command, > so that the root device is mounted somewhere else (I don't know how > it can be on "", but it could be on " " or on any valid pathname). > If you preemptively mount it r/w, then this other mount will fail > -- look in the logs for messages about this. > - now try to remount / r/w normally. This will fail due to the r/o mount > not on /. > - if there is only 1 extra r/o mount of /, then the r/w mount should work > after unmounting the extra. If there are several extras, then unmounting > them in a certain order should give the bufobj panic. The bufobj panic actually happens in the only possible order for trying to fix the simulated problem: after booting with -s: # mount -o ro /dev/ad0s2a /mnt # create extra mount (ad0s2a is root dev) # # like a runaway script might # umount /mnt # get rid of the extra mount # fsck -p / --- panic and # mount /dev/ad0s2a /mnt # I forgot the ro --- this succeeds due to the hack that lets fsck succeed, but it shouldn't Bruce