18
Presented By: Presented By: Samreen Tahir Samreen Tahir

Coda file system tahir

Embed Size (px)

Citation preview

Presented By: Presented By:

Samreen TahirSamreen Tahir

Coda is a network file system and a descendent of the Andrew File Coda is a network file system and a descendent of the Andrew File System 2. It was designed to be:System 2. It was designed to be:

Highly secureHighly secure AvailableAvailable Transparent to its users. Transparent to its users.

WHAT IS IT?WHAT IS IT?

Andrew File System:Andrew File System:

• Architecture of Coda is based on Andrew File SystemArchitecture of Coda is based on Andrew File System

• AFS was developed at Carnegie Mellon University AFS was developed at Carnegie Mellon University • It was designed to support the CMU community that meant serving 10, 000 workstationsIt was designed to support the CMU community that meant serving 10, 000 workstations

Limitations of AFS:Limitations of AFS:

Limited form of replication posed Limited form of replication posed scaling problemsscaling problems

Non-availability of services when Non-availability of services when servers and network components failservers and network components fail

No catering for mobile use of No catering for mobile use of portable computersportable computers

Coda was designed to overcome the problems associatedCoda was designed to overcome the problems associatedwith AFS.with AFS.

It works by implementing two COMPLEMENTARY It works by implementing two COMPLEMENTARY functionalities :functionalities :

1.1. Availability of files by replicating a file volume across Availability of files by replicating a file volume across many serversmany servers

2. Disconnected mode of operation by caching files at the 2. Disconnected mode of operation by caching files at the client machineclient machine

How does Coda work?How does Coda work?

The Coda architecture is based on AFS: The Andrew File SystemThe Coda architecture is based on AFS: The Andrew File System

Transparent access to a Vice file server

Vice file serverVirtue Client

1. Vice nodes: dedicated file dedicated file servers servers

AFS is divided into two types of nodes:

2. Virtue nodes: client machinesclient machines

User process

Venus process

User process

RPC client stub

Virtual file system layer

Network

Virtue Client Machine

The internal organization of a virtue workstation:The internal organization of a virtue workstation:

Local OS

Local file system interface

Venus: A process that is hosted on each Virtue system.

VFS: Virtual File System, intercepts the calls from client application or user processes and forwards them either to the local file system or Venus.

How do the server and client communicate in Coda?How do the server and client communicate in Coda?

RPC call

ClientFile Server

(Blocking)Reply May take arbitrary

amount of time

Answer: Through Remote Procedure Calls (RPC)Answer: Through Remote Procedure Calls (RPC)

1.1. The server keeps sending back messages to the client that it is still working The server keeps sending back messages to the client that it is still working on the problem.on the problem.

2. If the server dies and the client notices that it is not receiving any messages2. If the server dies and the client notices that it is not receiving any messages it reports back failure to the client application. it reports back failure to the client application.

(contd.)(contd.)

File server

client

Invalidate F

Invalidate F

Invalidate FF

F

F

F

F

F

File

Updated File F

When a server notices updates in a file, it must inform the client which When a server notices updates in a file, it must inform the client which are caching a copy of it to invalidate that copy. are caching a copy of it to invalidate that copy.

(contd.)(contd.)

There are two ways to invalidate a file:

Sending invalidation message one at a time.

Sending invalidation messages in parallel.

TimeClient

Client

Server

invalid

ate

reply

reply

inva

lidate

This method is inefficient since a client may crash before giving a reply to the server.

A better approach:

COMMUNICATION:COMMUNICATION:

TimeClient

Client

Server

invalid

ate

reply

reply

inva

lidate

Coda uses RPC2: more sophisticated than Coda uses RPC2: more sophisticated than the traditional RPC used by NFSthe traditional RPC used by NFS

RPC2 implements a functionality called RPC2 implements a functionality called side effectside effect: a separate connection is : a separate connection is opened when a remote procedure is opened when a remote procedure is called.called.

This separate connection is for the This separate connection is for the application specific protocol between the application specific protocol between the client and the server.client and the server.

RPC2RPC2 contd.

Server side effect

RPC server stub

RPC client stub

Client side effect

Application-specific protocol

Side-effects in Coda’s RPC2 system.

RPC

RPC protocol

Client ApplicationServer

Naming:Naming:

Coda uses name space Coda uses name space implementation analogous to that of implementation analogous to that of UNIX.UNIX.

Volumes are the building units of the Volumes are the building units of the entire file system and are mounted entire file system and are mounted at a mount point. at a mount point.

Clients in coda have access to Clients in coda have access to a single shared namespacea single shared namespaceClient A Client BServer

Network

Exported directory mounted by client

Exported directory mounted by client

Naming inherited from server’s namespace

Clients in Coda have access to a single shared namespace.

afs local

bin

binafspkg

pkg

File Identifiers:File Identifiers:

Client Caching:Client Caching:

Server Replication:Server Replication:

Fault Tolerance: Fault Tolerance: Disconnected OperationDisconnected Operation

Fault Tolerance: Fault Tolerance: Disconnected OperationDisconnected Operation