I am working on two virtual machines, running Ubuntu 14.04. So, one VM is the server and the other the client. Here's what I've done till now:
Server VM:
sudo apt-get install nfs-kernel-server
sudo nano /etc/exports
I added:
/home/mnt_dir *(rw,sync)
sudo chmod 777 /home/mnt_dir
service nfs-kernel-server restart
Client VM:
sudo apt-get install nfs-common
sudo mount -v -t nfs server_ip:/home/mnt_dir /home/mnt_dir
and everything works fine. Then I need to unmount them so I run the command on the client VM:
sudo umount -l /home/mnt_dir/
Just to be sure I run the above command again and the output message is
umount: /home/mnt_dir: not mounted
The problem is that although I get the above message, changes on the one VM still apply to the other VM, like the directories are still mounted. Why is this happening?
edit: I noticed that in order to mount/umount work properly, I need to run a simple cd command. Any ideas about that?