Subject: Re: [vserver] readonly root not working (mkdir(): read-only filesystem on vcontext command)
From: Benjamin Sonntag <benjamin@octopuce.fr>
Date: Mon, 21 Mar 2011 09:25:16 +0100
Mon, 21 Mar 2011 09:25:16 +0100
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)
- 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

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.



Regards,

Benjamin Sonntag



["application/pgp-signature" not shown]