SlideShare a Scribd company logo
1 of 15
BITS Pilani
Pilani Campus
Data Storage Technologies
& Networks
Dr. Virendra Singh Shekhawat
Department of Computer Science and Information Systems
BITS Pilani, Pilani Campus
Topics
• Network File System protocol (NFS)
– Design goals
– Interface
– NFS Transport
– Operation
2
BITS Pilani, Pilani Campus
What is NFS?
• A remote file system protocol
– Designed and implemented by Sun Microsystems
– Provides Unix-like file system interface and
semantics
• It is implemented as a Client-Server application
– Client part imports file systems (from other
computers)
– Server part exports (local) file systems
• i.e. makes it visible on the network and enables access
from other computers
3
BITS Pilani, Pilani Campus
NFS Design Goals
• Stateless protocol
– Increased robustness – easy recovery from failures
• Support for Unix filesystem semantics
– Also supports other semantics such as MS-DOS
• Protection and Access Control same as Unix
filesystem semantics
• Transport-independent protocol
– Originally implemented on top of UDP
– Easily moved to TCP later
– Has been implemented over many non-IP-based
protocols.
4
BITS Pilani, Pilani Campus
NFS Design Limitations
• Design for clients and servers connected on a
locally fast network.
– Does not work well over slow links nor between
clients and servers with intervening gateways
• Stateless protocol
– Session state is not maintained
5
BITS Pilani, Pilani Campus
NFS- Transport[1]
• Uses a Request – Response model
– Server receives RPC – Remote Procedure Call –
requests from clients
– Can be run on top of stream (e.g. TCP) or datagram
protocol (e.g. UDP)
• Each RPC message may need to be broken into
multiple packets to be sent across the network.
– May typically require up to 6 packets
– May cause problems in UDP – in case of failure,
entire message must be retransmitted
6
BITS Pilani, Pilani Campus
NFS – Transport[2]
• Remote Procedure Call (RPC)
– Client sees a procedure call interface (akin to a local
procedure call)
– But the call (along with the parameters) is marshalled
into a message and sent over the network
• Marshalling may involve serializing
• Server unmarshalls the message (i.e. separates it
into pieces) and processes it as a local operation.
• The result is similarly marshalled by the server and
sent to the client which in turn unmarshalls it.
7
BITS Pilani, Pilani Campus
NFS- Interface
• NFS RPC requests
– Idempotent Operations(i.e. NFS client may send the
same request one or more times without any harmful
side effects)
• GETATTR, SETATTR, LOOKUP, READLINK, READ, WRITE, CREATE,
SYMLINK, READDIR, STATFS
– Non-Idempotent Operations
• REMOVE, RENAME, LINK, MKDIR, RMDIR
• Idempotency is significant because of
– slow links and lost RPC acks.
• Each file on the server is identified by a globally
unique file handle
– created when a lookup is sent by client to server
8
BITS Pilani, Pilani Campus
NFS- Operation[1]
• NFS protocol is stateless
– Each request is independent
• Server need not maintain information about clients and their
requests
• In practice, server caches recently accessed file
data.
– It improves performance
– and is useful for detecting retrials of previously serviced
requests
• Transaction-Commit semantics implies high
overhead:
– Synchronous writes are required for write operations.
9
BITS Pilani, Pilani Campus
NFS- Operation[2]
• NFS is a client-server protocol
– No discovery or registry is used.
• i.e. client must know the server and the filesystem
– Server’s filesystem has to be exported (by
mounting).
• Refer to mount system call on Unix
• Each server has a globally unique id (guid)
• Client application need not distinguish
between local and remote files
– i.e. once a filesystem is mounted applications use
the same interface for both types of files
10
BITS Pilani, Pilani Campus
NFS - Operation[3]
• NFS is a client-server protocol
– File manager part of client file system remains the same
as that for the local file system
• Only the file store is local or remote
• Each remote file that is active manifests as an
nfsnode in the client’s filesystem
– Recall the active file data structures:
• Per-Process File Descriptor
– Kernel File Entry
– vnode
– file-store-specific data structure
» inode for local file store and
» nfsnode for remote filestore
11
BITS Pilani, Pilani Campus
NFS - Operation
• Basic Protocol (Mounting): Client C, Server S
– C (mount process) -----> S(portmap daemon)
• request port address of mountd
– S (portmap daemon) ----> C
• return the port address of its mountd
– C (mount process) ----> S(mountd daemon)
• request mounting of filesystem [pathname]
– S (mountd daemon):
• get file handle for desired mount point from kernel
– S (mountd daemon) ---> C
• return filehandle of mountpoint OR error
12
BITS Pilani, Pilani Campus
NFS - Operation
• Basic Protocol (I/O Operation): Client C, Server S
– C (app. process): write system call
• Data is copied into kernel buffer and call returns
• nfsiod daemon wakes up
– C (nfsiod daemon) -----> S(nfs_rcv)
• Request write [buffer contents]
– S delegates request to nfsd daemon
• nfsd daemon invokes write on disk and waits for I/O
– S (nfsd daemon) ---> C (nfsiod daemon)
• return ack for the write operation
13
BITS Pilani, Pilani Campus
NFSv3 vs NFSv4
• NFSv3
– One RPC per RTT
– Port mapper service required to determine which network
port to listen or connect
– No caching
• NFSv4 features
– Access control lists (similar to Windows ACLs)
– Compound RPCs
– Client side caching
– Operation over TCP port 2049
– Mandating Strong security (Kerberos v5 for cryptographic
services)
14
BITS Pilani, Pilani Campus
Thank You!
15

