From owner-freebsd-questions@FreeBSD.ORG Wed Jun 22 12:24:05 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF57F106566B for ; Wed, 22 Jun 2011 12:24:05 +0000 (UTC) (envelope-from bonomi@mail.r-bonomi.com) Received: from mail.r-bonomi.com (mx-out.r-bonomi.com [204.87.227.120]) by mx1.freebsd.org (Postfix) with ESMTP id B0B7F8FC14 for ; Wed, 22 Jun 2011 12:24:05 +0000 (UTC) Received: (from bonomi@localhost) by mail.r-bonomi.com (8.14.4/rdb1) id p5MCO2RX057516 for freebsd-questions@freebsd.org; Wed, 22 Jun 2011 07:24:02 -0500 (CDT) Date: Wed, 22 Jun 2011 07:24:02 -0500 (CDT) From: Robert Bonomi Message-Id: <201106221224.p5MCO2RX057516@mail.r-bonomi.com> To: freebsd-questions@freebsd.org In-Reply-To: <20110622115100.GA78910@owl.midgard.homeip.net> Subject: Re: 'mount -u' stumper X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2011 12:24:06 -0000 > From erikt@midgard.homeip.net Wed Jun 22 06:51:47 2011 > Date: Wed, 22 Jun 2011 13:51:00 +0200 > From: Erik Trulsson > To: Robert Bonomi > Cc: freebsd-questions@freebsd.org > Subject: Re: 'mount -u' stumper > > On Wed, Jun 22, 2011 at 06:45:27AM -0500, Robert Bonomi wrote: > > > > Environment is FreeBSD 7.2 i386 > > > > I have a Berkeley FFS filesystem that is mounted ro at boot time. > > > > If I do a 'mount -u' to make it writable, it _is_ made writable, but > > "soft-updates' is also set. Incidentally, does anybody know _where_ > > the 'soft-updates' optioon is documented?? I've looked evereywhere I > > can think of, brute-force grepped wholee sections of the /usr/share/man > > directory tree, all without succeess. > > > > If I use 'mount -u -r' to return it to the readonly state, > > 'soft-updates' is > > *still* set. > > > > _HOW_ do I make'soft-updates' go away on a mounted filesystem ?? > > > > 'umount' and then 'mount' does the trick, but it is no a viable > > production' option. > > > > THe underlying situation -- the need to make the filesystem writable -- > > comes up only rarely, and it doesn't seem to hurt anything if the > > filesystem is left with soft-updates set, but I _would_ like to clear > > it, because it *is* logically inconsistant with the read-only status of > > the filesystem. > > > > Anybody got a bright idea I haven't thought of? > > To change if a given filesystem should use soft-updates or not you use > tunefs(8) on that filesystem. (Read the manpage to find exact syntax.) > Note that this cannot be done on a filsystem which is mounted read/write > - only on filesystems that are unmounted or mounted read-only. > > > -- > > Erik Trulsson ertr1013@student.uu.se > > From erikt@midgard.homeip.net Wed Jun 22 06:51:47 2011 > Date: Wed, 22 Jun 2011 13:51:00 +0200 > From: Erik Trulsson > To: Robert Bonomi > Cc: freebsd-questions@freebsd.org > Subject: Re: 'mount -u' stumper > > On Wed, Jun 22, 2011 at 06:45:27AM -0500, Robert Bonomi wrote: > > > > Environment is FreeBSD 7.2 i386 > > > > I have a Berkeley FFS filesystem that is mounted ro at boot time. > > > > If I do a 'mount -u' to make it writable, it _is_ made writable, but > > "soft-updates' is also set. Incidentally, does anybody know _where_ > > the 'soft-updates' optioon is documented?? I've looked evereywhere I > > can think of, brute-force grepped wholee sections of the /usr/share/man > > directory tree, all without succeess. > > > > If I use 'mount -u -r' to return it to the readonly state, > > 'soft-updates' is > > *still* set. > > > > _HOW_ do I make'soft-updates' go away on a mounted filesystem ?? > > > > 'umount' and then 'mount' does the trick, but it is no a viable > > production' option. > > > > THe underlying situation -- the need to make the filesystem writable -- > > comes up only rarely, and it doesn't seem to hurt anything if the > > filesystem is left with soft-updates set, but I _would_ like to clear > > it, because it *is* logically inconsistant with the read-only status of > > the filesystem. > > > > Anybody got a bright idea I haven't thought of? > > To change if a given filesystem should use soft-updates or not you use > tunefs(8) on that filesystem. (Read the manpage to find exact syntax.) > Note that this cannot be done on a filsystem which is mounted read/write > - only on filesystems that are unmounted or mounted read-only. Agreed with all of that, but it doesn't directly address my issue. When I need the filesystem read/write, I don't mind having soft-updates on. When the filesysem is mounted RO from an _unmounted_ state, soft-updates are _not_ set, even if the filesystem 'tunable' has soft-updates enabled. This is well-and-good, since it it a 'meaningless' setting with regard to a RO filsystem. When that filesystm is remounted R/W, then softupdates are enabled. So far, so good. This is desirable for a R/W filesystem. However, when I revert the filesystem to RO, 'soft-updates' (now _meaningless_) is still displayed. Obviously, you can't do any updates, sync, async, OR 'soft', on a RO filesystem. So that 'dangling' flag is at the very least misleading, and _may_ lead to searching in the wrong direction in the event of other errors. Since it isn't set when the system is _mounted_ RO, it would be 'nice' if it were cleared, when the filesystem status is 'downgraded'(??:) to RO. 'mount(8)' currently doesn't do this on an 'update' mount, although it -does- do it on an initial mount. "Inconsistent" behavior. I was looking for an existing methodology to make the 'update' mount behavior with an initial mount. It may be that I'm going to have to hack the mount(8) source code to accomplish this. Should be a -minor- patch, only a couple of lines of code.