diff --git a/PVE/Storage.pm b/PVE/Storage.pm index 55af5ee..1c622c4 100755 --- a/PVE/Storage.pm +++ b/PVE/Storage.pm @@ -2,6 +2,7 @@ package PVE::Storage; use strict; use warnings; +use Data::Dumper; use POSIX; use IO::Select; diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index d3bb0fd..92c3168 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE/Storage/ZFSPoolPlugin.pm @@ -98,14 +98,13 @@ sub zfs_parse_zvol_list { my $zvol = {}; my @parts = split /\//, $dataset; + next if scalar(@parts) < 2; # we need pool/name my $name = pop @parts; my $pool = join('/', @parts); next unless $name =~ m!^(vm|base|subvol)-(\d+)-(\S+)$!; $zvol->{owner} = $2; - $name = $pool . '/' . $name; - $zvol->{pool} = $pool; $zvol->{name} = $name; if ($type eq 'filesystem') {