[systemd-devel] dev-root.device is not active, results in an umount spree

Lennart Poettering lennart at poettering.net
Sun May 17 09:06:21 PDT 2015

On Sun, 17.05.15 13:02, Martin Pitt (martin.pitt at ubuntu.com) wrote:

> Hey Lennart,
> Lennart Poettering [2015-05-14 18:09 +0200]:
> > > As I mentioned before, simply ignoring /dev/root doesn't help in all
> > > cases, and hardcoding it in the code is a bit ugly.
> > 
> > It doesn't help in all cases? Which ones? Can you elaborate?
> It doesn't seem to help at all in e. g. LXC. 

Sounds like borkage in LXC.

Please ask LXC to follow these guidelines:


If you follow these guidelines with your container software systemd
will work fine. If you don't, then you are on your own.

More specifically, they should follow the second item in the
"Execution Environment" section: pre-mount /sys read-only in the
container. Whether device management is available is detected by
systemd by checking if /sys is writable. If it is writable it is
assumed that the full device logic is available. This results in udev
being started, .device units in systemd are made available and .mount
units get dependencies on them.

If LXC mounts /sys read-only however, then udev does not get started,
no .device units are available, and no dependencies create on
them. And all should work as intended.


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list