[Info-vax] Request description of UFS for VMS person
glen herrmannsfeldt
gah at ugcs.caltech.edu
Mon Apr 27 17:24:21 EDT 2009
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.
But the files are still there.
> 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 ?
The selection is done at a higher level. Previously this
discussion was about file systems. Your question is about how
unix selects which file system will be used for a given request.
> How do they preserve the original contents of the chocolate directory
> when chocolate becomes a mount point ?
Try:
mount localhost: /disk2 /mnt
ls /mnt/disk2/vanilla
you will see that the files are still there!
> 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 of those. When the system follows down a path it
checks for mount points. Then it selects the appropriate file system.
Note that it doesn't have to be NFS. You can
mount /disk1 /disk2/vanilla
mount localhost:/disk2/vanilla /mnt
then the files on local disk /disk1 will be visible as
/disk2/vanilla, and the files on /disk2/vanilla will be
visible (and modifiable) on /mnt.
-- glen
More information about the Info-vax
mailing list