NETWORK FILE
SYSTEMS
WHAT IS NETWORK FILE SYSTEM (NFS)
The Network File System (NFS) is a client/server
application that lets a computer user view and
optionally store and update files on a remote
computer as though they were on the user's own
computer.
WHAT NFS DOES
NFS allows the user or system administrator to
mount all or a portion of a file system on a
server. The portion of the file system that
is mounted can be accessed by clients with
whatever privileges are assigned to each file
(read-only or read-write).
NFS ARCHITECTURE
NFS PROTOCOL
Major goal of NFS is system independent
It is stateless,
• each process called by a client contains all the necessary
information to complete an operation,
• The server doesn’t need to maintain any information about
what is at the clients site
• Server also doesn’t keep track of an past requests
This makes crash recovery very simple
NFS uses Remote Procedure Calls (RPC)
• A client issues a request to the server by placing
all necessary information to complete the request
in the parameters
• RPC calls are synchronous
• This looks exactly like a procedure call on a local
system
NFS is implemented using the RPC Protocol, designed to
support remote procedure calls. All NFS operations are
implemented as RPC procedures. A summary of NFS
procedures is shown below:
Procedure 0: NULL - Do nothing
Procedure 1: GETATTR - Get file attributes
Procedure 2: SETATTR - Set file attributes
Procedure 3: LOOKUP - Lookup filename
Procedure 4: ACCESS - Check Access Permission
Procedure 5: READLINK - Read from symbolic link
Procedure 6: READ - Read From file
Procedure 7: WRITE - Write to file
Procedure 8: CREATE - Create a file
Procedure 9: MKDIR - Create a directory
Procedure 10: SYMLINK - Create a symbolic link
Procedure 11: MKNOD - Create a special device
Procedure 12: REMOVE - Remove a File
Procedure 13: RMDIR - Remove a Directory
Procedure 14: RENAME - Rename a File or Directory
Procedure 15: LINK - Create Link to an object
Procedure 16: READDIR - Read From Directory
Procedure 17: READDIRPLUS - Extended read from directory
Procedure 18: FSSTAT - Get dynamic file system information
Procedure 19: FSINFO - Get static file system Information
Procedure 20: PATHCONF - Retrieve POSIX information
Procedure 21: COMMIT - Commit cached data on a server to
stable storage
Client
Server
Problems with NFS:
• Not secure
• Performance is average at best and doesn’t scale
well
• Maintaining a truly distributed file system can be
complicated
if many machines supply data