1 Distributed File Systems: Design Comparisons David Eckhardt, Bruce Maggs slides used and modified with permission from Pei Cao’s lectures in Stanford.

Slides:



Advertisements
Similar presentations
Distributed File System: Design Comparisons Pei Cao Cisco Systems, Inc.
Advertisements

Remote Procedure Call (RPC)
Distributed Storage March 12, Distributed Storage What is Distributed Storage?  Simple answer: Storage that can be shared throughout a network.
1 UNIX Internals – the New Frontiers Distributed File Systems.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
CS-550: Distributed File Systems [SiS]1 Resource Management in Distributed Systems: Distributed File Systems.
Design and Implementation of the Sun Network File System Russel Sandberg, David Goldberg, Steve Kleiman, Dan Walsh, and Bob Lyon Appears in USENIX Annual.
Distributed File Systems
File System Implementation
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Other File Systems: AFS, Napster. 2 Recap NFS: –Server exposes one or more directories Client accesses them by mounting the directories –Stateless server.
Distributed File System: Design Comparisons II Pei Cao Cisco Systems, Inc.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
Distributed File System: Data Storage for Networks Large and Small Pei Cao Cisco Systems, Inc.
1 DNS,NFS & RPC Rizwan Rehman, CCS, DU. Netprog: DNS and name lookups 2 Hostnames IP Addresses are great for computers –IP address includes information.
Distributed File System: Design Comparisons II Pei Cao.
L-17 Distributed File Systems 1. Outline Why Distributed File Systems? Basic mechanisms for building DFSs  Using NFS and AFS as examples Design choices.
NETWORK FILE SYSTEM (NFS) By Ameeta.Jakate. NFS NFS was introduced in 1985 as a means of providing transparent access to remote file systems. NFS Architecture.
Network File System (NFS) in AIX System COSC513 Operation Systems Instructor: Prof. Anvari Yuan Ma SID:
1 Network File System. 2 Network Services A Linux system starts some services at boot time and allow other services to be started up when necessary. These.
DESIGN AND IMPLEMENTATION OF THE SUN NETWORK FILESYSTEM R. Sandberg, D. Goldberg S. Kleinman, D. Walsh, R. Lyon Sun Microsystems.
Lecture 23 The Andrew File System. NFS Architecture client File Server Local FS RPC.
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.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Distributed File Systems Steve Ko Computer Sciences and Engineering University at Buffalo.
CSC 456 Operating Systems Seminar Presentation (11/13/2012) Leon Weingard, Liang Xin The Google File System.
Networked File System CS Introduction to Operating Systems.
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
Distributed File Systems
2002 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 3.
Designing Authentication for a Microsoft Windows 2000 Network Designing Authentication in a Microsoft Windows 2000 Network Designing Kerberos Authentication.
DFS & Active Directory Joshua Hedges |Brandon Maxfield | Robert Rivera | Will Zilch.
What is a Distributed File System?? Allows transparent access to remote files over a network. Examples: Network File System (NFS) by Sun Microsystems.
Chapter 10: File-System Interface Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 10: File-System.
Kerberos Named after a mythological three-headed dog that guards the underworld of Hades, Kerberos is a network authentication protocol that was designed.
NFS : Network File System SMU CSE8343 Prof. Khalil September 27, 2003 Group 1 Group members: Payal Patel, Malka Samata, Wael Faheem, Hazem Morsy, Poramate.
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.
ITEC 502 컴퓨터 시스템 및 실습 Chapter 11-2: File System Implementation Mi-Jung Choi DPNM Lab. Dept. of CSE, POSTECH.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Network File System Protocol
Sun Network File System Presentation 3 Group A4 Sean Hudson, Syeda Taib, Manasi Kapadia.
Lecture 7 – Distributed File Systems Distributed Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition File System Implementation.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Distributed File Systems Architecture – 11.1 Processes – 11.2 Communication – 11.3 Naming – 11.4.
Lecture 24 Sun’s Network File System. PA3 In clkinit.c.
EE324 INTRO TO DISTRIBUTED SYSTEMS. Distributed File System  What is a file system?
Manish Kumar,MSRITSoftware Architecture1 Remote procedure call Client/server architecture.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Distributed File Systems Group A5 Amit Sharma Dhaval Sanghvi Ali Abbas.
Lecture 25 The Andrew File System. NFS Architecture client File Server Local FS RPC.
Distributed File Systems Questions answered in this lecture: Why are distributed file systems useful? What is difficult about distributed file systems?
EE324 INTRO TO DISTRIBUTED SYSTEMS. Last Lecture  Why Distributed File Systems?  Basic mechanisms for building DFSs  Using NFS and AFS as examples.
1 Distributed File Systems: Design Comparisons II David Eckhardt, Bruce Maggs slides used and modified with permission from Pei Cao’s lectures in Stanford.
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:
DISTRIBUTED FILE SYSTEM- ENHANCEMENT AND FURTHER DEVELOPMENT BY:- PALLAWI(10BIT0033)
File System Implementation
Distributed File Systems 1
Distributed Systems Lecture 07 – Distributed File Systems (1) Tuesday, September 18th, 2018.
Distributed File Systems
Distributed File Systems
DESIGN AND IMPLEMENTATION OF THE SUN NETWORK FILESYSTEM
Distributed File Systems
Chapter 15: File System Internals
Today: Distributed File Systems
Last Class: Communication in Distributed Systems
Network File System (NFS)
Presentation transcript:

