[pve-devel] [PATCH 39/44] nexenta : free_image

Alexandre Derumier aderumier at odiso.com
Tue Feb 5 12:56:06 CET 2013


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Storage/NexentaPlugin.pm |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/PVE/Storage/NexentaPlugin.pm b/PVE/Storage/NexentaPlugin.pm
index 4630b59..0fcbba1 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;
 }
 
-- 
1.7.10.4




More information about the pve-devel mailing list