Terry Tremaine wrote on Sun, Sep 22, 2002 at 03:27:55AM -0600 : > Hello > > Does anyone know if there is an upper limit to the number of directories in > an ext3 file system? I am working on an application which will require a > different graphics directory for each of potentially thousands of subscribers > to the system. So the graphics directory might 100,000 or more > subdirectories.
Yes there is a limit. IIRC, it's something like 32768. You need to use hashing. For example, consider the files grmicro4453.jpg and demicro2122.jpg. They would be stored in a directory hash such as: g/r/grmicro4453.jpg d/e/demicro2122.jpg The key is to not have all the files start with the same letters or numbers, so that the hashing algorithm will work for you. The example above is 2 levels of hashing, but you can go as deep as you need to keep the number of files per directory down. Another thought is to use a fs type that is not subject to that limitation. Reiserfs comes to mind as the first possibility, but I can't remember if that gets rid of that limitation. Blue skies... Todd -- Todd Lyons -- MandrakeSoft, Inc. http://www.mandrakesoft.com/ UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn Cooker Version mandrake-release-9.0-0.3mdk Kernel 2.4.19-12mdk
msg57934/pgp00000.pgp
Description: PGP signature