Case Study On Network File System
Case Study On Network File System
NFSv2
o 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.
o 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
o 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.
NFSv4
o 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. 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.
NFSv4.1
o 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.
NFSv4.2
o 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).
o 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
The main use of NFS in the home context, is to share out data on a central server (-
for example, your music collection) to all the PCs in the house. This way, you have
a single copy of data (-hopefully, well backed up) accessible from a central
location.
A network file system is a network abstraction over a file system that allows a
remote client to access it over a network in a similar way to a local file system.
Although not the first such system, NFS has grown and evolved into the most
powerful and widely used network file system in UNIX. NFS permits sharing of a
common file system among a multitude of users and provides the benefit of
centralizing data to minimize needed storage.
NFS follows the client-server model of computing (see Figure). The server
implements the shared file system and storage to which clients attach. The clients
implement the user interface to the shared file system, mounted within the client's
local file space. Figure. The client-server architecture of NFS
Within Linux, the virtual file system switch (VFS) provides the means to support
multiple file systems concurrently on a host (such as International Organization for
Standardization [ISO] 9660 on a CD-ROM and ext3fs on the local hard disk). The
VFS determines which storage a request is intended for, then which file system
must be used to satisfy the request. For this reason, NFS is a pluggable file system
just like any other. The only difference with NFS is that input/output (I/O) requests
may not be satisfied locally, instead having to traverse the network for completion.
Once a request is found to be destined for NFS, VFS passes it to the NFS instance
within the kernel. NFS interprets the I/O request and translates it into an NFS
procedure (OPEN, ACCESS, CREATE, READ, CLOSE, REMOVE, and so on).
Benefits of NFS
It uses standard client/server architecture for file sharing between all *nix
based machines.
With NFS it is not necessary that both machines run on the same OS.
No manual refresh needed for new files. Newer version of NFS also supports
acl, pseudo root mounts.
The operation of NFS is defined in the form of three main components that can be
viewed as logically residing at each of the three OSI model layers corresponding to
the TCP/IP application layer. These components are:
Remote Procedure Call (RPC): RPC is a generic session layer service used
to implement client/server internetworking functionality. It extends the
notion of a program calling a local procedure on a particular host computer,
to the calling of a procedure on a remote device across a network.
These three key “sub protocols” if you will, comprise the bulk of the NFS protocol.
Each is described in more detail in a separate topic of this section on NFS.
Architectural Components