From: "Elias Huhsovitz" <e.huhsovitz@proxmox.com>
To: "Jakob Klocker" <j.klocker@proxmox.com>, <pve-devel@lists.proxmox.com>
Subject: Re: [PATCH pve-storage v2 2/2] fix #7598: qemu-img: increase timeout for image resizing in worker context
Date: Wed, 05 Aug 2026 17:30:48 +0200 [thread overview]
Message-ID: <DKH499LWCMF7.RW4KUPYN7BCH@proxmox.com> (raw)
In-Reply-To: <20260804090438.58491-3-j.klocker@proxmox.com>
I did some quick research on the slowest possible HDDs that people have
reported using for Virtual Environments and it seems the slowest write
speeds are around 80MB/s ≈ 288GB/h, so the 1h timeout should be fine and
mirrors the ZFS behaviour nicely.
I also did some quick tests via
pvesh set /nodes/{node}/qemu/{vmid}/resize --disk scsi0 --size +{num}G
and the GUI option VM->Disk Action->Resize
Which correctly set the $timeout=3600 as intended.
Therefore consider it:
Reviewed-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
Tested-by: Elias Huhsovitz <e.huhsovitz@proxmox.com>
On Tue Aug 4, 2026 at 11:04 AM CEST, Jakob Klocker wrote:
> Mirror ZFS behaviour and increase timeout to an hour when in a worker
> context. This fixes issues some users [0] have with slow disks where a
> resize would fail.
>
> [0] https://bugzilla.proxmox.com/show_bug.cgi?id=7598
>
> Signed-off-by: Jakob Klocker <j.klocker@proxmox.com>
> ---
> src/PVE/Storage/Common.pm | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
> index 725f623..ee95653 100644
> --- a/src/PVE/Storage/Common.pm
> +++ b/src/PVE/Storage/Common.pm
> @@ -3,6 +3,7 @@ package PVE::Storage::Common;
> use v5.36;
>
> use PVE::JSONSchema;
> +use PVE::RPCEnvironment;
> use PVE::Syscall;
> use PVE::Tools qw(run_command);
>
> @@ -263,7 +264,7 @@ sub qemu_img_measure {
>
> Resize a qemu image C<$path> with format C<$format> to a target Kb size C<$size>.
> C<$preallocation> allows to specify the preallocation option for the resize operation.
> -The operation uses a default timeout of 10s.
> +The operation uses a default timeout of 10s, or 1 hour when running in a worker context.
>
> =cut
>
> @@ -276,7 +277,7 @@ sub qemu_img_resize {
> push $cmd->@*, "--preallocation=$preallocation" if $preallocation;
> push $cmd->@*, '-f', $format, $path, $size;
>
> - my $timeout = 10;
> + my $timeout = PVE::RPCEnvironment->is_worker() ? 60 * 60 : 10;
> run_command($cmd, timeout => $timeout);
> }
>
prev parent reply other threads:[~2026-08-05 15:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 9:04 [PATCH storage v2 0/2] fix #7598: qemu-img: increase timeout for image resize Jakob Klocker
2026-08-04 9:04 ` [PATCH pve-storage v2 1/2] qemu-img: drop unused image resize timeout parameter Jakob Klocker
2026-08-05 15:20 ` Elias Huhsovitz
2026-08-04 9:04 ` [PATCH pve-storage v2 2/2] fix #7598: qemu-img: increase timeout for image resizing in worker context Jakob Klocker
2026-08-05 15:30 ` Elias Huhsovitz [this message]
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=DKH499LWCMF7.RW4KUPYN7BCH@proxmox.com \
--to=e.huhsovitz@proxmox.com \
--cc=j.klocker@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.