3.4. Using Freelance (Dynamic Root) Mode to Improve Mobility

Traditionally, when the OpenAFS Client Service starts it must be able to access the "root.afs" volume of the default cell. The "root.afs" volume contains the set of mount points to the "root.cell" volumes of various cells the administrator of the default cell believes should be accessible. If the "root.afs" volume is inaccessible when the client service is started, the service will terminate unexpectedly. Since many users now use laptops or otherwise operate in disconnected environments in which a Virtual Private Network (VPN) connection may be required to access the cell's servers, it is often the case that the "root.afs" volume for the default cell is not reachable and the OpenAFS Client Service can not successfully start.

To allow the OpenAFS Client Service to operate in these environments, Freelance mode dynamically constructs a fake "root.afs" volume from mount points and symlinks stored in the local registry.

The content of the fake "root.afs" volume is dynamically generated as cells are accessed. When the fake "root.afs" volume is initially constructed it will only contain two mount points: a regular path and read-write path mount point used to access the "root.cell" volume of the default AFS cell. Any attempt to access a valid cell name will result in a new mount point being created in the fake "root.afs" volume. If the cellname begins with a "." the mount point will be a read-write path; otherwise the mount point will be a regular path. These mount points are preserved in the registry at key:

HKLM\SOFTWARE\OpenAFS\Client\Freelance

Additional mount points may be manually created using the "fs mkmount" command. Mount points may be removed using the "fs rmmount" command.

>fs mkmount \\AFS\athena.mit.edu root.cell athena.mit.edu

>fs mkmount \\AFS\.athena.mit.edu root.cell athena.mit.edu -rw

>fs rmmount \\AFS\athena.mit.edu

>fs rmmount \\AFS\.athena.mit.edu

Symlinks may also be created within the Freelance "root.afs" volume.

>symlink make \\afs\link \\afs\athena.mit.edu\user\j\a\jaltman

>symlink list \\afs\link

'\\afs\link' is a symlink to 'athena.mit.edu\user\j\a\jaltman'

>symlink rm \\afs\link

The symlinks are stored in the registry at:

HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks

NET VIEW \\AFS can be used to browse all of the entries from the command line.