An organization is running a stateful workload on Compute Engine with a single persistent disk. They want to migrate to a regional persistent disk for higher availability. The disk is 500 GB and currently 80% full. They need zero downtime during the migration. What is the recommended approach?
Trap 1: Attach a new regional disk to the instance and use RAID 1 mirroring.
Regional disks cannot be attached to a zonal instance; the instance must be regional as well.
Trap 2: Use rsync to copy data to a new regional disk while the instance is…
rsync requires consistent state; for an active disk, this could cause data inconsistency and downtime.
Trap 3: Use gcloud compute disks resize to change the disk type to regional.
Disk resize does not change disk type from zonal to regional.
- A
Attach a new regional disk to the instance and use RAID 1 mirroring.
Why it fails: Regional disks cannot be attached to a zonal instance; the instance must be regional as well.
- B
Create a snapshot of the disk, then create a new regional persistent disk from that snapshot, and attach it to the instance.
This is the recommended migration path; snapshot creation is the only downtime window.
- C
Use rsync to copy data to a new regional disk while the instance is running.
Why it fails: rsync requires consistent state; for an active disk, this could cause data inconsistency and downtime.
- D
Use gcloud compute disks resize to change the disk type to regional.
Why it fails: Disk resize does not change disk type from zonal to regional.