More Related Content

What's hot (20)

Ftp server
Ftp serverFtp server
Ftp server
 
Ftp.75 to 76
Ftp.75 to 76Ftp.75 to 76
Ftp.75 to 76
 
FTP Client and Server | Computer Science
FTP Client and Server | Computer ScienceFTP Client and Server | Computer Science
FTP Client and Server | Computer Science
 
File Transfer Protocol
File Transfer ProtocolFile Transfer Protocol
File Transfer Protocol
 
FTP Conflict troubleshooting & MINI-LINK TN FTP
FTP Conflict troubleshooting & MINI-LINK TN FTPFTP Conflict troubleshooting & MINI-LINK TN FTP
FTP Conflict troubleshooting & MINI-LINK TN FTP
 
Ftp
FtpFtp
Ftp
 
TFTP
TFTPTFTP
TFTP
 
Ftp
FtpFtp
Ftp
 
FTP
FTPFTP
FTP
 
FTP - File Transfer Protocol
FTP - File Transfer ProtocolFTP - File Transfer Protocol
FTP - File Transfer Protocol
 
Ftp tftp
Ftp tftpFtp tftp
Ftp tftp
 
Ftp
FtpFtp
Ftp
 
File Transfer Protocol - FTP
File Transfer Protocol - FTPFile Transfer Protocol - FTP
File Transfer Protocol - FTP
 
FTP
FTPFTP
FTP
 
File transfer protocol
File transfer protocolFile transfer protocol
File transfer protocol
 
File transfer protocol
File transfer protocolFile transfer protocol
File transfer protocol
 
Ftp (file transfer protocol)
Ftp (file transfer protocol)Ftp (file transfer protocol)
Ftp (file transfer protocol)
 
File Transfer Protocol(ftp)
File Transfer Protocol(ftp)File Transfer Protocol(ftp)
File Transfer Protocol(ftp)
 
File Transfer Protocol(FTP)
File Transfer Protocol(FTP)File Transfer Protocol(FTP)
File Transfer Protocol(FTP)
 
Ftp hari edu
Ftp hari eduFtp hari edu
Ftp hari edu
 

Similar to M3 nfs fs-3.2.1

NFS(Network File System)
NFS(Network File System)NFS(Network File System)
NFS(Network File System)udamale
 
