Computing
A network file system is a software abstraction that allows a client computer to access files stored on a remote server over a network as if they were local. It provides a shared, consistent namespace and handles the complexities of data transfer, locking, and caching. The term is often used generically, but it also specifically refers to Sun Microsystems' Network File System (NFS) protocol, which has been a cornerstone of distributed computing since the 1980s.
A network file system presents a remote directory tree as part of the local file system namespace. Clients issue standard file operations (open, read, write, close) that are translated into network requests to the server. The server manages the actual storage and enforces access control. Key design aspects include statelessness (in NFSv2 and v3) where each request is self-contained, and stateful operation in NFSv4 which supports locks and sessions.
To improve performance, clients cache file data and metadata locally, but this introduces consistency challenges. The close-to-open consistency model, used by NFS, ensures that changes made by one client are visible to others after the file is closed and reopened. This model balances performance with correctness, though it can lead to stale reads in some scenarios.
Sun Microsystems introduced NFS in 1984, designed by Russel Sandberg and colleagues, to provide transparent file access across a network of Unix workstations. The protocol quickly became an industry standard due to its simplicity and openness. NFSv2 (RFC 1094) used UDP and had a 2GB file size limit. NFSv3 (RFC 1813) added TCP support, larger files, and improved error handling.
NFSv4 (RFC 7530) represented a major redesign, integrating security (Kerberos), compound operations, and stateful semantics. It also introduced a single protocol for both file access and locking, simplifying firewall traversal. Subsequent minor versions, such as NFSv4.1 (RFC 5661) and 4.2 (RFC 7862), added features like parallel I/O (pNFS) and server-side copy.
Besides NFS, other network file systems include Server Message Block (SMB), primarily used in Windows environments, and Apple Filing Protocol (AFP) for classic Mac OS. SMB, now SMB3, is widely used for file sharing and supports features like encryption and failover. The Andrew File System (AFS) is a distributed file system that emphasizes scalability and security, using a global namespace and Kerberos authentication.
Open-source implementations of NFS are prevalent in Linux and BSD systems. The Linux kernel includes an NFS client and server, and the nfs-utils package provides administrative tools. For SMB, the Samba suite enables Unix-like systems to serve Windows clients. These implementations are crucial for heterogeneous networks.
One overlooked aspect is the WebNFS extension, which allowed NFS to be used over HTTP and through firewalls, but it never gained widespread adoption. Another is the pNFS (parallel NFS) layout, which separates metadata and data paths, enabling high-performance parallel access to storage clusters. This is used in high-performance computing environments.
NFS also has a role in cloud computing, with services like Amazon EFS providing managed NFS storage. The protocol's statelessness in early versions made it vulnerable to security issues, leading to the development of RPCSEC_GSS for strong authentication. Additionally, the NFSv4.2 version introduced space reservation and clone operations, which are useful for virtual machine storage.
This article covers the general concept and the specific NFS protocol.
Help improve the encyclopedia. Reports go straight to the site manager.