Flipkart

Monday, July 2, 2018

Folder sharing/mount between RHEL/OEL/CentOS Linux 7 server

We will install these packages first

# yum install nfs-utils

Create a folder that need to mount.

# mkdir /old/mount

Give permissions to the folder

# chmod -R 777 /old/mount

IMG13

Run following commands for enabling and start up the services.

systemctl enable rpcbind

systemctl enable nfs-server

systemctl enable nfs-lock

systemctl enable nfs-idmap

systemctl start rpcbind

systemctl start nfs-server

systemctl start nfs-lock

systemctl start nfs-idmap

Open the file and save the content as mentioned below :

# nano /etc/exports

Copy this into file

/old/mount 12.168.72.35(rw,sync,no_root_squash,no_all_squash)

# nano /etc/exports

Copy this into file

/old/mount 12.168.72.201 (rw,sync,no_root_squash,no_all_squash)

Restart nfs server service.

# systemctl restart nfs-server

Allow the nfs service and reload using below command.

firewall-cmd --permanent --zone=public --add-service=nfs

firewall-cmd –reload

Command to mount the folder.

12.168.72.35 :

mount -t nfs 12.168.72.35:/old/mount /old/mount

Once done. Check the mounting using this command.

# df –kh

No comments:

Post a Comment