'mount -u' stumper

Robert Bonomi bonomi at mail.r-bonomi.com
Wed Jun 22 12:24:06 UTC 2011


> From erikt at midgard.homeip.net  Wed Jun 22 06:51:47 2011
> Date: Wed, 22 Jun 2011 13:51:00 +0200
> From: Erik Trulsson <ertr1013 at student.uu.se>
> To: Robert Bonomi <bonomi at mail.r-bonomi.com>
> Cc: freebsd-questions at 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.
>
>
> --
> <Insert your favourite quote here.>
> Erik Trulsson ertr1013 at student.uu.se
>
> From erikt at midgard.homeip.net  Wed Jun 22 06:51:47 2011
> Date: Wed, 22 Jun 2011 13:51:00 +0200
> From: Erik Trulsson <ertr1013 at student.uu.se>
> To: Robert Bonomi <bonomi at mail.r-bonomi.com>
> Cc: freebsd-questions at 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. <wry grin>




More information about the freebsd-questions mailing list