From 8888f12b8b178ddb22ca8f1083cd40178407ca21 Mon Sep 17 00:00:00 2001 From: Kroese Date: Tue, 18 Apr 2023 18:36:54 +0200 Subject: [PATCH] Make preallocation configurable --- run/disk.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run/disk.sh b/run/disk.sh index 4d7e829..a8960a0 100644 --- a/run/disk.sh +++ b/run/disk.sh @@ -41,7 +41,8 @@ if [ -f "${DATA}" ]; then SPACE=$(df --output=avail -B 1 "${STORAGE}" | tail -n 1) if (( REQ > SPACE )); then - echo "ERROR: Not enough free space to resize virtual disk to ${DISK_SIZE}." && exit 84 + echo "ERROR: Not enough free space to resize virtual disk to ${DISK_SIZE}." + echo "ERROR: Specify a smaller size or disable preallocation with ALLOCATION=N." && exit 84 fi if ! fallocate -l "${DATA_SIZE}" "${DATA}"; then