Topic 1 Question 14
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?
In the Cloud Platform Console, increase the size of the persistent disk and use the resize2fs command in Linux.
Shut down the virtual machine, use the Cloud Platform Console to increase the persistent disk size, then restart the virtual machine
In the Cloud Platform Console, increase the size of the persistent disk and verify the new space is ready to use with the fdisk command in Linux
In the Cloud Platform Console, create a new persistent disk attached to the virtual machine, format and mount it, and configure the database service to move the files to the new disk
In the Cloud Platform Console, create a snapshot of the persistent disk restore the snapshot to a new larger disk, unmount the old disk, mount the new disk and restart the database service
解説
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. Reference: https://cloud.google.com/compute/docs/disks/add-persistent-disk
ユーザの投票
コメント(17)
A is the correct answer because the question says "with minimum downtime"
👍 25TosO2019/11/22least amount of downtime? is the sugar word. You miss that you miss all. Everything there is correct but I believe its only A that fits that requirement
👍 13passnow2019/12/17The resize2fs command is used to enlarge or shrink an ext2/3/4 file system on a device. You can enlarge a mounted file system, but you must unmount the file system before you can shrink it. You can specify the desired size of the file system in order to either enlarge or shrink it.
👍 4raaj_p2022/07/28
シャッフルモード