19

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

enter image description here

  • This feature currently is not available. As such, you can file a feature request through [this link](https://code.google.com/p/google-compute-engine/issues/list). – Faizan Apr 12 '16 at 16:33

5 Answers5

13

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.

8

I use a simple workaround for this.

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

enter image description here

MadHatter
  • 79,770
  • 20
  • 184
  • 232
5

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.

nelasx
  • 161
  • 1
  • 9
1

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

0

In your terminal use this command to detect files size and which directory is more bulky:

ncdu /