all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH installer] install: zfs: fix setting compression to 'off'
@ 2024-02-27  9:17 Christoph Heiss
  2024-02-27 15:43 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Heiss @ 2024-02-27  9:17 UTC (permalink / raw)
  To: pve-devel

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 <f.weber@proxmox.com>
Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
---
 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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH installer] install: zfs: fix setting compression to 'off'
  2024-02-27  9:17 [pve-devel] [PATCH installer] install: zfs: fix setting compression to 'off' Christoph Heiss
@ 2024-02-27 15:43 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-02-27 15:43 UTC (permalink / raw)
  To: Proxmox VE development discussion, Christoph Heiss

Am 27/02/2024 um 10:17 schrieb Christoph Heiss:
> 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 <f.weber@proxmox.com>
> Signed-off-by: Christoph Heiss <c.heiss@proxmox.com>
> ---
>  Proxmox/Install.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-27 15:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27  9:17 [pve-devel] [PATCH installer] install: zfs: fix setting compression to 'off' Christoph Heiss
2024-02-27 15:43 ` [pve-devel] applied: " Thomas Lamprecht

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal