[pve-devel] [RFC/PATCH installer 3/4] add swapcreation to zfs testmode

Stoiko Ivanov s.ivanov at proxmox.com
Mon Oct 1 12:42:00 CEST 2018


mostly for testing the previous patches

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

diff --git a/proxinstall b/proxinstall
index 43ac5d2..50a5226 100755
--- a/proxinstall
+++ b/proxinstall
@@ -1152,6 +1152,11 @@ sub extract_data {
 		syscmd ("zpool destroy $zfstestpool");
 
 		zfs_create_rpool($rootdev);
+		my $set_swapsize = $config_options->{zfsswapsize} // $config_options->{swapsize};
+		$config_options->{swapsize} = $set_swapsize;
+		my $swap_size;
+		$swap_size = compute_swapsize(2*1024*1024) if defined($set_swapsize);
+		$swapfile = zfs_create_swap($swap_size) if $swap_size;
 
 	    } else {
 
-- 
2.11.0





More information about the pve-devel mailing list