sorry, replied off-list by mistake<br><div class="gmail_quote"><div class="gmail_quote"><div class="im"><br>2012/11/20 Lennart Poettering <span dir="ltr"><<a href="mailto:lennart@poettering.net" target="_blank">lennart@poettering.net</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Fri, 16.11.12 13:05, Alexander Vladimirov (<a href="mailto:alexander.idkfa.vladimirov@gmail.com" target="_blank">alexander.idkfa.vladimirov@gmail.com</a>) wrote:<br>
<br>
> Using recommendations here:<br>
> <a href="http://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg06972.html" target="_blank">http://www.mail-archive.com/systemd-devel@lists.freedesktop.org/msg06972.html</a><br>
> and updated lxc-archlinux template I have managed to run (almost)<br>
> unmodified Arch Linux installation in container.<br>
> This exposed a couple of problems in systemd.<br>
> The first one is: systemd goes through /proc/self/mountinfo entries to<br>
> perform unmount actions on shutdown. when running in container, it contains<br>
> root filesystem entry, which systemd fails to unmount, resulting in unclean<br>
> shutdown.<br>
<br>
</div>Well, how that? the root fs should be owned by the host, so be unmounted<br>
by it later on?<br></blockquote></div><div>That what I assumed, but I might be wrong.<br></div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
> I was able to fix it using simple patch (<a href="http://pastie.org/5380592" target="_blank">http://pastie.org/5380592</a>) which<br>
> makes systemd ignore root mount when running in container.<br>
<br>
</div>Hmm, the code in mount_points_list_umount() in umount.c already exlcudes<br>
/ and /usr from all unmounting?<br></blockquote></div><div>Yes, it does, but those filesystems are counted as failed then, and systemd reports  that it cannot unmount all filesystems.<br>I was guessing if it could be the reason why journal gets corrupted and it turns out it's not.<br>

It still seems a bit useful, since it prevents systemd from printing cryptic warnings about failed unmounts without actual filesystem name.<br></div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><br>
> The second issue is journald reporting journal corruption on every<br>
> container boot, regardless of clean shutdown. This also happens when I<br>
> bind-mount hosts journal directory into container.<br>
<br>
</div>Hmm, this is interesting. Do you see any messages about journal shutting<br>
down in the journal?<br></blockquote></div><div>That's  what container's journal look like after shutdown: <a href="http://pastie.org/private/njgmtyxdglrpx3qxspufog" target="_blank">http://pastie.org/private/njgmtyxdglrpx3qxspufog</a>,<br>

there's no warnings or errors on console during or after shutdown.<br></div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><br>
> Can anyone provide any insights on how can I find out what causes journal<br>
> corruption?<br>
<br>
</div>I'll try to reproduce this here.<br></blockquote></div><div>I will be happy to provide any assistance you need.<br></div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<span><font color="#888888"><br>
Lennart<br>
<br>
--<br>
Lennart Poettering - Red Hat, Inc.<br>
</font></span></blockquote></div></div><br>
</div><br>