[lxc-users] LXD move, how to reduce downtime without live migration

Spike spike at drba.org
Thu Apr 27 14:09:27 UTC 2017


Tamas,

are you actually doing this? any gotchas?

I'm trying to set up exactly the same, have a live node and a backup node,
both running zfs. I have the same containers, with the same mac, at
destination, however I'm unclear that just by copying over the rootfs
dataset from zfs it will be enough to make it work.

Has anybody done this before? I think somebody (maybe Fajar) in the past
also mentioned keeping /var/lib/lxd on zfs and replicating that too which
makes a lot of sense.

It'd be good if we could collect a sort of best practice document from
people with actual experience that do this regularly and list out all the
steps and requirements.

thanks,

Spike

On Wed, Apr 26, 2017 at 11:08 PM Tamas Papp <tamas.papp at rtfm.co.hu> wrote:

>
>
> On 04/27/2017 03:43 AM, Benoit GEORGELIN - Association Web4all wrote:
> > Good evening
> > I'm running into a problem with LXD live migration, so I can't use live
> migration
> > I have this kind of error:
> > error: Error transferring container data: migration restore failed
> > (00.018254) Warn  (criu/apparmor.c:421): apparmor namespace
> /sys/kernel/security/apparmor/policy/namespaces/lxd-router-gw_<var-lib-lxd>
> already exists, restoring into it
> > (00.025064) Warn  (criu/cr-restore.c:853): Set CLONE_PARENT |
> CLONE_NEWPID but it might cause restore problem,because not all kernels
> support such clone flags combinations!
> > (00.246825)      1: Warn  (criu/autofs.c:77): Failed to find pipe_ino
> option (old kernel?)
> > (00.249058) Error (criu/cr-restore.c:1024): 15755 killed by signal 11:
> Segmentation fault
> > (00.268144) Error (criu/cr-restore.c:1024): 15755 killed by signal 9:
> Killed
> > (00.288290) Error (criu/mount.c:3275): mnt: Can't remount root with
> MS_PRIVATE: No such file or directory
> > (00.288297) Error (criu/mount.c:3285): mnt: Can't unmount
> .criu.mntns.K2nNqG: No such file or directory
> > (00.288301) Error (criu/mount.c:3290): mnt: Can't remove the directory
> .criu.mntns.K2nNqG: No such file or directory
> > (00.288627) Error (criu/cr-restore.c:1890): Restoring FAILED.
> >
> >
> > I thought it was because of the kernel, but it looks supported :
> 4.4.0-47-generic
> >
> > So, I would like to move my containers. Moving without live migration
> have a big impact as the container have to be stopped. And the bigger, the
> longer ^^
> >
> > I'm using ZFS as backend storage.
> > LXD/LXC version 2.8 on source
> > LXD/LXC version 2.12 on destination
> >
> > Do you have any idea how i can move it and reduce the downtime ?
> > Like doing an rsync while the container is running, stop the container,
> rsync while it is stopped so I save time.
> >
> > My idea was eventually to create the container on destination node. Same
> name , same configuration
> > rsync the content of the storage from source to destination twice (one
> while running, one while stopped)
> > then start the container on the destination node
>
> If you use zfs backend, why don't you use 'zfs send/recv'?
>
> tamas
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170427/7f7b4b04/attachment.html>


More information about the lxc-users mailing list