Google Cloud : check disk space usage

32,962

Solution 1

You can't see it in the disk preview as Faizan said, But you could Use Google StackDriver Monitoring tool to get a nice preview of your instances status.

Solution 2

The workaround with snapshot size will work in the console.

For more precise (and quicker) detailed overview you can SSH into your instance and do:

sudo df -h 

The response you get will look similar to this:

YOURUSERNAME@YOURINSTANCENAME:~$ sudo df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       9.8G  9.3G     0 100% /
udev             10M     0   10M   0% /dev
tmpfs           743M   81M  663M  11% /run
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sdb        197G   60M  197G   1% /mnt/new_disk

Entries starting with /dev/ under 'Filesystem' are your disks.

Solution 3

I use a simple workaround for this.

Create a snapshot of your persistent disk, and look at the snapshot size:

enter image description here

Solution 4

Just install Monitoring Agents in https://console.cloud.google.com/monitoring/dashboards/resourceList/gce_instance then check the dashboard

Share:
32,962

Related videos on Youtube

Mr.Wang from Next Door
Author by

Mr.Wang from Next Door

Updated on September 18, 2022

Comments

  • Mr.Wang from Next Door
    Mr.Wang from Next Door almost 2 years

    How to check the used disk space of Google Persistent Disk without looking into each of them?

    enter image description here

    • Faizan
      Faizan about 8 years
      This feature currently is not available. As such, you can file a feature request through this link.
  • NaturalBornCamper
    NaturalBornCamper over 5 years
    Good workaround, too bad it takes so long though
  • Fitch
    Fitch about 5 years
    snapshot size is 'compressed' disk size, not real disk usage size
  • Varun Chandak
    Varun Chandak almost 5 years
    the question states without looking into each of them