[pve-devel] [PATCH 7/7] prevent cleanup from unmount zfs subvols
Wolfgang Link
w.link at proxmox.com
Mon Aug 24 10:48:36 CEST 2015
---
src/PVE/VZDump/LXC.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index 42c5e44..03f056c 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -175,6 +175,7 @@ sub prepare {
if ($scfg->{type} eq 'zfspool') {
$mountpoint = $path;
+ $diskinfo->{no_unmount} = 1;
} else {
$mountpoint = $mountpointdir.$vmid."/rootfs";
&$loop_mount_image($path, $mountpoint);
@@ -311,7 +312,7 @@ sub cleanup {
my $di = $task->{diskinfo};
- if ($task->{cleanup}->{snapshot_mount}) {
+ if ($task->{cleanup}->{snapshot_mount} && !$di->{no_unmount}) {
# Note: sleep to avoid 'device is busy' message.
# Seems Kernel need some time to cleanup open file list,
# for example when we stop the tar with kill (stop task)
--
2.1.4
More information about the pve-devel
mailing list