File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
http/src/main/resources/init-resources Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,12 @@ for Disk in "${AllsdDisks[@]}"; do
243243done
244244DISK_DEVICE_ID=${FreesdDisks}
245245
246+ # Resize persistent disk if needed.
247+ # Must be done before trying to start the servers, otherwise it will fail to start if the disk is full.
248+ echo " Resizing persistent disk attached to runtime $GOOGLE_PROJECT / $CLUSTER_NAME if disk size changed..."
249+ resize2fs ${DISK_DEVICE_ID}
250+
251+
246252# # Only format disk is it hasn't already been formatted
247253if [ " $IS_GCE_FORMATTED " == " false" ] ; then
248254 # It's likely that the persistent disk was previously mounted on another VM and wasn't properly unmounted
@@ -626,11 +632,6 @@ RSTUDIO_USER_HOME=$RSTUDIO_USER_HOME" >> /usr/local/lib/R/etc/Renviron.site'
626632 retry 3 docker exec -d ${RSTUDIO_SERVER_NAME} /init
627633fi
628634
629- # Resize persistent disk if needed.
630- echo " Resizing persistent disk attached to runtime $GOOGLE_PROJECT / $CLUSTER_NAME if disk size changed..."
631- resize2fs ${DISK_DEVICE_ID}
632-
633-
634635# Remove any unneeded cached images to save disk space.
635636# Do this asynchronously so it doesn't hold up cluster creation
636637log ' Pruning docker images...'
You can’t perform that action at this time.
0 commit comments