SlideShare una empresa de Scribd logo
1 de 35
Descargar para leer sin conexión
NETWORK FILE SYSTEM
(NFS)

By:
Amruta Udamale
Sequence
 Introduction to NFS
 Version
 NFS basic and protocol- State ,Architecture
 Component

 Different NFS processes
 Working

 Read operation while accessing file from server
 Steps to mount directory from NFS server
Introduction to NFS
•
•
•
•

Developed by Sun Microsystems
Use Distributed File Protocol
Mostly used with UNIX OS
Implement for other OS like
- Mac OS, Microsoft Windows, Novell NetWare, and IBM AS/400

•
•
•
•
•

Allows users to ‘Share’ a directory
RPC-based (uses XDR)
NFS is perfect for a NAS
Opposed to SAMBA
Currently based on VFS
Major Goals
- simple crash recovery
- reasonable performance :80% of a local drive
Sun Protocols in the ISO OSI Model
NFS Overview
Shared
directory

Server

Client
/

/

home

usr

home

usr
bin

bin
a

b

NFS: Export Subtree

c

a

b

c

NFS: Mount a remote file system

The clients 'mount' the shared directory, it becomes part
of their own directory structure.
NFS Version
• NFSv1 (1984)
- develop in-house experimental purpose

• NFSv2 (March 1989)
- Release for commercial use
- UDP, Stateless,32 bit

• NFSv3 (June 1995)
- Overcome to v2
- UDP and TCP, stateless,64bit

• NFSv4 (April 2003)
- Overcome to v2,v3
- Statefull Server
- Use tcp
- Focus on Performance, Accessibility, Scalability, Strong
security, Internationalization, Extensibility
System Structure: Server Type
• Stateless

server

– No information kept for client requests
– Information needed to be provided by the client
– More tolerant to server crashes

• Statefull

server

– maintins information about client Access
– Shorted request messages
– Better performance
– Idempotency easier
– Consistency is easier to achieve
NFS Architecture

• VFS to handle local and remote files common interface
• RPC for data transport
Sun NFS Protocol
Component
1. File Handles
How does the client tell the server which file or directory the operation
applies to? Similarly, how does the server return the result of a lookup?
File handle or fhandle
Determined by the server
Includes all information needed to identify the file/object on the server, and find it
quickly.
Client shouldn’t modify it
Stale File Handle

File Handle(32 Bytes)
volume ID

Index no. of mounted file
system

inode #

No. of file within
file system

generation #

To correctly
identify file
Use of File handle
2. Remote Procedure Call (RPC)

• Initially implementations of RPC was used with the UDP protocol
• Today both UDP and TCP are used
3. External Data Representation
(XDR)
4. Portmapper
Portmapper
2.Request for RPC Service

1.Register Service
<Service, Version, Transport>

Client

4.Contact Service on Port Directly

RPC server
5. NFS Daemon Processes
a.
b.
c.
d.
e.

nfsd daemon
biod daemon
rpc.mount daemon
rpc.lockd daemon
rpc.statd daemon
nfsd Daemon
• Handle incoming RPC requests
• May have multiple nfsd daemons per site
• A nfsd daemon makes kernel calls to do
the real work
• Allows multiple threads
biod Daemon
• Does readahead for clients
- To make use of kernel file buffer cache
• Only improves performance
- NFS works correctly without biod daemon

• Also flushes buffered writes for clients
rpc.mount Daemon
• server implements the MOUNT protocol
• Provides initial file handle for a remote volume
• Also checks that incoming requests are from privileged ports (in
UDP/IP packet source address)
• Protocols used: rpc.mountd [-d] [-f] [-h] [-v]
Mount
Daemon

NFS Client
3 .If ‘YES’ then
return rootfile_handle to
client

checks the list of
currently exported
volumes against the
credentials of NFS client

