FS_MKMOUNT(1) | AFS Command Reference | FS_MKMOUNT(1) |
fs_mkmount - Creates a mount point for a volume
fs mkmount -dir <directory>
-vol <volume name>
[-cell <cell name>] [-rw]
[-fast] [-help]
fs mk -d <directory>
-v <volume name>
[-c <cell name>] [-r] [-f]
[-h]
The fs mkmount command creates a mount point for the volume named by the -vol argument at the location in the AFS file space specified by the -dir argument. The mount point looks like a standard directory element, and serves as the volume's root directory, but is actually a special file system object that refers to an AFS volume. When the Cache Manager first encounters a given mount point during pathname traversal, it contacts the VL Server to learn which file server machines house the indicated volume, then fetches a copy of the volume's root directory from the appropriate file server machine.
It is possible, although not recommended, to create more than one mount point to a volume. The Cache Manager can become confused if a volume is mounted in two places along the same path through the filespace.
The Cache Manager observes three basic rules as it traverses the AFS filespace and encounters mount points:
For example, the Cache Manager never accesses the read/write version of a volume if the mount point names the backup version. If the specified version is inaccessible, the Cache Manager reports an error.
The Cache Manager starts on the read-only path in the first place because it always accesses a read-only copy of the root.afs volume if it exists; the volume is mounted at the root of a cell's AFS filespace (named /afs by convention). That is, if the "root.afs" volume is replicated, the Cache Manager attempts to access a read-only copy of it rather than the read/write copy. This rule then keeps the Cache Manager on a read-only path as long as each successive volume is replicated. The implication is that both the "root.afs" and "root.cell" volumes must be replicated for the Cache Manager to access replicated volumes mounted below them in the AFS filespace. The volumes are conventionally mounted at the /afs and /afs/cellname directories, respectively.
There are three types of mount points, each appropriate for a different purpose because of the manner in which the Cache Manager interprets them.
To create a read/write mount point, include the -rw flag on the fs mkmount command. It is conventional to create only one read/write mount point in a cell's filespace, using it to mount the cell's "root.cell" volume just below the AFS filespace root (by convention, /afs/.cellname). See the OpenAFS Quick Start Guide for instructions and the chapter about volume management in the OpenAFS Administration Guide for further discussion.
Creating a read/write mount point for a read-only or backup volume is acceptable, but unnecessary. The first rule of mount point traversal already specifies that the Cache Manager accesses them if the volume name in a regular mount point has a ".readonly" or ".backup" extension.
To create a regular cellular mount point, include the -cell argument on the fs mkmount command. It is conventional to create cellular mount points only at the second level in a cell's filespace, using them to mount foreign cells' root.cell volumes just below the AFS filespace root (by convention, at /afs/foreign_cellname). The mount point enables local users to access the foreign cell's filespace, assuming they have the necessary permissions on the ACL of the volume's root directory and that there is an entry for the foreign cell in each local client machine's /etc/openafs/CellServDB file. In the output of the fs lsmount command, the cell name and a colon (":") appear between the initial number sign and the volume name in a regular cellular mount point name.
Specify the read/write path to the directory, to avoid the failure that results from attempting to create a new mount point in a read-only volume. By convention, the read/write path is indicated by placing a period before the cell name at the pathname's second level (for example, /afs/.example.com). For further discussion of the concept of read/write and read-only paths through the filespace, see "DESCRIPTION".
If this argument is omitted, no cell indicator appears in the mount point. When the Cache Manager interprets it, it assumes that the volume named in the mount point resides in the same cell as the volume that houses the mount point.
The following command creates a regular mount point, mounting the volume "user.smith" at /afs/example.com/usr/smith:
% cd /afs/example.com/usr % fs mkmount -dir smith -vol user.smith
The following commands create a read/write mount point and a regular mount point for the Example Corporation cell's "root.cell" volume in that cell's file tree. The second command follows the convention of putting a period at the beginning of the read/write mount point's name.
% fs mkmount -dir /afs/example.com -vol root.cell % fs mkmount -dir /afs/.example.com -vol root.cell -rw
The following command mounts the Example Organization cell's "root.cell" volume in the Example Corporation cell's file tree, creating a regular cellular mount point called /afs/example.org. When a Example Corporation Cache Manager encounters this mount point, it crosses into the Example Organization cell on a read-only path.
% fs mkmount -dir /afs/example.org -vol root.cell -c example.org
The issuer must have the "i" (insert) and "a" (administer) permissions on the ACL of the directory that is to house the mount point.
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
2021-01-14 | OpenAFS |