Mounting NFS
Clients access files on the server by first mounting server exported directories. When a client mounts a directory, it does not make a copy of that directory. Rather, the mounting process uses a series of remote procedure calls to enable a client to transparently access the directories on the server.
The following describes the mounting process:
- When the server starts, the /etc/rc.nfs script runs the exportfs command, which reads the server /etc/exports file, and then tells the kernel which directories are to be exported and what access restrictions they require.
- The rpc.mountd daemon and several nfsd daemons are then started by the /etc/rc.nfs script.
- Then the /etc/rc.nfs script executes the mount command, which reads the file systems listed in the /etc/filesystems file.
- The mount command locates one or more servers
that export the information the client wants and sets up communication between
itself and that server. This process is called binding.
- The mount command then requests that one or more servers allow the client to access the directories in the client /etc/filesystems file.
- The server daemon receives the client mount requests and either
grants or denies them. If the requested directory is available to that client, the server daemon sends the client kernel an identifier called a file handle.
- The client kernel then ties the file handle to the mount point (a directory) by recording certain information in a mount record.
Client communication with the rpc.mountd daemon does not occur with NFS version 4 mount processing. Operations in the core NFS version 4 protocol are used to service client side mount operations. The NFS version 4 server implementation does utilize support in the rpc.mountd daemon as part of handling NFS version 4 access.