File Systems 2
File Systems 2
(II)
Outline
Last topics:
Introduction
Now:
architecture
protocol
implementation
NFS Architecture
In most cases, all the clients and servers are on the same LAN
NFS allows every machine to be both a client and a server at
the same time
Server side:
NFS Protocols
Mounting protocol:
Mount Protocol
Automounting
NFS Automounting
First, in static mounting via the /etc/rc file, if one of the NFS servers
happens to be down, it is impossible to bring the client up -- at least not
without some difficulty, delay, and quite a few error messages
On the other hand, it is assumed that all the file systems specified
as alternatives for the automount are identical
The advantage of this scheme is that the server does not have to remember
anything about open connections in between calls to it. Thus, if a server
crashes and then recovers, no information about open files is lost, because
there is none.
The server then makes a table entry keeping track of the file is open, and
where the reader currently is, so each request need not carry an offset.
The disadvantage of this scheme is that if a server crashes and then
quickly reboots, all open connections are lost, and client programs fails.
12
15
NFS uses the UNIX protection mechanism, with rwx bits for
the owner, group, and others.
Originally, each request message simply contained the user
and group ids of the caller, which the NFS server used to
validate the access.
16
All the keys used for the authentication, as well as other information are
maintained by the NIS (Network Information Service)
The NIS was formerly known as the yellow pages
Its function is to store (key, value) pairs
To read their data, a process can use either the master or any of the copies
in the slaves.
However, all changes must be made only to the master, which then
propagates them to the slaves.
17
18
NFS Implementation
20
Problem: 2 clients caching the same file block and that one of them
modifies it. When the other one reads the block, it gets the old value.
Solutions:
Solution 1:
Associate with each cache block a timer, when the timer expires, the
entry is discarded. Normally, the timer is 3 sec. for data blocks and
30 sec. for directory block.
Solution 2:
Criticism:
22
Lessons learned:
23
24
25
26
Distributed system
27
Overall Architecture
28
LAN
WAN
LAN
LAN
29
To answer requests
To move data
31
32
Finding a File
33
Finding a Volume
34
Making a Volume
35
36
37
39
Status
Data
For fast attribute lookup
40
41
AFS Security
42
Maintained by Vice
Used to mimic UNIX access control