Bug#792030: systemd does not reliably mount nfs shares

Bodo Eggert 7eggert at online.de
Sun Jul 12 13:58:26 BST 2015


On Fri, 10 Jul 2015, Michael Biebl wrote:
> Am 10.07.2015 um 14:05 schrieb Bodo Eggert:

> > Package: systemd
> > Version: 215-17+deb8u1
> > Severity: normal
> > 
> > Dear Maintainer,
> > 
> > when I boot my system, some of the NFS shares don't get mounted reliably.
> > 
> > At first I blamed it on the RPC race condition, but since I applied the
> > countermeasure from gentoo linux and since only some shares are affected,
> > I don't think so anymore.
> > 
> > Also I put "/sbin/mount -a -t nfs" into /etc/rc.local, but that didn't help
> > either. I guess _that_ is the rpc race condition?
> > 
> > Today, be5:/mnt/HD/HD_a2/7eggert was affected.
> > 
> > --- grep nfs /etc/fstab ---
> > be1:/var/mail                /mnt/mail               nfs     soft 0 0
> > be5:/mnt/HD/HD_b2/d1            /mnt/nas5a              nfs     soft 0 0
> > be5:/mnt/HD/HD_a2/d2            /mnt/nas5b              nfs     soft 0 0
> > be5:/mnt/HD/HD_a2/7eggert       /home/7eggert/nas       nfs     soft 0 0
> > be5:/mnt/HD/HD_b2/nfsroot       /mnt/nfsroot            nfs     soft 0 0
> > ---
> 
> How do you configure your network connection? Please include specifics
> like configuration files etc.
> It's either the network configuration not providing
> network-online.target correctly or rpcbind/nfs-common not starting up
> properly.
> 
> For the latter, can you attach the output of
> systemctl status nfs-common.service rpcbind.service
> See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775542#114

Maybe I can see a reason: When I look at "systemctl status", I see:
--- systemctl status ---
           │ ├─mnt-nas5a.mount
           │ │ └─759 rpc.statd --no-notify
---

I guess rpc.statd is only bound to the first nfs share that happens to be 
started (in my case chosen at random). All other nfs shares will start in 
parallel and race for statd.

(I'd expect something like mnt-nfs3 to exist instead and all the nfs3 
mounts to depend on that. It should be native to systemd,  IMO ...)

##########

--- /etc/interfaces ---
auto lo br0
iface lo inet loopback

iface br0 inet static
        bridge_ports eth0 qemu-7eggert
        bridge_maxwait 0
        address 192.168.7.210
        netmask 255.255.255.0
        gateway 192.168.7.202
        pre-up  tunctl -t qemu-7eggert -u 7eggert
        post-up ip addr add 192.168.1.210/24 dev br0 #(unused for nfs)
---

● nfs-common.service - LSB: NFS support files common to client and server
   Loaded: loaded (/etc/init.d/nfs-common)
   Active: active (running) since Sun 2015-07-12 11:23:51 CEST; 15min ago
  Process: 723 ExecStart=/etc/init.d/nfs-common start (code=exited, 
status=0/SUCCESS)
   CGroup: /system.slice/nfs-common.service
           ├─746 /sbin/rpc.statd
           ├─762 /sbin/sm-notify
           └─773 /usr/sbin/rpc.idmapd

● rpcbind.service - LSB: RPC portmapper replacement
   Loaded: loaded (/etc/init.d/rpcbind)
  Drop-In: /run/systemd/generator/rpcbind.service.d
           └─50-rpcbind-$portmap.conf
   Active: active (running) since Sun 2015-07-12 11:23:50 CEST; 15min ago
  Process: 691 ExecStart=/etc/init.d/rpcbind start (code=exited, 
status=0/SUCCESS)
   CGroup: /system.slice/rpcbind.service
           └─704 /sbin/rpcbind -w


● bind9.service - BIND Domain Name Server
   Loaded: loaded (/lib/systemd/system/bind9.service; enabled)
  Drop-In: /run/systemd/generator/bind9.service.d
           └─50-insserv.conf-$named.conf
   Active: active (running) since Sun 2015-07-12 11:24:00 CEST; 54min ago
     Docs: man:named(8)
 Main PID: 897 (named)
   CGroup: /system.slice/bind9.service
           └─897 /usr/sbin/named -f -u bind



More information about the Pkg-systemd-maintainers mailing list