16-02-2013, 03:45 PM
Network File SystemSun
[attachment=51220]
NFS Design Goals
–Any machine can be a clientor server
–Must support diskless workstations
–Heterogeneous systemsmust be supported
•Different HW, OS, underlying file system
–Access transparency
•Remote files accessed as local files through normal file system calls (via VFS in UNIX)
–Recovery from failure
•Stateless, UDP, client retries
–High Performance
•use caching and read-ahead
Why UDP?
-Slightly faster than TCP
-No connection to maintain (or lose)
-NFS is designed for Ethernet LAN environment –relatively reliable
-Error detection but no correction.
NFS retries requests
Directory and file access protocol
•First, perform a lookupRPC
–returns file handleand attributes
•Notlike open
–No information is stored on server
•handle passed as a parameter for other file access functions
–e.g. read(handle, offset, count)
Problems with NFS
•File consistency
•Assumes clocks are synchronized
•Open with append cannot be guaranteed to work
•Locking cannot work
–Separate lock manager added (stateful)
•No reference counting of open files
–You can delete a file you (or others) have open!
•Global UID space assumed
Improving NFS: version 2
•User-level lock manager
–Monitored locks
•status monitor: monitors clients with locks
•Informs lock manager if host inaccessible
•If server crashes: status monitor reinstates locks on recovery
•If client crashes: all locks from client are freed
•NV RAM support
–Improves write performance
–Normally NFS must write to disk on server before responding to client writerequests
–Relax this rule through the use of non-volatile RAM