Re: [vserver] readonly root not working (mkdir(): read-only filesystem on vcontext command)

From: Daniel Hokka Zakrisson <daniel_at_hozac.com>
Date: Mon 21 Mar 2011 - 08:28:23 GMT
Message-ID: <43721.192.168.101.15.1300696103.squirrel@192.168.100.17>

Benjamin Sonntag wrote:
> Hi,
>
>
>> Is there a reason you don't just mkdir .oldroot in your base filesystem?
>>
> yes : in the vcontext.c code, there is :
>
> - mkdir (and if it fail, exit)

Unless it already existed.

> - mount (and if it fail, exit)
> - pivot_root (and if it fail, exit)
> - umount (and if it fail, exit)
> - rmdir (and if it fail, exit)
>
> so ... If I pre-create the .oldroot folder, I still have to patch the code for this to work,
> and remove both the mkdir and the rmdir

Nope. Just create the directory.

> Since I wanted to make it works for everybody, not only the one using read-only root,
> I proposed this patch which is far better since /var/run is bound to be read-write anyway.

I have several guests that don't even have a /var. So no, that won't
always work.

-- 
Daniel Hokka Zakrisson
Received on Mon Mar 21 08:28:33 2011
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 21 Mar 2011 - 08:28:34 GMT by hypermail 2.1.8