Hi, my Linux knowledge is limited, hope you can help me. My Ubuntu server is running into the following error regarding disk usage: “Deploy failed: {“code”:“ENOSPC”,“message”:“ENOSPC: no space left on device, open ‘/home/nred/.node-red/flows.json.$$$’”}”
After some troubleshooting, it seems this is related to having 100% Inodes usage. (See below)
I found the following post regarding how to find Inodes but i run into issues when following the steps. https://www.digitalocean.com/community/questions/best-way-to-clear-inodes
Using the command: “for i in /*; do echo $i; find $i |wc -l; done” I was able to narrow it down to /home using 3081197 Inodes.
After I followed the trail to: “for i in /home/*; do echo $i; find $i |wc -l; done” Which in turns gave me /home/nred using 3081196 Inodes which is fine so far.
Onto next step using “for i in /home/nred/*; do echo $i; find $i |wc -l; done” It only returns 4 files and 1 folder using 6307 Inodes. (See below)
I am kind of lost at that point. Am I missing something?
Hope you can guide me to a fix.
Thank you. Regards.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there,
Based on the output that you’ve shared it looks like that all of the inodes are used by the
/home/nred/
directory itself.You can do a quick count to verify if this is the case:
If this is not the case, check for hidden files:
I personally prefer the
find
command instead of doing this with a for loop:Once you identify the directories with high inode usage, you can look for unnecessary files to delete. Common culprits include:
If you identify a particular type of file that consumes a lot of inodes and is not necessary (e.g., cache files), you can clear it up with the following command which will delete files that are older than 30 days:
Let me know how it goes!
Best,
Bobby
Heya,
If the problem persist and it’s not related only to the php session files, you can expand the search and check the disk space usage in other directories as well.
You can check which folders are using the most space on the Droplet by using the disk utilization command, du:
Check our tutorial on How to fix disk space issues here:
https://docs.digitalocean.com/support/how-do-i-fix-disk-space-issues-on-my-droplet/
There is also an
ncurses
interface fordu
, appropriately calledncdu
, that you can install:This will graphically represent your disk usage:
You can step through the filesystem by using the up and down arrows and pressing Enter on any directory entry.
Hope that this helps!
Heya @19287c7d001a4449b78784e124069a,
It does seem like the issue comes from
/home/nred/
. Usually what fills up the inodes is actual files like a session or something similar that get’s generated automatically by something.As for finding the Inodes, can you try using find, it suits the case a lot better. Something like the following should do the trick