From 0350ada8c3e84e42035f28555a37bb2d9d08eca4 Mon Sep 17 00:00:00 2001 From: oddlama Date: Wed, 29 Jun 2022 02:15:32 +0200 Subject: [PATCH] fix: ZFS compression was not properly enabled on the rpool dataset --- scripts/functions.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/functions.sh b/scripts/functions.sh index 4f56639..cf7fe62 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -439,12 +439,6 @@ function format_zfs_standard() { einfo "Creating zfs pool on $devices_desc" - if [[ "$compress" != false ]]; then - extra_args+=( - "-O" "compression=$compress" - ) - fi - local zfs_stdin="" if [[ "$encrypt" == true ]]; then extra_args+=( @@ -473,6 +467,10 @@ function format_zfs_standard() { <<< "$zfs_stdin" \ || die "Could not create zfs pool on $devices_desc" + if [[ "$compress" != false ]]; then + zfs set "compression=$compress" rpool/ROOT \ + || die "Could enable compression on dataset 'rpool'" + fi zfs create rpool/ROOT \ || die "Could not create zfs dataset 'rpool/ROOT'" zfs create -o mountpoint=/ rpool/ROOT/default \