[comp.unix.wizards] What kinds of things...

grr@cbmvax.UUCP (George Robbins) (05/31/89)

In article <SMARTIN.89May29072600@iemsun.dhc> smartin@iemsun.dhc (Stephen Martin) writes:
> I would like to see a way to NFS mount or remotely link a specific file
> without having to mount a whole directory.

Have you tried it?  Seems to work fine on DEC's Ultrix implementation of NFS.
The "mount point" must be a directory, but it turns into a "file" when a
remote file is mounted on it.

I haven't the faintest idea whether it is "supposed" to work or not, I was
a bit surprised when I discovered this "feature" by accident.

-- 
George Robbins - now working for,	uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr@uunet.uu.net
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)

arosen@hawk.ulowell.edu (MFHorn) (06/01/89)

In article <7018@cbmvax.UUCP> grr@cbmvax.UUCP (George Robbins) writes:
>In article <SMARTIN.89May29072600@iemsun.dhc> smartin@iemsun.dhc (Stephen Martin) writes:
>> I would like to see a way to NFS mount or remotely link a specific file
>> without having to mount a whole directory.
>
>The "mount point" must be a directory, but it turns into a "file" when a
>remote file is mounted on it.
>
>I haven't the faintest idea whether it is "supposed" to work or not, I was
>a bit surprised when I discovered this "feature" by accident.

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.

--
Andy Rosen           | arosen@hawk.ulowell.edu | "I got this guitar and I
ULowell, Box #3031   | ulowell!arosen          |  learned how to make it
Lowell, Ma 01854     |                         |  talk" -Thunder Road
		RD in '88 - The way it should've been

guy@auspex.auspex.com (Guy Harris) (06/02/89)

>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...).