×

Search anything:

Network File System

Free book on Graph Algorithms

Get this book -> Problems on Array: For Interviews and Competitive Programming

In this article, we will learn an important concept in network, that is Network File System. So lets get started.

Table of contents


  1. File System
  2. Network File System
  3. Architecture of Network File System
  4. Structure of Network File System
  5. NFS Protocol
  6. Advantages Of Network File System

To understand, what is network file system. Let us first understand what is a File System?

File System


  • A file system is the mechanism in which files are named and where they are placed logically for fetching and storage.
  • Different OS have file systems in which files are allocated somewhere in a tree structure.

Network File System


  • The Network File System is a way of putting data on a network.
  • It is a distributed file system protocol initially produced by Sun Microsystems.
  • It allows users to fetch files and folders stored on remote computers and treat those files and folders like they are local.

Architecture of Network File System


  • The NFS architecture consists of various entities like Clients, file server, disk.
  • The connection between Clients and File server is possible due to RPC.
  • RPC stands for Remote Procedure Call, it is a famous protocol in which a program can make use of it and request service from another program which resides on different computer without understanding its network details.
  • File server consists of a Local File server inside it which is connected to a disk where all the data is stored.

NFSArchitecture

Structure of Network File System


  • NFS works as a client-server application.
  • RPC is used as communication medium.
  • It separates the remote file access services and the services provided by the mount mechanism.
  • Two different protocols are used in this system
    • one protocol for mounting.
    • one protocol for performing file operations.
  • External Data Representation is used by RPC routines to code data sent across the network in a way that is independent of the memory architecture
  • Network data is sent using UDP in NFS v2. NFS v3 also allows the use of TCP.
  • Any available stream can be used to run the NFS protocol.
  • A big barrier for NFS running UDP on an Ethernet is that the Ethernet data size limits of 1500 bytes that force the packets to be fragmented at the IP level.

NFS Protocol


  • The NFS Protocol is considered as stateless.
  • The server does not need any additional information beyond that contained in the RPC to fulfill the request.
  • In practice the server caches recently accessed file data.
  • The benefit of the stateless protocol is that there is no need to do state recovery after a client or server crash.
  • Stateless protocol also has some disadvantages: In a local file system, the last reference of unlinked file will be available until it is closed.

Advantages Of Network File System


  • Same files can be utilized by many users concurrently, which permits everybody on the network to use the same data, accessing it on remote hosts as if it were operating local files.
  • The need of local disk space is reduced as computers share programs which eventually diminishes storage costs.
  • All users can make use of the same files, so available data is latest, which is coherent and authentic.
  • The information regarding mounting the file system is shown to all users.
  • Administrative overhead is reduced as data is available centrally.

Applications of Network File System


  • The primary application of NFS are to exchange or set up directories to other machines, either on or off a local network. These directories can then be used as if they were local.
  • It can be used on various operating systems for instance with Linux and Unix OS as well as on MacOS.
  • It is genrally used in companies who wishes to place their data on a network rather than keeping it in offline databases.

With this article at OpenGenus, you must have the complete idea of Network File System.

Network File System
Share this