1 Distributed File Systems: Design Comparisons David Eckhardt, Bruce Maggs slides used and modified with permission from Pei Cao’s lectures in Stanford Class CS-244B

2 Other Materials Used Lecture 34, NFS & AFS, Fall 2003, Eckhardt NFS: –RFC 1094 for v2 (3/1989) –RFC 1813 for v3 (6/1995) –RFC 3530 for v4 (4/2003) AFS: –“The ITC Distributed File System: Principles and Design”, Proceedings of the 10 th ACM Symposium on Operating System Principles, Dec. 1985, pp –“Scale and Performance in a Distributed File System”, ACM Transactions on Computer Systems, Vol. 6, No. 1, Feb. 1988, pp –IBM AFS User Guide, version 36

3 More Related Material RFCs related to Remote Procedure Calls (RPCs) –RFC 1831 XDR representation –RFC 1832 RPC –RFC 2203 RPC security

4 Outline Why Distributed File Systems? Basic mechanisms for building DFSs –Using NFS V2 as an example Design choices and their implications –Naming (this lecture) –Authentication and Access Control (this lecture) –Batched Operations (this lecture) –Caching (next lecture) –Concurrency Control (next lecture) –Locking implementation (next lecture)

Gratuitous Quote of the Day Good judgment comes from experience… Experience comes from bad judgment. - attributed to many

6 Why Distributed File Systems?

7 What Distributed File Systems Provide Access to data stored at servers using file system interfaces What are the file system interfaces? –Open a file, check status of a file, close a file –Read data from a file –Write data to a file –Lock a file or part of a file –List files in a directory, create/delete a directory –Delete a file, rename a file, add a symlink to a file –etc

8 Why DFSs are Useful Data sharing among multiple users User mobility Location transparency Backups and centralized management

