No more space available even if there is a lot
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
Solution 1:
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:
Solution 2:
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