mount multiple folders with nfs4 on centos

Posted by microchasm on Server Fault See other posts from Server Fault or by microchasm
Published on 2010-06-07T14:52:54Z Indexed on 2010/06/07 15:02 UTC
Read the original article Hit count: 285

Filed under:
|

I'm trying to get nfs4 working here.

Machine 1 (server) I have a folder and in it 2 other folders I'm trying to share independently. /shared/folder1 /shared/folder2

Problem is, I can't seem to figure out how to mount the folders independently on the client.

(Machine 1 - server) /etc/exports:

/var/shared/folder1 192.168.200.101(rw,fsid=0,sync)
/var/shared/folder2 192.168.200.101(rw,fsid=0,sync)

...

exportfs -ra

(Machine 2 - client) /etc/fstab:

192.168.200.201:/folder1/ /home/nfsmnt/folder1 nfs4 rw 0 0

...

mount /home/nfsmnt/folder1
mount.nfs4: 192.168.200.201:/folder1/ failed, reason given by server: No such file or directory

The folder is there. I'm positive. I think there is something simple I'm missing, but I'm totally missing it.

It seems like there should be a way in fstab to tell nfs which folder on the server I want to mount. But I can only find references to what looks like a root mount point (e.g. 192.168.1.1:/) which I assume is handled by exports on the server. But even with the folders set up in exports, there doesn't seem to be an apparent way to pich and choose which gets mounted.

Is it not possible to mount separate folders from the same server to different mount points on the client?

Any help appreciated.

© Server Fault or respective owner

Related posts about linux

Related posts about nfs