From: Friedrich Weber <f.weber@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: Re: [pve-devel] [RFC qemu-server/storage 0/3] fix #5779: introduce guest hints to pass rxbounce flag to KRBD
Date: Tue, 28 Oct 2025 10:02:18 +0100 [thread overview]
Message-ID: <82562115-907d-41d2-b3c1-ee8bbc91d1d8@proxmox.com> (raw)
In-Reply-To: <20251024122705.93761-1-f.weber@proxmox.com>
On 24/10/2025 14:27, Friedrich Weber wrote:
> [...]
> Obstacles I faced so far:
>
> - The biggest obstacle is that we need to update all callers of
> activate_volumes to pass guest hints where possible. This means that optimally
> all callers should be able to generate the guest hints. Right now, there is
> only the 'guest-ostype' hint which is taken from the VM config. Currently, this
> is not always available to the caller of activate_volumes, sometimes
> some extra work/refactoring would be needed to get it (e.g. see
> PVE::QemuServer::QemuImage::convert or PVE::QemuServer::clone_disk),
> so this needs quite some code changes, which I have not done in all cases in
> this RFC.
>
> - There are also some indirect callers of activate_volumes, e.g. via
> PVE::Storage::abs_filesystem_path or PVE::Storage::storage_migrate -- these
> would also need to be extended to accept hints (not done in this RFC)
>
> - Initially, to avoid having to modify all (direct+indirect) callers of
> activate_volumes, I thought I could pass the hints only at the few "relevant"
> call sites (i.e., when starting a VM), but then noticed that volumes may be
> activated by an action unrelated to a VM start (e.g. a clone), then stay
> active, and not be re-activated by a VM start. So if e.g. we do not pass the
> hints on clone, the KRBD volume would be mapped without rxbounce, stay active,
> and when starting the VM, a user could run into the original problem again.
> So we can't get away with only passing hints to the few relevant call sites,
> and actually need to pass them everywhere (where possible).
>
Thomas and I discussed this point off-list:
- to clarify: if a Windows guest volume was mapped with KRBD without
rxbounce (e.g. by a clone where the activate_volumes caller doesn't pass
$hints) and doesn't get unmapped, and then a VM start activates the
volumes again (passing $hints this time so we'd like to pass rxbounce),
RBDPlugin::map_volume will early-exit because the volume is already mapped:
sub map_volume {
my ($class, $storeid, $scfg, $volname, $snapname) = @_;
my ($vtype, $img_name, $vmid) = $class->parse_volname($volname);
my $name = $img_name;
$name .= '@' . $snapname if $snapname;
my $kerneldev = get_rbd_dev_path($scfg, $storeid, $name);
return $kerneldev if -b $kerneldev; # already mapped
[...]
}
... which is the VM will just use the guest volume without rxbounce and
the user can run into the issue.
- we discussed whether, to avoid this, we could apply the rxbounce
option "on the fly" to an already-mapped volume. I looked a bit [1] and
didn't see any way to apply rxbounce to an already-mapped volume.
Calling `rbd map` again apparently just maps the volume a second time
which doesn't sound like a good idea, and an `rbd unmap` followed by an
`rbd map` (with rxbounce) is likely not safe either?
[1] https://docs.ceph.com/en/reef/man/8/rbd/
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-10-28 9:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 12:25 Friedrich Weber
2025-10-24 12:25 ` [pve-devel] [PATCH pve-storage 1/2] plugin: map/activate volume: allow callers to pass hints Friedrich Weber
2025-10-28 12:17 ` Fiona Ebner
2025-10-24 12:25 ` [pve-devel] [PATCH pve-storage 2/2] plugin: rbd: pass rxbounce when mapping Windows VM disks Friedrich Weber
2025-10-28 12:19 ` Fiona Ebner
2025-10-28 15:35 ` Friedrich Weber
2025-10-24 12:25 ` [pve-devel] [PATCH qemu-server 1/1] fix #5997: qemu: pass guest-ostype hint when activating volumes Friedrich Weber
2025-10-28 9:02 ` Friedrich Weber [this message]
2025-10-28 10:50 ` [pve-devel] [RFC qemu-server/storage 0/3] fix #5779: introduce guest hints to pass rxbounce flag to KRBD Fiona Ebner
2025-10-28 11:12 ` Fiona Ebner
2025-10-28 12:10 ` Fiona Ebner
2025-10-28 16:35 ` Friedrich Weber
2025-10-31 10:38 ` [pve-devel] superseded: " Friedrich Weber
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=82562115-907d-41d2-b3c1-ee8bbc91d1d8@proxmox.com \
--to=f.weber@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 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.