<div dir="auto">Luca, I have a similar setup where /var/log is not mounted in initramfs for $reasons. I can’t believe I forgot to mention this!</div><div dir="auto"><br></div><div dir="auto">Overriding with the tips you all have mentioned have things on the right track!</div><div dir="auto"><br></div><div dir="auto">Many thanks to the gurus of systemd!</div><div dir="auto"><br></div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 1, 2021 at 2:44 AM Luca Boccassi <<a href="mailto:luca.boccassi@gmail.com">luca.boccassi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div><div dir="ltr">On Fri, 30 Apr 2021 at 22:15, Michael Biebl <<a href="mailto:mbiebl@gmail.com" target="_blank">mbiebl@gmail.com</a>> wrote:<br>><br>> Am Fr., 30. Apr. 2021 um 20:27 Uhr schrieb Rick Winscot<br>> <<a href="mailto:rick.winscot@gmail.com" target="_blank">rick.winscot@gmail.com</a>>:<br>><br>> > 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.<br>> ><br>> > 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.<br>><br>> Fwiw, I can't reproduce the problem. systemd-journal-flush.service is<br>> correctly started after /var has been mounted.<br>> In case you are interested, I attached a journalctl dump, /etc/fstab<br>> and systemd-analyze dump as well.<br>> As you can see, systemd-journal-flush.service has a proper<br>> After=var.mount ordering.<br>><br>> I wonder if you have a dependency loop somewhere and systemd resolves<br>> this by removing that ordering.<br><br></div><div dir="ltr"><div>As mentioned earlier, I strongly suspect systemd-tmpfiles-setup.service - I had the same issue, because my /var/log partition is also not mounted in the initramfs for $reasons, so it appears late at boot.</div><div>I'd suggest again to try and override it.</div></div>
</blockquote></div></div>