Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jun 2001 20:04:07 -0700
From:      Dima Dorfman <dima@unixfreak.org>
To:        Mikhail Teterin <mi@aldan.algebra.com>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sbin/mdmfs Makefile mdmfs.8 mdmfs.c pathnames.h 
Message-ID:  <20010620030407.C8A433E2F@bazooka.unixfreak.org>
In-Reply-To: <200106200256.f5K2uO628234@aldan.algebra.com>; from mi@aldan.algebra.com on "Tue, 19 Jun 2001 22:56:23 -0400 (EDT)"

next in thread | previous in thread | raw e-mail | index | archive | help
Mikhail Teterin <mi@aldan.algebra.com> writes:
> On 19 Jun, Dima Dorfman wrote:
> > Mikhail Teterin <mi@aldan.algebra.com> writes:
> >> On 18 Jun, Dima Dorfman wrote:
> >> > dd          2001/06/18 16:46:58 PDT
> >> > 
> >> >   Added files:
> >> >     sbin/mdmfs           Makefile mdmfs.8 mdmfs.c pathnames.h 
> >> >   Log:
> >> >   Introduce mdmfs(8), a wrapper around mdconfig(8), disklabel(8),
> >> >   newfs(8), and mount(8) that mimics the command line option set of the
> >> >   deprecated mount_mfs(8).
> >> >   
> >> >   Approved by:	jkh, phk, -hackers
> >> 
> >> So, will
> >> 
> >> 	/dev/da0b		/tmp		mfs	rw,async
> >> 
> >> Just Work (TM) now?
> > 
> > Besides the fact that mdmfs(8) isn't installed as /sbin/mount_mfs,
> > there are two things wrong (from mdmfs's point of view) with that
> > line:
> > 
> >  *  /dev/da0b  --  this  should  either  be  "/dev/md"  for  autounit,
> > or  "/dev/mdX"  where  X  is  the  desired  unit  number.  This  small
> > incompatibility is  intentional: I  don't think it's  a good  idea for
> > users to blindly  assume that md(4) is  mfs; at least if  they have to
> > change that, they'll know that something might be different.
> 
> Ok...  For  being  entirely  compatibile,  mdmfs  should  check  if  the
> specified partition  is being used for  paging. If it is,  md should use
> the /dev/md and use  swap as backing for the memory disk.  If it is not,
> it should use /dev/md and the specified disk as vnode-backing.

See above.  I don't want people to just symlink mdmfs to mount_mfs and
off they go; that can lead to foot shooting if they make assumptions
about mfs that don't work for md.  I don't think it's too much to ask
to change /dev/da0b to /dev/md.

> >  * There's no size specification.  The only way I've seen MFS used is
> > with an -s argument in the options field; e.g., "rw,async,-s<size>".
> > If your example works without -s (i.e., mount_mfs assumes a default
> > size), mdmfs should be fixed to do that too; although I don't know
> > what the default size should be.
> 
> Well, with the mfs the default is the size of the partition (da0b).

I suppose it might be possible to use, say, half the swap size of the
system.  I think what mfs allegedly did is quite silly; who wants to
use their *entire* swap space for a filesystem?  Better yet, people
can explicitly set the size; I wouldn't think of doing it otherwise.

>  
> > If you find  any [other] differences in behavior in  mdmfs vs. the old
> > mount_mfs, please let me know. I used the mount_mfs(8) man page as the
> > reference, not the code, so there may well be some.
> 
> For those, who modified the /etc/fstab, it should be possible to specify
> the type of md as a mount option explicitly.

What do you mean "type of md"?  As in malloc- or swap-backed?  You can
do that.  This:

	/dev/md			/tmp		mfs	-M,rw,async

will set up malloc(9) backing; this:

	/dev/md			/tmp		mfs	-F/usr/myfile,rw,async

will set up vnode backing on /usr/myfile.  Swap backing is the
default.  See the man page for details.

					Dima Dorfman
					dima@unixfreak.org


> 
> How is that?
> 
> 	-mi
> 
> 

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




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