Sharing /tmp through NFS

Michael Eldredge hitchrack!dredge at labrea.stanford.edu
Wed Jan 25 12:11:39 AEST 1989


>I wonder if anyone has tried using one NFS-mounted /tmp directory for a
>group of machines....

We have all of clients setup using NFS mounted /tmp partitions.  They are
not (at least noticibly) slower than the ND mounted /tmp.  (Besides when
and if you ever go to 4.0.n it is all done with NFS anyway.)  We did run
some bench marks, setting one client with ND /tmp and one with NFS /tmp
and ran some huge compiles and some editors, etc. and in one test NFS was
faster; in another ND.  So we really just rely on the user-impression
metric.

Our server exports 2 /tmp directories (on differnt controllers):

	/etc/exports:
		/tmp.nfs1	Clients
		/tmp.nfs2	Clients

In each of these partitions are subdirectories named for the clients,
e.g.:

	/tmp.nfs1/hitchrack/
	/tmp.nfs1/cheshire/
	/tmp.nfs2/talbotts/

Then each client, in /etc/rc.local after YP, routing, biod and before the
"/etc/mount -vat nfs" call does:

	me=`hostname`
	case $me in
	[a-m]*) tmp=gloworm:/tmp.nfs2/$me ;;
	[n-z]*) tmp=gloworm:/tmp.nfs1/$me ;;
	esac
	/etc/mount -t nfs -o rw,hard,intr $tmp /tmp	>/dev/console
	# --------------------------
	/etc/mount -vat nfs				>/dev/console

So that the mount point is not at the root of the exported file system.

We're happy with it.

dredge
Michael Eldredge
Stanford Integrated Circuits Lab



More information about the Comp.sys.sun mailing list