---
 src/PVE/VZDump/LXC.pm | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index cb228ca..fc3f03b 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -134,6 +134,10 @@ sub prepare {
     # fixme: when do we deactivate ??
     PVE::Storage::activate_volumes($self->{storecfg}, [$volid]) if $volid;
 
+    my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
+
+    my $scfg = PVE::Storage::storage_config($self->{storecfg}, $sid);
+
     if ($mode eq 'snapshot') {
 
        die "mode failure - storage does not support snapshots (no volid)\n" 
@@ -141,11 +145,6 @@ sub prepare {
 
        die "mode failure - storage does not support snapshots\n"
            if !PVE::Storage::volume_has_feature($self->{storecfg}, 'snapshot', 
$volid);
-       
-       my ($sid, $volname) = PVE::Storage::parse_volume_id($volid, 1);
-
-       my $scfg = PVE::Storage::storage_config($self->{storecfg}, $sid);
-
        # we only handle well known types for now, because the storage
        # library dos not handle mount/unmount of snapshots
 
@@ -173,7 +172,14 @@ sub prepare {
        if ($mode eq 'stop') {
 
            my $path = PVE::Storage::path($self->{storecfg}, $volid);
-           &$loop_mount_image($path, $mountpoint);
+
+           if ($scfg->{type} eq 'zfspool') {
+               $mountpoint = $path;
+               $diskinfo->{no_unmount} = 1;
+           } else {
+               &$loop_mount_image($path, $mountpoint);
+           }
+
            $task->{cleanup}->{snapshot_mount} = $mountpoint;
            $diskinfo->{dir} = $diskinfo->{mountpoint} = $mountpoint;
        } elsif ($mode eq 'suspend') {
-- 
2.1.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to