4

I am experiencing some weird issue lately. I am using this machine as a web server. When I try to write a file in a directory it says there is no more space. I deleted some files and it worked for a little while. After few minutes I get the problem again:

root@web1:/home# mkdir test
mkdir: cannot create directory ‘test’: No space left on device
root@web1:/home# df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/web1-root   43G  4.5G   37G  11% /
none                   4.0K     0  4.0K   0% /sys/fs/cgroup
udev                   3.9G  4.0K  3.9G   1% /dev
tmpfs                  798M  828K  798M   1% /run
none                   5.0M     0  5.0M   0% /run/lock
none                   3.9G     0  3.9G   0% /run/shm
none                   100M     0  100M   0% /run/user
/dev/sda1              228M   91M  126M  42% /boot
/dev/sdb1              197G   75G  113G  40% /home

df -i reports a partition with 100% usage:

root@web1:/home# df -i | grep 100%
/dev/sdb1 13107200 13107200 0 100% /home
  • 2
    Please add the output of df -i – heemayl Feb 26 '15 at 18:09
  • You ran out of inodes. – Rinzwind Feb 26 '15 at 18:10
  • 1
    df -i /dev/sdb1 13107200 13107200 0 100% /home yes true,, hwo to solve? :S – BuBy Feb 26 '15 at 18:20
1

I see the output shows high inode usage this seems to be the best answer thread out there. It is very extensive.

https://unix.stackexchange.com/questions/117093/find-where-inodes-are-being-used

  • Where does the out "show high inode usage"? How did you figure that out? – John Red Feb 6 '17 at 6:16
  • @JohnRed High inode usage are posted in the comments. – WinEunuuchs2Unix Jan 16 '18 at 3:11
2

Like @Rinzwind and @heemayl suugested i ran out of inodes searching on google i foudn the answer ... http://www.ivankuznetsov.com/2010/02/no-space-left-on-device-running-out-of-inodes.html

this is the solution

check available Inodes

$ df -i

find which directory is having more inodes

$ for i in /*; do echo $i; find $i |wc -l; done

recursivly repeat the search until you find the problem

$ for i in /DIRWITHHIGHINODES/*; do echo $i; find $i |wc -l; done

once you found the suspect – just delete the files

$ sudo rm -rf /home/bad_user/directory_with_lots_of_empty_files

You’re done. Check the results with df -i command again. You should see something like this:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.