[pve-devel] [PATCH storage v7 2/2] parse_volname: print warning if storage does not exists

Michael Köppl m.koeppl at proxmox.com
Tue May 27 18:01:32 CEST 2025


To keep behavior around non-existent storages consistent with
vdisk_free(), also print warning if storage does not exist.

Signed-off-by: Michael Köppl <m.koeppl at proxmox.com>
---
 src/PVE/Storage.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/PVE/Storage.pm b/src/PVE/Storage.pm
index f1fd46f..e7cb2f3 100755
--- a/src/PVE/Storage.pm
+++ b/src/PVE/Storage.pm
@@ -523,6 +523,10 @@ sub parse_volname {
     my ($storeid, $volname) = parse_volume_id($volid);
 
     my $scfg = storage_config($cfg, $storeid);
+    if (!$scfg) {
+	log_warn("storage '$storeid' does not exist, mountpoint volume '$volid' could not be deleted");
+	return;
+    }
 
     my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
 
-- 
2.39.5





More information about the pve-devel mailing list