]> git.proxmox.com Git - pve-container.git/commitdiff
vzdump: don't unmount filesystems with -mode suspend
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 17 Sep 2015 06:10:43 +0000 (08:10 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 17 Sep 2015 06:10:43 +0000 (08:10 +0200)
src/PVE/VZDump/LXC.pm

index 8dfc7cc60dd69d78785eb40cf36243cf9f7593d4..73876ece553cf046cc471d01123f70ac045882d5 100644 (file)
@@ -309,10 +309,12 @@ sub cleanup {
 
     my $conf = PVE::LXC::load_config($vmid);
 
-    my $rootdir = $default_mount_point;
-    my $disks = $task->{disks};
-    foreach my $disk (reverse @$disks) {
-       PVE::Tools::run_command(['umount', '-l', '-d', $disk->{dir}]) if $disk->{dir};
+    if ($task->{mode} ne 'snapshot') {
+       my $rootdir = $default_mount_point;
+       my $disks = $task->{disks};
+       foreach my $disk (reverse @$disks) {
+           PVE::Tools::run_command(['umount', '-l', '-d', $disk->{dir}]) if $disk->{dir};
+       }
     }
 
     if ($task->{cleanup}->{remove_snapshot}) {