Today: Distributed File Systems. File System Basics

Similar documents
Today: Distributed File Systems

Distributed File Systems

Lecture 19. NFS: Big Picture. File Lookup. File Positioning. Stateful Approach. Version 4. NFS March 4, 2005

Distributed File Systems. Distributed Systems IT332

Distributed File Systems. Jonathan Walpole CSE515 Distributed Computing Systems

Ch. 7 Distributed File Systems

Advanced Operating Systems

Distributed File Systems. File Systems

Chapter 11 DISTRIBUTED FILE SYSTEMS

File Locking in NFS. File Locking: Share Reservations

Introduction to the Network File System (NFS)

COS 318: Operating Systems. Journaling, NFS and WAFL

Introduction to the Network File System (NFS)

COS 318: Operating Systems. NSF, Snapshot, Dedup and Review

Module 7 File Systems & Replication CS755! 7-1!

Lecture 14: Distributed File Systems. Contents. Basic File Service Architecture. CDK: Chapter 8 TVS: Chapter 11

DISTRIBUTED FILE SYSTEMS & NFS

NFS Version 4.1. Spencer Shepler, Storspeed Mike Eisler, NetApp Dave Noveck, NetApp

Distributed File Systems. CS 537 Lecture 15. Distributed File Systems. Transfer Model. Naming transparency 3/27/09

Distributed File Systems

NFS: Naming indirection, abstraction. Abstraction, abstraction, abstraction! Network File Systems: Naming, cache control, consistency

Distributed Systems. Distributed File Systems. Paul Krzyzanowski

File Concept Access Methods Directory and Disk Structure File-System Mounting File Sharing Protection

NFS in Userspace: Goals and Challenges

1 / 23. CS 137: File Systems. General Filesystem Design

Operating Systems Design 16. Networking: Remote File Systems

Distributed File Systems Part II. Distributed File System Implementation

Distributed File Systems. CS432: Distributed Systems Spring 2017

DISTRIBUTED SYSTEMS [COMP9243] Lecture 9b: Distributed File Systems INTRODUCTION. Transparency: Flexibility: Slide 1. Slide 3.

Chapter 12 Distributed File Systems. Copyright 2015 Prof. Amr El-Kadi

1 / 22. CS 135: File Systems. General Filesystem Design

Today: Distributed File Systems

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

UNIX File System. UNIX File System. The UNIX file system has a hierarchical tree structure with the top in root.

The NFS Version 4 Protocol

Distributed File Systems I

Distributed Systems. 14. Network File Systems. Paul Krzyzanowski. Rutgers University. Fall 2016

Network File System (NFS)

Network File System (NFS)

Today CSCI Coda. Naming: Volumes. Coda GFS PAST. Instructor: Abhishek Chandra. Main Goals: Volume is a subtree in the naming space

CSE 265: System and Network Administration

Distributed File Systems: Design Comparisons

Chapter 11: Implementing File Systems

416 Distributed Systems. Distributed File Systems 2 Jan 20, 2016

Today: Coda, xfs! Brief overview of other file systems. Distributed File System Requirements!

Cloud Computing CS

CSE 486/586: Distributed Systems

Distributed File Systems. Directory Hierarchy. Transfer Model

Distributed Systems. Hajussüsteemid MTAT Distributed File Systems. (slides: adopted from Meelis Roos DS12 course) 1/25

Network File Systems

Lecture 10 File Systems - Interface (chapter 10)

Chapter 7: File-System

Dr. Robert N. M. Watson

Lecture 7: Distributed File Systems

Chapter 10: File-System Interface

Today: Distributed File Systems!

Frequently asked questions from the previous class survey

Chapter 10: File-System Interface. Operating System Concepts with Java 8 th Edition

Chapter 10: File-System Interface

GridNFS: Scaling to Petabyte Grid File Systems. Andy Adamson Center For Information Technology Integration University of Michigan

Chapter 11: File-System Interface

File systems: management 1

NFS Version 4 Open Source Project. William A.(Andy) Adamson Center for Information Technology Integration University of Michigan

Network file systems. Administrivia. Naming structures. Naming schemes. NFS version 2 [Sandberg] What s a network file system?

Today: Distributed File Systems. Naming and Transparency

Operating Systems, Fall

CS 425 / ECE 428 Distributed Systems Fall Indranil Gupta (Indy) Nov 28, 2017 Lecture 25: Distributed File Systems All slides IG

DFS Case Studies, Part 1

Chapter 11: File-System Interface. File Concept. File Structure

File-System Interface

File Systems: Interface and Implementation

File Systems: Interface and Implementation

