* [pve-devel] [PATCH container] mountpoint mount: activate PVE-managed volumes during preparation
@ 2024-03-25 11:00 Fiona Ebner
2024-04-11 13:35 ` Fabian Grünbichler
0 siblings, 1 reply; 3+ messages in thread
From: Fiona Ebner @ 2024-03-25 11:00 UTC (permalink / raw)
To: pve-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH container] mountpoint mount: activate PVE-managed volumes during preparation
2024-03-25 11:00 [pve-devel] [PATCH container] mountpoint mount: activate PVE-managed volumes during preparation Fiona Ebner
@ 2024-04-11 13:35 ` Fabian Grünbichler
2024-04-12 11:09 ` Fiona Ebner
0 siblings, 1 reply; 3+ messages in thread
From: Fabian Grünbichler @ 2024-04-11 13:35 UTC (permalink / raw)
To: Proxmox VE development discussion
On March 25, 2024 12:00 pm, Fiona Ebner wrote:
> 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]);
shouldn't this atually pass $snapname as well? for some storages this
does make quite the difference ;)
there is also one more call in pct.pm (for the `pct fsck` command) that
seems to lack activation before mapping.
> my $path = PVE::Storage::map_volume($storage_cfg, $volid, $snapname);
>
> $path = PVE::Storage::path($storage_cfg, $volid, $snapname) if !defined($path);
> --
> 2.39.2
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [pve-devel] [PATCH container] mountpoint mount: activate PVE-managed volumes during preparation
2024-04-11 13:35 ` Fabian Grünbichler
@ 2024-04-12 11:09 ` Fiona Ebner
0 siblings, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2024-04-12 11:09 UTC (permalink / raw)
To: Proxmox VE development discussion, Fabian Grünbichler
Am 11.04.24 um 15:35 schrieb Fabian Grünbichler:
> On March 25, 2024 12:00 pm, Fiona Ebner wrote:
>> + PVE::Storage::activate_volumes($storage_cfg, [$volid]);
>
> shouldn't this atually pass $snapname as well? for some storages this
> does make quite the difference ;)
>
> there is also one more call in pct.pm (for the `pct fsck` command) that
> seems to lack activation before mapping.
>
Yes, totally missed that mountpoint_mount() supports passing a snapname.
Fixed in v2 and also added the activation for fsck:
https://lists.proxmox.com/pipermail/pve-devel/2024-April/062909.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-12 11:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 11:00 [pve-devel] [PATCH container] mountpoint mount: activate PVE-managed volumes during preparation Fiona Ebner
2024-04-11 13:35 ` Fabian Grünbichler
2024-04-12 11:09 ` Fiona Ebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox