4
Distributed File Systems General description. Distributed file systems support the sharing of information in the form of files throughout an intranet. A distributed file system enables programs and users to access remote files exactly as they do local ones. 1. a. Summary of storage systems and their properties. Storage System Sharing Persistence Distributed cache/replicas Consistency* Example (Non-distributed) File System No Yes No 1 Unix Distributed File System Yes Yes Yes Yes Sun FNS Web Yes Yes Yes No Web Server *The consistency column indicates whether mechanisms exist for the maintenance of consistency between multiple copies of data when updates occur. b. Basics of File System. o A file system is responsible for organizing, storing, retrieving, naming, sharing, and protecting files. o An interface to characterize the file abstraction. o Files contains both data and attributes, where data is what we commonly suppose what a file suppose to contain and the attributes include file size, timestamps, ownership, access control lists, etc. o Metadata is used to refer to file attributes, directories, which are special files, and other persistent information used by file system. o File system operations. c. Distributed File System Requirements. o Transparency. o Concurrent file update. o File replication. o Hardware and operating system heterogeneity. o Fault tolerance. o Consistency. o Security. o Efficiency. File Service Architecture. 2. The overall view of the file service architecture is shown in fig. 1, where there are three components: client module, directory service, and flat file service. Distributed File Systems http://www.csc.villanova.edu/~huliu/ds/CH8.html 1 of 4 23-Apr-15 10:02 PM

Distributed File Systems | Distributed Computing

Embed Size (px)

DESCRIPTION

Distributed File System, noted with approaches. Distributed computing, NFS and AFS.

