]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/Storage/ZFSPoolPlugin.pm
zfs: fix unmount request
[pve-storage.git] / PVE / Storage / ZFSPoolPlugin.pm
index c4be70f2d0a7b3ceee69991001ecf08aafe2ee48..660b3d9b18783eab37c1d7f9ac0f51e59c7f68d6 100644 (file)
@@ -477,7 +477,10 @@ sub volume_snapshot_rollback {
     # caches, they get mounted in activate volume again
     # see zfs bug #10931 https://github.com/openzfs/zfs/issues/10931
     if ($format eq 'subvol') {
-       $class->zfs_request($scfg, undef, 'unmount', "$scfg->{pool}/$vname");
+       eval { $class->zfs_request($scfg, undef, 'unmount', "$scfg->{pool}/$vname"); };
+       if (my $err = $@) {
+           die $err if $err !~ m/not currently mounted$/;
+       }
     }
 
     return $msg;