An Associate Cloud Engineer needs to restore a corrupted secondary data disk attached to a standalone Compute Engine virtual machine named `prod-app-vm`. The engineer has an existing disk snapshot named `data-disk-snap-2026`. What is the correct sequence of steps to safely replace the corrupted disk with a restored disk from the snapshot?
- 1Detach the corrupted persistent disk from `prod-app-vm` using `gcloud compute instances detach-disk`.
- 2Create a new persistent disk named `data-disk-restored` from the snapshot using `gcloud compute disks create --source-snapshot=data-disk-snap-2026`.
- 3Attach the new persistent disk `data-disk-restored` to `prod-app-vm` using `gcloud compute instances attach-disk`.
- 4Connect to `prod-app-vm` via SSH to mount the restored persistent disk to the application file system directory.
Cevap
The correct operational sequence is: 1) Detach the corrupted persistent disk from the VM, 2) Create a new persistent disk from the specified snapshot, 3) Attach the newly created disk to the VM, and 4) Connect via SSH to mount the new disk inside the guest operating system.
Restoring data from a Compute Engine persistent disk snapshot requires first detaching the broken disk, creating a new persistent disk from the snapshot using the `--source-snapshot` flag, attaching that new persistent disk to the VM instance, and finally mounting the disk partition inside the guest OS via SSH.
Adım Adım Çözüm
Anahtar Kavram
Compute Engine Persistent Disk Snapshot Restoration