From owner-freebsd-current@FreeBSD.ORG Fri Dec 2 19:48:47 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 B873F16A41F; Fri, 2 Dec 2005 19:48:47 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from ismybrain.com (ismybrain.com [64.246.42.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F60A43D5C; Fri, 2 Dec 2005 19:48:46 +0000 (GMT) (envelope-from maksim.yevmenkin@savvis.net) Received: from [10.254.186.111] (localhost.localdomain [127.0.0.1]) by ismybrain.com (8.11.6/8.11.6) with ESMTP id jB2JmjJ17634; Fri, 2 Dec 2005 14:48:45 -0500 Message-ID: <4390A51A.5020005@savvis.net> Date: Fri, 02 Dec 2005 11:48:42 -0800 From: Maksim Yevmenkin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050404) X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin , rodrigc@freebsd.org References: <20051202103751.T83839@fledge.watson.org> <200512020840.58395.jhb@freebsd.org> <439071AF.2050301@savvis.net> <200512021319.54184.jhb@freebsd.org> In-Reply-To: <200512021319.54184.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, Robert Watson , David Xu Subject: Re: After crash, / comes up mounted read-only, but in multiuser; mfs /tmp? 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: Fri, 02 Dec 2005 19:48:47 -0000 John Baldwin wrote: > On Friday 02 December 2005 11:09 am, Maksim Yevmenkin wrote: > >>John Baldwin wrote: >> >>>On Friday 02 December 2005 08:33 am, David Xu wrote: >>> >>>>Robert Watson wrote: >>>> >>>>>While testing the new DRM update (went badly :-), I crashed my system >>>>>and had to power cycle it. When it came back up, not surprisingly, >>>>>the file systems weren't clean. When I reached a login prompt, I >>>>>logged in to modify /etc/rc.conf, and to my surprise, was told that >>>>>/etc/rc.conf wasn't writable. Turns out it was because / was mounted >>>>>read-only: >>>>> >>>>>... >>>>> >>>>>/dev/ad0s3a on / (ufs, local, read-only) >>>>>devfs on /dev (devfs, local) >>>>>/dev/ad0s3e on /usr (ufs, local, soft-updates) >>>>>/dev/ad0s3d on /var (ufs, local, soft-updates) >>>>>/dev/md0 on /tmp (ufs, local) >>>>> >>>>>The rc scripts helpfully mounted an MFS /tmp for me, which while >>>>>friendly, succeeded in masking the problem and allowing the system to >>>>>come up in a rather undesirable state (from my perspective). So it >>>>>sounds like maybe / wasn't remounted properly, and then the scripts >>>>>were too helpful thinking it was a diskless system. >>>> >>>>I have seen this for some days, one machine I even have to reinstall >>>>the system because mount -u / does not work. :-( >>> >>>I've seen reports that mount -u -w / works whereas mount -u -o rw / >>>doesn't, so you might be able to mount -u -w / in single user mode after >>>running fsck as a way to recover. Either that or boot single user, run >>>fsck, and then reboot before going into multiuser. >> >>this is all very nice as workaround, but does somebody actually working >>on the _real_ problem? >> >>it would be nice to have something in UPDATING saying this is broken >>now. all i can find in UPDATING is >> >>20051129: >> The nodev mount option was deprecated in RELENG_6 (where it >> was a no-op), and is now unsupported. If you have nodev or dev listed >> in /etc/fstab, remove it, otherwise it will result in a mount error. >> >>sure that is not the problem, is it? > > No, it's probably due to all the nmount changes in HEAD recently that have > broken various mount options for other FS's such as smbfs and msdosfs as > well. Probably should bug crodig@ or just dig into the code to see how -o rw > used to be handled and how it is not handled now. > how about something quick and dirty, like so beetle# pwd /usr/src/sbin/mount beetle# diff -u mount.c.orig mount.c --- mount.c.orig Fri Dec 2 11:45:22 2005 +++ mount.c Fri Dec 2 11:41:53 2005 @@ -644,7 +644,10 @@ *p = '\0'; argv[argc++] = p+1; } - } else if (strcmp(p, "rw") != 0) { + } else if (strcmp(p, "rw") == 0) { + argv[argc++] = strdup("-o"); + argv[argc++] = strdup("noro"); + } else { argv[argc++] = strdup("-o"); argv[argc++] = p; } %% thanks, max