From cf72680c07c91f700c1a4eee043ecaf2a6b3755a Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 21 Jan 2024 19:19:18 +0100 Subject: [PATCH] fix: Use raw by default (#363) --- src/disk.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/disk.sh b/src/disk.sh index 0a28f6a..8a16cd5 100644 --- a/src/disk.sh +++ b/src/disk.sh @@ -4,7 +4,7 @@ set -Eeuo pipefail # Docker environment variables : "${DISK_IO:="native"}" # I/O Mode, can be set to 'native', 'threads' or 'io_turing' -: "${DISK_FMT:=""}" # Disk file format, can be set to "raw" or "qcow2" (default) +: "${DISK_FMT:=""}" # Disk file format, can be set to "raw" (default) or "qcow2" : "${DISK_FLAGS:=""}" # Specifies the options for use with the qcow2 disk format : "${DISK_CACHE:="none"}" # Caching mode, can be set to 'writeback' for better performance : "${DISK_DISCARD:="on"}" # Controls whether unmap (TRIM) commands are passed to the host. @@ -434,21 +434,17 @@ DISK3_FILE="/storage3/data3" DISK4_FILE="/storage4/data4" if [ -z "$DISK_FMT" ]; then - if [ -f "$DISK1_FILE.img" ]; then - DISK_FMT="raw" - else + if [ -f "$DISK1_FILE.qcow2" ]; then DISK_FMT="qcow2" + else + DISK_FMT="raw" fi fi DISK_EXT=$(fmt2ext "$DISK_FMT") if [ -z "$ALLOCATE" ]; then - if [[ "${DISK_FMT,,}" == "raw" ]]; then - ALLOCATE="Y" - else - ALLOCATE="N" - fi + ALLOCATE="N" fi if [[ "$ALLOCATE" == [Nn]* ]]; then