1

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.

5
  • Please edit your question and add the df -h output..
    – heemayl
    Jul 14, 2015 at 10:12
  • Restart the daemons. Probably the files are still open and the free space is not actually released.
    – zeridon
    Jul 14, 2015 at 10:47
  • I already restarted the computer.
    – reuabreliz
    Jul 14, 2015 at 10:52
  • Can you add the output of sudo parted --list??? Because 1GB for Ubuntu seems like very little...
    – Fabby
    Jul 14, 2015 at 11:35
  • For what it's worth, -i only shows you the INodes usage - that doesn't necessarily reflect actual disk usage, as df -h does.
    – Thomas Ward
    Jul 14, 2015 at 12:01

1 Answer 1

1

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%.

1
  • I executed the command (sudo tune2fs -m 2 /dev/sda1). Second I had to stop the mysql service, before login into the xserver with the console. Now the xserver works. df -h shows 98%
    – reuabreliz
    Jul 14, 2015 at 12:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .