Ubuntu: df -h shows 100% but actually free disc space


My hard disc was full, and ubuntu couldn't write anything to the disc anymore. I removed some bigger files.

Now there are 37GB free space on the hard disc but df -h shows 100% and I cannot log in to the xserver, only to the console.

df -h

Filesystem Size Used Avail Use % Mounted on  /dev/sda1  913G 876G 0     100%  /  none       4K   0    4K    0%    /sys/fs/cgroup  udev       2G   4,0K 2G    1%    /dev  tmpfs      404M 1,4M 403M  1%    /run  none       5M   0    5M    0%    /run/lock  none       2G   76K  2G    1%    /run/shm  none       100M 8K   100M  1%    /run/user  overflow   1M   8K   1016K 1%    /tmp  

df -i

Filesystem Inodes   IUsed  IFree    IUse % Mounted on  /dev/sda1  60792832 663050 60129782 2%     /  none       213061   2      213059   1%     /sys/fs/cgroup  udev       208261   492    207769   1%     /dev  tmpfs      213061   552    212509   1%     /run  none       213061   3      213058   1%     /run/lock  none       213061   3      213058   1%     /run/shm  none       213061   8      213053   1%     /run/user  overflow   213061   6      213055   1%     /tmp  

I also checked if I have free inodes, which I have. There are only about 2% used. Waiting for reply.


It is common for 5% of the capacity of a ext2/3/4 partition to be reserved as free space for the sole use of root, so that in the event of a partition becoming full, important files can still be written to disk, and commands can still be run to free up disk space.

Indeed for /dev/sda1: 876G used / 913G size = 0.959, which means there is only 4.1% free, so the partition still appears to be full.

You can reduce the percentage of reserved space on a ext2/3/4 partition with the command:

sudo tune2fs -m 2 /dev/sda1  

which would, for example, reserve 2% of the free space instead of 5%.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »