1
votes

I took a snapshot of a 50GB volume (non-boot) which is attached to an instance. The snapshot was successful.

I shut the instance and tried taking another snapshot of the same volume. This time the command hung. gcloud status reflects "CREATING" for this attempt. It is hours since I started the snapshot command. I tried the same using google developers console. The behaviour remains the same.

I restarted the instance and the status of the snapshot changes to "READY" within seconds.

It seems that snapshots should be taken if the volume is attached to a running instance. Otherwise the command is queued and executed when the volume/instance is live. Is this expected behaviour?

1

1 Answers

1
votes

I replicated your issue and indeed the snapshot process halts when the instance is shut down. You may have also noticed that now the Shutdown/Start feature has been introduced - it was not available before.

I believe this is due to how snapshots are being handled on the platform. Your first snapshot creates a full copy of the disk, while the second one is differential - the differential one will fail or stay in pending as it cannot query the source disk while the instance is down to check what has been changed . You can check this for further info.

Dettaching the disk from the instance and then creating a snapshot works, so that could be a workaround for you.

Hope this helps