Sharing /tmp through NFS

David Canzi dmcanzi at watdcsu.waterloo.edu
Wed Jan 25 19:34:04 AEST 1989


There are two solutions to this problem in use here (on machines that I
have access to).  Suppose your server is unimaginatively called "server"
and your diskless (I assume) workstations are called "client1" and
"client2".  Both solutions involve mounting a file system under the root
directory on server, as, say, /nfs_tmp, and creating the directories
/nfs_tmp/client1/tmp and /nfs_tmp/client2/tmp.

Then it is possible either (1) to mount server:/nfs_tmp/client1/tmp at
/tmp on client1, and handle any other clients similarly, or (2) to mount
/nfs_tmp on all clients, and make /tmp a symbolic link to the appropriate
subdirectory of /nfs_tmp on each client.

Since each client uses a separate directory as its /tmp, there are no
problems with name collisions.

Oh yes, the above solutions are implemented under SunOS 3.n, for various
values of n.  Whether this kind of trickery is possible -- or needed -- in
SunOS 4.0.x, I don't know.

Somebody has questioned the sanity of using nfs for mounting /tmp, on
grounds of speed.  If you have, say, 24 diskless workstations, being able
to have all the workstations share a common /tmp file system makes it
possible for users to create temporary files and directory structures that
are much larger than the amount of disk space we can afford to allocate
for root partitions for each of 24 workstations.  And if, perchance, nfs
is slower than nd, it probably isn't slower by much.

David Canzi



More information about the Comp.sys.sun mailing list