fix: Use raw by default (#363)
This commit is contained in:
parent
e30c724170
commit
cf72680c07
1 changed files with 5 additions and 9 deletions
14
src/disk.sh
14
src/disk.sh
|
@ -4,7 +4,7 @@ set -Eeuo pipefail
|
||||||
# Docker environment variables
|
# Docker environment variables
|
||||||
|
|
||||||
: "${DISK_IO:="native"}" # I/O Mode, can be set to 'native', 'threads' or 'io_turing'
|
: "${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_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_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.
|
: "${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"
|
DISK4_FILE="/storage4/data4"
|
||||||
|
|
||||||
if [ -z "$DISK_FMT" ]; then
|
if [ -z "$DISK_FMT" ]; then
|
||||||
if [ -f "$DISK1_FILE.img" ]; then
|
if [ -f "$DISK1_FILE.qcow2" ]; then
|
||||||
DISK_FMT="raw"
|
|
||||||
else
|
|
||||||
DISK_FMT="qcow2"
|
DISK_FMT="qcow2"
|
||||||
|
else
|
||||||
|
DISK_FMT="raw"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
DISK_EXT=$(fmt2ext "$DISK_FMT")
|
DISK_EXT=$(fmt2ext "$DISK_FMT")
|
||||||
|
|
||||||
if [ -z "$ALLOCATE" ]; then
|
if [ -z "$ALLOCATE" ]; then
|
||||||
if [[ "${DISK_FMT,,}" == "raw" ]]; then
|
ALLOCATE="N"
|
||||||
ALLOCATE="Y"
|
|
||||||
else
|
|
||||||
ALLOCATE="N"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ALLOCATE" == [Nn]* ]]; then
|
if [[ "$ALLOCATE" == [Nn]* ]]; then
|
||||||
|
|
Loading…
Reference in a new issue