<p>On Jul 18, 2011 2:58 PM, "Serge E. Hallyn" <<a href="mailto:serge.hallyn@canonical.com">serge.hallyn@canonical.com</a>> wrote:<br>
><br>
> Quoting Papp Tamas (<a href="mailto:tompos@martos.bme.hu">tompos@martos.bme.hu</a>):<br>
> > On 2011-07-18 15:14, Serge E. Hallyn wrote:<br>
> > > It should be possible, but you have to set it up in advance. You can<br>
> > > create a /lxcshare directory on the host, make sure it is slave<br>
> > > (mount --make-rslave /lxcshare) and bind-mount that into the container<br>
> > > at startup. Then mounting a directory into /lxcshare should expose it<br>
> > > to the container.<br>
> > ><br>
> ><br>
> > helo!<br>
> ><br>
> > Thank you for you answer, Serge:)<br>
> ><br>
> > I'm not sure I correctly unserstand this part of manual, but I'm sure,<br>
> > this is not exactly I want.<br>
> > I wanted (and also want to do it in the future) to mount a directory as<br>
> > 'adhoc', without restarting the container.<br>
><br>
> I don't think that's possible. But note that the setup I'm proposing<br>
> only needs to be done once at container creation, and could be supported<br>
> in templates.<br>
><br>
> Once set up, usage would be:<br>
><br>
> host admin:<br>
><br>
> mkdir /lxcshare/cdrom<br>
> mount /dev/cdrom /lxcshare/cdrom<br>
><br>
> container admin:<br>
> mount --move /lxcshare/cdrom /mnt/cdrom</p>
<p>You'd also need to --make-shared the host mount before --bind'ing and --make-slave'ing to the container ... by default mounts are --private.</p>
<p>C Anthony [mobile]</p>