[pve-devel] [RFC/PATCH installer 1/4] no swap on zfs unless it's explicitly set

Stoiko Ivanov s.ivanov at proxmox.com
Mon Oct 1 12:41:58 CEST 2018


Using zvols as swap devices creates deadlocks for users, as of zfs 0.7.9.
As the discussion of the issue [0] shows, fixing this is involved, and probably
won't be happening anytime soon (before zfs 0.8).

Not creating swap as a zvol seems like the better default setting for now.

[0] https://github.com/zfsonlinux/zfs/issues/7734

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 proxinstall | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/proxinstall b/proxinstall
index fac87ee..adba44f 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1213,7 +1213,9 @@ sub extract_data {
 
 	    zfs_create_rpool($vdev);
 
-	    my $swap_size = compute_swapsize($disksize);
+	    my $swap_size;
+	    $swap_size = compute_swapsize($disksize) if defined($config_options->{swapsize};
+
 	    $swapfile = zfs_create_swap($swap_size) if $swap_size;
 
 	} else {
-- 
2.11.0





More information about the pve-devel mailing list