From 515ef80bf58e7e9b579800176dde32de6bd9bfcb Mon Sep 17 00:00:00 2001 From: Wolfgang Link Date: Tue, 8 Sep 2015 12:23:53 +0200 Subject: [PATCH] improve free_image with deactivate_volumes this is necessary to prevent an error when trying to remove a mapped volume. --- PVE/Storage/RBDPlugin.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PVE/Storage/RBDPlugin.pm b/PVE/Storage/RBDPlugin.pm index e600ec1..ae6ed53 100644 --- a/PVE/Storage/RBDPlugin.pm +++ b/PVE/Storage/RBDPlugin.pm @@ -407,6 +407,8 @@ sub free_image { } } + $class->deactivate_volume($storeid, $scfg, $volname); + my $cmd = &$rbd_cmd($scfg, $storeid, 'snap', 'purge', $name); run_rbd_command($cmd, errmsg => "rbd snap purge '$volname' error");