3.If ‘NOT’ Found
then report to
client with error
rpc.lockd Daemon
• NFS server is stateless, so it does not handle file
locking
• rpc.lockd provides locking
• server crashes and recovers : rpc.lockd reestablish
locks
• Use NFS Lock Manager (NLM) Protocol
• Procedure used:
NLM_NULL, NLM_TEST, NLM_LOCK,
NLM_GRANTED NLM_UNLOCK, NLM_FREE
rpc.statd Daemon
• at client and server
• Used to check status of a machine
• Server’s rpc.lockd asks rpc.statd to store lock info (in
file system)
– And to monitor status of locking machine
• If client crashes, clear its locks from server
• client crashes: rpc.statd contacts client when it
becomes available again
• Use Network Status Monitor (NSM) Protocol
• Procedure used:
SM_NULL,SM_STAT,SM_MON,SM_NOTIFY
Working
NFS Server
Read Operation From Server
Steps to mount directory from NFS server

Server Installation
Creating Share Folder in
Home directory
Setting
Folder’s
Properties
File which you want to mount
in share folder
Edit File with IP address
Select Packages For
Mounting Purpose
After wards do on cmd :sudo getit /etc/fstab
For output :mount /home/share1

At client side
shared file will
appear .Hear we
can see video
which was shared
by server side in
share folder.
Conclusions
• It is ubiquitous.
• It is easy to setup and administer.
• It provides a better solution than the alternative of
not sharing files.
• NFS v4 improves security.
• Alternatives of NFS :
–
–
–
–

Server Message Block (SMB, also known as CIFS) protocol
Apple Filing Protocol (AFP)
NetWare Core Protocol (NCP)
OS/400 File Server file system (QFileSvr.400)
References
• http://en.wikipedia.org/wiki/Network_File_System
• http://www.cs.sunysb.edu/~ezk/cse595s13/nfs/ch1+6.pdf
• http://lass.cs.umass.edu/~shenoy/courses/spring07/
lectures/Lec20.pdf
• http://www.tldp.org/HOWTO/pdf/NFS-HOWTO.pdf
Thank You !!

Más contenido relacionado

La actualidad más candente

Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)Raghu nath
 
Structure of shared memory space
Structure of shared memory spaceStructure of shared memory space
Structure of shared memory spaceCoder Tech
 
Domain name server
Domain name serverDomain name server
Domain name serverMobile88
 
File replication
File replicationFile replication
File replicationKlawal13
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure callSunita Sahu
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsAya Mahmoud
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memoryAshish Kumar
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architectureMaulik Togadiya
 
file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada umardanjumamaiwada
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systemssumitjain2013
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSKathirvel Ayyaswamy
 

La actualidad más candente (20)

Dns presentation
Dns presentationDns presentation
Dns presentation
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
 
Domain name system
Domain name systemDomain name system
Domain name system
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)
 
Dns
DnsDns
Dns
 
Structure of shared memory space
Structure of shared memory spaceStructure of shared memory space
Structure of shared memory space
 
Domain name server
Domain name serverDomain name server
Domain name server
 
File replication
File replicationFile replication
File replication
 
Intro to DNS
Intro to DNSIntro to DNS
Intro to DNS
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
Inter-Process Communication in distributed systems
Inter-Process Communication in distributed systemsInter-Process Communication in distributed systems
Inter-Process Communication in distributed systems
 
Sun NFS , Case study
Sun NFS , Case study Sun NFS , Case study
Sun NFS , Case study
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
Distributed shred memory architecture
Distributed shred memory architectureDistributed shred memory architecture
Distributed shred memory architecture
 
file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada
 
DNS (Domain Name System)
DNS (Domain Name System)DNS (Domain Name System)
DNS (Domain Name System)
 
Samba server
Samba serverSamba server
Samba server
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 

Similar a NFS(Network File System)

Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file systemSyaiful Ahdan
 
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
 
Oracle database might have problems with stale NFSv3 locks upon restart
Oracle database might have problems with stale NFSv3 locks upon restartOracle database might have problems with stale NFSv3 locks upon restart
Oracle database might have problems with stale NFSv3 locks upon restartAshwin Pawar
 
