Skip to content

Commit

Permalink
fix: Diskspace warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Dec 9, 2023
1 parent 8fa9003 commit ac63629
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/disk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ resizeDisk() {

if (( REQ > SPACE )); then
error "Not enough free space to resize ${DISK_DESC} to ${DISK_SPACE} in ${DIR}, it has only ${SPACE_GB} GB available.."
error "Specify a smaller ${DISK_DESC^^}_SIZE or switch to a growable disk with DISK_FMT=qcow2." && exit 84
error "Please specify a smaller ${DISK_DESC^^}_SIZE or disable preallocation by setting DISK_FMT to \"qcow2\"." && exit 84
fi

# Resize file by allocating more space
Expand Down Expand Up @@ -176,8 +176,8 @@ createDisk() {
SPACE_GB=$(( (SPACE + 1073741823)/1073741824 ))

if (( DATA_SIZE > SPACE )); then
error "Not enough free space to create ${DISK_DESC} of ${DISK_SPACE} in ${DIR}, it has only ${SPACE_GB} GB available.."
error "Specify a smaller ${DISK_DESC^^}_SIZE or switch to a growable disk with DISK_FMT=qcow2." && exit 86
error "Not enough free space to create a ${DISK_DESC} of ${DISK_SPACE} in ${DIR}, it has only ${SPACE_GB} GB available.."
error "Please specify a smaller ${DISK_DESC^^}_SIZE or disable preallocation by setting DISK_FMT to \"qcow2\"." && exit 86
fi

# Create an empty file
Expand Down

0 comments on commit ac63629

Please sign in to comment.