Two identical KVM VM cloned but the backups of both are veri diferents.

ramses

Active Member
Dec 2, 2013
33
7
28
Hi everyone,

I have create a KVM VM and clone it to create another identical VM to mount a cluster.

Both have a 15Gb disk and 1Gb used.

Well, when I do a Backup of both, the backup file of the first VM that I have create have 3.5Gb approximately and 500Mb the other backup file.

Can anybody tell me what is the problem?


Regards,

Ramsés
 
can you post the config of both vms, as well as the backup logs of both vms, as well as the resulting file sizes (du -h ?)
 
can you post the config of both vms, as well as the backup logs of both vms, as well as the resulting file sizes (du -h ?)

Dominik, thanks so much by your answer.

The original VM is th VM750 and the VM751 is the cloned.


- The configs of the KVM VM:

Code:
# qm config 750
balloon: 0
bootdisk: scsi0
cores: 2
cpu: host
ide2: none,media=cdrom
memory: 2048
name: pfSense-CASA-01
net0: virtio=E6:9F:61:80:C9:6A,bridge=vmbr0
numa: 0
onboot: 1
ostype: l26
scsi0: local-lvm:vm-750-disk-1,size=15G
scsihw: virtio-scsi-pci
smbios1: uuid=204a6db6-26d7-4dc7-8839-4478c192179e
sockets: 1
vmgenid: 832d7332-4977-47ae-9b02-0cf5826ba5f3
#

# qm config 751
balloon: 0
bootdisk: scsi0
cores: 2
cpu: host
ide2: none,media=cdrom
memory: 2048
name: pfSense-CASA-02
net0: virtio=72:B5:7F:02:2A:C1,bridge=vmbr0
numa: 0
onboot: 1
ostype: l26
scsi0: local-lvm:vm-751-disk-0,size=15G
scsihw: virtio-scsi-pci
smbios1: uuid=67d34a16-3631-41a3-a891-a1e477a36671
sockets: 1
tablet: 0
vmgenid: 89cb2791-9428-41f5-95be-6ced4e96e46a
#


- The backup logs:

Code:
# cat vzdump-qemu-750-2020_04_28-13_24_21.log
2020-04-28 13:24:21 INFO: Starting Backup of VM 750 (qemu)
2020-04-28 13:24:21 INFO: status = stopped
2020-04-28 13:24:22 INFO: update VM 750: -lock backup
2020-04-28 13:24:22 INFO: backup mode: stop
2020-04-28 13:24:22 INFO: ionice priority: 7
2020-04-28 13:24:22 INFO: VM Name: pfSense-CASA-01
2020-04-28 13:24:22 INFO: include disk 'scsi0' 'local-lvm:vm-750-disk-1' 15G
2020-04-28 13:24:22 INFO: creating archive '/var/lib/vz/dump/vzdump-qemu-750-2020_04_28-13_24_21.vma.gz'
2020-04-28 13:24:22 INFO: starting kvm to execute backup task
2020-04-28 13:24:23 INFO: started backup task 'c5b33709-2a0c-4f82-bf53-2ab126c2a419'
2020-04-28 13:24:26 INFO: status: 0% (31129600/16106127360), sparse 0% (28000256), duration 3, read/write 10/1 MB/s
2020-04-28 13:24:34 INFO: status: 4% (676331520/16106127360), sparse 4% (673071104), duration 11, read/write 80/0 MB/s
2020-04-28 13:24:37 INFO: status: 8% (1361051648/16106127360), sparse 8% (1354932224), duration 14, read/write 228/0 MB/s
2020-04-28 13:25:04 INFO: status: 9% (1455816704/16106127360), sparse 8% (1354932224), duration 41, read/write 3/3 MB/s
...
2020-04-28 14:28:17 INFO: status: 90% (14495711232/16106127360), sparse 15% (2418851840), duration 3834, read/write 3/3 MB/s
2020-04-28 14:29:07 INFO: status: 91% (14657781760/16106127360), sparse 15% (2419400704), duration 3884, read/write 3/3 MB/s
2020-04-28 14:29:54 INFO: status: 92% (14819131392/16106127360), sparse 15% (2419400704), duration 3931, read/write 3/3 MB/s
2020-04-28 14:30:19 INFO: status: 93% (15037628416/16106127360), sparse 15% (2553585664), duration 3956, read/write 8/3 MB/s
2020-04-28 14:30:51 INFO: status: 94% (15142551552/16106127360), sparse 15% (2554445824), duration 3988, read/write 3/3 MB/s
2020-04-28 14:31:42 INFO: status: 95% (15302983680/16106127360), sparse 15% (2557370368), duration 4039, read/write 3/3 MB/s
2020-04-28 14:32:37 INFO: status: 96% (15463677952/16106127360), sparse 15% (2557370368), duration 4094, read/write 2/2 MB/s
2020-04-28 14:33:13 INFO: status: 98% (15837691904/16106127360), sparse 17% (2820562944), duration 4130, read/write 10/3 MB/s
2020-04-28 14:33:15 INFO: status: 100% (16106127360/16106127360), sparse 19% (3088699392), duration 4132, read/write 134/0 MB/s
2020-04-28 14:33:15 INFO: transferred 16106 MB in 4132 seconds (3 MB/s)
2020-04-28 14:33:15 INFO: stopping kvm after backup task
2020-04-28 14:33:16 INFO: archive file size: 3.43GB
2020-04-28 14:33:17 INFO: Finished Backup of VM 750 (01:08:56)
#