The NFS Version 4 Protocol
The NFS Version 4 ProtocolThe NFS Version 4 Protocol
The NFS Version 4 ProtocolKelum Senanayake
 
Network File System
Network File SystemNetwork File System
Network File SystemDivyang Oza
 
RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)Sumant Garg
 
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) [발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) 동현 김
 
Chapter 05
Chapter 05Chapter 05
Chapter 05cclay3
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptxachutachut
 
Multi-Site Perforce at NetApp
Multi-Site Perforce at NetAppMulti-Site Perforce at NetApp
Multi-Site Perforce at NetAppPerforce
 
Chapter 06
Chapter 06Chapter 06
Chapter 06cclay3
 

Similar a NFS(Network File System) (20)

Linux06 nfs
Linux06 nfsLinux06 nfs
Linux06 nfs
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file system
 
Nf Sp4
Nf Sp4Nf Sp4
Nf Sp4
 
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
 
Oracle database might have problems with stale NFSv3 locks upon restart
Oracle database might have problems with stale NFSv3 locks upon restartOracle database might have problems with stale NFSv3 locks upon restart
Oracle database might have problems with stale NFSv3 locks upon restart
 
The NFS Version 4 Protocol
The NFS Version 4 ProtocolThe NFS Version 4 Protocol
The NFS Version 4 Protocol
 
Network File System
Network File SystemNetwork File System
Network File System
 
RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)RHCE (RED HAT CERTIFIED ENGINEERING)
RHCE (RED HAT CERTIFIED ENGINEERING)
 
Nfs
NfsNfs
Nfs
 
NFS.ppt
NFS.pptNFS.ppt
NFS.ppt
 
