Unverified Commit 8d1c6b8b authored by Kroese's avatar Kroese Committed by GitHub
Browse files

Make preallocation configurable

parent 22e2f763
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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