Looking from the user.
Server NFS exporting one or more file systems. Each exported file system can be
either a disk or its section of a subtree. (Various versions of UNIX have their
own rules fragmentation exported systems. Some of them might, for example, allow
only export the file system entirely, others only one of a subtree in each file
system). The server can determine, usually through the lines in the file / etc /
exports, which customers can access each exported file system, and allowed
access to it : "read-only" or "read and write". The client machines can mount a
file system or of a subtree to any location in its existing hierarchy of files
just as they would be able to mount any local file system. Customers can install
directory with a "read-only", even if the server is exported as a "read-write".
NFS mount are two types : hard and myakgoe. The type of mount dependent behavior
of the customer if the server fails to respond to the request. If the filesystem
mounted rigidly, the client continues to repeated requests for a response. In
the case of soft mount client take some time refused to repeat requests and
receives an error. When Mount fired, the client may request that the files in a
remote file system using the same operations that apply to local files. Some
systems also support this type of mount, which corresponds to conduct rigorous
mount for the organization repeated attempts to mount a file system, but it
turns soft for the next I / O. Operation mount NFS less limited compared to
mount local file systems. Protocol does not require the caller to mount an
operation was privileged user, but most users are imposed on them. (For example,
Digital ULTRIX company allows anyone to mount NFS file system until the user has
access to records in the directory mount point. Users can mount the same file
system to multiple locations tree directories even your subdirectory. It can
only export their local file systems and can pass their own mount points during
the passage of the track name. Thus, to see the files server, the client must
mount all file systems.
The original design.
design of NFS had the following objectives : NFS should not be limited to the
operating system UNIX. Any operating system should be able to implement NFS
server and client. Protocol should not depend on any of the specific hardware.
Should be implemented simple repair mechanisms in the event of server failure or
client. Applications must be transparent access to files without the use of
special travel names or libraries, without recompiling. To UNIX-klientov be
maintained UNIX semantics. Productivity NFS must be compared with a capacity of
local disks. Implementation should be independent of the vehicles.
Components of NFS
The NFS consists of several components. Some of them are located either on the
server or the client, and some use both. Some components are not required to
provide basic functional vozmozhnosteey but are part of an expanded interface
NFS : NFS Protocol defines a set of requests (operations), which can be sent to
the client to the server, as well as a set of arguments and return values for
each of these requests. Version 1 of the protocol existed only in the bowels of
Sun Microsystems, and has never been released. All of NFS (including NFSv3)
supports NFS version 2 (NFSv2), which was first published in 1985 under SunOS
2.0. Version 3 of the protocol was published in 1993 and implemented by some
firms. Table 3.1 provides a complete set of NFS requests. The remote procedure
call (RPC) to determine the format of the interaction between client and server.
Every NFS sent as a package RPC. Advanced reporting (XDR-Extended Data
Representation) provides mashinno-nezavisimy encoding method for sending data
through the network. All requests RPC XDR encoding used for data transmission.
The XDR and RPC are used for many other services, in addition to NFS. The code
NFS server is responsible for processing all client requests and provides access
to exported file systems. The code NFS client implements all treatment client
files to the server by sending one or more of RPC requests. Mount Protocol
defines semantics mount and unmount filesystems NFS. NFS uses several
protsessov-demonov background. The server set demons waiting nfsd NFS client and
answer them. Demon mountd process requests mount. The client set biod daemons
handle asynchronous I / O blocks NFS files. Blocking Network Manager (NLM-Network
Lock Manager), and monitor network status (NSM-Network Status Monitor) together
provide a means to lock files on the network. These funds, although not formally
associated with NFS can be found in most NFS implementations. They provide
services not possible in the core protocol. NLM and NSM implement server
operations by demons lockd and statd respectively