this one is great.  You can't have the same mount point in the container as the host.  So mounting /mnt/something in the host and /mnt/something in the container causes pivot root to umount it.<br><br>The thing I did to solve it was to delete the /etc/mtab in the container and link it to /proc/mounts using a symlink<br>
<pre class="code">rm /etc/mtab<br>ln -s /proc/mounts /etc/mtab<br></pre><br>Anyway my mounts now work.<br><br>Thanx to all<br><br><div class="gmail_quote">On Thu, Nov 25, 2010 at 5:14 PM, Christian <span dir="ltr"><<a href="mailto:cf@cannaweb.ch">cf@cannaweb.ch</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br>
i have the same problem before.<br>
lxc 0.7.3 change the mount directory.<br>
now is /usr/lib/lxc/rootfs/ for all container. but is not shared with other container.<br>
try lxc.mount.entry=/mnt/1TB-Movies /usr/lib/lxc/rootfs/mnt2/1TB-Movies      none   rw,bind 0 0<br>
<br>
May be, this is the solution.<br>
<br>
greeting, Christian.<br>
sorry for my bad english.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">
Hi,<br>
<br>
Sorry if I sound like a complete idiot but after spending the last 3 hours trying to figure out why my mounts are not working I have given up. LXC mounts them ( i see this in the logs) en lxc_conf unmounts them (possibly due to pivot_root).<br>

<br>
 Some background:<br>
Host running LXC: Debian squeeze<br>
Version of LXC: 0.7.2-1<br>
<br>
I have create an LXC container using the /usr/lib/lxc/templates/lxc-debian template and this went fine.<br>
<br>
Now on my host i have a USB disk mounted to /mnt/1TB-Movies and I would like to use it in the LXC container I just created. So I add the following to the lxc config file:<br>
lxc.mount.entry=/mnt/1TB-Movies /var/lib/lxc/lxc-file//rootfs/mnt2/1TB-Movies      none   rw,bind 0 0<br>
<br>
When I now start the LXC container and I set the debugging to DEBUG I notice the following:<br>
      lxc-start 1290693817.212 INFO     lxc_conf - cgroup has been setup<br>
      lxc-start 1290693817.212 DEBUG    lxc_conf - mounted proc on /var/lib/lxc/lxc-file//rootfs/proc, type proc<br>
      lxc-start 1290693817.212 DEBUG    lxc_conf - mounted devpts on /var/lib/lxc/lxc-file//rootfs/dev/pts, type devpts<br>
      lxc-start 1290693817.212 DEBUG    lxc_conf - mounted sysfs on /var/lib/lxc/lxc-file//rootfs/sys, type sysfs<br>
      lxc-start 1290693817.212 DEBUG    lxc_conf - remounting /mnt/1TB-Movies on /var/lib/lxc/lxc-file//rootfs/mnt2/1TB-Movies to respect bind or remount options<br>
      lxc-start 1290693817.212 DEBUG    lxc_conf - mounted /mnt/1TB-Movies on /var/lib/lxc/lxc-file//rootfs/mnt2/1TB-Movies, type none<br>
      lxc-start 1290693817.212 INFO     lxc_conf - mount points have been setup<br>
      lxc-start 1290693817.212 INFO     lxc_conf - console has been setup<br>
      lxc-start 1290693817.212 INFO     lxc_conf - 4 tty(s) has been setup<br>
      lxc-start 1290693817.212 DEBUG    lxc_conf - mounted '/var/lib/lxc/lxc-file//rootfs' on '/usr/lib/lxc'<br>
      lxc-start 1290693817.212 DEBUG    lxc_conf - created '/usr/lib/lxc/mnt' directory<br>
      lxc-start 1290693817.212 DEBUG    lxc_conf - mountpoint for old rootfs is '/usr/lib/lxc/mnt'<br>
      lxc-start 1290693817.212 DEBUG    lxc_conf - pivot_root syscall to '/usr/lib/lxc' successful<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/dev/pts'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/dev/shm'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/sys'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/proc'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/lib/init/rw'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/boot'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/cgroup'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/mnt/1TB-Movies'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/mnt/1TB-Timemachine'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/mnt/500GB-TV'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/mnt/old-sdb3'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/var/lib/lxc/lxc-file/rootfs/proc'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/var/lib/lxc/lxc-file/rootfs/dev/pts'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/var/lib/lxc/lxc-file/rootfs/sys'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/var/lib/lxc/lxc-file/rootfs/mnt2/1TB-Movies'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/var/lib/lxc/lxc-file/rootfs/dev/console'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/var/lib/lxc/lxc-file/rootfs/dev/tty1'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/var/lib/lxc/lxc-file/rootfs/dev/tty2'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/var/lib/lxc/lxc-file/rootfs/dev/tty3'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/var/lib/lxc/lxc-file/rootfs/dev/tty4'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt2/1TB-Movies'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt/dev'<br>
      lxc-start 1290693817.213 DEBUG    lxc_conf - umounted '/mnt'<br>
      lxc-start 1290693817.213 INFO     lxc_conf - pivoted to '/usr/lib/lxc'<br>
<br>
This basically tells me that pivot_root is umounting the mount I just made.<br>
<br>
Can anyone help me with this??? I have also tried putting the mount inside the fstab for the container but same problem.<br>
<br>
<br>
-- <br>
Geordy Korte<br>
<br>
<br></div></div>
------------------------------------------------------------------------------<br>
Increase Visibility of Your 3D Game App&  Earn a Chance To Win $500!<br>
Tap into the largest installed PC base&  get more eyes on your game by<br>
optimizing for Intel(R) Graphics Technology. Get started today with the<br>
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.<br>
<a href="http://p.sf.net/sfu/intelisp-dev2dev" target="_blank">http://p.sf.net/sfu/intelisp-dev2dev</a><br>
<br>
<br>
_______________________________________________<br>
Lxc-users mailing list<br>
<a href="mailto:Lxc-users@lists.sourceforge.net" target="_blank">Lxc-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
   <br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>==============<br>Geordy Korte<br>MSN <a href="mailto:geordy@geordy.nl">geordy@geordy.nl</a><br>