How to find available space on mounted block storage volume?

Posted January 21, 2018 10.9k views
Ubuntu 16.04Block Storage

I have a droplet with 30GB hard drive, and 100GB additional block storage volume. That volume is mounted at /mnt/p4-shareddepot, and accessable there for read and write. How do I get the available space on this drive? As below, I run the df command of that location but it still just returns the result for the original 30GB drive. Any way to check this?

┌──[Mon Jan 22 11:50:38 **********@************ : /mnt/p4-shareddepot]
└─> $ df -h /mnt/p4-shareddepot
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        30G  8.2G   21G  28% /


edited by asb

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Run df -h without any other arguments. That should output space usage details for all available filesystems.

/mnt/p4-shareddepot is showing your Droplet’s local storage filesystem because the directory itself is technically part of it, not the block storage volume. Every file or directory that is inside of it, however, is located on the block storage volume. So, if you run df -h /mnt/p4-shareddepot/file, you should see the block storage volume’s space usage.

Hi Kamaln

Unfortunately this has not worked for me, I still can only see the droplet’s filesystem:

┌──[Thu Jan 25 12:24:57 **********@************ : /home]
└─> $ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            488M     0  488M   0% /dev
tmpfs           100M  3.1M   97M   4% /run
/dev/vda1        30G  8.8G   21G  31% /
tmpfs           497M     0  497M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           497M     0  497M   0% /sys/fs/cgroup
tmpfs           100M     0  100M   0% /run/user/1000

┌──[Thu Jan 25 12:25:36 **********@************ : /mnt/p4-shareddepot/test]
└─> $ df -h /mnt/p4-shareddepot/test
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        30G  8.8G   21G  31% /