You are not logged in.

#1 2015-02-13 22:55:25

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,812
Website

NFSV4 without rpcbind [SOLVED]

Has anyone successfully implemented a pure nfsv4 mount without the need for rpcbind.service as detailed here: http://www.spinics.net/lists/linux-nfs/msg41053.html
?

I find myself unable to do it.

Editing: /etc/conf.d/nfs-server.conf to include NFSD_OPTS="-N 2 -N 3" does create /run/sysconfig/nfs-utils with the needed RPCNFSDARGS="-N 2 -N 3" options but I am unable to figure out where to add the also (I think) needed lines:
MOUNTD_NFS_V2="no"
MOUNTD_NFS_V3="no"

No matter it seems since adding them manually and trying to start nfs-server.service without first starting rpcbind.service fails to give me a mounts I can export.

Last edited by graysky (2015-02-14 16:52:51)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2015-02-14 16:51:29

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,812
Website

Re: NFSV4 without rpcbind [SOLVED]

An update is that I can get nfsv4 working without rpcbind.

1) Modify /etc/conf.d/nfs-server.conf to contain NFSD_OPTS="-N 2 -N 3"
2) Start nfs-server.service (no need to start rpcbind.service)
3) Mount like this: # mount -t nfs4 10.1.10.2:/exports /mnt/nfs4exports

% cat /etc/exports
/srv/nfs         10.1.10.0/24(ro,fsid=0,no_subtree_check)
/srv/nfs/exports 10.1.10.0/24(ro,no_subtree_check,insecure)

% grep nfs /etc/fstab
/mnt/data/exports /srv/nfs/exports none ro,bind 0 0

Last edited by graysky (2015-02-14 16:52:28)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2015-02-16 10:50:11

R00KIE
Forum Moderator
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: NFSV4 without rpcbind [SOLVED]

I believe the downside will be that you can't list the exports with showmount if you run your server like that (or I may have missed something). If I'm not wrong NFSv4 should allow listing the exports without the need for portmap, rpcbind and friends but that didn't work for me.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#4 2015-02-16 12:57:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 9,812
Website

Re: NFSV4 without rpcbind [SOLVED]

No, you're right about that.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2015-02-24 07:53:37

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: NFSV4 without rpcbind [SOLVED]

Can you please add this suggestions to our NFS Wiki page. I assume more user want to run v4 only shares without rpcbind.

Offline

#6 2015-09-07 17:45:06

kholo
Member
Registered: 2011-05-16
Posts: 3

Re: NFSV4 without rpcbind [SOLVED]

Hi,

I know this post is getting a little old, but this one does not solve the issue on my server, almost not.

On a freshly installed computer :
I set up my NFS server accordingly to the wiki, and using this post to tweak it, but I still had the error. I had to modified the variable RPCNFSDARGS in /run/sysconfig/nfs-utils, using the given parameters "-N 2 -N 3", to make it works.

Edit: after a deeper look, /run/sysconfig/nfs-utils is written by the service nfs-config.service. My problem occurred because I didn't know this service was still running after a failed attempt to run nfs-server.service. I edited /etc/conf.d/nfs-server.conf then I tried to start nfs-server.service, but the dependency nfs-config.service was already started at the first attempt, and was not stopped at failure. As it was already running, the /run/sysconfig/nfs-utils file was not rewritten using new options in /etc/conf.d/nfs-server.conf

The point is : it would have worked correctly if I knew I had to stop nfs-config.service or if I had rebooted.

(re-edited for clarity)

Last edited by kholo (2015-09-08 11:45:30)

Offline

Board footer

Powered by FluxBB