[opensuse] NFSv4 configuration
Hi All, I'm trying to set up NFSv4 shares on my home network. On the server (zeus) I have the following in /etc/exports: zeus:/home/dylan # cat /etc/exports /srv/NFS4 *(fsid=0,crossmnt,ro,root_squash,sync,no_subtree_check) /srv/NFS4/dylan *(bind=/home/dylan,rw,root_squash,sync,no_subtree_check) /srv/NFS4/sdc *(bind=/media/sdc,rw,root_squash,sync,no_subtree_check) /srv/NFS4/sdd *(bind=/media/sdd,rw,root_squash,sync,no_subtree_check) and the latter three directories are, indeed, bound in the NFS4 directory. On the client (zen), the relevant entries in /etc/fstab are: zen:/media/zeus # cat /etc/fstab [SNIP] zeus:/srv/NFS4 /media/zeus nfs4 defaults 0 0 zeus:/srv/NFS4/dylan /media/zeus/dylan nfs4 defaults 0 0 zeus:/srv/NFS4/sdc /media/zeus/sdc nfs4 defaults 0 0 zeus:/srv/NFS4/sdd /media/zeus/sdd nfs4 defaults 0 0 Both machines have the same setting for the NFSv4 domain (localdomain) and ps reports that rpcbind, rpc.idmapd and rpc.statd are running on both client and server. When I try to mount any of the directories I get a "No such file or directory" error, for example: zen:/media/zeus # mount /media/zeus mount.nfs4: mounting zeus:/srv/NFS4 failed, reason given by server: No such file or directory What am I missing here? Thanks Dylan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, 2013-09-05 at 15:54 +0100, Dylan wrote:
Hi All,
I'm trying to set up NFSv4 shares on my home network. On the server (zeus) I have the following in /etc/exports:
zeus:/home/dylan # cat /etc/exports /srv/NFS4 *(fsid=0,crossmnt,ro,root_squash,sync,no_subtree_check) /srv/NFS4/dylan *(bind=/home/dylan,rw,root_squash,sync,no_subtree_check) /srv/NFS4/sdc *(bind=/media/sdc,rw,root_squash,sync,no_subtree_check) /srv/NFS4/sdd *(bind=/media/sdd,rw,root_squash,sync,no_subtree_check)
and the latter three directories are, indeed, bound in the NFS4 directory.
On the client (zen), the relevant entries in /etc/fstab are:
zen:/media/zeus # cat /etc/fstab [SNIP] zeus:/srv/NFS4 /media/zeus nfs4 defaults 0 0 zeus:/srv/NFS4/dylan /media/zeus/dylan nfs4 defaults 0 0 zeus:/srv/NFS4/sdc /media/zeus/sdc nfs4 defaults 0 0 zeus:/srv/NFS4/sdd /media/zeus/sdd nfs4 defaults 0 0
Both machines have the same setting for the NFSv4 domain (localdomain) and ps reports that rpcbind, rpc.idmapd and rpc.statd are running on both client and server.
When I try to mount any of the directories I get a "No such file or directory" error, for example:
zen:/media/zeus # mount /media/zeus mount.nfs4: mounting zeus:/srv/NFS4 failed, reason given by server: No such file or directory
What am I missing here?
Hi Unless you are using an old kernel, then nfs4 should not be exported from fsid=0 and bind mounts. Thankfully, with recent versions that has been removed. You simply specify mounts in /etc/exports as you always did for nfs2/3. That may be part of your problem: you're using a new version with the old config. http://linux-nfs.org/wiki/index.php/Nfsv4_configuration#Common_NFS4_misunder... HTH L x -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/09/13 17:39, lynn wrote: [SNIP]
Hi Unless you are using an old kernel, then nfs4 should not be exported from fsid=0 and bind mounts. Thankfully, with recent versions that has been removed. You simply specify mounts in /etc/exports as you always did for nfs2/3. That may be part of your problem: you're using a new version with the old config. http://linux-nfs.org/wiki/index.php/Nfsv4_configuration#Common_NFS4_misunder... HTH L x
Thanks, I've imported the tree as '/' as Andrey suggested, but will look into using the 'old style' individual exports later as that seems much easier to maintain. Dylan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Thu, 05 Sep 2013 15:54:58 +0100
Dylan
Hi All,
I'm trying to set up NFSv4 shares on my home network. On the server (zeus) I have the following in /etc/exports:
zeus:/home/dylan # cat /etc/exports /srv/NFS4 *(fsid=0,crossmnt,ro,root_squash,sync,no_subtree_check) /srv/NFS4/dylan *(bind=/home/dylan,rw,root_squash,sync,no_subtree_check) /srv/NFS4/sdc *(bind=/media/sdc,rw,root_squash,sync,no_subtree_check) /srv/NFS4/sdd *(bind=/media/sdd,rw,root_squash,sync,no_subtree_check)
and the latter three directories are, indeed, bound in the NFS4 directory.
On the client (zen), the relevant entries in /etc/fstab are:
zen:/media/zeus # cat /etc/fstab [SNIP] zeus:/srv/NFS4 /media/zeus nfs4 defaults 0 0 zeus:/srv/NFS4/dylan /media/zeus/dylan nfs4 defaults 0 0 zeus:/srv/NFS4/sdc /media/zeus/sdc nfs4 defaults 0 0 zeus:/srv/NFS4/sdd /media/zeus/sdd nfs4 defaults 0 0
Both machines have the same setting for the NFSv4 domain (localdomain) and ps reports that rpcbind, rpc.idmapd and rpc.statd are running on both client and server.
When I try to mount any of the directories I get a "No such file or directory" error, for example:
zen:/media/zeus # mount /media/zeus mount.nfs4: mounting zeus:/srv/NFS4 failed, reason given by server: No such file or directory
What am I missing here?
NFSv4 export model is single directory tree, so your /srv/NFS4 becomes just / on client. Note that there is no word of bind=... export option in 12.3 and in quick testing it does not work either. I.e. you get empty directories on client unless you bind mount them manually on server. You should be able to just export /home/dylan, /media/sdc and /media/sdd and mount them as in NFSv3 case. See also http://linux-nfs.org/wiki/index.php/Nfsv4_configuration -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 05/09/13 17:39, Andrey Borzenkov wrote: [SNIP]
NFSv4 export model is single directory tree, so your /srv/NFS4 becomes just / on client.
That sorted it - mount -tnfs4 zeus:/ /mnt worked as expected... this means the documentation at http://doc.opensuse.org/documentation/html/openSUSE/opensuse-reference/cha.n... is misleading/incorrect...
Note that there is no word of bind=... export option in 12.3 and in quick testing it does not work either. I.e. you get empty directories on client unless you bind mount them manually on server.
Yast nfs-server correctly added the relevant lines to the server's fstab to mount them under the nfs4 tree, it seems.
You should be able to just export /home/dylan, /media/sdc and /media/sdd and mount them as in NFSv3 case. See also http://linux-nfs.org/wiki/index.php/Nfsv4_configuration
Thanks, I will check it out further when I have more time Dylan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrey Borzenkov
-
Dylan
-
lynn