You are not logged in.
I'm using networkd and I have enabled the network-wait-online service, so at boot-time my NFS shares are mounted after the network becomes available. That all works perfectly.
However, it doesn't work the other way around i.e. when shutting down. The network is brought down, and then systemd attempts to unmount the shares, which obviously doesn't work.
Have I missed a step?
Last edited by tomk (2014-07-04 12:31:47)
Offline
Are the NFS mount.units actually ordered After=network-wait-online.service? If so, I think that would be an indication that network-wait-online.service doesn't work the same way when shutting down. That is, it doesn't delay the shutdown of the network management service until after all dependent network using services have stopped.
If that is the case, then I would call this a bug and ask on [systemd-devel] (or the IRC).
Offline
I'm not using it, but reading your topic made me associate the "nfs-client.target" mentioned here: https://mailman.archlinux.org/pipermail … 26393.html
Offline
I'm not using it, but reading your topic made me associate the "nfs-client.target" mentioned here: https://mailman.archlinux.org/pipermail … 26393.html
I checked this out too, but it has a lot of 'Wants' that I don't really need. Maybe I could fix it up, but I use autofs so I don't have this problem (the real autofs, not the systemd one).
% systemctl cat nfs-client.target
# /usr/lib/systemd/system/nfs-client.target
[Unit]
Description=NFS client services
Before=remote-fs-pre.target
Wants=remote-fs-pre.target
# Note: we don't "Wants=rpc-statd.service" as "mount.nfs" will arrange to
# start that on demand if needed.
Wants=rpc-gssd.service rpc-svcgssd.service
Wants=nfs-blkmap.service rpc-statd-notify.service
Before=rpc-gssd.service rpc-svcgssd.service nfs-blkmap.service
[Install]
WantedBy=multi-user.target
WantedBy=remote-fs.target
Last edited by WonderWoofy (2014-06-21 01:00:04)
Offline
Yes, I see. I would not want all those either unless really required, particularly the rpc ones.. Better to check out what you ask in post #2 about the ordering first.
Offline
Yeah, nfs-client.target makes no difference, and as mentioned, is unnecessary.
I'm guilty of leaving out an important detail above - I use networkd with wpa_supplicant, and the issue comes down to systemd stopping wpa_supplicant before networkd on shutdown. So i've now ordered my nfs mount units After=wpa_supplicant, and all's well.
Offline