Reducing migration time for LXC container

Discussion in 'Proxmox VE: Installation and configuration' started by jinjer, Mar 23, 2016.

  1. jinjer

    jinjer Member

    Joined:
    Oct 4, 2010
    Messages:
    194
    Likes Received:
    5
    With OpenVZ containers, we had two-step migration process, where on step 1 there was an initial rsync with a running container. Then the container was stopped, rsynched again and then started on the new node.

    This would shorted migration downtime by an order of magniture on big containers (millions of small files like web servers).

    Now this is gone. You have to stop, migrate and start.

    By leveraging dual rsync it would take much less on local storage.
    By leveraging zfs snapshots, it would take a few seconds.

    Is there any document describing how migration works "from inside", so I can try to implement it, or are you already working on it and can I help to speed up the implementation process ?
     
  2. mir

    mir Well-Known Member
    Proxmox Subscriber

    Joined:
    Apr 14, 2012
    Messages:
    3,481
    Likes Received:
    96
    When proxmox is released with next LXC-LTS which is LXC-2.0 you will be able to live migrate LXC containers via checkpoint restore (CRIU). This feature has been available since LXC-1.1. Lets hope they (LXC and CRIU devs) by the time of LXC-2.0 release they have solved the last big problem for HA which is that currently you cannot use CRIU if the container's root is mounted on shared storage.
     
  3. jinjer

    jinjer Member

    Joined:
    Oct 4, 2010
    Messages:
    194
    Likes Received:
    5
    I do not plan to use shared storage for LXC containers at all because of the speed limitations of shared storage in my usage scenario. Also live migration is nice but not necessary.
    What I am trying to obtain is the least possible downtime when migrating services from one node to the other. A copy of 2 hours is out of question when it can be done in less than one minute with appropriate methods. The tools needed were available and used from proxmox in the previous releases. It was done properly in 3.x, 2.x and 1.x (if memory serves me).

    Can I offer my help to "fix" this ?
     
  4. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,444
    Likes Received:
    304
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. jinjer

    jinjer Member

    Joined:
    Oct 4, 2010
    Messages:
    194
    Likes Received:
    5
    I had a dev env in the past and did ploop support for openvz which was not accepted. This is why I need to get a clear go from you to do dual-stage migration for LXC container on local storage.

    I am not sure if there is a way to keep the LXC container running on the first rsync, then stop, the sync again, then migrate config and then start on new node.

    Can you confirm that this type of operation is indeed desired ?
     
    #5 jinjer, Mar 24, 2016
    Last edited: Mar 24, 2016
  6. jinjer

    jinjer Member

    Joined:
    Oct 4, 2010
    Messages:
    194
    Likes Received:
    5
  7. nabuhonodozor

    nabuhonodozor Member

    Joined:
    Feb 14, 2010
    Messages:
    33
    Likes Received:
    0
    Bump.
    Its an important issue. I have containers almost a terabyte in size. In openvz, after initial sync backup was quick. Hows with new LCX single *.raw files??? Are managing such CT are PITA? How to practically manage those? Transfering 1T file between hosta are out of question.
     
  8. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,444
    Likes Received:
    304
    I would put them on shared/distributed storage.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. tschanness

    tschanness Member

    Joined:
    Oct 30, 2016
    Messages:
    291
    Likes Received:
    21
    Or if you are using ZFS: pve_zsync

    Jonas
     
  10. SupuS

    SupuS New Member

    Joined:
    Jan 13, 2019
    Messages:
    1
    Likes Received:
    0
    Hi,

    sorry for reanimating of this old thread but I have exactly same problem. With openvz the migration to new HW was easy and quick even with big containers. With lxc container migration is horrible task. I need migrate container from one OVH soyoustart server to another one so I cannot use NFS, or external storage etc. I cannot use zfs because of quotas. Is there some progress with this problem?

    Thank you in advance.
    Jan
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice