Medium1 markMultiple Choice

GCP ACE · Question 32 · Domain 4.1: Managing Compute Engine resources

A Compute Engine instance is running out of disk space. You have increased the size of the persistent disk in the Google Cloud Console. What is the next step you MUST perform to make the new space usable by the OS?

Answer options:

A.

Restart the instance from the Cloud Console.

B.

SSH into the instance and resize the file system using OS-level commands (e.g., resize2fs).

C.

Run the gcloud compute disks resize command.

D.

Nothing. The OS automatically detects and uses the new space immediately.

How to approach this question

Understand the difference between resizing the block storage infrastructure and resizing the guest OS file system.

Full Answer

B.SSH into the instance and resize the file system using OS-level commands (e.g., resize2fs).✓ Correct
Resizing a persistent disk in the Cloud Console or via gcloud only increases the size of the underlying block device. The guest operating system's partition and file system remain the original size. You must log into the instance and use tools like `growpart` and `resize2fs` (for ext4) or `xfs_growfs` to expand the file system.

Common mistakes

Assuming GCP automatically modifies the guest OS file system.

Practice the full GCP Associate Cloud Engineer Practice Exam 1

50 questions · hints · full answers · grading

More questions from this exam