A production database virtual machine on Google Compute Engine has an ext4-formatted persistent disk for data files.
The database is about to run out of storage space.
How can you remediate the problem with the least amount of downtime?
Click on the arrows to vote for the correct answer
A. B. C. D. E.A.
On Linux instances, connect to your instance and manually resize your partitions and file systems to use the additional disk space that you added.
Extend the file system on the disk or the partition to use the added space.
If you grew a partition on your disk, specify the partition.
If your disk does not have a partition table, specify only the disk ID.
sudo resize2fs /dev/[DISK_ID][PARTITION_NUMBER] where [DISK_ID] is the device name and [PARTITION_NUMBER] is the partition number for the device where you are resizing the file system.
https://cloud.google.com/compute/docs/disks/add-persistent-diskThe correct answer for this scenario would be option A: In the Cloud Platform Console, increase the size of the persistent disk and use the resize2fs command in Linux.
Explanation: When a production database virtual machine on Google Compute Engine runs out of storage space, the quickest and easiest way to remediate the problem is by increasing the size of the persistent disk. Ext4 is a file system that can be resized while still mounted, so it's possible to resize the partition while the virtual machine is still running.
Option A is the correct answer because it allows for the least amount of downtime. To implement this solution, you would follow these steps:
Option B involves shutting down the virtual machine, increasing the size of the persistent disk and then restarting the virtual machine. This solution would cause downtime for the database service and is not the best option.
Option C involves increasing the size of the persistent disk and verifying the new space with the fdisk command in Linux. While this solution would work, it's more complex than option A and requires downtime to be taken while checking and configuring the fdisk partitions.
Option D involves creating a new persistent disk, formatting and mounting it, and then configuring the database service to move the files to the new disk. This solution would require downtime and involves more steps than option A.
Option E involves creating a snapshot of the persistent disk and restoring it to a new, larger disk. This solution also requires downtime and involves more steps than option A. Additionally, it's worth noting that creating a snapshot is a good way to back up data, but it's not a reliable way to resize disks because it can cause downtime and be prone to data loss.