I had a lot of performance problems with nfs mounts until I manually created nfsv4recoverydir (/var/lib/nfs/v4recovery by default). From dmesg: [ 13.952030] NFSD: starting 90-second grace period (net ffffffff81f07000) [ 134.239036] NFSD: Unable to end grace period: -110 [19538.271044] NFSD: Unable to create client record on stable storage: -110 [20454.239045] NFSD: Unable to create client record on stable storage: -110 [20522.207048] NFSD: Unable to create client record on stable storage: -110 [20647.903064] NFSD: Unable to create client record on stable storage: -110 [21440.415037] NFSD: Unable to create client record on stable storage: -110 Also there is no /var/lib/nfs/rpc_pipefs dir on a newly installed system. For openrc users all necessary dirs are created by /etc/init.d/nfs script. IMHO it's fine if these dirs would be created by ebuild.
Related thread on LKML: https://lkml.org/lkml/2012/6/11/243
I would use tmpfile for creating it. The problem of creating that in ebuild is that, as vapier told me some days ago with a similar case, we are not supposed to create files there and expect to be present when unit/init.d files run
Yes, tmpfiles would be better. And /var/lib/nfs/rpc_pipefs can be created by a mount unit (bug 497642).
I guess we would need to have the directory created via tmpfilesd before mounting something there, right? :/
From the SYSTEMD.MOUNT(5): "Where= ... If the mount point does not exist at the time of mounting, it is created."
But, I guess openrc setups would also benefit from it, or are they handling it in a different way?
In the case of openrc this is already handled by /etc/init.d/nfs (I don't know the purpose of the v4root directory): mkdir_nfsdirs() { local d for d in rpc_pipefs v4recovery v4root ; do d="/var/lib/nfs/${d}" [ ! -d "${d}" ] && mkdir -p "${d}" done }
+*nfs-utils-1.2.9-r2 (01 Feb 2014) + + 01 Feb 2014; Pacho Ramos <pacho@gentoo.org> +files/nfs-utils.conf, + +files/nfsd.service-r1, +files/proc-fs-nfsd.mount, +files/rpc-gssd.service, + +files/rpc-idmapd.service, +files/rpc-mountd.service-r1, + +files/rpc-statd.service-r2, +files/rpc-svcgssd.service, + +files/var-lib-nfs-rpc_pipefs.mount, +nfs-utils-1.2.9-r2.ebuild: + Ensure needed dirs are present, add/improve unit files (#497640 and #497642 by + Alexander Tsoy) +