NFS Mount Point Strategy?

Michael K. Gschwind mike at vlsivie.tuwien.ac.at
Fri Nov 16 00:44:16 AEST 1990


In article <1990Nov14.203658.23848 at cs.utk.edu> Dave Sill <de5 at ornl.gov> writes:
>[note: followups redirected to comp.unix.admin]
>
>In article <21753 at orstcs.CS.ORST.EDU>, larsen at prism.cs.orst.edu (Scott Larsen) writes:
>>
>>mount all partitions under /nfs/machinename/partition.
>> :
>>So far we have had no problems with this naming scheme.  We have been
>>using it for about 9 months now.
>
>Is there some advantage I'm missing to having everything mounted under /nfs?
>E.g., why not just /machinename/partition?

So what happens if you happen to have a machine called tmp or etc ;-]

One problem I can see with mounting every thing in the / directory is 
performance of the getwd() function. Getwd backtracks all directories
with .. stat'ing all the directory entries, i.e.

until root do
{
	get i-node of current dir 

	cd ..

	for every dir entry 
	{
		stat 
		compare with i-node
		if they match 
			we have discovered part of path, add it to name
			&& break;
	}
}

(* hope you get the idea *) 

Now if you have all the NFS mounted stuff in /, EVERY getwd means
stat'ing NFS mounted volumes. This of course works, EXCEPT if one NFS 
server is down, because then the stat will hang wait & for time-outs etc.
meaning that
# pwd 
(and any other program which uses getwd() :-() will more or less hang.

Mounting everything in /nfs means that you only will hang if you are
below /nfs - a major improvement, but still: if you use pwd in an NFS 
file system, you'll have the same problem as described before, so 
if one NFS server is down, getwd() is down for _ALL_ NFS file systems
X-(

There was an interesting paper at the last EUUG/EurOpen conference
(Autumn '90) how they solved the problem at Chalmers University.

You may want to get hold of a copy from:
EUUG Secretariat 
Owles Hall
Buntingford
Herts SG9 9PL
UK

			hope this helps,
					mike



Michael K. Gschwind, Institute for VLSI-Design, Vienna University of Technology
mike at vlsivie.tuwien.ac.at	1-2-3-4 kick the lawsuits out the door 
mike at vlsivie.uucp		5-6-7-8 innovate don't litigate         
e182202 at awituw01.bitnet		9-A-B-C interfaces should be free
Voice: (++43).1.58801 8144	D-E-F-O look and feel has got to go!
Fax:   (++43).1.569697       



More information about the Comp.unix.admin mailing list