Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 497640 - net-fs/nfs-utils - /var/lib/nfs/{v4recovery,rpc_pipefs} directories are not created automatically for systemd users
Summary: net-fs/nfs-utils - /var/lib/nfs/{v4recovery,rpc_pipefs} directories are not c...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-09 19:48 UTC by Alexander Tsoy
Modified: 2014-02-01 19:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2014-01-09 19:48:55 UTC
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.
Comment 1 Alexander Tsoy 2014-01-09 20:17:46 UTC
Related thread on LKML:
https://lkml.org/lkml/2012/6/11/243
Comment 2 Pacho Ramos gentoo-dev 2014-01-11 12:27:56 UTC
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
Comment 3 Alexander Tsoy 2014-01-11 20:20:03 UTC
Yes, tmpfiles would be better. And /var/lib/nfs/rpc_pipefs can be created by a mount unit (bug 497642).
Comment 4 Pacho Ramos gentoo-dev 2014-01-11 20:38:46 UTC
I guess we would need to have the directory created via tmpfilesd before mounting something there, right? :/
Comment 5 Alexander Tsoy 2014-01-11 20:50:35 UTC
From the SYSTEMD.MOUNT(5): "Where= ... If the mount point does not exist at the time of mounting, it is created."
Comment 6 Pacho Ramos gentoo-dev 2014-01-11 21:05:36 UTC
But, I guess openrc setups would also benefit from it, or are they handling it in a different way?
Comment 7 Alexander Tsoy 2014-01-12 22:02:52 UTC
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
}
Comment 8 Pacho Ramos gentoo-dev 2014-02-01 19:01:45 UTC
+*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)
+