Skip to main content

DFS architecture and storage sharing

Short answer

A DFS stores files on servers and lets clients access them over a network as if local, using a common namespace and location transparency so storage is shared. Its architecture has a flat file service that manages files by UFID, a directory service mapping names to UFIDs, and a client module providing the API and caching.

Define distributed file system (DFS). How does DFS encourage sharing of a storage device? Explain with the help of a suitable distributed file service architecture.

Distributed file system (DFS)

A distributed file system is a file system whose files are stored on one or more servers and which lets clients on other computers access them over a network as though they were stored locally. It supports sharing under a common name space, with proper security and consistency.

How DFS encourages sharing of storage

  • Files are stored on servers, and any authorised client can read or write them through the same interface, so storage devices (disks) are shared instead of every user needing a private disk.
  • The common name space and location transparency let users use the same path from any workstation.
  • Users share data (documents, programs) with each other, and one copy is kept for many users, reducing cost and duplication.
  • Expensive large disks and backups are centralised in the servers and are used by cheap diskless workstations.
  • Access control lists and concurrency control permit safe shared updates.

Distributed file service architecture

The model of Coulouris divides the service into three modules.

 Client computer          |   Server computer
 +-------------------+    |  +----------------------+
 | Application       |    |  | Directory service    |
 | programs          |    |  |  (name -> UFID)      |
 +---------+---------+    |  +----------+-----------+
           |              |             |
 +---------v---------+  RPC/messages +---v-----------+
 | Client module     |<------------->| Flat file     |
 | (API, cache)      |    |          | service       |
 +-------------------+    |          +---------------+
  • Flat file service: works on file contents. Files are identified by a unique file identifier (UFID). Operations: Read, Write, Create, Delete, GetAttributes, SetAttributes. All operations except Create are repeatable (idempotent), and the server keeps no client state (stateless).
  • Directory service: maps text names to UFIDs. Operations: Lookup, AddName, UnName, GetNames. Directories are themselves files stored by the flat file service.
  • Client module: runs in each client computer, gives applications one API, hides the location of servers, and holds the cache and the addresses of the servers.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Distributed System chapter 2 questions →