SOFTWARE ARCHITECTURE 11. DISTRIBUTED FILE SYSTEM.

Similar documents
21.1 FTP. Connections

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

TFTP and FTP Basics BUPT/QMUL

DFS Case Studies, Part 1

Introduction. Distributed file system. File system modules. UNIX file system operations. File attribute record structure

Distributed File Systems. File Systems

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

Part 5: FTP More about this course about Internet

Table of Contents 1 FTP Configuration Commands TFTP Configuration Commands 2-1

Table of Contents 1 FTP Configuration Commands TFTP Configuration Commands 2-1

Homework Number 2 Solutions

Contents. TFTP configuration commands 29 display tftp client configuration 29 tftp-server acl 29 tftp 30 tftp client source 32 tftp ipv6 33

Chapter 8: Distributed File Systems. Introduction File Service Architecture Sun Network File System The Andrew File System Recent advances Summary

Contents. TFTP configuration commands 28 display tftp client configuration 28 tftp-server acl 28 tftp 29 tftp client source 30 tftp ipv6 31

NWG/RFC# 640 JBP NJN 5-JUN-74 16: Revised FTP Reply Codes. Jon Postel 19 JUN 75. Revised FTP Reply Codes 1

GridFTP: FTP Extensions for the Grid

Introduction. Chapter 8: Distributed File Systems

$ftp = Net::FTP->new("some.host.name", Debug => 0) or die "Cannot connect to some.host.name:

Outline of Lecture 3 Protocols

SOFTWARE ARCHITECTURE SUMMARY. Tatsuya Hagino

Chapter 8 Distributed File Systems

June This paper assumes knowledge of the following protocols described in the ARPA Internet Protocol Handbook.

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

$ftp = Net::FTP->new("some.host.name", Debug => 0) or die "Cannot connect to some.host.name:

Distributed File Systems

The Application Layer HTTP and FTP

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

Distributed File Systems

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

Detailed Design. TCP/IP Packet Descriptor

Distributed File Systems

Preliminary Design. Systems Administrator Computer Science Department of Siena College. TCP/IP Packet Descriptor

Contents. FTP commands 1

CSMC 412. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 2. September 15 CMSC417 Set 2 1

Filesystems Lecture 11

CS408: Black-box Testing

Operating Systems Design 16. Networking: Remote File Systems

Internet Engineering Task Force (IETF) Request for Comments: Category: Standards Track ISSN: March 2010

Request for Comments: 913 September 1984

416 Distributed Systems. Distributed File Systems 1: NFS Sep 18, 2018

DISTRIBUTED FILE SYSTEMS & NFS

UNIT V Distributed File System

File Servant User Manual

Chapter 7: File-System

CSE 486/586: Distributed Systems

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

Filesystems Lecture 13

Request for Comments: 454 NIC: February Meeting Announcement and a New Proposed Document

Distributed File Systems. CS432: Distributed Systems Spring 2017

System that permanently stores data Usually layered on top of a lower-level physical storage medium Divided into logical units called files

Distributed file systems

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

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

Computer Networks Prof. Ashok K. Agrawala

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

Analyzing FTP Communications

Chapter 11: File-System Interface

Lab 4: Services, Logging and Intrusions

Appendix. Web Command Error Codes. Web Command Error Codes

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING. Subject: NETWORK PROTOCOLS UNIT I (2 MARKS)

Distributed File Systems: Design Comparisons

Chapter 11: File System Implementation

SOFTWARE ARCHITECTURE

Chapter 11: File System Implementation

Chapter 11: Implementing File Systems

NFS Design Goals. Network File System - NFS

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

Distributed Systems. Distributed File Systems. Paul Krzyzanowski

Configuring Traffic Policies

Revision control systems (RCS) and. Subversion

FILE EXCHANGE PROTOCOLS AND ZERO CONFIGURATION NETWORKING

Global Information Assurance Certification Paper. Copyright SANS Institute Author Retains Full Rights

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

Distributed File Systems. Jonathan Walpole CSE515 Distributed Computing Systems

File-System Interface

Distributed File Systems I

OPERATING SYSTEM. Chapter 12: File System Implementation

Part Four - Storage Management. Chapter 10: File-System Interface

Chapter 11: Implementing File Systems

Chapter 11: Implementing File Systems

Application-layer Protocols and Internet Services

Network File Systems

Today: Distributed File Systems. File System Basics

Storage and File Hierarchy

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

Admin Guide ( Unix System Administration )

Lecture 10 File Systems - Interface (chapter 10)

Today: Distributed File Systems

COS 318: Operating Systems

WebDAV. Overview. File Permissions and Management. Authentication Methods

WWW: the http protocol

BIG-IP Access Policy Manager : Portal Access. Version 13.0

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

OPERATING SYSTEMS II DPL. ING. CIPRIAN PUNGILĂ, PHD.

User Exits CHAPTER. Table 5-1 Defined User Exit Points

