From: Fiona Ebner Date: Fri, 12 Apr 2024 11:08:12 +0000 (+0200) Subject: mountpoint mount: activate PVE-managed volumes during preparation X-Git-Url: https://git.proxmox.com/?p=pve-container.git;a=commitdiff_plain;h=e0a77fcbf274bc2a36182216927f6bac4045efa8 mountpoint mount: activate PVE-managed volumes during preparation Otherwise it was not possible to hotplug a volume that was previously deactivated and requires activation, e.g. an LVM LV that was detached after shutting down the container couldn't be hotplugged anymore later. Signed-off-by: Fiona Ebner --- diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index 0dda696..9681d74 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1849,6 +1849,7 @@ sub __mountpoint_mount { my $scfg = PVE::Storage::storage_config($storage_cfg, $storage); + PVE::Storage::activate_volumes($storage_cfg, [$volid], $snapname); my $path = PVE::Storage::map_volume($storage_cfg, $volid, $snapname); $path = PVE::Storage::path($storage_cfg, $volid, $snapname) if !defined($path);