From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A53BE1389E3 for ; Tue, 28 Oct 2014 01:05:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 830B6E091C; Tue, 28 Oct 2014 01:05:45 +0000 (UTC) Received: from mail-ig0-f171.google.com (mail-ig0-f171.google.com [209.85.213.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6E8B7E08F2 for ; Tue, 28 Oct 2014 01:05:44 +0000 (UTC) Received: by mail-ig0-f171.google.com with SMTP id l13so7480198iga.4 for ; Mon, 27 Oct 2014 18:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=j0Ah7KkKD8PUAZ5OywMa1+Amx8HpjOKvzdJi5ulFGZo=; b=ov9je/6d4+BOGrfv0WupCS939FP1DxuKrGZU/KwjbuD/TNwoEgWXdZ6yWH098SZMod Jjn64MraYqtRm8t/Zrj9iDyNhRJbg/o02nMt5J8UE68aosq4eX33qnNGV8tymZTUj6TX sJ60hBAtd93WNj5344LsaWnt42ylOrz//PcByZSq7LaZ5oiwce7wQbPoWhzCz5mxuGBY gxet0cyHiRC0R2h0L0A+rPT4scXFfYvRdBLZjb0IuCf/j5eLHYuyHEYhaGgiCFIFNFw8 g7lObSb+pt/BBYGobJuM/4zcggTH3PgF/zIYOv9BskQmZtXJCsglM13WeamxJpJiO94l ChOw== X-Received: by 10.43.143.18 with SMTP id jk18mr664023icc.73.1414458343686; Mon, 27 Oct 2014 18:05:43 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 10.107.148.19 with HTTP; Mon, 27 Oct 2014 18:05:23 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?B?Q2FuZWsgUGVsw6FleiBWYWxkw6lz?= Date: Mon, 27 Oct 2014 19:05:23 -0600 Message-ID: Subject: Re: [gentoo-user] Re: [~amd64] NFS server broken again :( To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 42ad5eb7-c6e5-4ba2-a77f-9901ca1202d7 X-Archives-Hash: 1380e672da9cd52e8855bb79ce602008 On Mon, Oct 27, 2014 at 5:46 PM, walt wrote: > On 10/27/2014 12:56 PM, Canek Pel=C3=A1ez Vald=C3=A9s wrote: >> On Mon, Oct 27, 2014 at 1:38 PM, walt wrote: >>> Last night when I powered off my machines NFS was working perfectly. T= oday >>> it's broken again for the nth time: >>> >>> #systemctl status nfs-server >>> =E2=97=8F nfs-server.service - NFS server and services >>> Loaded: loaded (/usr/lib64/systemd/system/nfs-server.service; enable= d) >>> Active: failed (Result: exit-code) since Mon 2014-10-27 11:50:38 PDT= ; 25min ago >>> Process: 896 ExecStopPost=3D/usr/sbin/exportfs -f (code=3Dexited, sta= tus=3D0/SUCCESS) >>> Process: 893 ExecStopPost=3D/usr/sbin/exportfs -au (code=3Dexited, st= atus=3D0/SUCCESS) >>> Process: 939 ExecStart=3D/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=3Dexit= ed, status=3D1/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 bu= g > in /usr/lib64/systemd/system/nfs-server.service. > > Here's why the bug showed up just this morning: way back at the beginnin= g > of systemd I stole some .service files from RedHat Fedora, including one > named 'nfs.service'. Gentoo nfs-utils package still doesn't include a systemd unit file, really? With a perfunctory look at /usr/portage/net-fs/nfs-utils/files, I see several *.service files. I highly recommend using the unit files provided by the Gentoo devs. > 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=3DNFS server and services > Requires=3D network.target proc-fs-nfsd.mount rpcbind.target > Requires=3D nfs-mountd.service > Wants=3Drpc-statd.service nfs-idmapd.service rpc-gssd.service rpc-svcgssd= .service > Wants=3Drpc-statd-notify.service > > After=3D network.target proc-fs-nfsd.mount rpcbind.target nfs-mountd.serv= ice > After=3D nfs-idmapd.service rpc-statd.service > After=3D rpc-gssd.service rpc-svcgssd.service > Before=3D rpc-statd-notify.service > > [Service] > EnvironmentFile=3D/etc/conf.d/nfs > > Type=3Doneshot > RemainAfterExit=3Dyes > ExecStartPre=3D/usr/sbin/exportfs -r > ExecStart=3D/usr/sbin/rpc.nfsd $RPCNFSDARGS > ExecStop=3D/usr/sbin/rpc.nfsd 0 > ExecStopPost=3D/usr/sbin/exportfs -au > ExecStopPost=3D/usr/sbin/exportfs -f > > ExecReload=3D/usr/sbin/exportfs -r > > [Install] > WantedBy=3Dmulti-user.target > > > I can see that rpcbind.target is Required, but NOT rpcbind.service. AFAIC= T > rpc.target does nothing (please explain if I'm wrong about that). I have no idea; I haven't set an NFS server in years. However, most target units usually are kinda "virtuals"; the bring other units up. > BTW, /etc/conf.d/nfs doesn't define RPCNFSDARGS because it is intended > for use by openrc (another bug?): Something should define RPCNFSDARGS; perhaps a drop-in? > #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=3D"rpc.idmapd" > > # Number of servers to be started up by default > OPTS_RPC_NFSD=3D"8" > > # Options to pass to rpc.mountd > # ex. OPTS_RPC_MOUNTD=3D"-p 32767" > OPTS_RPC_MOUNTD=3D"" > > # Options to pass to rpc.statd > # ex. OPTS_RPC_STATD=3D"-p 32765 -o 32766" > OPTS_RPC_STATD=3D"" > > # Options to pass to rpc.idmapd > OPTS_RPC_IDMAPD=3D"" > > # Options to pass to rpc.gssd > OPTS_RPC_GSSD=3D"" > > # Options to pass to rpc.svcgssd > OPTS_RPC_SVCGSSD=3D"" > > # Options to pass to rpc.rquotad (requires sys-fs/quota) > OPTS_RPC_RQUOTAD=3D"" > > # Timeout (in seconds) for exportfs > EXPORTFS_TIMEOUT=3D30 > > # Options to set in the nfsd filesystem (/proc/fs/nfsd/). > # Format is