From aaab6f3515e02363774c0b9305b3ea97305b3d84 Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Thu, 14 Dec 2023 19:54:09 -0500 Subject: [PATCH] Only allow volume sizing after creation. --- deployment/deploy_vm.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/deployment/deploy_vm.sh b/deployment/deploy_vm.sh index c69d2c4..74592de 100755 --- a/deployment/deploy_vm.sh +++ b/deployment/deploy_vm.sh @@ -60,26 +60,23 @@ if ! incus list --format csv | grep -q "$INCUS_VM_NAME"; then DOCKER_VOLUME_NAME="$VIRTUAL_MACHINE-docker" if ! incus storage volume list ss-base | grep -q "$DOCKER_VOLUME_NAME"; then incus storage volume create ss-base "$DOCKER_VOLUME_NAME" --type=block + incus storage volume set ss-base "$DOCKER_VOLUME_NAME" size="${DOCKER_DISK_SIZE_GB}GB" fi - # TODO ensure we are only GROWING the volume--never shrinking - incus storage volume set ss-base "$DOCKER_VOLUME_NAME" size="${DOCKER_DISK_SIZE_GB}GB" + SSDATA_VOLUME_NAME="$VIRTUAL_MACHINE-ss-data" if ! incus storage volume list ss-base | grep -q "$SSDATA_VOLUME_NAME"; then incus storage volume create ss-base "$SSDATA_VOLUME_NAME" --type=filesystem + incus storage volume set ss-base "$SSDATA_VOLUME_NAME" size="${SSDATA_DISK_SIZE_GB}GB" fi - # TODO ensure we are only GROWING the volume--never shrinking per zfs volume docs. - incus storage volume set ss-base "$SSDATA_VOLUME_NAME" size="${SSDATA_DISK_SIZE_GB}GB" - BACKUP_VOLUME_NAME="$VIRTUAL_MACHINE-backup" if ! incus storage volume list ss-base | grep -q "$BACKUP_VOLUME_NAME"; then incus storage volume create ss-base "$BACKUP_VOLUME_NAME" --type=filesystem + incus storage volume set ss-base "$BACKUP_VOLUME_NAME" size="${BACKUP_DISK_SIZE_GB}GB" fi - incus storage volume set ss-base "$BACKUP_VOLUME_NAME" size="${BACKUP_DISK_SIZE_GB}GB" - fi