We (ir.stanford.edu) are thinking about changing the way we layout
home directories in AFS and would like to get some feedback on what
methods other people are using. Since most of our users are still in NFS
(due mainly to political reasons) we had a simple scheme of:
/afs/ir/users/[a-z]/$USER
Where [a-z] is the first letter of their login name. This doesn't
scale well, of course. Another (common?) method doesn't seem to scale
well either:
/afs/ir/users/[a-z]/[a-z]/$USER
Where the first two letters of the login name are used. This method
also seems like it would have a lot of collisions in directories like
/afs/ir/users/s/?/* for example.
Other options might be something like:
/afs/ir/users/NNNN/$USER
Where NNNN is a number between 0-9999 which is used to randomly place
the directories. You could define the maximum number of subdirectories
you want in each directory to ensure an even distribution when creating
directories.
Other options I've thought of include hashing on the uid, doing some sort
of modulo arithmetic on the uid, or treating the uid as a hex number and
using them to create the subdirectories. The problem with this method is
if your UID changes then so does your directory name (unless you have some
huge directory full of symlinks which defeats the whole purpose if you use
this directory in a password file). These approaches also make it harder
to find someone's home directory (although ~user works fine if you have
the full password file on your system).
We could eventually have about 20,000 directories in AFS/DFS if we migrate
all our users into AFS.
For now I'm going to write a perl script to mung through the password file
and try various algorithms to see which one seems like the best.
thanks, Roland
--
Roland J. Schemers III | Networking Systems
Authentication Services Programmer | 414 Sweet Hall +1 (415) 723-6740
Distributed Computing Operations | Stanford, CA 94305-3090
Stanford University | [EMAIL PROTECTED]