Skip to main content

Importance of DFS; operations of SUNNFS

Short answer

A DFS provides shared, transparent, scalable file access, with Sun NFS using a VFS layer to redirect requests, NFS client/server over RPC with file handles, mounting, stateless servers, caching, and heterogeneity.

Discuss the importance of Distributed File System (DFS). Describe the operations of SUNNFS with its properties.

Importance of a DFS

  • Resource and data sharing: users on different machines share the same files and storage.
  • Transparency: one name space; location, access and replication hidden.
  • Cost saving: centralised storage and backup, diskless workstations.
  • Availability and reliability: replication of files, no single point of failure.
  • Mobility of users: the same files seen from any workstation.
  • Scalability: more servers can be added.
  • Central management: easy administration, backup and security.

Operations and properties of Sun NFS

SUN NFS (Network File System) is the most widely used distributed file service, developed by Sun Microsystems. It lets a client access remote files as if they were local, over an RPC based protocol that is independent of the operating system, hardware and network.

Architecture

 Client computer                      Server computer
 +----------------------------+       +----------------------------+
 | Application program        |       |                            |
 |------- system calls -------|       |                            |
 | UNIX kernel                |       | UNIX kernel                |
 |  Virtual file system (VFS) |       |  Virtual file system (VFS) |
 |     |               |      |       |      |               |     |
 |  Local UNIX       NFS      |  NFS  |    NFS          Local UNIX |
 |  file system      client <-+-------+->  server      file system |
 |                            | (RPC) |                            |
 +----------------------------+       +----------------------------+
  • Virtual file system (VFS): the layer in the kernel that tells whether a request is for a local file or a remote file and passes it to the UNIX file system or to the NFS client. It uses v-nodes (local files) and file handles (remote files).
  • NFS client: translates VFS operations into RPC requests to the server.
  • NFS server: receives requests, identifies the file by its file handle (file system id, i-node number, i-node generation number), and calls the local file system.
  • Mount service: a client mounts a remote directory into its local tree; the mount info is kept in /etc/exports at the server and in the client's mount table.
  • Automounter: mounts a remote directory on first use.

Operation

  1. The application issues a system call (for example read).
  2. The VFS finds that the file is remote and calls the NFS client.
  3. The NFS client sends an RPC (lookup, read, write, getattr, create, remove, mkdir, readdir...) over UDP/TCP using XDR encoding.
  4. The NFS server's VFS finds the local file by the file handle, runs the operation on the local file system and returns the result.
  5. The client caches the data (block cache) and attributes. Cache validity is checked by comparing timestamps with the server after a freshness interval (3 to 30 seconds for files, 30 to 60 seconds for directories).

Features / properties

  • Access and location transparency through mounting.
  • Stateless server: each request carries all information, so a crashed server restarts without recovery work; most operations are idempotent, so retries are safe.
  • Heterogeneity: works with any OS that implements the protocol.
  • Caching: read-ahead and delayed write for performance, with approximate (not strict one-copy) consistency.
  • Security: the original version trusted the user id sent in the RPC; later versions use Kerberos.
  • Limited replication and migration support.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Distributed System chapter 2 questions →