Bug#792030: systemd does not reliably mount nfs shares
Athanasius
debian at miggy.org
Wed Mar 15 15:00:41 GMT 2017
I suspect I may be seeing a variant of this.
Until yesterday I was still on Debian jessie, using systemd since I
upgraded to that version, with no steps taken to limit systemd's
authority over the system.
Yesterday I did an in-place upgrade to stretch, as it's now entered
freeze, and immediately encountered issues with mounts. One was an
unrelated issue with still having a line in /etc/fstab to mount
/proc/bus/usb which is no longer valid.
The other issue is that my two NFS mounts from my server (still on
jessie) were failing at boot-time. After I fixed the /proc/bus/usb
issue (by commenting that line out) the next boot had my NFS mounts work
OK. But today they've failed again.
The two lines in /etc/fstab are:
192.168.1.1:/home/users /home/users nfs defaults,soft,intr,timeo=50,retrans=6,fg,nfsvers=3,nosuid,nodev,nofail 0 0
192.168.1.1:/mnt/tuesday/data0 /mnt/tuesday/data0 nfs defaults,soft,intr,timeo=50,retrans=6,fg,nfsvers=3,nosuid,nodev,nofail 0 0
and these always worked 100% on jessie by the time I'd typed in my
password. In stretch, due to /home/users not being properly mounted I
could not complete a login.
14:50:44 0$ 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 192.168.1.122
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1
dns-search miggy.org
up /sbin/ip link set eth0 mtu 4088
14:57:30 0$ journalctl --output=verbose --unit=home-users.mount --no-pager --boot=0
-- Logs begin at Mon 2017-02-13 13:35:34 GMT, end at Wed 2017-03-15 14:55:01 GMT. --
Wed 2017-03-15 14:00:55.547428 GMT [s=df4dbfefa1b44bd583663f95991c121e;i=25d8e0;b=23bab7faa65e4b4495c296eaefd3e371;m=291d6d;t=54ac55f8b8e33;x=3c2415d4dc8b4bf7]
SYSLOG_FACILITY=3
_MACHINE_ID=6cb34bbd53edf1ffafba705500000009
_HOSTNAME=emilia
SYSLOG_IDENTIFIER=systemd
_TRANSPORT=journal
_PID=1
_UID=0
_GID=0
_COMM=systemd
_EXE=/lib/systemd/systemd
_CMDLINE=/sbin/init
_CAP_EFFECTIVE=3fffffffff
_SYSTEMD_CGROUP=/init.scope
_SYSTEMD_UNIT=init.scope
_SYSTEMD_SLICE=-.slice
PRIORITY=5
CODE_FILE=../src/core/unit.c
UNIT=home-users.mount
_BOOT_ID=23bab7faa65e4b4495c296eaefd3e371
CODE_LINE=4012
CODE_FUNCTION=unit_warn_if_dir_nonempty
MESSAGE_ID=1dee0369c7fc4736b7099b38ecb46ee7
MESSAGE=home-users.mount: Directory /home/users to mount over is not empty, mounting anyway.
WHERE=/home/users
_SOURCE_REALTIME_TIMESTAMP=1489586455547428
Wed 2017-03-15 14:00:55.547767 GMT [s=df4dbfefa1b44bd583663f95991c121e;i=25d8e1;b=23bab7faa65e4b4495c296eaefd3e371;m=291eb4;t=54ac55f8b8f7a;x=781db9b7cca39633]
PRIORITY=6
SYSLOG_FACILITY=3
_MACHINE_ID=6cb34bbd53edf1ffafba705500000009
_HOSTNAME=emilia
SYSLOG_IDENTIFIER=systemd
_TRANSPORT=journal
_PID=1
_UID=0
_GID=0
_COMM=systemd
_EXE=/lib/systemd/systemd
_CMDLINE=/sbin/init
_CAP_EFFECTIVE=3fffffffff
_SYSTEMD_CGROUP=/init.scope
_SYSTEMD_UNIT=init.scope
_SYSTEMD_SLICE=-.slice
CODE_FILE=../src/core/unit.c
CODE_LINE=1493
CODE_FUNCTION=unit_status_log_starting_stopping_reloading
MESSAGE_ID=7d4958e842da4a758f6c1cdc7b36dcc5
UNIT=home-users.mount
_BOOT_ID=23bab7faa65e4b4495c296eaefd3e371
MESSAGE=Mounting /home/users...
_SOURCE_REALTIME_TIMESTAMP=1489586455547767
Wed 2017-03-15 14:00:55.605952 GMT [s=df4dbfefa1b44bd583663f95991c121e;i=25d91f;b=23bab7faa65e4b4495c296eaefd3e371;m=2a0252;t=54ac55f8c7318;x=11ae7b52ca5251df]
SYSLOG_FACILITY=3
_MACHINE_ID=6cb34bbd53edf1ffafba705500000009
_HOSTNAME=emilia
SYSLOG_IDENTIFIER=systemd
_TRANSPORT=journal
_PID=1
_UID=0
_GID=0
_COMM=systemd
_EXE=/lib/systemd/systemd
_CMDLINE=/sbin/init
_CAP_EFFECTIVE=3fffffffff
_SYSTEMD_CGROUP=/init.scope
_SYSTEMD_UNIT=init.scope
_SYSTEMD_SLICE=-.slice
PRIORITY=5
UNIT=home-users.mount
_BOOT_ID=23bab7faa65e4b4495c296eaefd3e371
CODE_FILE=../src/core/mount.c
CODE_LINE=1208
CODE_FUNCTION=mount_sigchld_event
MESSAGE=home-users.mount: Mount process exited, code=exited status=32
_SOURCE_REALTIME_TIMESTAMP=1489586455605952
Wed 2017-03-15 14:00:55.606040 GMT [s=df4dbfefa1b44bd583663f95991c121e;i=25d920;b=23bab7faa65e4b4495c296eaefd3e371;m=2a02ce;t=54ac55f8c7394;x=cf60f3f4104cc78e]
SYSLOG_FACILITY=3
_MACHINE_ID=6cb34bbd53edf1ffafba705500000009
_HOSTNAME=emilia
SYSLOG_IDENTIFIER=systemd
_TRANSPORT=journal
_PID=1
_UID=0
_GID=0
_COMM=systemd
_EXE=/lib/systemd/systemd
_CMDLINE=/sbin/init
_CAP_EFFECTIVE=3fffffffff
_SYSTEMD_CGROUP=/init.scope
_SYSTEMD_UNIT=init.scope
_SYSTEMD_SLICE=-.slice
CODE_FILE=../src/core/job.c
CODE_LINE=804
CODE_FUNCTION=job_log_status_message
PRIORITY=3
UNIT=home-users.mount
_BOOT_ID=23bab7faa65e4b4495c296eaefd3e371
MESSAGE_ID=be02cf6855d2428ba40df7e9d022f03d
RESULT=failed
MESSAGE=Failed to mount /home/users.
_SOURCE_REALTIME_TIMESTAMP=1489586455606040
Wed 2017-03-15 14:00:55.606078 GMT [s=df4dbfefa1b44bd583663f95991c121e;i=25d921;b=23bab7faa65e4b4495c296eaefd3e371;m=2a0328;t=54ac55f8c73ee;x=2a60bfcc6bf98719]
SYSLOG_FACILITY=3
_MACHINE_ID=6cb34bbd53edf1ffafba705500000009
_HOSTNAME=emilia
SYSLOG_IDENTIFIER=systemd
_TRANSPORT=journal
_PID=1
_UID=0
_GID=0
_COMM=systemd
_EXE=/lib/systemd/systemd
_CMDLINE=/sbin/init
_CAP_EFFECTIVE=3fffffffff
_SYSTEMD_CGROUP=/init.scope
_SYSTEMD_UNIT=init.scope
_SYSTEMD_SLICE=-.slice
PRIORITY=5
CODE_FILE=../src/core/unit.c
CODE_LINE=2039
CODE_FUNCTION=unit_notify
UNIT=home-users.mount
_BOOT_ID=23bab7faa65e4b4495c296eaefd3e371
MESSAGE=home-users.mount: Unit entered failed state.
_SOURCE_REALTIME_TIMESTAMP=1489586455606078
Wed 2017-03-15 14:02:06.856126 GMT [s=df4dbfefa1b44bd583663f95991c121e;i=25dd80;b=23bab7faa65e4b4495c296eaefd3e371;m=467248b;t=54ac563cba3e1;x=fce824f8054443b9]
SYSLOG_FACILITY=3
_MACHINE_ID=6cb34bbd53edf1ffafba705500000009
_HOSTNAME=emilia
SYSLOG_IDENTIFIER=systemd
_TRANSPORT=journal
_PID=1
_UID=0
_GID=0
_COMM=systemd
_EXE=/lib/systemd/systemd
_CMDLINE=/sbin/init
_CAP_EFFECTIVE=3fffffffff
_SYSTEMD_CGROUP=/init.scope
_SYSTEMD_UNIT=init.scope
_SYSTEMD_SLICE=-.slice
PRIORITY=5
CODE_FILE=../src/core/unit.c
UNIT=home-users.mount
_BOOT_ID=23bab7faa65e4b4495c296eaefd3e371
CODE_LINE=4012
CODE_FUNCTION=unit_warn_if_dir_nonempty
MESSAGE_ID=1dee0369c7fc4736b7099b38ecb46ee7
MESSAGE=home-users.mount: Directory /home/users to mount over is not empty, mounting anyway.
WHERE=/home/users
_SOURCE_REALTIME_TIMESTAMP=1489586526856126
Wed 2017-03-15 14:02:06.857479 GMT [s=df4dbfefa1b44bd583663f95991c121e;i=25dd81;b=23bab7faa65e4b4495c296eaefd3e371;m=46729c3;t=54ac563cba91b;x=b94c186e3ec88c2e]
PRIORITY=6
SYSLOG_FACILITY=3
_MACHINE_ID=6cb34bbd53edf1ffafba705500000009
_HOSTNAME=emilia
SYSLOG_IDENTIFIER=systemd
_TRANSPORT=journal
_PID=1
_UID=0
_GID=0
_COMM=systemd
_EXE=/lib/systemd/systemd
_CMDLINE=/sbin/init
_CAP_EFFECTIVE=3fffffffff
_SYSTEMD_CGROUP=/init.scope
_SYSTEMD_UNIT=init.scope
_SYSTEMD_SLICE=-.slice
CODE_FILE=../src/core/unit.c
CODE_LINE=1493
CODE_FUNCTION=unit_status_log_starting_stopping_reloading
MESSAGE_ID=7d4958e842da4a758f6c1cdc7b36dcc5
UNIT=home-users.mount
_BOOT_ID=23bab7faa65e4b4495c296eaefd3e371
MESSAGE=Mounting /home/users...
_SOURCE_REALTIME_TIMESTAMP=1489586526857479
Wed 2017-03-15 14:02:06.908838 GMT [s=df4dbfefa1b44bd583663f95991c121e;i=25dd84;b=23bab7faa65e4b4495c296eaefd3e371;m=467f25a;t=54ac563cc71b2;x=315a3b1d75bcd231]
PRIORITY=6
SYSLOG_FACILITY=3
_MACHINE_ID=6cb34bbd53edf1ffafba705500000009
_HOSTNAME=emilia
SYSLOG_IDENTIFIER=systemd
_TRANSPORT=journal
_PID=1
_UID=0
_GID=0
_COMM=systemd
_EXE=/lib/systemd/systemd
_CMDLINE=/sbin/init
_CAP_EFFECTIVE=3fffffffff
_SYSTEMD_CGROUP=/init.scope
_SYSTEMD_UNIT=init.scope
_SYSTEMD_SLICE=-.slice
CODE_FILE=../src/core/job.c
CODE_LINE=804
CODE_FUNCTION=job_log_status_message
MESSAGE_ID=39f53479d3a045ac8e11786248231fbf
RESULT=done
UNIT=home-users.mount
_BOOT_ID=23bab7faa65e4b4495c296eaefd3e371
MESSAGE=Mounted /home/users.
_SOURCE_REALTIME_TIMESTAMP=1489586526908838
I then switched to a text console, logged in as root, and ran 'systemctl
start home-users.mount' (and similar for mnt-tuesday-data0.mount) and
that worked without issues. So there's obviously some race
condition/lack of interlock with something else being finished starting.
If further information is required I'll capture it when it's in the
"failed to mount automatically during boot" state, before I mount
manually.
--
- Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/
Finger athan(at)fysh.org for PGP key
"And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20170315/a343b1b3/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list