You are not logged in.
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 packages • Zsh and other configs
Offline
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 packages • Zsh and other configs
Offline
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
No, you're right about that.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Can you please add this suggestions to our NFS Wiki page. I assume more user want to run v4 only shares without rpcbind.
Offline
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
Hi,
I know I'm necro-bumping but this topic came up in https://bugs.archlinux.org/task/76453
so here are my 2 cents:
If you want to get NFSv4 to work without rpcbind this worked for me:
1. in nfs.conf set:
vers2=off
vers3=off
vers4=on
2. Mask all rpcbind related systemd units:
$ systemctl mask rpcbind.service
$ systemctl mask rpcbind.socket
$ systemctl mask rpcbind.target
$ systemctl mask rpc-statd.service
$ systemctl mask rpc-statd-notify.service
3. forcefully deinstall rpcbind
$ pacman -Rsndd rpcbind
4. Reboot to clear any leftover processes
Now start/enable nfs-server.service and it should be working.
DISCLAIMER: I'm currently using NFSv4 over a special VPN interface without any kerberos auth/encryption services
Note: you'll have to deal with the broken package dependency in some way until https://bugs.archlinux.org/task/76453 gets fixed
Possible fixes include installing a dummy package which provides rpcbind or Ignoring rpcbind in pacman.
Offline