Kakarot
Kakarot

Reputation: 33

Stop a VM instance in GCP with local SSD attached to it

According to the documentation - https://cloud.google.com/compute/docs/disks/#localssds - it is not possible to stop and instance that has a local SSD. It merely acts as a cache memory.

Is it possible to get a local SSD for an instance which is persistent and allows us to stop the instance?

Also, are local SSDs and persistent SSDs detected as different hardware types by an instance?

Upvotes: 3

Views: 2982

Answers (2)

Augusto Jara
Augusto Jara

Reputation: 121

WARNING stopping your VM will delete all data from the local disk

You can stop the VM from ssh with the commands

sudo shutdown -h now or sudo poweroff

This is the correct way to stop the VM if it has a local ssd attached.

https://cloud.google.com/compute/docs/instances/stop-start-instance

Upvotes: 1

David Mendoza
David Mendoza

Reputation: 66

At this moment there's no way to setup a GCE instance with a local SSD and be able to stop it, as is mentioned in the documentation this kind of storage is used to store caches and as processing space.

Now, about the hardware differences between a local SSD and a persistent SSD. Since the point of view of the GCE instance they are the same, I mean the instance detects the two of them just as another mount; however, the technology that behind each of them it's completely different.

A local SSD, just as the documentation states, is physically attached to the server where is hosted the instance while a persistent SSD it's just a Log-Structured Volume, in other words it's not a physical hard drive.

There's a complete explanation about how persistent disks works on Google Cloud at [1].

[1] https://www.youtube.com/watch?v=jA_A-OXsIss

Upvotes: 2

Related Questions