Re: How to convert /tmp to memfs after install

From: Bela Lubkin (filbo_at_armory.com)
Date: 10/17/05


Date: 17 Oct 2005 16:18:16 -0400

Bob Bailin wrote:

> "Steve M. Fabac, Jr." <smfabac@att.net> wrote in message news:4353316A.84F6D02@att.net...
> >I am installing Openserver 6.0 for the first time on my test system
> > and blew through the file system configuration during installation
> > so that /tmp is on the root file system.
> >
> > I have searched the documentation without finding a solution on
> > how to set up /etc/vfstab to create and mount /tmp as memfs
> >
> > How do I do that without resorting to a re-installation?
>
> Agreed.
>
> man mount_memfs
> is not much help. It implies that you should be able to issue:
>
> mount -F memfs /tmp
>
> in order to create a memory filesystem that replaces the
> contents of /tmp, using the maximum value from the memory
> pool, but all you get is:
>
> UX:mount: ERROR: cannot determine special device
>
> (no special device is required, because it's a memfs!)

Just be sure you know what you're getting into. Early builds of OSR6
used the UnixWare startup scripts that would set /tmp up as a memfs.
Due to observed problems, this was deliberately changed back to having
/tmp be a regular directory, implicitly on the root filesystem.

Existing OSR5 software had two main classes of clash with a memfs /tmp:
some scripts expected files to persist in /tmp across a reboot; and some
scripts expected to be able to make hard links between files in their
private directories and /tmp.

I don't know of any examples of either of these problems inside the OSR6
system itself (but there could be some). The main dangers would be with
your own private scripts and with third party applications, both at
install and runtime.

Ah, one issue that I do remember: OSR5's `vi` uses /tmp as the default
directory for edit buffer files. After a crash (panic, power failure,
whatever), `vi` can recover interrupted edit sessions by reading those
edit buffers. This will not work if the directory is stored on a memfs.
But I don't remember whether OSR6 `vi` was changed to avoid this problem
by using a less volatile temporary directory. (Before you test this for
yourself, make sure you aren't already overriding vi's temp dir with an
environment variable or with vi's "set dir=/somewhere/else" directive...)

>Bela<