Chapter 17.
Network File System (NFS)
NFS (Network File System) exists to allow hosts to mount partitions on a remote system and use them
as though they were local file systems. This allows files to be organized in a central location, while
providing the functionality of allowing authorized users continuous access to them.
Two versions of NFS are currently in use. NFS version 2 (NFSv2), which has been around for several
years, is widely supported by various operating systems. NFS version 3 (NFSv3) has several more
features, including a variable file handle size and better error reporting. Red Hat Linux supports both
NFSv2 and NFSv3, and uses NFSv3 by default when connecting with a server that supports it.
This chapter will focus on NFS version 2, though many of the concepts discussed also apply to version
3. Additionally, only fundamental NFS concepts and supplemental information will be provided. For
specific instructions regarding the configuration and operation of NFS on client or server machines,
see the chapter titled Network File System (NFS) in the Official Red Hat Linux Customization Guide.
17.1. Methodology
Linux uses a combination of kernel level support and continuously running daemon processes to
provide NFS file sharing, however, NFS support must be enabled in the Linux kernel to function. NFS
uses Remote Procedure Calls (RPC) to route requests between clients and servers, meaning that the
portmap
service must be enabled and active at the proper runlevels for NFS communication to occur.
Working with
portmap
, various other processes ensure that a particular NFS connection is allowed
and may proceed without error:
rpc.mountd
The running process that receives the mount request from an NFS client and
checks to see if it matches with a currently exported file system.
rpc.nfsd
The process that implements the user level part of the NFS service. It works with
the Linux kernel to meet the dynamic demands of NFS clients, such as providing additional server
threads for NFS clients to uses.
rpc.lockd
A daemon that is not necessary with modern kernels. NFS file locking is now done
by the kernel. It is included with the
nfs utils
package for users of older kernels that do not
include this functionality by default.
rpc.statd
Implements the Network Status Monitor (NSM) RPC protocol. This provides reboot
notification when an NFS server is restarted without being gracefully brought down.
rpc.rquotad
An RPC server that provides user quota information for remote users.
Not all of these programs are required for NFS service. The only services that must be enabled are
rpc.mountd
,
rpc.nfsd
, and
portmap
. The other daemons provide additional functionality and
should only be used if your server environment requires them.
NFS version 2 uses the User Datagram Protocol (UDP) to provide a stateless network connection
between the client and server. NFS version 3 can use UDP or TCP running over an IP. The stateless
UDP connection minimizes network traffic, as the NFS server sends the client a cookie after the client
is authorized to access the shared volume. This cookie is a random value stored on the server's side
and is passed with along with RPC requests from the client. The NFS server can be restarted without
affecting the clients and the cookie will remain intact.
NFS only performs authentication when a client system attempts to mount a remote file
system. To limit access, the NFS server first employs TCP wrappers. TCP wrappers reads the
/etc/hosts.allow
and
/etc/hosts.deny
files to determine if a particular client should be
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved