[Lxc-users] lxc.mount and mount.entry not working
Geordy Korte
gkorte at gmail.com
Thu Nov 25 13:17:32 UTC 2010
Hi,
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).
Some background:
Host running LXC: Debian squeeze
Version of LXC: 0.7.2-1
I have create an LXC container using the /usr/lib/lxc/templates/lxc-debian
template and this went fine.
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:
lxc.mount.entry=/mnt/1TB-Movies
/var/lib/lxc/lxc-file//rootfs/mnt2/1TB-Movies none rw,bind 0 0
When I now start the LXC container and I set the debugging to DEBUG I notice
the following:
lxc-start 1290693817.212 INFO lxc_conf - cgroup has been setup
lxc-start 1290693817.212 DEBUG lxc_conf - mounted proc on
/var/lib/lxc/lxc-file//rootfs/proc, type proc
lxc-start 1290693817.212 DEBUG lxc_conf - mounted devpts on
/var/lib/lxc/lxc-file//rootfs/dev/pts, type devpts
lxc-start 1290693817.212 DEBUG lxc_conf - mounted sysfs on
/var/lib/lxc/lxc-file//rootfs/sys, type sysfs
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
lxc-start 1290693817.212 DEBUG lxc_conf - mounted /mnt/1TB-Movies
on /var/lib/lxc/lxc-file//rootfs/mnt2/1TB-Movies, type none
lxc-start 1290693817.212 INFO lxc_conf - mount points have been
setup
lxc-start 1290693817.212 INFO lxc_conf - console has been setup
lxc-start 1290693817.212 INFO lxc_conf - 4 tty(s) has been setup
lxc-start 1290693817.212 DEBUG lxc_conf - mounted
'/var/lib/lxc/lxc-file//rootfs' on '/usr/lib/lxc'
lxc-start 1290693817.212 DEBUG lxc_conf - created
'/usr/lib/lxc/mnt' directory
lxc-start 1290693817.212 DEBUG lxc_conf - mountpoint for old rootfs
is '/usr/lib/lxc/mnt'
lxc-start 1290693817.212 DEBUG lxc_conf - pivot_root syscall to
'/usr/lib/lxc' successful
lxc-start 1290693817.213 DEBUG lxc_conf - umounted '/mnt/dev/pts'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted '/mnt/dev/shm'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted '/mnt/sys'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted '/mnt/proc'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/lib/init/rw'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted '/mnt/boot'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted '/mnt/cgroup'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/mnt/1TB-Movies'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/mnt/1TB-Timemachine'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/mnt/500GB-TV'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/mnt/old-sdb3'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/var/lib/lxc/lxc-file/rootfs/proc'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/var/lib/lxc/lxc-file/rootfs/dev/pts'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/var/lib/lxc/lxc-file/rootfs/sys'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/var/lib/lxc/lxc-file/rootfs/mnt2/1TB-Movies'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/var/lib/lxc/lxc-file/rootfs/dev/console'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/var/lib/lxc/lxc-file/rootfs/dev/tty1'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/var/lib/lxc/lxc-file/rootfs/dev/tty2'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/var/lib/lxc/lxc-file/rootfs/dev/tty3'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt/var/lib/lxc/lxc-file/rootfs/dev/tty4'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted
'/mnt2/1TB-Movies'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted '/mnt/dev'
lxc-start 1290693817.213 DEBUG lxc_conf - umounted '/mnt'
lxc-start 1290693817.213 INFO lxc_conf - pivoted to '/usr/lib/lxc'
This basically tells me that pivot_root is umounting the mount I just made.
Can anyone help me with this??? I have also tried putting the mount inside
the fstab for the container but same problem.
--
Geordy Korte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20101125/f5d946c9/attachment.html>
More information about the lxc-users
mailing list