Advanced Operating Systems Distributed File Systems Lecture 11
Introduction Distributed file systems support the sharing of information in the form of files throughout the intranet. A distributed file system enables programs to store and access remote files exactly as they do on local ones, allowing users to access files from any computer on the intranet. Recent advances in higher bandwidth connectivity of switched local networks and disk organization have lead to high performance and highly scalable file systems. 2
Design issues File Services Upload/Download (Transfer): Only two operations, read and write, is allowed. Read at the beginning and write at the end. Inconsistency of the downloaded file with the original Inefficient for few accesses to a large file Remote Access High traffic to and from file side Client may retain recently accessed disk blocks in a cache, so that repeated accesses to the same information can be handled locally 3
Client-Server Architectures (a) The remote access model.(b) The upload/download model.
Cluster-Based Distributed File Systems The difference between (a) distributing whole files across several servers and (b) striping files for parallel access.
NFS Architecture Allows an arbitrary collection of clients and servers to share a common file system. In many cases all servers and clients are on the same LAN but this is not required. NFS allows every machine to be a client and server at the same time. Each NFS server exports one or more directories for access by remote clients. No support of file or directory replication The servers are stateless 6
NFS Protocol One of the goals of NFS is to support a heterogeneous system, with clients and servers running on different hardware. It is essential the interface different operating systems between clients and server be well defined. NFS accomplishes this goal by defining two client-server protocol: one protocol for handling mounting (mounting daemon) One protocol for directory and file access. Protocol defines requests by clients and responses by servers. 7
NFS Architectures The basic NFS architecture for UNIX systems.
Network File System (NFS) The Network File System (NFS) was developed to allow machines to mount a disk partition on a remote machine as if it were on a local hard drive. This allows for fast, seamless sharing of files across a network. 9
Mounting Client requests a directory structure to be mounted The directory path is sent to the server If OK, a file handle is returned to the client Handle contains: the file system type, the disk, the i-node For future access, the file handle is sent. Static mounting is possible using a file called /etc/rc. This file contains shell scripts of mount commands The scripts are executed when client is booted Disadvantage: the required server may be down Mount is done even if we do not need it 10
Naming in NFS (1) Mounting (part of) a remote file system in NFS.
Naming in NFS (2) Mounting nested directories from multiple servers in NFS.
Auto mounting (1) Auto mounting is possible A set of remote directories are associated with a local directory Originally, none of the directories are mounted The first time a remote file opened All servers are looked for and the first one to reply is mounted Advantage: more server options Advantage: mount is done when needed 13
Auto mounting (2) A simple automounter for NFS.
File System Model (1) An incomplete list of file system operations supported by NFS.
File System Model (2) An incomplete list of file system operations supported by NFS.
Remote Procedure Calls in NFS (a) Reading data from a file in NFS version 3. (b) Reading data using a compound procedure in version 4.
The RPC2 Subsystem (1) Side effects in RPC2
The RPC2 Subsystem (2) (a) Sending an invalidation message one at a time. (b) Sending invalidation messages in parallel.
Google File System The organization of a Google cluster of servers.
Semantics of File Sharing (1) On a single processor, when a read follows a write, the value returned by the read is the value just written.
Semantics of File Sharing (2) In a distributed system with caching, obsolete values may be returned.
Semantics of File Sharing (3) Four ways of dealing with the shared files in a distributed system.
File Locking (1) NFSv4 operations related to file locking.
File Locking (2) The result of an open operation with share reservations in NFS. (a) When the client requests shared access given the current denial state.
File Locking (3) The result of an open operation with share reservations in NFS. (b) When the client requests a denial state given the current file access state.
Client-Side Caching (1) Client-side caching in NFS.
Client-Side Caching (2) Using the NFSv4 callback mechanism to recall file delegation.
Security in NFS The NFS security architecture.
Secure RPCs Secure RPC in NFSv4.
Access Control The various kinds of users and processes distinguished by NFS with respect to access control.
Decentralized Authentication (1) The organization of SFS.
Decentralized Authentication (2) A self-certifying pathname in SFS.