(Insert or update an AFS volume mountpoint into database)


loadmtpt [-fhqv] path [path ...]

loadmtpt -g [-fq] volume [volume ...]


loadmtpt registers the mount point for an AFS volume in the mount point database. It normally takes some number of mount point locations on the command line and, for each one, makes sure they are actual mount points. It then looks up the volume, retrieves the volume ID from AFS, and stores the mapping into the database.

If that volume already has a mapping, it checks the old path to see if it's still a valid mount point. If not, the old mapping is replaced with the new one. If it is, the user is prompted to select the most appropriate mapping.

path may be relative, in which case it's transformed into an absolute path before registering it (using the standard system getcwd() call, so beware of cases where this produces strange results). All paths are canonicalized to take care of variations between read-only path vs. read/write path, fully-qualified domain name after /afs or not, etc.

If given the -g option, loadmtpt instead takes a list of volumes on the command line and, for each one, attempts to guess the correct mount point based on rules encoded at the top of this script. If it can do so successfully, it loads the mount point using the logic above. Otherwise, it prints a warning message and moves to the next volume.


-f, --force

Always update the mapping for a volume to the mount point given on the command line. Don't prompt even if the volume already has a valid mount point listed in the database.

-g, --guess

Take the arguments to be volume names instead of paths and try to guess the appropriate mount point. See DESCRIPTION for more details.

-h, --help

Print out this documentation (which is done simply by feeding the script to perldoc -t).

-q, --quiet

Don't print out any status information about what's being done. (Error messages will still be printed.)

-v, --version

Print out the version of loadmtpt and exit.


Load the mount point for /afs/.ir/users/r/r/rra:

    loadmtpt /afs/.ir/users/r/r/rra

Load all mount points in the current directory. Note that this requires that everything in the current directory be a mount point; loadmtpt doesn't skip specified paths that aren't mount points, but will instead abort with an error.

    loadmtpt *

Quietly force /afs/ir/users to be registered as the mount point for its volume regardless of what's already in the database:

    loadmtpt -qf /afs/ir/users

Try to guess the mount points for user.rra and user.neilc and load them:

    loadmtpt -g user.rra user.neilc


This program doesn't lock the database, so multiple runs of loadmtpt at the same time may corrupt it (although in extensive use of this program and related programs, I've never seen this happen). The only reason why this has not yet been done is that cleanmtpts can take hours to run and I want to be able to run it without locking all other users out of the database in the meantime.


mtpt(1), cleanmtpts(1)

The current version of this program and the mtpt and cleanmtpts utilities are available from their web page at <http://www.eyrie.org/~eagle/software/afs-mount/>.


Neil Crellin <neilc@stanford.edu> and Russ Allbery <rra@stanford.edu>.


Copyright 1999, 2004 Board of Trustees, Leland Stanford Jr. University.

This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

Last spun 2014-08-10 from POD modified 2008-07-28