M3 nfs fs-3.2.1
M3 nfs fs-3.2.1M3 nfs fs-3.2.1
M3 nfs fs-3.2.1
 
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) [발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
 
Chapter 05
Chapter 05Chapter 05
Chapter 05
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Multi-Site Perforce at NetApp
Multi-Site Perforce at NetAppMulti-Site Perforce at NetApp
Multi-Site Perforce at NetApp
 
Cl116
Cl116Cl116
Cl116
 
Chapter 06
Chapter 06Chapter 06
Chapter 06
 
Penetration Testing Boot CAMP
Penetration Testing Boot CAMPPenetration Testing Boot CAMP
Penetration Testing Boot CAMP
 
FILE SERVER
FILE SERVERFILE SERVER
FILE SERVER
 
File Sever
File SeverFile Sever
File Sever
 

Último

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 

Último (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 

NFS(Network File System)

  • 2. Sequence  Introduction to NFS  Version  NFS basic and protocol- State ,Architecture  Component  Different NFS processes  Working  Read operation while accessing file from server  Steps to mount directory from NFS server
  • 3. Introduction to NFS • • • • Developed by Sun Microsystems Use Distributed File Protocol Mostly used with UNIX OS Implement for other OS like - Mac OS, Microsoft Windows, Novell NetWare, and IBM AS/400 • • • • • Allows users to ‘Share’ a directory RPC-based (uses XDR) NFS is perfect for a NAS Opposed to SAMBA Currently based on VFS Major Goals - simple crash recovery - reasonable performance :80% of a local drive
  • 4. Sun Protocols in the ISO OSI Model
  • 5. NFS Overview Shared directory Server Client / / home usr home usr bin bin a b NFS: Export Subtree c a b c NFS: Mount a remote file system The clients 'mount' the shared directory, it becomes part of their own directory structure.
  • 6. NFS Version • NFSv1 (1984) - develop in-house experimental purpose • NFSv2 (March 1989) - Release for commercial use - UDP, Stateless,32 bit • NFSv3 (June 1995) - Overcome to v2 - UDP and TCP, stateless,64bit • NFSv4 (April 2003) - Overcome to v2,v3 - Statefull Server - Use tcp - Focus on Performance, Accessibility, Scalability, Strong security, Internationalization, Extensibility
  • 7. System Structure: Server Type • Stateless server – No information kept for client requests – Information needed to be provided by the client – More tolerant to server crashes • Statefull server – maintins information about client Access – Shorted request messages – Better performance – Idempotency easier – Consistency is easier to achieve
  • 8. NFS Architecture • VFS to handle local and remote files common interface • RPC for data transport
  • 11. 1. File Handles How does the client tell the server which file or directory the operation applies to? Similarly, how does the server return the result of a lookup? File handle or fhandle Determined by the server Includes all information needed to identify the file/object on the server, and find it quickly. Client shouldn’t modify it Stale File Handle File Handle(32 Bytes) volume ID Index no. of mounted file system inode # No. of file within file system generation # To correctly identify file
  • 12. Use of File handle
  • 13. 2. Remote Procedure Call (RPC) • Initially implementations of RPC was used with the UDP protocol • Today both UDP and TCP are used
  • 14. 3. External Data Representation (XDR)
  • 15. 4. Portmapper Portmapper 2.Request for RPC Service 1.Register Service <Service, Version, Transport> Client 4.Contact Service on Port Directly RPC server
  • 16. 5. NFS Daemon Processes a. b. c. d. e. nfsd daemon biod daemon rpc.mount daemon rpc.lockd daemon rpc.statd daemon
  • 17. nfsd Daemon • Handle incoming RPC requests • May have multiple nfsd daemons per site • A nfsd daemon makes kernel calls to do the real work • Allows multiple threads
  • 18. biod Daemon • Does readahead for clients - To make use of kernel file buffer cache • Only improves performance - NFS works correctly without biod daemon • Also flushes buffered writes for clients
  • 19. rpc.mount Daemon • server implements the MOUNT protocol • Provides initial file handle for a remote volume • Also checks that incoming requests are from privileged ports (in UDP/IP packet source address) • Protocols used: rpc.mountd [-d] [-f] [-h] [-v] Mount Daemon NFS Client 3 .If ‘YES’ then return rootfile_handle to client checks the list of currently exported volumes against the credentials of NFS client 3.If ‘NOT’ Found then report to client with error
  • 20. rpc.lockd Daemon • NFS server is stateless, so it does not handle file locking • rpc.lockd provides locking • server crashes and recovers : rpc.lockd reestablish locks • Use NFS Lock Manager (NLM) Protocol • Procedure used: NLM_NULL, NLM_TEST, NLM_LOCK, NLM_GRANTED NLM_UNLOCK, NLM_FREE
  • 21. rpc.statd Daemon • at client and server • Used to check status of a machine • Server’s rpc.lockd asks rpc.statd to store lock info (in file system) – And to monitor status of locking machine • If client crashes, clear its locks from server • client crashes: rpc.statd contacts client when it becomes available again • Use Network Status Monitor (NSM) Protocol • Procedure used: SM_NULL,SM_STAT,SM_MON,SM_NOTIFY
  • 24. Steps to mount directory from NFS server Server Installation
  • 25. Creating Share Folder in Home directory
  • 27. File which you want to mount in share folder
  • 28.
  • 29. Edit File with IP address
  • 31. After wards do on cmd :sudo getit /etc/fstab
  • 32. For output :mount /home/share1 At client side shared file will appear .Hear we can see video which was shared by server side in share folder.
  • 33. Conclusions • It is ubiquitous. • It is easy to setup and administer. • It provides a better solution than the alternative of not sharing files. • NFS v4 improves security. • Alternatives of NFS : – – – – Server Message Block (SMB, also known as CIFS) protocol Apple Filing Protocol (AFP) NetWare Core Protocol (NCP) OS/400 File Server file system (QFileSvr.400)
  • 34. References • http://en.wikipedia.org/wiki/Network_File_System • http://www.cs.sunysb.edu/~ezk/cse595s13/nfs/ch1+6.pdf • http://lass.cs.umass.edu/~shenoy/courses/spring07/ lectures/Lec20.pdf • http://www.tldp.org/HOWTO/pdf/NFS-HOWTO.pdf