Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Google Compute/Cloud Server to SSD Persistent Disk

Tags:

I have a live production website running on a standard persistent disk.

How do I safely upgrade this to an SSD disk?

Is there a simple way to do it using the dashboard and not console commands?

Just to be clear, it's fine to take the instance down for 10 minutes or so.

Will this work?

  1. Snapshot Instance
  2. Clone Instance (using snapshot - create SSD drive)
  3. Move over static IP to clone.
  4. Check everything is working and eventually delete original instance
like image 367
Amy Neville Avatar asked Jan 25 '16 14:01

Amy Neville


2 Answers

The process for changing boot disk type of a Google Cloud VM is as follows:

  1. (Optional) Flush disk buffers sudo sync.
  2. Stop your instance
  3. Take a snapshot of existing disk
  4. Create a new persistent disk based on the snapshot. From the Type dropdown list, select "SSD persistent disk".
  5. Detach old boot disk & attach new SSD boot disk

For more details, visit docs

Note: there is NO NEED to delete your VM

like image 99
Pritesh Mhatre Avatar answered Sep 28 '22 03:09

Pritesh Mhatre


OP has provided the steps in the question, posting an answer for users still looking for a solution:

  1. Create snapshot of the persistent disk.
  2. Create SSD disk from the snapshot.
  3. At this point you have two choices:
    1. Create a new instance with the SSD disk as a boot disk, unassign the static IP from old instance and attach it to the new instance. Once done delete the old instance. This will have has less or almost no downtime.
    2. Delete the old instance, create a new instance with SSD and assign the static IP. This will reduce the cost but will have downtime.
like image 41
Faizan Avatar answered Sep 28 '22 03:09

Faizan