--------------------
ON Storage Server
--------------------
#check the /etc/eports file should be as below
vi /etc/export
/data 172.16.238.10(rw,sync,no_subtree_check,no_root_squash,fsid=0)
/data 172.16.238.11(rw,sync,no_subtree_check,no_root_squash,fsid=0)
/data 172.16.238.12(rw,sync,no_subtree_check,no_root_squash,fsid=0)
check above details in export file( in my case mount directory is "/data" your might different )
#run below command
exportfs -a
#check nfs-server and rpcbind status (if not, start both )
systemctl status nfs-server
systemctl status rpcbind
# Start commands
systemctl start nfs-server
systemctl start rpcbind
# these commands for start the service autumatically when server boot
systemctl enable nfs-server
systemctl enable rpcbind
#run below to check
showmount
-----------------------------
Now on all the APP servers
------------------------------
#check nfs-server and rpcbind status (if not, start both )
# now do the mount part
mount -t nfs ststor01:/data /var/www/html
# verify our mount by using any of below commands
mount | grep nfs
df -h
( do the above steps for all the app servers )
----------------
TESTING
---------------
go to the storage server ( navigate your shared directory on the storage server)
cd /data
#create a text file
touch text.txt
#Now go to each APP server and check inside the /var/www/html
text.txt should be presented if the NFS mount is worked correctly
Commands are correct but based on your question the server and user name, mount directory might differ so please do check.
No comments:
Post a Comment