* [PATCH-SERIES qemu-server 0/2] partially fix #7554: avoid incorrectly offline migrating qcow2 on LVM as raw
@ 2026-06-01 14:55 Fiona Ebner
2026-06-01 14:55 ` [PATCH qemu-server 1/2] migration: local volume: abort early when size or format cannot be determined Fiona Ebner
2026-06-01 14:55 ` [PATCH qemu-server 2/2] migration: local volume: activate for querying the size (required for qcow2 on LVM) Fiona Ebner
0 siblings, 2 replies; 3+ messages in thread
From: Fiona Ebner @ 2026-06-01 14:55 UTC (permalink / raw)
To: pve-devel
Because volumes were not activated early for offline migration,
getting the size and as a consequence the format would not work for
qcow2 on LVM. But migration also continued and not having the format
would lead to the 'with-snapshots' parameter not being set, despite
the format being qcow2 and so the migration would wrongly continue
with raw+size as the stream format. If 'with-snapshots' were set, the
plugin would correctly report that there is no possible transfer
format (the same restriction is present in file-based storages with
snapshot-as-volume-chain).
Fix the issue by activating the volumes early, as well as failing when
the size and format cannot be determined as an additional guardrail.
What could still be implemented is migrating as qcow2+size when there
actually are no snapshots.
qemu-server:
Fiona Ebner (2):
migration: local volume: abort early when size or format cannot be
determined
migration: local volume: activate for querying the size (required for
qcow2 on LVM)
src/PVE/QemuMigrate.pm | 6 ++++++
1 file changed, 6 insertions(+)
Summary over all repositories:
1 files changed, 6 insertions(+), 0 deletions(-)
--
Generated by git-murpp 0.5.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH qemu-server 1/2] migration: local volume: abort early when size or format cannot be determined
2026-06-01 14:55 [PATCH-SERIES qemu-server 0/2] partially fix #7554: avoid incorrectly offline migrating qcow2 on LVM as raw Fiona Ebner
@ 2026-06-01 14:55 ` Fiona Ebner
2026-06-01 14:55 ` [PATCH qemu-server 2/2] migration: local volume: activate for querying the size (required for qcow2 on LVM) Fiona Ebner
1 sibling, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2026-06-01 14:55 UTC (permalink / raw)
To: pve-devel
Part of the issue in bug #7554 is that an offline volume migration
will continue even if the size and format cannot be determined. Not
having the format would lead to the 'with-snapshots' parameter not
being set, despite the format being qcow2 and so the migration would
wrongly continue with raw+size as the stream format. If
'with-snapshots' were set, the plugin would correctly report that
there is no possible transfer format (the same restriction is present
in file-based storages with snapshot-as-volume-chain currently).
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/QemuMigrate.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
index d4de9f87..6b563343 100644
--- a/src/PVE/QemuMigrate.pm
+++ b/src/PVE/QemuMigrate.pm
@@ -451,6 +451,10 @@ sub scan_local_volumes {
$local_volumes->{$volid}->@{qw(size format)} =
PVE::Storage::volume_size_info($storecfg, $volid);
+ die "unable to determine size for volume '$volid'\n"
+ if !defined($local_volumes->{$volid}->{size});
+ die "unable to determine format for volume '$volid'\n"
+ if !defined($local_volumes->{$volid}->{format});
$local_volumes->{$volid}->{is_vmstate} = $attr->{is_vmstate} ? 1 : 0;
$local_volumes->{$volid}->{is_cloudinit} = $attr->{is_cloudinit} ? 1 : 0;
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH qemu-server 2/2] migration: local volume: activate for querying the size (required for qcow2 on LVM)
2026-06-01 14:55 [PATCH-SERIES qemu-server 0/2] partially fix #7554: avoid incorrectly offline migrating qcow2 on LVM as raw Fiona Ebner
2026-06-01 14:55 ` [PATCH qemu-server 1/2] migration: local volume: abort early when size or format cannot be determined Fiona Ebner
@ 2026-06-01 14:55 ` Fiona Ebner
1 sibling, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2026-06-01 14:55 UTC (permalink / raw)
To: pve-devel
For qcow2 on LVM, it is necessary that the volumes are active to be
able to query the size. For offline migration, the volumes would be
activated later in storage_migrate() and for online migration, the
volumes are already active.
This makes an attempt to offline migrate a qcow2 on LVM volume
correctly fail with an error about lacking support, rather than an
error about not being to determine the size. See also commit
"migration: abort early when size or format cannot be determined" for
context.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/QemuMigrate.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/PVE/QemuMigrate.pm b/src/PVE/QemuMigrate.pm
index 6b563343..8da6f15d 100644
--- a/src/PVE/QemuMigrate.pm
+++ b/src/PVE/QemuMigrate.pm
@@ -449,6 +449,8 @@ sub scan_local_volumes {
$local_volumes->{$volid}->{bwlimit} = $self->get_bwlimit($sid, $targetsid);
$local_volumes->{$volid}->{targetsid} = $targetsid;
+ # For some volumes, like qcow2 on LVM, it is necessary to activate to query the size.
+ PVE::Storage::activate_volumes($storecfg, [$volid]);
$local_volumes->{$volid}->@{qw(size format)} =
PVE::Storage::volume_size_info($storecfg, $volid);
die "unable to determine size for volume '$volid'\n"
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-01 14:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-01 14:55 [PATCH-SERIES qemu-server 0/2] partially fix #7554: avoid incorrectly offline migrating qcow2 on LVM as raw Fiona Ebner
2026-06-01 14:55 ` [PATCH qemu-server 1/2] migration: local volume: abort early when size or format cannot be determined Fiona Ebner
2026-06-01 14:55 ` [PATCH qemu-server 2/2] migration: local volume: activate for querying the size (required for qcow2 on LVM) Fiona Ebner
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.