kaauxdb-fix-silly-comment-substitution-20010711
[openafs.git] / doc / html / AdminReference / auarf153.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
2 <HTML><HEAD>
3 <TITLE>Administration Reference</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3672/auarf000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 3 Oct 2000 at 16:18:30                -->
7 <META HTTP-EQUIV="updated" CONTENT="Tue, 03 Oct 2000 16:18:29">
8 <META HTTP-EQUIV="review" CONTENT="Wed, 03 Oct 2001 16:18:29">
9 <META HTTP-EQUIV="expires" CONTENT="Thu, 03 Oct 2002 16:18:29">
10 </HEAD><BODY>
11 <!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
12 <BODY bgcolor="ffffff"> 
13 <!-- End Header Records  ============================================ -->
14 <A NAME="Top_Of_Page"></A>
15 <H1>Administration Reference</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf152.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auarf154.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <P>
18 <H2><A NAME="HDRFS_MKMOUNT" HREF="auarf002.htm#ToC_167">fs mkmount</A></H2>
19 <A NAME="IDX4893"></A>
20 <A NAME="IDX4894"></A>
21 <A NAME="IDX4895"></A>
22 <A NAME="IDX4896"></A>
23 <A NAME="IDX4897"></A>
24 <P><STRONG>Purpose</STRONG>
25 <P>Creates a mount point for a volume
26 <P><STRONG>Synopsis</STRONG>
27 <PRE><B>fs mkmount -dir</B> &lt;<VAR>directory</VAR>>  <B>-vol</B> &lt;<VAR>volume&nbsp;name</VAR>>  [<B>-cell</B> &lt;<VAR>cell&nbsp;name</VAR>>]
28            [<B>-rw</B>]  [<B>-fast</B>]  [<B>-help</B>]
29    
30 <B>fs mk -d</B> &lt;<VAR>directory</VAR>>  <B>-v</B> &lt;<VAR>volume&nbsp;name</VAR>>  [<B>-c</B> &lt;<VAR>cell&nbsp;name</VAR>>]  [<B>-r</B>]  [<B>-f</B>]  [<B>-h</B>]
31 </PRE>
32 <P><STRONG>Description</STRONG>
33 <P>The <B>fs mkmount</B> command creates a mount point for the volume
34 named by the <B>-vol</B> argument at the location in the AFS file space
35 specified by the <B>-dir</B> argument. The mount point looks like a
36 standard directory element, and serves as the volume's root directory,
37 but is actually a special file system object that refers to an AFS
38 volume. When the Cache Manager first encounters a given mount point
39 during pathname traversal, it contacts the VL Server to learn which file
40 server machines house the indicated volume, then fetches a copy of the
41 volume's root directory from the appropriate file server machine.
42 <P>It is possible, although not recommended, to create more than one mount
43 point to a volume. The Cache Manager can become confused if a volume is
44 mounted in two places along the same path through the filespace.
45 <P>The Cache Manager observes three basic rules as it traverses the AFS
46 filespace and encounters mount points:
47 <UL>
48 <P><LI><B>Rule 1:</B> Access Backup and Read-only Volumes When
49 Specified
50 <P>When the Cache Manager encounters a mount point that specifies a volume
51 with either a <B>.readonly</B> or a <B>.backup</B>
52 extension, it accesses that type of volume only. If a mount point does
53 not have either a <B>.backup</B> or <B>.readonly</B>
54 extension, the Cache Manager uses Rules 2 and 3.
55 <P>For example, the Cache Manager never accesses the read/write version of a
56 volume if the mount point names the backup version. If the specified
57 version is inaccessible, the Cache Manager reports an error.
58 <P><LI><B>Rule 2:</B> Follow the Read-only Path When Possible
59 <P>If a mount point resides in a read-only volume and the volume that it
60 references is replicated, the Cache Manager attempts to access a read-only
61 copy of the volume; if the referenced volume is not replicated, the Cache
62 Manager accesses the read/write copy. The Cache Manager is thus said to
63 prefer a <I>read-only path</I> through the filespace, accessing read-only
64 volumes when they are available.
65 <P>The Cache Manager starts on the read-only path in the first place because
66 it always accesses a read-only copy of the <B>root.afs</B> volume
67 if it exists; the volume is mounted at the root of a cell's AFS
68 filespace (named <B>/afs</B> by convention). That is, if the
69 <B>root.afs</B> volume is replicated, the Cache Manager attempts to
70 access a read-only copy of it rather than the read/write copy. This
71 rule then keeps the Cache Manager on a read-only path as long as each
72 successive volume is replicated. The implication is that both the
73 <B>root.afs</B> and <B>root.cell</B> volumes must be
74 replicated for the Cache Manager to access replicated volumes mounted below
75 them in the AFS filespace. The volumes are conventionally mounted at
76 the <B>/afs</B> and <B>/afs/</B><VAR>cellname</VAR> directories,
77 respectively.
78 <P><LI><B>Rule 3:</B> Once on a Read/write Path, Stay There
79 <P>If a mount point resides in a read/write volume and the volume name does
80 not have a <B>.readonly</B> or a <B>.backup</B>
81 extension, the Cache Manager attempts to access only the a read/write version
82 of the volume. The access attempt fails with an error if the read/write
83 version is inaccessible, even if a read-only version is accessible. In
84 this situation the Cache Manager is said to be on a <I>read/write path</I>
85 and cannot switch back to the read-only path unless mount point explicitly
86 names a volume with a <B>.readonly</B> extension. (Cellular
87 mount points are an important exception to this rule, as explained in the
88 following discussion.
89 </UL>
90 <P>There are three types of mount points, each appropriate for a different
91 purpose because of the manner in which the Cache Manager interprets
92 them.
93 <UL>
94 <P><LI>When the Cache Manager crosses a <I>regular</I> mount point, it obeys
95 all three of the mount point traversal rules previously described. To
96 create a regular mount point, include only the required <B>-dir</B> and
97 <B>-vol</B> arguments to the <B>fs mkmount</B> command. 
98 <A NAME="IDX4898"></A>
99 <A NAME="IDX4899"></A>
100 <TABLE><TR><TD ALIGN="LEFT" VALIGN="TOP"><B>Note:</B></TD><TD ALIGN="LEFT" VALIGN="TOP">A regular mount point does not force the Cache Manager always to access
101 read-only volumes (it is explicitly not a "read-only mount point"). If
102 a volume is not replicated, the third traversal rule means that the Cache
103 Manager still accesses the read/write volume when that is the only type
104 available. However, if the Cache Manager is to access the read-only
105 version of a replicated volume named by a regular mount point, all volumes
106 that are mounted above it in the pathname must also be replicated.
107 </TD></TR></TABLE>
108 <P><LI>When the Cache Manager crosses a <I>read/write</I> mount point, it
109 attempts to access only the volume version named in the mount point. If
110 the volume name is the base (read/write) form, without a
111 <B>.readonly</B> or <B>.backup</B> extension, the Cache
112 Manager accesses the read/write version of the volume, even if it is
113 replicated. In other words, the Cache Manager disregards the second
114 mount point traversal rule when crossing a read/write mount point: it
115 switches to the read/write path through the filespace. 
116 <A NAME="IDX4900"></A>
117 <A NAME="IDX4901"></A>
118 <P>To create a read/write mount point, include the <B>-rw</B> flag on the
119 <B>fs mkmount</B> command. It is conventional to create only one
120 read/write mount point in a cell's filespace, using it to mount the
121 cell's <B>root.cell</B> volume just below the AFS filespace
122 root (by convention, <B>/afs/.</B><VAR>cellname</VAR>). See
123 the <I>IBM AFS Quick Beginnings</I> for instructions and the chapter about
124 volume management in the <I>IBM AFS Administration Guide</I> for further
125 discussion.
126 <P>Creating a read/write mount point for a read-only or backup volume is
127 acceptable, but unnecessary. The first rule of mount point traversal
128 already specifies that the Cache Manager accesses them if the volume name in a
129 regular mount point has a <B>.readonly</B> or
130 <B>.backup</B> extension.
131 <P><LI>When the Cache Manager crosses a <I>cellular</I> mount point, it
132 accesses the indicated volume in the specified cell, which is normally a
133 foreign cell. (If the mount point does not name a cell along with the
134 volume, the Cache Manager accesses the volume in the cell where the mount
135 point resides.) The Cache Manager disregards the third mount point
136 traversal rule when crossing a regular cellular mount point: it accesses
137 a read-only version of the volume if it is replicated, even if the volume that
138 houses the mount point is read/write. Switching to the read-only path
139 in this way is designed to avoid imposing undue load on the file server
140 machines in foreign cells.
141 <A NAME="IDX4902"></A>
142 <A NAME="IDX4903"></A>
143 <A NAME="IDX4904"></A>
144 <P>To create a regular cellular mount point, include the <B>-cell</B>
145 argument on the <B>fs mkmount</B> command. It is conventional to
146 create cellular mount points only at the second level in a cell's
147 filespace, using them to mount foreign cells' <B>root.cell</B>
148 volumes just below the AFS filespace root (by convention, at
149 <B>/afs/</B><VAR>foreign_cellname</VAR>). The mount point enables
150 local users to access the foreign cell's filespace, assuming they have
151 the necessary permissions on the ACL of the volume's root directory and
152 that there is an entry for the foreign cell in each local client
153 machine's <B>/usr/vice/etc/CellServDB</B> file. In the output
154 of the <B>fs lsmount</B> command, the cell name and a colon
155 (<TT>:</TT>) appear between the initial number sign and the volume
156 name in a regular cellular mount point name.
157 </UL>
158 <P><STRONG>Options</STRONG>
159 <DL>
160 <P><DT><B>-dir
161 </B><DD>Names the directory to create as a mount point. The directory must
162 not already exist. Relative pathnames are interpreted with respect to
163 the current working directory. 
164 <P>Specify the read/write path to the directory, to avoid the failure that
165 results from attempting to create a new mount point in a read-only
166 volume. By convention, the read/write path is indicated by placing a
167 period before the cell name at the pathname's second level (for example,
168 <B>/afs/.abc.com</B>). For further discussion of the
169 concept of read/write and read-only paths through the filespace, see the
170 <B>Description</B> section of this reference page.
171 <P><DT><B>-vol
172 </B><DD>Specifies the name or volume ID number of the volume to mount. If
173 appropriate, add the <TT>.readonly</TT> or <TT>.backup</TT>
174 extension to the name, or specify the appropriate volume ID number.
175 <P><DT><B>-cell
176 </B><DD>Names the cell in which the volume resides (creates a cellular mount
177 point). Provide the fully qualified domain name, or a shortened form
178 that disambiguates it from the other cells listed in the local
179 <B>/usr/vice/etc/CellServDB</B> file.
180 <P>If this argument is omitted, no cell indicator appears in the mount
181 point. When the Cache Manager interprets it, it assumes that the volume
182 named in the mount point resides in the same cell as the volume that houses
183 the mount point.
184 <P><DT><B>-rw
185 </B><DD>Creates a read/write mount point. Omit this flag to create a
186 regular mount point.
187 <P><DT><B>-fast
188 </B><DD>Prevents the Volume Location (VL) Server from checking that the volume has
189 a VLDB entry and printing a warning message if it does not. Whether or
190 not this flag is included, the File Server creates the mount point even when
191 the volume has no VLDB entry.
192 <P><DT><B>-help
193 </B><DD>Prints the online help for this command. All other valid options
194 are ignored.
195 </DL>
196 <P><STRONG>Examples</STRONG>
197 <P>The following command creates a regular mount point, mounting the volume
198 <B>user.smith</B> at
199 <B>/afs/abc.com/usr/smith</B>:
200 <PRE>   % <B>cd /afs/abc.com/usr</B>
201       
202    %<B> fs mkmount -dir smith -vol user.smith</B>
203    
204 </PRE>
205 <P>The following commands create a read/write mount point and a regular mount
206 point for the ABC Corporation cell's <TT>root.cell</TT> volume
207 in that cell's file tree. The second command follows the
208 convention of putting a period at the beginning of the read/write mount
209 point's name.
210 <PRE>   % <B>fs mkmount -dir /afs/abc.com -vol root.cell</B>
211    
212    %<B> fs mkmount -dir /afs/.abc.com -vol root.cell -rw</B>
213    
214 </PRE>
215 <P>The following command mounts the State University cell's
216 <TT>root.cell</TT> volume in the ABC Corporation cell's file
217 tree, creating a regular cellular mount point called
218 <B>/afs/stateu.edu</B>. When a ABC Corporation Cache Manager
219 encounters this mount point, it crosses into the State University cell on a
220 read-only path.
221 <PRE>   % <B>fs mkmount -dir /afs/stateu.edu -vol root.cell -c stateu.edu</B>
222    
223 </PRE>
224 <P><STRONG>Privilege Required</STRONG>
225 <P>The issuer must have the <B>i</B> (<B>insert</B>) and <B>a</B>
226 (<B>administer</B>) permissions on the ACL of the directory that is to
227 house the mount point.
228 <P><STRONG>Related Information</STRONG>
229 <P><A HREF="auarf019.htm#HDRCLI_CSDB">CellServDB (client version)</A>
230 <P><A HREF="auarf151.htm#HDRFS_LSMOUNT">fs lsmount</A>
231 <P><A HREF="auarf156.htm#HDRFS_RMMOUNT">fs rmmount</A>
232 <P>
233 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf152.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auarf154.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
234 <!-- Begin Footer Records  ========================================== -->
235 <P><HR><B> 
236 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
237 </B> 
238 <!-- End Footer Records  ============================================ -->
239 <A NAME="Bot_Of_Page"></A>
240 </BODY></HTML>