[lug] Too many files error
David L. Anselmi
anselmi at anselmi.us
Sat Apr 22 15:06:26 MDT 2006
Ken Kinder wrote:
> I'm working on an application that creates lots of files.
Why? Can you combine your data so it can go into fewer files? Berkeley DB?
> To reduce the number of files in one dir, I have broken the files up
> into subdirs. The files are basically md5 hex digests, and I'm taking
> the first five chars to determine a directory:
> However, I'm running into "Too many links" as an error upon creating
> the directories. This is happening right after the 32,0001st
> directory, which seems like an awfully even number. I thought ext3
> didn't have this problem.
So it looks like you have to use only 3 digits as the directory name.
But you can do more than one layer in the hierarchy.
You didn't say what kernel you're using so the above may not apply for 2.6.
You could also switch to Reiser or others.
More information about the LUG