Click to See Complete Forum and Search --> : limitation on number of subfolders???


vkhy
03-19-2002, 03:12 PM
OK... I'm pretty much a linux newbie and I have a question. I'm running RedHat 7.2 with samba to share out a very large partition (1.4 TB) and I've run into a slight problem. During a database conversion, the program converting the dbase creates a lot of subfolders. When the subfolders reach up around 32000 the conversion program crashes. I've deleted a number of folders and re-run the conversion and it always stops at the same number of folders. Someone suggested that I look at the inode usage and it seems fine. Only 1% of the inodes are being used.

Is there a soft or hard limit that I can change to fix this? Is there something else that I should be looking at? Any help would be greatly appreciated.

Choozo
03-19-2002, 04:00 PM
Are these 32000 folders in the same subdirectory (siblings), or sub-sub-sub... 32000 levels down?

If it's 32000 levels deep it should probably have chrashed way sooner, as you would run out of space for the variable holding the path?

It still may be inodes, but I'm not sure if there are different limits on inodes in a directory as opposed to inodes on the whole drive. I would suspect there are limits om inodes in a directory, at least for practical reasons. (Try doing a 'ls -l' in a directory containing > 1000 files).

Cheers :)

drwebpat
03-19-2002, 04:05 PM
A search on http://www.google.com/linux turned up this

This limit comes from link count of ext2fs's.
You can change the definition of EXT2_LINK_MAX in
include/linux/ext2fs.h upto 32765 since struct inode.i_nlink is
unsigned short, and recompile your kernel.
But another normal kernel will not operate such too many linked files
and directories.


Upper limit is 65535 (it's unsigned short) but anything above
32768 can trigger subtle bugs ...


The link to that post is http://groups.yahoo.com/group/linux-bangalore-technical/message/69

HTH,
Doc

Strogian
03-19-2002, 04:39 PM
Well if you're gonna modify code, you might as well fix the screwy database program. That's the real problem here, not the limit of 32 THOUSAND subfolders. :D

drwebpat
03-19-2002, 06:02 PM
I didn't post to tell him to recompile the kernel but to merely show that I found the answer to his question pretty easily :D

vkhy
03-19-2002, 08:22 PM
Thanks for the link. I think that's the problem. This isn't actually my dbase conversion. A customer is doing it at his site using the hardware that we sold him. If I could change the software I would.

Chase
03-19-2002, 09:17 PM
Can I just ask you what you're doing with that much storage? That's alot. I want some!

Heh.

vkhy
03-20-2002, 01:21 PM
Well... we're using the linux box as a poor mans NAS head. It's providing connectivity to 2 1.4 TB raids on the back end. We're just trying to iron out all the little difficulties now... everything that we didn't, or couldn't think of.