From: walt <w41ter@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] Re: [~amd64] NFS server broken again :(
Date: Mon, 27 Oct 2014 16:46:30 -0700 [thread overview]
Message-ID: <m2mlgo$hdb$1@ger.gmane.org> (raw)
In-Reply-To: <CADPrc81nMHeq7K4UZc1Hg7wqk5GRxmL-WYV9St5-0m2P32f-XA@mail.gmail.com>
On 10/27/2014 12:56 PM, Canek Peláez Valdés wrote:
> On Mon, Oct 27, 2014 at 1:38 PM, walt <w41ter@gmail.com> wrote:
>> Last night when I powered off my machines NFS was working perfectly. Today
>> it's broken again for the nth time:
>>
>> #systemctl status nfs-server
>> ● nfs-server.service - NFS server and services
>> Loaded: loaded (/usr/lib64/systemd/system/nfs-server.service; enabled)
>> Active: failed (Result: exit-code) since Mon 2014-10-27 11:50:38 PDT; 25min ago
>> Process: 896 ExecStopPost=/usr/sbin/exportfs -f (code=exited, status=0/SUCCESS)
>> Process: 893 ExecStopPost=/usr/sbin/exportfs -au (code=exited, status=0/SUCCESS)
>> Process: 939 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=1/FAILURE)
> I think I know the answer. Some days ago you moved /etc/conf.d for
> NetworkManager to work, right? Where does the environment variable
> RPCNFSDARGS is defined? I'm willing to bet that is in a /etc/conf.d
> file.
>
> Could you please post here the contents of nfs-server.service, and if
> it exists, the files inside /etc/systemd/system/nfs-server.service.d
> and their contents?
Bingo again :) Your question led me to the answer, which I think is a bug
in /usr/lib64/systemd/system/nfs-server.service.
Here's why the bug showed up just this morning: way back at the beginning
of systemd I stole some .service files from RedHat Fedora, including one
named 'nfs.service'.
Turns out the foreign RedHat file was starting rpcbind for me all those
months and, when I deleted it last night, rpcbind didn't get started this
morning by nfs-server.service from gentoo (which I think is a bug).
#cat nfs-server.service
[Unit]
Description=NFS server and services
Requires= network.target proc-fs-nfsd.mount rpcbind.target
Requires= nfs-mountd.service
Wants=rpc-statd.service nfs-idmapd.service rpc-gssd.service rpc-svcgssd.service
Wants=rpc-statd-notify.service
After= network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.service
After= nfs-idmapd.service rpc-statd.service
After= rpc-gssd.service rpc-svcgssd.service
Before= rpc-statd-notify.service
[Service]
EnvironmentFile=/etc/conf.d/nfs
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/usr/sbin/exportfs -r
ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS
ExecStop=/usr/sbin/rpc.nfsd 0
ExecStopPost=/usr/sbin/exportfs -au
ExecStopPost=/usr/sbin/exportfs -f
ExecReload=/usr/sbin/exportfs -r
[Install]
WantedBy=multi-user.target
I can see that rpcbind.target is Required, but NOT rpcbind.service. AFAICT
rpc.target does nothing (please explain if I'm wrong about that).
BTW, /etc/conf.d/nfs doesn't define RPCNFSDARGS because it is intended
for use by openrc (another bug?):
#cat /etc/conf.d/nfs
# /etc/conf.d/nfs
# If you wish to set the port numbers for lockd,
# please see /etc/sysctl.conf
# Optional services to include in default `/etc/init.d/nfs start`
# For NFSv4 users, you'll want to add "rpc.idmapd" here.
NFS_NEEDED_SERVICES="rpc.idmapd"
# Number of servers to be started up by default
OPTS_RPC_NFSD="8"
# Options to pass to rpc.mountd
# ex. OPTS_RPC_MOUNTD="-p 32767"
OPTS_RPC_MOUNTD=""
# Options to pass to rpc.statd
# ex. OPTS_RPC_STATD="-p 32765 -o 32766"
OPTS_RPC_STATD=""
# Options to pass to rpc.idmapd
OPTS_RPC_IDMAPD=""
# Options to pass to rpc.gssd
OPTS_RPC_GSSD=""
# Options to pass to rpc.svcgssd
OPTS_RPC_SVCGSSD=""
# Options to pass to rpc.rquotad (requires sys-fs/quota)
OPTS_RPC_RQUOTAD=""
# Timeout (in seconds) for exportfs
EXPORTFS_TIMEOUT=30
# Options to set in the nfsd filesystem (/proc/fs/nfsd/).
# Format is <option>=<value>. Multiple options are allowed.
#OPTS_NFSD="nfsv4leasetime=30 max_block_size=4096"
Thanks Canek!
next prev parent reply other threads:[~2014-10-27 23:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 19:38 [gentoo-user] [~amd64] NFS server broken again :( walt
2014-10-27 19:56 ` Canek Peláez Valdés
2014-10-27 23:46 ` walt [this message]
2014-10-28 1:05 ` [gentoo-user] " Canek Peláez Valdés
2014-10-28 2:49 ` Tom H
2014-10-28 3:22 ` Tom H
2014-10-28 22:18 ` walt
2014-10-29 1:36 ` Tom H
2014-10-29 1:50 ` Rich Freeman
2014-10-31 17:34 ` Tom H
2014-10-31 18:27 ` Rich Freeman
2014-10-31 23:01 ` Tom H
2014-10-31 23:52 ` Rich Freeman
2014-11-03 1:37 ` Tom H
2014-11-03 3:47 ` Rich Freeman
2014-11-01 3:18 ` Jc García
2014-10-28 0:56 ` [gentoo-user] " Tom H
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='m2mlgo$hdb$1@ger.gmane.org' \
--to=w41ter@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox