SlideShare a Scribd company logo
NFS
Network
File
System

Jainul A. Musani

1
NFS – Network File System
• A Network File System (NFS) allows
remote hosts to mount file systems over
a network and access those file systems as
they are mounted locally.
• NFS operates over TCP/IP network.
• NFS enables you to mount a file system on a
remote computer.
• Directly access any of the files on that
remote file system

2
NFS – Network File System
Example:
if you were using a computer
linked to a second computer via
NFS, you could access files on the
second computer as if they resided
in a directory on the first computer.
NFS – Network File System

4

• This is accomplished through the
processes of exporting (the process
by which an NFS server provides
remote clients with access to its files)
and mounting (the process by which
file systems are made available to
the operating system and the user).
NFS – Network File System
• Access to your NFS server can be
controlled by the
/etc/host.allow
and
/etc/hosts.deny

5
NFS – Network File System
• Being graphical you must have the
X-window system running able to
use the tool
• Redhat icon
Administration
Server Setting
NFS

6
NFS – Network File System
• manually configure in following
file…

/etc/exports

7
8

NFS – Network File System
The NFS daemons are listed
OR
The following RPC processes
facilitate NFS services:
NFS – Network File System
• rpc.nfsd  receives NFS requests
from remote system
• rpc.mountd  performs requested
mount & unmount operations
• rpc.portmapper  maps remote
request to the appropriate NFS
daemon

9
NFS – Network File System
• rpc.rquotad  provides user
disk quote management
• rpc.statd  provides locking
services when a remote host
reboots.

10
NFS Versions

11

Currently, there are three versions
of NFS...
• NFS version 2 (NFSv2)  is older
and is widely supported.
NFS Versions
• NFS version 3 (NFSv3)  has more
features, including 64bit file handles, Safe
Async writes and more robust error
handling.
• NFS version 4 (NFSv4)  works through
firewalls and on the Internet, no longer
requires portmapper, supports ACLs, and
utilizes stateful operations.

12
The NFS Protocol

13

• Each relies on Remote Procedure
Calls(RPC) and Portmap(also called
rpc.portmap).
• An RPC server tells portmap which
port will be used and the managed RPC
number.
The NFS Protocol
• A client contacts portmap to get
port number of desired server
program.
• RPC packets are addressed to the
corresponding port
• Use the rpcinfo -p command to
obtain details on services

14
The NFS Protocol

15
Configure NFS Server
Pre-requisists
• A Linux server with
IP address  192.168.0.254 and
hostname  Server
• A linux client with
IP address  192.168.0.1 and
hostname  Client1

16
Configure NFS Server
Pre-requisists
• Updated /etc/hosts file on both
Linux system
• Running portmap and xinetd
services
• Firewall should be off on server

17
Configure NFS Server

18

Step – 1:
• Three rpm are required to configure nfs
 server. nfs,
 portmap,
 xinetd

check them if not found then
install.
Configure NFS Server

19
Configure NFS Server
Step – 2:

• Now restart
•xinetd and
•portmap service

20
Configure NFS Server

21
Configure NFS Server
Step – 3:

• To keep on these services after
reboot on then
via chkconfig command

22
Configure NFS Server

23
Configure NFS Server
Step – 4:
• After reboot verify their status.
It must be in running condition.

24
Configure NFS Server

25
Configure NFS Server

26

• Step-5 :
now create a /data directory and
grant full permission to it.
Configure NFS Server

27
Configure NFS Server
Step – 6:
• now open /etc/exports file

28
Configure NFS Server
Step – 7:
• share data folder for the network
of 192.168.0.254/24 with read
and write access
Step – 8:
save file with :wq and exit

29
Configure NFS Server
Step – 9:
• now restart the nfs service and
also on it with chkconfig.

30
Configure NFS Server

31
32

NFS Server Configuration Tool
With X-Windows
• Must be running X Windows,
have root privileges, and have the
system-config-nfs RPM package
installed.
33

NFS Server Configuration Tool
With X-Windows
 To start the application, click on
System =>
Administration =>
Server Settings => NFS.
 You can also type the command

$system-config-nfs
Configure NFS Server

