Only allow volume sizing after creation.
This commit is contained in:
parent
6f1f2df6dd
commit
aaab6f3515
@ -60,25 +60,22 @@ if ! incus list --format csv | grep -q "$INCUS_VM_NAME"; then
|
|||||||
DOCKER_VOLUME_NAME="$VIRTUAL_MACHINE-docker"
|
DOCKER_VOLUME_NAME="$VIRTUAL_MACHINE-docker"
|
||||||
if ! incus storage volume list ss-base | grep -q "$DOCKER_VOLUME_NAME"; then
|
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 create ss-base "$DOCKER_VOLUME_NAME" --type=block
|
||||||
|
incus storage volume set ss-base "$DOCKER_VOLUME_NAME" size="${DOCKER_DISK_SIZE_GB}GB"
|
||||||
fi
|
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"
|
SSDATA_VOLUME_NAME="$VIRTUAL_MACHINE-ss-data"
|
||||||
if ! incus storage volume list ss-base | grep -q "$SSDATA_VOLUME_NAME"; then
|
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 create ss-base "$SSDATA_VOLUME_NAME" --type=filesystem
|
||||||
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"
|
incus storage volume set ss-base "$SSDATA_VOLUME_NAME" size="${SSDATA_DISK_SIZE_GB}GB"
|
||||||
|
fi
|
||||||
|
|
||||||
BACKUP_VOLUME_NAME="$VIRTUAL_MACHINE-backup"
|
BACKUP_VOLUME_NAME="$VIRTUAL_MACHINE-backup"
|
||||||
if ! incus storage volume list ss-base | grep -q "$BACKUP_VOLUME_NAME"; then
|
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 create ss-base "$BACKUP_VOLUME_NAME" --type=filesystem
|
||||||
fi
|
|
||||||
|
|
||||||
incus storage volume set ss-base "$BACKUP_VOLUME_NAME" size="${BACKUP_DISK_SIZE_GB}GB"
|
incus storage volume set ss-base "$BACKUP_VOLUME_NAME" size="${BACKUP_DISK_SIZE_GB}GB"
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user