D I S T R I B U T E D FILE SYSTEMS
DISTRIBUTED FILE
SYSTEMS
DEFINITIONS:
• A Distributed File System ( DFS ) is simply a classical model of
a file system distributed across multiple machines. The
purpose is to promote sharing of dispersed files.
• Theresources on a particular machine are local to
itself.
Resources on other machines are remote.
• A file system provides a service for clients. The server
interface is the normal set of file operations: create, read,
etc. on files.
2
NFS Architecture
3
SUN Network File
System
NFS ARCHITECTURE:
1. UNIX filesystem layer - does normal open / read / etc. commands.
2. System call interface layer -
a) Presents sanitized validated requests in a uniform way to the VFS.
3. Virtual file system ( VFS ) layer -
b) Gives clean layer between user and filesystem.
c) Acts as deflection point by using global vnodes.
d) Understands the difference between local and remote names.
e) Keeps in memory information about what should be deflected (mounted directories)
and how to get to these remote directories.
4
SUN Network File System
Client Integration:
The NFS client emulates the semantics of the standard UNIX file system
primitives precisely and is integrated with the UNIX kernel. It is
integrated with the kernel and not supplied as a library for loading
into client processes so that:
• user programs can access files via UNIX system calls without
recompilation or reloading.
• a single client module serves all of the user-level processes, with a
shared cache of recently used blocks.
SUN Network File System
Access control and Authentication :
• The NFS server is stateless and does not keep files open on behalf of
its clients. So the server must check the user’s identity against the
file’s access permission attributes afresh on each request, to see
whether the user is permitted to access the file in the manner
requested. The Sun RPC protocol requires clients to send user
authentication information
NFS Server Interface:
• A simplified representation of the RPC interface is provided by NFS version 3
servers (defined in RFC 1813 [Callaghan et al. 1995]).
NFS Server
Operations
Mount Service :
Mounting is the process by which the file systems are made available
to Operating system and the user.
AutoMounter :
• The automounter maintains a table of mount points (pathnames) with a reference
to one or more NFS servers listed against each.
• It behaves like a local NFS server at the client machine.
PATH-NAME TRANSLATION:
• Break the complete pathname into components.
• For each component, do an NFS lookup using the
component name + directory vnode.
• After a mount point is reached, each component piece will cause a server access.
• Can't hand the whole operation to server since the client may have a second mount on a subsidiary
directory (a mount on a mount ).
• A directory name cache on the client speeds up lookups.
9
CACHES OF REMOTE DATA:
• Caching in both the client and the server computer are indispensable features of
NFS implementations in order to achieve adequate performance.
• The NFS client module caches the results of read, write, getattr,
lookup and readdir operations in order to reduce the number of
requests transmitted to servers.
10
NFS SUMMARY
Desirable features of a good distributed file system
Transparency
Access Transparency
Location Transparency
Mobility Transparency
Scalability
File Replication
Hardware and OS Heterogeneity
Fault Tolerance
Consistency
Security
Efficiency
11