Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Nov 2004 00:48:16 -0500
From:      Ben Kelly <ben.kelly@ieee.org>
To:        Ronald Klop <ronald-freebsd8@klop.yi.org>
Cc:        ls+lists.freebsd.org.mailman.listinfo.freebsd-stable93930659@gambit.com.ru
Subject:   Re: md /tmp mfs rw,-s64m 0 0 in fstab instead of tmpmfs="YES" in rc.conf: no panic
Message-ID:  <48C22BE6-33A5-11D9-99DD-000A95B26134@ieee.org>
In-Reply-To: <opsg9tu9nm8527sy@smtp.local>
References:  <20041105110830.GP58031@gambit.com.ru> <20041105215427.GA33096@xor.obsecurity.org> <20041109083810.GJ58031@gambit.com.ru> <opsg7ya3jo8527sy@smtp.local> <20041110084132.GA699@gambit.com.ru> <opsg9tu9nm8527sy@smtp.local>

next in thread | previous in thread | raw e-mail | index | archive | help
>
> Maybe I'm missing something, but tmpmfs works malloc-based by default.
> tmpmfs is not an easy way to set up a swap-based ramdisk. It is meant 
> to setup diskless systems easily.

One alternative would be to use the ramdisk variables described in 
rc.conf(5).  The only downside is that the ramdisk rc scripts are not 
hooked into the etc/rc.d/Makefile so you need to install them yourself. 
  I am using them right now on 5.3 RC2 to mount a swap based mimedefang 
spool.

For example, in rc.conf:

ramdisk_units="10"

# mimedefang spool
ramdisk_10_config="-t swap -s 192m"
ramdisk_10_owner="mailnull"
ramdisk_10_perms="700"

An then in /etc/fstab:

/dev/md10               /var/spool/MIMEDefang   ufs     rw      0       
0

If you want to try this apply the following patch and then run 
mergemaster again.  (The patch is actually against a version of 
CURRENT, but I think it should apply cleanly to 5.3.)

- Ben

===================================================================
RCS file: /usr/local/mirror/home/ncvs/src/etc/rc.d/Makefile,v
retrieving revision 1.45
diff -u -w -r1.45 Makefile
--- etc/rc.d/Makefile   2 Nov 2004 12:35:54 -0000       1.45
+++ etc/rc.d/Makefile   11 Nov 2004 05:44:36 -0000
@@ -28,7 +28,7 @@
         pccard pcvt pf pflog \
         power_profile ppp-user pppoed preseedrandom pwcheck \
         quota \
-       random rarpd rcconf.sh resolv root \
+       ramdisk ramdisk-own random rarpd rcconf.sh resolv root \
         route6d routed routing rpcbind rtadvd rwho \
         savecore securelevel sendmail \
         serial sppp sshd swap1 \
Index: etc/rc.d/ramdisk-own
===================================================================
RCS file: /usr/local/mirror/home/ncvs/src/etc/rc.d/ramdisk-own,v
retrieving revision 1.3
diff -u -w -r1.3 ramdisk-own
--- etc/rc.d/ramdisk-own        7 Oct 2004 13:55:26 -0000       1.3
+++ etc/rc.d/ramdisk-own        4 Nov 2004 07:57:25 -0000
@@ -39,7 +39,6 @@

  ramdisk_own_start()
  {
-set -x
         for unit in $ramdisk_units; do
                 device="/dev/md$unit"
                 dir=`mount | grep $device | cut -d' ' -f3`



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48C22BE6-33A5-11D9-99DD-000A95B26134>