From 04cbc41943a7fe21b671691d9eac67ba2ffdfae0 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Wed, 16 Jul 2025 08:31:46 +0200 Subject: [PATCH] lvmplugin: alloc_snap_image: die if file_size_info return empty size Signed-off-by: Alexandre Derumier --- src/PVE/Storage/LVMPlugin.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PVE/Storage/LVMPlugin.pm b/src/PVE/Storage/LVMPlugin.pm index 54070d1..cb5fd37 100644 --- a/src/PVE/Storage/LVMPlugin.pm +++ b/src/PVE/Storage/LVMPlugin.pm @@ -668,6 +668,8 @@ my sub alloc_snap_image { #we need to use same size than the backing image qcow2 virtual-size my $size = PVE::Storage::Plugin::file_size_info($path, 5, $format); + die "file_size_info on '$volname' failed\n" if !defined($size); + $size = $size / 1024; #we use kb in lvcreate alloc_lvm_image($class, $storeid, $scfg, $vmid, $format, $volname, $size, $backing_snap);