34
Configure NFS Server

35
Configure NFS Server

36
Configure NFS Server
•Add Share
•The General Options tab allows the following
•options to be configured:

37
Configure NFS Server

38
T hank
You !
!

39

More Related Content

Linux06 nfs

  • 2. NFS – Network File System • A Network File System (NFS) allows remote hosts to mount file systems over a network and access those file systems as they are mounted locally. • NFS operates over TCP/IP network. • NFS enables you to mount a file system on a remote computer. • Directly access any of the files on that remote file system 2
  • 3. NFS – Network File System Example: if you were using a computer linked to a second computer via NFS, you could access files on the second computer as if they resided in a directory on the first computer.
  • 4. NFS – Network File System 4 • This is accomplished through the processes of exporting (the process by which an NFS server provides remote clients with access to its files) and mounting (the process by which file systems are made available to the operating system and the user).
  • 5. NFS – Network File System • Access to your NFS server can be controlled by the /etc/host.allow and /etc/hosts.deny 5
  • 6. NFS – Network File System • Being graphical you must have the X-window system running able to use the tool • Redhat icon Administration Server Setting NFS 6
  • 7. NFS – Network File System • manually configure in following file… /etc/exports 7
  • 8. 8 NFS – Network File System The NFS daemons are listed OR The following RPC processes facilitate NFS services:
  • 9. NFS – Network File System • rpc.nfsd  receives NFS requests from remote system • rpc.mountd  performs requested mount & unmount operations • rpc.portmapper  maps remote request to the appropriate NFS daemon 9
  • 10. NFS – Network File System • rpc.rquotad  provides user disk quote management • rpc.statd  provides locking services when a remote host reboots. 10
  • 11. NFS Versions 11 Currently, there are three versions of NFS... • NFS version 2 (NFSv2)  is older and is widely supported.
  • 12. NFS Versions • NFS version 3 (NFSv3)  has more features, including 64bit file handles, Safe Async writes and more robust error handling. • NFS version 4 (NFSv4)  works through firewalls and on the Internet, no longer requires portmapper, supports ACLs, and utilizes stateful operations. 12
  • 13. The NFS Protocol 13 • Each relies on Remote Procedure Calls(RPC) and Portmap(also called rpc.portmap). • An RPC server tells portmap which port will be used and the managed RPC number.
  • 14. The NFS Protocol • A client contacts portmap to get port number of desired server program. • RPC packets are addressed to the corresponding port • Use the rpcinfo -p command to obtain details on services 14
  • 16. Configure NFS Server Pre-requisists • A Linux server with IP address  192.168.0.254 and hostname  Server • A linux client with IP address  192.168.0.1 and hostname  Client1 16
  • 17. Configure NFS Server Pre-requisists • Updated /etc/hosts file on both Linux system • Running portmap and xinetd services • Firewall should be off on server 17
  • 18. Configure NFS Server 18 Step – 1: • Three rpm are required to configure nfs  server. nfs,  portmap,  xinetd check them if not found then install.
  • 20. Configure NFS Server Step – 2: • Now restart •xinetd and •portmap service 20
  • 22. Configure NFS Server Step – 3: • To keep on these services after reboot on then via chkconfig command 22
  • 24. Configure NFS Server Step – 4: • After reboot verify their status. It must be in running condition. 24
  • 26. Configure NFS Server 26 • Step-5 : now create a /data directory and grant full permission to it.
  • 28. Configure NFS Server Step – 6: • now open /etc/exports file 28
  • 29. Configure NFS Server Step – 7: • share data folder for the network of 192.168.0.254/24 with read and write access Step – 8: save file with :wq and exit 29
  • 30. Configure NFS Server Step – 9: • now restart the nfs service and also on it with chkconfig. 30
  • 32. 32 NFS Server Configuration Tool With X-Windows • Must be running X Windows, have root privileges, and have the system-config-nfs RPM package installed.
  • 33. 33 NFS Server Configuration Tool With X-Windows  To start the application, click on System => Administration => Server Settings => NFS.  You can also type the command $system-config-nfs
  • 37. Configure NFS Server •Add Share •The General Options tab allows the following •options to be configured: 37