[Lxc-users] lxc-destroy fails on 1.0.0.alpha2
Serge Hallyn
serge.hallyn at ubuntu.com
Thu Oct 24 20:14:37 UTC 2013
Quoting Ranjib Dey (dey.ranjib at gmail.com):
> I am using lxc 1.0.0,alpha2 on fedora 19 (xb6_64) and trying to create
> ubuntu containers. On the very first pass container creation works fine,
> but destroy does not work.
> Im not sure whats the reason. I cant delete the /var/lib/lxc/<container>
> manually, but if I unmount the rootfs , then deletion works.
>
> So, may be for some reason lxc-destroy is not able to unmount the rootfs. I
> also found following entry on my `mount` output:
>
> /dev/mapper/fedora-root on /usr/lib64/lxc/rootfs type ext4
> (rw,relatime,data=ordered)
>
> I just migrated from 0.9.2 to 1.0.0.alpha2, things were working fine
> before,
> any pointer on how i can debug this will be very helpful
Two possibilities. First check whether the mount exists in
/proc/self/mounts. If not, then (a) this isn't why you can't
destroy the container, and (b) the mount was inappropriately
recorded in /etc/mtab, meaning the template should use mount -n.
Second, if your rootfs is MS_SHARED, that could cause the rootfs
mount done from the container init to be propagated to the host.
But lxc should detect at least if '/' is shared and work around
that. If however you have /var/lib/lxc MS_SHARED and not /,
then lxc probably will not work around it.
-serge
More information about the lxc-users
mailing list