HOME > > Creating and Sharing File System with NFS

Creating and Sharing File System with NFS

Anup - Monday, October 15, 2012

Creating and Sharing File System with NFS


Primary Node
Second Node
Third Node
Host
Prod.indiandba.com
Apps1.indinadba.com
Apps2.indiandba.com
IP
192.168.137.10
192.168.137.20
192.168.137.30
Mount Point
/applprod (Shared)
/applprod (mounted from primary node)
/applprod (mounted from primary node)

Goal:

Here we create shared mount point (/applprod) on Primary Node and it should be shared across all the nodes. We can be achieve through NFS (Network File System)


Steps:

1.    In primary system (prod.indiandba.com), login as root add an entry of the folder (/applprod) which is being shared in the /etc/exports file as shown below

/applprod 192.168.137.20(rw,sync)

/applprod 192.168.137.30(rw,sync)

Note: The 'rw' indicates that the folder is being shared with read write permission and 'sync' indicates that target should be synchronized with source always.


2.    Once the entry is made, restart the NFS services in the primary node to bring the changes to effect. as root - /sbin/service nfs restart

3.    In the 'apps1.indinadba.com' and ‘apps2.indiandba.com’ host machine create the mount point same as the 'prod.indiandba.com' node. i.e /applprod

4.    As a root mount the folder to the local folder – mount 192.168.137.10:/applprod /applprod

5.    To keep the folder to be mounted even after the secondary node restarts, add a entry in /etc/fstab of secondary node.
192.168.137.10:/applprod /applprod nfs rw 0 0



goutham said...
This comment has been removed by the author.
goutham said...

hi Anup
can you please show us demo of this shared NFS file system if possible.



thanks
goutham

Anup said...

Hi Gautham,
Thanks for Comment.
I can show on Team Viewer. if possible share your mail id?

Anup

Contact me

Get in Touch

Need to get touch with me? Please fill out the form with your enquiry.

Name
Anup Srivastav
Address
Lucknow - Utter Pradesh
Email
myindiandba@gmail.com
Message me