# cat vzdump-qemu-751-2020_04_28-11_44_03.log
2020-04-28 11:44:03 INFO: Starting Backup of VM 751 (qemu)
2020-04-28 11:44:03 INFO: status = stopped
2020-04-28 11:44:04 INFO: update VM 751: -lock backup
2020-04-28 11:44:04 INFO: backup mode: stop
2020-04-28 11:44:04 INFO: ionice priority: 7
2020-04-28 11:44:04 INFO: VM Name: pfSense-CASA-02
2020-04-28 11:44:04 INFO: include disk 'scsi0' 'local-lvm:vm-751-disk-0' 15G
2020-04-28 11:44:05 INFO: creating archive '/var/lib/vz/dump/vzdump-qemu-751-2020_04_28-11_44_03.vma.gz'
2020-04-28 11:44:05 INFO: starting kvm to execute backup task
2020-04-28 11:44:06 INFO: started backup task 'e982faea-7866-49b2-bfd5-159099eb8689'
2020-04-28 11:44:09 INFO: status: 0% (23592960/16106127360), sparse 0% (17932288), duration 3, read/write 7/1 MB/s
2020-04-28 11:44:57 INFO: status: 1% (161742848/16106127360), sparse 0% (34549760), duration 51, read/write 2/2 MB/s
2020-04-28 11:45:30 INFO: status: 4% (659292160/16106127360), sparse 2% (427888640), duration 84, read/write 15/3 MB/s
2020-04-28 11:46:04 INFO: status: 5% (808386560/16106127360), sparse 2% (470728704), duration 118, read/write 4/3 MB/s
2020-04-28 11:46:30 INFO: status: 8% (1333329920/16106127360), sparse 5% (918659072), duration 144, read/write 20/2 MB/s
2020-04-28 11:46:33 INFO: status: 13% (2121924608/16106127360), sparse 10% (1705857024), duration 147, read/write 262/0 MB/s
...
2020-04-28 11:50:14 INFO: status: 90% (14542962688/16106127360), sparse 83% (13508935680), duration 368, read/write 16/16 MB/s
2020-04-28 11:50:37 INFO: status: 91% (14656995328/16106127360), sparse 83% (13511421952), duration 391, read/write 4/4 MB/s
2020-04-28 11:51:05 INFO: status: 94% (15158935552/16106127360), sparse 86% (13920276480), duration 419, read/write 17/3 MB/s
2020-04-28 11:51:07 INFO: status: 100% (16106127360/16106127360), sparse 92% (14867464192), duration 421, read/write 473/0 MB/s
2020-04-28 11:51:07 INFO: transferred 16106 MB in 421 seconds (38 MB/s)
2020-04-28 11:51:07 INFO: stopping kvm after backup task
2020-04-28 11:51:08 INFO: archive file size: 561MB
2020-04-28 11:51:09 INFO: Finished Backup of VM 751 (00:07:06)
#


- The backup files size:

Code:
# du -h vzdump-qemu-750-2020_04_28-13_24_21.vma.gz
3.5G    vzdump-qemu-750-2020_04_28-13_24_21.vma.gz

# du -h vzdump-qemu-751-2020_04_28-11_44_03.vma.gz
562M    vzdump-qemu-751-2020_04_28-11_44_03.vma.gz


Regards,

Ramsés
 
Last edited:
2020-04-28 14:33:15 INFO: status: 100% (16106127360/16106127360), sparse 19% (3088699392), duration 4132, read/write 134/0 MB/s 2020-04-28 14:33:15 INFO: transferred 16106 MB in 4132 seconds (3 MB/s) 2020-04-28 14:33:15 INFO: stopping kvm after backup task 2020-04-28 14:33:16 INFO: archive file size: 3.43GB


2020-04-28 11:51:07 INFO: status: 100% (16106127360/16106127360), sparse 92% (14867464192), duration 421, read/write 473/0 MB/s 2020-04-28 11:51:07 INFO: transferred 16106 MB in 421 seconds (38 MB/s) 2020-04-28 11:51:07 INFO: stopping kvm after backup task 2020-04-28 11:51:08 INFO: archive file size: 561MB


log shows: the vm 750 has only 19% sparse data (which can be skipped) and the vm 751 has 92% sparse data
note that if you delete files in a vm, the layer below (lvmthin) does not know that that data is not in use anymore

to do that you have to enable 'discard' for the disk and do a 'fstrim' inside the guest
 
log shows: the vm 750 has only 19% sparse data (which can be skipped) and the vm 751 has 92% sparse data
note that if you delete files in a vm, the layer below (lvmthin) does not know that that data is not in use anymore

to do that you have to enable 'discard' for the disk and do a 'fstrim' inside the guest


Hi again.

I had done the following:

- I have shudown the KVM VM.
- On the Disk of the VM I have actived the Discard option.
- I have started the KVM VM.

You tell me that I need enter in the VM and execute the "fstrim" command but the S.O. installed in the VM is FreeBSD and this command not exist.

Do you know if the "fsck_ufs -Ey /dev/da0p3" command does the same effect that "fstrim"?


Regards,

Ramsés
 

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!