[systemd-devel] network-online.target and manual mounts
Dave Reisner
d at falconindy.com
Wed Jan 1 12:00:22 PST 2014
On Wed, Jan 01, 2014 at 11:43:15PM +0400, Andrey Borzenkov wrote:
> systemd.special(7) suggests that network-online.target should be pulled
> in by consumer. Unfortunately, that means that when booting without
> active consumer (let's say no NFS mounts in fstab) network-online.target
> is not started at all. If NFS is mounted manually later, no
> synchronization point exists on shutdown, so network may be stopped
> before NFS is unmounted. This leads to prolonged timeout.
>
> Is there any mechanism to start it when NFS (or other network) mount
> appears? The very existence of network mount could be considered as
> indication that network *is* online?
I think tihs is a post-v208 change, but if you manually mount a network
share manually after booting, network-online.target is pulled in as
Wants= and After=. This should make for correct ordering on shutdown.
# mount.cifs //10.0.2.1/pkgs pkg -o defaults,guest,rw
# systemctl show -p After -p Wants $PWD/pkg
Wants=network-online.target system.slice
After=systemd-journald.socket remote-fs-pre.target network.target network-online.target system.slice -.mount
d
More information about the systemd-devel
mailing list