File service architecture and network file system
File service architecture and network file systemFile service architecture and network file system
File service architecture and network file systemSukhman Kaur
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file systemSyaiful Ahdan
 
Networking Chapter 9
Networking Chapter 9Networking Chapter 9
Networking Chapter 9mlrbrown
 
M3 nas architecture-3.1.1
M3 nas architecture-3.1.1M3 nas architecture-3.1.1
M3 nas architecture-3.1.1MrudulaJoshi10
 
Network Fundamentals: Ch3 - Application Layer Functionality and Protocols
Network Fundamentals: Ch3 - Application Layer Functionality and ProtocolsNetwork Fundamentals: Ch3 - Application Layer Functionality and Protocols
Network Fundamentals: Ch3 - Application Layer Functionality and ProtocolsAbdelkhalik Mosa
 
11 distributed file_systems
11 distributed file_systems11 distributed file_systems
11 distributed file_systemslongly
 
NETWORK FILE SYSTEM
NETWORK FILE SYSTEMNETWORK FILE SYSTEM
NETWORK FILE SYSTEMRoshan Kumar
 
Network File System
Network File SystemNetwork File System
Network File SystemDivyang Oza
 
Ccvp plus module 2
Ccvp plus module 2Ccvp plus module 2
Ccvp plus module 2Le Ngoc Viet
 
Update on IRATI technical work after month 6
Update on IRATI technical work after month 6Update on IRATI technical work after month 6
Update on IRATI technical work after month 6Eleni Trouva
 
RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)Sumant Garg
 
Application Layer and Protocols
Application Layer and ProtocolsApplication Layer and Protocols
Application Layer and ProtocolsRubal Sagwal
 

Similar to M3 nfs fs-3.2.1 (20)

Linux06 nfs
Linux06 nfsLinux06 nfs
Linux06 nfs
 
NFS(Network File System)
NFS(Network File System)NFS(Network File System)
NFS(Network File System)
 
File service architecture and network file system
File service architecture and network file systemFile service architecture and network file system
File service architecture and network file system
 
NFS.ppt
NFS.pptNFS.ppt
NFS.ppt
 
Nf Sp4
Nf Sp4Nf Sp4
Nf Sp4
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file system
 
Networking Chapter 9
Networking Chapter 9Networking Chapter 9
Networking Chapter 9
 
M3 nas architecture-3.1.1
M3 nas architecture-3.1.1M3 nas architecture-3.1.1
M3 nas architecture-3.1.1
 
Network Fundamentals: Ch3 - Application Layer Functionality and Protocols
Network Fundamentals: Ch3 - Application Layer Functionality and ProtocolsNetwork Fundamentals: Ch3 - Application Layer Functionality and Protocols
Network Fundamentals: Ch3 - Application Layer Functionality and Protocols
 
11 distributed file_systems
11 distributed file_systems11 distributed file_systems
11 distributed file_systems
 
NETWORK FILE SYSTEM
NETWORK FILE SYSTEMNETWORK FILE SYSTEM
NETWORK FILE SYSTEM
 
Network File System
Network File SystemNetwork File System
Network File System
 
Nfs
NfsNfs
Nfs
 
Basic network training2
Basic network training2Basic network training2
Basic network training2
 
Ccvp plus module 2
Ccvp plus module 2Ccvp plus module 2
Ccvp plus module 2
 
M4 fc stack-4.1.1
M4 fc stack-4.1.1M4 fc stack-4.1.1
M4 fc stack-4.1.1
 
Update on IRATI technical work after month 6
Update on IRATI technical work after month 6Update on IRATI technical work after month 6
Update on IRATI technical work after month 6
 
RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)
 
Application Layer and Protocols
Application Layer and ProtocolsApplication Layer and Protocols
Application Layer and Protocols
 
M4 san features-4.3.1
M4 san features-4.3.1M4 san features-4.3.1
M4 san features-4.3.1
 

More from MrudulaJoshi10

More from MrudulaJoshi10 (15)

