Linux – Missing disk space on linux

disk-spacelinux

I have an Ubuntu box with 30GB of disk space that is almost filled up:

df -h

Filesystem      Size  Used Avail Use% Mounted on 
/dev/vda1        30G  28G     0  100% /

But when I check the size of all the root folders with

sudo du -sh /foldername

I only get a total of 17.2GB

lib/        6.7G
usr/        4.8G
home/       2.0G
var/        1.3G
boot/       1.1G
swapfile    1.1G
root/       125M
sbin/       12M
bin/        11M
etc/        8M
run/        420K
lost+found/ 16K
media/      8.8K
dev/        4K
lib64/      4K
mnt/        4K
srv/        4K
opt/        4K
tmp/        4K
sys/        0
proc/       0

Does anything here look suspicious? About 11 gigabytes are unaccounted for. Where could the missing 11G be?

Best Answer

Following advice from the Server Fault community, I checked my Block Size:

stat --printf='%s' -f .

which was "normal" at 4096

Then I checked how many deleted files were still held open by processes:

lsof | grep -c DEL

which reported 143 files which might account for all the lost space, but I think it is unlikely

Then I rebooted my box and voila! All my disk space was back:

df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            487M  4.0K  487M   1% /dev
tmpfs           100M  388K  100M   1% /run
/dev/vda1        30G   17G   12G  61% /

Reflection

The fact that I regained so much of my disk space after rebooting means that the volume's block size was not the main culprit. So, still not 100% sure what caused the discrepancy, but happy to have my space back!

Related Question