DISTRIBUTED FILE SYSTEMS Computer Engineering Department Distributed Systems Course Asst. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2013.

Slides:



Advertisements
Similar presentations
A CASE FOR REDUNDANT ARRAYS OF INEXPENSIVE DISKS (RAID) D. A. Patterson, G. A. Gibson, R. H. Katz University of California, Berkeley.
Advertisements

RAID Redundant Array of Independent Disks
CSCE430/830 Computer Architecture
The Zebra Striped Network Filesystem. Approach Increase throughput, reliability by striping file data across multiple servers Data from each client is.
Serverless Network File Systems. Network File Systems Allow sharing among independent file systems in a transparent manner Mounting a remote directory.
RAID Technology. Use Arrays of Small Disks? 14” 10”5.25”3.5” Disk Array: 1 disk design Conventional: 4 disk designs Low End High End Katz and Patterson.
CS-550: Distributed File Systems [SiS]1 Resource Management in Distributed Systems: Distributed File Systems.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
1 Network File System (NFS) a)The remote access model. b)The upload/download model.
Computer Science Lecture 20, page 1 CS677: Distributed OS Today: Distributed File Systems Issues in distributed file systems Sun’s Network File System.
Distributed File Systems Chapter 11
Computer ArchitectureFall 2007 © November 28, 2007 Karem A. Sakallah Lecture 24 Disk IO and RAID CS : Computer Architecture.
Computer Science Lecture 18, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Other File Systems: AFS, Napster. 2 Recap NFS: –Server exposes one or more directories Client accesses them by mounting the directories –Stateless server.
Computer Science Lecture 21, page 1 CS677: Distributed OS Today: Coda, xFS Case Study: Coda File System Brief overview of other recent file systems –xFS.
1 CS 194: Distributed Systems Distributed File Systems Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and.
1 Lecture 23: Multiprocessors Today’s topics:  RAID  Multiprocessor taxonomy  Snooping-based cache coherence protocol.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
File Systems (2). Readings r Silbershatz et al: 11.8.
RAID-x: A New Distributed Disk Array for I/O-Centric Cluster Computing Kai Hwang, Hai Jin, and Roy Ho.
Distributed File Systems Sarah Diesburg Operating Systems CS 3430.
Sun NFS Distributed File System Presentation by Jeff Graham and David Larsen.
Distributed File Systems Concepts & Overview. Goals and Criteria Goal: present to a user a coherent, efficient, and manageable system for long-term data.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
Redundant Array of Inexpensive Disks (RAID). Redundant Arrays of Disks Files are "striped" across multiple spindles Redundancy yields high data availability.
Lecture 4 1 Reliability vs Availability Reliability: Is anything broken? Availability: Is the system still available to the user?
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
Distributed File Systems
Chapter 20 Distributed File Systems Copyright © 2008.
What is a Distributed File System?? Allows transparent access to remote files over a network. Examples: Network File System (NFS) by Sun Microsystems.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Introduction to DFS. Distributed File Systems A file system whose clients, servers and storage devices are dispersed among the machines of a distributed.
Serverless Network File Systems Overview by Joseph Thompson.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Presented By: Samreen Tahir Coda is a network file system and a descendent of the Andrew File System 2. It was designed to be: Highly Highly secure Available.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Distributed File Systems Group A5 Amit Sharma Dhaval Sanghvi Ali Abbas.
Distributed File Systems Questions answered in this lecture: Why are distributed file systems useful? What is difficult about distributed file systems?
Synchronization in Distributed File Systems Advanced Operating System Zhuoli Lin Professor Zhang.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last class: Distributed File Systems Issues in distributed file systems Sun’s Network File System.
Chapter Five Distributed file systems. 2 Contents Distributed file system design Distributed file system implementation Trends in distributed file systems.
Distributed Systems: Distributed File Systems Ghada Ahmed, PhD. Assistant Prof., Computer Science Dept. Web:
Computer Science Lecture 20, page 1 CS677: Distributed OS Today: Distributed File Systems Issues in distributed file systems Sun’s Network File System.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Truly Distributed File Systems Paul Timmins CS 535.
DISTRIBUTED FILE SYSTEM- ENHANCEMENT AND FURTHER DEVELOPMENT BY:- PALLAWI(10BIT0033)
Distributed File Systems
Vladimir Stojanovic & Nicholas Weaver
File System Implementation
Unit OS10: Fault Tolerance
RAID RAID Mukesh N Tekwani
Today: Coda, xFS Case Study: Coda File System
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
CSE 451: Operating Systems Winter Module 22 Distributed File Systems
Distributed File Systems
Distributed File Systems
Outline Announcements Lab2 Distributed File Systems 1/17/2019 COP5611.
CSE 451: Operating Systems Spring Module 21 Distributed File Systems
Distributed File Systems
CSE 451: Operating Systems Winter Module 22 Distributed File Systems
Chapter 15: File System Internals
Today: Distributed File Systems
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Outline Review of Quiz #1 Distributed File Systems 4/20/2019 COP5611.
RAID RAID Mukesh N Tekwani April 23, 2019
Distributed File Systems
Distributed File Systems
Presentation transcript:

DISTRIBUTED FILE SYSTEMS Computer Engineering Department Distributed Systems Course Asst. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2013

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

