---
title: "Operations of a modern DFS"
subject: "Distributed System"
chapter: 2
key: "semester_7/distributed_system:dfs-modern-operations"
source: https://www.bctengineer.com/q/semester_7/distributed_system/dfs-modern-operations
site: BCT Engineering
---

# Operations of a modern DFS

Distributed System · Chapter 2: Distributed Objects and File System

- Asked in: 2076 Chaitra, 2+7 marks
- Video: [Distributed File System in Distributed Computing in Hindi](https://www.youtube.com/watch?v=Xhi3hqbiXNM) — Perfect Computer Engineer
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/distributed_system/dfs-modern-operations
- Whole chapter: https://www.bctengineer.com/md/semester_7/distributed_system/chapter-2

## Question

What is distributed file system? Explain the principle operations of any one modern distributed file system.

## Short answer

A distributed file system stores files on servers and provides transparent access. Sun NFS uses RPC with operations like lookup, read, write, create, remove, mkdir, and readdir, identified by file handles. It is stateless, ensuring idempotent operations and easy crash recovery.

## Answer

#### Distributed file system
A **distributed file system (DFS)** stores files on servers across a network and lets clients access and share them as if they were local, with transparency, consistency and security.

#### Principal operations of a modern DFS: Sun NFS
Sun NFS is the most widely used DFS. It follows a client-server model, with a virtual file system layer and RPC.

```text
 Client                     Server
 App -> VFS -> NFS client ==RPC==> NFS server -> VFS -> local FS
```

**Principal operations (NFS server interface, via RPC)**
- `lookup(dirfh, name)`: returns the file handle and attributes.
- `read(fh, offset, count)` and `write(fh, offset, count, data)`.
- `create`, `remove`, `rename`, `link`, `symlink`.
- `mkdir`, `rmdir`, `readdir`.
- `getattr(fh)`, `setattr(fh, attr)`; `statfs`.

**How an operation works**
1. First, a remote directory is attached to the local file tree by the **mount** service.
2. The application makes a file system call (open/read).
3. The VFS decides whether the file is local or remote using the v-node; remote requests go to the NFS client.
4. The client sends an RPC with the **file handle** (file system id, i-node number, generation number) to the NFS server.
5. The server's VFS maps the handle to the local file and executes the operation, returning data and attributes.
6. The client caches blocks and attributes and treats them as valid for a short interval, checking timestamps with the server.

**Properties:** stateless server (idempotent operations, easy crash recovery), access and location transparency, caching with approximate consistency, support for heterogeneous systems, and security by user id or Kerberos.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is a distributed file system?
   A. A system storing files on servers across a network that lets clients access and share them as if they were local
   B. A file system that stores all files on the client
   C. A database that only holds directory names
   D. A protocol that only encrypts files
   Answer: A. A DFS provides transparent access and sharing of remote files. (Key point: DFS definition)

2. Which NFS operation returns a file handle and attributes for a name in a directory?
   A. lookup(dirfh, name)
   B. read(fh, offset, count)
   C. mkdir
   D. statfs
   Answer: A. lookup resolves a name in a directory to a file handle plus attributes. (Key point: NFS operations)

3. How does the VFS decide to send a call to the NFS client?
   A. It checks the file extension
   B. It uses the v-node to see the file is remote
   C. It asks the user
   D. It always sends calls remote first
   Answer: B. Remote files go to the NFS client; local ones go to the local file system. (Key point: Local or remote)

4. How is a remote directory attached to the local tree?
   A. By the lookup operation
   B. By the automatic file handle generation
   C. By the mount service
   D. By the cache validation
   Answer: C. Mounting gives access and location transparency. (Key point: Mount service)

## Related in Distributed System

- [Importance of DFS; operations of SUNNFS](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Adfs-importance-sunnfs) — Distributed System, chapter 2
- [DFS requirements and file service architecture](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Adfs-requirements-architecture) — Distributed System, chapter 2
- [DFS architecture and storage sharing](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Adfs-architecture-sharing) — Distributed System, chapter 2, asked 4×
- [Requirements of a DFS](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Adfs-requirements) — Distributed System, chapter 2
- [Autonomous vs distributed system](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Aautonomous-vs-distributed) — Distributed System, chapter 1
- [Models of distributed system](https://www.bctengineer.com/question.md?key=semester_7%2Fdistributed_system%3Amodels-of-ds) — Distributed System, chapter 1

## Related in other subjects

- [File I/O operations, errors, random access](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Afile-io-errors-random-access) — Computer Programming, chapter 10
- [Chain survey principle and operations](https://www.bctengineer.com/question.md?key=semester_3%2Fsurveying_i%3Achain-principle-and-field-procedure) — Surveying I, chapter 3, asked 2×
- [Copy contents of one file to another](https://www.bctengineer.com/question.md?key=semester_1%2Fcomputer_programming%3Afile-copy-contents) — Computer Programming, chapter 10, asked 2×
- [LTI system and closed loop in modern systems](https://www.bctengineer.com/question.md?key=semester_3%2Fcontrol_systems%3Alti-define-cl-pronounced) — Control Systems, chapter 1
