Summary: | remote file systems cannot be unmounted at shutdown | ||
---|---|---|---|
Product: | systemd | Reporter: | Mario Natiello <mario.natiello> |
Component: | general | Assignee: | systemd-bugs |
Status: | RESOLVED FIXED | QA Contact: | systemd-bugs |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
journalfile, standard form (connections time out)
journalfile, modified systemd handling. No timeout issues when umounting remote devices journal file. Modified systemd handling but still failing to umount |
Description
Mario Natiello
2014-01-17 08:35:46 UTC
Have you tried making the mount Requires=network.target and After=network.target to take it down before the network? Created attachment 92267 [details]
journalfile, modified systemd handling. No timeout issues when umounting remote devices
(In reply to comment #1) > Have you tried making the mount Requires=network.target and > After=network.target to take it down before the network? More or less. I added After=network.target to /usr/lib/systemd/systemd-user-sessions.services and the problem persists. However, changing /usr/lib/systemd/systemd-user-sessions.services in this way: #After=remote-fs.target After=network.target After=NetworkManager.service does the trick. The second attachment I filed shows that the filesystems are unmounted properly, and shutdown proceeds in a few seconds without time delay. Shouldn't this "fix" -or yours if it also works- be incorporated to systemd? Another "fix" is to umount the devices manually right before issuing the shutdown command. This does fix the problem but it hides the fact that the system is handling the shutdown process improperly. systemd isn't actually aware of whether a file system requires network access or other resources (like a USB stick). So, it provides dependency primitives like After=, Requires=, and others to allow defining dependencies on devices, services, targets, and other resources. It's the mount unit author's responsibility to specify the proper dependencies, which systemd will then respect. We also can't fix this by adding After=network.target and After=NetworkManager.service to every mount. This would not fix mounts depending on more sophisticated network conditions, and it would unnecessarily delay mounts of file systems that don't need the network. > We also can't fix this by adding After=network.target and After=NetworkManager.service to every mount.
To clarify, having re-read your comment, we also can't do this for systemd-user-sessions.service for the same reasons.
(In reply to comment #5) > > We also can't fix this by adding After=network.target and After=NetworkManager.service to every mount. > > To clarify, having re-read your comment, we also can't do this for > systemd-user-sessions.service for the same reasons. Addendum: The modification I proposed does not work either. Or it is at least erratic. Not having changed other things, I twice found myself in the situation where umount of the remote systems fails and the shutdown process is delayed by 90 sec before the timeout takes over. So which one is the proper After=... command remains unclear. The only thing that invariably works without obstacles is to umount the sshfs devices myself by hand right before issuing shutdown. I will attach a third journalfile with a umount failure, run in the same conditions as journalfile nr 2. Created attachment 92289 [details]
journal file. Modified systemd handling but still failing to umount
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.