Distributed File Systems: Requirements, Architecture, and Operations, Study notes of Operating Systems

An overview of distributed file systems, discussing their requirements, architecture, and operations. Topics include transparency, concurrency control, replication, fault tolerance, heterogeneity, security, and consistency. The document also covers specific file system modules, attributes, and unix file system operations. It compares flat file services with unix and proposes a directory service architecture.

Typology: Study notes

Pre 2010

Uploaded on 07/30/2009

koofers-user-bog-1
koofers-user-bog-1 🇺🇸

4.5

(1)

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
CS 5523 Lecture 22:
Distributed File Systems
Requirements
Storage system support infrastructure
How does Unix do it?
Flat file services
Directory structure
Introduction to NFS (Network File System)
Distributed f ile system requirements:
Transparency
access transparency
location transparency
mobility transparency
performance transparency
scaling transparency
Concurrency control possibility with support for transactions
Replication
Fault tolerance
Heterogeneity
Security
Consistency
Instructor’s Guide for Coulouris, Dollimoreand Kindberg Distributed Systems: Concepts and Design Edn. 3
© Addison-Wesley Publishers 2000
Figure 8.1
Storage systems and their properties
Sharing Persis-
tence
Distributed
cache/replicas
Consistency
maintenance
Example
Main memory RAM
File system UNIX file system
Distributed file system Sun NFS
Web Web server
Distributed shared memory Ivy (Ch. 16)
Remote objects (RMI/ORB) CORBA
Persiste nt object stor e 1CORBA Persistent
Object Service
Persistent distributed obj ect store PerDiS, Khazana
1
1
1
pf3
pf4
pf5

Partial preview of the text

Download Distributed File Systems: Requirements, Architecture, and Operations and more Study notes Operating Systems in PDF only on Docsity!

CS 5523 Lecture 22:

Distributed File Systems

❚ Requirements

❚ Storage system support infrastructure

❚ How does Unix do it?

❚ Flat file services

❚ Directory structure

❚ Introduction to NFS (Network File System)

Distributed file system requirements:

❚ Transparency

❙ access transparency

❙ location transparency

❙ mobility transparency

❙ performance transparency

❙ scaling transparency

❚ Concurrency control possibility with support for transactions

❚ Replication

❚ Fault tolerance

❚ Heterogeneity

❚ Security

❚ Consistency

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 8.

Storage systems and their properties

Sharing Persis- tence

Distributed cache/replicas

Consistency maintenance

Example

Main memory (^) RAM

File system UNIX file system

Distributed file system Sun NFS

Web Web server

Distributed shared memory Ivy (Ch. 16)

Remote objects (RMI/ORB) CORBA

Persistent object store 1 CORBA Persistent Object Service

Persistent distributed object store PerDiS, Khazana

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

File system modules

Directory module: relates file names to file IDs

File module: relates file IDs to particular files

Access control module: checks permission for operation requested

File access module: reads or writes file data or attributes

Block module: accesses and allocates disk blocks

Device module: disk I/O and buffering

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 8.

File attribute record structure

File length

Creation timestamp

Read timestamp

Write timestamp

Attribute timestamp

Reference count

Owner

File type

Access control list

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 8.

UNIX file system operations

filedes = open(name, mode) filedes = creat(name, mode)

Opens an existing file with the given name. Creates a new file with the given name. Both operations deliver a file descriptor referencing the open file. The mode is read , write or both.

status = close(filedes) Closes the open file filedes.

count = read(filedes, buffer, n) count = write(filedes, buffer, n)

Transfers n bytes from the file referenced by filedes to buffer. Transfers n bytes to the file referenced by filedes from buffer. Both operations deliver the number of bytes actually transferred and advance the read-write pointer.

pos = lseek(filedes, offset, whence)

Moves the read-write pointer to offset (relative or absolute, depending on whence ). status = unlink(name) Removes the file name from the directory structure. If the file has no other names, it is deleted.

status = link(name1, name2) Adds a new name ( name2 ) for a file ( name1 ). status = stat(name, buffer) Gets the file attributes for file name into buffer.

Proposed flat file service versus Unix:

❚ No open or close

❚ Most operations (except create) are idempotent (UNIX read and

write are not)

❚ Access control is different:

❙ In UNIX access rights are checked at the open. Process uses a file handle.

❙ In the proposed service access rights are checked by the server:

Either when a name is converted to UFID access rights are encoded in a capability. The capability is then presented with each subsequent operations

Or, the user credentials are submitted with each request

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 8.

Directory service operations

Lookup(Dir, Name) -> FileId — throws NotFound

Locates the text name in the directory and returns the relevant UFID. If Name is not in the directory, throws an exception.

AddName(Dir, Name, File) — throws NameDuplicate

If Name is not in the directory, adds ( Name , File ) to the directory and updates the file’s attribute record. If Name is already in the directory: throws an exception.

UnName(Dir, Name) — throws NotFound

If Name is in the directory: the entry containing Name is removed from the directory. If Name is not in the directory: throws an exception. GetNames(Dir, Pattern) -> NameSeq Returns all the text names in the directory that match the regular expression Pattern.

Proposed directory system versus Unix:

❚ Text names are translated to UIDs

❚ UNIX file names are mapped to inodes in a specific device

partition

❚ Hierarchical organization can be supported in both (need a type

designation)

❚ File groups used to allocate blocks of files in a distributed file

system to particular servers (analogous to a filesystem in UNIX)

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

NFS architecture

UNIX kernel

protocol

Client computer Server computer

system calls

Local Remote

UNIX

file system

NFS

client

NFS

server

UNIX

file system

Application program

Application program

NFS
UNIX

UNIX kernel

Virtual file system Virtual file system

Otherfile system

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 8.

NFS server operations (simplified) – 1

lookup(dirfh, name) -> fh, attr (^) Returns file handle and attributes for the file name in the directory dirfh. create(dirfh, name, attr) -> newfh, attr

Creates a new file name in directory dirfh with attributes attr and returns the new file handle and attributes. remove(dirfh, name) status (^) Removes file name from directory dirfh.

getattr(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 the size to 0 truncates the file. read(fh, offset, count) -> attr, data (^) Returns up to count bytes of data from a file starting at 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 has taken place. rename(dirfh, name, todirfh, toname) -> status

Changes the name of file name in directory dirfh to toname in directory to todirfh.

link(newdirfh, newname, dirfh, name) -> status

Creates an entry newname in the directory newdirfh which refers to file name in the directory dirfh. Continues on next slide ...

Instructor’s Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 3 © Addison-Wesley Publishers 2000

Figure 8.

NFS server operations (simplified) – 2

symlink(newdirfh, newname, string) -> status

Creates an entry newname in the directory newdirfh of type symbolic link with the value string. The server does not interpret the string but makes a symbolic link file to hold it. readlink(fh) -> string (^) Returns the string that is associated with the symbolic link file identified by fh.

mkdir(dirfh, name, attr) -> newfh, attr

Creates a new directory name with attributes attr and returns the new file handle and attributes.

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

readdir(dirfh, cookie, count) -> entries

Returns up to count bytes of directory entries from the directory dirfh. Each entry contains a file name, a file handle, and an opaque pointer to the next directory entry, called a cookie. The cookie is used in subsequent readdir calls to start reading from the following entry. If the value of cookie is 0, reads from 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 system containing a file fh.