Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 May 2006 12:50:52 -0500 (CDT)
From:      Greg Rivers <gcr+freebsd-stable@tharned.org>
To:        Ulrich Spoerlein <uspoerlein@gmail.com>
Cc:        Paul Allen <nospam@ugcs.caltech.edu>, freebsd-stable@freebsd.org
Subject:   Re: kmem leak in tmpmfs?
Message-ID:  <20060529121831.F43434@nc8000.tharned.org>
In-Reply-To: <20060529144610.GD1117@roadrunner.q.local>
References:  <wpy7wq6qlh.fsf@heho.labo> <44764417.4030004@alumni.rice.edu> <20060526004343.GE28128@groat.ugcs.caltech.edu> <200605252220.44739.gcr%2Bfreebsd-stable@tharned.org> <20060529144610.GD1117@roadrunner.q.local>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 29 May 2006, Ulrich Spoerlein wrote:

> Greg Rivers wrote:
>> On Thursday 25 May 2006 19:43, Paul Allen wrote:
>>>> From Jonathan Noack <noackjr@alumni.rice.edu>, Thu, May 25, 2006 at
>>>> 07:56:07PM -0400: I am currently running with the following in
>>>> /etc/rc.conf and haven't experienced any problems:
>>>> tmpmfs_flags="-S -o async"
>>>
>>> Is there a way to accomplish this with an fstab entry?
>>>
>>> md	/tmp            mfs     rw,async,-s1024m,-S
>>>
>>> no,I don't think so.  But surely it would be better to just fixup the
>>> standard mount -t path to not call mount_mfs...
>>>
>>
>> Actually there is a way.  I too have not been satisfied with the tmpmfs
>> features in rc, so for some time now I've simply created a hard link:
>>
>> 	cd /sbin && ln -f mdmfs mount_md
>>
>> and then used an entry like this in /etc/fstab:
>>
>> 	md		/tmp		md	rw,async,-Sp1777,-s768M	0	0
>>
>> This works great for me.  A simple patch to mtree could make this hard link
>> part of the base system.  Nothing else is needed.
>
> You should use the 'mfs' file system. This works out of the box:
>
> md      /tmp    mfs     rw,-s256m,-S,-Otime,async,noatime  0       0
>
> Ulrich Spoerlein
>

Using 'mfs' as you suggest doesn't work; you'll only get a usage message 
when you try to mount:

usage: mount_mfs -C [-lNU] [-a maxcontig] [-b block-size] [-c cylinders]
 	[-d rotdelay] [-e maxbpg] [-F file] [-f frag-size] [-i bytes]
 	[-m percent-free] [-n rotational-positions] [-O optimization]
 	[-o mount-options] [-s size] [-v version] md-device mount-point

This is because not all mdmfs options are available in "mount_mfs 
compatibility" mode as described at the bottom of mdmfs(8). 
Conspicuously absent are -p, -S, and -w.  With 'mfs', you can't turn off 
softupdates (ie. can't have async), and you can't set arbitrary modes and 
ownerships on the file system.  Creating the "mount_md" hard link to mdmfs 
and using type 'md' in fstab allows you to use all the features of mdmfs.

-- 
Greg



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