[pve-devel] [PATCH qemu-server] Close #351: add more info to backup log

Emmanuel Kasper e.kasper at proxmox.com
Thu Oct 20 11:20:13 CEST 2016


Before patch:
INFO: exclude disk 'scsi1' (backup=no)
INFO: skip unused drive 'local:401/vm-401-disk-3.raw' (not included into backup)
INFO: skip unused drive 'local:401/vm-401-disk-1.raw' (not included into backup)

After patch applied:
INFO: include disk 'scsi0' local:401/vm-401-disk-4.qcow2
INFO: exclude disk 'scsi1' local:401/vm-401-disk-2.raw (backup=no)
INFO: include disk 'scsi2' pve4tank:vm-401-disk-1
INFO: skip unused drive 'local:401/vm-401-disk-3.raw' (not included into backup)
INFO: skip unused drive 'local:401/vm-401-disk-1.raw' (not included into backup)
---
NB: The initial bug report mentionned adding the disk format and the disk size.
Disk format can be deducted from the name of the backind device.
I found adding the disk size is confusing since in the case of 
thin provisioned volumes or qcow2 files, the size we would report would be 
unrelated to the  size of blocks we copy.

 PVE/VZDump/QemuServer.pm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm
index 5916eed..5322b37 100644
--- a/PVE/VZDump/QemuServer.pm
+++ b/PVE/VZDump/QemuServer.pm
@@ -67,15 +67,17 @@ sub prepare {
 
 	return if PVE::QemuServer::drive_is_cdrom($drive);
 
+	my $volid = $drive->{file};
+
 	if (defined($drive->{backup}) && !$drive->{backup}) {
-	    $self->loginfo("exclude disk '$ds' (backup=no)");
+	    $self->loginfo("exclude disk '$ds' '$volid' (backup=no)");
 	    return;
 	} elsif ($drive->{iothread}) {
-	    die "disk '$ds' (iothread=on) can't use backup feature currently. Please set backup=no for this drive";
+	    die "disk '$ds' '$volid' (iothread=on) can't use backup feature currently. Please set backup=no for this drive";
+	} else {
+	    $self->loginfo("include disk '$ds' '$volid'");
 	}
 
-	my $volid = $drive->{file};
-
 	my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
 	push @$vollist, $volid if $storeid;
 	$drivehash->{$ds} = $drive;
-- 
2.1.4





More information about the pve-devel mailing list