Red Hat Bugzilla – Bug 999061
NFS mounts get added to local-fs.target which causes a dependency cycle and a hang on shutdown
Last modified: 2013-10-08 07:38:48 EDT
On a booted Fedora 19 system, if you happen to mount an NFS filesystem then the system creates a mount unit configuration for it in systemd. So:
$ mkdir /mnt/F19
$ mount csfs:/cs/software/fedora/fedora19 /mnt/F19
$ systemctl status mnt-F19.mount
For some reason, this unit is now scheduled before local-fs.target:
$ systemctl show mnt-F19.mount | grep Before
But now there is a dependency cycle, because:
local-fs.target is after mnt-F19.mount
mnt-F19.mount is after network.target
network.target is after network.service
network.service is after basic.target
basic.target is after sysinit.target
sysinit.target is after local-fs.target
(this is on a machine with NetworkManager not installed and the SysV network service turned on, but that may not in fact matter).
As a result, when this machine is shut down, the network mount is never unmounted and the shutdown hangs forever. If I manually unmount all network filesystems before shutting down then the system shuts down cleanly.
The correct thing to do would seem to be to make mnt-F19.mount come before remote-fs.target and not involve local-fs.target at all.
systemd version: systemd-204-9.fc19.x86_64
Possibly related: Bug 988587, Bug 908123
a network mount is defined either by the "_netdev" option in /etc/fstab or by the following filesystems:
Can you please provide the exact line /proc/self/mountinfo contains for that mount in question?
# egrep F19 /proc/self/mountinfo
139 34 0:40 / /mnt/F19 rw,relatime shared:122 - nfs csfs:/cs/software/fedora/fedora19 rw,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=220.127.116.11,mountvers=3,mountport=597,mountproto=udp,local_lock=none,addr=18.104.22.168
systemd-204-16.fc19 has been submitted as an update for Fedora 19.
systemd-204-16.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.