Bug 999061 - NFS mounts get added to local-fs.target which causes a dependency cycle and a hang on shutdown
NFS mounts get added to local-fs.target which causes a dependency cycle and a...
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-08-20 12:11 EDT by Ian Collier
Modified: 2013-10-08 07:38 EDT (History)
9 users (show)

See Also:
Fixed In Version: systemd-204-16.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-08 07:38:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ian Collier 2013-08-20 12:11:09 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
Before=local-fs.target umount.target

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
Comment 1 Harald Hoyer 2013-08-21 05:30:05 EDT
a network mount is defined either by the "_netdev" option in /etc/fstab or by the following filesystems:

Comment 2 Lennart Poettering 2013-09-12 15:28:05 EDT
Can you please provide the exact line /proc/self/mountinfo contains for that mount in question?
Comment 3 Ian Collier 2013-09-13 05:32:12 EDT
# 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=,mountvers=3,mountport=597,mountproto=udp,local_lock=none,addr=
Comment 4 Fedora Update System 2013-10-06 18:16:22 EDT
systemd-204-16.fc19 has been submitted as an update for Fedora 19.
Comment 5 Fedora Update System 2013-10-08 07:38:48 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.