network file system (nfs)

16
1 Network File System (NFS) Chunyan Zhu 08/16/2000

Upload: jameson-dickerson

Post on 31-Dec-2015

27 views

Category:

Documents


1 download

DESCRIPTION

Network File System (NFS). Chunyan Zhu. 08/16/2000. Introduction. File system is a component of OS. Organization, storage, retrieve, naming,sharing, protection... NFS is designed to be portable across different machine, OS, network architecture, and transport protocols. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Network File System (NFS)

1

Network File System (NFS)

Chunyan Zhu

08/16/2000

Page 2: Network File System (NFS)

2

Introduction

File system is a component of OS. Organization, storage, retrieve, naming,sharing,

protection... NFS is designed to be portable across

different machine, OS, network architecture, and transport protocols.

Three topic : NFS design principles, NFS architecture, Implementation issues.

Page 3: Network File System (NFS)

3

NFS design principle

Transparent Access: Users and applications can access remote files as if they were local.

Portability: NFS is machine and operating system independent.

Fast Recovery From Failure: NFS is designed to recover quickly from system failures and network problems.

Page 4: Network File System (NFS)

4

NFS design principle

Network Protocol Independence: NFS has the ability to run on multiple transport protocols instead of being restricted to just one. This means new protocol in the future will not be a problem for NFS.

Performance: NFS is designed for high performance.

Page 5: Network File System (NFS)

5

NFS architecture

The NFS protocol provides the medium for communication between client and server processes over the network.

Virtual file system.NFS server.NFS client.

Page 6: Network File System (NFS)

6

NFS architecture

ClientComputer

User Processes

UNIX Kernel

Virtual File System

UNIX File System

NFS Client

Disks

ServerComputer

UNIX Kernel

Virtual File System

NFSServer

UNIX FileSystem

Disks

Page 7: Network File System (NFS)

7

Virtual file system

A Virtual File System (VFS) module has been added to the UNIX kernel to distinguish local and remote files. And translate the UNIX-independent file identifiers used by NFS and the internal file identifiers used in UNIX.

The file identifiers used in NFS are called file handlers. ( File system identifier + i-node number of file + i-node generation number)

Page 8: Network File System (NFS)

8

NFS server

The role of the NFS server is to allow its disk file systems to be shared by other machines. The process is called exporting.

To export a file system : The full pathname of the directory to be

exported The client machines that will have access to

the exported directory Any access restrictions

Page 9: Network File System (NFS)

9

NFS client

To access the remote file system in the server, the client needs to specify: The remote host name pathname of a directory in the remote

file system The local name with which it is to be

mounted

Page 10: Network File System (NFS)

10

NFS client

Client/ (root)

home

students

Server/ (root)

export

people

ann bob

Local and remote file systems

Page 11: Network File System (NFS)

11

Implementation issues

Stateless server. A server should not need to maintain any

protocol state information about it’s client A client need only retry a request until the

server responds

Caching. Temporary storage of file data in a fast access local storage called cache. Once file data is cached, client requests go

directly to the cache and do not require a data transfer over the network.

Page 12: Network File System (NFS)

12

Implementation issues

The NFS client can anticipate future data requirements through a process called "read- ahead"

Security model The server must check the user’s identity

against the file’s access permission Sun RPC requires clients to send UNIX user ID.

Page 13: Network File System (NFS)

13

An NFS example on Solaris

Assume the server name is earth.cs.seu.edu and the client name is moon.cs.seu.edu

Page 14: Network File System (NFS)

14

An NFS example on Solaris

NFS Server Processes mountd: Mount requests are handled by the mountd daemon

nsfd: Once a client’s mount request has been valid by mountd, it is allowed to request various file system operations

NFS Client Process automountd: Attach a remote file system to

the local file system

Page 15: Network File System (NFS)

15

An NFS example on Solaris

Exporting file system on server machine Editing file: /etc/dfs/dfstab share -F nfs -o rw=moon.cs.seu.edu /export/people

Mounting file system on client machine Editing file: /etc/vfstabearth.cs.seu.edu:/export/people - /home/student nfs 0 yes rw

Page 16: Network File System (NFS)

16

Summary

Client-server architecture Location and access transparencyStateless serverHigh performance by client caching