[OpenAFS-devel] AFS/DFS Mount points

Dean Anderson dean@av8.com
Sun, 10 Apr 2005 22:27:31 -0400 (EDT)


On Sun, 10 Apr 2005, Jeffrey Hutzelman wrote:

> 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.

[root@vista xxx]# ln -s \#asdfasf ddd
[root@vista xxx]# ls
ddd
[root@vista xxx]# ls -l ddd
ls: ddd: No such device
[root@vista xxx]# ls -l
ls: ddd: No such device
total 0
[root@vista xxx]# rm ddd
rm: cannot remove `ddd': No such device


> 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
> 
> 
> 

-- 
Av8 Internet   Prepared to pay a premium for better service?
www.av8.net         faster, more reliable, better service
617 344 9000