AdelaN
AdelaN

Reputation: 3536

How can I check the remaining size of a persistent disk on Google Cloud? And where can I find the code in the instances?

I created a project on Google Cloud a long time ago and I am currently having some problems with it. The only result I seem to be receiving is Internal Server Error.

I tried connecting to the compute instance through ssh, but it does not help much because :

This behaviour started today, all of a sudden, and I haven't touched the project in almost 2 years, so I am completely lost.

Thanks.

Upvotes: 4

Views: 1075

Answers (1)

AdelaN
AdelaN

Reputation: 3536

How can I check the remaining size of a persistent disk on Google Cloud?

For this part, I finally found a way to do it today. I'll describe it all here with print screens so that it is easy for anyone.

  1. First, go to the Google Console, Disks page : https://console.cloud.google.com/compute/disks

  2. Identify the persistent disk you are interested in. In my case, this was called pg-data-disk. Click on the respective VM instance; this will be on the column "In use by", link in the image below : enter image description here

  3. This will open a SSH connection to the VM instance to which your persistent disk is attached. In the SSH window, run the following command : sudo lsblk. The result should be like in the image below : enter image description here

  4. You will thus discover the DISK ID (in my case this was sdb), so you can now run : sudo df -h <YOUR DISK ID>. This command will give you the exact disk usage, as shown below : enter image description here

As for the other part of the question, I was actually using Docker containers which were orchestrated by Kubernetes. And I totally forgot about it.

Will upgrade my RAM and get back to work.

Thank you all.

Upvotes: 2

Related Questions