From 77477348f51fd0f1bcb651cb26256cc017324412 Mon Sep 17 00:00:00 2001 From: thorstenspille Date: Wed, 4 Oct 2023 06:34:52 +0200 Subject: [PATCH] Fix calculation --- postinstall | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/postinstall b/postinstall index 6a9f512..6529f01 100755 --- a/postinstall +++ b/postinstall @@ -110,6 +110,8 @@ cancel_dialog() { } arc_suggestion(){ + if [ $ARC_MIN_DEFAULT_BYTES -lt 33554432 ]; then ARC_MIN_DEFAULT_MB="32" ; else ARC_MIN_DEFAULT_MB="$(($ARC_MIN_DEFAULT_BYTES / 1024 / 1024))" ; fi + ZFS_ARC_MAX_MEGABYTES=$(roundup $(($ZPOOL_SIZE_SUM_BYTES / 1024 / 1024 / 1024))) ZFS_ARC_MIN_MEGABYTES=$(roundoff $(($ZPOOL_SIZE_SUM_BYTES / 2048 / 1024 / 1024))) if [ $ZFS_ARC_MIN_MEGABYTES -eq 0 ]; then @@ -119,7 +121,6 @@ arc_suggestion(){ fi fi - if [ $ARC_MIN_DEFAULT_BYTES -lt 33554432 ]; then ARC_MIN_DEFAULT_MB="32" ; else ARC_MIN_DEFAULT_MB="$(($ARC_MIN_DEFAULT_BYTES / 1024 / 1024))" ; fi if [ $ARC_MIN_CUR_BYTES -gt 0 ]; then ARC_MIN_CURRENT_MB="$(($ARC_MIN_CUR_BYTES / 1024 / 1024))" ; else ARC_MIN_CURRENT_MB="0" ; fi if [ $ARC_MAX_CUR_BYTES -gt 0 ]; then ARC_MAX_CURRENT_MB="$(($ARC_MAX_CUR_BYTES / 1024 / 1024))" ; else ARC_MAX_CURRENT_MB="0" ; fi