[OpenAFS] mount point recursion?

Russ Allbery rra@stanford.edu
Mon, 26 Sep 2005 16:39:04 -0700


Jiann-Ming Su <sujiannming@gmail.com> writes:

> I create a single mount point, but it seems to be recursive.  Is this a bug?

>   fs1:~# fs mkmount -dir /afs/.chbe.bogus/user/admin -vol user
>   fs1:~# ls -al /afs/chbe.bogus/user/
>   total 8
>   drwxrwxrwx    2 root root 2048 2005-09-26 19:21 .
>   drwxr-xr-x  100 root root 4096 1969-12-31 19:00 ..
>   drwxrwxrwx    2 root root 2048 2005-09-26 19:24 admin
>   fs1:~# ls -al
> /afs/chbe.bogus/user/admin/admin/admin/admin/admin/admin/admin/admin/admin/admin/

Nope, expected behavior of AFS.  AFS doesn't know or care whether your
mount points are recursive.  You can mount any volume under any other
volume, or in as many places as you want, as long as you have ACLs to
write to the directory where you want to create a mount point.

As a result, you have to guard against recursive directory structures,
either in your utilities or by policy.

You may find:

    <http://www.eyrie.org/~eagle/software/fsr/>

useful in performing many recursive AFS operations with protection against
this, although I haven't written a generalized find utility that supports
this sort of duplicate volume suppression.  Should do that at some
point....

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>