Client-Server Architectures (1) Remote access model – work done at server Stateful server Consistent sharing (+) Server may be bottleneck (-) Need for communication (-) Upload download model Stateless server Simple functionality (+) Moves files blocks need storage (-)

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

NFS Architecture Suns Network File System (NFS) – widely used distributed file system Uses the virtual file system layer to handle local and remote files

NFS Interface I

NFS Interface II

Communication (a) Reading data from a file in NFS version 3. (b) Reading data using a compound procedure in version 4. Both version use ONCs RPC: one RPC per operation (v3), multiple operations in v4

Naming: Mount Protocol NFS uses 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 mapping

Naming: Crossing Mount Points NFS does not allow transitive mounts

Automounting Automounting: mount on demand

Automounting The problem with auto- mounting and its solution Auto-mounter needs to handle all write and read to make the system transparent – Even for file systems that have been already mounted This may incur a performance bottleneck Solution: – Use auto-mounter only for mounting and unmounting – Mount directories in a special directory and use symbolic link

File Sharing If file sharing – Synchronizing – consistency – Performance Necessary to determine the semantics of reading and writing precisely to avoid problems.

Semantics of File Sharing I On a single processor, when a read follows a write, the value returned by the read is the value just written.

Semantics of File Sharing II In a distributed system with caching, obsolete values may be returned.

Semantics of File Sharing III 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.

Semantics of File Sharing IV Unix Semantics – Can be achieved easily if there is only one file server and clients dont cache it – All reads writes go directly to the server Session Semantics – Most widely used – Follow remote access model (not upload download) – Make use of local cache by upload/download model Immutable files – There is no way to open a file for writing – How to write then? Transactions – To access a file or a group of files – begin_transaction x end_transaction – Run jobs indivisibly – If two or more transaction starts up at the same time, the system ensures final result is correct.

File Locking 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)

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

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.

RPC Failures Three situations for handling retransmissions: use a duplicate request cache – The request is still in progress – The reply has just been returned – The reply has been some time ago, but was lost.

AFS - CODA

AFS Background Andrew File System - ASF Alternative to NFS Originally a research project at CMU – Then, defunct commercial product from Transarc (IBM) - Public versions now available – Goal: Single namespace for global files (sound familiar? DNS? Web?) Designed for wide-area file sharing and scalability Example of stateful file system design – Server keeps track of clients accessing files Uses callback-based invalidation – Eliminates need for timestamp checking, increases scalability – Complicates design

CODA Overview DFS designed for mobile clients Offshoot of AFS designed for mobile clients – Nice model for mobile clients who are often disconnected Use file cache to make disconnection transparent At home, on the road, away from network connection Coda supplements AFS file cache with user preferences – E.g., always keep this file in the cache – Supplement with system learning user behavior How to keep cached copies on disjoint hosts consistent? – In mobile environment, simultaneous writes can be separated by hours/days/weeks

Disconnected Operation The state-transition diagram of a Coda client with respect to a volume. Use hoarding to provide file access during disconnection – Prefetch all files that may be accessed and cache (hoard) locally Emulating fact that you are connected to the file server. Reintegration: Client and server file systems are synchronizing

The RPC2 Subsystem in CODA RPC2 is reliable RPC on top of UDP (unreliable) Side effects comm. Ex. – In case of video transfer – isochronous communication – requires application spec protocol

The RPC2 Subsystem in CODA When a file is modified at server – sending invalidate msg If there are more than one client – send all of them one by one – or- send in parallel?

xFS

xFS Summary Distributes data storage across disks using software RAID and log-based network striping – RAID == Redundant Array of Independent Disks Dynamically distribute control processing across all servers on a per-file granularity – Utilizes serverless management scheme Eliminates central server caching using cooperative caching – Harvest portions of client memory as a large, global file cache.

RAID Overview Basic idea: files are "striped" across multiple disks Redundancy yields high data availability – Availability: service still provided to user, even if some components failed Disks will still fail Contents reconstructed from data redundantly stored in the array – Capacity penalty to store redundant info – Bandwidth penalty to update redundant info

Problem in Striping Type Partitioning If there is a failure (if any one disk fails) – Some parts of every file are lost – All of the data gets impacted SOLUTION IS USING RAID – If any disk fails – through RAID data still becomes available – You can implement it in hardware or software

Array Reliability Reliability of N disks = Reliability of 1 Disk ÷ N – 50,000 Hours ÷ 70 disks = 700 hours – That is if one fails everything fails Disk system MTTF: Drops from 6 years to 1 month! Arrays (without redundancy) too unreliable to be useful!

Redundant Arrays of Inexpensive Disks RAID 1: Disk Mirroring/Shadowing There are a couple of alternatives – here is the easiest one Each disk is fully duplicated onto its mirror Very high availability can be achieved Bandwidth sacrifice on write: – Logical write = two physical writes Reads may be optimized Most expensive solution: 100% capacity overhead

Inspiration for RAID 5 -RAID4- Use parity for redundancy – D0 xor D1 xor D2 xor D3 = P – If any disk fails, then reconstruct block using parity: E.g. D0 =D1 xor D2 xor D3 xor P Raid 4: all parity blocks stored on the same disk – Small writes are still limited by parity disk – Parity disk becomes bottleneck

Redundant Arrays of Inexpensive Disks RAID 5: High I/O Rate Interleaved Parity Independent writes possible because of interleaved parity Examples: write to D0 and D5 uses disk 0,1,3,4