[2365] in Release_7.7_team

home help back first fref pref prev next nref lref last post

Fwd: root.othercells - a solution to "ls /afs" takes a long time

daemon@ATHENA.MIT.EDU (Bill Cattey)
Wed Jul 26 12:25:18 2000

Message-ID: <EtTl3e0G4U4l04EKE0@mit.edu>
Date: Wed, 26 Jul 2000 12:25:14 -0400 (EDT)
From: Bill Cattey <wdc@MIT.EDU>
To: release-team@MIT.EDU
CC: pbh@MIT.EDU

What do people think of implementing this (interesting and pragmatic)
hack at MIT?  As more and more vendors insist on statting the world when
they start up their file browsers, it may be that we need to cave in to
the ubituitous stupid developers and move the clean namespace aside into
something that will be more liberal in what it accepts.

-wdc

To: info-afs@transarc.com
Subject: root.othercells - a solution to "ls /afs" takes a long time

Dear AFS admins,

When I introduce a new user to AFS,
the first thing they usually do is "ls /afs".
Then I have to explain why it takes a long time to complete.
This has always seemed "sub-optimal" to me.

So, I have found a pragmatic solution to this problem.

It is simple: instead of mounting all the foreign cells in root.afs,
I have created a new volume "root.othercells".

"root.othercells" has mountpoints for all the foreign cells
and is itself mounted at /afs/@cell/othercells/.

"root.afs" now only has a mountpoint for the local cell and
symbolic links to the foreign cell mounts in /afs/@cell/othercells/.

So, when a user does "ls /afs" the result is returned much more quickly.

Also, "cd /afs/$foreign_cell" still works as before.

It is also useful to be able to mount/unmount foreign cells in a
permanently mounted "root.othercells" volume instead of
having to make a temporary mountpoint for "root.afs"
each time for a mount/unmount (as in the traditional way).

The only disadvantage I have been able to think of in using
/afs/@cell/othercells/ is that any kind of recursive search
from /afs/@cell/ (eg find) may traverse "othercells" unless
you specifically exclude "othercells".

Thoughts?
--
cheers
paul                           http://acm.org/~mpb
                               85% Slashdot pure

Here is an example.
The cell is linux.ibm.com (see @cell symbolic link).
A foreign cell, hursley.ibm.com, is mounted in
/afs/linux.ibm.com/othercells/hursley.ibm.com
with a symbolic link at: /afs/hursley

[mpb@afs-linux-fs1 mpb]$ ls -ld /afs/@cell
lrwxr-xr-x    1 4000     root           13 Nov 30  1999 /afs/@cell ->
linux.ibm.com

[mpb@afs-linux-fs1 mpb]$ ls -ld /afs/linux.ibm.com
drwxrwxrwx    2 root     root         2048 Jul 11 09:11
/afs/linux.ibm.com

[mpb@afs-linux-fs1 mpb]$ ls -ld /afs/hursley
lrwxr-xr-x    1 adminmpb root           45 Jun 29 12:38 /afs/hursley ->
/afs/linux.ibm.com/othercells/hursley.ibm.com





home help back first fref pref prev next nref lref last post