Skip to content

How to visualize used disk space in your storage pool

gboudreau edited this page Jan 13, 2013 · 15 revisions

Requirements

If you are using PHP 5.3 or earlier: You will need Apache and PHP installed on your Greyhole server to use this script.
With PHP 5.4+, you need nothing.

Install

  1. 0.9.29 or later: No need to install anything. The disk-usage script is now included in all packages.
    Before 0.9.29: mkdir -p /usr/share/greyhole/web-app/ && curl -o /usr/share/greyhole/web-app/index.php https://gist.github.com/raw/4173898/543c3c4fa5f7afe852ee61b72fcbcdbc5ec8369b/gh-du.php
  2. Make it available through HTTP. For example, you could edit your Apache config to alias /usr/share/greyhole/web-app/index.php.

Then simply access the script using your web browser, and you should see a nice visual representation of the disk space used by your files.

If you're using PHP 5.4+, you don't even need a web server. Just start the PHP built-in server, and specify the path to the gh-du.php script: php -S 0.0.0.0:8012 /usr/share/greyhole/web-app/index.php
Access it at http://your_server_ip_address:8012/

Note that all file copies are counted, so if your Videos share shows as 2TB, and you have num_copies=2 for that share, it means you have 1TB of Videos files x 2 copies = 2TB.

Screenshot: Screenshot