From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id BC02A1FF126 for ; Wed, 05 Aug 2026 17:30:53 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 8819221A42; Wed, 05 Aug 2026 17:30:53 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 05 Aug 2026 17:30:48 +0200 Message-Id: Subject: Re: [PATCH pve-storage v2 2/2] fix #7598: qemu-img: increase timeout for image resizing in worker context From: "Elias Huhsovitz" To: "Jakob Klocker" , X-Mailer: aerc 0.20.0 References: <20260804090438.58491-1-j.klocker@proxmox.com> <20260804090438.58491-3-j.klocker@proxmox.com> In-Reply-To: <20260804090438.58491-3-j.klocker@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1785943835103 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.050 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) POISEN_SPAM_PILL 0.1 Meta: its spam POISEN_SPAM_PILL_1 0.1 random spam to be learned in bayes POISEN_SPAM_PILL_3 0.1 random spam to be learned in bayes RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: WBJ4XVAHXCXVP4ME2LIFXIN44MVD4SAF X-Message-ID-Hash: WBJ4XVAHXCXVP4ME2LIFXIN44MVD4SAF X-MailFrom: e.huhsovitz@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 =E2=89=88 288GB/h, so the 1h timeout should be fin= e and mirrors the ZFS behaviour nicely. I also did some quick tests via=20 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=3D3600 as intended. Therefore consider it: Reviewed-by: Elias Huhsovitz Tested-by: Elias Huhsovitz 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=3D7598 > > Signed-off-by: Jakob Klocker > --- > 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; > =20 > use PVE::JSONSchema; > +use PVE::RPCEnvironment; > use PVE::Syscall; > use PVE::Tools qw(run_command); > =20 > @@ -263,7 +264,7 @@ sub qemu_img_measure { > =20 > 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 res= ize 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. > =20 > =3Dcut > =20 > @@ -276,7 +277,7 @@ sub qemu_img_resize { > push $cmd->@*, "--preallocation=3D$preallocation" if $preallocation; > push $cmd->@*, '-f', $format, $path, $size; > =20 > - my $timeout =3D 10; > + my $timeout =3D PVE::RPCEnvironment->is_worker() ? 60 * 60 : 10; > run_command($cmd, timeout =3D> $timeout); > } > =20