The 4.4BSD implementation of the Network File System (NFS) is intended to interoperate with other NFS Version 2 Protocol (RFC1094) implementations but also allows use of an alternate protocol that is hoped to provide better performance in certain environments. This paper will informally discuss these various protocol features and their use. There is a brief overview of the implementation followed by several sections on various problem areas related to NFS and some hints on how to deal with them. Not Quite NFS (NQNFS) is an NFS like protocol designed to maintain full cache consistency between clients in a crash tolerant manner. It is an adaptation of the NFS protocol such that the server supports both NFS and NQNFS clients while maintaining full consistency between the server and NQNFS clients. It borrows heavily from work done on Spritely-NFS [Srinivasan89], but uses Leases [Gray89] to avoid the need to recover server state information after a crash. 1. NFS Implementation The 4.4BSD implementation of NFS and the alternate protocol nicknamed Not Quite NFS (NQNFS) are kernel resident, but make use of a few system daemons. The kernel implementation does not use an RPC library, handling the RPC request and reply messages directly in mbuf data areas. NFS interfaces to the network using sockets via. the kernel interface available in sys/kern/uipc_syscalls.c as sosend(), soreceive(),... There are connection management routines for support of sockets for connection oriented protocols and timeout/retransmit support for datagram sockets on the client side. For connection oriented transport protocols, such as TCP/IP, there is one connection for each client to server mount point that is maintained until an umount. If the connection breaks, the client will attempt a reconnect with a new socket. The client side can operate without any daemons running, but performance will be improved by running nfsiod daemons that perform read-aheads and write-behinds. For the server side to function, the daemons portmap, mountd and nfsd must be running. The mountd daemon performs two important functions. 1) Upon startup and after a hangup signal, mountd reads the exports file and pushes the export information for each local file system down into the kernel via. the mount system call. 2) Mountd handles remote mount protocol (RFC1094, Appendix A) requests. The nfsd master daemon forks off children that enter the kernel via. the nfssvc system call. The children normally remain kernel resident, providing a process context for the NFS RPC servers. The only exception to this is when a Kerberos [Steiner88] ticket is received and at that time the nfsd exits the kernel temporarily to verify the ticket via. the Kerberos libraries and then returns to the kernel with the results. (This only happens for Kerberos mount points as described further under Security.) Meanwhile, the master nfsd waits to accept new connections from clients using connection oriented transport protocols and passes the new sockets down into the kernel. The client side mount_nfs along with portmap and mountd are the only parts of the NFS subsystem that make any use of the Sun RPC library. Network File System (NFS) is believed to be a registered trademark of Sun Microsystems Inc. SMM:06-2 The 4.4BSD NFS Implementation
[1]
Bruce E. Keith.
Perspectives on NES File Server Performance Characterization
,
1990,
USENIX Summer.
[2]
David R. Cheriton,et al.
Leases: an efficient fault-tolerant mechanism for distributed file cache consistency
,
1989,
SOSP '89.
[3]
Rick Macklem,et al.
Lessons Learned Tuning the 4.3BSD Reno Implementation of the NFS Protocol
,
1991,
USENIX Winter.
[4]
Jeffrey C. Mogul,et al.
Fragmentation considered harmful
,
1987,
CCRV.
[5]
Jeffrey I. Schiller,et al.
An Authentication Service for Open Network Systems. In
,
1998
.
[6]
Raj Srinivasan,et al.
XDR: External Data Representation Standard
,
1995,
RFC.
[7]
William I. Nowicki,et al.
NFS: Network File System Protocol specification
,
1989,
RFC.
[8]
K OusterhoutJohn,et al.
Caching in the Sprite network file system
,
1988
.
[9]
John K. Ousterhout,et al.
Why Aren't Operating Systems Getting Faster As Fast as Hardware?
,
1990,
USENIX Summer.
[10]
Michael Burrows.
Efficient data sharing
,
1988
.
[11]
David K. Gifford,et al.
A caching file system for a programmer's workstation
,
1985,
SOSP '85.
[12]
Dan Walsh,et al.
Design and implementation of the Sun network filesystem
,
1985,
USENIX Conference Proceedings.
[13]
Sun Microsystems,et al.
RPC: Remote Procedure Call Protocol specification: Version 2
,
1988,
RFC.
[14]
Mike Loukides,et al.
Managing NFS and NIS
,
1991
.
[15]
Christopher A. Kent,et al.
Cache Coherence in Distributed Systems
,
1999
.
[16]
Jeffrey Mogul,et al.
Spritely NFS: Implementation and Performance of Cache-Consistency Protocols
,
1989
.
[17]
Mary Baker,et al.
Availability in the Sprite distributed file system
,
1991,
OPSR.
[18]
Mahadev Satyanarayanan,et al.
Scale and performance in a distributed file system
,
1987,
SOSP '87.
[19]
Bill Nowicki.
Transport issues in the network file system
,
1989,
CCRV.
[20]
M. F.,et al.
Bibliography
,
1985,
Experimental Gerontology.