03 Nfs PDF
03 Nfs PDF
Avishay Traeger
The Basics
NFSv2
NFSv3
NFSv4
NFSv4.1
2
Typical Use
home …
4
Design Goals
5
Remote Procedure Call (RPC)
6
NFS Client/Server
7
Outline
The Basics
NFSv2
NFSv3
NFSv4
NFSv4.1
8
Stateless Protocol
10
Operations
NULL() returns ()
Do nothing procedure to used for pinging the server
LOOKUP(dirfh, name) returns (fh, attr)
Returns a new fh and attributes for the named file in
the directory specified by dirfh
CREATE(dirfh, name, attr) returns (newfh,
attr)
Creates a new file name in the directory dirfh and
returns the new fh and attributes.
REMOVE(dirfh, name) returns (status)
Removes the file name from directory dirfh.
11
Operations
12
Operations
13
Operations
14
Operations
15
Operations
16
Operations
17
The MOUNT Protocol
18
The Linux File Handle
20
Cache Consistency Problems
The Basics
NFSv2
NFSv3
NFSv4
NFSv4.1
23
Major Changes from NFSv2 to v3
25
Asynchronous Writes
26
Asynchronous Writes: Crash
Recovery
The client must keep all uncommitted data in
case of a server crash
Replies for WRITE and COMMIT RPCs include
a write verifier for server crash detection
Write verifier: 8-byte value that the server must
change if it crashes (many use boot time)
The client must save verifiers returned by
async WRITE RPCs, and compare them to the
verifier returned by a leter COMMIT RPC
If the verifiers don't match, the client must
rewrite all uncommitted data
27
Outline
The Basics
NFSv2
NFSv3
NFSv4
NFSv4.1
28
Additional Goals for NFSv4
32
COMPOUND Procedure
33
Filehandles
34
Filehandles
35
Some Differences in Operations
36
Filehandle Types
37
File System Migration/Replication
Migration
The file system locations attribute provides a method
for the client to probe the server about the location
of a file system
In the event of a file system migration, the client will
receive an error when operating on the file system
and it can then query as to the new location
Replication
The client is able to query the server for the multiple
available locations of a particular file system
From this information, the client can use its own
policies to access the appropriate file system
location
38
Attribute Types
40
Client Caching
41
Leases
43
Delegations
The Basics
NFSv2
NFSv3
NFSv4
NFSv4.1
45
Parallel NFS (pNFS)
46
Other NFSv4.1 Highlights
Sessions
Session layer on top of the transport layer
Solves many issues with dropped connections, as
well as client and server crashes
47
References
http://pages.cs.wisc.edu/~cs537-1/notes/34_file-nfs.pdf
48