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`

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to