* [pve-devel] [storage] Lack of deactivate_volume call after cloning from a snapshot
@ 2025-09-30 22:39 Andrei Perapiolkin via pve-devel
0 siblings, 0 replies; only message in thread
From: Andrei Perapiolkin via pve-devel @ 2025-09-30 22:39 UTC (permalink / raw)
To: Proxmox VE development discussion; +Cc: Andrei Perapiolkin
[-- Attachment #1: Type: message/rfc822, Size: 8933 bytes --]
From: Andrei Perapiolkin <andrei.perepiolkin@open-e.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: [pve-devel][storage] Lack of deactivate_volume call after cloning from a snapshot
Date: Tue, 30 Sep 2025 18:39:32 -0400
Message-ID: <5e0aef43-3698-4784-8ca3-448eb3f19709@open-e.com>
Hi,
'deactivate_volume' in the storage plugin is not called after cloning
completes if the clone is initiated from the Proxmox web UI and both VMs
are on the same host.
I’ve created a bug report: https://bugzilla.proxmox.com/show_bug.cgi?id=6879
In my understanding, the problem is related to:
/method({ name => 'clone_vm', path => '{vmid}/clone', ...
/
Located in PVE/API2/Qemu.pm around 1459 - 4568
In this API method, deactivation calls are triggered only when the
$target parameter is provided.
if ($target) {
if (!$running) {
# always deactivate volumes - avoids that LVM
LVs are active on several nodes
eval {
PVE::Storage::deactivate_volumes($storecfg, $vollist, $snapname);
};
# but only warn when that fails (e.g., parallel
clones keeping them active)
log_warn($@) if $@;
}
PVE::Storage::deactivate_volumes($storecfg,
$newvollist);
my $newconffile =
PVE::QemuConfig->config_file($newid, $target);
die "Failed to move config to node '$target' -
rename failed: $!\n"
if !rename($conffile, $newconffile);
}
https://github.com/proxmox/qemu-server/blob/31d6f5f63bd6edb6c43de3e0213d38199c350cd4/src/PVE/API2/Qemu.pm#L4533C1-L4547C18
It seems that web UI, for cloning on the same node, does not provide
'$target' and as a result no deactivation being triggered volume
snapshot and target volume.
Is it expected behavior?
Will it be OK to move 'deactivate' section outside of the $target check?
Best regards,
Andrei Perepiolkin
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-30 22:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-30 22:39 [pve-devel] [storage] Lack of deactivate_volume call after cloning from a snapshot Andrei Perapiolkin via pve-devel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox