Backing up vm's with RAW disks, size?

tomstephens89

Renowned Member
Mar 10, 2014
202
8
83
Kingsclere, United Kingdom
HI guys,

I look after a 16 node VE 3.4 cluster who's primary storage is presented in the form of iSCSI backed LVM with MPIO devices configured. Obviously Proxmox only allows for RAW image format on this type of storage.

So I have a VM that has a large disk, about 900GB, only 200 of which is used. However when using the built in backup service, the finished LZO compressed backup file is still over 700GB!

Is this just a by-product of RAW disk images or am I doing something wrong? I like using the proxmox built in backup because its quick and easy for full image style backups, but this backup after compression should be much much smaller.

Can anyone help me out?

I have attached a couple of screenshots showing actual VM disk usage vs the size of the backup.
 

Attachments

  • Screenshot from 2015-12-12 12-13-42.png
    Screenshot from 2015-12-12 12-13-42.png
    34.1 KB · Views: 25
  • Screenshot from 2015-12-12 12-16-57.png
    Screenshot from 2015-12-12 12-16-57.png
    7.7 KB · Views: 20
Last edited:
You probably have to zero out the empty space within the VM before it will compress well.

http://forum.proxmox.com/threads/8976-Too-large-size-of-a-backup-copy-Why

Forgive my ignorance but what exactly is this doing? From my knowledge, reading it looks like its using /dev/zero to write 0's continuously to a file until disk space is used up, then we delete said file. Is this all it takes to zero out the space?

Learn something new every day! :cool:

dd if=/dev/zero of=zero.small.file bs=1024 count=102400
dd if=/dev/zero of=zero.file bs=1024
rm zero.small.file
sync ; sleep 60 ; sync
rm zero.file


in a windows vm you can use sdelete:

sdelete.exe -z c::
 
Forgive my ignorance but what exactly is this doing? From my knowledge, reading it looks like its using /dev/zero to write 0's continuously to a file until disk space is used up, then we delete said file. Is this all it takes to zero out the space?

Exactly that, it ensures the empty space on the file system is filed with contiguous zeros, which makes for efficient compression.

I did this today with a VM hosted on a ZFS file system with compression enabled - you could see the vm file disk usage shrink as it progressed.
 
Exactly that, it ensures the empty space on the file system is filed with contiguous zeros, which makes for efficient compression.

I did this today with a VM hosted on a ZFS file system with compression enabled - you could see the vm file disk usage shrink as it progressed.

Ok well I just done that on my 'problem' VM and its filled about 700GB with zero's which I have now deleted. Backup is running now, we'll see if it helps. Hopefully my backups of this VM won't be 800GB anymore!
 
Mil gracias me salvaste por que no sabia como eliminar todo ese espacio vacio.
 

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!