diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 99aa1f0..36d4cb3 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -523,7 +523,6 @@ sub vdisk_free { my ($vtype, $name, $vmid, undef, undef, $isBase) = $plugin->parse_volname($volname); - if ($isBase) { my $vollist = $plugin->list_images($storeid, $scfg); foreach my $info (@$vollist) { @@ -542,7 +541,6 @@ sub vdisk_free { } } } - my $cleanup_worker = $plugin->free_image($storeid, $scfg, $volname, $isBase); }); diff --git a/PVE/Storage/NexentaPlugin.pm b/PVE/Storage/NexentaPlugin.pm index 4a5f66d..b24a8e0 100644 --- a/PVE/Storage/NexentaPlugin.pm +++ b/PVE/Storage/NexentaPlugin.pm @@ -109,16 +109,21 @@ sub nexenta_list_zvol { my $pool = $values[0]; my $image = $values[1]; my $owner; - if ($image =~ m/^(vm-(\d+)-\S+)$/) { - $owner = $2; + + if ($image =~ m/^((vm|base)-(\d+)-\S+)$/) { + $owner = $3; } my $props = nexenta_get_zvol_props($scfg, $zvol); + my $parent = $props->{origin}; + if($parent && $parent =~ m/^$scfg->{pool}\/(\S+)$/){ + $parent = $1; + } $list->{$pool}->{$image} = { name => $image, size => $props->{size_bytes}, - parent => $props->{origin}, + parent => $parent, format => 'raw', vmid => $owner };