easyMultiple Choice
Google ACE Practice Question: A Compute Engine VM's boot disk is nearly full…
A Compute Engine VM's boot disk is nearly full and the application is failing. You want to snapshot the disk first (for safety), then resize it online. What is the correct sequence of gcloud commands?
⚠ Common exam trap
Test-takers frequently assume a VM must be stopped before resizing a boot disk, but Google Cloud supports live resize for most disk types, making the snapshot-then-resize-then-grow sequence the correct online approach.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Snapshot the disk, resize the disk with `gcloud compute disks resize`, then grow the filesystem within the VM.
You must snapshot the disk first to ensure data safety before making changes, then resize the disk using `gcloud compute disks resize` (which works on a running VM with live resize enabled), and finally grow the filesystem inside the VM to utilize the additional space. This sequence avoids downtime and preserves a recovery point.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Stop the VM, resize the disk, take a snapshot, restart the VM.
Why it's wrong here
Stopping the instance is unnecessary because Google Cloud supports online resizing of persistent disks while the VM is running. More critically, taking the snapshot after resizing captures the already-expanded disk, so it cannot serve as a rollback point for the original full-disk state. A correct failure-safe sequence would snapshot before any resize operation, then resize, then grow the filesystem.
- ✓
Snapshot the disk, resize the disk with `gcloud compute disks resize`, then grow the filesystem within the VM.
Why this is correct
This sequence safely grows the existing boot disk without downtime. First, snapshot the disk to preserve a rollback point; then run `gcloud compute disks resize <DISK> --size=<NEW_SIZE>` — the resize can happen while the instance is running; finally, inside the VM, extend the partition if needed and grow the filesystem using `resize2fs` for ext4 or `xfs_growfs` for XFS. Only after the filesystem grows will the application see additional free space.
- ✗
Resize the disk with `gcloud compute instances set-disk-auto-delete` to automatically expand the disk.
Why it's wrong here
The `gcloud compute instances set-disk-auto-delete` command only toggles the automatic deletion flag that determines whether a disk is removed when its attached instance is deleted; it has no effect on disk capacity. Resizing requires `gcloud compute disks resize` followed by partition table and filesystem updates inside the VM. Using this command does not address the application failure caused by a full boot disk.
- ✗
Create a new larger disk, attach it as a secondary disk, and move data using rsync.
Why it's wrong here
This method fails because it requires manual data migration and does not resize the existing boot partition, which is necessary to resolve the application failure caused by the full disk. This approach serves for expanding storage capacity on a secondary data volume where you must preserve specific file permissions or symlinks during a transfer. It is used when adding entirely new block storage rather than increasing the size of an existing system disk.
Go deeper
Related to this question
Learn chapter
Cloud Data Loss Prevention (DLP) API
Key term
Compute Engine
Compute Engine is Google Cloud's Infrastructure-as-a-Service (IaaS) offering that lets you create and run virtual machines on Google's infrastructure.
Key term
Snapshot
A snapshot is a point-in-time copy of a system's data or state, used for backup, recovery, or testing without disrupting the original.
About these practice questions
Courseiva writes every ACE question from scratch — 775 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.