[systemd-devel] File system gets remounted read-only after using nspawn

Colin Guthrie gmane at colin.guthr.ie
Sat Dec 7 15:56:57 PST 2013


'Twas brillig, and Canek Peláez Valdés at 05/12/13 23:26 did gyre and
gimble:
> Hi; I've been playing with systemd-nspawn with Gentoo. I'm running
> systemd 208, and the normal Gentoo stage3 image [1], installing
> systemd 204 inside it. Everything works great, but for some reason
> after powering off the container, the file system where it resides
> gets remounted read-only. I should notice that this is a file system
> different from /.

Interesting. Can't say I've seen this personally. Only thing I've seen
that is even semi related is that when playing with containers recently,
the service inside the container that remounts root filesystem rw
failed. Not seem much else other than that tho'.

> Also, I usually need to machinectl terminate the machine, otherwise I
> cannot start the same container with the same name (I think this is a
> known bug).

Yeah known bug, but when I played with kernel 3.12.3 today I didn't see
it and started the same machine twice without any problem... So maybe
it's fixed (or maybe I was just lucky!)

> Any idea why do this happens? I took a quick glance through nspawn.c
> code, but the only read-only related code I've seen is when using bind
> mounts, which I don't need to use to trigger this behavior.

My guess is that somehow the events from inside the container are
propigating back to the host and gentoo is doing some remount ro on
shutdown.... just a guess tho'.

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/



More information about the systemd-devel mailing list