Configure Linux NFS File System

NFS : Network File System

Before Start Configure NFS you have to Understand When to use it ? and What is it ?

NFS file system usually read from Source Called Server , If this server goes down, it will not be available for the other resource, From this we understand that i should configure NFS On both Side Server and Client.

Read More About it Here.

Note : 

Server IP : 192.168.1.100
Client IP : 192.168.1.101

In this Blog I will Use NFSV4 

1- You need to install two Package ( as root user )
**nfs-ultis-lib
**portmap ( if you are asking nfs4 this is not needed anymore )

2-  As Root Run the below Command to Start nfs Serivces :

[root@TEST share]# /etc/init.d/nfs start
Starting NFS services:                                     [  OK  ]
Starting NFS quotas:                                       [  OK  ]
Starting NFS mountd:                                      [  OK  ]
Stopping RPC idmapd:                                    [  OK  ]
Starting RPC idmapd:                                      [  OK  ]
Starting NFS daemon:                                     [  OK  ]

3- Create folder under /u01/app/shared , give permission to oracle and chmod 775 
4- on NFS Server ( you will own the folder ) , vi /etc/exports add the below line :

/u01/app/shared [Client-IP] (rw,sync,no_root_squash) 

5- NFS Server is done , Go to NFS Client ( Node 2 )  as root user run the below command :

#/etc/init.d/nfs start
#showmount -e 192.168.1.101

The Output Will be like the below :

Export list for 192.168.1.100:
/u01/app/shared 192.168.1.101

6-On Node 2 ( As Root User ) –> #  mount -t nfs 192.168.1.100:/u01/app/shared/ /u01/app/shared/
7- Check using df -h 

**Remove:-

8- umount /u01/app/shared ( on Node 2 ) 

Important Command :
showmount -e : Shows the available shares on your local machine
exportfs -v : Displays a list of shares files and options on a server

Thank you
Osama Mustafa

3 thoughts on “Configure Linux NFS File System

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.