1 |
> >> I don't use systemd on Gentoo but for the nfs-utils upstream-shipped |
2 |
> >> systemd units that I think that Gentoo's using, you have to re-run |
3 |
> >> nfs-config.service - or run the script that it calls - in order to |
4 |
> >> update the "/run/sysconfig/nfs-utils" environment file that's sourced |
5 |
> >> by the nfs-server.service unit. |
6 |
> > |
7 |
> > In /usr/lib/systemd/system/nfs-server.service |
8 |
> > [Service] |
9 |
> > EnvironmentFile=/etc/conf.d/nfs |
10 |
> |
11 |
> Sorry. Looking at the ebuild, there's: |
12 |
> |
13 |
> <begin> |
14 |
> rm "${D}$(systemd_get_unitdir)"/nfs-config.service || die |
15 |
> sed -i -r \ |
16 |
> -e "/^EnvironmentFile=/s:=.*:=${EPREFIX}/etc/conf.d/nfs:" \ |
17 |
> -e '/^(After|Wants)=nfs-config.service$/d' \ |
18 |
> -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \ |
19 |
> "${D}$(systemd_get_unitdir)"/* || die |
20 |
> </end> |
21 |
> |
22 |
> so the upstream "nfs-config.service" waltz is avoided. |
23 |
> |
24 |
> But that means that the variables in "/etc/conf.d/nfs" aren't renamed. |
25 |
> So the openrc nfs script uses "${OPTS_RPC_NFSD}", which is defined, |
26 |
> and the systemd service uses "$RPCNFSDARGS", which isn't. |
27 |
> |
28 |
|
29 |
I've added $RPCNFSDARGS to /etc/conf.d/nfs, restarted, and the nproc |
30 |
setting works. |
31 |
|
32 |
> |
33 |
> >> Does "/var/lib/nfs/v4recovery/" exist? |
34 |
> > |
35 |
> > No |
36 |
> > # ls /var/lib/nfs/ |
37 |
> > etab export-lock rmtab rpc_pipefs sm sm.bak state xtab |
38 |
> |
39 |
> IIRC, it's needed to avoid this delay. I thought that I'd saved a url |
40 |
> about this but I can't find it. |
41 |
> |
42 |
> Do you have a syslog message about "stable storage"? "man nfsdcltrack". |
43 |
> |
44 |
|
45 |
There's no message about stable storage, but there's this; |
46 |
kernel: [578030.628415] NFSD: the nfsdcld client tracking upcall will be |
47 |
removed in 3.10. Please transition to using nfsdcltrack. |
48 |
|
49 |
# which nfsdcltrack |
50 |
which: no nfsdcltrack in |
51 |
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/5.4.0:/usr/lib64/subversion/bin:/opt/vmware/bin) |
52 |
# qlist nfs | grep nfsdcltrack |
53 |
# |
54 |
|
55 |
|
56 |
> The openrc script has |
57 |
> |
58 |
> <begin> |
59 |
> mkdir_nfsdirs() { |
60 |
> local d |
61 |
> for d in v4recovery v4root ; do |
62 |
> d="/var/lib/nfs/${d}" |
63 |
> [ ! -d "${d}" ] && mkdir -p "${d}" |
64 |
> done |
65 |
> } |
66 |
> </end> |
67 |
> |
68 |
> but systemd doesn't have anything equivalent. On RHEL and Ubuntu, |
69 |
> "/var/lib/nfs/v4recovery/" is created at installation time. Perhaps |
70 |
> the Gentoo ebuild should do the same or should ship a |
71 |
> "/usr/lib/tmpfiles.d/var-lib-nfs.conf" to create it at boot if it |
72 |
> doesn't exist. |
73 |
> |
74 |
> I've added the directory, and after restarting syslog now has new entries; |
75 |
kernel: [912267.948883] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 |
76 |
state recovery directory |
77 |
kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery |
78 |
directory |
79 |
|
80 |
I will test shortly and report back - thanks! |