[lxc-users] lxc-destroy failure while deleting rootfs for container

Serge Hallyn serge.hallyn at ubuntu.com
Fri Dec 12 03:29:49 UTC 2014


Quoting Shivraj Ghatkar (shivraj2084 at gmail.com):
> From the host's perspective, the "/capsules_mnt/cap_a" points to the mount
> point for the capsule cap_a. This is the location where the root file
> system of the specific container exists.

Yes, but you don't want to mount the things there.

When the container cap_a starts, it bind mounts /capsules_mnt/cap_a onto
/usr/lib/x86_64-linux-gnu/lxc/ .  Then mounts other things under there,
and pivot_roots into there before the container starts.  Now in your
container fstab file, when you say

/shared/cap_a shared none bind 0 0

Then the second field (target) is interpreted by lxc as being relative
to the container's mounted rootfs, i.e. /usr/lib/x86_64-linux-gnu/lxc/
That's where you want it.  You do not want it mounted under
/capsules_mnt/cap_a/.

> I need the "capsules_mnt" directory to differentiate, between different
> containers on the host. I have tried creating a "/shared_capsule_a"
> directory and mount it directly; but it doesnt solve the original problem
> of mount points being blown away.
> 
> Thanks,
> 
> -Shivraj
> 
> On Fri Nov 21 2014 at 6:06:47 AM Serge Hallyn <serge.hallyn at ubuntu.com>
> wrote:
> 
> >  Does it change anything if you change these to:
> >
> > none dev/pts devpts defaults 0 0
> > none proc    proc defaults 0 0
> > none sys     sysfs defaults 0 0
> > /shared/cap_a/ shared none bind 0 0
> >
> > ?
> >


More information about the lxc-users mailing list