Open System Services NFS Overview
Server Procedures
The NFS protocol definition is given as a set of procedures with arguments and results defined
using the RPC language. All of the procedures in the NFS protocol are assumed to be synchronous.
When a procedure returns to the client, the client can assume that the operation has finished and
that any data associated with the request is now in stable storage. For example, a client WRITE
request might cause the server to update data blocks, file-system information blocks (such as indirect
blocks), and file-attribute information (size and modify times). When the WRITE reply returns to the
client, the write is safe, even in the case of a server crash, and the client can discard the data
written. This feature is a very important part of the statelessness of the server. If the server waited
to flush data from remote requests, the client would have to save those requests so that it could
resend them in case of a server crash.
Here is the list of server procedures:
NFSPROC_NULL
Does no work. This server procedure is available in all RPC services for server-response testing
and timing.
NFSPROC_GETATTR
Looks up the attributes of a file.
NFSPROC_SETATTR
Sets the attributes of a file.
NFSPROC_LOOKUP
Looks up a filename.
NFSPROC_READLINK
Reads from a symbolic link.
NFSPROC_READ
Reads up to the requested number of bytes from a file, starting at an offset from the beginning
of the file.
NFSPROC_WRITE
Writes the requested number of bytes to a file, starting at an offset from the beginning of the
file.
NFSPROC_CREATE
Creates a file.
NFSPROC_REMOVE
Deletes a file.
NFSPROC_RENAME
Renames a file.
NFSPROC_LINK
Creates a file that is a hard link to an existing file. When two files are hard-linked, changes
made to either of them are reflected in both files.
NFSPROC_SYMLINK
Creates a symbolic link (a pointer) to an existing file.
NFSPROC_MKDIR
Creates a directory.
NFSPROC_RMDIR
Removes a directory.
NFSPROC_READDIR
Looks up all files in a directory.
NFSPROC_STATFS
Gets the attributes of a file system.
26 NFS Protocol Description