F 4. Both the directory structure and the files reside on disk Backups of these two structures are kept on tapes

Cloud Computing CS

NFS Design Goals. Network File System - NFS

CSE325 Principles of Operating Systems. File Systems. David P. Duggan. March 21, 2013

Stanford University Computer Science Department CS 240 Sample Quiz 2 Answers Winter February 25, 2005

Introducing Network File System Version 4 on HP-UX 11i v3

Announcements. Reading: Chapter 16 Project #5 Due on Friday at 6:00 PM. CMSC 412 S10 (lect 24) copyright Jeffrey K.

Advanced Operating Systems

File Systems: Interface and Implementation

COSC 6374 Parallel Computation. Parallel I/O (I) I/O basics. Concept of a clusters

Service and Cloud Computing Lecture 10: DFS2 Prof. George Baciu PQ838

Chapter 10: File-System Interface. File Concept Access Methods Directory Structure File-System Mounting File Sharing Protection

Reasons to Migrate from NFS v3 to v4/ v4.1. Manisha Saini QE Engineer, Red Hat IRC #msaini

Chapter 11: File-System Interface. Long-term Information Storage. File Structure. File Structure. File Concept. File Attributes

Distributed Systems. Lecture 07 Distributed File Systems (1) Tuesday, September 18 th, 2018

Today: Coda, xfs. Case Study: Coda File System. Brief overview of other file systems. xfs Log structured file systems HDFS Object Storage Systems

CS 537 Fall 2017 Review Session

Distributed file systems

SMB. / / 80-. /,,,, /scalability/ mainframe. / . ",,!. # $ " fail sharing,,. % ,,. " 90-, 12, /.! database.! /DBMS/.

CS454/654 Midterm Exam Fall 2004

Chapter 11: Implementing File-Systems

File-System Structure

Distributed Systems. Lec 9: Distributed File Systems NFS, AFS. Slide acks: Dave Andersen

Pintos Project 4 File Systems. November 14, 2016

Chapter 11: File-System Interface

Distributed File Systems II

GFS: The Google File System

DISTRIBUTED FILE SYSTEMS CARSTEN WEINHOLD

Transcription:

Today: Distributed File Systems Overview of stand-alone (UNIX) file systems Issues in distributed file systems Next two classes: case studies of distributed file systems NFS Coda xfs Log-structured file systems (time permitting) Lecture 20, page 1 File System Basics File: named collection of logically related data Unix file: an uninterpreted sequence of bytes File system: Provides a logical view of data and storage functions User-friendly interface Provides facility to create, modify, organize, and delete files Provides sharing among users in a controlled manner Provides protection Lecture 20, page 2

Unix File System Review User file: linear array of bytes. No records, no file types Directory: special file not directly writable by user File structure: directed acyclic graph [directories may not be shared, files may be shared (why?) ] Directory entry for each file File name inode number Major device number Minor device number All inodes are stored at a special location on disk [super block] Inodes store file attributes and a multi-level index that has a list of disk block locations for the file Lecture 20, page 3 Inode Structure Fields Mode Owner_ID, group_id Dir_file Protection bits Last access time, last write time, last inode time Size, no of blocks Ref_cnt Address[0], address[14] Multi-level index: 12 direct blocks, one single, double, and triple indirect blocks Lecture 20, page 4

Distributed File Systems File service: specification of what the file system offers Client primitives, application programming interface (API) File server: process that implements file service Can have several servers on one machine (UNIX, DOS, ) Components of interest File service Directory service Lecture 20, page 5 File Service Remote access model Work done at the server Stateful server (e.g., databases) Consistent sharing (+) Server may be a bottleneck (-) Need for communication (-) Upload/download mode Work done at the client Stateless server Simple functionality (+) Moves files/blocks, need storage (-) Lecture 20, page 6

System Structure: Server Type Stateless server No information is kept at server between client requests All information needed to service a requests must be provided by the client with each request (what info?) More tolerant to server crashes Stateful server Server maintains information about client accesses Shorted request messages Better performance Idempotency easier Consistency is easier to achieve Lecture 20, page 7 NFS Architecture Sun s Network File System (NFS) widely used distributed file system Uses the virtual file system layer to handle local and remote files Lecture 20, page 8

