Bug#739721: systemd: NFS shares are not automatically mounted during boot

Jim Barber jim.barber at primaryhealthcare.com.au
Fri Oct 31 00:30:52 GMT 2014


Package: systemd
Version: 215-5+b1

Hi.

I have a similar problem, and I think it belongs in this bug report.
On boot, NFS file systems used to work fine.
It was after upgrading from initscripts version 2.88dsf-53.4 to 2.88dsf-57 that all my NFS mounts no longer mount on boot.
I was going to report the bug against that package but the change log for it states:

Version 2.88dsf-55.1 says:

  * Skip the mountnfs hook when being triggered by the networking SysV init
    script and instead use the systemd built-in mechanisms to mount remote
    file systems.
    This avoids a deadlock caused by the rpcbind SysV init script depending
    on $network and the $network LSB facility being provided by the networking
    SysV init script. (Closes: #746587)

So I figured it is likely to be systemd now...

Once I log in and run a 'mount -a' all NFS file systems are mounted just fine.

I have done a number of boots on this system and also another system and they consistently fail to mount NFS after the upgrade above.
This system I am reporting about is an amd64 architecture box, and the other is running an i386 version of Debian.

Note that I have a couple of other NFS mounts too, all of which fail in the same way.
Two of the mounts from come my main Linux server, and the other mount comes from a Synology NAS.

Looking at one of my filesystems I see:

   $ systemctl status -l usr-local-share.mount 
   ● usr-local-share.mount - /usr/local/share
      Loaded: loaded (/etc/fstab)
      Active: failed (Result: exit-code) since Fri 2014-10-31 07:51:39 AWST; 5min ago
       Where: /usr/local/share
        What: gecko:/usr/local/share
        Docs: man:fstab(5)
              man:systemd-fstab-generator(8)
     Process: 341 ExecMount=/bin/mount -n gecko:/usr/local/share /usr/local/share -t nfs -o _netdev,noatime,nolock,bg,rsize=8192,wsize=8192 (code=exited, status=32)

   Oct 31 07:51:39 trex systemd[1]: usr-local-share.mount mount process exited, code=exited status=32
   Oct 31 07:51:39 trex mount[341]: mount.nfs: Network is unreachable
   Oct 31 07:51:39 trex systemd[1]: Failed to mount /usr/local/share.
   Oct 31 07:51:39 trex systemd[1]: Unit usr-local-share.mount entered failed state.

This seems to suggest my network wasn't ready.
My network config on the host is very simple:

   $ cat /etc/network/interfaces
   # This file describes the network interfaces available on your system
   # and how to activate them. For more information, see interfaces(5).

   # The loopback network interface
   auto lo
   iface lo inet loopback

   # The primary network interface
   allow-hotplug eth0
   iface eth0 inet static
	address 10.1.1.2/24
	gateway 10.1.1.1
	ethernet-wol g

   # This is an autoconfigured IPv6 interface
   iface eth0 inet6 auto


The journalctl output suggests my network was up before the NFS filesystems attempted to start as you can see in the first 2 lines of the below followed by the NFS mount attempt:

   Oct 31 07:51:39 trex kernel: sky2 0000:03:00.0 eth0: Link is up at 1000 Mbps, full duplex, flow control both
   Oct 31 07:51:39 trex kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
   Oct 31 07:51:39 trex kernel: Key type dns_resolver registered
   Oct 31 07:51:39 trex kernel: NFS: Registering the id_resolver key type
   Oct 31 07:51:39 trex kernel: Key type id_resolver registered
   Oct 31 07:51:39 trex kernel: Key type id_legacy registered
   Oct 31 07:51:39 trex ifup[326]: mount.nfs: Network is unreachable
   Oct 31 07:51:39 trex systemd[1]: usr-local-share.mount mount process exited, code=exited status=32
   Oct 31 07:51:39 trex mount[340]: mount.nfs: Network is unreachable
   Oct 31 07:51:39 trex mount[341]: mount.nfs: Network is unreachable
   Oct 31 07:51:39 trex ifup[326]: mount.nfs: Network is unreachable
   Oct 31 07:51:39 trex systemd[1]: Failed to mount /usr/local/share.

At least it looks that way to me. It doesn't say when the IPv4 address was applied, but since it is static, I'd imagine it was immediate.

The /etc/fstab file:

   $ cat /etc/fstab 
   # /etc/fstab: static file system information.
   #
   # Use 'blkid' to print the universally unique identifier for a
   # device; this may be used with UUID= as a more robust way to name devices
   # that works even if disks are added and removed. See fstab(5).
   #
   # <file system>         <mount point>                   <type>          <options>                                  <dump>  <pass>
   # / was on /dev/sda2 during installation
   LABEL=root              /                               ext4            relatime,errors=remount-ro                      0       1
   # swap was on /dev/sda1 during installation
   LABEL=swap              none                            swap            sw                                              0       0
   /dev/sr0                /media/cdrom0                   udf,iso9660     user,noauto                                     0       0
   /dev/sdb1               /media/usb0                     auto            rw,user,noauto                                  0       0
   /dev/sdb2               /media/usb1                     auto            rw,user,noauto                                  0       0

   # NFS.

   # Enabling this method hangs the boot where the LSB sets preliminary kepmap for some reason...
   #gecko:/usr/local/share /usr/local/share                nfs             _netdev,noauto,noatime,nolock,bg,rsize=8192,wsize=8192,comment=systemd.automount        0       0

   gecko:/usr/local/share  /usr/local/share                nfs             _netdev,noatime,nolock,bg,rsize=8192,wsize=8192 0       0
   gecko:/home/jim         /home/jim/gecko                 nfs             _netdev,noatime,nolock,bg,rsize=8192,wsize=8192 0       0
   nas:/volume1/data       /usr/local/share/media/nas      nfs             _netdev,noatime,nolock,bg,rsize=8192,wsize=8192 0       0


That's all I can think of to supply for now.
Let me know if you need me to add anything else.

Regards,
Jim.

-- Package-specific info:

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages systemd depends on:
ii  acl             2.2.52-2
ii  adduser         3.113+nmu3
ii  initscripts     2.88dsf-57
ii  libacl1         2.2.52-2
ii  libaudit1       1:2.4-1
ii  libblkid1       2.25.2-2
ii  libc6           2.19-12
ii  libcap2         1:2.24-6
ii  libcap2-bin     1:2.24-6
ii  libcryptsetup4  2:1.6.6-3
ii  libgcrypt20     1.6.2-4
ii  libkmod2        18-3
ii  liblzma5        5.1.1alpha+20120614-2
ii  libpam0g        1.1.8-3.1
ii  libselinux1     2.3-2
ii  libsystemd0     215-5+b1
ii  sysv-rc         2.88dsf-57
ii  udev            215-5+b1
ii  util-linux      2.25.2-2

Versions of packages systemd recommends:
ii  dbus            1.8.8-2
ii  libpam-systemd  215-5+b1

Versions of packages systemd suggests:
pn  systemd-ui  <none>

-- no debconf information




More information about the Pkg-systemd-maintainers mailing list