From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 957F095668 for ; Tue, 27 Feb 2024 10:19:39 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6DE9F1A2E2 for ; Tue, 27 Feb 2024 10:19:09 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 27 Feb 2024 10:19:06 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 953BF476A6 for ; Tue, 27 Feb 2024 10:19:06 +0100 (CET) From: Christoph Heiss To: pve-devel@lists.proxmox.com Date: Tue, 27 Feb 2024 10:17:38 +0100 Message-ID: <20240227091817.184817-1-c.heiss@proxmox.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.005 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH installer] install: zfs: fix setting compression to 'off' X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2024 09:19:39 -0000 The default for the `compression` property in ZFS got changed ~2 years ago by 56fa4aa96 ("Default to ON for compression") [0] Support for setting this option originally got introduced into the installer in 2016 by c7779156 ("refactor disk setup, add advanced ZFS options") [1] where the default of 'off' was still correct. As the installer only set the property if it was *not* explicitly set to 'on', this actually regressed in the meantime. Thus just remove the conditional all together, as the definedness-check did not have any impact anyway (since $value gets set to 'on' regardless) and the latter just causes regressions like this one. Tested by installing once w/o the patch to confirm the report and once with the patch applied, checking `zfs get compression` on the freshly installed system. [0] https://github.com/openzfs/zfs/commit/56fa4aa96eb3875f254e93eaef646ea20ba187f9 [1] https://git.proxmox.com/?p=pve-installer.git;a=commit;h=c7779156db5c38cf184e143de0cab534bd0a9cb1 Reported-by: Friedrich Weber Signed-off-by: Christoph Heiss --- Proxmox/Install.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Proxmox/Install.pm b/Proxmox/Install.pm index 67093a1..5556f1a 100644 --- a/Proxmox/Install.pm +++ b/Proxmox/Install.pm @@ -196,7 +196,7 @@ sub zfs_create_rpool { syscmd("zfs set atime=on relatime=on $pool_name") == 0 || die "unable to set zfs properties\n"; my $value = $zfs_opts->{compress} // 'on'; - syscmd("zfs set compression=$value $pool_name") if defined($value) && $value ne 'off'; + syscmd("zfs set compression=$value $pool_name"); $value = $zfs_opts->{checksum} // 'on'; syscmd("zfs set checksum=$value $pool_name") if defined($value) && $value ne 'on'; -- 2.43.0