M4 rdma 4.5.1
M4 rdma 4.5.1M4 rdma 4.5.1
M4 rdma 4.5.1
 
M4 f co-e_4.4.2
M4 f co-e_4.4.2M4 f co-e_4.4.2
M4 f co-e_4.4.2
 
M4 fc san-4.2.1
M4 fc san-4.2.1M4 fc san-4.2.1
M4 fc san-4.2.1
 
M3 smb cifs-protocol_3.3.1
M3 smb cifs-protocol_3.3.1M3 smb cifs-protocol_3.3.1
M3 smb cifs-protocol_3.3.1
 
M3 nfs fs-_performance_3.2.2
M3 nfs fs-_performance_3.2.2M3 nfs fs-_performance_3.2.2
M3 nfs fs-_performance_3.2.2
 
M2 242-scsi-bus rl-2.4.2
M2 242-scsi-bus rl-2.4.2M2 242-scsi-bus rl-2.4.2
M2 242-scsi-bus rl-2.4.2
 
M2 241-buses rl-2.4.1
M2 241-buses rl-2.4.1M2 241-buses rl-2.4.1
M2 241-buses rl-2.4.1
 
M2 231-io tech-rl_2.3.1
M2 231-io tech-rl_2.3.1M2 231-io tech-rl_2.3.1
M2 231-io tech-rl_2.3.1
 
M2 221-ssd fs-rl_2.2.1
M2 221-ssd fs-rl_2.2.1M2 221-ssd fs-rl_2.2.1
M2 221-ssd fs-rl_2.2.1
 
M2 212-unix fs-rl_2.1.2
M2 212-unix fs-rl_2.1.2M2 212-unix fs-rl_2.1.2
M2 212-unix fs-rl_2.1.2
 
M2 211-unix fs-rl_2.1.1
M2 211-unix fs-rl_2.1.1M2 211-unix fs-rl_2.1.1
M2 211-unix fs-rl_2.1.1
 
M1 rl 1.4.1
M1 rl 1.4.1M1 rl 1.4.1
M1 rl 1.4.1
 
M1 rl 1.3.1
M1 rl 1.3.1M1 rl 1.3.1
M1 rl 1.3.1
 
M1 rl 1.2.1
M1 rl 1.2.1M1 rl 1.2.1
M1 rl 1.2.1
 
M1 rl 1.1.1
M1 rl 1.1.1M1 rl 1.1.1
M1 rl 1.1.1
 

Recently uploaded

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 

