So I heard Zibby yammering on about 'tmpfs' for the /tmp partition, on this
list, and said 'hey, that sounds like a really cool idea'. So I decided to
try it.

problem is, there's *NO* doco about it yet.
so here's what I gleaned from sorting through kernel-traffic archives,
assembled into a micro-HOWTO.

what is it?
-----------
	tmpfs is a RAM-based filesystem, that can be swapped out. it also
has size-limitation options (which keeps it from filling up all your memory
and bricking up the system).

what do you need?
-----------------
Linux 2.4.x (I think >2.4.2, but I could be wrong)
mount v2.10h (?) (I have 2.11b. someone reported bugs in 2.11e, regarding
	tmpfs).

procedure:
----------
- make sure you have a recent version of mount. 
- get a recent kernel 
- build the kernel with '#define CONFIG_TMPFS 1' in the .config file. if you
do a 'make menuconfig', it's under Filesystems as 'Virtual memory file
system support (former shm fs)'
- try it out. here's my sample run:

root at steel:/mnt# mkdir /mnt/temp
root at steel:/mnt# dpkg -l mount
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  mount          2.11b-4        Tools for mounting and manipulating
filesyst
root at steel:/mnt# mount -t tmpfs tmpfs /mnt/temp/
root at steel:/mnt# mount
/dev/hda1 on / type ext2 (rw,errors=remount-ro,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda4 on /home type ext2 (rw)
/dev/hda5 on /usr type ext2 (rw)
/dev/hda6 on /var type ext2 (rw)
tmpfs on /mnt/temp type tmpfs (rw)
root at steel:/mnt# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             471M   34M  412M   8% /
/dev/hda4              25G  1.9G   22G   8% /home
/dev/hda5             4.6G  546M  3.8G  13% /usr
/dev/hda6             1.8G  375M  1.3G  22% /var
tmpfs                 953M     0  953M   0% /mnt/temp
root at steel:/mnt# umount /mnt/temp/
root at steel:/mnt# mount -t tmpfs -o size=128M tmpfs /mnt/temp/
root at steel:/mnt# mount
/dev/hda1 on / type ext2 (rw,errors=remount-ro,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda4 on /home type ext2 (rw)
/dev/hda5 on /usr type ext2 (rw)
/dev/hda6 on /var type ext2 (rw)
tmpfs on /mnt/temp type tmpfs (rw,size=128M)
root at steel:/mnt# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             471M   34M  412M   8% /
/dev/hda4              25G  1.9G   22G   8% /home
/dev/hda5             4.6G  546M  3.8G  13% /usr
/dev/hda6             1.8G  375M  1.3G  22% /var
tmpfs                 128M     0  128M   0% /mnt/temp

as we can see from this:
- yes, I have nearly 1GB of swap. doesn't hurt, and I've got to use this
huge disk *somehow*. :)
- tmpfs, if not given a size= option, will assume it can use *all* the
space. this is a *BAD THING* because runaway processes filling up your
filesystem, will fill up all of your memory, giving an Out Of Memory
condition that's awfully hard to recover from.

and here's the entry I put in my /etc/fstab:
tmpfs        /tmp      tmpfs   defaults,size=500M    0  0

be warned, I haven't yet actually tried rebooting with this setup; but I
don't see why it wouldn't work.

Carl Soderstrom
-- 
Network Engineer
Real-Time Enterprises
(952) 943-8700