linux06 nfs

39
NFS Network File System Jainul A. Musani 1

Upload: jainul-musani

Post on 18-May-2015

350 views

Category:

Education


0 download

DESCRIPTION

Linux NFS

TRANSCRIPT

Page 1: Linux06 nfs

NFSNetwork File System

Jainul A. Musani

1

Page 2: Linux06 nfs

• 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

NFS – Network File System2

Page 3: Linux06 nfs

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

Page 4: Linux06 nfs

• 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 System4

Page 5: Linux06 nfs

• Access to your NFS server can be controlled by the

/etc/host.allow

and

/etc/hosts.deny

NFS – Network File System5

Page 6: Linux06 nfs

• Being graphical you must have the X-window system running able to use the tool

• Redhat icon

AdministrationServer Setting

NFS

NFS – Network File System6

Page 7: Linux06 nfs

• manually configure in following file…

/etc/exports

NFS – Network File System7

Page 8: Linux06 nfs

The NFS daemons are listedOR

The following RPC processesfacilitate NFS services:

NFS – Network File System8

Page 9: Linux06 nfs

• 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

NFS – Network File System9

Page 10: Linux06 nfs

• rpc.rquotad provides user disk quote management

• rpc.statd provides locking services when a remote host reboots.

NFS – Network File System10

Page 11: Linux06 nfs

Currently, there are three versions of NFS...

• NFS version 2 (NFSv2) is older and is widely supported.

NFS Versions11

Page 12: Linux06 nfs

• 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.

NFS Versions12

Page 13: Linux06 nfs

• 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 Protocol13

Page 14: Linux06 nfs

• 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

The NFS Protocol14

Page 15: Linux06 nfs

The NFS Protocol15

Page 16: Linux06 nfs

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

Configure NFS Server16

Page 17: Linux06 nfs

Pre-requisists• Updated /etc/hosts file on both

Linux system• Running portmap and xinetd

services• Firewall should be off on server

Configure NFS Server17

Page 18: Linux06 nfs

Step – 1:• Three rpm are required to configure nfs

server. nfs, portmap, xinetd 

check them if not found then install.

Configure NFS Server18

Page 19: Linux06 nfs

Configure NFS Server19

Page 20: Linux06 nfs

Step – 2:

• Now restart •xinetd and •portmap service

Configure NFS Server20

Page 21: Linux06 nfs

Configure NFS Server21

Page 22: Linux06 nfs

Step – 3:

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

Configure NFS Server22

Page 23: Linux06 nfs

Configure NFS Server23

Page 24: Linux06 nfs

Step – 4: • After reboot verify their status.

It must be in running condition.

Configure NFS Server24

Page 25: Linux06 nfs

Configure NFS Server25

Page 26: Linux06 nfs

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

Configure NFS Server26

Page 27: Linux06 nfs

Configure NFS Server27

Page 28: Linux06 nfs

Step – 6:• now open /etc/exports file 

Configure NFS Server28

Page 29: Linux06 nfs

Step – 7: • share data folder for the network

of 192.168.0.254/24 with read and write access

Configure NFS Server

Step – 8:save file with :wq and exit

29

Page 30: Linux06 nfs

Step – 9: • now restart the nfs service and

also on it with chkconfig.

Configure NFS Server30

Page 31: Linux06 nfs

Configure NFS Server31

Page 32: Linux06 nfs

With X-WindowsNFS Server Configuration Tool

• Must be running X Windows, have root privileges, and have the system-config-nfs RPM package installed.

32

Page 33: Linux06 nfs

With X-WindowsNFS Server Configuration Tool

To start the application, click on System => 

Administration => Server Settings => NFS.

You can also type the command $system-config-nfs

33

Page 34: Linux06 nfs

Configure NFS Server34

Page 35: Linux06 nfs

Configure NFS Server35

Page 36: Linux06 nfs

Configure NFS Server36

Page 37: Linux06 nfs

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

37

Page 38: Linux06 nfs

Configure NFS Server38

Page 39: Linux06 nfs

Thank You !!

39