[comp.protocols.nfs] Help Understanding How NFS Is Used

Will@cup.portal.com (Will E Estes) (06/15/90)

Never having used NFS, I need some help understanding the basics of how it
works.  As I understand it, you use PC-NFS to map a remote file system onto
the tree structure of one of your PC hard drives (or maybe to map the
remote file system to a new drive letter).   Now here are my questions: 

When you do a read/write operation on a remote NFS-controlled file, is the 
file then marked as read-only for any other concurrent user of the file?

Does NFS always ship you the entire file, or is it smart enough to ship
only the portions that are currently being read?

When you modify the file inside of an editor and then save it to disk 
does NFS always send the entire file back to the NFS server?

Where can I read more on NFS' architecture?

Thanks,
Will Estes        (sun!portal!cup.portal.com!Will)
 

thurlow@convex.com (Robert Thurlow) (06/15/90)

Will@cup.portal.com (Will E Estes) writes:

>When you do a read/write operation on a remote NFS-controlled file, is the 
>file then marked as read-only for any other concurrent user of the file?

Nope.  Other clients or folks on the server can trash the block you
just wrote at any time unless you and the other folks all agree to
use locking.  The NFS server per se can't remember you were using the
file, as it wants to be a stateless transaction server.

>Does NFS always ship you the entire file, or is it smart enough to ship
>only the portions that are currently being read?

It deals with disk blocks, like a local disk, though the block size
may be different from other disks.  When your DOS process reaches
for it's logical block number seven, that gets mapped onto a size
and offset for the NFS protocol, and the server maps that onto its
(likely different) disk block numbers.

>When you modify the file inside of an editor and then save it to disk 
>does NFS always send the entire file back to the NFS server?

If it was all in your client machine, and your client program "knew"
it had to write all the blocks, you'd write it all out.  If you were
working with a database that "knew" only one local block was to be
written, only those bytes would be written.  It's all up to your
program.

Rob T
--
--
Rob Thurlow, thurlow@convex.com or thurlow%convex.com@uxc.cso.uiuc.edu
With all the charm and personality programmed logic can emulate.