Recently uploaded (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 

M3 nfs fs-3.2.1

  • 1. BITS Pilani Pilani Campus Data Storage Technologies & Networks Dr. Virendra Singh Shekhawat Department of Computer Science and Information Systems
  • 2. BITS Pilani, Pilani Campus Topics • Network File System protocol (NFS) – Design goals – Interface – NFS Transport – Operation 2
  • 3. BITS Pilani, Pilani Campus What is NFS? • A remote file system protocol – Designed and implemented by Sun Microsystems – Provides Unix-like file system interface and semantics • It is implemented as a Client-Server application – Client part imports file systems (from other computers) – Server part exports (local) file systems • i.e. makes it visible on the network and enables access from other computers 3
  • 4. BITS Pilani, Pilani Campus NFS Design Goals • Stateless protocol – Increased robustness – easy recovery from failures • Support for Unix filesystem semantics – Also supports other semantics such as MS-DOS • Protection and Access Control same as Unix filesystem semantics • Transport-independent protocol – Originally implemented on top of UDP – Easily moved to TCP later – Has been implemented over many non-IP-based protocols. 4
  • 5. BITS Pilani, Pilani Campus NFS Design Limitations • Design for clients and servers connected on a locally fast network. – Does not work well over slow links nor between clients and servers with intervening gateways • Stateless protocol – Session state is not maintained 5
  • 6. BITS Pilani, Pilani Campus NFS- Transport[1] • Uses a Request – Response model – Server receives RPC – Remote Procedure Call – requests from clients – Can be run on top of stream (e.g. TCP) or datagram protocol (e.g. UDP) • Each RPC message may need to be broken into multiple packets to be sent across the network. – May typically require up to 6 packets – May cause problems in UDP – in case of failure, entire message must be retransmitted 6
  • 7. BITS Pilani, Pilani Campus NFS – Transport[2] • Remote Procedure Call (RPC) – Client sees a procedure call interface (akin to a local procedure call) – But the call (along with the parameters) is marshalled into a message and sent over the network • Marshalling may involve serializing • Server unmarshalls the message (i.e. separates it into pieces) and processes it as a local operation. • The result is similarly marshalled by the server and sent to the client which in turn unmarshalls it. 7
  • 8. BITS Pilani, Pilani Campus NFS- Interface • NFS RPC requests – Idempotent Operations(i.e. NFS client may send the same request one or more times without any harmful side effects) • GETATTR, SETATTR, LOOKUP, READLINK, READ, WRITE, CREATE, SYMLINK, READDIR, STATFS – Non-Idempotent Operations • REMOVE, RENAME, LINK, MKDIR, RMDIR • Idempotency is significant because of – slow links and lost RPC acks. • Each file on the server is identified by a globally unique file handle – created when a lookup is sent by client to server 8
  • 9. BITS Pilani, Pilani Campus NFS- Operation[1] • NFS protocol is stateless – Each request is independent • Server need not maintain information about clients and their requests • In practice, server caches recently accessed file data. – It improves performance – and is useful for detecting retrials of previously serviced requests • Transaction-Commit semantics implies high overhead: – Synchronous writes are required for write operations. 9
  • 10. BITS Pilani, Pilani Campus NFS- Operation[2] • NFS is a client-server protocol – No discovery or registry is used. • i.e. client must know the server and the filesystem – Server’s filesystem has to be exported (by mounting). • Refer to mount system call on Unix • Each server has a globally unique id (guid) • Client application need not distinguish between local and remote files – i.e. once a filesystem is mounted applications use the same interface for both types of files 10
  • 11. BITS Pilani, Pilani Campus NFS - Operation[3] • NFS is a client-server protocol – File manager part of client file system remains the same as that for the local file system • Only the file store is local or remote • Each remote file that is active manifests as an nfsnode in the client’s filesystem – Recall the active file data structures: • Per-Process File Descriptor – Kernel File Entry – vnode – file-store-specific data structure » inode for local file store and » nfsnode for remote filestore 11
  • 12. BITS Pilani, Pilani Campus NFS - Operation • Basic Protocol (Mounting): Client C, Server S – C (mount process) -----> S(portmap daemon) • request port address of mountd – S (portmap daemon) ----> C • return the port address of its mountd – C (mount process) ----> S(mountd daemon) • request mounting of filesystem [pathname] – S (mountd daemon): • get file handle for desired mount point from kernel – S (mountd daemon) ---> C • return filehandle of mountpoint OR error 12
  • 13. BITS Pilani, Pilani Campus NFS - Operation • Basic Protocol (I/O Operation): Client C, Server S – C (app. process): write system call • Data is copied into kernel buffer and call returns • nfsiod daemon wakes up – C (nfsiod daemon) -----> S(nfs_rcv) • Request write [buffer contents] – S delegates request to nfsd daemon • nfsd daemon invokes write on disk and waits for I/O – S (nfsd daemon) ---> C (nfsiod daemon) • return ack for the write operation 13
  • 14. BITS Pilani, Pilani Campus NFSv3 vs NFSv4 • NFSv3 – One RPC per RTT – Port mapper service required to determine which network port to listen or connect – No caching • NFSv4 features – Access control lists (similar to Windows ACLs) – Compound RPCs – Client side caching – Operation over TCP port 2049 – Mandating Strong security (Kerberos v5 for cryptographic services) 14
  • 15. BITS Pilani, Pilani Campus Thank You! 15