This is a premium alert message you can set from Layout! Get Now!

Creating and Sharing File System with NFS

Anup
3

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



Post a Comment

3 Comments

Please Select Embedded Mode To show the Comment System.*

Join the conversation(3)
To Top