Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2002 17:34:23 +0100 (CET)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Is this a MFS bug?
Message-ID:  <200201021634.g02GYNT61734@lurza.secnetix.de>
In-Reply-To: <20020102170411.D1157@klamath.local>

next in thread | previous in thread | raw e-mail | index | archive | help
Julio Merino <juli@klamath.local> wrote:
 > So I have mounted my /usr/obj with mfs from /dev/ad0s2b. Well...
 > Did 'make buildworld' and everything was perfect.
 > 
 > Gone and did 'shutdown now' as recommended, to enter single-user mode and do
 > the 'make installworld'. And guess it... /usr/obj unmounted. Weird!!!

Nope, normal.  When you go to single-user mode, the shutdown
script will kill all remaining programs and daemons, including
the mount_mfs process, thus unmounting the MFS.

Remember, when you mount an MFS, a mount_mfs daemon is forked
which "holds" the contents of the MFS itself.  Basically,
mount_mfs is a version of newfs that creates a UFS in its own
memory space (instead of on a device node), then mounts that
memory onto the mountpoint.  When the mount_mfs daemon is
killed (which happens during a shutdown to single-user mode),
then all is gone, of course.

See the mount_mfs(8) manpage.

 > Well... so, is this a bug? I think that mfs should rest mounted until a
 > reboot is done...

It's not a bug, it's normal behaviour.

You should probably just stay in multi-user mode.  Most of
the time, "make installworld" works fine in multi-user mode.
It might be a good idea to manually kill programs and daemons
that you don't need and that might interfere with the
installation, though.

By the way:  If you have soft-updates enabled (which is
always a good idea), putting /usr/obj into an MFS doesn't
buy you much.  When writing to /usr/obj, you don't have to
wait for the disk to finish the actual write access.
It is probably more effective to put /usr/src into an MFS
instead, because when reading data from /usr/src that doesn't
happen to be in the cache already, you have to wait for the
disk.  Of course, if you've got enough RAM, using MFS for
both of them won't hurt.  ;-)

But you must really make sure that you do have enough RAM.
As soon as the machine starts paging, the performance will
drop down extremely.  Keep in mind that MFS is not very
efficient on the RAM usage, and that data inside an MFS
ends up being held in RAM twice (once in the VM cache, and
once in the address space of mount_mfs).

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201021634.g02GYNT61734>