[Info-vax] Request description of UFS for VMS person

Bob Eager rde42 at spamcop.net
Mon Apr 27 17:16:18 EDT 2009


On Mon, 27 Apr 2009 20:56:36 UTC, JF Mezei 
<jfmezei.spamnot at vaxination.ca> wrote:

> BTW, I have another question about the Unix file sytstem:
> 
> I can have a directory file /disk2/jfmezei  which can contain unix files
> and subdirectories.
> 
> I can then mount  nfs://10.0.0.11/disk2/vanilla  /disk2/chocolate
> 
> At that point, doing  ls /disk2/chocolate will list the "vanilla" files
> on the remote system. So the mount point essentially overwrites an
> existing directory, making the files under it inaccessible.

Yes.

> But, when I umount /disk2/chocolate, it will remove the link to the
> vanilla files on the remote system, and by magic, /disk2/chocolate will
> again list the chocolate files ?

Yes.

> How do they preserve the original contents of the chocolate directory
> when chocolate becomes a mount point ?
> 
> Is it the chocolate entry in the /disk2 diretory which is updated, or it
> is the /disk2/chocolate file which is updated to have an extra entry
> (the mount point) which causes all other files in that directory to
> become invivisible ?

Neither. Nothing happens on the disk. The file system support in the 
kernel merely records i-numbers and 'file systems' for all 'mount 
points'. Any attempt to access a directory that has something mounted on
it is redirected to the root directory of the mounted file system. 
Obviously the redirection varies, as different mounted file system types
have their own code.

This might sound inefficient, but remember the number of mount points is
generally not that many, so it's a very short list to scan. My heavily 
used 'big' system here has only 16 mount points.

-- 
Bob Eager




More information about the Info-vax mailing list