9 “File System Interfaces” vs. “Block Level Interfaces” Data are organized in files, which in turn are organized in directories Compare these with disk-level access or “block” access interfaces: [Read/Write, LUN, block#] Key differences: –Implementation of the directory/file structure and semantics –Synchronization (locking)

10 Digression: “Network Attached Storage” vs. “Storage Area Networks” NASSAN Access MethodsFile accessDisk block access Access MediumEthernetFiber Channel and Ethernet Transport ProtocolLayer over TCP/IPSCSI/FC and SCSI/IP EfficiencyLessMore Sharing and Access Control GoodPoor Integrity demandsStrongVery strong ClientsWorkstationsDatabase servers

11 Basic DFS Implementation Mechanisms

12 Components in a DFS Implementation Client side: –What has to happen to enable applications to access a remote file the same way a local file is accessed? Communication layer: –Just TCP/IP or a protocol at a higher level of abstraction? Server side: –How are requests from clients serviced?

13 Client Side Example: Basic UNIX Implementation Accessing remote files in the same way as accessing local files  kernel support

14 VFS interception VFS provides “pluggable” file systems Standard flow of remote access –User process calls read() –Kernel dispatches to VOP_READ() in some VFS –nfs_read() check local cache send RPC to remote NFS server put process to sleep

15 VFS interception Standard flow of remote access (continued) –server interaction handled by kernel process retransmit if necessary convert RPC response to file system buffer store in local cache wake up user process –nfs_read() copy bytes to user memory

16 Communication Layer Example: Remote Procedure Calls (RPC) Failure handling: timeout and re-issue xid “call” service version procedure auth-info arguments … xid “reply” reply_stat auth-info results … RPC callRPC reply

17 Extended Data Representation (XDR) Argument data and response data in RPC are packaged in XDR format –Integers are encoded in big-endian format –Strings: len followed by ascii bytes with NULL padded to four-byte boundaries –Arrays: 4-byte size followed by array entries –Opaque: 4-byte len followed by binary data Marshalling and un-marshalling data Extra overhead in data conversion to/from XDR

18 Some NFS V2 RPC Calls NFS RPCs using XDR over, e.g., TCP/IP fhandle: 32-byte opaque data (64-byte in v3) Proc.Input argsResults LOOKUPdirfh, namestatus, fhandle, fattr READfhandle, offset, countstatus, fattr, data CREATEdirfh, name, fattrstatus, fhandle, fattr WRITEfhandle, offset, count, data status, fattr

19 Server Side Example: mountd and nfsd mountd: provides the initial file handle for the exported directory –Client issues nfs_mount request to mountd –mountd checks if the pathname is a directory and if the directory should be exported to the client nfsd: answers the RPC calls, gets reply from local file system, and sends reply via RPC –Usually listening at port 2049 Both mountd and nfsd use underlying RPC implementation

20 NFS V2 Design “Dumb”, “Stateless” servers Smart clients Portable across different OSs Immediate commitment and idempotency of operations Low implementation cost Small number of clients Single administrative domain

21 Stateless File Server? Statelessness –Files are state, but... –Server exports files without creating extra state No list of “who has this file open” (permission check on each operation on open file!) No “pending transactions” across crash Results –Crash recovery is “fast” Reboot, let clients figure out what happened –Protocol is “simple” State stashed elsewhere –Separate MOUNT protocol –Separate NLM locking protocol

22 NFS V2 Operations V2: –NULL, GETATTR, SETATTR –LOOKUP, READLINK, READ –CREATE, WRITE, REMOVE, RENAME –LINK, SYMLINK –READIR, MKDIR, RMDIR –STATFS (get file system attributes)

23 NFS V3 and V4 Operations V3 added: –READDIRPLUS, COMMIT (server cache!) –FSSTAT, FSINFO, PATHCONF V4 added: –COMPOUND (bundle operations) –LOCK (server becomes more stateful!) –PUTROOTFH, PUTPUBFH (no separate MOUNT) –Better security and authentication

24 NFS File Server Failure Issues Semantics of file write in V2 –Bypass UFS file buffer cache Semantics of file write in V3 –Provide “COMMIT” procedure Locking provided by server in V4

25 Design Choices in DFS

26 Topic 1: Name-Space Construction and Organization NFS: per-client linkage –Server: export /root/fs1/ –Client: mount server:/root/fs1 /fs1  fhandle AFS: global name space –Name space is organized into Volumes Global directory /afs; /afs/cs.wisc.edu/vol1/…; /afs/cs.stanford.edu/vol1/… –Each file is identified as fid = –All AFS servers keep a copy of “volume location database”, which is a table of vol_id  server_ip mappings

27 Implications on Location Transparency NFS: no transparency –If a directory is moved from one server to another, client must remount AFS: transparency –If a volume is moved from one server to another, only the volume location database on the servers needs to be updated

28 Topic 2: User Authentication and Access Control User X logs onto workstation A, wants to access files on server B –How does A tell B who X is? –Should B believe A? Choices made in NFS V2 –All servers and all client workstations share the same name space  B send X’s to A Problem: root access on any client workstation can lead to creation of users of arbitrary –Server believes client workstation unconditionally Problem: if any client workstation is broken into, the protection of data on the server is lost; sent in clear-text over wire  request packets can be faked easily

29 User Authentication (cont’d) How do we fix the problems in NFS v2 –Hack 1: root remapping  strange behavior –Hack 2: UID remapping  no user mobility –Real Solution: use a centralized Authentication/Authorization/Access-control (AAA) system

30 Example AAA System: NTLM Microsoft Windows Domain Controller –Centralized AAA server –NTLM v2: per-connection authentication client file server Domain Controller

31 A Better AAA System: Kerberos Basic idea: shared secrets –User proves to KDC who he is; KDC generates shared secret between client and file server client ticket server generates S “Need to access fs” K client [S] file server K fs [S] S: specific to {client,fs} pair; “short-term session-key”; expiration time (e.g. 8 hours) KDC encrypt S with client’s key

32 Kerberos Interactions client ticket server generates S “Need to access fs” K client [S], ticket = K fs [use S for client] file server client ticket=K fs [use S for client], S{client, time} S{time} Why “time”?: guard against replay attack mutual authentication File server doesn’t store S, which is specific to {client, fs} Client doesn’t contact “ticket server” every time it contacts fs KDC

33 Kerberos: User Log-on Process How does user prove to KDC who the user is –Long-term key: 1-way-hash-func(passwd) –Long-term key comparison happens once only, at which point the KDC generates a shared secret for the user and the KDC itself  ticket-granting ticket, or “logon session key” –The “ticket-granting ticket” is encrypted in KDC’s long-term key

34 Operator Batching Should each client/server interaction accomplish one file system operation or multiple operations? Advantage of batched operations How to define batched operations

35 Examples of Batched Operators NFS v3: –READDIRPLUS NFS v4: –COMPOUND RPC calls

36 Summary Functionalities of DFS Implementation of DFS –Client side: VFC interception –Communication: RPC or TCP/UDP –Server side: server daemons DFS name space construction –Mount vs. Global name space DFS access control –NTLM –Kerberos