public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH container] mountpoint mount: activate PVE-managed volumes during preparation
Date: Mon, 25 Mar 2024 12:00:12 +0100	[thread overview]
Message-ID: <20240325110012.26547-1-f.ebner@proxmox.com> (raw)

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>
---

Requires the following patch to be tested on recent kernels:
https://lists.proxmox.com/pipermail/pve-devel/2024-January/061260.html

 src/PVE/LXC.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 7db4833..29ff418 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]);
 	my $path = PVE::Storage::map_volume($storage_cfg, $volid, $snapname);
 
 	$path = PVE::Storage::path($storage_cfg, $volid, $snapname) if !defined($path);
-- 
2.39.2





             reply	other threads:[~2024-03-25 11:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 11:00 Fiona Ebner [this message]
2024-04-11 13:35 ` Fabian Grünbichler
2024-04-12 11:09   ` Fiona Ebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240325110012.26547-1-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal