diff --git a/PVE/API2/Storage/Config.pm b/PVE/API2/Storage/Config.pm index 27b3a55..4255299 100755 --- a/PVE/API2/Storage/Config.pm +++ b/PVE/API2/Storage/Config.pm @@ -243,6 +243,9 @@ __PACKAGE__->register_method ({ my $cfg = cfs_read_file('storage.cfg'); + die "storage '$storeid' does not exist\n" + if !($cfg->{ids}->{$storeid}); + die "can't remove storage - storage is used as base of another storage\n" if PVE::Storage::storage_is_used($cfg, $storeid);