1

sudo df -h

udev            982M     0  982M   0% /dev
tmpfs           200M  5.3M  195M   3% /run
/dev/vda2        40G  5.2G   33G  14% /
tmpfs          1000M     0 1000M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs          1000M     0 1000M   0% /sys/fs/cgroup
tmpfs           200M     0  200M   0% /run/user/0

sudo df -i

Filesystem      Inodes   IUsed  IFree IUse% Mounted on
udev            251350     413 250937    1% /dev
tmpfs           255984     937 255047    1% /run
/dev/vda2      2595840 2595840      0  100% /
tmpfs           255984       1 255983    1% /dev/shm
tmpfs           255984       6 255978    1% /run/lock
tmpfs           255984      16 255968    1% /sys/fs/cgroup
tmpfs           255984       4 255980    1% /run/user/0

I have no clue what's wrong here, why im getting no space left ?

Raffa
  • 32,237
  • You have over 2 and a half million files on the root volume, and it's run out of space in the catalog to keep track of any more. Depending on the computer's usage, that might indicate somethings running loose creating lots of small files and you need to track it down and kill/fix it; or it might be normal (i.e. you just legitimately have a lot of files) and you need to reformat the volume to allocate more space for inodes, so it can keep track of all the files. – Gordon Davisson Apr 10 '20 at 20:59

1 Answers1

2

You are not out of space. You still have 33G free space but zero free inodes. You have used all available inodes on your root partition / as shown in the output of df -i.

Filesystem      Inodes   IUsed  IFree IUse% Mounted on    
/dev/vda2      2595840 2595840      0  100% /

With zero free inodes, no new files can be created and some system or applications functionality will be limited.

An inode (index node) is a data structure found in many Unix/Linux file systems. Each inode stores all the information about a file system object (file, device node, socket, pipe, etc.), except data content and file name.


To fix it:

Find which directories use the most inodes by running this command:

sudo du --inodes /

Then delete some files that you do not need or move them to a USB drive.

This will free some inodes and make it possible to utilize the available free space.


Notice:

To output only directories with a certain minimum number of inodes, use the command like so:

sudo du --inodes / | grep -P "^\d{4,}"

This will only output directories with four digits number of inodes and more so 1000 and more will be printed.

You can change 4to for example 5 to print only directories with 10000 inodes and more and so on.

Raffa
  • 32,237