NFS Operations Operation v3 v4 Description Create Yes No Create a regular file Create No Yes Create a nonregular file Link Yes Yes Create a hard link to a file Symlink Yes No Create a symbolic link to a file Mkdir Yes No Create a subdirectory in a given directory Mknod Yes No Create a special file Rename Yes Yes Change the name of a file Rmdir Yes No Remove an empty subdirectory from a directory Open No Yes Open a file Close No Yes Close a file Lookup Yes Yes Look up a file by means of a file name Readdir Yes Yes Read the entries in a directory Readlink Yes Yes Read the path name stored in a symbolic link Getattr Yes Yes Read the attribute values for a file Setattr Yes Yes Set one or more attribute values for a file Read Yes Yes Read the data contained in a file Write Yes Yes Write data to a file Lecture 20, page 9 Communication a) Reading data from a file in NFS version 3. b) Reading data using a compound procedure in version 4. Both versions use Open Network Computing (ONC) RPCs - One RPC per operation (NFS v3); multiple operations supported in v4. Lecture 20, page 10

Naming: Mount Protocol NFS uses the mount protocol to access remote files Mount protocol establishes a local name for remote files Users access remote files using local names; OS takes care of the mapping Lecture 20, page 11 Naming: Crossing Mount Points Mounting nested directories from multiple servers NFS v3 does not support transitive exports (for security reasons) NFS v4 allows clients to detects crossing of mount points, supports recursive lookups Lecture 20, page 12

Automounting Automounting: mount on demand Lecture 20, page 13 File Attributes (1) Attribute TYPE SIZE Description The type of the file (regular, directory, symbolic link) The length of the file in bytes CHANGE FSID Indicator for a client to see if and/or when the file has changed Server-unique identifier of the file's file system Some general mandatory file attributes in NFS. NFS modeled based on Unix-like file systems Implementing NFS on other file systems (Windows) difficult NFS v4 enhances compatibility by using mandatory and recommended attributes Lecture 20, page 14

File Attributes (2) Attribute ACL FILEHANDLE FILEID FS_LOCATIONS OWNER TIME_ACCESS TIME_MODIFY TIME_CREATE Description an access control list associated with the file The server-provided file handle of this file A file-system unique identifier for this file Locations in the network where this file system may be found The character-string name of the file's owner Time when the file data were last accessed Time when the file data were last modified Time when the file was created Some general recommended file attributes. Lecture 20, page 15 Semantics of File Sharing a) On a single processor, when a read follows a write, the value returned by the read is the value just written. b) In a distributed system with caching, obsolete values may be returned. Lecture 20, page 16

Semantics of File Sharing Method UNIX semantics Session semantics Immutable files Transaction Comment Every operation on a file is instantly visible to all processes No changes are visible to other processes until the file is closed No updates are possible; simplifies sharing and replication All changes occur atomically Four ways of dealing with the shared files in a distributed system. NFS implements session semantics Can use remote/access model for providing UNIX semantics (expensive) Most implementations use local caches for performance and provide session semantics Lecture 20, page 17 File Locking in NFS Operation Lock Lockt Locku Renew Description Creates a lock for a range of bytes (non-blocking_ Test whether a conflicting lock has been granted Remove a lock from a range of bytes Renew the lease on a specified lock NFS supports file locking Applications can use locks to ensure consistency Locking was not part of NFS until version 3 NFS v4 supports locking as part of the protocol (see above table) Lecture 20, page 18

File Locking: Share Reservations Current file denial state NONE READ WRITE BOTH Request access READ Succeed Fail Succeed Fail WRITE Succeed Succeed Fail Fail BOTH Succeed Fail Fail Fail (a) Requested file denial state NONE READ WRITE BOTH Current access state READ Succeed Fail Succeed Fail WRITE Succeed Succeed Fail Fail BOTH Succeed Fail Fail Fail (b) The result of an open operation with share reservations in NFS. a) When the client requests shared access given the current denial state. b) When the client requests a denial state given the current file access state. Lecture 20, page 19 Client Caching Client-side caching is left to the implementation (NFS does not prohibit it) Different implementation use different caching policies Sun: allow cache data to be stale for up to 30 seconds Lecture 20, page 20

Client Caching: Delegation NFS V4 supports open delegation Server delegates local open and close requests to the NFS client Uses a callback mechanism to recall file delegation. Lecture 20, page 21 RPC Failures Three situations for handling retransmissions: use a duplicate request cache a) The request is still in progress b) The reply has just been returned c) The reply has been some time ago, but was lost. Use a duplicate-request cache: transaction Ids on RPCs, results cached Lecture 20, page 22

Security The NFS security architecture. Simplest case: user ID, group ID authentication only Lecture 20, page 23 Secure RPCs Secure RPC in NFS version 4. Lecture 20, page 24

Replica Servers NFS ver 4 supports replications Entire file systems must be replicated FS_LOCATION attribute for each file Replicated servers: implementation specific Lecture 20, page 25