LXC Snapshot no available yet ? Will it work on LVM ?

Discussion in 'Proxmox VE: Installation and configuration' started by meepmeep, Sep 18, 2015.

  1. meepmeep

    meepmeep Member

    Joined:
    Apr 14, 2013
    Messages:
    30
    Likes Received:
    1
    On proxmox 3.x I use the /dev/pve/root to make snapshot backup of openvz container (because you can't make a backup on the same lvm volume).

    Today I try the same thing with proxmox 4b2 and a LXC CT, but it didn't work :

    Code:
    INFO: mode failure - some volumes does not support snapshots
    INFO: trying 'suspend' mode instead
    INFO: backup mode: suspend
    Proxmox's wiki says "Coming soon: snapshot, rollback, clone, linked clone (all these features need storage support)" for Linux Container.

    But will it work with a LVM filesystem ? Will it work on the same LVM volume where the CT are located ? (I'm installing multiple proxmos server, and it would be great to know now what filesytem I should use)
     
  2. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    13,551
    Likes Received:
    405
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,459
    Likes Received:
    310
    We plan to support LVM thin pools in future - that way it should be possible to create snapshots.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. meepmeep

    meepmeep Member

    Joined:
    Apr 14, 2013
    Messages:
    30
    Likes Received:
    1
    Thank you for your answer.

    But in order to plan my partition layout, do you know if lxc snapshot would be possible on the same lvm volume (/dev/pave/data) ?
     
  5. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,459
    Likes Received:
    310
    I guess yes (but it is not implemented, so it is just a guess).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. gkovacs

    gkovacs Active Member

    Joined:
    Dec 22, 2008
    Messages:
    501
    Likes Received:
    43
    I still can't do a snapshot backup of an LXC container stored in the local "Directory" type storage, even though it is ext4 on LVM (which supports snapshots). This is a huge regression compared to OpenVZ.

    If I create an LVM type storage on the same "pve" VG, will I be able to move my containers there and make snapshot backups?
     
  7. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,459
    Likes Received:
    310
    You need to create a LVM thin pool, for example:
    Code:
    # see: man lvmthin
    # lvcreate -n pvepool -L 20G pve
    # lvconvert --type thin-pool pve/pvepool
    
    The corresponding storage.cgf looks like this
    Code:
    lvmthin: thin1
         vgname pve
         thinpool pvepool
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. gkovacs

    gkovacs Active Member

    Joined:
    Dec 22, 2008
    Messages:
    501
    Likes Received:
    43
    There are a couple of problems with this:

    1. Why do I need a thin pool for snapshot backups?
    Snapshots are an LVM feature, and they were available for vzdump backups long before thin pools... why are they not used for backups?

    2. How do I create a storage in the Proxmox interface from a thin pool?
    As I understand thin pools are logical volumes, however I need to give a volume group to PVE when creating an LVM type storage... Or do I need to create the storage.cfg manually?
     
    #8 gkovacs, Dec 11, 2015
    Last edited: Dec 11, 2015
  9. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,459
    Likes Received:
    310
    Because normal LVM snapshots are incredibly slow an inefficient.
    This is still experimental and not fully implemented (technology preview).
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. gkovacs

    gkovacs Active Member

    Joined:
    Dec 22, 2008
    Messages:
    501
    Likes Received:
    43
    Ok so how do I use it in practice? Do these steps look correct?

    1. lvreduce pve/data so there is free space for the thin pool in the pve VG
    2. lvcreate -n pvepool -L size pve
    3. lvconvert --type thin-pool pve/pvepool
    4. add storage.cfg entry for thin pool
    Code:
    lvmthin: thin1      
     vgname pve     
     thinpool pvepool

    - Will it show up as storage?
    Will I be able to restore containers to it?

    - Is it safe to use
    or will I likely lose all my data?
     
    #10 gkovacs, Dec 11, 2015
    Last edited: Dec 11, 2015
  11. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,459
    Likes Received:
    310
    Steps looks good to me.

    yes

    It is technology preview (not production ready). Although I doubt you will loose data. If you find bugs, we will fix them asap.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. gkovacs

    gkovacs Active Member

    Joined:
    Dec 22, 2008
    Messages:
    501
    Likes Received:
    43
    Dietmar, I have to say this decision to silently remove a tried and tested container backup solution from Proxmox without providing a clear upgrade path to another, working method was absolutely unprofessional. A lot of people (and their users and clients) depend on Proxmox, and LVM snapshot backup was probably the most widely used and reliable feature that saved us a lot of headaches without downtime.

    And you removed it without clearly announcing this serious regression, with no good reason beyond "slow".

    Now I'm in the middle of a multi-server upgrade to Proxmox4, I can't use ZFS due to a mysterious kernel / ZFS bug (https://forum.proxmox.com/threads/24358-BUG-ZFS-data-corruption-on-Proxmox-4), and I just realized I have to deal with an untested, undocumented technology preview for container backups if I don't want my clients calling me during the night when their server goes down for suspend.

    Proxmox has always been a platform that tried to give multiple solutions to problems (OpenVZ and KVM, ext4 and ZFS, Ceph and Gluster, etc.), I'm very disappointed that you guys left me without good options here.
     
  13. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,459
    Likes Received:
    310
    Nothing was removed silently. The whole LXC code is completely new, and available for testing since months ...
    And just for the record, not many users requested that feature - most are happy to use new
    storage types with more features (zfs, thin lvm. rbd, ...)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #13 dietmar, Dec 12, 2015
    Last edited: Dec 12, 2015
  14. meepmeep

    meepmeep Member

    Joined:
    Apr 14, 2013
    Messages:
    30
    Likes Received:
    1
    Functionally, this is a big regression for people using container..

    About Thin-pool, what will be stored in it ? only snapshot of running lxc or directly the running lxc (meaning I have to restore them to this space) ?
     
  15. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    16,459
    Likes Received:
    310
    There is no regression if you use a suitable storage for you containers.

    The whole container.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. meepmeep

    meepmeep Member

    Joined:
    Apr 14, 2013
    Messages:
    30
    Likes Received:
    1
    In my case I need to switch from ext4/lvm to zfs (and disable my hard raid card at the same time !).

    So removing snapshot on a system where it worked is a regression. You can't say "just adapt to new file system"

    Moreover, splitting my disk space between lxc (now allocated in thin pool space) and kvm is also a big regression.
    I need to make larger and more complex capacity management to use it.
     
    gkovacs likes this.
  17. gkovacs

    gkovacs Active Member

    Joined:
    Dec 22, 2008
    Messages:
    501
    Likes Received:
    43
    Yes it is, because as I already wrote we simply can't use ZFS on our hardware, so that leaves me with no other options - apart from the barely integrated and untested technology preview.

    Exactly. Using a RAID card instead of ZFS can be a valid choice for many people, for many reasons. But if they do, they lose simple snapshot backup functionality.
     
  18. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    13,551
    Likes Received:
    405
    Seems I missed something here, LVM snapshots for containers are back now, so what is the problem?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. gkovacs

    gkovacs Active Member

    Joined:
    Dec 22, 2008
    Messages:
    501
    Likes Received:
    43
    Sorry I don't know what you mean, how are they back? If you mean lvm thin pools, then we will have to test that first, not to mention backup-restore our entire container storage...
     
    #19 gkovacs, Dec 13, 2015
    Last edited: Dec 13, 2015
  20. tom

    tom Proxmox Staff Member
    Staff Member

    Joined:
    Aug 29, 2006
    Messages:
    13,551
    Likes Received:
    405
    The thread topic is about LVM snapshot backup for containers. And yes, this is now available as technology preview.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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