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 clear="all">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>