<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote">2009/3/12 Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span><div class="im">
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>On Wed, Mar 11, 2009 at 05:42:20PM +0100, Florian Vichot wrote:<br>
> Hi everyone,<br>
><br>
> This patch is to allow using the "mount" type in the "filesystem" tag<br>
> for OpenVZ domains.<br>
><br>
> Example:<br>
> ...<br>
>     <filesystem type='mount'><br>
>       <source dir='/path/to/filesystem/directory/' /><br>
>       <target dir='/path/to/pivot/root/' /><br>
>     </filesystem><br>
> ...<br>
><br>
> This is my first patch to an external project, so don't spare me if I<br>
> got things wrong :)<br>
><br>
> Also, I'm curious for suggestions as to how I could allow for the target<br>
> not to be specified in the XML. Because in this case OpenVZ just makes a<br>
> temporary pivot root in "/var/lib/vz/root/" and that is probably<br>
> sufficient for most people, who might not want to have to explicitly<br>
> create a pivot root somewhere, just for mounting the filesystem while<br>
> it's running.<br>
<br>
</div>Actually the <target dir="...">  means something a little different. This<br>
refers to the mount point *within* the container. So for the root filesystem<br>
of the container it will be   <target dir='/' /></blockquote></div><div>No, that patch does something different---it assumes that both <source dir> and <target dir><br>are paths within hardware node. If we denote <source dir> and <target dir> by the VE_PRIVATE<br>

and VE_ROOT correspondingly, we get the following picture.<br><br>In OpenVZ there are VE_ROOT and VE_PRIVATE values for each container<br>(they defined as VE_ROOT and VE_PRIVATE variables in container configuration file).<br>

The VE_PRIVATE defines the actual disposition of conatainer's<br>root filesystem hierarchy. It can lie on it's own partition or be just a directory.<br>When vzctl starts a container, it mounts a VE_PRIVATE "filesystem" to VE_ROOT<br>

mountpoint and then container starts to work in VE_ROOT chroot...<br> <br>So, yes, you are right - in this case we can always assume, that "target dir within container" is "/" :)<br></div><br></div></blockquote>
</div><br>