BIG-IP Access Policy Manager : Portal Access. Version 12.1

CS 470 Spring Distributed Web and File Systems. Mike Lam, Professor. Content taken from the following:

2/9/2013 LAB OUTLINE INTRODUCTION TO VCS WHY VERSION CONTROL SYSTEM(VCS)? II SENG 371 SOFTWARE EVOLUTION VERSION CONTROL SYSTEMS

Distributed Systems - III

File-System Structure

Transcription:

1 SOFTWARE ARCHITECTURE 11. DISTRIBUTED FILE SYSTEM Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/

2 File Sharing Online Storage Use Web site for upload and download files. Use special client software. Dropbox, Google drive, Sky drive, icloud, etc. File Sharing Application Use FTP for upload and download files. Use P2P file sharing software. Used in a groupware. Some does version management. File Sharing by OS Share remote files like local files. Access transparency

3 Online Storage Place files in Internet Cloud. Use Web interface to manipulate (upload, download, rename, delete, share with others, etc.) Special software may be used to automatically synchronize with local folders. Use accounts or URL to share files with others. Internet Cloud Online Storage Upload File to share mail URL Download

4 Automatic Synchronization Special software for synchronization Each online storage has own synchronization software. When local files are changed, they are automatically uploaded. When online storage files are changed, they are automatically downloaded. Mechanism Periodically compare the local folder and the online storage. Update when there are changes. If not connected to Internet, no update. Update when connected. Internet Cloud local folder synchronize online storage

5 Merging Modifications When a file is shared by multiple people: Multiple people may change the same file. When different lines are changed: merge changed can be done automatically When the same line is changed: if the change is the same, no problem. if it is different, conflict needs to be sorted manually. online storage merge receive receive line 3 change line 8 change line 3 and 8 are changed online storage conflict line 3 changed line 8 changed line 5 changed line 5 changed

6 Version Control System Manage file changes. Revision control. Can revert the change. Can create branches. Necessary for large scale software development. Version control system RCS (Revision Control System) CVS (Concurrent Versions System) Subversion (svn) git check out repository edit check in local copy version 2 version 2.1 branch merge version 1 version 1.1 version 1.2 version 3 revert the change version 1.3

7 File Sharing Application Use file transfer program Get files from a server, edit them and put them back to the server. File transfer protocol FTP (File Transfer Protocol) remote file manipulation HTTP (Hyper Text Transfer Protocol) Web page protocol remote file manipulation with WebDAV extension upload file server download remote manipulation create a folder delete a file rename a file

8 FTP File Transfer Protocol One of the oldest protocols TCP port 20 and 21 control client control Client server model Use two connections Control connection: commands Data connection: data transfer for control port 21 server data connection BFTP (Background FTP) file system server FTP client for data transfer port 20 FTP server

Data Transfer Function Data type ASCII <CR><LF> for end of line IMAGE or BINARY records are padded with 0 File format none print Telnet format control <CR>, <LF>, <NL>, <FF> carriage control the first letter controls: blank normal line 0 double space line 1 new page + overwrite the same line File structure Byte structure No internal structure Each file is a sequence of bytes. Record structure Each file consists of a set of records. Page structure Random access file 9

10 FTP Transfer Mode Stream mode TCP stream as data 0xff is used for ESC letter Block mode 0xff 0x01 0xff 0x02 0xff 0x03 0xff 0xff End Of Record End Of File EOR and EOF 0xff itself identifier (8 bit) byte count (16 bit) data block Compress mode identifier 0x80 0x40 0x20 0x10 meaning End Of Record End Of File Error might be in data Restart marker 0 N data 1 data 2 data N 1 0 N data to copy N copy of data 1 1 N N copy of blank

11 FTP Control Command (1) Access Transfer parameter command meaning command meaning USER PASS ACCT CWD CDUP SMNT REIN LOGOUT user name password account information change working directory change to parent directory mount reinitialize logout PORT PASV TYPE STRU MODE data connection host port passive listener port data type ASCII BINARY file structure F (byte structure) R (record structure) P (page structure) transfer mode S (stream mode) B (block mode) C (compress mode)

FTP Control Command (2) Service command RETR STOR STOU APPE ALLO REST RNFR RNTO ABOR meaning Get or retrieve a file Put or store a file STOR with unique name append allocate a new file skip to the restart marker rename from rename to abort transfer command DELE RMD MKD PWD LIST NLST SITE SYST STAT HELP NOOP delete a file meaning delete a directory make a directory 12 show current working directory list files in the current working directory LIST with options execute command get system name get current status show FTP commands no operation

13 FTP Reply Format 3 letter code + text client request: command reply: xyz + text server The first letter 1yz positive preliminary reply 2yz positive completion reply 3yz positive intermediate reply 4yz transient negative completion reply 5yz permanent negative completion reply 6yz protected reply The second letter x0z syntax x1z information x2z connection x3z authentication and accounting x5z file system

