From 74822cd72d598f90665eb6aa24daaf77c5949495 Mon Sep 17 00:00:00 2001 From: Alexandre Derumier Date: Tue, 5 Feb 2013 12:56:06 +0100 Subject: [PATCH] nexenta : free_image Signed-off-by: Alexandre Derumier --- PVE/Storage/NexentaPlugin.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PVE/Storage/NexentaPlugin.pm b/PVE/Storage/NexentaPlugin.pm index 77b199d..fba601c 100644 --- a/PVE/Storage/NexentaPlugin.pm +++ b/PVE/Storage/NexentaPlugin.pm @@ -318,6 +318,13 @@ sub free_image { nexenta_delete_lu($scfg, $name); nexenta_delete_zvol($scfg, $name); + #if base volume, we delete also the original cloned volume + if ($isBase) { + $name =~ s/^base-/vm-/; + nexenta_delete_lu($scfg, $name); + nexenta_delete_zvol($scfg, $name); + } + return undef; }