Persistent Disk

I have created a Persistent Disk of 20GB and mounted to my VM instance. i have below queries -

  1. how to check utilization of this disk in Cloud Console.

  2. if i delete the VM Instance on which this disk is mounted, how can i mount that disk onto another VM Instance.

  3. how can i check billing of this disk

Hi,

  1. I don’t think so that there is any gcloud shell command to check disk utilization.
  2. If you removed VM where disk had “deletion rule” set to Keep disk, you can mount this disk by choose ATTACH EXISTING DISK in VM option
  3. You can go to billing account → Choose Cost table → Filter by projects

Great answer, to add you can view disk metrics via Cloud Monitoring, by default you’d only get hypervisor metrics, but if you want to see metrics inside the OS - like disk utilization, then you’d need the Ops Agent, see:

https://cloud.google.com/stackdriver/docs/solutions/agents/ops-agent

and

https://cloud.google.com/monitoring/api/metrics_opsagent#agent-disk

You could view this data programatically via the Monitoring API:

https://cloud.google.com/monitoring/api/v3