14 FTP Session Example Client opens TCP control connection (port 21) Login with USER and PASS client Specify file by RETR control connection 20 Specify data connection port by PORT Server connects to the data connection port. USER PASS RETR file PORT 20 Transfer data from server to client. QUIT 21 server data connection

15 FTP Passive Mode Example Client open TCP control connection (port 20) Login with USER and PASS Specify file with RETR Specify data connection port by PASV Server waits at the data connection port Client connects the data connection port Transfer data from server to client QUIT control connection 21 client USER PASS RETR file PASV 20 server data connection 20

16 FTP Security issue: PASS send the password as plain text Should be careful to use on Internet Anonymous FTP USER anonymous or ftp PASS for mail address (no authentication) Used for distributing free software HTTP is known as an improved version of Anonymous FTP. Web browser is often capable of an anonymous FTP client.

17 File Sharing by OS UNIX NFS Network File System Sun Microsystems (now Oracle) developed AFS Andrew File System CMU developed Windows SMB protocol (its extension CIFS) Server Message Block, Common Internet File System IBM designed for NetBIOS Microsoft extended as CIFS Mac OS AFP Apple Filing Protocol One of AppleTalk protocol `AFP over TCP' for TCP/IP

18 NFS (Network File System) Distributed file sharing protocol for UNIX Sun Microsystems developed Competed once with RFS (Remote File Sharing) developed by AT&T, but NFS won. Mount a remote file server tree like a local disk. Sever exports file system sub trees Originally UDP protocol, now available for TCP port 2049 server / client / usr home hagino ns usr home hagino ns remote mount

19 NFS Transparency Access transparency Any distributed file system needs to have access transparency. Location transparency Name space is local Can be mounted anywhere Failure transparency Stateless Can retry failed operations Performance transparency Use cache for improving performance No replication transparency NFS server cannot be replicated. No concurrent transparency Remote files cannot be locked. No scale transparency NFS for one organization. Users need to be managed. Use NIS (YP) for user management.

20 NFS Implementation (1) VFS (Virtual File System) layer switches local and remote file systems. VFS UFS NFS network

21 NFS Implementation (2) Use Sun RPC Use XDR (External Data Representation) to represent network data. NFS client NFS server Sun RPC Sun RPC XDR XDR

22 NFS Protocol Interface lookup(dirfh, name) fh, attr create(dirfh, name, attr) newfh, attr remove(dirfh, name) status getattr(fh) attr setattr(fh, attr) attr read(fh, offset, count) attr,data write(fh, offset, count, data) attr rename(dirfh, name, todirfh, toname) status link(newdirfh, newname, dirfh, name) status symlink(newdrfh, newname, string) status readlink(fh) string mkdir(dirfh, name, attr) newfh, attr readdir(dirfh, cookie, count) entries rmdir(dirfh, name) status statfs(fh) fsstatus

23 VFS Virtual File System For local file system, an i-node number is used to identify a file. i-node = index node NFS uses a file handle for identification of each file. file system identifier i-node number of the file i-node generation number File handle is opaque (not transparent) Client should not look inside the file handle. Capability token for accessing the file. file system identifier i-nodenumber i-nodegeneration number

24 NFS Cache NFS client caches file blocks. Need to check consistency of cached blocks. Server does not notify clients about change. (stateless server) For ordinary files, cache TTL is 3 seconds. For directories, cache TTL is 30 seconds. client server consistency check cache file

25 Stateless vs Statefull NFS server does not mange NFS client state High failure transparency Use cache for performance Cannot lock files on NFS UNIX file semantics may not be applied to remote files. Statefull After failure recovery, server needs to know all the client state. May support locking files. Sever can be replicated. RFS tried to keep UNIX file semantics for remote files.

26 AFS (Andrew File System) Developed by CMU (Carnegie Mellon University) Share files amount 5000 workstations on campus Features Cache whole files Use kerberos for authentication Can set ACL (Access Control List) to directories Can share files among different organizations. Keio used to share files with CMU using AFS.

27 AFS 1. Client opens a file. 2. Create a replication of the file in the local cache. If the cache is up-to-date, no need to replicate. Server needs to manage replication. 3. Modify the file in the cache locally. program 4. Client closes the use of the file. 5. Write back the modification. Keep the replicated file. The entire file is overwritten by the last write. client cache create replication when open write back modification when close file server

28 NFS vs AFS Features NFS Stateless High failure transparency Can be used on various platforms (windows, mac,...) AFS Server can mange replication. Can share files beyond one organization. Kerberos authentication Can set ACL to directories. Coda for mobile environment Issues No replication Limited in one organization User authentication is left to OS. No ACL ACL is complicated. Less failure transparency Performance problem for replication

29 Summary File sharing using online storage Web interface Dropbox, Google Drive, Sky Drive, icloud, etc. Automatic synchronization software File sharing by file transfer program FTP File sharing by OS Distributed file system NFS AFS