lvm snapshot backup slow for some vm, fast for others...

m.ardito

Famous Member
Feb 17, 2010
1,473
18
103
Torino, Italy
Hi, i have my production server pve 1.5,

proxmox1:~# pveversion -v
pve-manager: 1.5-10 (pve-manager/1.5/4822)
running kernel: 2.6.18-2-pve
proxmox-ve-2.6.18: 1.5-5
pve-kernel-2.6.18-2-pve: 2.6.18-5
qemu-server: 1.1-16
pve-firmware: 1.0-5
libpve-storage-perl: 1.0-13
vncterm: 0.9-2
vzctl: 3.0.23-1pve11
vzdump: 1.2-5
vzprocps: 2.0.11-1dso2
vzquota: 3.0.11-1
pve-qemu-kvm-2.6.18: 0.9.1-5

now, i have several kvm and one openvz vm running regularly.
all kvm disks are on lvm (iscsi) volumes
vm_backup is the nfs backup storage share

i have just 1 backup task
vzdump --quiet --snapshot --compress --storage vm_backup --mailto me@myaddress.com --all

i noticed from the email received from vzdump that i have two different behaviours: some machines trigger a real snapshot, like:

Code:
106: Aug 04 05:15:16 INFO: status = running
106: Aug 04 05:15:16 INFO: backup mode: snapshot
106: Aug 04 05:15:16 INFO: bandwidth limit: 10240 KB/s
106: Aug 04 05:15:16 INFO: suspend vm to make snapshot
106: Aug 04 05:15:17 INFO:   Logical volume "vzsnap-proxmox1-0" created
106: Aug 04 05:15:17 INFO:   Logical volume "vzsnap-proxmox1-1" created
106: Aug 04 05:15:17 INFO: resume vm
106: Aug 04 05:15:17 INFO: vm is online again after 1 seconds
...
...
106: Aug 04 05:43:16 INFO: Finished Backup of VM 106 (00:28:01)
while others don't, apparently:

Code:
107: Aug 04 05:43:16 INFO: status = running
107: Aug 04 05:43:17 INFO: backup mode: snapshot
107: Aug 04 05:43:17 INFO: bandwidth limit: 10240 KB/s
107: Aug 04 05:43:17 INFO:   Logical volume "vzsnap-proxmox1-0" created
...
...
107: Aug 04 05:58:03 INFO: Finished Backup of VM 107 (00:14:47)
Well, i'm concerned about those that seem to be kept "offline" longer than the first kind , which seem to be kept "offline" just 1 second!

about guest OSes:

fast:
102 ubuntu server headless, ide disks
103 ubuntu server headless, ide disks
106 win2k3 ad server, virtio disks

slow:
104 ubuntu desktop, ide disks
107 ubuntu desktop, ide disks

What's wrong, at least in my understanding of the thing?

Marco
 
i noticed from the email received from vzdump that i have two different behaviours: some machines trigger a real snapshot, like:

Both use real LVM snapshots - whats the problem?

(in the first case, the VM uses 2 disk, so vzdump does a short (1s) suspend while tacking snapshots)
 
ok, i have no problem, but was worried about that different message, i just did not understand why...
i've now seen the source of VZdump.pm (exec_backup_task) and there's the limit you say: if > 1 then vm it's suspended, otherwise there's no need i suppose?
may I ask you why this is required only if there is more than 1 disk? I'm just curious/willing to understand.

Thanks for your patience, Marco
 
may I ask you why this is required only if there is more than 1 disk? I'm just curious/willing to understand.

if you have more than one disk, you need to create several snapshots like:

step1: create snapshot of disk1 (this can take serveral seconds)
step2: create snapshot of disk1

So it is possible that the VM write things to disk2 while we are in step1. So you end up with backup that contains disk snapshot-ed at different times. To avaoid that, we suspend the VM.
 
thanks, it seems obvious, now :-)

i was thinking that in that second case something (at least in the logging) was wrong, because the vm was not suspended!

so, although a single disk vm snapshot can take several seconds, the vm downtime is always zero seconds? i know this should be regular lvm behaviour, and pve just uses it, but just to understand.