Gentoo Archives: gentoo-user

From: Tom H <tomh0665@×××××.com>
To: Gentoo User <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] nfsv4 issues
Date: Fri, 22 Jul 2016 12:46:50
Message-Id: CAOdo=Sx5VOv332nkA+TfPg7HSOEYggjFjQtALTyiko=Xbz9dbw@mail.gmail.com
In Reply to: Re: [gentoo-user] nfsv4 issues by Adam Carter
1 On Wed, Jul 20, 2016 at 10:51 PM, Adam Carter <adamcarter3@×××××.com> wrote:
2
3
4 >> I don't use systemd on Gentoo but for the nfs-utils upstream-shipped
5 >> systemd units that I think that Gentoo's using, you have to re-run
6 >> nfs-config.service - or run the script that it calls - in order to
7 >> update the "/run/sysconfig/nfs-utils" environment file that's sourced
8 >> by the nfs-server.service unit.
9 >
10 > In /usr/lib/systemd/system/nfs-server.service
11 > [Service]
12 > EnvironmentFile=/etc/conf.d/nfs
13
14 Sorry. Looking at the ebuild, there's:
15
16 <begin>
17 rm "${D}$(systemd_get_unitdir)"/nfs-config.service || die
18 sed -i -r \
19 -e "/^EnvironmentFile=/s:=.*:=${EPREFIX}/etc/conf.d/nfs:" \
20 -e '/^(After|Wants)=nfs-config.service$/d' \
21 -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \
22 "${D}$(systemd_get_unitdir)"/* || die
23 </end>
24
25 so the upstream "nfs-config.service" waltz is avoided.
26
27 But that means that the variables in "/etc/conf.d/nfs" aren't renamed.
28 So the openrc nfs script uses "${OPTS_RPC_NFSD}", which is defined,
29 and the systemd service uses "$RPCNFSDARGS", which isn't.
30
31
32 >> Does "/var/lib/nfs/v4recovery/" exist?
33 >
34 > No
35 > # ls /var/lib/nfs/
36 > etab export-lock rmtab rpc_pipefs sm sm.bak state xtab
37
38 IIRC, it's needed to avoid this delay. I thought that I'd saved a url
39 about this but I can't find it.
40
41 Do you have a syslog message about "stable storage"? "man nfsdcltrack".
42
43 The openrc script has
44
45 <begin>
46 mkdir_nfsdirs() {
47 local d
48 for d in v4recovery v4root ; do
49 d="/var/lib/nfs/${d}"
50 [ ! -d "${d}" ] && mkdir -p "${d}"
51 done
52 }
53 </end>
54
55 but systemd doesn't have anything equivalent. On RHEL and Ubuntu,
56 "/var/lib/nfs/v4recovery/" is created at installation time. Perhaps
57 the Gentoo ebuild should do the same or should ship a
58 "/usr/lib/tmpfiles.d/var-lib-nfs.conf" to create it at boot if it
59 doesn't exist.

Replies

Subject Author
Re: [gentoo-user] nfsv4 issues Adam Carter <adamcarter3@×××××.com>