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

meepmeep

Renowned Member
Apr 14, 2013
51
8
73
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)
 
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) ?
 
We plan to support LVM thin pools in future - that way it should be possible to create snapshots.

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?
 
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?

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
 
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

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?
 
Last edited:
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...

Because normal LVM snapshots are incredibly slow an inefficient.
2. How do I create a storage in the Proxmox interface from a thin pool?

This is still experimental and not fully implemented (technology preview).
 
Because normal LVM snapshots are incredibly slow an inefficient.

This is still experimental and not fully implemented (technology preview).

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?
 
Last edited:
Steps looks good to me.

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


- Is it safe to use
or will I likely lose all my data?

It is technology preview (not production ready). Although I doubt you will loose data. If you find bugs, we will fix them asap.
 
Because normal LVM snapshots are incredibly slow an inefficient.

This is still experimental and not fully implemented (technology preview).

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.
 
Dietmar, I have to say this decision to silently remove a tried and tested container backup solution

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, ...)
 
Last edited:
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) ?
 
Functionally, this is a big regression for people using container..

There is no regression if you use a suitable storage for you containers.

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) ?

The whole container.
 
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.
 
  • Like
Reactions: gkovacs
There is no regression if you use a suitable storage for you containers.

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.

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.

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.
 
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.

Seems I missed something here, LVM snapshots for containers are back now, so what is the problem?
 
Seems I missed something here, LVM snapshots for containers are back now, so what is the problem?
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...
 
Last edited:
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...

The thread topic is about LVM snapshot backup for containers. And yes, this is now available as technology preview.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!