why snapshot works on lvm (not thin)?

hanzfritz85

Member
Dec 15, 2018
30
0
6
31
Dear All,
Looks like I can do a snapshot on LVM (not thin)

below are the details

Am I missing something?
 
Last edited:

hanzfritz85

Member
Dec 15, 2018
30
0
6
31
PVE 5.4-6 + LVM = no snapshot
PVE 5.4-11 + LVM = snapshot + thin provision
 
Last edited:

hanzfritz85

Member
Dec 15, 2018
30
0
6
31
LVM version: 2.02.168(2) (2016-11-30)
Library version: 1.02.137 (2016-11-30)
Driver version: 4.35.0

LVM version: 2.02.168(2) (2016-11-30)
Library version: 1.02.137 (2016-11-30)
Driver version: 4.39.0
 

hanzfritz85

Member
Dec 15, 2018
30
0
6
31
If you can use snapshot, you either use lvm thin, or file based images with qcow2, on a filesystem, on an lvm volume. But you can't use snapshot with non thin lvm directly
Yes, exactly, i use raw and qcow2 vm disks on ext4 over lvm. Can you please point me to the right direction where I can get more info about that? You state it is as it's an expected behavior, but it is a surprise for me.
 

danielb

Member
Jun 1, 2018
118
22
18
33
Bordeaux (france)
www.firewall-services.com
If you use file based images, it doesn't really matters what's under the filesystem (could be a standard lvm, thin lvm, raw partition, nfs etc...). You just rely on the qcow2 format to provide snapshots features. But proxmox can also use raw lvm volume as images (in which case there's no filesystem, so no file either). In this case, standard lvm can't use snapshots (but has the advantage of being shareable, for example on a shared iscsi lun). And thin lvm can use snapshots (lvm level snapshots)
 
  • Like
Reactions: hanzfritz85

hanzfritz85

Member
Dec 15, 2018
30
0
6
31
If you use file based images, it doesn't really matters what's under the filesystem (could be a standard lvm, thin lvm, raw partition, nfs etc...). You just rely on the qcow2 format to provide snapshots features. But proxmox can also use raw lvm volume as images (in which case there's no filesystem, so no file either). In this case, standard lvm can't use snapshots (but has the advantage of being shareable, for example on a shared iscsi lun). And thin lvm can use snapshots (lvm level snapshots)
It's absolutely clear now.
And according to https://pve.proxmox.com/wiki/Storage
All storage types which have the “Snapshots” feature also support thin provisioning.​

Thank you for clarification!
 

LnxBil

Famous Member
Feb 21, 2015
4,329
433
103
Germany
In this case, standard lvm can't use snapshots (but has the advantage of being shareable, for example on a shared iscsi lun). And thin lvm can use snapshots (lvm level snapshots)
You can also create snapshots on thick LVM, but it is as with thin LVM not cluster aware and will therefore not work in a clustered setup. LVM thick snapshots are different than "normal" VM snapshots and do have a size. If the snapshot is full, it is not working anymore. Totally incompatible with the modern age of immutable VM snapshots.
 
  • Like
Reactions: hanzfritz85

hanzfritz85

Member
Dec 15, 2018
30
0
6
31
You can also create snapshots on thick LVM, but it is as with thin LVM not cluster aware and will therefore not work in a clustered setup. LVM thick snapshots are different than "normal" VM snapshots and do have a size. If the snapshot is full, it is not working anymore. Totally incompatible with the modern age of immutable VM snapshots.
Hm. You mean snapshot on thick LVM is not a point in time logical snapshot, but more a full backup of vm disk + ram?
 

LnxBil

Famous Member
Feb 21, 2015
4,329
433
103
Germany
Hm. You mean snapshot on thick LVM is not a point in time logical snapshot, but more a full backup of vm disk + ram?
No, unfortunately neither. A snapshot is the place where all changed blocks will be written to and if the space is exhausted, your snapshot is useless. Therefore you have to create the new snapshot with the same size as the old disk in order to never run out of space.

More information can be found here: https://www.tecmint.com/take-snapshot-of-logical-volume-and-restore-in-lvm/
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!