Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.wizards Subject: Re: What kinds of things... (really: nfs mounting files) Message-ID: <1729@auspex.auspex.com> Date: 1 Jun 89 19:03:31 GMT References: <106326@sun.Eng.Sun.COM> <3290@ncar.ucar.edu> <7018@cbmvax.UUCP> <13496@swan.ulowell.edu> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 22 >I too was surprised to find it work (SunOS 4.0 mounted a DG/UX 4.02 file). >But if you stop and think that all diskless clients 'mount' a swap _file_ >from the server, it makes some sense that it should work. The quotes around "mount" are significant. There's no direct connection between the fact that mounting a file accessed over NFS atop a directory works and that attaching a file accessed over NFS as a swap area works. "mounting" a swap file means "getting a file handle for it and associating it with a "swap area" entry; reads from and writes to that swap area get turned into NFS "read" and "write" calls using that file handle. "mounting" something on top of a directory, if the thing being mounted is being mounted over NFS, means "getting a file handle for that something and flagging that something as being 'mounted on' the directory". There's no reason why it must *ipso facto* be possible to mount a non-directory file atop a directory; the implementation happens to let it work, and this may even be deliberate, but I could imagine an implementation that supported attaching files accessed over NFS as swap areas but that got confused by an attempt to mount a file atop a directory (it might not be a *good* implementation, but then I didn't say it was...).