Hello,
I just need a word of advice on how to structure /home if you use automount, have 5-10 home directory servers (NetApp filers) and around 1000 users.
I'm personally is looking for /home/homeserver-vol#/user-name scheme, so my automount maps will be nice, small and manageble:
#auto_home NIS map filer1-0 filer1:/vol/vol0 filer1-1 filer1:/vol/vol1 ... filer5-5 filer5:/vol/vol5
But it seems like users prefer /home/username scheme and it leads to 1000+ NIS automount map for /home, like
#auto_home NIS map user1 filer2:/vol/vol1/& .... user9999 filer3:/vol/vol4/&
Do you know if there is more elegant solution for this problem? Can you tell me, what is your preference for /home layout?
Thank you.
-- Aleksandr Rainchik, SUN CSA
On Fri, Jan 12, 2001 at 10:47:54AM -0600, Rainchik, Aleksandr (MED, Non GE) wrote:
Hello,
I just need a word of advice on how to structure /home if you use automount, have 5-10 home directory servers (NetApp filers) and around 1000 users.
Point of clarification: 5-10 filers for 1,000 users? What model filers are they and I hope they are serving other data besides homedirs! At one point we had about 15,000 home directories mostly on two NetApps - a F330 and a F540 - and they were pretty bored filers.
One way to simplify your design would be to reduce the number of filers serving homedirs, especially for 1,000 users. Two good reasons to spread out homedirs are for bandwidth constraints and to spread risk/reduce points of failure. But if you have consistently high bandwidth between all users and filers than 2-4 homedir servers should be more than plenty mitigation of risk considering the cost of additional filers versus the additional benefit (considering NetApps impressive reliability).
I'm personally is looking for /home/homeserver-vol#/user-name scheme, so my automount maps will be nice, small and manageble:
#auto_home NIS map filer1-0 filer1:/vol/vol0 filer1-1 filer1:/vol/vol1 ... filer5-5 filer5:/vol/vol5
This is a very restrictive design because it makes homedir moves extremely conspicuous. It also flies a bit in the face of a large selling point of the automounter - eliminating host-based network paths. If a user is moved from one filer to another, or even from one volume to another, they will have a whole new path to their home directory. Worse yet, any scripts or application configurations which use the full path to their home directory will need to be re-coded or re-configured - YUK!
Being able to "hide" the location of a home directory (or any other remote filesystem) is extremely useful.
But it seems like users prefer /home/username scheme and it leads to 1000+ NIS automount map for /home, like
#auto_home NIS map user1 filer2:/vol/vol1/& .... user9999 filer3:/vol/vol4/&
This is the way we do it, and the way I'd venture to guess most/many places do it. From the user perspective, it is very simple. From the admin perspective, it is easy to manage. We've found it to give maximum flexibility with minimum hassle.
Do you know if there is more elegant solution for this problem? Can you tell me, what is your preference for /home layout?
What do you mean by elegant? The above is pretty darned elegant, and for 1,000 users it should be easily manageable too. We currently have 10,223 home directories and we've got one big home directory map like above. It works great!
One recommendation is you may want to use a script or database to help generate that automount map. The easiest way would be to write a shell/perl script that scanned all your "homedir" directories on each filer, ensured username uniqueness and then build the automount map. For added flexibility, we use a small database. Each row in the homedir table has the username (mountpoint under /home), the filer, and the path to their homedir. At some interval a script comes thru and builds the map.
Hope this info helps!
-- Jeff
-- ---------------------------------------------------------------------------- Jeff Krueger, NetApp CA E-Mail: jeff@qualcomm.com Senior Engineer Phone: 858-651-6709 NetApp Filers / UNIX Infrastructure Fax: 858-651-6627 QUALCOMM, Inc. IT Engineering Web: www.qualcomm.com
Hello,
I just need a word of advice on how to structure /home if you use automount, have 5-10 home directory servers (NetApp filers) and around 1000 users.
I'm personally is looking for /home/homeserver-vol#/user-name scheme, so my automount maps will be nice, small and manageble:
#auto_home NIS map filer1-0 filer1:/vol/vol0 filer1-1 filer1:/vol/vol1 ... filer5-5 filer5:/vol/vol5
But it seems like users prefer /home/username scheme and it leads to 1000+ NIS automount map for /home, like
#auto_home NIS map user1 filer2:/vol/vol1/& .... user9999 filer3:/vol/vol4/&
Do you know if there is more elegant solution for this problem? Can you tell me, what is your preference for /home layout?
Thank you.
You've seen a couple votes for a large auto_home map. If you would still like to avoid that, then instead create a directory of 1000 symlinks on one of your filers like this:
/vol/vol0/home/usera -> /net/filer1-0/usera /vol/vol0/home/userb -> /net/filer2-1/userb
etc.
Automount this directory of 1000 symlinks using this symlink on each workstation:
/home -> /net/filer1-0/home
As a result, /home/usera is a symlink to /net/filer1-0/usera.
Now whenever you add a user or move a user to a different volume, just add or change a symlink. No need to mess with the automount map at all.
If you're worried about setting up those 1000 symlinks, it's quite trivial:
for vol in filer1-0 filer1-1 filer2-0 ... do cd /net/$vol for loginid in *; do ln -s /net/$vol/$loginid /home/$loginid done done
Steve Losen scl@virginia.edu phone: 804-924-0640
University of Virginia ITC Unix Support
On Fri Jan 12 16:45 2001 -0500, Steve Losen wrote:
You've seen a couple votes for a large auto_home map. If you would still like to avoid that, then instead create a directory of 1000 symlinks on one of your filers like this:
/vol/vol0/home/usera -> /net/filer1-0/usera /vol/vol0/home/userb -> /net/filer2-1/userb
Actually, if you have LOTS of users and expect more, start a hierarchy now. You don't want a single directory with thousands of links or directories.
I'd recommend:
/home/a/ab/abb/abba /home/m/mi/mik/mikeh
Do the 3 level from the start and avoid the performance hit of many files in a single directory for lookups, when apps need to stat . .. etc.
You can just place a-k on filer 1 and l-z on filer 2 (they tend to divide up that way with common names). Later, you can expand that to more filers, if needed, just move one letter at a time.
Mike
Just some more thoughts.
On Fri, Jan 12, 2001 at 10:53:10PM +0000, Mike Hollyman wrote:
Actually, if you have LOTS of users and expect more, start a hierarchy now. You don't want a single directory with thousands of links or directories.
(In my experience this depends upon your automounter.)
I'd recommend:
/home/a/ab/abb/abba /home/m/mi/mik/mikeh
Do the 3 level from the start and avoid the performance hit of many files in a single directory for lookups, when apps need to stat . .. etc.
The autofs variants (Solaris, later Irix, etc), that implement the automount point as a filesystem in its own right, do not actually create symlinks or any real file - it's all out of memory - and you'll find that they don't have any degredation with large numbers of directory entries (and I did try *a lot* back when I was playing with it)
Of course, If you do want to balance things this way, you may find a better spread by taking the last three characters of the username. (It goes without saying that if you have mandated usernames that just all happen to begin or end with the same characters then you need to come up with something else.)
divide up that way with common names). Later, you can expand that to more filers, if needed, just move one letter at a time.
(not to be confused with the Automounter allowing you to move one or more as required. You don't *have* to move them all in one go)
James.
"Rainchik, Aleksandr (MED, Non GE)" said:
Hello,
I just need a word of advice on how to structure /home if you use automount, have 5-10 home directory servers (NetApp filers) and around 1000 users.
But it seems like users prefer /home/username scheme and it leads to 1000+ NIS automount map for /home, like
#auto_home NIS map user1 filer2:/vol/vol1/& .... user9999 filer3:/vol/vol4/&
Do you know if there is more elegant solution for this problem? Can you tell me, what is your preference for /home layout?
Since NIS is a "database" format, albeit a not-so-great one, its not too big a deal to have a large automount map. We have one with approximately 3000 entries, and lookups are still very fast, etc. The only issues is maintenance. Not too big a deal. You might want to create an account administration system that uses a real database to track things and generates the homes map automatically....