NFS Mount Point Strategy?

rusty wright rusty at belch.Berkeley.EDU
Thu Nov 15 09:02:25 AEST 1990


In article <1990Nov14.203658.23848 at cs.utk.edu> de5 at ornl.gov (Dave Sill) writes:

   From: de5 at ornl.gov (Dave Sill)
   Subject: Re: NFS Mount Point Strategy?
   Date: 14 Nov 90 20:36:58 GMT

   [note: followups redirected to comp.unix.admin]

   Is there some advantage I'm missing to having everything mounted
   under /nfs?  E.g., why not just /machinename/partition?

You'll regret it if you don't have your nfs mounts 3 levels down.  The
method used by pwd (and by the C library getwd() routine which uses
what pwd does to determine the current directory) necessitates walking
up the directory tree and doing a stat() on each directory in .. to
find out where it came from (save the inode number of . before you
move up to .. and then compare that against the inode number of each
directory in the new current directory).  When it does a stat() on an
nfs mounted directory where the nfs server is down you'll hang.  csh
uses getwd() to initialize the csh variable $cwd so users will hang
when logging in if one of the nfs servers is down.  Likewise, every
time you do cd csh uses getwd() to set $cwd.

So each nfs mount has to be mounted on a directory that must be the
only directory in its parent; i.e., it must not have any "sisters" or
"brothers".

I can't remember why they have to be 3 levels down instead of only 2;
someone else can probably explain why.



More information about the Comp.unix.admin mailing list