add-afs-man-pages-20010716
[openafs.git] / src / man / fs_mkmount.1
1 fs mkmount                 AFS Commands              fs mkmount
2
3
4 NAME
5
6    fs mkmount -- create a mount point for a volume.
7
8
9    fs mkmount -dir <directory> -vol <volume name>  [-cell <cell
10    name>]    [-rw]  [-fast]  [-root]  [-help]
11
12 ACCEPTABLE ABBREVIATIONS/ALIASES
13
14    fs mk -d <directory> -v <volume name> [-c <cell name>]
15    [-rw]  [-f]  [-ro]  [-h]
16
17 DESCRIPTION
18
19    Creates a mount point called directory for the volume volume
20    name.  The volume's root directory is also named  directory.
21    Mount  points look and act just like standard UNIX directory
22    structures, because when  the  Cache  Manager  encounters  a
23    mount point directory in a pathname, it knows to look in the
24    indicated volume for the elements listed under directory.
25
26    It is possible, although not  recommended,  to  create  more
27    than one mount point to a volume.
28
29    Types of mount points
30
31    There  are  several  types  of  mount  points, because mount
32    points can vary along three dimensions.  The following  will
33    discuss  the  three  dimensions in turn, explaining how they
34    affect the  Cache  Manager's  interpretation  of  the  mount
35    point.
36
37    Dimension 1: Volume Type
38
39    The   first   dimension   concerns   which  type  of  volume
40    (ReadWrite, ReadOnly or Backup) is named in the mount point.
41    ReadOnly and Backup volumes are distinguished by a .readonly
42    or .backup extension, respectively.    When  a  mount  point
43    names  a  volume  with  either  extension, the Cache Manager
44    accesses the specified volume  only,  ignoring  Dimension  2
45    (the mount point's type).  In other words, the Cache Manager
46    will never access the ReadWrite version of a volume  if  the
47    mount point explicitly names the ReadOnly or Backup version.
48    If the named ReadOnly or Backup volume is inaccessible,  the
49    Cache Manager reports an error.
50
51    If  the  volume name does not include a .backup or .readonly
52    extension, then the volume is ReadWrite.  The Cache  Manager
53    considers Dimension 2.
54
55    Dimension 2: Mount Point Type
56
57    Note:   This  dimension  is  relevant  only  if  the  volume
58    indicated in the mount point is ReadWrite.  Only Dimension 1
59    is relevant if the named volume is ReadOnly or Backup.
60
61    The second dimension concerns whether the mount point itself
62    is "regular" or "ReadWrite":
63
64       - When the Cache Manager encounters a regular  mount
65
66
67
68         point (one naming a ReadWrite volume), it tries to
69         access a copy of the volume that is of  same  type
70         (ReadWrite or ReadOnly) as the volume which houses
71         the mount point.  If there is  no  volume  of  the
72         same  type,  it  will  access  the  type  that  is
73         available.
74
75         Almost all mount points are of  this  type.    Its
76         advantage  is  that  the  Cache Manager is free to
77         access the most  readily  available  form  of  the
78         volume.    When  the  Cache  Manager  starts  in a
79         ReadOnly volume, this type of  mount  point  means
80         that  it traverses a "ReadOnly path," which can be
81         efficient because no callbacks are necessary.
82
83         The  issuer  creates  a  regular  mount  point  by
84         providing   only   the   required  -dir  and  -vol
85         arguments.
86
87       - When the  Cache  Manager  encounters  a  ReadWrite
88         mount   point,  it  accesses  only  the  ReadWrite
89         version of the indicated volume.    (This  assumes
90         that  the  volume  does  not  have  a  .backup  or
91         .readonly  extension.    Mounting  a   Backup   or
92         ReadOnly  volume  with  a ReadWrite mount point is
93         possible but unnecessary,  as  the  Cache  Manager
94         handles those volume types in the same way whether
95         their mount point is regular or  ReadWrite.    See
96         Dimension 1.)
97
98         A ReadWrite mount point is generally used to mount
99         only one volume in a cell: its root.cell volume at
100         the  second  level  in  the  file tree, just below
101         /afs.  Conventionally, root.cell is  also  mounted
102         with  a regular mount point at the same level. The
103         two  mount  points  are   distinguished   by   the
104         placement   of  a  period  at  the  start  of  the
105         ReadWrite mount point's  name  (see  the  EXAMPLES
106         section).    The  existence  of  a ReadWrite mount
107         point   for   root.cell    allows    the    system
108         administrator  to  switch  onto a "ReadWrite" path
109         and thus be  sure  he  or  she  is  accessing  the
110         ReadWrite   version  of  a  volume  when  that  is
111         important.
112
113         The issuer creates  a  ReadWrite  mount  point  by
114         adding the -rw flag.
115
116    Dimension 3: Cellular versus Local
117
118    The  third  dimension concerns which cell the volume resides
119    in.  A cellular mount point indicates to the  Cache  Manager
120    that  the  volume  resides  in a foreign cell (and specifies
121    which one).  If the mount point is not  cellular,  then  the
122    Cache  Manager  assumes  that the volume resides in the same
123    cell as the mount point does.
124
125    Normally, cellular mount points are used only at the  second
126    level  in a cell's file tree (i.e., at the "cell" level just
127    below /afs), to mount  the  root.cell  volumes  for  foreign
128    cells  that  are  to  be  visible  in the local cell.  It is
129
130
131
132    possible to create  cellular  mount  points  (mount  foreign
133    volumes)  at  other  levels  in  the  tree.  Doing so is not
134    recommended,  however,  as  it  can  make  it  difficult  to
135    determine which cell a given pathname leads to.
136
137    Cellular mount points can be either regular or ReadWrite:
138
139       - A  regular cellular mount point not only tells the
140         Cache Manager to cross into a  foreign  cell,  but
141         also   to  access  the  ReadOnly  version  of  the
142         indicated volume if possible.   The  advantage  is
143         that the Cache Manager traverses a "ReadOnly path"
144         in the foreign cell, even if the mount  point  for
145         the   indicated  volume  resides  in  a  ReadWrite
146         volume.  This is particularly useful when crossing
147         into foreign cells that are too small to replicate
148         their root.afs volume.
149
150         To create a  regular  cellular  mount  point,  the
151         issuer uses the -cell argument to specify the cell
152         name, and adds the -root flag.
153
154       - A ReadWrite cellular mount point tells  the  Cache
155         Manager  to  cross  into a foreign cell and access
156         the ReadWrite version of the volume (assuming that
157         the  volume  does  not have a .backup or .readonly
158         extension).  Use of this type of  mount  point  is
159         discouraged,  because  accessing ReadWrite volumes
160         means the File Server has to issue  callbacks,  an
161         extra  load  it is not fair to impose from outside
162         the  cell.    In  general,  only  a   cell's   own
163         administrators   need   to  access  the  ReadWrite
164         version of a volume.
165
166         To create a ReadWrite cellular  mount  point,  the
167         issuer uses the -cell argument to specify the cell
168         name, and adds  both  the  -root  and  -rw  flags.
169         Because  this is not recommended, no example of it
170         appears below.
171
172    Mounting foreign volumes in foreign cells
173
174    In addition to mounting  volumes  in  the  local  cell,  the
175    fs mkmount  allows a user who possesses the necessary access
176    rights in a foreign cell to create a  regular,  non-cellular
177    mount point in a foreign cell's file tree while working on a
178    machine in his or her local  cell.    In  other  words,  the
179    issuer can mount a volume from a foreign cell in that cell's
180    file space as though he or she were working at a machine  in
181    that cell.
182
183    To  mount a foreign volume in foreign cell, specify the cell
184    name with -cell, but do not use the -root flag.
185
186
187
188    Distinguishing the types of mount points
189
190    The output of fs lsmount uses various symbols to distinguish
191    the different types of mount points.  See the Output section
192    of that command's description.
193
194 ARGUMENTS
195
196    -dir  names the directory to be created as a mount point  to
197          the  named  volume.   It should not already exist.  If
198          the issuer does not  specify  a  pathname,  the  mount
199          point  is  created  as  a  subdirectory of the current
200          working directory.
201
202    -vol  names the volume to be mounted.  Add the .readonly  or
203          .backup  extension  if  appropriate.   The volumeID is
204          also acceptable.
205
206          Note: When creating a cellular  mount  point,  do  not
207          specify the cell name as part of this argument, as was
208          necessary in previous versions of  AFS  that  did  not
209          have  the -root flag.  Instead, include the -root flag
210          and use the -cell argument to specify the  cell  name;
211          the command interpreter will automatically prepend the
212          cell name to the volume name, separating them  with  a
213          colon.
214
215    -cell names  the  cell  in  which  the volume resides.  When
216          creating a cellular mount point, combine this argument
217          with  the  -root flag.  When mounting a foreign volume
218          in a foreign cell, use this argument alone.
219
220    -rw   designates the mount point as ReadWrite, which  forces
221          the Cache Manager to access only the ReadWrite copy of
222          a volume that does not have  a  .backup  or  .readonly
223          extension.    Without  this  flag,  the mount point is
224          regular.
225
226    -fast indicates that the VL Server  should  not  check  that
227          there  is  a  VLDB entry for the volume to be mounted.
228          By default, the VL Server  does  check  and  prints  a
229          warning  message  if there is no VLDB entry; the mount
230          point is created in any case.
231
232    -root creates a cellular mount point.
233
234    -help prints the online help entry for this command.  Do not
235          provide  any  other  arguments or flags with this one.
236          See section 3.1  in  the  Reference  Manual  for  more
237          details.
238
239 EXAMPLES
240
241    Note:    These  examples  illustrate  only  the  recommended
242    combinations and use of arguments.  The  OUTPUT  section  of
243    fs lsmount's  description  shows what each mount point looks
244    like.
245
246    The following creates a regular  mount  point.    It  mounts
247    user.smith at /afs/transarc.com/usr/smith.
248
249
250
251    % cd /afs/transarc.com/usr  % fs mk smith user.smith
252
253
254
255    The  following  creates  both  a ReadWrite and regular mount
256    point for the Transarc Corporation cell's root.cell  volume,
257    in  that  cell's  file  tree.   It follows the convention of
258    putting a period at the beginning  of  the  ReadWrite  mount
259    point's name.
260
261    % fs mk /afs/transarc.com root.cell  % fs mk
262    /afs/.transarc.com root.cell -rw
263
264    The  following  mounts  the  root.cell  volume  belonging to
265    Carnegie Mellon University's Andrew  cell  in  the  Transarc
266    Corporation  cell's  file tree, creating a regular, cellular
267    mount  point  called  andrew.cmu.edu.    When   a   Transarc
268    Corporation  Cache  Manager  encounters this mount point, it
269    will cross into the Andrew cell on a ReadOnly path.
270
271    % fs mk /afs/andrew.cmu.edu root.cell -c andrew.cmu.edu
272    -root
273
274    The following illustrates the creation of a mount point in a
275    foreign  cell,  using  Transarc  Corporation's  regular cell
276    (transarc.com)  as  the  local  cell  and  its   test   cell
277    (test.transarc.com) as the foreign cell.  Suppose that while
278    working on a machine belonging to the transarc.com  cell,  a
279    Transarc Corporation user wants to mount a test.transarc.com
280    volume            called            user.test5            at
281    /afs/test.transarc.com/usr/test5.    She  has the INSERT and
282    ADMINISTER rights for /afs/test.transarc.com/usr.  Note that
283    the effect is just the same as if the issuer were working on
284    a  machine  belonging  to  the  test.transarc.com  cell  and
285    omitted the -c test.transarc.com part of the command.
286
287    % cd /afs/test.transarc.com/usr  % fs mk test5 user.test5 -c
288    test.transarc.com
289
290 PRIVILEGE REQUIRED
291
292    Issuer  must  have  INSERT  and  ADMINISTER  access  for the
293    directory that is to contain the mount point.
294
295 MORE INFORMATION
296
297    fs lsmount fs rmmount