Network File System: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Beepy (talk | contribs)
m Added reference to first NFS Version 4 paper.
Reverted 1 edit by 174.212.224.94 (talk): Unexplained content removal
(24 intermediate revisions by 18 users not shown)
Line 4: Line 4:
{{IPstack}}
{{IPstack}}


'''Network File System''' ('''NFS''') is a [[distributed file system]] protocol originally developed by [[Sun Microsystems]] (Sun) in 1984,<ref name="sun85">{{cite document |title=Design and Implementation of the Sun Network Filesystem |year=1985 |publisher=[[USENIX]] |author1=Russel Sandberg |author2=David Goldberg |author3=Steve Kleiman |author4=Dan Walsh |author5=Bob Lyon |citeseerx = 10.1.1.14.473}}</ref> 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]] (ONC RPC) system. NFS is an open IETF standard defined in a [[Request for Comments]] (RFC), allowing anyone to implement the protocol.
'''Network File System''' ('''NFS''') is a [[distributed file system]] protocol originally developed by [[Sun Microsystems]] (Sun) in 1984,<ref name="sun85">{{cite CiteSeerX |title=Design and Implementation of the Sun Network Filesystem |year=1985 |author1=Russel Sandberg |author2=David Goldberg |author3=Steve Kleiman |author4=Dan Walsh |author5=Bob Lyon |citeseerx = 10.1.1.14.473}}</ref> 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]] (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 ==
== Versions and variations ==
Sun used version&nbsp;1 only for in-house experimental purposes. When the development team added substantial changes to NFS version&nbsp;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.<ref>''NFS Illustrated'' (2000) by Brent Callaghan - {{ISBN|0-201-32570-5}}</ref><ref name="NFSforVMS"/>
Sun used version&nbsp;1 only for in-house experimental purposes. When the development team added substantial changes to NFS version&nbsp;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.<ref>''NFS Illustrated'' (2000) by Brent Callaghan {{ISBN|0-201-32570-5}}</ref><ref name="NFSforVMS"/>


===NFSv2===
===NFSv2===
Line 28: Line 28:


====WebNFS====
====WebNFS====
{{Main|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 [[List of TCP and UDP port numbers|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.
[[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 [[List of TCP and UDP port numbers|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===
===NFSv4===
Version&nbsp;4 (RFC 3010, December 2000; revised in RFC 3530, April 2003 and again in RFC 7530, March 2015), influenced by [[Andrew File System]] (AFS) and [[Server Message Block]] (SMB, also termed CIFS), includes performance improvements, mandates strong security, and introduces a [[State (computer science)|stateful]] protocol.<ref>{{cite web|url=http://www.usenix.org/events/usenix05/tech/italks.html#nFSv4|title=NFS Version 4|date=2005-04-14|publisher=[[USENIX]]}}</ref><ref name="sane2000">{{cite web |url= http://www.sane.nl/events/sane2000/papers/pawlowski.pdf |title=The NFS Version&nbsp;4 Protocol |year=2000 |publisher=[[SANE]] |author1=Brian Pawlowski |author2=Spencer Shepler |author3=Carl Beame |author4=Brent Callaghan |author5=Michael Eisler |author6=David Noveck |author7=David Robinson |author8=Robert Thurlow }}</ref> Version 4 became the first version developed with the [[Internet Engineering Task Force]] (IETF) after [[Sun Microsystems]] handed over the development of the NFS protocols.
Version&nbsp;4 (RFC 3010, December 2000; revised in RFC 3530, April 2003 and again in RFC 7530, March 2015), influenced by [[Andrew File System]] (AFS) and [[Server Message Block]] (SMB, also termed CIFS), includes performance improvements, mandates strong security, and introduces a [[State (computer science)|stateful]] protocol.<ref>{{cite web|url=http://www.usenix.org/events/usenix05/tech/italks.html#nFSv4|title=NFS Version 4|date=2005-04-14|publisher=[[USENIX]]}}</ref><ref name="sane2000">{{cite web |url= http://www.sane.nl/events/sane2000/papers/pawlowski.pdf |title=The NFS Version&nbsp;4 Protocol |year=2000 |publisher=[[System Administration and Network Engineering|SANE]] |author1=Brian Pawlowski |author2=Spencer Shepler |author3=Carl Beame |author4=Brent Callaghan |author5=Michael Eisler |author6=David Noveck |author7=David Robinson |author8=Robert Thurlow }}</ref> Version 4 became the first version developed with the [[Internet Engineering Task Force]] (IETF) after [[Sun Microsystems]] handed over the development of the NFS protocols.


NFS version&nbsp;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&nbsp;4.1 includes Session trunking mechanism (Also known as NFS Multipathing) and available in some enterprise solutions as [[VMware ESXi]].
NFS version&nbsp;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&nbsp;4.1 includes Session trunking mechanism (Also known as NFS Multipathing) and available in some enterprise solutions as [[VMware ESXi]].


NFS version&nbsp;4.2 (RFC 7862) was published in November 2016<ref>{{cite web
NFS version&nbsp;4.2 (RFC 7862) was published in November 2016<ref>{{cite ietf
| url = https://tools.ietf.org/html/rfc7862
| url = https://tools.ietf.org/html/rfc7862
| title = NFS Version 4 Minor Version 2
| title = NFS Version 4 Minor Version 2
| first = Thomas | last = Haynes
| first = Thomas | last = Haynes
| date = 2016-11-01
| date = 2016-11-01
| doi = 10.17487/RFC7862
}}</ref> 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).
| doi-access = free
}}</ref> 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.
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.
Line 50: Line 53:
* the byte-range advisory Network Lock Manager (NLM) protocol (added to support [[UNIX System V]] [[file locking]] APIs)
* 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
* the remote quota-reporting (RQUOTAD) 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]] (RDMA) as a transport<ref>{{cite web|url= http://www.connectathon.org/talks06/talpey-cthon06-nfs-rdma.pdf|title= NFS/RDMA Implementation(s) Update|author= Tom Talpey|publisher= Network Appliance, Inc.|date= February 28, 2006|url-status= dead|archive-url= https://web.archive.org/web/20110512180716/http://www.connectathon.org/talks06/talpey-cthon06-nfs-rdma.pdf|archive-date= May 12, 2011}}</ref><ref>{{cite web|url= http://www.usenix.org/events/fast02/wips/callaghan.pdf|title= NFS over RDMA|author= Brent Callaghan|publisher= Sun Microsystems|date= January 28, 2002}}</ref>
* [[NFS over RDMA]], an adaptation of NFS that uses [[remote direct memory access]] (RDMA) as a transport<ref>{{cite web|url= http://www.connectathon.org/talks06/talpey-cthon06-nfs-rdma.pdf|title= NFS/RDMA Implementation(s) Update|author= Tom Talpey|publisher= Network Appliance, Inc.|date= February 28, 2006|archive-url= https://web.archive.org/web/20110512180716/http://www.connectathon.org/talks06/talpey-cthon06-nfs-rdma.pdf|archive-date= May 12, 2011}}</ref><ref>{{cite web|url= http://www.usenix.org/events/fast02/wips/callaghan.pdf|title= NFS over RDMA|author= Brent Callaghan|publisher= Sun Microsystems|date= January 28, 2002}}</ref>
* NFS-Ganesha, an NFS server, running in user-space and supporting various file systems like [[GPFS|GPFS/Spectrum Scale]], CephFS via respective FSAL (File System Abstraction Layer) modules. The [[Ceph (software)|CephFS]] FSAL supported using libcephfs<ref>
* NFS-Ganesha, an NFS server, running in user-space and supporting various file systems like [[GPFS|GPFS/Spectrum Scale]], CephFS via respective FSAL (File System Abstraction Layer) modules. The [[Ceph (software)|CephFS]] FSAL supported using libcephfs<ref>
{{cite book
{{cite book
Line 62: Line 65:
| date = 2016
| date = 2016
| page = 110
| page = 110
| isbn = 9781784397364
| isbn = 978-1-78439-736-4
| access-date = 2017-03-21
| access-date = 2017-03-21
| quote = NFS-Ganesha is an NFS server that runs in user space and supports the CephFS FSAL (File System Abstraction Layer) using libcephfs.
| quote = NFS-Ganesha is an NFS server that runs in user space and supports the CephFS FSAL (File System Abstraction Layer) using libcephfs.
Line 68: Line 71:
</ref>
</ref>


*Trusted NFS (TNFS)<ref>{{cite web|url=https://tools.ietf.org/html/draft-ietf-tnfs-spec-01.html|title=A Specification of Trusted NFS (TNFS) Protocol Extensions|first=Fred|last=Glover <fglover@zk3.dec.com>|website=tools.ietf.org}}</ref>
*Trusted NFS (TNFS)<ref>{{cite news|url=https://tools.ietf.org/html/draft-ietf-tnfs-spec-01.html|title=A Specification of Trusted NFS (TNFS) Protocol Extensions|first=Fred|last=Glover <fglover@zk3.dec.com>|newspaper=Ietf Datatracker}}</ref>


== Platforms ==
== Platforms ==


NFS is often used with [[Unix]] operating systems (such as [[Solaris (operating system)|Solaris]], [[AIX]], [[HP-UX]]), Apple's [[macOS]], and [[Unix-like]] operating systems (such as [[Linux]] and [[FreeBSD]]). It is also available to operating systems such as Acorn [[RISC OS]],<ref name="Sunfish/Moonfish by Alex Waugh">{{Cite web|url=http://www.cp15.org/networking/|title = Networking related programs}}</ref> [[AmigaOS]], the [[classic Mac OS]], [[OpenVMS]],<ref name="NFSforVMS">{{cite web|title=HP TCP/IP Services for OpenVMS Management|url=http://h41379.www4.hpe.com/doc/83final/6526/6526pro_052.html|website=h41379.www4.hpe.com|publisher=HP|access-date=24 September 2016}}</ref> [[MS-DOS]],<ref name="PCNFS">{{cite web|title=Other Software by SUN Microsystems|url=http://www.computinghistory.org.uk/det/12549/PC-NFS%20version%205.0/|website=www.computinghistory.org.uk|publisher=The Centre for Computing History|access-date=24 September 2016}}</ref> [[Microsoft Windows]],<ref name="SFU">{{cite web|title=Introduction to Microsoft Windows Services for UNIX 3.5|url=https://technet.microsoft.com/en-us/library/bb463212.aspx|website=technet.microsoft.com|publisher=Microsoft|access-date=24 September 2016}}</ref> [[OS/2]],<ref>{{cite web|url=https://ecsoft2.org/network-file-system-nfs-plugin-netdrive|access-date=2020-09-22|website=ecsoft2.org|title=NTFS plugin for NetDrive}}</ref> [[ArcaOS]],<ref>{{cite web|url=https://www.arcanoae.com/shop/netdrive-for-os2/|title=NetDrive for OS/2|access-date=2020-09-22|website=arcanoae.com}}</ref> [[Novell NetWare]],<ref name="NFSforNetWare">{{cite web|title=NFS Gateway for NetWare 6.5|url=https://www.novell.com/products/openenterpriseserver/features/nfs-gateway-for-netware65.html|website=www.novell.com|publisher=Novell|access-date=24 September 2016}}</ref> and [[IBM i]].<ref name="OS/400-NFS">{{cite web|title=OS/400 Network File System Support|url=http://publib.boulder.ibm.com/html/as400/v5r1/ic2911/books/c4157141.pdf|website=publib.boulder.ibm.com|publisher=IBM|access-date=24 September 2016}}{{Dead link|date=August 2018 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> Alternative remote file access protocols include the [[Server Message Block]] (SMB, also termed CIFS), [[Apple Filing Protocol]] (AFP), [[NetWare Core Protocol]] (NCP), and OS/400 File Server file system (QFileSvr.400).
NFS is often used with [[Unix]] operating systems (such as [[Solaris (operating system)|Solaris]], [[AIX]], [[HP-UX]]), Apple's [[macOS]], and [[Unix-like]] operating systems (such as [[Linux]] and [[FreeBSD]]). It is also available to operating systems such as Acorn [[RISC OS]],<ref name="Sunfish/Moonfish by Alex Waugh">{{Cite web|url=http://www.cp15.org/networking/|title = Networking related programs}}</ref> [[AmigaOS]], the [[classic Mac OS]], [[OpenVMS]],<ref name="NFSforVMS">{{cite web|title=HP TCP/IP Services for OpenVMS Management|url=http://h41379.www4.hpe.com/doc/83final/6526/6526pro_052.html|website=h41379.www4.hpe.com|publisher=HP|access-date=24 September 2016}}</ref> [[MS-DOS]],<ref name="PCNFS">{{cite web|title=Other Software by SUN Microsystems|url=http://www.computinghistory.org.uk/det/12549/PC-NFS%20version%205.0/|website=www.computinghistory.org.uk|publisher=The Centre for Computing History|access-date=24 September 2016}}</ref> [[Microsoft Windows]],<ref name="SFU">{{cite web|title=Introduction to Microsoft Windows Services for UNIX 3.5|url=https://technet.microsoft.com/en-us/library/bb463212.aspx|website=technet.microsoft.com|date=5 December 2007 |publisher=Microsoft|access-date=24 September 2016}}</ref> [[OS/2]],<ref>{{cite web|url=https://ecsoft2.org/network-file-system-nfs-plugin-netdrive|access-date=2020-09-22|website=ecsoft2.org|title=NTFS plugin for NetDrive}}</ref> [[ArcaOS]],<ref>{{cite web|url=https://www.arcanoae.com/shop/netdrive-for-os2/|title=NetDrive for OS/2|access-date=2020-09-22|website=arcanoae.com}}</ref> [[Novell NetWare]],<ref name="NFSforNetWare">{{cite web|title=NFS Gateway for NetWare 6.5|url=https://www.novell.com/products/openenterpriseserver/features/nfs-gateway-for-netware65.html|website=www.novell.com|publisher=Novell|access-date=24 September 2016}}</ref> and [[IBM i]].<ref name="OS/400-NFS">{{cite web|title=OS/400 Network File System Support|url=http://publib.boulder.ibm.com/html/as400/v5r1/ic2911/books/c4157141.pdf|website=publib.boulder.ibm.com|publisher=IBM|access-date=24 September 2016}}{{Dead link|date=August 2018 |bot=InternetArchiveBot |fix-attempted=yes }}</ref> Alternative remote file access protocols include the [[Server Message Block]] (SMB, also termed CIFS), [[Apple Filing Protocol]] (AFP), [[NetWare Core Protocol]] (NCP), and OS/400 File Server file system (QFileSvr.400).


SMB and [[NetWare Core Protocol]] (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 (operating system)|Haiku]] in 2012 added NFSv4 support as part of a Google Summer of Code project.
SMB and [[NetWare Core Protocol]] (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 (operating system)|Haiku]] in 2012 added NFSv4 support as part of a Google Summer of Code project.
Line 104: Line 107:
| access-date = 2019-07-16
| access-date = 2019-07-16
}}</ref> 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.
}}</ref> 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.<ref>{{Cite web |title= What is Connectathon? |website= Original Connectathon.Org web site |url= http://www.connectathon.org/ |url-status=dead |archive-url= https://web.archive.org/web/19990128152940/http://www.connectathon.org/#whatis |archive-date= January 28, 1999}}</ref> OSF adopted the [[Distributed Computing Environment]] (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]] (AFS); DCE itself derived from a suite of technologies, including Apollo's NCS and [[Kerberos (protocol)|Kerberos]].{{citation needed|date=January 2014}}
NFS [[interoperability]] was aided by events called "Connectathons" starting in 1986 that allowed vendor-neutral testing of implementations with each other.<ref>{{Cite web |title= What is Connectathon? |website= Original Connectathon.Org web site |url= http://www.connectathon.org/ |archive-url= https://web.archive.org/web/19990128152940/http://www.connectathon.org/#whatis |archive-date= January 28, 1999}}</ref> OSF adopted the [[Distributed Computing Environment]] (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]] (AFS); DCE itself derived from a suite of technologies, including Apollo's NCS and [[Kerberos (protocol)|Kerberos]].{{citation needed|date=January 2014}}


=== 1990s ===
=== 1990s ===
Line 132: Line 135:
{{Div col|colwidth=30em}}
{{Div col|colwidth=30em}}


* [[9P (protocol)]] - Plan 9 Filesystem Protocol
* [[9P (protocol)]] Plan 9 Filesystem Protocol
* [[Alluxio]]
* [[Alluxio]]
* [[Andrew File System]]
* [[Andrew File System]]
* [[BeeGFS]], the parallel file system
* [[BeeGFS]], the parallel file system
* [[CacheFS]] - a caching mechanism for Linux NFS clients
* [[CacheFS]] a caching mechanism for Linux NFS clients
* Hadoop Distributed File System ([[HDFS]])
* Hadoop Distributed File System ([[HDFS]])
* [[Kerberos (protocol)]]
* [[Kerberos (protocol)]]
Line 143: Line 146:
* [[Root squash]]
* [[Root squash]]
* [[Samba (software)]]
* [[Samba (software)]]
* [[Secure Shell Filesystem]] - mount a remote directory using only a ssh login on the remote computer
* [[Secure Shell Filesystem]] mount a remote directory using only a ssh login on the remote computer
* [[Server Message Block]]
* [[Server Message Block]]
* [[Shared resource]]
* [[Shared resource]]
Line 156: Line 159:
{{colbegin}}
{{colbegin}}
* [[Request for Comments|RFCs]]:
* [[Request for Comments|RFCs]]:
** {{IETF RFC|5661|link=no}} - Network File System (NFS) Version 4 Minor Version 1 Protocol
** {{IETF RFC|8881|link=no}} NFS Version 4.1 Protocol Specification
** {{IETF RFC|5403|link=no}} - RPCSEC_GSS Version 2
** {{IETF RFC|8434|link=no}} – Parallel NFS - Flexible File Layout Specification
** {{IETF RFC|3530|link=no}} - NFS Version 4 Protocol Specification
** {{IETF RFC|8276|link=no}} Xattrs extension for NFSv4
** {{IETF RFC|2054|link=no}} - WebNFS Specification
** {{IETF RFC|8275|link=no}} Umask attribute extension for NFS Version 4.2
** {{IETF RFC|2339|link=no}} - Sun/ISOC NFS Change Control Agreement
** {{IETF RFC|8154|link=no}} Parallel NFS - SCSI Layout Specification
** {{IETF RFC|2203|link=no}} - RPCSEC_GSS Specification
** {{IETF RFC|7863|link=no}} NFS Version 4.2 Protocol XDR Description
** {{IETF RFC|1813|link=no}} - NFS Version 3 Protocol Specification
** {{IETF RFC|7862|link=no}} NFS Version 4.2 Protocol Specification
** {{IETF RFC|1790|link=no}} - Sun/ISOC ONC RPC Change Control Agreement
** {{IETF RFC|7531|link=no}} NFS Version 4 Protocol XDR Description
** {{IETF RFC|1094|link=no}} - NFS Version 2 Protocol Specification
** {{IETF RFC|7530|link=no}} NFS Version 4 Protocol Specification
** {{IETF RFC|5664|link=no}} – Parallel NFS - Object-Based Operations Specification
** {{IETF RFC|5663|link=no}} – Parallel NFS - Block/Volume Layout Specification
** {{IETF RFC|5662|link=no}} – NFS Version 4.1 Protocol XDR Description
** {{IETF RFC|5661|link=no}} – NFS Version 4.1 Protocol Specification (obsoleted by RFC 8881)
** {{IETF RFC|5403|link=no}} – RPCSEC_GSS Version 2
** {{IETF RFC|3530|link=no}} – NFS Version 4 Protocol Specification (obsoleted by RFC 7530 and RFC 7531)
** {{IETF RFC|3010|link=no}} – NFS Version 4 Protocol Specification (obsoleted by RFC 3530)
** {{IETF RFC|2339|link=no}} – Sun/ISOC NFS Change Control Agreement
** {{IETF RFC|2224|link=no}} – NFS URL Scheme Specification
** {{IETF RFC|2203|link=no}} – RPCSEC_GSS Specification
** {{IETF RFC|2055|link=no}} – WebNFS Server Specification
** {{IETF RFC|2054|link=no}} – WebNFS Client Specification
** {{IETF RFC|1813|link=no}} – NFS Version 3 Protocol Specification
** {{IETF RFC|1790|link=no}} – Sun/ISOC ONC RPC Change Control Agreement
** {{IETF RFC|1094|link=no}} – NFS Version 2 Protocol Specification
* Open Group Technical Standards:
** [https://archive.opengroup.org/publications/archive/CDROM/c702.pdf Protocols for Interworking: XNFS, Version 3W] – Open Group specification of NFS2, NFS3 and side-band protocols MNT, NSM and NLM for file locking which are not covered by RFC documents
* Various resources:
* Various resources:
** [https://web.archive.org/web/20080216083308/http://www.ietf.org/html.charters/nfsv4-charter.html IETF: Network File System Version 4 (nfsv4) Charter]
** [https://web.archive.org/web/20080216083308/http://www.ietf.org/html.charters/nfsv4-charter.html IETF: Network File System Version 4 (nfsv4) Charter]

Revision as of 22:06, 1 May 2024

Network File System (NFS) is a distributed file system protocol originally developed by Sun Microsystems (Sun) in 1984,[1] 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 (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.[2][3]

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, Bob Lyon, Bill Joy, Steve Kleiman, and others.[1][4]

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.[4] NFSv2 only allows the first 2 GB of a file to be read due to 32-bit 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[5] 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.[6] 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 to support their newly released 64-bit RISC processor, the Alpha 21064. At the time of introduction of Version 3, vendor support for TCP 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 (AFS) and Server Message Block (SMB, also termed CIFS), includes performance improvements, mandates strong security, and introduces a stateful protocol.[7][8] Version 4 became the first version developed with the Internet Engineering Task Force (IETF) after Sun Microsystems 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[9] 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.[10]

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, an adaptation of NFS that uses remote direct memory access (RDMA) as a transport[11][12]
  • 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 FSAL supported using libcephfs[13]
  • Trusted NFS (TNFS)[14]

Platforms

NFS is often used with Unix operating systems (such as Solaris, AIX, HP-UX), Apple's macOS, and Unix-like operating systems (such as Linux and FreeBSD). It is also available to operating systems such as Acorn RISC OS,[15] AmigaOS, the classic Mac OS, OpenVMS,[3] MS-DOS,[16] Microsoft Windows,[17] OS/2,[18] ArcaOS,[19] Novell NetWare,[20] and IBM i.[21] Alternative remote file access protocols include the Server Message Block (SMB, also termed CIFS), Apple Filing Protocol (AFP), NetWare Core Protocol (NCP), and OS/400 File Server file system (QFileSvr.400).

SMB and NetWare Core Protocol (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.

NFS SPECsfs2008 performance comparison, as of 22 November 2013

Typical implementation

Assuming a Unix-style scenario in which one machine (the client) needs access to data stored on another machine (the NFS server):

  1. The server implements NFS daemon processes, running by default as nfsd, to make its data generically available to clients.
  2. 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.
  3. The server security-administration ensures that it can recognize and approve validated clients.
  4. The server network configuration ensures that appropriate clients can negotiate with it through any firewall system.
  5. 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)
  6. 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 (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 (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.[22] 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.[23] OSF adopted the Distributed Computing Environment (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 (AFS); DCE itself derived from a suite of technologies, including Apollo's NCS and Kerberos.[citation needed]

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 (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 proposed an NFSv4.1 based on their Parallel NFS (pNFS) technology claiming to improve data-access parallelism[24] 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:

See also

References

  1. ^ a b Russel Sandberg; David Goldberg; Steve Kleiman; Dan Walsh; Bob Lyon (1985). "Design and Implementation of the Sun Network Filesystem". CiteSeerX 10.1.1.14.473.
  2. ^ NFS Illustrated (2000) by Brent Callaghan – ISBN 0-201-32570-5
  3. ^ a b "HP TCP/IP Services for OpenVMS Management". h41379.www4.hpe.com. HP. Retrieved 24 September 2016.
  4. ^ a b Russel Sandberg. "The Sun Network Filesystem: Design, Implementation and Experience" (PDF). Technical Report. Sun Microsystems.
  5. ^ Arpaci-Dusseau, Remzi; Arpaci-Dusseau, Andrea (March 2015). Operating Systems: Three Easy Pieces (PDF) (.9 ed.). Arpaci-Dusseau Books. p. 5. Retrieved 8 November 2017.
  6. ^ Brian Pawlowski; Chet Juszczak; Peter Staubach; Carl Smith; Diane Lebel; David Hitz (1994). "NFS Version 3 Design and Implementation". USENIX.
  7. ^ "NFS Version 4". USENIX. 2005-04-14.
  8. ^ Brian Pawlowski; Spencer Shepler; Carl Beame; Brent Callaghan; Michael Eisler; David Noveck; David Robinson; Robert Thurlow (2000). "The NFS Version 4 Protocol" (PDF). SANE.
  9. ^ Haynes, Thomas (2016-11-01). NFS Version 4 Minor Version 2. doi:10.17487/RFC7862.
  10. ^ yanfs.dev.java.net[permanent dead link]
  11. ^ Tom Talpey (February 28, 2006). "NFS/RDMA Implementation(s) Update" (PDF). Network Appliance, Inc. Archived from the original (PDF) on May 12, 2011.
  12. ^ Brent Callaghan (January 28, 2002). "NFS over RDMA" (PDF). Sun Microsystems.
  13. ^ Singh, Karan (2016). "4: Working with the Ceph Filesystem". Ceph Cookbook. Birmingham: Packt Publishing Ltd. p. 110. ISBN 978-1-78439-736-4. Retrieved 2017-03-21. NFS-Ganesha is an NFS server that runs in user space and supports the CephFS FSAL (File System Abstraction Layer) using libcephfs.
  14. ^ Glover <fglover@zk3.dec.com>, Fred. "A Specification of Trusted NFS (TNFS) Protocol Extensions". Ietf Datatracker.{{cite news}}: CS1 maint: numeric names: authors list (link)
  15. ^ "Networking related programs".
  16. ^ "Other Software by SUN Microsystems". www.computinghistory.org.uk. The Centre for Computing History. Retrieved 24 September 2016.
  17. ^ "Introduction to Microsoft Windows Services for UNIX 3.5". technet.microsoft.com. Microsoft. 5 December 2007. Retrieved 24 September 2016.
  18. ^ "NTFS plugin for NetDrive". ecsoft2.org. Retrieved 2020-09-22.
  19. ^ "NetDrive for OS/2". arcanoae.com. Retrieved 2020-09-22.
  20. ^ "NFS Gateway for NetWare 6.5". www.novell.com. Novell. Retrieved 24 September 2016.
  21. ^ "OS/400 Network File System Support" (PDF). publib.boulder.ibm.com. IBM. Retrieved 24 September 2016.[permanent dead link]
  22. ^ Carole Patton (1987-10-26). "AT&T to License Sun Microsystems' SPARC Chip". InfoWorld. p. 37. Retrieved 2019-07-16.
  23. ^ "What is Connectathon?". Original Connectathon.Org web site. Archived from the original on January 28, 1999.
  24. ^ "pNFS". Panasas. Retrieved August 4, 2013.

External links

  • RFCs:
    • RFC 8881 – NFS Version 4.1 Protocol Specification
    • RFC 8434 – Parallel NFS - Flexible File Layout Specification
    • RFC 8276 – Xattrs extension for NFSv4
    • RFC 8275 – Umask attribute extension for NFS Version 4.2
    • RFC 8154 – Parallel NFS - SCSI Layout Specification
    • RFC 7863 – NFS Version 4.2 Protocol XDR Description
    • RFC 7862 – NFS Version 4.2 Protocol Specification
    • RFC 7531 – NFS Version 4 Protocol XDR Description
    • RFC 7530 – NFS Version 4 Protocol Specification
    • RFC 5664 – Parallel NFS - Object-Based Operations Specification
    • RFC 5663 – Parallel NFS - Block/Volume Layout Specification
    • RFC 5662 – NFS Version 4.1 Protocol XDR Description
    • RFC 5661 – NFS Version 4.1 Protocol Specification (obsoleted by RFC 8881)
    • RFC 5403 – RPCSEC_GSS Version 2
    • RFC 3530 – NFS Version 4 Protocol Specification (obsoleted by RFC 7530 and RFC 7531)
    • RFC 3010 – NFS Version 4 Protocol Specification (obsoleted by RFC 3530)
    • RFC 2339 – Sun/ISOC NFS Change Control Agreement
    • RFC 2224 – NFS URL Scheme Specification
    • RFC 2203 – RPCSEC_GSS Specification
    • RFC 2055 – WebNFS Server Specification
    • RFC 2054 – WebNFS Client Specification
    • RFC 1813 – NFS Version 3 Protocol Specification
    • RFC 1790 – Sun/ISOC ONC RPC Change Control Agreement
    • RFC 1094 – NFS Version 2 Protocol Specification
  • Open Group Technical Standards:
  • Various resources:
  • Review of "Why NFS Sucks" Paper from the 2006 Linux Symposium by Mike Eisler, October 27, 2006