Systemd on vivid beta

Tom H tomh0665 at gmail.com
Thu Mar 12 13:30:07 UTC 2015


On Thu, Mar 12, 2015 at 7:51 AM, Colin Law <clanlaw at gmail.com> wrote:
>
> The plot thickens!
> Having worked around the fact that syslog closes down too soon by
> adding diy logging to a file from the script I find that the culprit
> is a line of the form
> umount -l /path/to/mountpoint
> where this was orginally mounted using something like
> mount -t cifs -o credentials=***,user,rw,uid=1000 //192.168.1.nnn/path
> /path/to/mountpoint
>
> The umount command takes anything up to 2 minutes to complete.
> If I use systemctl stop to stop the service it runs straight through
> without delay.  I wonder whether some networking service has also been
> stopped too soon and umount is timing out waiting for a response.

I agree with the "network's gone down before the unmount" theory. I'm
pretty sure that I've hit this problem with an nfs mount.

If you're using NM, there's just been an update to adjust the
dependencies of NetworkManager-wait-online.service and enable it that
might resolve your problem.

If you're using ifupdown, you could try the workaround below. You can
choose whatever you want for "cifs-wait-for-net" and you should use
the name of your sysvinit script for "special-cifs". I'm not 100% sure
but this should work even though it's a sysvinit script because
systemd-sysv-generator will create a same-named service.

# vi /etc/systemd/system/cifs-wait-for-net.service
[Unit]
Description=Network online before network services
After=network-online.target
Before=special-cifs.service

[Install]
WantedBy=multi-user.target

# sc enable cifs-wait-for-net.service

And reboot.




More information about the ubuntu-users mailing list