[OpenAFS-devel] AFS/DFS Mount points

Jeffrey Hutzelman jhutz@cmu.edu
Sun, 10 Apr 2005 21:50:53 -0400


On Sunday, April 10, 2005 09:17:41 PM -0400 Jeffrey Altman 
<jaltman@columbia.edu> wrote:

> Dean Anderson wrote:
>> I would presume that it wouldn't be too hard for the client side to
>> support both to allow for easy migration.  A period of say, two or three
>> years?
>
> I believe a period of ten years or more would be required.  There are
> many systems I have come across which are still running AFS 3.4 builds.
> The reality is that until the machines die, the clients are not going
> away.

Fortunately, at least for AFS, no transition is required at all, because 
the problem simply does not exist.  While it is true that AFS mount points 
are represented as symlinks whose target begins with # or % (denoting the 
type of mount point), the thing that makes them mount points and not 
symlinks is their mode.  It is possible to create symlinks to targets 
starting with '#' or '%' by making an RXAFS_Symlink() call, and clients 
will treat such links correctly.  It is simply not possible to create such 
links using the symlink() syscall on an OpenAFS client, because the cache 
manager interprets such requests as requests to create mount points.

So, if it were truly necessary to be able to create symlinks with targets 
starting with '#' or '%', this could be accommodated by adding a new pioctl 
for creating mount points, analogous to VIOC_AFS_{STAT,DELETE}_MT_PT, and 
arranging for 'fs mkmount' to use that instead of symlink().  Of course, 
this would break scripts and other tools that expect to be able to use 
symlink() to create mount points.  You can't have it both ways.

Fortunately, even that is not necessary, for there is no symlink target 
which can be represented only by a string starting with '#' or '%'.  If one 
wishes to target a file "#foo" in the same directory as the link, one only 
needs to write the target as "./#foo" to get around the current behavior.

-- Jeffrey T. Hutzelman (N3NHS) <jhutz+@cmu.edu>
   Sr. Research Systems Programmer
   School of Computer Science - Research Computing Facility
   Carnegie Mellon University - Pittsburgh, PA