Network File System
Network File System is a distributed file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client computer to access files over a computer network much like local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call system. The NFS is an open standard defined in a Request for Comments, allowing anyone to implement the protocol.
Versions and variations
Sun used version 1 only for in-house experimental purposes. When the development team added substantial changes to NFS version 1 and released it outside of Sun, they decided to release the new version as v2, so that version interoperation and RPC version fallback could be tested.NFSv2
Version 2 of the protocol originally operated only over User Datagram Protocol. Its designers meant to keep the server side stateless, with locking implemented outside of the core protocol. People involved in the creation of NFS version 2 include Russel Sandberg, Bob Lyon, Bill Joy, Steve Kleiman, and others.The Virtual File System interface allows a modular implementation, reflected in a simple protocol. By February 1986, implementations were demonstrated for operating systems such as System V release 2, DOS, and VAX/VMS using Eunice.
NFSv2 only allows the first 2 GB of a file to be read due to 32-bit limitations.
NFSv3
Version 3 added:- support for 64-bit file sizes and offsets, to handle files larger than 2 gigabytes ;
- support for asynchronous writes on the server, to improve write performance;
- additional file attributes in many replies, to avoid the need to re-fetch them;
- a READDIRPLUS operation, to get file handles and attributes along with file names when scanning a directory;
- assorted other improvements.
NFSv4
Version 4, influenced by Andrew File System and Server Message Block, includes performance improvements, mandates strong security, and introduces a stateful protocol. Version 4 became the first version developed with the Internet Engineering Task Force after Sun Microsystems handed over the development of the NFS protocols.NFS version 4.1 aims to provide protocol support to take advantage of clustered server deployments including the ability to provide scalable parallel access to files distributed among multiple servers. Version 4.1 includes Session trunking mechanism and available in some enterprise solutions as VMware ESXi.
NFS version 4.2 was published in November 2016 with new features including: server-side clone and copy, application I/O advise, sparse files, space reservation, application data block, labeled NFS with sec_label that accommodates any MAC security system, and two new operations for pNFS.
One big advantage of NFSv4 over its predecessors is that only one UDP or TCP port, 2049, is used to run the service, which simplifies using the protocol across firewalls.
Other extensions
, an extension to Version 2 and Version 3, allows NFS to integrate more easily into Web-browsers and to enable operation through firewalls. In 2007 Sun Microsystems open-sourced their client-side WebNFS implementation.Various side-band protocols have become associated with NFS. Note:
- the byte-range advisory Network Lock Manager protocol
- the remote quota-reporting protocol, which allows NFS users to view their data-storage quotas on NFS servers
- NFS over RDMA, an adaptation of NFS that uses remote direct memory access as a transport
- NFS-Ganesha, an NFS server, running in user-space and supporting various file systems like GPFS/Spectrum Scale, CephFS via respective FSAL modules. The CephFS FSAL supported using libcephfs
- Trusted NFS
Platforms
SMB and NetWare Core Protocol occur more often than NFS on systems running Microsoft Windows; AFP occurs more often than NFS in Apple Macintosh systems; and QFileSvr.400 occurs more often in AS/400 systems. Haiku in 2012 added NFSv4 support as part of a Google Summer of Code project.
Typical implementation
Assuming a Unix-style scenario in which one machine needs access to data stored on another machine :- The server implements NFS daemon processes, running by default as
nfsd
, to make its data generically available to clients. - The server administrator determines what to make available, exporting the names and parameters of directories, typically using the
/etc/exports
configuration file and theexportfs
command. - The server security-administration ensures that it can recognize and approve validated clients.
- The server network configuration ensures that appropriate clients can negotiate with it through any firewall system.
- The client machine requests access to exported data, typically by issuing a
mount
command. which port the NFS server is using, the client connects to the NFS server - If all goes well, users on the client machine can then view and interact with mounted filesystems on the server within the parameters permitted.
/etc/fstab
and/or automounting facilities.Protocol development
During the development of the ONC protocol, only Apollo's Network Computing System offered comparable functionality. Two competing groups developed over fundamental differences in the two remote procedure call systems. Arguments focused on the method for data-encoding — ONC's External Data Representation always rendered integers in big-endian order, even if both peers of the connection had little-endian machine-architectures, whereas NCS's method attempted to avoid byte-swap whenever two peers shared a common endianness in their machine-architectures. An industry-group called the Network Computing Forum formed in an attempt to reconcile the two network-computing environments.In 1987, Sun and AT&T announced they would jointly develop AT&T's UNIX System V Release 4. This caused many of AT&T's other licensees of UNIX System to become concerned that this would put Sun in an advantaged position, and ultimately led to Digital Equipment, HP, IBM, and others forming the Open Software Foundation in 1988. Ironically, Sun and AT&T had formerly competed over Sun's NFS versus AT&T's Remote File System, and the quick adoption of NFS over RFS by Digital Equipment, HP, IBM, and many other computer vendors tipped the majority of users in favor of NFS.
NFS interoperability was aided by events called "Connectathons" starting in 1986 that allowed vendor-neutral testing of implementations with each other. OSF adopted the Distributed Computing Environment and the DCE Distributed File System over Sun/ONC RPC and NFS. DFS used DCE as the RPC, and DFS derived from the Andrew File System ; DCE itself derived from a suite of technologies, including Apollo's NCS and Kerberos.
1990s
Sun Microsystems and the Internet Society reached an agreement to cede "change control" of ONC RPC so that the ISOC's engineering-standards body, the Internet Engineering Task Force, could publish standards documents related to ONC RPC protocols and could extend ONC RPC. OSF attempted to make DCE RPC an IETF standard, but ultimately proved unwilling to give up change control. Later, the IETF chose to extend ONC RPC by adding a new authentication flavor based on Generic Security Services Application Program Interface, RPCSEC GSS, to meet IETF requirements that protocol standards have adequate security.Later, Sun and ISOC reached a similar agreement to give ISOC change control over NFS, although writing the contract carefully to exclude NFS version 2 and version 3. Instead, ISOC gained the right to add new versions to the NFS protocol, which resulted in IETF specifying NFS version 4 in 2003.
2000s
By the 21st century, neither DFS nor AFS had achieved any major commercial success as compared to SMB-CIFS or NFS. IBM, which had formerly acquired the primary commercial vendor of DFS and AFS, Transarc, donated most of the AFS source code to the free software community in 2000. The OpenAFS project lives on. In early 2005, IBM announced end of sales for AFS and DFS.In January, 2010, Panasas proposed an NFSv4.1 based on their Parallel NFS technology claiming to improve data-access parallelism capability. The NFSv4.1 protocol defines a method of separating the filesystem meta-data from file data location; it goes beyond the simple name/data separation by striping the data amongst a set of data servers. This differs from the traditional NFS server which holds the names of files and their data under the single umbrella of the server. Some products are multi-node NFS servers, but the participation of the client in separation of meta-data and data is limited.
The NFSv4.1 pNFS server is a set of server resources or components; these are assumed to be controlled by the meta-data server.
The pNFS client still accesses one meta-data server for traversal or interaction with the namespace; when the client moves data to and from the server it may directly interact with the set of data servers belonging to the pNFS server collection. The NFSv4.1 client can be enabled to be a direct participant in the exact location of file data and to avoid solitary interaction with one NFS server when moving data.
In addition to pNFS, NFSv4.1 provides:
- Sessions
- Directory Delegation and Notifications
- Multi-server Namespace
- access control lists and discretionary access control
- Retention Attributions
- SECINFO_NO_NAME