Citation preview

  • Distributed File Systems

    General description. Distributed file systems support the sharing of information in the form of filesthroughout an intranet. A distributed file system enables programs and users to access remote filesexactly as they do local ones.

    1.

    a. Summary of storage systems and their properties.

    Storage System Sharing Persistence Distributed

    cache/replicasConsistency* Example

    (Non-distributed)File System

    No Yes No 1 Unix

    Distributed FileSystem

    Yes Yes Yes Yes Sun FNS

    Web Yes Yes Yes No Web Server *The consistency column indicates whether mechanisms exist for the maintenance of consistencybetween multiple copies of data when updates occur. b. Basics of File System.

    o A file system is responsible for organizing, storing, retrieving, naming, sharing, and protectingfiles.

    o An interface to characterize the file abstraction.o Files contains both data and attributes, where data is what we commonly suppose what a file

    suppose to contain and the attributes include file size, timestamps, ownership, access controllists, etc.

    o Metadata is used to refer to file attributes, directories, which are special files, and otherpersistent information used by file system.

    o File system operations.

    c. Distributed File System Requirements.o Transparency.o Concurrent file update.o File replication.o Hardware and operating system heterogeneity.o Fault tolerance.o Consistency.o Security.o Efficiency.

    File Service Architecture.2. The overall view of the file service architecture is shown in fig. 1, where there are three components:client module, directory service, and flat file service.

    Distributed File Systems http://www.csc.villanova.edu/~huliu/ds/CH8.html

    1 of 4 23-Apr-15 10:02 PM

  • Figure 1. Abstract Distributed File System Architecture.

    a. File service Components.

    o Flat file service is concerned with implementing operations on the contents of files. UFID isused to identify the file allover the distributed system.

    o Directory service. Provides mapping between text name and UFID. E.g., /usr/include/math.h 123456789.

    o Client Module integrates and extends the operations of above two services under a singleprogramming interface.

    b. Programming interface.

    Distributed file service has an interface, a set of operations, different from the Unix one.o Flat file service includes the following operations:

    Read (FileId, j, n): j is the starting item and n is the number of items/bytes.Write (FileId, j, Data): j is the starting item.Create (): FileId is returned.Delete (FileId):GetAttributes (FileId): The set of attributes is returned.SetAttributes (FileId, Attr): Note that an absolute starting item is specified in either read() or write () operation,different from Unix read() and write() where there is a pointer pointing to the current itemand the operations automatically advances the pointer. One advantage with the new operationsis that the operations can be repeated and in fact all operations are repeatable exceptcreate(). Another advantage is the number of operations is reduced so that there are nosuch operations as seek(), open(), and close().

    o Directory service includes the following operations:Lookup (Dir, Name): Locates the text nameAddName (Dir, Name, File):UnName (Dir, Name):GetNames(Dir, Pattern):

    c. Other services include hierarchic file system and file grouping.

    SUN NFS.3. Sun NFS closely follows the above abstract model. It provides access/location/mobility transparency.Other properties it enjoys include hardware and operating system heterogeneity, fault tolerance,consistency, security, efficiency, etc.

    The overview of SUN NFS is depicted in fig. 2.

    Distributed File Systems http://www.csc.villanova.edu/~huliu/ds/CH8.html

    2 of 4 23-Apr-15 10:02 PM

  • Figure 2. Sun NFS architecture.

    The operations are listed in the following table:

    Operation Protocol Returns Descriptionlookup (dirfh, name) fh, attr Returns file handle and attributes for the file name in

    the directory dirfhcreate (dirfh, name,attr)

    newfh, attr Creates a new file name in directory dirfh withattributes attr and returns the new file handle andattributes

    remove (dirfh, name) status Removes file name from directory dirfhgetattr (fh) attr Returns file attributes of file fh. (Similar to the UNIX

    stat system call)setattr (fh, attr) attr Sets the attributes (mode, user ID, group ID, size,

    access time and modify time of a file). Setting thesize to 0 truncates the file

    read (fh, offset, count) attr, data Returns up to count bytes of data from a file startingat offset. Also returns the latest attributes of the file

    write (fh, offset, count,data)

    attr Writes count bytes of data to a file starting at offset.Returns the attributes of the file after the write hastaken place

    rename (dirfh, name,todirfh, toname)

    status Changes the name of file name in directory dirfh totoname in directory todirfh

    link (newdirfh,newname, dirfh, name)

    status Creates an entry newname in the directory newdirfhwhich refers to file name in the directory dirfh

    symlink (newdirfh,newname, string)

    status Creates an entry newname in the directory newdirfhof type symbolic link with the value string. Theserver does not interpret the string but makes asymbolic link file to hold it

    readlink (fh) string Returns the string that is associated with thesymbolic link file identified by fh

    mkdir (dirfh, name,attr)

    newfh, attr Creates a new directory name with attributes attr andreturns the new file handle and attributes

    rmdir (dirfh, name) status Removes the empty directory name from the parentdirectory dirfh. Fails if the directory is not empty

    Distributed File Systems http://www.csc.villanova.edu/~huliu/ds/CH8.html

    3 of 4 23-Apr-15 10:02 PM

  • readdir (dirfh, cookie,count)

    entries Returns up to count bytes of directory entries fromthe directory dirfh. Each entry contains a file name,a file handle, and an opaque pointer to the nextdirectory entry, called a cookie. The cookie is used insubsequent readdir calls to start reading from thefollowing entry. If the value of cookie is 0, readsfrom the first entry in the directory

    statfs (fh) fsstats Returns file system information (such as block size,number of free blocks and so on) for the file systemcontaining a file fh

    a. Virtual file system resides in each local computer to distinguish local files from remote files and

    correspondingly connects to either Unix file system if the file is stored in the local computer orNFS client otherwise. This way, the system is transparent to users: all files look like stored in thelocal machine.

    b. Access control. Each file access is verified by the server, different from conventional Unix filesystem where access permission is verified at the open() operation.

    c. NFS server interface. The RPC (remote procedure call, using either UDP or TCP) interface isincluded in table 2. The file access operations read(), write(), getattr(), setattr()are almost identical to the corresponding abstract operations defined the above architecture.

    d. Server/client Caching. Caching in both the client and the server computers are indispensablefeatures of NFS implementations in order to achieve adequate performance.

    e. Security. The Kerberos authentication system is used to secure the NFS.

    Distributed File Systems http://www.csc.villanova.edu/~huliu/ds/CH8.html

    4 of 4 23-Apr-15 10:02 PM