added remove storage (exist) check

This commit is contained in:
Alen Grizonic
2015-08-19 10:28:12 +02:00
committed by Dietmar Maurer
parent 48daf9a56b
commit 402df80b12

View File

@ -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);