fix: ZFS compression was not properly enabled on the rpool dataset

This commit is contained in:
oddlama 2022-06-29 02:15:32 +02:00
parent 81fc06784e
commit 0350ada8c3
No known key found for this signature in database
GPG Key ID: 14EFE510775FE39A
1 changed files with 4 additions and 6 deletions

View File

@ -439,12 +439,6 @@ function format_zfs_standard() {
einfo "Creating zfs pool on $devices_desc" einfo "Creating zfs pool on $devices_desc"
if [[ "$compress" != false ]]; then
extra_args+=(
"-O" "compression=$compress"
)
fi
local zfs_stdin="" local zfs_stdin=""
if [[ "$encrypt" == true ]]; then if [[ "$encrypt" == true ]]; then
extra_args+=( extra_args+=(
@ -473,6 +467,10 @@ function format_zfs_standard() {
<<< "$zfs_stdin" \ <<< "$zfs_stdin" \
|| die "Could not create zfs pool on $devices_desc" || 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 \ zfs create rpool/ROOT \
|| die "Could not create zfs dataset 'rpool/ROOT'" || die "Could not create zfs dataset 'rpool/ROOT'"
zfs create -o mountpoint=/ rpool/ROOT/default \ zfs create -o mountpoint=/ rpool/ROOT/default \