(Clean out stale information in mount point database)


cleanmtpts [-hv] [volume ...]


cleanmtpts either walks the entire mount point database or processes just those volumes given on the command line if any are givenn. For each volume, it checks the recorded path and makes sure that it's in its canonical form. It then makes sure that the path is still a mount point for that volume.

If the path is no longer a mount point, no longer exists, or is no longer a mount point for the same volume, the entry is removed from the database. Otherwise, if the canonical path doesn't match the current path, the path is updated. One line is printed out for each change, and a status line is printed after every 1000 processed entries. A total number of entries processed is printed at the end.

Note that some process is needed to check the contents of the database against the complete list of volumes in the cell and identify any volumes that are missing mount point entries, since cleanmtpts reacts to any incorrect information by just deleting the entry, leaving no entry for that volume at all.

This script should be run periodically against the database (probably monthly).


-h, --help

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

-v, --version

Print out the version of cleanmtpts and exit.


Walk the entire database and check every entry:


Check only the entries for user.rra and user.neilc:

    cleanmtpts user.rra user.neilc



The default location of the mount point database where mount point mappings are looked up. This will use whatever database format that the DB_File that comes with Perl uses.


This program doesn't lock the database, so running it at the same time as loadmtpt may corrupt the database (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), loadmtpt(1)

The current version of this program and the mtpt and loadmtpt utilities are available from their web page at <>.


Neil Crellin <> and Russ Allbery <>.


Copyright 1999, 2003, 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 2009-10-15