mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-12 12:10:05 +00:00
Display volume size in log when doing a volume backup
Output before this patch INFO: include disk 'scsi0' 'file=pve4tank:vm-402-disk-1' Output after this patch: INFO: include disk 'scsi0' 'file=pve4tank:vm-402-disk-1' 64G we're mainly intersted by the volume size here, it was requested in #351
This commit is contained in:
parent
3a65f4c9de
commit
0db93c2d8a
@ -12,6 +12,7 @@ use PVE::Tools;
|
||||
use PVE::Storage::Plugin;
|
||||
use PVE::Storage;
|
||||
use PVE::QemuServer;
|
||||
use PVE::JSONSchema;
|
||||
use IO::File;
|
||||
use IPC::Open3;
|
||||
|
||||
@ -75,7 +76,12 @@ sub prepare {
|
||||
} elsif ($drive->{iothread}) {
|
||||
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 $log = "include disk '$ds' '$volid'";
|
||||
if (defined $drive->{size}) {
|
||||
my $readable_size = PVE::JSONSchema::format_size($drive->{size});
|
||||
$log .= " $readable_size";
|
||||
}
|
||||
$self->loginfo($log);
|
||||
}
|
||||
|
||||
my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user