[lxc-devel] mount ro in guest change host filesystem to ro
Michael Tokarev
mjt at tls.msk.ru
Fri Sep 2 04:35:51 UTC 2011
On 02.09.2011 00:46, Daniel Lezcano wrote:
> On 09/01/2011 09:30 PM, Nico wrote:
>> Hi,
>>
>> I just wanted to give it a try again with lxc after one year,
>> this is so bad same bugs are always here :
>>
>> * you can do a "mount -o romount,ro /" inside container (reported
>> since first times ... :( ),
>> and host filesystem is remounted ro !!
>
> Argh ! I still don't understand how that can happen with a CLONE_NEWNS
> and a pivot_root.
> Do you have particular mount options on your host's rootfs ?
In order for guest remount to NOT influence host mount, you have to
give -o bind option to mount inside guest. If you don't specify
MS_BIND with MS_REMOUNT, the remount applies to _host_ mountpoint,
not guest.
This has been discussed several times on irc.
/mjt
More information about the lxc-devel
mailing list