To avoid running out of disk space, you can increase the size of a workstation's persistent directories without recreating the workstation.
Before you begin
Before you resize a workstation's persistent directories, stop the workstation.
Resize persistent directories
Use the following command to resize your persistent directory:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
-d '{"persistentDirectories":[{"mountPath": "/home","sizeGb": TARGET_SIZE_GB}]}' \
"https://workstations.googleapis.com/v1beta/projects/PROJECT_ID/locations/REGION/workstationClusters/CLUSTER_NAME/workstationConfigs/CONFIG_NAME/workstations/WORKSTATION_NAME?update_mask=persistent_directories&allow_missing=true"
Replace the following:
TARGET_SIZE_GB: the new size, in GB, for the persistent directory. The value must be larger than the current size.PROJECT_ID: the project that contains the workstation.REGION: the region where the workstation resides.CLUSTER_NAME: the name of the workstation cluster.CONFIG_NAME: the name of the workstation configuration.WORKSTATION_NAME: the name of the workstation.
A successful update operation increases the size of the underlying persistent
disk. However, the workstation's file system is expanded to match the new disk
size only when the workstation is next started. You can verify that the storage
capacity has been updated by running a command like df -h or lsblk inside
your workstation terminal after starting it.
Every resize operation automatically generates a snapshot of the underlying persistent disk. This snapshot is created in case the resize operation fails or if you need to roll back your changes. The snapshot is automatically deleted after two weeks. Standard snapshot pricing applies.