Have you ever had a linux server or desktop which all of a sudden couldn’t create a file – running “df -h” shows you your disk partitions aren’t full?
You’ve logged in as root to check – and yup you still can’t write any files – even a “touch test.txt” fails with a message saying can’t write file – disk or partition full?
You could be out of inodes! Linux stores file address information in inodes – and if you have a lot of very small files (or quite an oddly setup filesystem) you could be out of inodes…
How do you find out though?
just type in
“df -i” – same as the normal diskfree space command except it tells you inodes, if you have none left (or very few) you may not be able to create a new file (or edit it if your editor creates temporary lockfiles).
In a future blog I’ll go through how to resize the number of inodes available (primarily aimed at your temporary dev/shm space as this can suffer from the inode problem if you allocate more to it from a small size – the number of inodes is not increased so you can run out).