Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] nfs and systemd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Sat Nov 29, 2014 8:08 pm    Post subject: [SOLVED] nfs and systemd Reply with quote

Which services are needed on each side (client/server) for NFS V4 to work properly?

The old openrc scripts were handling the dependancies what about systemd? I am trying to configure my NFS V4 environment without success so far.

Here is my kernel configuration on both client and server:

Code:
CONFIG_NFS_FS=y
# CONFIG_NFS_V2 is not set
# CONFIG_NFS_V3 is not set
CONFIG_NFS_V4=y
CONFIG_NFS_SWAP=y
CONFIG_NFS_V4_1=y
CONFIG_NFS_V4_2=y
CONFIG_PNFS_FILE_LAYOUT=m
CONFIG_PNFS_BLOCK=m
CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org"
CONFIG_ROOT_NFS=y
CONFIG_NFS_FSCACHE=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
CONFIG_NFSD_V4=y
# CONFIG_NFSD_FAULT_INJECTION is not set
CONFIG_NFS_COMMON=y


net-fs/nfs-utils-1.2.9-r3 is installed on both client and server.
_________________
Achille Talon Hop!


Last edited by AchilleTalon on Thu Dec 04, 2014 8:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7051
Location: almost Mile High in the USA

PostPosted: Sat Nov 29, 2014 9:52 pm    Post subject: Reply with quote

both sides:
rpcbind/portmap

Server needs (to be useful and stable):
nfsd
mountd
statd

"optional server"
idmapd
rquotad

I think the nfs server service should automatically pull in the needed dependencies. Both the openrc and systemd versions of the startup scripts on Gentoo appear to work for me without changes...

I use nfsv3 when I can... v4 is a bit more tricky - it has a bit different authentication than the older NFS, I haven't had the time to study its dependencies.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Mon Dec 01, 2014 3:39 pm    Post subject: Reply with quote

There is even many errors on this Wiki HOWTO NFSv4 page: http://wiki.gentoo.org/wiki/NFSv4

rpc.mountd and rpc.statd are NFSv2 and v3 daemons. Hence, the modification to /etc/conf.d/nfs file to add options for rpc.mountd are not needed for a v4 only environment, the daemon should not be started in fact.

There is really no one out there with experience with NFSv4 that would share some tips on how to make this working?
_________________
Achille Talon Hop!
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 3374

PostPosted: Mon Dec 01, 2014 3:56 pm    Post subject: Reply with quote

AchilleTalon wrote:

There is really no one out there with experience with NFSv4 that would share some tips on how to make this working?


I've been running nfsv4 for several years on my home LAN, but with OpenRC, not systemd. I've also "harmonized" my passwd files, even though I'm running idmapd. I can take a closer look at server and clients tonight at home.
_________________
.sigs waste space and bandwidth
Back to top
View user's profile Send private message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Mon Dec 01, 2014 4:41 pm    Post subject: Reply with quote

Great! Thanks.

From this thread (comment by Kompi) started before systemd official implementation of startup files it seems the services required by NFSv4 are:

On the server:
  • var-lib-nfs-rpc_pipefs.mount
  • proc-fs-nfsd.mount
  • rpcbind.service
  • rpc-idmapd.service
  • nfsd.service
  • rpc-svcgssd.service


On the client:
  • va-lib-nfs-rpc_pipefs.mount
  • rpcbind.service
  • rpc-idmapd.service
  • rpc-gssd.service


The mounts are performed by one of the required services.

I did that, but it still not working. So, I guess there is a problem with the authorization/authentication somewhere.
_________________
Achille Talon Hop!
Back to top
View user's profile Send private message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Tue Dec 02, 2014 11:53 pm    Post subject: Reply with quote

I managed to make this working with NFSv4 sec=sys. The identified components in the previous post are correct. There is no need for the rpc.mountd, rpc.statd, etc. These are related to earlier versions of NFS.

The only thing I wasn't able to make working yet is the Kerberos mode with sec=krb5 or another variant and it seems the problem is related to a missing module in my kernel: rpcsec_gss_krb5

My distro is running on a Raspberry Pi and so far I haven't seen any option in the configuration script of the kernel to build such a module. The only available option for the Raspberry Pi related to the above is CONFIG_SUNRPC_GSS=y, the one of for Kerberos is missing and should be:CONFIG_RPCSEC_GSS_KRB5=m

My conclusion is then the NFSv4 implementation is incomplete on the Raspberry Pi since the Kerberos mandatory modules are missing from the kernel.

Anyone knows why?
_________________
Achille Talon Hop!
Back to top
View user's profile Send private message
AchilleTalon
Guru
Guru


Joined: 11 Apr 2004
Posts: 368
Location: Montreal, Quebec, Canada

PostPosted: Thu Dec 04, 2014 8:11 pm    Post subject: Reply with quote

Solved, there was missing crypto options to make the option visible in the menu.

So far, seems to work with Kerberos as expected.
_________________
Achille Talon Hop!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum