diff --git a/PVE/Storage/ZFSPoolPlugin.pm b/PVE/Storage/ZFSPoolPlugin.pm index 07540b3..2f0a80a 100644 --- a/PVE/Storage/ZFSPoolPlugin.pm +++ b/PVE/Storage/ZFSPoolPlugin.pm @@ -549,15 +549,14 @@ sub activate_volume { return 1 if defined($snapname); - my (undef, undef, undef, undef, undef, undef, $format) = $class->parse_volname($volname); + my (undef, $dataset, undef, undef, undef, undef, $format) = $class->parse_volname($volname); if ($format eq 'raw') { $class->zfs_wait_for_zvol_link($scfg, $volname); } elsif ($format eq 'subvol') { - my ($path, undef, undef) = $class->path($scfg, $volname, $storeid); - my $mounted = $class->zfs_get_properties($scfg, 'mounted', "$path"); + my $mounted = $class->zfs_get_properties($scfg, 'mounted', "$scfg->{pool}/$dataset"); if ($mounted !~ m/^yes$/) { - $class->zfs_request($scfg, undef, 'mount', "$path"); + $class->zfs_request($scfg, undef, 'mount', "$scfg->{pool}/$dataset"); } }