]> git.proxmox.com Git - pve-container.git/commitdiff
mountpoint mount: activate PVE-managed volumes during preparation
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 12 Apr 2024 11:08:12 +0000 (13:08 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 12 Apr 2024 12:08:34 +0000 (14:08 +0200)
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 <f.ebner@proxmox.com>
src/PVE/LXC.pm

index 0dda6966ecd7df02c77c9d1541bed47faaf1eef0..9681d74e5deff1bf83c6ee091e29e84578f57890 100644 (file)
@@ -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);