Problem with inodes

Status
Not open for further replies.

theengli

Member
Messages
104
Reaction score
1
Points
18
Hello,
let me tell you bit of a background first. A couple of years ago I noticed that I was running out of inodes. First time it turned out that some mail folder somehow invisible to me was full. When I posted a thread, the administrator cleaned it up, so the number of the inodes left increased.
Last year I cleaned up my website: deleted old user accounts, some parts of the courses etc. After that the number of 'free' inodes increased significantly although previously I'd been running out of them again.
Finally, this year (yesterday) I did the same type of cleaning. I even deleted several old courses altogether. But instead of increasing the number of the inodes left suddenly dicreased, and now I'm nearly out of them. I don't know how that happened, as I did virtually the same as the previous year but with the opposite result.
Can anyone look into that, please, and maybe tell me what I could do to sort out the problem?
 

theengli

Member
Messages
104
Reaction score
1
Points
18
Oh, BTW. Yesterday when I was trying to delete 1 course, I got a 500 error and a message to contact my hosting administrator. I tried to delete it 2 or 3 times, but to no avail. Now I think perhaps it has something do with my indode problem?
 

theengli

Member
Messages
104
Reaction score
1
Points
18
It's crazy. I keep deleting things from the website and the number of the inodes taken up keeps growing. What's going on? Please, does anyone know what I could do?
 

essellar

Community Advocate
Community Support
Messages
3,295
Reaction score
227
Points
63
An inode is an entry in the filesystem, more or less. Files (including emails), folders, symlinks (and a few other bits and bobs) are all inodes. Free Hosting accounts are hard-limited to 50,000 inodes. That means that even if you aren't much disk space in total, you can still be over-quota if you've got bajillions of tiny files, and that even if you have unmetered space, you still don't have unlimited space - with a 10MB file size cap, your theoretical maximum space can never be more than 500GB (and since there's no way all of your files are going to be 10MB, it's really less than that).

And to theengli, I don't have filesystem access to the servers, so I can't help.
 

Livewire

Abuse Compliance Officer
Staff member
Messages
18,169
Reaction score
216
Points
63
*Ninja'd for what an inode is, but it took me like a year to type this up so my fault anyways*

@theengli: As of my last run of the account it's using ~40,100 inodes which is high but relatively easy to diagnose, given that half of them include "home/theengli/moodledata/cache" as part of their directory; the code-block below contains the inode count of every folder in your home directory. It'll likely need to be purged consistently depending on moodle's settings, as what looks to be happening is that moodle is caching pages/data to reduce loading times, which is fantastic for page response. Unfortunately, it's less-good for inodes, because it is saving more files to its cache folder, which pushes the account closer to the 50k inode cap.

Because there's a high number of inodes in the public_html folder, you may be best suited to either disabling caching in moodle, or scaling the settings back drastically so it doesn't make as many cached files. It may slow loading speeds a bit, but the alternative is having cPanel act like a schoolchild that doesn't get their way if it gets too high and passes the 50k cap.

Last note is I don't think cPanel updates its inode count in real time; there's a good chance it was higher than what it was showing, and then updated after you removed files, giving the image that it actually increased in count rather than decreased.

Code:
20091 ./moodledata
  19827 ./public_html
     74 ./.cpanel_unreadable
     42 ./tmp
     40 ./.cpanel
     40 ./.cagefs
     30 .
     16 ./mail
      4 ./ssl
      4 ./.softaculous
      4 ./.cphorde
      2 ./logs
      1 ./public_ftp
      1 ./etc
      1 ./.cl.selector
 

theengli

Member
Messages
104
Reaction score
1
Points
18
Livewire,
actually my inode count was around 40,000, but when I deleted a course, it nearly reached 50,000. While I was waiting for a reply here, I read about moodle everywhere I could and discovered that I might try to clean a couple of folders (trashdir & backup) by hand. It really helped. Seems like when you delete something, it somehow ends up in these two folders and sort of doubles up. When I cleaned them, the count returned to the state before cleaning.
As for the cache folder, I tried cleaning it too, but as soon as you log on, the cache is immediately restored. I'm no great expert at handling such things, but I'll try to find a way to disable caching or reduce the amount of it.
Thank you very much for such a detailed comment.
 

theengli

Member
Messages
104
Reaction score
1
Points
18
Livewire,
update. I found an option to purge all caches in the settings of my website and applied it. The inode count immediately dropped to about 24,000. I don't know if it's going to last, but without you I'd never have thought of looking, so thank you once again.
 
Status
Not open for further replies.
Top