[Lxc-users] lxc-clone -s -B lvm, deletes original lv if no space left!

Serge Hallyn serge.hallyn at ubuntu.com
Fri Jun 21 13:42:02 UTC 2013


Quoting zoolook (nbensa+lxcusers at gmail.com):
> Hi Serge,
> 
> 
> On Tue, Jun 18, 2013 at 5:57 PM, zoolook <nbensa+lxcusers at gmail.com> wrote:
> > On Tue, Jun 18, 2013 at 5:39 PM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> >> Exactly what code (git commit id or distro+pkg) are you using?
> >
> >
> > Installed: 0.9.0.0~staging~20130612-1544-0ubuntu1~ppa1~raring1
> 
> 
> on saucy, with ppa:ubuntu-lxc/daily
> (0.9.0.0~staging~20130612-1544-0ubuntu1~ppa1~saucy1), no patches
> applied.
> 
> sysadmin at lxc3:~$ sudo lvs
>   LV             VG           Attr      LSize Pool Origin Data%  Move
> Log Copy%  Convert
>   lxc-test1-root vg_vmstorage -wi-a---- 7,81g
> 
> sysadmin at lxc3:~$ sudo lxc-clone -s -p /srv/lxc -P /srv/lxc -o test1 -n test101
>   Volume group "vg_vmstorage" has insufficient free space (617
> extents): 2097 required.
> lxc: could not create /dev/vg_vmstorage/lxc-test101-root snapshot of

all right, not sure why yet, but the naming of your rootfs is somehow
causing the problem.  I was able to reproduce this when I renamed my
test101 rootfs to xxx-test101-xxx.

I'll look into why later today.  Thanks!

Note, this points out that I need a sanity check in lxc-clone.  If the
rootfs doesn't have the container name in it, we should refuse cloning
or simply change it to $newcontainername, bc we don't know how to go
about it.  Now your case should be allowed because it has the container
name in it, so we can rename it.

-serge




More information about the lxc-users mailing list