Linux – Mounting NFS Folder on to a Remote Machine (Both machines are on Red Hat Linux)

linuxmountnfsredhat

I'm a newbie to Linux and would need some advice on the thing I'm trying to achieve with regards to mounting a NFS Folder

I have a NFS Server: usanfsd01 And a remote machine: usafssd01

I've a software installed on my remote machine "usafssdo1" and it takes the files that come into the NFS Server "usanfsd01" as input for execution so I'm thinking I should mount the NFS Server onto the remote machine. Please validate if my thinking is correct.

Also, if I mount the NFS Server on to remote machine using the following command, will it be a permanent mount

mount usanfsdo1:/home/files /home/mount/files

Please let me know if I'm doing anything wrong

Best Answer

The first part is correct.

The second part is not, at least not entirely. The mount will not be permanent but lost after the next reboot.

Add the following line to /etc/fstab instead:

usanfsdo1:/home/files /home/mount/files  nfs    rw  0  0

This mount will be restablished after a reboot. After you first added the line, you can do the initial mount with

mount /home/mount/files