[Lxc-users] lxc-start fails when / is a shared mount

Marios Titas redneb8888 at gmail.com
Mon Sep 19 16:14:04 UTC 2011


It seems that the kernel commit
2144440327fa01b2f3f65e355120a78211685702 from 2005 is the culprit.
It's the commit that implemented mount --move in presense of shared
mounts. It added a check in fs/namespace.c that makes pivot_root fail
when the old root is marked as a shared mount. I don't understand the
reason for that.


On Mon, Sep 19, 2011 at 09:35, Serge Hallyn <serge.hallyn at canonical.com> wrote:
> Quoting Marios Titas (redneb8888 at gmail.com):
>> Hi list,
>>
>> I just ran into this problem: If you do
>>     # mount --make-shared /
>> to mark / as a shared mount then lxc-start fails when you have
>> specified a lxc.rootfs in the configuration file. The error that
>> lxc-start gives is the following:
>>     Invalid argument - pivot_root syscall failed
>> Is this the normal behavior or is this a kernel bug?
>
> It is normal behavior.  Perhaps lxc should fall back to chroot when
> pivot_root fails.
>
> -serge
>




More information about the lxc-users mailing list