
Google Professional Cloud Database Engineer
Get started today
Ultimate access to all questions.
How can you expand the storage capacity of an ext4-formatted persistent disk attached to a Compute Engine VM hosting a critical production database without causing downtime?
How can you expand the storage capacity of an ext4-formatted persistent disk attached to a Compute Engine VM hosting a critical production database without causing downtime?
Explanation:
To avoid downtime while increasing the storage space for a critical production database running on a VM with an ext4-formatted persistent disk, the correct approach is to increase the size of the persistent disk via the Google Cloud Console and then use the resize2fs command to extend the filesystem to utilize the additional space. This method does not require restarting the database service or moving files to a new disk, thus minimizing potential disruptions. Option A is correct because it directly addresses the need for more space without downtime. Option B is incorrect because while increasing the disk size is a step in the right direction, using fdisk to verify the new space is not sufficient to make the additional space available to the filesystem. Option C involves unnecessary steps like creating a snapshot and restarting the database service, which could lead to downtime. Option D suggests adding a new disk and moving files, which is more complex and could also lead to downtime or require significant database reconfiguration.