Portal Home > Knowledgebase > Articles Database > Help please : how to change inodes limit


Help please : how to change inodes limit




Posted by SWDevil, 08-13-2009, 05:09 PM
Does anyone have any idea on how to increase inodes limit on the site / server? Here is the thing: at domain.com/foldername/ there are already 32225 sub folders. program is trying to create more folder within /foldername/ however I am getting following error cannot create directory `32228': Too many links In addition, I tried creating couple of test folders within other parts of the site and it worked just fine. Then one person mentioned about inodes. Does anyone know how can I change the limit? also just wondering.. why is there is limit to begin with? I am sure there has to be some reason.. So any help with the solution would be great. Thanks.

Posted by SWDevil, 08-13-2009, 05:23 PM
I am sorry, it is 32226 & not 32228

Posted by StevenG, 08-13-2009, 05:57 PM
What file system is in use? Shared hosting or your own server? Anyway, if you're using ext3 the following will help you understand what an inode is and limitations of file systems. http://en.wikipedia.org/wiki/Ext3

Posted by DJMizt73, 08-13-2009, 06:02 PM
inodes are data structure files the file system uses to keep track of where everything is in the hard drive (talking about sectors here not file hierachy), among other things(owner, groupID, permissions). If i remember correctly - the amount is set during HDD formatting. This is the reason why after you format a 500 GB HDD you automagically ended up with just 480GB (the 20 GB or so was used up creating inodes). Like I said this can be adjusted during formating (but not sure now with ext3, it maybe hard coded to 1 or 2% of capacity) - back in the newgroup days each post was costing a partition 1 file name (1 inode) when each inode was set to handle say 16KB data block (HDD size / no. of inodes) ..so essentially a 3 KB data was actually using 16KB on the HDD. So the solution back then for servers that expect small chunks of data was to increase the inodes so you can "essentially" reduce the chunks. I think ReiserFS have a more dynamic inode allocation instead of a fixed one on the ext2/3 or any FFS partitions.

Posted by foobic, 08-13-2009, 06:38 PM
I doubt you're hitting the inode limit for the entire partition - run "df -i" to find out for sure. More likely you've discovered the limit on the number of files / subdirectories in a single directory (although I thought this was 32000 for ext3 - are you sure you have 32226?). So yes, you could reformat the partition with a different file system or (much better idea) change your application so it doesn't need to use 32000+ subdirectories. A common scheme is to use single-character subdirectories based on the first one or two letters of the filename. ie. /path/to/f/i/file /path/to/m/y/myotherfile etc.

Posted by SWDevil, 08-13-2009, 07:14 PM
Yeah you are right, it is not inodes, but ext3 and the limit is set at 32000 (the ID in database is updated due to test listings). Now you think there is anyway to increase ext3's size without having to reformat the drive? P.S.. if it can't be done without reformatting, then the final solution would be make change in the script, so instead of creating all sub directories under /download/ it will use other format (gonna have to think of something that can be uniform and make sense)

Posted by foobic, 08-13-2009, 07:35 PM
No. See above.

Posted by nomankhn, 08-13-2009, 09:31 PM
the kernel file you want to edit is /usr/src/linux/include/linux/ext3_fs.h. There is a line in there like #define EXT3_LINK_MAX 32000. Increasing that will allow you to create more files after recompiling your kernel. However, I must warn you that the limit was probably set for a good reason. 32000 is pretty close to 32768, which is 15 bits. It may be that there are only 15 bits allocated for the link numbers. Or some other reason for this limitation. This can only be verified by a thorough inspection of the /usr/src/linux/fs/ext3 source. check this as well. http://www.cs.wisc.edu/condor/condor...alability.html

Posted by supportexpertz, 08-14-2009, 04:45 AM
You can simply change the inode limit using the following command edquota -u username

Posted by StevenG, 08-14-2009, 06:53 AM
logicsupport .. How can you edit a limitation of the file system using edquota ? (assuming you have enabled quota in the first place). Please demonstrate what you mean by this. edquota can only edit soft and hard limits, regards block usage on a device.

Posted by SWDevil, 08-14-2009, 10:25 AM
Hosting support personal came to my rescue again. Since I have more than 1 drive on the server, they were able to move data on other hd for timebeing and in no time /home partition filessystem was ready to handle more directories. Other available structure for website were /download/year/id/title.html download/date/id/title.html .. etc. etc. However I was hoping to keep that as last result and wanted to keep all software titles as /download/id/title.html to make it easy for developers to understand it and also have the whole site have uniform structure from the point of view of software listing page. Thanks again everyone for the help.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
VPS Issue (Views: 809)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.