Network File System (NFS) is a
distributed file system protocol originally developed by
Sun Microsystems
Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, the ...
(Sun) in 1984,
allowing a user on a client
computer
A computer is a machine that can be programmed to Execution (computing), carry out sequences of arithmetic or logical operations (computation) automatically. Modern digital electronic computers can perform generic sets of operations known as C ...
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 (ONC RPC) system. NFS is an open IETF standard defined in a
Request for Comments (RFC), 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 (defined in RFC 1094, March 1989) originally operated only over
User Datagram Protocol (UDP). Its designers meant to keep the server side
stateless, with
locking (for example) implemented outside of the core protocol. People involved in the creation of NFS version 2 include
Russel Sandberg Russel is an alternate spelling of Russell. Russel may also refer to:
People
*Russel Arnold (born 1973), Sri Lankan cricketer
*Russel Crouse (1893–1966), American playwright
*Russel Farnham (1784–1832), American frontiersman
* Russel Hono ...
,
Bob Lyon
Bob Lyon (born March 24, 1955), an American politician, is a former Kansas State Senator from the city of Winchester. A civil engineer, Lyon is a graduate of the University of Virginia and George Washington University. ,
Bill Joy,
Steve Kleiman
''yes'Steve is a masculine given name, usually a short form (hypocorism) of Steven or Stephen
Notable people with the name include:
steve jops
* Steve Abbott (disambiguation), several people
* Steve Adams (disambiguation), several people
* Steve ...
, 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
In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in 32-bit units. Compared to smaller bit widths, 32-bit computers can perform large calculation ...
limitations.
NFSv3
Version 3 (RFC 1813, June 1995) added:
* support for 64-bit file sizes and offsets, to handle files larger than 2 gigabytes (GB);
* 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.
The first NFS Version 3 proposal within Sun Microsystems was created not long after the release of NFS Version 2. The principal motivation was an attempt to mitigate the performance issue of the synchronous write operation in NFS Version 2.
By July 1992, implementation practice had solved many shortcomings of NFS Version 2, leaving only lack of large file support (64-bit file sizes and offsets) a pressing issue. This became an acute pain point for
Digital Equipment Corporation with the introduction of a 64-bit version of
Ultrix
Ultrix (officially all-caps ULTRIX) is the brand name of Digital Equipment Corporation's (DEC) discontinued native Unix operating systems for the PDP-11, VAX, MicroVAX and DECstations.
History
The initial development of Unix occurred on DEC equip ...
to support their newly released 64-bit
RISC
In computer engineering, a reduced instruction set computer (RISC) is a computer designed to simplify the individual instructions given to the computer to accomplish tasks. Compared to the instructions given to a complex instruction set comput ...
processor, the
Alpha 21064. At the time of introduction of Version 3, vendor support for
TCP
TCP may refer to:
Science and technology
* Transformer coupled plasma
* Tool Center Point, see Robot end effector
Computing
* Transmission Control Protocol, a fundamental Internet standard
* Telephony control protocol, a Bluetooth communication s ...
as a
transport-layer protocol began increasing. While several vendors had already added support for NFS Version 2 with TCP as a transport, Sun Microsystems added support for TCP as a transport for NFS at the same time it added support for Version 3. Using TCP as a transport made using NFS over a
WAN more feasible, and allowed the use of larger read and write transfer sizes beyond the 8 KB limit imposed by
User Datagram Protocol.
WebNFS
WebNFS was an extension to NFSv2 and NFSv3 allowing it to function behind restrictive firewalls without the complexity of Portmap and MOUNT protocols. WebNFS had a fixed
TCP/UDP port number (2049), and instead of requiring the client to contact the MOUNT RPC service to determine the initial filehandle of every filesystem, it introduced the concept of a ''public filehandle'' (null for NFSv2, zero-length for NFSv3) which could be used as the starting point. Both of those changes have later been incorporated into NFSv4.
NFSv4
Version 4 (RFC 3010, December 2000; revised in RFC 3530, April 2003 and again in RFC 7530, March 2015), influenced by
Andrew File System
The Andrew File System (AFS) is a distributed file system which uses a set of trusted servers to present a homogeneous, location-transparent file name space to all the client workstations. It was developed by Carnegie Mellon University as part of t ...
(AFS) and
Server Message Block (SMB, also termed CIFS), includes performance improvements, mandates strong security, and introduces a
stateful
In information technology and computer science, a system is described as stateful if it is designed to remember preceding events or user interactions; the remembered information is called the state of the system.
The set of states a system can oc ...
protocol.
Version 4 became the first version developed with the
Internet Engineering Task Force (IETF) after
Sun Microsystems
Sun Microsystems, Inc. (Sun for short) was an American technology company that sold computers, computer components, software, and information technology services and created the Java programming language, the Solaris operating system, ZFS, the ...
handed over the development of the NFS protocols.
NFS version 4.1 (RFC 5661, January 2010; revised in RFC 8881, August 2020) 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 (pNFS extension). Version 4.1 includes Session trunking mechanism (Also known as NFS Multipathing) and available in some enterprise solutions as
VMware ESXi.
NFS version 4.2 (RFC 7862) 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 (ADB), labeled NFS with sec_label that accommodates any MAC security system, and two new operations for pNFS (LAYOUTERROR and LAYOUTSTATS).
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
WebNFS, 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 (NLM) protocol (added to support
UNIX System V file locking APIs)
* the remote quota-reporting (RQUOTAD) protocol, which allows NFS users to view their data-storage quotas on NFS servers
*
NFS over RDMA
NFS may refer to:
Organisations
* NFS (news service) (''Nýja fréttastofan''), a defunct Icelandic television news service
* National Film School, former name of the National Film and Television School, England
* National Financial Switch, bank ...
, an adaptation of NFS that uses
remote direct memory access (RDMA) 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 (File System Abstraction Layer) modules. The
CephFS
Ceph (pronounced ) is an open-source software-defined storage platform that implements object storage on a single distributed computer cluster and provides 3-in-1 interfaces for object-, block- and file-level storage. Ceph aims primarily ...
FSAL supported using libcephfs
*Trusted NFS (TNFS)
Platforms
NFS is often used with
Unix operating systems (such as
Solaris
Solaris may refer to:
Arts and entertainment Literature, television and film
* ''Solaris'' (novel), a 1961 science fiction novel by Stanisław Lem
** ''Solaris'' (1968 film), directed by Boris Nirenburg
** ''Solaris'' (1972 film), directed by ...
,
AIX
Aix or AIX may refer to:
Computing
* AIX, a line of IBM computer operating systems
*An Alternate Index, for a Virtual Storage Access Method Key Sequenced Data Set
*Athens Internet Exchange, a European Internet exchange point
Places Belgium
...
,
HP-UX
HP-UX (from "Hewlett Packard Unix") is Hewlett Packard Enterprise's proprietary implementation of the Unix operating system, based on Unix System V (initially System III) and first released in 1984. Current versions support HPE Integrity Ser ...
), Apple's
macOS, and
Unix-like operating systems (such as
Linux and
FreeBSD
FreeBSD is a free and open-source Unix-like operating system descended from the Berkeley Software Distribution (BSD), which was based on Research Unix. The first version of FreeBSD was released in 1993. In 2005, FreeBSD was the most popular ...
). It is also available to operating systems such as Acorn
RISC OS,
AmigaOS, the
classic Mac OS
Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Macintosh family of personal computers by Apple Computer from 1984 to 2001, starting with System 1 and ending with Mac OS 9. The ...
,
OpenVMS
OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Ope ...
,
MS-DOS,
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
,
OS/2,
ArcaOS
ArcaOS is an operating system based on OS/2, developed and marketed by Arca Noae, LLC under license from IBM. It was codenamed Blue Lion during its development. It builds on OS/2 Warp 4.52 by adding support for new hardware, fixing defects and l ...
,
Novell NetWare,
and
IBM i
IBM i (the ''i'' standing for ''integrated'') is an operating system developed by IBM for IBM Power Systems. It was originally released in 1988 as OS/400, as the sole operating system of the IBM AS/400 line of systems. It was renamed to i5/OS in ...
.
Alternative remote file access protocols include the
Server Message Block (SMB, also termed CIFS),
Apple Filing Protocol (AFP),
NetWare Core Protocol
The NetWare Core Protocol (NCP) is a network protocol used in some products from Novell, Inc. It is usually associated with the client-server operating system Novell NetWare which originally supported primarily MS-DOS client stations, but later su ...
(NCP), and OS/400 File Server file system (QFileSvr.400).
SMB and
NetWare Core Protocol
The NetWare Core Protocol (NCP) is a network protocol used in some products from Novell, Inc. It is usually associated with the client-server operating system Novell NetWare which originally supported primarily MS-DOS client stations, but later su ...
(NCP) 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 IBM i 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 (the
client) needs access to data stored on another machine (the NFS
server
Server may refer to:
Computing
*Server (computing), a computer program or a device that provides functionality for other programs or devices, called clients
Role
* Waiting staff, those who work at a restaurant or a bar attending customers and su ...
):
# 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 the
exportfs
command.
# The server
security
Security is protection from, or resilience against, potential harm (or other unwanted coercive change) caused by others, by restraining the freedom of others to act. Beneficiaries (technically referents) of security may be of persons and social ...
-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
Firewall may refer to:
* Firewall (computing), a technological barrier designed to prevent unauthorized or unwanted communications between computer networks or hosts
* Firewall (construction), a barrier inside a building, designed to limit the spre ...
system.
# The client machine requests access to exported data, typically by issuing a
mount
command. (The client asks the server (rpcbind) which port the NFS server is using, the client connects to the NFS server (nfsd), nfsd passes the request to mountd)
# If all goes well, users on the client machine can then view and interact with mounted
filesystems on the server within the parameters permitted.
Note that automation of the NFS mounting process may take place — perhaps using
/etc/fstab
and/or
automounting facilities.
Protocol development
During the development of the ONC protocol (called
SunRPC at the time), only Apollo's
Network Computing System
The Network Computing System (NCS) was an implementation of the Network Computing Architecture (NCA). It was created at Apollo Computer in the 1980s. It comprised a set of tools for implementing distributed software applications, or distributed com ...
(NCS) 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
External Data Representation (XDR) is a standard data serialization format, for uses such as computer network protocols. It allows data to be transferred between different kinds of computer systems. Converting from the local representation to XD ...
(XDR) 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 (March 1987) in an (ultimately unsuccessful) 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 (OSF) in 1988. Ironically, Sun and AT&T had formerly competed over Sun's NFS versus AT&T's
Remote File System (RFS), 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
In computing, the Distributed Computing Environment (DCE) software system was developed in the early 1990s from the work of the Open Software Foundation (OSF), a consortium (founded in 1988) that included Apollo Computer (part of Hewlett-Packard fr ...
(DCE) and the
DCE Distributed File System (DFS) over Sun/ONC RPC and NFS. DFS used DCE as the RPC, and DFS derived from the
Andrew File System
The Andrew File System (AFS) is a distributed file system which uses a set of trusted servers to present a homogeneous, location-transparent file name space to all the client workstations. It was developed by Carnegie Mellon University as part of t ...
(AFS); DCE itself derived from a suite of technologies, including Apollo's NCS and
Kerberos.
1990s
Sun Microsystems and the
Internet Society (ISOC) reached an agreement to cede "change control" of ONC RPC so that the ISOC's engineering-standards body, the
Internet Engineering Task Force (IETF), could publish standards documents (RFCs) 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
The Generic Security Service Application Program Interface (GSSAPI, also GSS-API) is an application programming interface for programs to access security services.
The GSSAPI is an IETF standard that addresses the problem of many similar but inco ...
(GSSAPI),
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
Panasas is a data storage company that creates network-attached storage for technical computing environments.
History
Panasas is a computer data storage product company and is headquartered in San Jose, California. Panasas received seed funding ...
proposed an NFSv4.1 based on their ''Parallel NFS'' (pNFS) 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
See also
*
9P (protocol) – Plan 9 Filesystem Protocol
*
Alluxio
Alluxio is an open-source virtual distributed file system (VDFS). Initially as research project "Tachyon", Alluxio was created at the University of California, Berkeley's AMPLab as Haoyuan Li's Ph.D. Thesis,
advised by Professor Scott Shenker & ...
*
Andrew File System
The Andrew File System (AFS) is a distributed file system which uses a set of trusted servers to present a homogeneous, location-transparent file name space to all the client workstations. It was developed by Carnegie Mellon University as part of t ...
*
BeeGFS
BeeGFS (formerly FhGFS) is a parallel file system, developed and optimized for high-performance computing. BeeGFS includes a distributed metadata architecture for scalability and flexibility reasons. Its most used and widely known aspect is data ...
, the parallel file system
*
CacheFS CacheFS is the name used for several similar software technologies designed to speed up distributed file system file access for networked computers. These technologies operate by storing ( cached) copies of files on secondary memory, typically a loc ...
– a caching mechanism for Linux NFS clients
* Hadoop Distributed File System (
HDFS)
*
Kerberos (protocol)
Kerberos () is a computer-network authentication protocol that works on the basis of ''tickets'' to allow nodes communicating over a non-secure network to prove their identity to one another in a secure manner. Its designers aimed it primarily a ...
*
Network Information Service
*
Remote File System
*
Root squash
Unix security refers to the means of securing a Unix or Unix-like operating system. A secure environment is achieved not only by the design concepts of these operating systems, but also through vigilant user and administrative practices.
Design c ...
*
Samba (software)
Samba is a free software re-implementation of the SMB networking protocol, and was originally developed by Andrew Tridgell. Samba provides file and print services for various Microsoft Windows clients and can integrate with a Microsoft W ...
*
Secure Shell Filesystem
In computing, SSHFS (SSH Filesystem) is a filesystem client to mount and interact with directories and files located on a remote server or workstation over a normal ssh connection. The client interacts with the remote file system via the SSH ...
– mount a remote directory using only a ssh login on the remote computer
*
Server Message Block
*
Shared resource
*
TCP Wrapper
References
External links
*
RFCs:
** – Network File System (NFS) Version 4 Minor Version 1 Protocol
** – RPCSEC_GSS Version 2
** – NFS Version 4 Protocol Specification
** – WebNFS Specification
** – Sun/ISOC NFS Change Control Agreement
** – RPCSEC_GSS Specification
** – NFS Version 3 Protocol Specification
** – Sun/ISOC ONC RPC Change Control Agreement
** – NFS Version 2 Protocol Specification
* Various resources:
*
IETF: Network File System Version 4 (nfsv4) Charter*
Linux NFS Overview, FAQ and HOWTO Documents*
NFS operation explained with sequence diagrams
by Mike Eisler, October 27, 2006
{{DEFAULTSORT:Network File System (Protocol)
Internet protocols
Network file systems
Internet Protocol based network software
Unix network-related software
Application layer protocols
Network file transfer protocols
Distributed file systems
Network booting