Bug 1045287 - systemd: mounts using "nofail" option are not correctly ordered during shutdown
Summary: systemd: mounts using "nofail" option are not correctly ordered during shutdown
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: systemd maintainers
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-21 08:03 UTC by Franck Bui
Modified: 2021-03-24 15:27 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Franck Bui 2017-06-21 08:03:46 UTC
When a mount entry in fstab uses the "nofail" option, systemd doesn't order the corresponding mount unit with a "Before=local-fs.target" so if the mount unit takes time to be activated, it won't delay the whole boot process.

However by doing this, we also remove ordering constraint for the shutdown process. This can lead to the mount unit being stopped while some applications are still using the corresponding mount point.

This problem was discussed in bug 1036962 but this bug was more about NFS or remote fs. In this case the fix already exists since v218 and remote fs automatically gain a Before=remote-fs.target after they're mounted.

A similar fix has been submitted upstream for local fs which can be found here:
https://github.com/systemd/systemd/pull/6102 and is waiting for approval.