Mount Diretory from Remote RHEL7 Server (NFS)

Quick Post: To mount a directory via NFS from a RHEL7 remote server:

Souce Host:

[root@sourcehost ~]# cat /etc/exports
/oracle/sharedir targethost(rw,no_root_squash,insecure)
[root@sourcehost ~]# /bin/systemctl restart nfs.service

* Note: The “/bin/systemctl” is the new by RHEL7. For other versions you can just use “service nfs restart”.

Target Host:

[root@targethost ~]# mkdir -p /sourcehost/sharedir
[root@targethost ~]# mount -t nfs sourcehost:/oracle/sharedir /sourcehost/sharedir
[root@srac-his ~]# df -h /sourcehost/sharedir
Filesystem Size Used Avail Use% Mounted on
sourcehost:/oracle/sharedir
100G 279M 100G 1% /sourcehost/sharedir

 

Have a nice weekend!
Matheus.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s