[systemd-devel] early mounts in systemd
Michael Biebl
mbiebl at gmail.com
Fri Apr 30 20:08:17 UTC 2021
Am Fr., 30. Apr. 2021 um 20:27 Uhr schrieb Rick Winscot
<rick.winscot at gmail.com>:
> At this point, flush is attempting to re-route /run/log/journal to /var/log/journal ... and the /var partition is not yet mounted. Units generated for fstab in /run/systemd/generator that manage the mount have an After=local-fs-pre.target which is too late.
>
> Other dependency errors appear in the log; all with the same root cause. By the time [ a specified service ] that uses /var is ready, the partition has not yet been mounted. My solution resolves the /var mount as soon as the block device is seen by udev - which made all the dependency errors go away.
Fwiw, I can't reproduce the problem. systemd-journal-flush.service is
correctly started after /var has been mounted.
In case you are interested, I attached a journalctl dump, /etc/fstab
and systemd-analyze dump as well.
As you can see, systemd-journal-flush.service has a proper
After=var.mount ordering.
I wonder if you have a dependency loop somewhere and systemd resolves
this by removing that ordering.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fstab
Type: application/octet-stream
Size: 1215 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210430/725020e8/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: journal.txt.gz
Type: application/gzip
Size: 29147 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210430/725020e8/attachment-0002.gz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: systemd-analyze.dump.txt.gz
Type: application/gzip
Size: 77955 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20210430/725020e8/attachment-0003.gz>
More information about the systemd-devel
mailing list