[pve-devel] [PATCH container 2/3] mountpoint_stage: add another comment about keeping the mount points active

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Dec 12 11:36:04 CET 2019


Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
 src/PVE/LXC.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 73e54ca..34949c6 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -1481,6 +1481,9 @@ sub mountpoint_stage {
 	die "failed to mount subvolume: $!\n";
     }
 
+    # We clone the mount point and leave it there in order to keep them connected to eg. loop
+    # devices in case we're hotplugging (which would allow contaienrs to unmount the new mount
+    # point).
     my $err;
     my $fd = PVE::Tools::open_tree(&AT_FDCWD, $stage_dir, &OPEN_TREE_CLOEXEC | &OPEN_TREE_CLONE)
 	or die "open_tree() on mount point failed: $!\n";
-- 
2.20.1





More information about the pve-devel mailing list