Storage location of snapshot

Dec 28, 2019
32
2
8
30
Hi, I would like to know, where is the actual location of snapshots those are generated by a customer for their VM. Is it will be under their own VM (which means, use their own allocated storage) or under the local storage of node itself? Thanks in advance.
 
> How is this allocated?

For eg: if a user is assigned with 100G storage and they already have 50G of data inside their VM. At this point, they are creating a snapshot of their VM from Proxmox which will have a size of 30G. Will the total disk usage of their VM increase to 80G?
 
> How is this allocated?

For eg: if a user is assigned with 100G storage and they already have 50G of data inside their VM. At this point, they are creating a snapshot of their VM from Proxmox which will have a size of 30G. Will the total disk usage of their VM increase to 80G?

As already said, depends on the storage. How is a user assigned 100G of storage? Is this the virtual disk size? If so, then no, you cannot limit the space per se. If you would use ZFS for example, you can create a parent dataset for each VM or customer that has a limit and then all his actions can be accounted for. Yet keep in mind, PVE is no hosting/billing/accounting software, so this kind of stuff cannot be done easily if at all.
 
At the time of the Snapshot creation the Snapshot has a size of 0.

Then the Snapshot begins growing - the active filesystem and die data in the Snapshot will differ more and more with the time. This is depending on your workload.
 
  • Like
Reactions: rlljorge
So I just went through this trying to resolve an issue & I found an answer for you (or more likely anyone looking in the future). A real one.

The images live in /var/lib/vz/images/<IMAGE NUMBER>/ so, for example /var/lib/vz/images/100/

Now they aren't separated by snapshot unfortunately, they are grouped by disks. You will have at least a vm-100-disk-0.qcow2 & a vm-100-disk-1.qcow2. The Disk-0 should be small & is the EFI (read Boot partition). If you have mounted ISOs they will also get backed up for some stupid reason & you can't prevent it. My EFI disk says it's 528KB & the backup is currently 12MB, & generally gets about 1MB bigger each snapshot.

One thing to note is that the snapshot is NOT a full backup of everything that was there at the time, rather it is a backup of the differences. So if your VM has a bunch of stuff & you delete a bunch then do another snapshot it'll end up slightly bigger than if you do another snapshot after adding a single text file.

Knowing this information doesn't really help you clean up backups, but it lets you see how much each is taking. For example I discovered my Mounted Windows Installer ISO for a windows VM (that is a 5GB ISO) was taking up 45GB of disk space for the backup. I removed the disk from the system, as I don't need it mounted all the time, as well as the VirtIO driver disk, whose size I don't remember but the ISO is only 600MB, & if I need them I can easily remount them. this is mostly letting you know that it is best to remove unused disks from your system.
 
Thank you for taking the time to sum of your experience, yet ...

The Disk-0 should be small & is the EFI (read Boot partition).
No, it's not. This are the EFI variables. The EFI boot partition is on your OS disk.

If you have mounted ISOs they will also get backed up for some stupid reason & you can't prevent it.
Wrong ... and why backup? We talk about snapshots.

One thing to note is that the snapshot is NOT a full backup of everything that was there at the time, rather it is a backup of the differences.
Wrong ... you should clearly read up on the difference between a snapshot and a backup.

I removed the disk from the system, as I don't need it mounted all the time, as well as the VirtIO driver disk, whose size I don't remember but the ISO is only 600MB, & if I need them I can easily remount them. this is mostly letting you know that it is best to remove unused disks from your system.
Mounted ISOs do not take up space on your virtual disk.



In your setup here, you use QCOW2 disk images, which have their own snapshot mechanism, that is used. This can be inspected the disks with qemu-img info <filename>.
 

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!