fix: Use raw by default (#363)

This commit is contained in:
Kroese 2024-01-21 19:19:18 +01:00 committed by GitHub
parent e30c724170
commit cf72680c07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,22 +434,18 @@ 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
fi
if [[ "$ALLOCATE" == [Nn]* ]]; then
DISK_TYPE="growable"