[systemd-devel] Why don't remote file systems wait for network-online.target?

Christian Seiler christian at iwakd.de
Tue Mar 10 05:09:49 PDT 2015

Am 2015-03-10 12:40, schrieb Martin Pitt:
> we got a report [1] that NFS fstab mounts (sometimes) aren't being
> mounted at boot as the network is still down:
> | mount[866]: mount.nfs: Network is unreachable
> | systemd[1]: mnt-server.mount mount process exited, code=exited 
> status=32
> | systemd[1]: Failed to mount /mnt/server.
> | systemd[1]: Dependency failed for Remote File Systems.
> | systemd[1]: Job remote-fs.target/start failed with result 
> 'dependency'.
> | systemd[1]: Unit mnt-server.mount entered failed state.
> At the moment, neither network-fs-pre.target has no dependencies at
> all, and the fstab-generator-created .mount units only have
> "Before=remote-fs.target" and no other dependencies.

I can't reproduce that under Debian Jessie with systemd-215. Individual
NFS mounts (mnt-server.mount in your case) are ordered like this here:

After=systemd-journald.socket remote-fs-pre.target network.target
       network-online.target system.slice -.mount
Wants=network-online.target system.slice

This is part of mount unit's DefaultDependencies, see:

(mount_is_network checks for fstype or _netdev; and nfs is in the list
of filesystems considered network.)


More information about the systemd-devel mailing list