quickstart-obsolete-appendices-20070423
[openafs.git] / doc / xml / QuickStartUnix / auqbg005.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <chapter id="HDRWQ17">
3   <title>Installing the First AFS Machine</title>
4
5   <indexterm>
6     <primary>file server machine</primary>
7
8     <seealso>first AFS machine</seealso>
9
10     <seealso>file server machine, additional</seealso>
11   </indexterm>
12
13   <indexterm>
14     <primary>instructions</primary>
15
16     <secondary>first AFS machine</secondary>
17   </indexterm>
18
19   <indexterm>
20     <primary>installing</primary>
21
22     <secondary>first AFS machine</secondary>
23   </indexterm>
24
25   <para>This chapter describes how to install the first AFS machine in your cell, configuring it as both a file server machine and a
26   client machine. After completing all procedures in this chapter, you can remove the client functionality if you wish, as described
27   in <link linkend="HDRWQ98">Removing Client Functionality</link>.</para>
28
29   <para>To install additional file server machines after completing this chapter, see <link linkend="HDRWQ99">Installing Additional
30   Server Machines</link>.</para>
31
32   <para>To install additional client machines after completing this chapter, see <link linkend="HDRWQ133">Installing Additional
33   Client Machines</link>. <indexterm>
34       <primary>requirements</primary>
35
36       <secondary>first AFS machine</secondary>
37     </indexterm></para>
38
39   <sect1 id="Header_29">
40     <title>Requirements and Configuration Decisions</title>
41
42     <para>The instructions in this chapter assume that you meet the following requirements. 
43       <itemizedlist>
44         <listitem>
45           <para>You are logged onto the machine's console as the local superuser <emphasis role="bold">root</emphasis></para>
46         </listitem>
47
48         <listitem>
49           <para>A standard version of one of the operating systems supported by the current version of AFS is running on the
50           machine</para>
51         </listitem>
52
53         <listitem>
54           <para>You have either installed the provided OpenAFS packages for 
55           your system, have access to a binary distribution tarball, or have 
56           successfully built OpenAFS from source</para>
57         </listitem>
58
59         <listitem>
60           <para>You have a Kerberos v5 realm running for your site. If you are
61           working with an existing cell which uses 
62           <emphasis role="bold">kaserver</emphasis> or Kerberos v4 for
63           authentication, please see 
64           <link linkend="KAS001">kaserver and Legacy Kerberos v4 Authentication</link>
65           for the modifications required to this installation procedure.</para>
66         </listitem>
67
68         <listitem>
69           <para>You have a NTP, or similar, time service deployed to ensure 
70           rough clock syncronistation between your clients and servers. If you
71           wish to use AFS's built in timeservice (which is deprecated) please
72           see Appendix B for the necessary modifications to this installation
73           procedure.</para>
74         </listitem>
75       </itemizedlist></para>
76
77     <para>You must make the following configuration decisions while installing the first AFS machine. To speed the installation
78     itself, it is best to make the decisions before beginning. See the chapter in the <emphasis>OpenAFS Administration
79     Guide</emphasis> about issues in cell administration and configuration for detailed guidelines. <indexterm>
80         <primary>cell name</primary>
81
82         <secondary>choosing</secondary>
83       </indexterm> <indexterm>
84         <primary>AFS filespace</primary>
85
86         <secondary>deciding how to configure</secondary>
87       </indexterm> <indexterm>
88         <primary>filespace</primary>
89
90         <see>AFS filespace</see>
91       </indexterm> <itemizedlist>
92         <listitem>
93           <para>Select the first AFS machine</para>
94         </listitem>
95
96         <listitem>
97           <para>Select the cell name</para>
98         </listitem>
99
100         <listitem>
101           <para>Decide which partitions or logical volumes to configure as AFS server partitions, and choose the directory names on
102           which to mount them</para>
103         </listitem>
104
105         <listitem>
106           <para>Decide how big to make the client cache</para>
107         </listitem>
108
109         <listitem>
110           <para>Decide how to configure the top levels of your cell's AFS filespace</para>
111         </listitem>
112       </itemizedlist></para>
113
114     <para>This chapter is divided into three large sections corresponding to the three parts of installing the first AFS machine.
115     Perform all of the steps in the order they appear. Each functional section begins with a summary of the procedures to perform.
116     The sections are as follows: <itemizedlist>
117         <listitem>
118           <para>Installing server functionality (begins in <link linkend="HDRWQ18">Overview: Installing Server
119           Functionality</link>)</para>
120         </listitem>
121
122         <listitem>
123           <para>Installing client functionality (begins in <link linkend="HDRWQ63">Overview: Installing Client
124           Functionality</link>)</para>
125         </listitem>
126
127         <listitem>
128           <para>Configuring your cell's filespace, establishing further security mechanisms, and enabling access to foreign cells
129           (begins in <link linkend="HDRWQ71">Overview: Completing the Installation of the First AFS Machine</link>)</para>
130         </listitem>
131       </itemizedlist></para>
132
133     <indexterm>
134       <primary>overview</primary>
135
136       <secondary>installing server functionality on first AFS machine</secondary>
137     </indexterm>
138
139     <indexterm>
140       <primary>first AFS machine</primary>
141
142       <secondary>server functionality</secondary>
143     </indexterm>
144
145     <indexterm>
146       <primary>installing</primary>
147
148       <secondary>server functionality</secondary>
149
150       <tertiary>first AFS machine</tertiary>
151     </indexterm>
152   </sect1>
153
154   <sect1 id="HDRWQ18">
155     <title>Overview: Installing Server Functionality</title>
156
157     <para>In the first phase of installing your cell's first AFS machine, you install file server and database server functionality
158     by performing the following procedures: 
159     <orderedlist>
160         <listitem>
161           <para>Choose which machine to install as the first AFS machine</para>
162         </listitem>
163
164         <listitem>
165           <para>Create AFS-related directories on the local disk</para>
166         </listitem>
167
168         <listitem>
169           <para>Incorporate AFS modifications into the machine's kernel</para>
170         </listitem>
171
172         <listitem>
173           <para>Configure partitions or logical volumes for storing AFS volumes</para>
174         </listitem>
175
176         <listitem>
177           <para>On some system types, install and configure an AFS-modified version of the <emphasis role="bold">fsck</emphasis>
178           program</para>
179         </listitem>
180
181         <listitem>
182           <para>If the machine is to remain a client machine, incorporate AFS into its authentication system</para>
183         </listitem>
184
185         <listitem>
186           <para>Start the Basic OverSeer (BOS) Server</para>
187         </listitem>
188
189         <listitem>
190           <para>Define the cell name and the machine's cell membership</para>
191         </listitem>
192
193         <listitem>
194           <para>Start the database server processes: Backup Server, Protection Server, and Volume Location
195           (VL) Server</para>
196         </listitem>
197
198         <listitem>
199           <para>Configure initial security mechanisms</para>
200         </listitem>
201
202         <listitem>
203           <para>Start the <emphasis role="bold">fs</emphasis> process, which incorporates three component processes: the File
204           Server, Volume Server, and Salvager</para>
205         </listitem>
206
207         <listitem>
208           <para>Start the server portion of the Update Server</para>
209         </listitem>
210
211       </orderedlist></para>
212   </sect1>
213
214   <sect1 id="HDRWQ19">
215     <title>Choosing the First AFS Machine</title>
216
217     <para>The first AFS machine you install must have sufficient disk space to store AFS volumes. To take best advantage of AFS's
218     capabilities, store client-side binaries as well as user files in volumes. When you later install additional file server
219     machines in your cell, you can distribute these volumes among the different machines as you see fit.</para>
220
221     <para>These instructions configure the first AFS machine as a <emphasis>database server machine</emphasis>, the <emphasis>binary
222     distribution machine</emphasis> for its system type, and the cell's <emphasis>system control machine</emphasis>. For a
223     description of these roles, see the <emphasis>OpenAFS Administration Guide</emphasis>.</para>
224
225     <para>Installation of additional machines is simplest if the first machine has the lowest IP address of any database server
226     machine you currently plan to install. If you later install database server functionality on a machine with a lower IP address,
227     you must first update the <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> file on all of your cell's client machines.
228     For more details, see <link linkend="HDRWQ114">Installing Database Server Functionality</link>.</para>
229   </sect1>
230
231   <sect1 id="Header_32">
232     <title>Creating AFS Directories</title>
233
234     <indexterm>
235       <primary>usr/afs directory</primary>
236
237       <secondary>first AFS machine</secondary>
238     </indexterm>
239
240     <indexterm>
241       <primary>first AFS machine</primary>
242
243       <secondary>/usr/afs directory</secondary>
244     </indexterm>
245
246     <indexterm>
247       <primary>creating</primary>
248
249       <secondary>/usr/afs directory</secondary>
250
251       <tertiary>first AFS machine</tertiary>
252     </indexterm>
253
254     <indexterm>
255       <primary>usr/vice/etc directory</primary>
256
257       <secondary>first AFS machine</secondary>
258     </indexterm>
259
260     <indexterm>
261       <primary>first AFS machine</primary>
262
263       <secondary>/usr/vice/etc directory</secondary>
264     </indexterm>
265
266     <indexterm>
267       <primary>creating</primary>
268
269       <secondary>/usr/vice/etc directory</secondary>
270
271       <tertiary>first AFS machine</tertiary>
272     </indexterm>
273
274     <indexterm>
275       <primary>/ as start to file and directory names</primary>
276
277       <secondary>see alphabetized entries without initial slash</secondary>
278     </indexterm>
279
280     <para>If you are installing from packages (such as Debian .deb or 
281     Fedora/SuSe .rpm files), you should now install all of the available 
282     OpenAFS packages for your system type. Typically, these will include 
283     packages for client and server functionality, and a seperate package 
284     containing a suitable kernel module for your running kernel. Consult 
285     the package lists on the OpenAFS website to determine the packages 
286     appropriate for your system.</para>
287
288     <para>If you are installing from a tarfile, or from a locally compiled 
289     source tree you should create the <emphasis role="bold">/usr/afs</emphasis>
290     and <emphasis role="bold">/usr/vice/etc</emphasis> directories on the
291     local disk, to house server and client files respectively. Subsequent 
292     instructions copy files from the distribution tarfile into them. </para>
293 <programlisting>
294    # <emphasis role="bold">mkdir /usr/afs</emphasis>
295    # <emphasis role="bold">mkdir /usr/vice</emphasis>
296    # <emphasis role="bold">mkdir /usr/vice/etc</emphasis>
297 </programlisting>
298   </sect1>
299
300   <sect1 id="HDRWQ20">
301     <title>Performing Platform-Specific Procedures</title>
302
303     <para>Several of the initial procedures for installing a file server machine differ for each system type. For convenience, the
304     following sections group them together for each system type: <itemizedlist>
305         <indexterm>
306           <primary>kernel extensions</primary>
307
308           <see>AFS kernel extensions</see>
309         </indexterm>
310
311         <indexterm>
312           <primary>loading AFS kernel extensions</primary>
313
314           <see>incorporating</see>
315         </indexterm>
316
317         <indexterm>
318           <primary>building</primary>
319
320           <secondary>AFS extensions into kernel</secondary>
321
322           <see>incorporating AFS kernel extensions</see>
323         </indexterm>
324
325         <listitem>
326           <para>Incorporate AFS modifications into the kernel.</para>
327
328           <para>The kernel on every AFS client machine and, on some systems, 
329           the AFS fileservers, must incorporate AFS extensions. On machines 
330           that use a dynamic kernel module loader, it is conventional to 
331           alter the machine's initialization script to load the AFS extensions
332           at each reboot. <indexterm>
333               <primary>AFS server partition</primary>
334
335               <secondary>mounted on /vicep directory</secondary>
336             </indexterm> <indexterm>
337               <primary>partition</primary>
338
339               <see>AFS server partition</see>
340             </indexterm> <indexterm>
341               <primary>logical volume</primary>
342
343               <see>AFS server partition</see>
344             </indexterm> <indexterm>
345               <primary>requirements</primary>
346
347               <secondary>AFS server partition name and location</secondary>
348             </indexterm> <indexterm>
349               <primary>naming conventions for AFS server partition</primary>
350             </indexterm> <indexterm>
351               <primary>vicep<emphasis>xx</emphasis> directory</primary>
352
353               <see>AFS server partition</see>
354             </indexterm> <indexterm>
355               <primary>directories</primary>
356
357               <secondary>/vicep<emphasis>xx</emphasis></secondary>
358
359               <see>AFS server partition</see>
360             </indexterm></para>
361         </listitem>
362
363         <listitem>
364           <para>Configure server partitions or logical volumes to house AFS volumes.</para>
365
366           <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes
367           (for convenience, the documentation hereafter refers to partitions only). Each server partition is mounted at a directory
368           named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where <replaceable>xx</replaceable> is one or
369           two lowercase letters. By convention, the first 26 partitions are mounted on the directories called <emphasis
370           role="bold">/vicepa</emphasis> through <emphasis role="bold">/vicepz</emphasis>, the 27th one is mounted on the <emphasis
371           role="bold">/vicepaa</emphasis> directory, and so on through <emphasis role="bold">/vicepaz</emphasis> and <emphasis
372           role="bold">/vicepba</emphasis>, continuing up to the index corresponding to the maximum number of server partitions
373           supported in the current version of AFS (which is specified in the <emphasis>OpenAFS Release Notes</emphasis>).</para>
374
375           <para>The <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server
376           machine's root directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is
377           not an acceptable directory location).</para>
378
379           <para>You can also add or remove server partitions on an existing file server machine. For instructions, see the chapter
380           in the <emphasis>OpenAFS Administration Guide</emphasis> about maintaining server machines.</para>
381
382           <note>
383             <para>Not all file system types supported by an operating system are necessarily supported as AFS server partitions. For
384             possible restrictions, see the <emphasis>OpenAFS Release Notes</emphasis>.</para>
385           </note>
386         </listitem>
387
388         <listitem>
389           <para>On some system types, install and configure a modified <emphasis role="bold">fsck</emphasis> program which
390           recognizes the structures that the File Server uses to organize volume data on AFS server partitions. The <emphasis
391           role="bold">fsck</emphasis> program provided with the operating system does not understand the AFS data structures, and so
392           removes them to the <emphasis role="bold">lost+found</emphasis> directory.</para>
393         </listitem>
394
395         <listitem>
396           <para>If the machine is to remain an AFS client machine, modify the machine's authentication system so that users obtain
397           an AFS token as they log into the local file system. Using AFS is simpler and more convenient for your users if you make
398           the modifications on all client machines. Otherwise, users must perform a two or three step login procedure (login to the local
399           system, then obtain Kerberos credentials, and then issue the <emphasis role="bold">aklog</emphasis> command). For further discussion of AFS
400           authentication, see the chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration and
401           administration issues.</para>
402         </listitem>
403       </itemizedlist></para>
404
405     <para>To continue, proceed to the appropriate section: <itemizedlist>
406         <listitem>
407           <para><link linkend="HDRWQ21">Getting Started on AIX Systems</link></para>
408         </listitem>
409
410         <listitem>
411           <para><link linkend="HDRWQ31">Getting Started on HP-UX Systems</link></para>
412         </listitem>
413
414         <listitem>
415           <para><link linkend="HDRWQ36">Getting Started on IRIX Systems</link></para>
416         </listitem>
417
418         <listitem>
419           <para><link linkend="HDRWQ41">Getting Started on Linux Systems</link></para>
420         </listitem>
421
422         <listitem>
423           <para><link linkend="HDRWQ45">Getting Started on Solaris Systems</link></para>
424         </listitem>
425       </itemizedlist></para>
426   </sect1>
427
428   <sect1 id="HDRWQ21">
429     <title>Getting Started on AIX Systems</title>
430
431     <para>Begin by running the AFS initialization script to call the AIX kernel extension facility, which dynamically loads AFS
432     modifications into the kernel. Then use the <emphasis role="bold">SMIT</emphasis> program to configure partitions for storing
433     AFS volumes, and replace the AIX <emphasis role="bold">fsck</emphasis> program helper with a version that correctly handles AFS
434     volumes. If the machine is to remain an AFS client machine, incorporate AFS into the AIX secondary authentication system.
435     <indexterm>
436         <primary>incorporating AFS kernel extensions</primary>
437
438         <secondary>first AFS machine</secondary>
439
440         <tertiary>AIX</tertiary>
441       </indexterm> <indexterm>
442         <primary>AFS kernel extensions</primary>
443
444         <secondary>on first AFS machine</secondary>
445
446         <tertiary>AIX</tertiary>
447       </indexterm> <indexterm>
448         <primary>first AFS machine</primary>
449
450         <secondary>AFS kernel extensions</secondary>
451
452         <tertiary>on AIX</tertiary>
453       </indexterm> <indexterm>
454         <primary>AIX</primary>
455
456         <secondary>AFS kernel extensions</secondary>
457
458         <tertiary>on first AFS machine</tertiary>
459       </indexterm></para>
460
461     <sect2 id="HDRWQ22">
462       <title>Loading AFS into the AIX Kernel</title>
463
464       <para>The AIX kernel extension facility is the dynamic kernel loader
465       provided by IBM Corporation.  AIX does not support incorporation of
466       AFS modifications during a kernel build.</para>
467
468       <para>For AFS to function correctly, the kernel extension facility must run each time the machine reboots, so the AFS
469       initialization script (included in the AFS distribution) invokes it automatically. In this section you copy the script to the
470       conventional location and edit it to select the appropriate options depending on whether NFS is also to run.</para>
471
472       <para>After editing the script, you run it to incorporate AFS into the kernel. In later sections you verify that the script
473       correctly initializes all AFS components, then configure the AIX <emphasis role="bold">inittab</emphasis> file so that the
474       script runs automatically at reboot. <orderedlist>
475           <listitem>
476             <para>Unpack the distribution tarball. The examples below assume 
477             that you have unpacked the files into the 
478             <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you 
479             pick a different location, substitute this in all of the following 
480             examples. Once you have unpacked the distribution, 
481             change directory as indicated.
482 <programlisting>
483    # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/root.client/usr/vice/etc</emphasis>
484 </programlisting></para>
485           </listitem>
486
487           <listitem>
488             <para>Copy the AFS kernel library files to the local <emphasis role="bold">/usr/vice/etc/dkload</emphasis> directory,
489             and the AFS initialization script to the <emphasis role="bold">/etc</emphasis> directory. <programlisting>
490    # <emphasis role="bold">cp -rp  dkload  /usr/vice/etc</emphasis>
491    # <emphasis role="bold">cp -p  rc.afs  /etc/rc.afs</emphasis>
492 </programlisting></para>
493           </listitem>
494
495           <listitem>
496             <para>Edit the <emphasis role="bold">/etc/rc.afs</emphasis> script, setting the <computeroutput>NFS</computeroutput>
497             variable as indicated.</para>
498
499             <para>If the machine is not to function as an NFS/AFS Translator, set the <computeroutput>NFS</computeroutput> variable
500             as follows.</para>
501
502             <programlisting>
503    NFS=$NFS_NONE
504 </programlisting>
505
506             <para>If the machine is to function as an NFS/AFS Translator and is running AIX 4.2.1 or higher, set the
507             <computeroutput>NFS</computeroutput> variable as follows. Note that NFS must already be loaded into the kernel, which
508             happens automatically on systems running AIX 4.1.1 and later, as long as the file <emphasis
509             role="bold">/etc/exports</emphasis> exists.</para>
510
511             <programlisting>
512    NFS=$NFS_IAUTH
513 </programlisting>
514           </listitem>
515
516           <listitem>
517             <para>Invoke the <emphasis role="bold">/etc/rc.afs</emphasis> script to load AFS modifications into the kernel. You can
518             ignore any error messages about the inability to start the BOS Server or the Cache Manager or AFS client.
519             <programlisting>
520    # <emphasis role="bold">/etc/rc.afs</emphasis>
521 </programlisting></para>
522           </listitem>
523         </orderedlist></para>
524
525       <indexterm>
526         <primary>configuring</primary>
527
528         <secondary>AFS server partition on first AFS machine</secondary>
529
530         <tertiary>AIX</tertiary>
531       </indexterm>
532
533       <indexterm>
534         <primary>AFS server partition</primary>
535
536         <secondary>configuring on first AFS machine</secondary>
537
538         <tertiary>AIX</tertiary>
539       </indexterm>
540
541       <indexterm>
542         <primary>first AFS machine</primary>
543
544         <secondary>AFS server partition</secondary>
545
546         <tertiary>on AIX</tertiary>
547       </indexterm>
548
549       <indexterm>
550         <primary>AIX</primary>
551
552         <secondary>AFS server partition</secondary>
553
554         <tertiary>on first AFS machine</tertiary>
555       </indexterm>
556     </sect2>
557
558     <sect2 id="HDRWQ23">
559       <title>Configuring Server Partitions on AIX Systems</title>
560
561       <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
562       server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
563       <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
564       role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
565       directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
566       directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific
567       Procedures</link>.</para>
568
569       <para>To configure server partitions on an AIX system, perform the following procedures: <orderedlist>
570           <listitem>
571             <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
572             partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
573    # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
574 </programlisting></para>
575           </listitem>
576
577           <listitem>
578             <para>Use the <emphasis role="bold">SMIT</emphasis> program to create a journaling file system on each partition to be
579             configured as an AFS server partition.</para>
580           </listitem>
581
582           <listitem>
583             <para>Mount each partition at one of the <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>
584             directories. Choose one of the following three methods: <itemizedlist>
585                 <listitem>
586                   <para>Use the <emphasis role="bold">SMIT</emphasis> program</para>
587                 </listitem>
588
589                 <listitem>
590                   <para>Use the <emphasis role="bold">mount -a</emphasis> command to mount all partitions at once</para>
591                 </listitem>
592
593                 <listitem>
594                   <para>Use the <emphasis role="bold">mount</emphasis> command on each partition in turn</para>
595                 </listitem>
596               </itemizedlist></para>
597
598             <para>Also configure the partitions so that they are mounted automatically at each reboot. For more information, refer
599             to the AIX documentation.</para>
600           </listitem>
601         </orderedlist></para>
602
603       <indexterm>
604         <primary>replacing fsck program</primary>
605
606         <secondary>first AFS machine</secondary>
607
608         <tertiary>AIX</tertiary>
609       </indexterm>
610
611       <indexterm>
612         <primary>fsck program</primary>
613
614         <secondary>on first AFS machine</secondary>
615
616         <tertiary>AIX</tertiary>
617       </indexterm>
618
619       <indexterm>
620         <primary>first AFS machine</primary>
621
622         <secondary>fsck program</secondary>
623
624         <tertiary>on AIX</tertiary>
625       </indexterm>
626
627       <indexterm>
628         <primary>AIX</primary>
629
630         <secondary>fsck program</secondary>
631
632         <tertiary>on first AFS machine</tertiary>
633       </indexterm>
634     </sect2>
635
636     <sect2 id="HDRWQ24">
637       <title>Replacing the fsck Program Helper on AIX Systems</title>
638
639       <note><para>The AFS modified fsck program is not required on AIX 5.1 
640       systems, and the <emphasis role="bold">v3fshelper</emphasis> program
641       refered to below is not shipped for these systems.</para></note>
642       
643       <para>In this section, you make modifications to guarantee that the appropriate <emphasis role="bold">fsck</emphasis> program
644       runs on AFS server partitions. The <emphasis role="bold">fsck</emphasis> program provided with the operating system must never
645       run on AFS server partitions. Because it does not recognize the structures that the File Server uses to organize volume data,
646       it removes all of the data. To repeat:</para>
647
648       <para><emphasis role="bold">Never run the standard fsck program on AFS server partitions. It discards AFS
649       volumes.</emphasis></para>
650
651       <para>On AIX systems, you do not replace the <emphasis role="bold">fsck</emphasis> binary itself, but rather the
652       <emphasis>program helper</emphasis> file included in the AIX distribution as <emphasis
653       role="bold">/sbin/helpers/v3fshelper</emphasis>. <orderedlist>
654           <listitem>
655             <para>Move the AIX <emphasis role="bold">fsck</emphasis> program helper to a safe location and install the version from
656             the AFS distribution in its place. 
657 <programlisting>
658    # <emphasis role="bold">cd /sbin/helpers</emphasis>
659    # <emphasis role="bold">mv v3fshelper v3fshelper.noafs</emphasis>
660    # <emphasis role="bold">cp -p /tmp/afsdist/rs_aix42/root.server/etc/v3fshelper v3fshelper</emphasis>
661 </programlisting></para>
662           </listitem>
663
664           <listitem>
665             <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
666             linkend="HDRWQ25">Enabling AFS Login on AIX Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
667             BOS Server</link>.</para>
668           </listitem>
669         </orderedlist></para>
670
671       <indexterm>
672         <primary>enabling AFS login</primary>
673
674         <secondary>file server machine</secondary>
675
676         <tertiary>AIX</tertiary>
677       </indexterm>
678
679       <indexterm>
680         <primary>AFS login</primary>
681
682         <secondary>on file server machine</secondary>
683
684         <tertiary>AIX</tertiary>
685       </indexterm>
686
687       <indexterm>
688         <primary>first AFS machine</primary>
689
690         <secondary>AFS login</secondary>
691
692         <tertiary>on AIX</tertiary>
693       </indexterm>
694
695       <indexterm>
696         <primary>AIX</primary>
697
698         <secondary>AFS login</secondary>
699
700         <tertiary>on file server machine</tertiary>
701       </indexterm>
702
703       <indexterm>
704         <primary>secondary authentication system (AIX)</primary>
705
706         <secondary>server machine</secondary>
707       </indexterm>
708     </sect2>
709
710     <sect2 id="HDRWQ25">
711       <title>Enabling AFS Login on AIX Systems</title>
712
713       <note>
714         <para>If you plan to remove client functionality from this machine after completing the installation, skip this section and
715         proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
716       </note>
717
718       <para>In modern AFS installations, you should be using Kerberos v5
719       for user login, and obtaining AFS tokens following this authentication
720       step.</para>
721       
722       <para>There are currently no instructions available on configuring AIX to
723       automatically obtain AFS tokens at login. Following login, users can 
724       obtain tokens by running the <emphasis role="bold">aklog</emphasis> 
725       command</para>
726      
727       <para>Sites which still require <emphasis role="bold">kaserver</emphasis>
728       or external Kerberos v4 authentication should consult 
729       <link linkend="KAS012">Enabling kaserver based AFS login on AIX systems</link>
730       for details of how to enable AIX login.</para>
731       
732       <para>Proceed to <link linkend="HDRWQ50">Starting the BOS Server</link> 
733       (or if referring to these instructions while installing an additional 
734       file server machine, return to <link linkend="HDRWQ108">Starting Server
735       Programs</link>).</para>
736     </sect2>
737   </sect1>
738
739   <sect1 id="HDRWQ31">
740     <title>Getting Started on HP-UX Systems</title>
741
742     <para>Begin by building AFS modifications into a new kernel; HP-UX does not support dynamic loading. Then create partitions for
743     storing AFS volumes, and install and configure the AFS-modified <emphasis role="bold">fsck</emphasis> program to run on AFS
744     server partitions. If the machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable
745     Authentication Module (PAM) scheme. <indexterm>
746         <primary>incorporating AFS kernel extensions</primary>
747
748         <secondary>first AFS machine</secondary>
749
750         <tertiary>HP-UX</tertiary>
751       </indexterm> <indexterm>
752         <primary>AFS kernel extensions</primary>
753
754         <secondary>on first AFS machine</secondary>
755
756         <tertiary>HP-UX</tertiary>
757       </indexterm> <indexterm>
758         <primary>first AFS machine</primary>
759
760         <secondary>AFS kernel extensions</secondary>
761
762         <tertiary>on HP-UX</tertiary>
763       </indexterm> <indexterm>
764         <primary>HP-UX</primary>
765
766         <secondary>AFS-modified kernel</secondary>
767
768         <tertiary>on first AFS machine</tertiary>
769       </indexterm></para>
770
771     <sect2 id="HDRWQ32">
772       <title>Building AFS into the HP-UX Kernel</title>
773
774       <para>Use the following instructions to build AFS modifications into the kernel on an HP-UX system. <orderedlist>
775           <listitem>
776             <para>Move the existing kernel-related files to a safe location. <programlisting>
777    # <emphasis role="bold">cp /stand/vmunix /stand/vmunix.noafs</emphasis>
778    # <emphasis role="bold">cp /stand/system /stand/system.noafs</emphasis>
779 </programlisting></para>
780           </listitem>
781
782           <listitem>
783             <para>Unpack the OpenAFS HP-UX distribution tarball. The examples 
784             below assume that you have unpacked the files into the 
785             <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you 
786             pick a different location, substitute this in all of the following 
787             examples. Once you have unpacked the distribution, change directory 
788             as indicated.
789             <programlisting>
790    # <emphasis role="bold">cd /tmp/afsdist/hp_ux110/root.client</emphasis>
791 </programlisting></para>
792           </listitem>
793
794           <listitem>
795             <para>Copy the AFS initialization file to the local directory for initialization files (by convention, <emphasis
796             role="bold">/sbin/init.d</emphasis> on HP-UX machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
797             extension as you copy the file. <programlisting>
798    # <emphasis role="bold">cp usr/vice/etc/afs.rc  /sbin/init.d/afs</emphasis>
799 </programlisting></para>
800           </listitem>
801
802           <listitem>
803             <para>Copy the file <emphasis role="bold">afs.driver</emphasis> to the local <emphasis
804             role="bold">/usr/conf/master.d</emphasis> directory, changing its name to <emphasis role="bold">afs</emphasis> as you
805             do. <programlisting>
806    # <emphasis role="bold">cp  usr/vice/etc/afs.driver  /usr/conf/master.d/afs</emphasis>
807 </programlisting></para>
808           </listitem>
809
810           <listitem>
811             <para>Copy the AFS kernel module to the local <emphasis role="bold">/usr/conf/lib</emphasis> directory.</para>
812
813             <para>If the machine's kernel supports NFS server functionality:</para>
814
815             <programlisting>
816    # <emphasis role="bold">cp bin/libafs.a /usr/conf/lib</emphasis>   
817 </programlisting>
818
819             <para>If the machine's kernel does not support NFS server functionality, change the file's name as you copy it:</para>
820
821             <programlisting>
822    # <emphasis role="bold">cp bin/libafs.nonfs.a /usr/conf/lib/libafs.a</emphasis>
823 </programlisting>
824           </listitem>
825
826           <listitem>
827             <para>Incorporate the AFS driver into the kernel, either using the <emphasis role="bold">SAM</emphasis> program or a
828             series of individual commands. <itemizedlist>
829                 <listitem>
830                   <para>To use the <emphasis role="bold">SAM</emphasis> program: <orderedlist>
831                       <listitem>
832                         <para>Invoke the <emphasis role="bold">SAM</emphasis> program, specifying the hostname of the local machine
833                         as <replaceable>local_hostname</replaceable>. The <emphasis role="bold">SAM</emphasis> graphical user
834                         interface pops up. <programlisting>
835    # <emphasis role="bold">sam -display</emphasis> <replaceable>local_hostname</replaceable><emphasis role="bold">:0</emphasis> 
836 </programlisting></para>
837                       </listitem>
838
839                       <listitem>
840                         <para>Choose the <emphasis role="bold">Kernel Configuration</emphasis> icon, then the <emphasis
841                         role="bold">Drivers</emphasis> icon. From the list of drivers, select <emphasis
842                         role="bold">afs</emphasis>.</para>
843                       </listitem>
844
845                       <listitem>
846                         <para>Open the pull-down <emphasis role="bold">Actions</emphasis> menu and choose the <emphasis
847                         role="bold">Add Driver to Kernel</emphasis> option.</para>
848                       </listitem>
849
850                       <listitem>
851                         <para>Open the <emphasis role="bold">Actions</emphasis> menu again and choose the <emphasis
852                         role="bold">Create a New Kernel</emphasis> option.</para>
853                       </listitem>
854
855                       <listitem>
856                         <para>Confirm your choices by choosing <emphasis role="bold">Yes</emphasis> and <emphasis
857                         role="bold">OK</emphasis> when prompted by subsequent pop-up windows. The <emphasis
858                         role="bold">SAM</emphasis> program builds the kernel and reboots the system.</para>
859                       </listitem>
860
861                       <listitem>
862                         <para>Login again as the superuser <emphasis role="bold">root</emphasis>. <programlisting>
863    login: <emphasis role="bold">root</emphasis>
864    Password: <replaceable>root_password</replaceable>
865 </programlisting></para>
866                       </listitem>
867                     </orderedlist></para>
868                 </listitem>
869
870                 <listitem>
871                   <para>To use individual commands: <orderedlist>
872                       <listitem>
873                         <para>Edit the file <emphasis role="bold">/stand/system</emphasis>, adding an entry for <emphasis
874                         role="bold">afs</emphasis> to the <computeroutput>Subsystems</computeroutput> section.</para>
875                       </listitem>
876
877                       <listitem>
878                         <para>Change to the <emphasis role="bold">/stand/build</emphasis> directory and issue the <emphasis
879                         role="bold">mk_kernel</emphasis> command to build the kernel. <programlisting>
880    # <emphasis role="bold">cd /stand/build</emphasis>
881    # <emphasis role="bold">mk_kernel</emphasis>
882 </programlisting></para>
883                       </listitem>
884
885                       <listitem>
886                         <para>Move the new kernel to the standard location (<emphasis role="bold">/stand/vmunix</emphasis>), reboot
887                         the machine to start using it, and login again as the superuser <emphasis role="bold">root</emphasis>.
888                         <programlisting>
889    # <emphasis role="bold">mv /stand/build/vmunix_test /stand/vmunix</emphasis>
890    # <emphasis role="bold">cd /</emphasis>
891    # <emphasis role="bold">shutdown -r now</emphasis>             
892    login: <emphasis role="bold">root</emphasis>
893    Password: <replaceable>root_password</replaceable>
894 </programlisting></para>
895                       </listitem>
896                     </orderedlist></para>
897                 </listitem>
898               </itemizedlist></para>
899           </listitem>
900         </orderedlist></para>
901
902       <indexterm>
903         <primary>configuring</primary>
904
905         <secondary>AFS server partition on first AFS machine</secondary>
906
907         <tertiary>HP-UX</tertiary>
908       </indexterm>
909
910       <indexterm>
911         <primary>AFS server partition</primary>
912
913         <secondary>configuring on first AFS machine</secondary>
914
915         <tertiary>HP-UX</tertiary>
916       </indexterm>
917
918       <indexterm>
919         <primary>first AFS machine</primary>
920
921         <secondary>AFS server partition</secondary>
922
923         <tertiary>on HP-UX</tertiary>
924       </indexterm>
925
926       <indexterm>
927         <primary>HP-UX</primary>
928
929         <secondary>AFS server partition</secondary>
930
931         <tertiary>on first AFS machine</tertiary>
932       </indexterm>
933     </sect2>
934
935     <sect2 id="HDRWQ33">
936       <title>Configuring Server Partitions on HP-UX Systems</title>
937
938       <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
939       server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
940       <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
941       role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
942       directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
943       directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific Procedures</link>.
944       <orderedlist>
945           <listitem>
946             <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
947             partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
948    # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
949 </programlisting></para>
950           </listitem>
951
952           <listitem>
953             <para>Use the <emphasis role="bold">SAM</emphasis> program to create a file system on each partition. For instructions,
954             consult the HP-UX documentation.</para>
955           </listitem>
956
957           <listitem>
958             <para>On some HP-UX systems that use logical volumes, the <emphasis role="bold">SAM</emphasis> program automatically
959             mounts the partitions. If it has not, mount each partition by issuing either the <emphasis role="bold">mount
960             -a</emphasis> command to mount all partitions at once or the <emphasis role="bold">mount</emphasis> command to mount
961             each partition in turn.</para>
962           </listitem>
963         </orderedlist></para>
964
965       <indexterm>
966         <primary>replacing fsck program</primary>
967
968         <secondary>first AFS machine</secondary>
969
970         <tertiary>HP-UX</tertiary>
971       </indexterm>
972
973       <indexterm>
974         <primary>fsck program</primary>
975
976         <secondary>on first AFS machine</secondary>
977
978         <tertiary>HP-UX</tertiary>
979       </indexterm>
980
981       <indexterm>
982         <primary>first AFS machine</primary>
983
984         <secondary>fsck program</secondary>
985
986         <tertiary>on HP-UX</tertiary>
987       </indexterm>
988
989       <indexterm>
990         <primary>HP-UX</primary>
991
992         <secondary>fsck program</secondary>
993
994         <tertiary>on first AFS machine</tertiary>
995       </indexterm>
996     </sect2>
997
998     <sect2 id="HDRWQ34">
999       <title>Configuring the AFS-modified fsck Program on HP-UX Systems</title>
1000
1001       <para>In this section, you make modifications to guarantee that the appropriate <emphasis role="bold">fsck</emphasis> program
1002       runs on AFS server partitions. The <emphasis role="bold">fsck</emphasis> program provided with the operating system must never
1003       run on AFS server partitions. Because it does not recognize the structures that the File Server uses to organize volume data,
1004       it removes all of the data. To repeat:</para>
1005
1006       <para><emphasis role="bold">Never run the standard fsck program on AFS server partitions. It discards AFS
1007       volumes.</emphasis></para>
1008
1009       <para>On HP-UX systems, there are several configuration files to install in addition to the AFS-modified <emphasis
1010       role="bold">fsck</emphasis> program (the <emphasis role="bold">vfsck</emphasis> binary). <orderedlist>
1011           <listitem>
1012             <para>Create the command configuration file <emphasis role="bold">/sbin/lib/mfsconfig.d/afs</emphasis>. Use a text
1013             editor to place the indicated two lines in it: <programlisting>
1014    format_revision 1
1015    fsck            0        m,P,p,d,f,b:c:y,n,Y,N,q,
1016 </programlisting></para>
1017           </listitem>
1018
1019           <listitem>
1020             <para>Create and change directory to an AFS-specific command directory called <emphasis
1021             role="bold">/sbin/fs/afs</emphasis>. <programlisting>
1022    # <emphasis role="bold">mkdir /sbin/fs/afs</emphasis>
1023    # <emphasis role="bold">cd  /sbin/fs/afs</emphasis>
1024 </programlisting></para>
1025           </listitem>
1026
1027           <listitem>
1028             <para>Copy the AFS-modified version of the <emphasis role="bold">fsck</emphasis> program (the <emphasis
1029             role="bold">vfsck</emphasis> binary) and related files from the distribution directory to the new AFS-specific command
1030             directory. <programlisting>
1031    # <emphasis role="bold">cp -p /tmp/afsdist/hp_ux110/root.server/etc/*  .</emphasis>
1032 </programlisting></para>
1033           </listitem>
1034
1035           <listitem>
1036             <para>Change the <emphasis role="bold">vfsck</emphasis> binary's name to <emphasis role="bold">fsck</emphasis> and set
1037             the mode bits appropriately on all of the files in the <emphasis role="bold">/sbin/fs/afs</emphasis> directory.
1038             <programlisting>
1039    # <emphasis role="bold">mv  vfsck  fsck</emphasis>
1040    # <emphasis role="bold">chmod  755  *</emphasis>
1041 </programlisting></para>
1042           </listitem>
1043
1044           <listitem>
1045             <para>Edit the <emphasis role="bold">/etc/fstab</emphasis> file, changing the file system type for each AFS server
1046             partition from <computeroutput>hfs</computeroutput> to <computeroutput>afs</computeroutput>. This ensures that the
1047             AFS-modified <emphasis role="bold">fsck</emphasis> program runs on the appropriate partitions.</para>
1048
1049             <para>The sixth line in the following example of an edited file shows an AFS server partition, <emphasis
1050             role="bold">/vicepa</emphasis>.</para>
1051
1052             <programlisting>
1053    /dev/vg00/lvol1 / hfs defaults 0 1
1054    /dev/vg00/lvol4 /opt hfs defaults 0 2
1055    /dev/vg00/lvol5 /tmp hfs defaults 0 2
1056    /dev/vg00/lvol6 /usr hfs defaults 0 2
1057    /dev/vg00/lvol8 /var hfs defaults 0 2
1058    /dev/vg00/lvol9 /vicepa afs defaults 0 2
1059    /dev/vg00/lvol7 /usr/vice/cache hfs defaults 0 2
1060 </programlisting>
1061           </listitem>
1062
1063           <listitem>
1064             <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
1065             linkend="HDRWQ35">Enabling AFS Login on HP-UX Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
1066             BOS Server</link>.</para>
1067           </listitem>
1068         </orderedlist></para>
1069
1070       <indexterm>
1071         <primary>enabling AFS login</primary>
1072
1073         <secondary>file server machine</secondary>
1074
1075         <tertiary>HP-UX</tertiary>
1076       </indexterm>
1077
1078       <indexterm>
1079         <primary>AFS login</primary>
1080
1081         <secondary>on file server machine</secondary>
1082
1083         <tertiary>HP-UX</tertiary>
1084       </indexterm>
1085
1086       <indexterm>
1087         <primary>first AFS machine</primary>
1088
1089         <secondary>AFS login</secondary>
1090
1091         <tertiary>on HP-UX</tertiary>
1092       </indexterm>
1093
1094       <indexterm>
1095         <primary>HP-UX</primary>
1096
1097         <secondary>AFS login</secondary>
1098
1099         <tertiary>on file server machine</tertiary>
1100       </indexterm>
1101
1102       <indexterm>
1103         <primary>PAM</primary>
1104
1105         <secondary>on HP-UX</secondary>
1106
1107         <tertiary>file server machine</tertiary>
1108       </indexterm>
1109
1110       <indexterm>
1111         <primary>Pluggable Authentication Module</primary>
1112
1113         <see>PAM</see>
1114       </indexterm>
1115     </sect2>
1116
1117     <sect2 id="HDRWQ35">
1118       <title>Enabling AFS Login on HP-UX Systems</title>
1119
1120       <note><para>If you plan to remove client functionality from this machine after completing the installation, skip this section and proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para></note>
1121
1122       <para>At this point you incorporate AFS into the operating system's Pluggable Authentication Module (PAM) scheme. PAM
1123       integrates all authentication mechanisms on the machine, including login, to provide the security infrastructure for
1124       authenticated access to and from the machine.</para>
1125
1126       <para>In modern AFS installations, you should be using Kerberos v5
1127       for user login, and obtaining AFS tokens subsequent to this authentication
1128       step. OpenAFS does not currently distribute a PAM module allowing AFS 
1129       tokens to be automatically gained at login. Whilst there are a number of
1130       third party modules providing this functionality, it is not know if these 
1131       have been tested with HP/UX.</para>
1132       
1133       <para>Following login, users can 
1134       obtain tokens by running the <emphasis role="bold">aklog</emphasis> 
1135       command</para>
1136
1137       <para>Sites which still require <emphasis role="bold">kaserver</emphasis>
1138       or external Kerberos v4 authentication should consult 
1139       <link linkend="KAS013">Enabling kaserver based AFS login on HP-UX systems</link>
1140       for details of how to enable HP-UX login.</para>
1141
1142       <para>Proceed to <link linkend="HDRWQ50">Starting the BOS Server</link> 
1143       (or if referring to these instructions while installing an additional 
1144       file server machine, return to <link linkend="HDRWQ108">Starting Server
1145       Programs</link>).</para>      
1146     </sect2>
1147   </sect1>
1148
1149   <sect1 id="HDRWQ36">
1150     <title>Getting Started on IRIX Systems</title>
1151
1152     <indexterm>
1153       <primary>incorporating AFS kernel extensions</primary>
1154
1155       <secondary>first AFS machine</secondary>
1156
1157       <tertiary>IRIX</tertiary>
1158     </indexterm>
1159
1160     <indexterm>
1161       <primary>AFS kernel extensions</primary>
1162
1163       <secondary>on first AFS machine</secondary>
1164
1165       <tertiary>IRIX</tertiary>
1166     </indexterm>
1167
1168     <indexterm>
1169       <primary>first AFS machine</primary>
1170
1171       <secondary>AFS kernel extensions</secondary>
1172
1173       <tertiary>on IRIX</tertiary>
1174     </indexterm>
1175
1176     <indexterm>
1177       <primary>replacing fsck program</primary>
1178
1179       <secondary>not necessary on IRIX</secondary>
1180     </indexterm>
1181
1182     <indexterm>
1183       <primary>fsck program</primary>
1184
1185       <secondary>on first AFS machine</secondary>
1186
1187       <tertiary>IRIX</tertiary>
1188     </indexterm>
1189
1190     <indexterm>
1191       <primary>first AFS machine</primary>
1192
1193       <secondary>fsck program</secondary>
1194
1195       <tertiary>on IRIX</tertiary>
1196     </indexterm>
1197
1198     <indexterm>
1199       <primary>IRIX</primary>
1200
1201       <secondary>fsck program replacement not necessary</secondary>
1202     </indexterm>
1203
1204     <para>To incorporate AFS into the kernel on IRIX systems, choose one of two methods: <itemizedlist>
1205         <listitem>
1206           <para>Run the AFS initialization script to invoke the <emphasis role="bold">ml</emphasis> program distributed by Silicon
1207           Graphics, Incorporated (SGI), which dynamically loads AFS modifications into the kernel</para>
1208         </listitem>
1209
1210         <listitem>
1211           <para>Build a new static kernel</para>
1212         </listitem>
1213       </itemizedlist></para>
1214
1215     <para>Then create partitions for storing AFS volumes. You do not need to replace the IRIX <emphasis role="bold">fsck</emphasis>
1216     program because SGI has already modified it to handle AFS volumes properly. If the machine is to remain an AFS client machine,
1217     verify that the IRIX login utility installed on the machine grants an AFS token.</para>
1218
1219     <para>In preparation for either dynamic loading or kernel building, perform the following procedures: <orderedlist>
1220         <listitem>
1221           <para>Unpack the OpenAFS IRIX distribution tarball. The examples
1222           below assume that you have unpacked the files into the 
1223           <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you
1224           pick a different location, substitue this in all of the following
1225           examples. Once you have unpacked the distribution, change directory
1226           as indicated.
1227 <programlisting>
1228    # <emphasis role="bold">cd  /tmp/afsdist/sgi_65/root.client</emphasis>
1229 </programlisting></para>
1230         </listitem>
1231
1232         <listitem>
1233           <para>Copy the AFS initialization script to the local directory for initialization files (by convention, <emphasis
1234           role="bold">/etc/init.d</emphasis> on IRIX machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
1235           extension as you copy the script. <programlisting>
1236    # <emphasis role="bold">cp -p   usr/vice/etc/afs.rc  /etc/init.d/afs</emphasis>
1237 </programlisting></para>
1238         </listitem>
1239
1240         <listitem>
1241           <para>Issue the <emphasis role="bold">uname -m</emphasis> command to determine the machine's CPU board type. The <emphasis
1242           role="bold">IP</emphasis><replaceable>xx</replaceable> value in the output must match one of the supported CPU board types
1243           listed in the <emphasis>OpenAFS Release Notes</emphasis> for the current version of AFS. <programlisting>
1244    # <emphasis role="bold">uname -m</emphasis>
1245 </programlisting></para>
1246         </listitem>
1247
1248         <listitem>
1249           <para>Proceed to either <link linkend="HDRWQ37">Loading AFS into the IRIX Kernel</link> or <link
1250           linkend="HDRWQ38">Building AFS into the IRIX Kernel</link>.</para>
1251         </listitem>
1252       </orderedlist></para>
1253
1254     <indexterm>
1255       <primary>IRIX</primary>
1256
1257       <secondary>AFS kernel extensions</secondary>
1258
1259       <tertiary>on first AFS machine</tertiary>
1260     </indexterm>
1261
1262     <indexterm>
1263       <primary>afsml variable (IRIX)</primary>
1264
1265       <secondary>first AFS machine</secondary>
1266     </indexterm>
1267
1268     <indexterm>
1269       <primary>variables</primary>
1270
1271       <secondary>afsml (IRIX)</secondary>
1272
1273       <tertiary>first AFS machine</tertiary>
1274     </indexterm>
1275
1276     <indexterm>
1277       <primary>IRIX</primary>
1278
1279       <secondary>afsml variable</secondary>
1280
1281       <tertiary>first AFS machine</tertiary>
1282     </indexterm>
1283
1284     <indexterm>
1285       <primary>afsxnfs variable (IRIX)</primary>
1286
1287       <secondary>first AFS machine</secondary>
1288     </indexterm>
1289
1290     <indexterm>
1291       <primary>variables</primary>
1292
1293       <secondary>afsxnfs (IRIX)</secondary>
1294
1295       <tertiary>first AFS machine</tertiary>
1296     </indexterm>
1297
1298     <indexterm>
1299       <primary>IRIX</primary>
1300
1301       <secondary>afsxnfs variable</secondary>
1302
1303       <tertiary>first AFS machine</tertiary>
1304     </indexterm>
1305
1306     <sect2 id="HDRWQ37">
1307       <title>Loading AFS into the IRIX Kernel</title>
1308
1309       <para>The <emphasis role="bold">ml</emphasis> program is the dynamic kernel loader provided by SGI for IRIX systems. If you
1310       use it rather than building AFS modifications into a static kernel, then for AFS to function correctly the <emphasis
1311       role="bold">ml</emphasis> program must run each time the machine reboots. Therefore, the AFS initialization script (included
1312       on the AFS CD-ROM) invokes it automatically when the <emphasis role="bold">afsml</emphasis> configuration variable is
1313       activated. In this section you activate the variable and run the script.</para>
1314
1315       <para>In later sections you verify that the script correctly initializes all AFS components, then create the links that
1316       incorporate AFS into the IRIX startup and shutdown sequence. <orderedlist>
1317           <listitem>
1318             <para>Create the local <emphasis role="bold">/usr/vice/etc/sgiload</emphasis> directory to house the AFS kernel library
1319             file. <programlisting>
1320    # <emphasis role="bold">mkdir /usr/vice/etc/sgiload</emphasis>
1321 </programlisting></para>
1322           </listitem>
1323
1324           <listitem>
1325             <para>Copy the appropriate AFS kernel library file to the <emphasis role="bold">/usr/vice/etc/sgiload</emphasis>
1326             directory. The <emphasis role="bold">IP</emphasis><replaceable>xx</replaceable> portion of the library file name must
1327             match the value previously returned by the <emphasis role="bold">uname -m</emphasis> command. Also choose the file
1328             appropriate to whether the machine's kernel supports NFS server functionality (NFS must be supported for the machine to
1329             act as an NFS/AFS Translator). Single- and multiprocessor machines use the same library file.</para>
1330
1331             <para>(You can choose to copy all of the kernel library files into the <emphasis
1332             role="bold">/usr/vice/etc/sgiload</emphasis> directory, but they require a significant amount of space.)</para>
1333
1334             <para>If the machine's kernel supports NFS server functionality:</para>
1335
1336             <programlisting>
1337    # <emphasis role="bold">cp -p  usr/vice/etc/sgiload/libafs.IP</emphasis><replaceable>xx</replaceable><emphasis role="bold">.o  /usr/vice/etc/sgiload</emphasis>   
1338 </programlisting>
1339
1340             <para>If the machine's kernel does not support NFS server functionality:</para>
1341
1342             <programlisting>
1343    # <emphasis role="bold">cp -p  usr/vice/etc/sgiload/libafs.IP</emphasis><replaceable>xx</replaceable><emphasis role="bold">.nonfs.o</emphasis>   \
1344                    <emphasis role="bold">/usr/vice/etc/sgiload</emphasis>
1345 </programlisting>
1346           </listitem>
1347
1348           <listitem>
1349             <para>Issue the <emphasis role="bold">chkconfig</emphasis> command to activate the <emphasis
1350             role="bold">afsml</emphasis> configuration variable. <programlisting>
1351    # <emphasis role="bold">/etc/chkconfig -f afsml on</emphasis>   
1352 </programlisting></para>
1353
1354             <para>If the machine is to function as an NFS/AFS Translator and the kernel supports NFS server functionality, activate
1355             the <emphasis role="bold">afsxnfs</emphasis> variable.</para>
1356
1357             <programlisting>
1358    # <emphasis role="bold">/etc/chkconfig -f afsxnfs on</emphasis>
1359 </programlisting>
1360           </listitem>
1361
1362           <listitem>
1363             <para>Run the <emphasis role="bold">/etc/init.d/afs</emphasis> script to load AFS extensions into the kernel. The script
1364             invokes the <emphasis role="bold">ml</emphasis> command, automatically determining which kernel library file to use
1365             based on this machine's CPU type and the activation state of the <emphasis role="bold">afsxnfs</emphasis>
1366             variable.</para>
1367
1368             <para>You can ignore any error messages about the inability to start the BOS Server or the Cache Manager or AFS
1369             client.</para>
1370
1371             <programlisting>
1372    # <emphasis role="bold">/etc/init.d/afs start</emphasis>
1373 </programlisting>
1374           </listitem>
1375
1376           <listitem>
1377             <para>Proceed to <link linkend="HDRWQ39">Configuring Server Partitions on IRIX Systems</link>.</para>
1378           </listitem>
1379         </orderedlist></para>
1380
1381       <indexterm>
1382         <primary>IRIX</primary>
1383
1384         <secondary>AFS-modified kernel</secondary>
1385
1386         <tertiary>on first AFS machine</tertiary>
1387       </indexterm>
1388     </sect2>
1389
1390     <sect2 id="HDRWQ38">
1391       <title>Building AFS into the IRIX Kernel</title>
1392
1393       <para>Use the following instructions to build AFS modifications into the kernel on an IRIX system. <orderedlist>
1394           <listitem>
1395             <para>Copy the kernel initialization file <emphasis role="bold">afs.sm</emphasis> to the local <emphasis
1396             role="bold">/var/sysgen/system</emphasis> directory, and the kernel master file <emphasis role="bold">afs</emphasis> to
1397             the local <emphasis role="bold">/var/sysgen/master.d</emphasis> directory. <programlisting>
1398    # <emphasis role="bold">cp -p  bin/afs.sm  /var/sysgen/system</emphasis>
1399    # <emphasis role="bold">cp -p  bin/afs  /var/sysgen/master.d</emphasis>
1400 </programlisting></para>
1401           </listitem>
1402
1403           <listitem>
1404             <para>Copy the appropriate AFS kernel library file to the local file <emphasis
1405             role="bold">/var/sysgen/boot/afs.a</emphasis>; the <emphasis role="bold">IP</emphasis><replaceable>xx</replaceable>
1406             portion of the library file name must match the value previously returned by the <emphasis role="bold">uname
1407             -m</emphasis> command. Also choose the file appropriate to whether the machine's kernel supports NFS server
1408             functionality (NFS must be supported for the machine to act as an NFS/AFS Translator). Single- and multiprocessor
1409             machines use the same library file.</para>
1410
1411             <para>If the machine's kernel supports NFS server functionality:</para>
1412
1413             <programlisting>
1414    # <emphasis role="bold">cp -p   bin/libafs.IP</emphasis><replaceable>xx</replaceable><emphasis role="bold">.a   /var/sysgen/boot/afs.a</emphasis>   
1415 </programlisting>
1416
1417             <para>If the machine's kernel does not support NFS server functionality:</para>
1418
1419             <programlisting>
1420    # <emphasis role="bold">cp -p  bin/libafs.IP</emphasis><replaceable>xx</replaceable><emphasis role="bold">.nonfs.a  /var/sysgen/boot/afs.a</emphasis>
1421 </programlisting>
1422           </listitem>
1423
1424           <listitem>
1425             <para>Issue the <emphasis role="bold">chkconfig</emphasis> command to deactivate the <emphasis
1426             role="bold">afsml</emphasis> configuration variable. <programlisting>
1427    # <emphasis role="bold">/etc/chkconfig -f afsml off</emphasis>   
1428 </programlisting></para>
1429
1430             <para>If the machine is to function as an NFS/AFS Translator and the kernel supports NFS server functionality, activate
1431             the <emphasis role="bold">afsxnfs</emphasis> variable.</para>
1432
1433             <programlisting>
1434    # <emphasis role="bold">/etc/chkconfig -f afsxnfs on</emphasis>
1435 </programlisting>
1436           </listitem>
1437
1438           <listitem>
1439             <para>Copy the existing kernel file, <emphasis role="bold">/unix</emphasis>, to a safe location. Compile the new kernel,
1440             which is created in the file <emphasis role="bold">/unix.install</emphasis>. It overwrites the existing <emphasis
1441             role="bold">/unix</emphasis> file when the machine reboots in the next step. <programlisting>
1442    # <emphasis role="bold">cp /unix /unix_noafs</emphasis>
1443    # <emphasis role="bold">autoconfig</emphasis>
1444 </programlisting></para>
1445           </listitem>
1446
1447           <listitem>
1448             <para>Reboot the machine to start using the new kernel, and login again as the superuser <emphasis
1449             role="bold">root</emphasis>. <programlisting>
1450    # <emphasis role="bold">cd /</emphasis>
1451    # <emphasis role="bold">shutdown -i6 -g0 -y</emphasis>
1452    login: <emphasis role="bold">root</emphasis>
1453    Password: <replaceable>root_password</replaceable>
1454 </programlisting></para>
1455           </listitem>
1456         </orderedlist></para>
1457
1458       <indexterm>
1459         <primary>configuring</primary>
1460
1461         <secondary>AFS server partition on first AFS machine</secondary>
1462
1463         <tertiary>IRIX</tertiary>
1464       </indexterm>
1465
1466       <indexterm>
1467         <primary>AFS server partition</primary>
1468
1469         <secondary>configuring on first AFS machine</secondary>
1470
1471         <tertiary>IRIX</tertiary>
1472       </indexterm>
1473
1474       <indexterm>
1475         <primary>first AFS machine</primary>
1476
1477         <secondary>AFS server partition</secondary>
1478
1479         <tertiary>on IRIX</tertiary>
1480       </indexterm>
1481
1482       <indexterm>
1483         <primary>IRIX</primary>
1484
1485         <secondary>AFS server partition</secondary>
1486
1487         <tertiary>on first AFS machine</tertiary>
1488       </indexterm>
1489     </sect2>
1490
1491     <sect2 id="HDRWQ39">
1492       <title>Configuring Server Partitions on IRIX Systems</title>
1493
1494       <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
1495       server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
1496       <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
1497       role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
1498       directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
1499       directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific
1500       Procedures</link>.</para>
1501
1502       <para>AFS supports use of both EFS and XFS partitions for housing AFS volumes. SGI encourages use of XFS partitions.
1503       <orderedlist>
1504           <listitem>
1505             <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
1506             partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
1507    # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
1508 </programlisting></para>
1509           </listitem>
1510
1511           <listitem>
1512             <para>Add a line with the following format to the file systems registry file, <emphasis
1513             role="bold">/etc/fstab</emphasis>, for each partition (or logical volume created with the XLV volume manager) to be
1514             mounted on one of the directories created in the previous step.</para>
1515
1516             <para>For an XFS partition or logical volume:</para>
1517
1518             <programlisting>
1519    /dev/dsk/<replaceable>disk</replaceable>  /vicep<replaceable>xx</replaceable>  xfs  rw,raw=/dev/rdsk/<replaceable>disk</replaceable>  0  0   
1520 </programlisting>
1521
1522             <para>For an EFS partition:</para>
1523
1524             <programlisting>
1525    /dev/dsk/<replaceable>disk</replaceable>  /vicep<replaceable>xx</replaceable>  efs  rw,raw=/dev/rdsk/<replaceable>disk</replaceable>  0  0   
1526 </programlisting>
1527
1528             <para>The following are examples of an entry for each file system type:</para>
1529
1530             <programlisting>
1531    /dev/dsk/dks0d2s6 /vicepa  xfs rw,raw=/dev/rdsk/dks0d2s6  0 0
1532    /dev/dsk/dks0d3s1 /vicepb  efs rw,raw=/dev/rdsk/dks0d3s1  0 0
1533 </programlisting>
1534           </listitem>
1535
1536           <listitem>
1537             <para>Create a file system on each partition that is to be mounted on a <emphasis
1538             role="bold">/vicep</emphasis><replaceable>xx</replaceable> directory. The following commands are probably appropriate,
1539             but consult the IRIX documentation for more information. In both cases, <replaceable>raw_device</replaceable> is a raw
1540             device name like <emphasis role="bold">/dev/rdsk/dks0d0s0</emphasis> for a single disk partition or <emphasis
1541             role="bold">/dev/rxlv/xlv0</emphasis> for a logical volume.</para>
1542
1543             <para>For XFS file systems, include the indicated options to configure the partition or logical volume with inodes large
1544             enough to accommodate AFS-specific information:</para>
1545
1546             <programlisting>
1547    # <emphasis role="bold">mkfs -t xfs -i size=512 -l size=4000b</emphasis> <replaceable>raw_device</replaceable>   
1548 </programlisting>
1549
1550             <para>For EFS file systems:</para>
1551
1552             <programlisting>
1553    # <emphasis role="bold">mkfs -t efs</emphasis> <replaceable>raw_device</replaceable>
1554 </programlisting>
1555           </listitem>
1556
1557           <listitem>
1558             <para>Mount each partition by issuing either the <emphasis role="bold">mount -a</emphasis> command to mount all
1559             partitions at once or the <emphasis role="bold">mount</emphasis> command to mount each partition in turn.</para>
1560           </listitem>
1561
1562           <listitem>
1563             <para><emphasis role="bold">(Optional)</emphasis> If you have configured partitions or logical volumes to use XFS, issue
1564             the following command to verify that the inodes are configured properly (are large enough to accommodate AFS-specific
1565             information). If the configuration is correct, the command returns no output. Otherwise, it specifies the command to run
1566             in order to configure each partition or logical volume properly. <programlisting>
1567    # <emphasis role="bold">/usr/afs/bin/xfs_size_check</emphasis>
1568 </programlisting></para>
1569           </listitem>
1570
1571           <listitem>
1572             <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
1573             linkend="HDRWQ40">Enabling AFS Login on IRIX Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
1574             BOS Server</link>.</para>
1575           </listitem>
1576         </orderedlist></para>
1577
1578       <indexterm>
1579         <primary>enabling AFS login</primary>
1580
1581         <secondary>file server machine</secondary>
1582
1583         <tertiary>IRIX</tertiary>
1584       </indexterm>
1585
1586       <indexterm>
1587         <primary>AFS login</primary>
1588
1589         <secondary>on file server machine</secondary>
1590
1591         <tertiary>IRIX</tertiary>
1592       </indexterm>
1593
1594       <indexterm>
1595         <primary>first AFS machine</primary>
1596
1597         <secondary>AFS login</secondary>
1598
1599         <tertiary>on IRIX</tertiary>
1600       </indexterm>
1601
1602       <indexterm>
1603         <primary>IRIX</primary>
1604
1605         <secondary>AFS login</secondary>
1606       </indexterm>
1607     </sect2>
1608
1609     <sect2 id="HDRWQ40">
1610       <title>Enabling AFS Login on IRIX Systems</title>
1611
1612       <note>
1613         <para>If you plan to remove client functionality from this machine after completing the installation, skip this section and
1614         proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1615       </note>
1616
1617       <para>Whilst the standard IRIX command-line 
1618       <emphasis role="bold">login</emphasis> program and the 
1619       graphical <emphasis role="bold">xdm</emphasis> login program both have
1620       the ability to grant AFS tokens, this ability relies upon the deprecated
1621       kaserver authentication system.</para>
1622         
1623       <para>Users who have been successfully authenticated via Kerberos 5
1624       authentication may obtain AFS tokens following login by running the
1625       <emphasis role="bold">aklog</emphasis> command.</para>
1626
1627       <para>Sites which still require <emphasis role="bold">kaserver</emphasis>
1628       or external Kerberos v4 authentication should consult 
1629       <link linkend="KAS014">Enabling kaserver based AFS Login on IRIX Systems</link>
1630       for details of how to enable IRIX login.</para>       
1631
1632       <para>After taking any necessary action, proceed to 
1633       <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1634     </sect2>
1635   </sect1>
1636
1637   <sect1 id="HDRWQ41">
1638     <title>Getting Started on Linux Systems</title>
1639
1640     <indexterm>
1641       <primary>replacing fsck program</primary>
1642
1643       <secondary>not necessary on Linux</secondary>
1644     </indexterm>
1645
1646     <indexterm>
1647       <primary>fsck program</primary>
1648
1649       <secondary>on first AFS machine</secondary>
1650
1651       <tertiary>Linux</tertiary>
1652     </indexterm>
1653
1654     <indexterm>
1655       <primary>first AFS machine</primary>
1656
1657       <secondary>fsck program</secondary>
1658
1659       <tertiary>on Linux</tertiary>
1660     </indexterm>
1661
1662     <indexterm>
1663       <primary>Linux</primary>
1664
1665       <secondary>fsck program replacement not necessary</secondary>
1666     </indexterm>
1667
1668     <para>Since this guide was originally written, the procedure for starting 
1669     OpenAFS has diverged significantly between different Linux distributions. 
1670     The instructions that follow are appropriate for both the Fedora and 
1671     RedHat Enterprise Linux packages distributed by OpenAFS. Additional 
1672     instructions are provided for those building from source.</para>
1673
1674     <para>Begin by running the AFS client startup scripts, which call the <emphasis role="bold">modprobe</emphasis> program, which
1675     dynamically loads AFS modifications into the kernel. Then create partitions for storing AFS volumes. You do not need to replace
1676     the Linux <emphasis role="bold">fsck</emphasis> program. If the machine is to remain an AFS client machine, incorporate AFS into
1677     the machine's Pluggable Authentication Module (PAM) scheme. <indexterm>
1678         <primary>incorporating AFS kernel extensions</primary>
1679
1680         <secondary>first AFS machine</secondary>
1681
1682         <tertiary>Linux</tertiary>
1683       </indexterm> <indexterm>
1684         <primary>AFS kernel extensions</primary>
1685
1686         <secondary>on first AFS machine</secondary>
1687
1688         <tertiary>Linux</tertiary>
1689       </indexterm> <indexterm>
1690         <primary>first AFS machine</primary>
1691
1692         <secondary>AFS kernel extensions</secondary>
1693
1694         <tertiary>on Linux</tertiary>
1695       </indexterm> <indexterm>
1696         <primary>Linux</primary>
1697
1698         <secondary>AFS kernel extensions</secondary>
1699
1700         <tertiary>on first AFS machine</tertiary>
1701       </indexterm></para>
1702
1703     <sect2 id="HDRWQ42">
1704       <title>Loading AFS into the Linux Kernel</title>
1705
1706       <para>The <emphasis role="bold">modprobe</emphasis> program is the dynamic kernel loader for Linux. Linux does not support
1707       incorporation of AFS modifications during a kernel build.</para>
1708
1709       <para>For AFS to function correctly, the <emphasis role="bold">modprobe</emphasis> program must run each time the machine
1710       reboots, so your distribution's AFS initialization script invokes it automatically. The script also includes
1711       commands that select the appropriate AFS library file automatically. In this section you run the script.</para>
1712
1713       <para>In later sections you verify that the script correctly initializes all AFS components, then activate a configuration
1714       variable, which results in the script being incorporated into the Linux startup and shutdown sequence.</para> 
1715       
1716       <para>The procedure for starting up OpenAFS depends upon your distribution</para>
1717       <sect3>
1718         <title>Fedora and RedHat Enterprise Linux</title>
1719         <para>OpenAFS ship RPMS for all current Fedora and RHEL releases.
1720         <orderedlist>
1721           <listitem>
1722             <para>Download and install the RPM set for your operating system.
1723             RPMs are available from the OpenAFS web site. You will need the 
1724             <emphasis role="bold">openafs</emphasis>
1725             <emphasis role="bold">openafs-client></emphasis>
1726             <emphasis role="bold">openafs-server</emphasis> packages, along with
1727             an <emphasis role="bold">openafs-kernel</emphasis> package matching
1728             your current, running, kernel.</para>
1729             <para>You can find the version of your current kernel by running
1730 <programlisting>
1731   # uname -r
1732 <replaceable>2.6.20-1.2933.fc6</replaceable>
1733 </programlisting></para>
1734             <para>Once downloaded, the packages may be installed with the
1735             <emphasis role="bold">rpm</emphasis> command
1736 <programlisting>
1737   # rpm -U openafs-* openafs-client-* openafs-server-* openafs-kernel-*
1738 </programlisting></para>
1739           </listitem>
1740 <!-- If you do this with current RHEL and Fedora releases you end up with
1741      a dynroot'd client running - this breaks setting up the root.afs volume
1742      as described later in this guide
1743           <listitem>
1744             <para>Run the AFS initialization script to load AFS extensions into 
1745             the kernel. You can ignore any error messages about the inability 
1746             to start the BOS Server or the Cache Manager or AFS client.</para>
1747 <programlisting>
1748    # <emphasis role="bold">/etc/rc.d/init.d/openafs-client  start</emphasis>
1749 </programlisting>
1750           </listitem>
1751 -->
1752         </orderedlist>
1753       </para>
1754       </sect3>
1755       <sect3>
1756          <title>Systems packaged as tar files</title>
1757          <para>If you are running a system where the OpenAFS Binary Distribution
1758          is provided as a tar file, or where you have built the system from
1759          source yourself, you need to install the relevant components by hand
1760          </para>
1761          <orderedlist>
1762            
1763           <listitem>
1764             <para>Unpack the distribution tarball. The examples below assume
1765             that you have unpacked the files into the
1766             <emphasis role="bold">/tmp/afsdist</emphasis>directory. If you
1767             pick a different location, substitute this in all of the following
1768             examples. Once you have unpacked the distribution,
1769             change directory as indicated.
1770 <programlisting>
1771   # <emphasis role="bold">cd /tmp/afsdist/linux/root.client/usr/vice/etc</emphasis>
1772 </programlisting></para>
1773           </listitem>
1774           
1775           <listitem>
1776             <para>Copy the AFS kernel library files to the local <emphasis role="bold">/usr/vice/etc/modload</emphasis> directory.
1777             The filenames for the libraries have the format <emphasis
1778             role="bold">libafs-</emphasis><replaceable>version</replaceable><emphasis role="bold">.o</emphasis>, where
1779             <replaceable>version</replaceable> indicates the kernel build level. The string <emphasis role="bold">.mp</emphasis> in
1780             the <replaceable>version</replaceable> indicates that the file is appropriate for machines running a multiprocessor
1781             kernel. <programlisting>
1782    # <emphasis role="bold">cp -rp  modload  /usr/vice/etc</emphasis>
1783 </programlisting></para>
1784           </listitem>
1785
1786           <listitem>
1787             <para>Copy the AFS initialization script to the local directory for initialization files (by convention, <emphasis
1788             role="bold">/etc/rc.d/init.d</emphasis> on Linux machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
1789             extension as you copy the script. <programlisting>
1790    # <emphasis role="bold">cp -p   afs.rc  /etc/rc.d/init.d/afs</emphasis> 
1791 </programlisting></para>
1792           </listitem>
1793
1794 <!-- I don't think we need to do this for Linux, and it complicates things if
1795      dynroot is enabled ...
1796           <listitem>
1797             <para>Run the AFS initialization script to load AFS extensions into the kernel. You can ignore any error messages about
1798             the inability to start the BOS Server or the Cache Manager or AFS client.</para>
1799 <programlisting>
1800    # <emphasis role="bold">/etc/rc.d/init.d/afs start</emphasis>
1801 </programlisting>
1802           </listitem>
1803 -->
1804         </orderedlist>
1805
1806       <indexterm>
1807         <primary>configuring</primary>
1808    
1809         <secondary>AFS server partition on first AFS machine</secondary>
1810
1811         <tertiary>Linux</tertiary>
1812       </indexterm>
1813
1814       <indexterm>
1815         <primary>AFS server partition</primary>
1816
1817         <secondary>configuring on first AFS machine</secondary>
1818
1819         <tertiary>Linux</tertiary>
1820       </indexterm>
1821
1822       <indexterm>
1823         <primary>first AFS machine</primary>
1824
1825         <secondary>AFS server partition</secondary>
1826
1827         <tertiary>on Linux</tertiary>
1828       </indexterm>
1829
1830       <indexterm>
1831         <primary>Linux</primary>
1832
1833         <secondary>AFS server partition</secondary>
1834
1835         <tertiary>on first AFS machine</tertiary>
1836       </indexterm>
1837     </sect3>
1838     </sect2>
1839
1840     <sect2 id="HDRWQ43">
1841       <title>Configuring Server Partitions on Linux Systems</title>
1842
1843       <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
1844       server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
1845       <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
1846       role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
1847       directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
1848       directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific Procedures</link>.
1849       <orderedlist>
1850           <listitem>
1851             <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
1852             partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
1853    # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
1854 </programlisting></para>
1855           </listitem>
1856
1857           <listitem>
1858             <para>Add a line with the following format to the file systems registry file, <emphasis
1859             role="bold">/etc/fstab</emphasis>, for each directory just created. The entry maps the directory name to the disk
1860             partition to be mounted on it. <programlisting>
1861    /dev/<replaceable>disk</replaceable>  /vicep<replaceable>xx</replaceable>  ext2  defaults  0  2   
1862 </programlisting></para>
1863
1864             <para>The following is an example for the first partition being configured.</para>
1865
1866             <programlisting>
1867    /dev/sda8 /vicepa ext2 defaults 0 2
1868 </programlisting>
1869           </listitem>
1870
1871           <listitem>
1872             <para>Create a file system on each partition that is to be mounted at a <emphasis
1873             role="bold">/vicep</emphasis><replaceable>xx</replaceable> directory. The following command is probably appropriate, but
1874             consult the Linux documentation for more information. <programlisting>
1875    # <emphasis role="bold">mkfs -v /dev/</emphasis><replaceable>disk</replaceable>
1876 </programlisting></para>
1877           </listitem>
1878
1879           <listitem>
1880             <para>Mount each partition by issuing either the <emphasis role="bold">mount -a</emphasis> command to mount all
1881             partitions at once or the <emphasis role="bold">mount</emphasis> command to mount each partition in turn.</para>
1882           </listitem>
1883
1884           <listitem>
1885             <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
1886             linkend="HDRWQ44">Enabling AFS Login on Linux Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
1887             BOS Server</link>.</para>
1888           </listitem>
1889         </orderedlist></para>
1890
1891       <indexterm>
1892         <primary>enabling AFS login</primary>
1893
1894         <secondary>file server machine</secondary>
1895
1896         <tertiary>Linux</tertiary>
1897       </indexterm>
1898
1899       <indexterm>
1900         <primary>AFS login</primary>
1901
1902         <secondary>on file server machine</secondary>
1903
1904         <tertiary>Linux</tertiary>
1905       </indexterm>
1906
1907       <indexterm>
1908         <primary>first AFS machine</primary>
1909
1910         <secondary>AFS login</secondary>
1911
1912         <tertiary>on Linux</tertiary>
1913       </indexterm>
1914
1915       <indexterm>
1916         <primary>Linux</primary>
1917
1918         <secondary>AFS login</secondary>
1919
1920         <tertiary>on file server machine</tertiary>
1921       </indexterm>
1922
1923       <indexterm>
1924         <primary>PAM</primary>
1925
1926         <secondary>on Linux</secondary>
1927
1928         <tertiary>file server machine</tertiary>
1929       </indexterm>
1930     </sect2>
1931
1932     <sect2 id="HDRWQ44">
1933       <title>Enabling AFS Login on Linux Systems</title>
1934
1935       <note>
1936         <para>If you plan to remove client functionality from this machine after completing the installation, skip this section and
1937         proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1938       </note>
1939
1940       <para>At this point you incorporate AFS into the operating system's Pluggable Authentication Module (PAM) scheme. PAM
1941       integrates all authentication mechanisms on the machine, including login, to provide the security infrastructure for
1942       authenticated access to and from the machine.</para>
1943
1944       <para>At this time, we recommend that new sites requiring AFS credentials
1945       to be gained as part of PAM authentication use Russ Alberry's 
1946       pam_afs_session, rather than utilising the bundled pam_afs2 module. 
1947       A typical PAM stack should authenticate the user using an external 
1948       Kerberos V service, and then use the AFS PAM module to obtain AFS 
1949       credentials in the <computeroutput>session</computeroutput> section</para>
1950
1951       <para>Sites which still require <emphasis role="bold">kaserver</emphasis>
1952       or external Kerberos v4 authentication should consult 
1953       <link linkend="KAS015">Enabling kaserver based AFS Login on Linux Systems</link>
1954       for details of how to enable AFS login on Linux.</para>
1955       
1956       <para>Proceed to <link linkend="HDRWQ50">Starting the BOS Server</link> 
1957       (or if referring to these instructions while installing an additional 
1958       file server machine, return to <link linkend="HDRWQ108">Starting Server
1959       Programs</link>).</para>
1960     </sect2>
1961   </sect1>
1962
1963   <sect1 id="HDRWQ45">
1964     <title>Getting Started on Solaris Systems</title>
1965
1966     <para>Begin by running the AFS initialization script to call the <emphasis role="bold">modload</emphasis> program distributed by
1967     Sun Microsystems, which dynamically loads AFS modifications into the kernel. Then create partitions for storing AFS volumes, and
1968     install and configure the AFS-modified <emphasis role="bold">fsck</emphasis> program to run on AFS server partitions. If the
1969     machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable Authentication Module (PAM) scheme.
1970     <indexterm>
1971         <primary>incorporating AFS kernel extensions</primary>
1972
1973         <secondary>first AFS machine</secondary>
1974
1975         <tertiary>Solaris</tertiary>
1976       </indexterm> <indexterm>
1977         <primary>AFS kernel extensions</primary>
1978
1979         <secondary>on first AFS machine</secondary>
1980
1981         <tertiary>Solaris</tertiary>
1982       </indexterm> <indexterm>
1983         <primary>first AFS machine</primary>
1984
1985         <secondary>AFS kernel extensions</secondary>
1986
1987         <tertiary>on Solaris</tertiary>
1988       </indexterm> <indexterm>
1989         <primary>Solaris</primary>
1990
1991         <secondary>AFS kernel extensions</secondary>
1992
1993         <tertiary>on first AFS machine</tertiary>
1994       </indexterm></para>
1995
1996     <sect2 id="HDRWQ46">
1997       <title>Loading AFS into the Solaris Kernel</title>
1998
1999       <para>The <emphasis role="bold">modload</emphasis> program is the dynamic kernel loader provided by Sun Microsystems for
2000       Solaris systems. Solaris does not support incorporation of AFS modifications during a kernel build.</para>
2001
2002       <para>For AFS to function correctly, the <emphasis role="bold">modload</emphasis> program must run each time the machine
2003       reboots, so the AFS initialization script (included on the AFS CD-ROM) invokes it automatically. In this section you copy the
2004       appropriate AFS library file to the location where the <emphasis role="bold">modload</emphasis> program accesses it and then
2005       run the script.</para>
2006
2007       <para>In later sections you verify that the script correctly initializes all AFS components, then create the links that
2008       incorporate AFS into the Solaris startup and shutdown sequence. <orderedlist>
2009           <listitem>
2010             <para>Unpack the OpenAFS Solaris distribution tarball. The examples
2011             below assume that you have unpacked the files into the 
2012             <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you 
2013             pick a diferent location, substitute this in all of the following
2014             exmaples. Once you have unpacked the distribution, change directory
2015             as indicated. 
2016 <programlisting>
2017    # <emphasis role="bold">cd  /tmp/afsdist/sun4x_56/root.client/usr/vice/etc</emphasis>
2018 </programlisting></para>
2019           </listitem>
2020
2021           <listitem>
2022             <para>Copy the AFS initialization script to the local directory for initialization files (by convention, <emphasis
2023             role="bold">/etc/init.d</emphasis> on Solaris machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
2024             extension as you copy the script. <programlisting>
2025    # <emphasis role="bold">cp -p  afs.rc  /etc/init.d/afs</emphasis>
2026 </programlisting></para>
2027           </listitem>
2028
2029           <listitem>
2030             <para>Copy the appropriate AFS kernel library file to the local file <emphasis
2031             role="bold">/kernel/fs/afs</emphasis>.</para>
2032
2033             <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, its kernel supports NFS server
2034             functionality, and the <emphasis role="bold">nfsd</emphasis> process is running:</para>
2035
2036             <programlisting>
2037    # <emphasis role="bold">cp -p modload/libafs.o /kernel/fs/afs</emphasis>   
2038 </programlisting>
2039
2040             <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, and its kernel does not support NFS
2041             server functionality or the <emphasis role="bold">nfsd</emphasis> process is not running:</para>
2042
2043             <programlisting>
2044    # <emphasis role="bold">cp -p modload/libafs.nonfs.o /kernel/fs/afs</emphasis>   
2045 </programlisting>
2046
2047             <para>If the machine is running the 64-bit version of Solaris 7, its kernel supports NFS server functionality, and the
2048             <emphasis role="bold">nfsd</emphasis> process is running:</para>
2049
2050             <programlisting>
2051    # <emphasis role="bold">cp -p modload/libafs64.o /kernel/fs/sparcv9/afs</emphasis>   
2052 </programlisting>
2053
2054             <para>If the machine is running the 64-bit version of Solaris 7, and its kernel does not support NFS server
2055             functionality or the <emphasis role="bold">nfsd</emphasis> process is not running:</para>
2056
2057             <programlisting>
2058    # <emphasis role="bold">cp -p modload/libafs64.nonfs.o /kernel/fs/sparcv9/afs</emphasis>
2059 </programlisting>
2060           </listitem>
2061
2062           <listitem>
2063             <para>Run the AFS initialization script to load AFS modifications into the kernel. You can ignore any error messages
2064             about the inability to start the BOS Server or the Cache Manager or AFS client. <programlisting>
2065    # <emphasis role="bold">/etc/init.d/afs start</emphasis>   
2066 </programlisting></para>
2067
2068             <para>When an entry called <computeroutput>afs</computeroutput> does not already exist in the local <emphasis
2069             role="bold">/etc/name_to_sysnum</emphasis> file, the script automatically creates it and reboots the machine to start
2070             using the new version of the file. If this happens, log in again as the superuser <emphasis role="bold">root</emphasis>
2071             after the reboot and run the initialization script again. This time the required entry exists in the <emphasis
2072             role="bold">/etc/name_to_sysnum</emphasis> file, and the <emphasis role="bold">modload</emphasis> program runs.</para>
2073
2074             <programlisting>
2075    login: <emphasis role="bold">root</emphasis>
2076    Password: <replaceable>root_password</replaceable>
2077    # <emphasis role="bold">/etc/init.d/afs start</emphasis>
2078 </programlisting>
2079           </listitem>
2080         </orderedlist></para>
2081
2082       <indexterm>
2083         <primary>replacing fsck program</primary>
2084
2085         <secondary>first AFS machine</secondary>
2086
2087         <tertiary>Solaris</tertiary>
2088       </indexterm>
2089
2090       <indexterm>
2091         <primary>fsck program</primary>
2092
2093         <secondary>on first AFS machine</secondary>
2094
2095         <tertiary>Solaris</tertiary>
2096       </indexterm>
2097
2098       <indexterm>
2099         <primary>first AFS machine</primary>
2100
2101         <secondary>fsck program</secondary>
2102
2103         <tertiary>on Solaris</tertiary>
2104       </indexterm>
2105
2106       <indexterm>
2107         <primary>Solaris</primary>
2108
2109         <secondary>fsck program</secondary>
2110
2111         <tertiary>on first AFS machine</tertiary>
2112       </indexterm>
2113     </sect2>
2114
2115     <sect2 id="HDRWQ47">
2116       <title>Configuring the AFS-modified fsck Program on Solaris Systems</title>
2117
2118       <para>In this section, you make modifications to guarantee that the appropriate <emphasis role="bold">fsck</emphasis> program
2119       runs on AFS server partitions. The <emphasis role="bold">fsck</emphasis> program provided with the operating system must never
2120       run on AFS server partitions. Because it does not recognize the structures that the File Server uses to organize volume data,
2121       it removes all of the data. To repeat:</para>
2122
2123       <para><emphasis role="bold">Never run the standard fsck program on AFS server partitions. It discards AFS volumes.</emphasis>
2124       <orderedlist>
2125           <listitem>
2126             <para>Create the <emphasis role="bold">/usr/lib/fs/afs</emphasis> directory to house the AFS-modified <emphasis
2127             role="bold">fsck</emphasis> program and related files. <programlisting>
2128    # <emphasis role="bold">mkdir /usr/lib/fs/afs</emphasis>
2129    # <emphasis role="bold">cd /usr/lib/fs/afs</emphasis>  
2130 </programlisting></para>
2131           </listitem>
2132
2133           <listitem>
2134             <para>Copy the <emphasis role="bold">vfsck</emphasis> binary to the newly created directory, changing the name as you do
2135             so. <programlisting>
2136    # <emphasis role="bold">cp  /tmp/afsdist/sun4x_56/root.server/etc/vfsck  fsck</emphasis>
2137 </programlisting></para>
2138           </listitem>
2139
2140           <listitem>
2141             <para>Working in the <emphasis role="bold">/usr/lib/fs/afs</emphasis> directory, create the following links to Solaris
2142             libraries: <programlisting>
2143    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/clri</emphasis>  
2144    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/df</emphasis>
2145    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/edquota</emphasis>
2146    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ff</emphasis>
2147    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fsdb</emphasis>  
2148    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fsirand</emphasis>
2149    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fstyp</emphasis>
2150    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/labelit</emphasis>
2151    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/lockfs</emphasis>
2152    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/mkfs</emphasis>  
2153    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/mount</emphasis>
2154    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ncheck</emphasis>
2155    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/newfs</emphasis>
2156    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quot</emphasis>
2157    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quota</emphasis>
2158    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quotaoff</emphasis>
2159    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quotaon</emphasis>
2160    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/repquota</emphasis>
2161    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/tunefs</emphasis>
2162    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ufsdump</emphasis>
2163    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ufsrestore</emphasis>
2164    # <emphasis role="bold">ln -s /usr/lib/fs/ufs/volcopy</emphasis>
2165 </programlisting></para>
2166           </listitem>
2167
2168           <listitem>
2169             <para>Append the following line to the end of the file <emphasis role="bold">/etc/dfs/fstypes</emphasis>.
2170             <programlisting>
2171    afs AFS Utilities
2172 </programlisting></para>
2173           </listitem>
2174
2175           <listitem>
2176             <para>Edit the <emphasis role="bold">/sbin/mountall</emphasis> file, making two changes. <itemizedlist>
2177                 <listitem>
2178                   <para>Add an entry for AFS to the <computeroutput>case</computeroutput> statement for option 2, so that it reads
2179                   as follows: <programlisting>
2180    case "$2" in
2181    ufs)    foptions="-o p"
2182            ;;
2183    afs)    foptions="-o p"
2184            ;;
2185    s5)     foptions="-y -t /var/tmp/tmp$$ -D"
2186            ;;
2187    *)      foptions="-y"
2188            ;;
2189 </programlisting></para>
2190                 </listitem>
2191
2192                 <listitem>
2193                   <para>Edit the file so that all AFS and UFS partitions are checked in parallel. Replace the following section of
2194                   code: <programlisting>
2195    # For  fsck purposes, we make a distinction between ufs and
2196    # other file systems
2197    #
2198    if [ "$fstype" = "ufs" ]; then
2199         ufs_fscklist="$ufs_fscklist $fsckdev"
2200         saveentry $fstype "$OPTIONS" $special $mountp
2201         continue
2202    fi  
2203 </programlisting></para>
2204
2205                   <para>with the following section of code:</para>
2206
2207                   <programlisting>
2208    # For fsck purposes, we make a distinction between ufs/afs
2209    # and other file systems.
2210    #
2211    if [ "$fstype" = "ufs" -o "$fstype" = "afs" ]; then
2212         ufs_fscklist="$ufs_fscklist $fsckdev"
2213         saveentry $fstype "$OPTIONS" $special $mountp
2214         continue
2215    fi
2216 </programlisting>
2217                 </listitem>
2218               </itemizedlist></para>
2219           </listitem>
2220         </orderedlist></para>
2221
2222       <indexterm>
2223         <primary>configuring</primary>
2224
2225         <secondary>AFS server partition on first AFS machine</secondary>
2226
2227         <tertiary>Solaris</tertiary>
2228       </indexterm>
2229
2230       <indexterm>
2231         <primary>AFS server partition</primary>
2232
2233         <secondary>configuring on first AFS machine</secondary>
2234
2235         <tertiary>Solaris</tertiary>
2236       </indexterm>
2237
2238       <indexterm>
2239         <primary>first AFS machine</primary>
2240
2241         <secondary>AFS server partition</secondary>
2242
2243         <tertiary>on Solaris</tertiary>
2244       </indexterm>
2245
2246       <indexterm>
2247         <primary>Solaris</primary>
2248
2249         <secondary>AFS server partition</secondary>
2250
2251         <tertiary>on first AFS machine</tertiary>
2252       </indexterm>
2253     </sect2>
2254
2255     <sect2 id="HDRWQ48">
2256       <title>Configuring Server Partitions on Solaris Systems</title>
2257
2258       <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
2259       server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
2260       <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
2261       role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
2262       directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
2263       directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific Procedures</link>.
2264       <orderedlist>
2265           <listitem>
2266             <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
2267             partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
2268    # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
2269 </programlisting></para>
2270           </listitem>
2271
2272           <listitem>
2273             <para>Add a line with the following format to the file systems registry file, <emphasis
2274             role="bold">/etc/vfstab</emphasis>, for each partition to be mounted on a directory created in the previous step. Note
2275             the value <computeroutput>afs</computeroutput> in the fourth field, which tells Solaris to use the AFS-modified
2276             <emphasis role="bold">fsck</emphasis> program on this partition. <programlisting>
2277    /dev/dsk/<replaceable>disk</replaceable>   /dev/rdsk/<replaceable>disk</replaceable>   /vicep<replaceable>xx</replaceable>   afs   <replaceable>boot_order</replaceable>  yes  
2278 </programlisting></para>
2279
2280             <para>The following is an example for the first partition being configured.</para>
2281
2282             <programlisting>
2283    /dev/dsk/c0t6d0s1 /dev/rdsk/c0t6d0s1 /vicepa afs 3 yes
2284 </programlisting>
2285           </listitem>
2286
2287           <listitem>
2288             <para>Create a file system on each partition that is to be mounted at a <emphasis
2289             role="bold">/vicep</emphasis><replaceable>xx</replaceable> directory. The following command is probably appropriate, but
2290             consult the Solaris documentation for more information. <programlisting>
2291    # <emphasis role="bold">newfs -v /dev/rdsk/</emphasis><replaceable>disk</replaceable>
2292 </programlisting></para>
2293           </listitem>
2294
2295           <listitem>
2296             <para>Issue the <emphasis role="bold">mountall</emphasis> command to mount all partitions at once.</para>
2297           </listitem>
2298
2299           <listitem>
2300             <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
2301             linkend="HDRWQ49">Enabling AFS Login and Editing the File Systems Clean-up Script on Solaris Systems</link>. Otherwise,
2302             proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
2303           </listitem>
2304         </orderedlist></para>
2305     </sect2>
2306
2307     <sect2 id="HDRWQ49">
2308       <title>Enabling AFS Login on Solaris Systems</title>
2309       <indexterm>
2310         <primary>enabling AFS login</primary>
2311
2312         <secondary>file server machine</secondary>
2313
2314         <tertiary>Solaris</tertiary>
2315       </indexterm>
2316
2317       <indexterm>
2318         <primary>AFS login</primary>
2319
2320         <secondary>on file server machine</secondary>
2321
2322         <tertiary>Solaris</tertiary>
2323       </indexterm>
2324
2325       <indexterm>
2326         <primary>first AFS machine</primary>
2327
2328         <secondary>AFS login</secondary>
2329
2330         <tertiary>on Solaris</tertiary>
2331       </indexterm>
2332
2333       <indexterm>
2334         <primary>Solaris</primary>
2335
2336         <secondary>AFS login</secondary>
2337
2338         <tertiary>on file server machine</tertiary>
2339       </indexterm>
2340
2341       <indexterm>
2342         <primary>PAM</primary>
2343
2344         <secondary>on Solaris</secondary>
2345
2346         <tertiary>file server machine</tertiary>
2347       </indexterm>
2348
2349       <note>
2350         <para>If you plan to remove client functionality from this machine after completing the installation, skip this section and
2351         proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
2352       </note>
2353
2354       <para>At this point you incorporate AFS into the operating system's Pluggable Authentication Module (PAM) scheme. PAM
2355       integrates all authentication mechanisms on the machine, including login, to provide the security infrastructure for
2356       authenticated access to and from the machine.</para>
2357
2358       <para>Explaining PAM is beyond the scope of this document. It is assumed that you understand the syntax and meanings of
2359       settings in the PAM configuration file (for example, how the <computeroutput>other</computeroutput> entry works, the effect of
2360       marking an entry as <computeroutput>required</computeroutput>, <computeroutput>optional</computeroutput>, or
2361       <computeroutput>sufficient</computeroutput>, and so on).</para>
2362
2363       <para>In modern AFS installations, you should be using Kerberos v5
2364       for user login, and obtaining AFS tokens subsequent to this authentication
2365       step. OpenAFS does not currently distribute a PAM module allowing AFS 
2366       tokens to be automatically gained at login. Whilst there are a number of
2367       third party modules providing this functionality, it is not know if these 
2368       have been tested with HP/UX.</para>
2369       
2370       <para>Following login, users can 
2371       obtain tokens by running the <emphasis role="bold">aklog</emphasis> 
2372       command</para>
2373
2374       <para>Sites which still require <emphasis role="bold">kaserver</emphasis>
2375       or external Kerberos v4 authentication should consult 
2376       <link linkend="KAS016">Enabling kaserver based AFS Login on Solaris Systems"</link>
2377       for details of how to enable AIX login.</para>
2378
2379       <para>Proceed to <link linkend="HDRWQ49a">Editing the File Systems 
2380       Clean-up Script on Solaris Systems</link></para>
2381     </sect2>
2382     <sect2 id="HDRWQ49a">
2383       <title>Editing the File Systems Clean-up Script on Solaris Systems</title>
2384       <indexterm>
2385         <primary>Solaris</primary>
2386
2387         <secondary>file systems clean-up script</secondary>
2388
2389         <tertiary>on file server machine</tertiary>
2390       </indexterm>
2391
2392       <indexterm>
2393         <primary>file systems clean-up script (Solaris)</primary>
2394
2395         <secondary>file server machine</secondary>
2396       </indexterm>
2397
2398       <indexterm>
2399         <primary>scripts</primary>
2400
2401         <secondary>file systems clean-up (Solaris)</secondary>
2402
2403         <tertiary>file server machine</tertiary>
2404       </indexterm>
2405
2406       
2407         <orderedlist>
2408           <listitem>
2409             <para>Some Solaris distributions include a script that locates and removes unneeded files from various file systems. Its
2410             conventional location is <emphasis role="bold">/usr/lib/fs/nfs/nfsfind</emphasis>. The script generally uses an argument
2411             to the <emphasis role="bold">find</emphasis> command to define which file systems to search. In this step you modify the
2412             command to exclude the <emphasis role="bold">/afs</emphasis> directory. Otherwise, the command traverses the AFS
2413             filespace of every cell that is accessible from the machine, which can take many hours. The following alterations are
2414             possibilities, but you must verify that they are appropriate for your cell.</para>
2415
2416             <para>The first possible alteration is to add the <emphasis role="bold">-local</emphasis> flag to the existing command,
2417             so that it looks like the following:</para>
2418
2419             <programlisting>
2420    find $dir -local -name .nfs\* -mtime +7 -mount -exec rm -f {} \;   
2421 </programlisting>
2422
2423             <para>Another alternative is to exclude any directories whose names begin with the lowercase letter <emphasis
2424             role="bold">a</emphasis> or a non-alphabetic character.</para>
2425
2426             <programlisting>
2427    find /[A-Zb-z]*  <replaceable>remainder of existing command</replaceable>   
2428 </programlisting>
2429
2430             <para>Do not use the following command, which still searches under the <emphasis role="bold">/afs</emphasis> directory,
2431             looking for a subdirectory of type <emphasis role="bold">4.2</emphasis>.</para>
2432
2433             <programlisting>
2434    find / -fstype 4.2     /* <replaceable>do not use</replaceable> */
2435 </programlisting>
2436           </listitem>
2437
2438           <listitem>
2439             <para>Proceed to <link linkend="HDRWQ50">Starting the BOS Server</link> (or if referring to these instructions while
2440             installing an additional file server machine, return to <link linkend="HDRWQ108">Starting Server
2441             Programs</link>).</para>
2442           </listitem>
2443         </orderedlist>
2444
2445       <indexterm>
2446         <primary>Basic OverSeer Server</primary>
2447
2448         <see>BOS Server</see>
2449       </indexterm>
2450
2451       <indexterm>
2452         <primary>BOS Server</primary>
2453
2454         <secondary>starting</secondary>
2455
2456         <tertiary>first AFS machine</tertiary>
2457       </indexterm>
2458
2459       <indexterm>
2460         <primary>starting</primary>
2461
2462         <secondary>BOS Server</secondary>
2463
2464         <tertiary>first AFS machine</tertiary>
2465       </indexterm>
2466
2467       <indexterm>
2468         <primary>first AFS machine</primary>
2469
2470         <secondary>BOS Server</secondary>
2471       </indexterm>
2472
2473       <indexterm>
2474         <primary>authorization checking (disabling)</primary>
2475
2476         <secondary>first AFS machine</secondary>
2477       </indexterm>
2478
2479       <indexterm>
2480         <primary>disabling authorization checking</primary>
2481
2482         <secondary>first AFS machine</secondary>
2483       </indexterm>
2484
2485       <indexterm>
2486         <primary>first AFS machine</primary>
2487
2488         <secondary>authorization checking (disabling)</secondary>
2489       </indexterm>
2490     </sect2>
2491   </sect1>
2492   <sect1 id="HDRWQ50">
2493     <title>Starting the BOS Server</title>
2494
2495     <para>You are now ready to start the AFS server processes on this machine. 
2496     If you are not working from a packaged distribution, begin by copying the 
2497     AFS server binaries from the distribution to the conventional local disk
2498     location, the <emphasis role="bold">/usr/afs/bin</emphasis> directory. The 
2499     following instructions also create files in other subdirectories of the 
2500     <emphasis role="bold">/usr/afs</emphasis> directory.</para>
2501
2502     <para>Then issue the <emphasis role="bold">bosserver</emphasis> command to initialize the Basic OverSeer (BOS) Server, which
2503     monitors and controls other AFS server processes on its server machine. Include the <emphasis role="bold">-noauth</emphasis>
2504     flag to disable authorization checking. Because you have not yet configured your cell's AFS authentication and authorization
2505     mechanisms, the BOS Server cannot perform authorization checking as it does during normal operation. In no-authorization mode,
2506     it does not verify the identity or privilege of the issuer of a <emphasis role="bold">bos</emphasis> command, and so performs
2507     any operation for anyone.</para>
2508
2509     <para>Disabling authorization checking gravely compromises cell security. You must complete all subsequent steps in one
2510     uninterrupted pass and must not leave the machine unattended until you restart the BOS Server with authorization checking
2511     enabled, in <link linkend="HDRWQ72">Verifying the AFS Initialization Script</link>.</para>
2512
2513     <para>As it initializes for the first time, the BOS Server creates the following directories and files, setting the owner to the
2514     local superuser <emphasis role="bold">root</emphasis> and the mode bits to limit the ability to write (and in some cases, read)
2515     them. For a description of the contents and function of these directories and files, see the chapter in the <emphasis>OpenAFS
2516     Administration Guide</emphasis> about administering server machines. For further discussion of the mode bit settings, see <link
2517     linkend="HDRWQ96">Protecting Sensitive AFS Directories</link>. <indexterm>
2518         <primary>Binary Distribution</primary>
2519
2520         <secondary>copying server files from</secondary>
2521
2522         <tertiary>first AFS machine</tertiary>
2523       </indexterm> <indexterm>
2524         <primary>first AFS machine</primary>
2525
2526         <secondary>subdirectories of /usr/afs</secondary>
2527       </indexterm> <indexterm>
2528         <primary>creating</primary>
2529
2530         <secondary>/usr/afs/bin directory</secondary>
2531
2532         <tertiary>first AFS machine</tertiary>
2533       </indexterm> <indexterm>
2534         <primary>creating</primary>
2535
2536         <secondary>/usr/afs/etc directory</secondary>
2537
2538         <tertiary>first AFS machine</tertiary>
2539       </indexterm> <indexterm>
2540         <primary>copying</primary>
2541
2542         <secondary>server files to local disk</secondary>
2543
2544         <tertiary>first AFS machine</tertiary>
2545       </indexterm> <indexterm>
2546         <primary>first AFS machine</primary>
2547
2548         <secondary>copying</secondary>
2549
2550         <tertiary>server files to local disk</tertiary>
2551       </indexterm> <indexterm>
2552         <primary>usr/afs/bin directory</primary>
2553
2554         <secondary>first AFS machine</secondary>
2555       </indexterm> <indexterm>
2556         <primary>usr/afs/etc directory</primary>
2557
2558         <secondary>first AFS machine</secondary>
2559       </indexterm> <indexterm>
2560         <primary>usr/afs/db directory</primary>
2561       </indexterm> <indexterm>
2562         <primary>usr/afs/local directory</primary>
2563       </indexterm> <indexterm>
2564         <primary>usr/afs/logs directory</primary>
2565       </indexterm> <itemizedlist>
2566         <listitem>
2567           <para><emphasis role="bold">/usr/afs/db</emphasis></para>
2568         </listitem>
2569
2570         <listitem>
2571           <para><emphasis role="bold">/usr/afs/etc/CellServDB</emphasis></para>
2572         </listitem>
2573
2574         <listitem>
2575           <para><emphasis role="bold">/usr/afs/etc/ThisCell</emphasis></para>
2576         </listitem>
2577
2578         <listitem>
2579           <para><emphasis role="bold">/usr/afs/local</emphasis></para>
2580         </listitem>
2581
2582         <listitem>
2583           <para><emphasis role="bold">/usr/afs/logs</emphasis></para>
2584         </listitem>
2585       </itemizedlist></para>
2586
2587     <para>The BOS Server also creates symbolic links called <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
2588     role="bold">/usr/vice/etc/CellServDB</emphasis> to the corresponding files in the <emphasis role="bold">/usr/afs/etc</emphasis>
2589     directory. The AFS command interpreters consult the <emphasis role="bold">CellServDB</emphasis> and <emphasis
2590     role="bold">ThisCell</emphasis> files in the <emphasis role="bold">/usr/vice/etc</emphasis> directory because they generally run
2591     on client machines. On machines that are AFS servers only (as this machine currently is), the files reside only in the <emphasis
2592     role="bold">/usr/afs/etc</emphasis> directory; the links enable the command interpreters to retrieve the information they need.
2593     Later instructions for installing the client functionality replace the links with actual files. <orderedlist>
2594         <listitem>
2595           <para>If you are not working from a packaged distribution, you may need to copy files from the distribution media to the local <emphasis role="bold">/usr/afs</emphasis> directory. 
2596 <programlisting>
2597    # <emphasis role="bold">cd /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/root.server/usr/afs</emphasis>
2598    # <emphasis role="bold">cp -rp  *  /usr/afs</emphasis>
2599 </programlisting> <indexterm>
2600               <primary>commands</primary>
2601
2602               <secondary>bosserver</secondary>
2603             </indexterm> <indexterm>
2604               <primary>bosserver command</primary>
2605             </indexterm></para>
2606         </listitem>
2607
2608         <listitem>
2609           <para>Issue the <emphasis role="bold">bosserver</emphasis> command. Include the <emphasis role="bold">-noauth</emphasis>
2610           flag to disable authorization checking. <programlisting>
2611    # <emphasis role="bold">/usr/afs/bin/bosserver -noauth &amp;</emphasis>
2612 </programlisting></para>
2613         </listitem>
2614
2615         <listitem>
2616           <para>Verify that the BOS Server created <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
2617           role="bold">/usr/vice/etc/CellServDB</emphasis> as symbolic links to the corresponding files in the <emphasis
2618           role="bold">/usr/afs/etc</emphasis> directory. <programlisting>
2619    # <emphasis role="bold">ls -l  /usr/vice/etc</emphasis>
2620 </programlisting></para>
2621
2622           <para>If either or both of <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
2623           role="bold">/usr/vice/etc/CellServDB</emphasis> do not exist, or are not links, issue the following commands.</para>
2624
2625           <programlisting>
2626    # <emphasis role="bold">cd /usr/vice/etc</emphasis>
2627    # <emphasis role="bold">ln -s /usr/afs/etc/ThisCell</emphasis>
2628    # <emphasis role="bold">ln -s /usr/afs/etc/CellServDB</emphasis> 
2629 </programlisting>
2630         </listitem>
2631       </orderedlist></para>
2632
2633     <indexterm>
2634       <primary>cell name</primary>
2635
2636       <secondary>defining during installation of first machine</secondary>
2637     </indexterm>
2638
2639     <indexterm>
2640       <primary>defining</primary>
2641
2642       <secondary>cell name during installation of first machine</secondary>
2643     </indexterm>
2644
2645     <indexterm>
2646       <primary>cell name</primary>
2647
2648       <secondary>setting in server ThisCell file</secondary>
2649
2650       <tertiary>first AFS machine</tertiary>
2651     </indexterm>
2652
2653     <indexterm>
2654       <primary>setting</primary>
2655
2656       <secondary>cell name in server ThisCell file</secondary>
2657
2658       <tertiary>first AFS machine</tertiary>
2659     </indexterm>
2660
2661     <indexterm>
2662       <primary>first AFS machine</primary>
2663
2664       <secondary>ThisCell file (server)</secondary>
2665     </indexterm>
2666
2667     <indexterm>
2668       <primary>usr/afs/etc/ThisCell</primary>
2669
2670       <see>ThisCell file (server)</see>
2671     </indexterm>
2672
2673     <indexterm>
2674       <primary>ThisCell file (server)</primary>
2675
2676       <secondary>first AFS machine</secondary>
2677     </indexterm>
2678
2679     <indexterm>
2680       <primary>files</primary>
2681
2682       <secondary>ThisCell (server)</secondary>
2683     </indexterm>
2684
2685     <indexterm>
2686       <primary>database server machine</primary>
2687
2688       <secondary>entry in server CellServDB file</secondary>
2689
2690       <tertiary>on first AFS machine</tertiary>
2691     </indexterm>
2692
2693     <indexterm>
2694       <primary>first AFS machine</primary>
2695
2696       <secondary>cell membership, defining</secondary>
2697
2698       <tertiary>for server processes</tertiary>
2699     </indexterm>
2700
2701     <indexterm>
2702       <primary>usr/afs/etc/CellServDB file</primary>
2703
2704       <see>CellServDB file (server)</see>
2705     </indexterm>
2706
2707     <indexterm>
2708       <primary>CellServDB file (server)</primary>
2709
2710       <secondary>creating</secondary>
2711
2712       <tertiary>on first AFS machine</tertiary>
2713     </indexterm>
2714
2715     <indexterm>
2716       <primary>creating</primary>
2717
2718       <secondary>CellServDB file (server)</secondary>
2719
2720       <tertiary>first AFS machine</tertiary>
2721     </indexterm>
2722
2723     <indexterm>
2724       <primary>files</primary>
2725
2726       <secondary>CellServDB (server)</secondary>
2727     </indexterm>
2728
2729     <indexterm>
2730       <primary>first AFS machine</primary>
2731
2732       <secondary>CellServDB file (server)</secondary>
2733     </indexterm>
2734
2735     <indexterm>
2736       <primary>first AFS machine</primary>
2737
2738       <secondary>defining</secondary>
2739
2740       <tertiary>as database server</tertiary>
2741     </indexterm>
2742
2743     <indexterm>
2744       <primary>defining</primary>
2745
2746       <secondary>first AFS machine as database server</secondary>
2747     </indexterm>
2748   </sect1>
2749
2750   <sect1 id="HDRWQ51">
2751     <title>Defining Cell Name and Membership for Server Processes</title>
2752
2753     <para>Now assign your cell's name. The chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration
2754     and administration issues discusses the important considerations, explains why changing the name is difficult, and outlines the
2755     restrictions on name format. Two of the most important restrictions are that the name cannot include uppercase letters or more
2756     than 64 characters.</para>
2757
2758     <para>Use the <emphasis role="bold">bos setcellname</emphasis> command to assign the cell name. It creates two files:
2759     <itemizedlist>
2760         <listitem>
2761           <para><emphasis role="bold">/usr/afs/etc/ThisCell</emphasis>, which defines this machine's cell membership</para>
2762         </listitem>
2763
2764         <listitem>
2765           <para><emphasis role="bold">/usr/afs/etc/CellServDB</emphasis>, which lists the cell's database server machines; the
2766           machine named on the command line is placed on the list automatically</para>
2767         </listitem>
2768       </itemizedlist> <note>
2769         <para>In the following and every instruction in this guide, for the <replaceable>machine name</replaceable> argument
2770         substitute the fully-qualified hostname (such as <emphasis role="bold">fs1.example.com</emphasis>) of the machine you are
2771         installing. For the <replaceable>cell name</replaceable> argument substitute your cell's complete name (such as <emphasis
2772         role="bold">example.com</emphasis>).</para>
2773       </note></para>
2774
2775     <indexterm>
2776       <primary>commands</primary>
2777
2778       <secondary>bos setcellname</secondary>
2779     </indexterm>
2780
2781     <indexterm>
2782       <primary>bos commands</primary>
2783
2784       <secondary>setcellname</secondary>
2785     </indexterm>
2786
2787     <orderedlist>
2788       <listitem>
2789         <para>If necessary, add the directory containing the <emphasis role="bold">bos</emphasis> command to your path.
2790       <programlisting>
2791    # <emphasis role="bold">export PATH=$PATH:/usr/afs/bin</emphasis>
2792       </programlisting>
2793         </para>
2794       </listitem>
2795
2796       <listitem>
2797         <para>Issue the <emphasis role="bold">bos setcellname</emphasis> command to set the cell name. <programlisting>
2798    # <emphasis role="bold">bos setcellname</emphasis> &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>cell name</replaceable>&gt; <emphasis
2799               role="bold">-noauth</emphasis>
2800 </programlisting></para>
2801
2802         <para>Because you are not authenticated and authorization checking is disabled, the <emphasis role="bold">bos</emphasis>
2803         command interpreter possibly produces error messages about being unable to obtain tickets and running unauthenticated. You
2804         can safely ignore the messages. <indexterm>
2805             <primary>commands</primary>
2806
2807             <secondary>bos listhosts</secondary>
2808           </indexterm> <indexterm>
2809             <primary>bos commands</primary>
2810
2811             <secondary>listhosts</secondary>
2812           </indexterm> <indexterm>
2813             <primary>CellServDB file (server)</primary>
2814
2815             <secondary>displaying entries</secondary>
2816           </indexterm> <indexterm>
2817             <primary>displaying</primary>
2818
2819             <secondary>CellServDB file (server) entries</secondary>
2820           </indexterm></para>
2821       </listitem>
2822
2823       <listitem>
2824         <para>Issue the <emphasis role="bold">bos listhosts</emphasis> command to verify that the machine you are installing is now
2825         registered as the cell's first database server machine. <programlisting>
2826    # <emphasis role="bold">bos listhosts</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">-noauth</emphasis>
2827    Cell name is <replaceable>cell_name</replaceable>
2828        Host 1 is <replaceable>machine_name</replaceable>
2829 </programlisting></para>
2830       </listitem>
2831     </orderedlist>
2832
2833     <indexterm>
2834       <primary>database server machine</primary>
2835
2836       <secondary>installing</secondary>
2837
2838       <tertiary>first</tertiary>
2839     </indexterm>
2840
2841     <indexterm>
2842       <primary>instructions</primary>
2843
2844       <secondary>database server machine, installing first</secondary>
2845     </indexterm>
2846
2847     <indexterm>
2848       <primary>installing</primary>
2849
2850       <secondary>database server machine</secondary>
2851
2852       <tertiary>first</tertiary>
2853     </indexterm>
2854
2855     <indexterm>
2856       <primary>Backup Server</primary>
2857
2858       <secondary>starting</secondary>
2859
2860       <tertiary>first AFS machine</tertiary>
2861     </indexterm>
2862
2863     <indexterm>
2864       <primary>buserver process</primary>
2865
2866       <see>Backup Server</see>
2867     </indexterm>
2868
2869     <indexterm>
2870       <primary>starting</primary>
2871
2872       <secondary>Backup Server</secondary>
2873
2874       <tertiary>first AFS machine</tertiary>
2875     </indexterm>
2876
2877     <indexterm>
2878       <primary>first AFS machine</primary>
2879
2880       <secondary>Backup Server</secondary>
2881     </indexterm>
2882
2883     <indexterm>
2884       <primary>Protection Server</primary>
2885
2886       <secondary>starting</secondary>
2887
2888       <tertiary>first AFS machine</tertiary>
2889     </indexterm>
2890
2891     <indexterm>
2892       <primary>ptserver process</primary>
2893
2894       <see>Protection Server</see>
2895     </indexterm>
2896
2897     <indexterm>
2898       <primary>starting</primary>
2899
2900       <secondary>Protection Server</secondary>
2901
2902       <tertiary>first AFS machine</tertiary>
2903     </indexterm>
2904
2905     <indexterm>
2906       <primary>first AFS machine</primary>
2907
2908       <secondary>Protection Server</secondary>
2909     </indexterm>
2910
2911     <indexterm>
2912       <primary>VL Server (vlserver process)</primary>
2913
2914       <secondary>starting</secondary>
2915
2916       <tertiary>first AFS machine</tertiary>
2917     </indexterm>
2918
2919     <indexterm>
2920       <primary>Volume Location Server</primary>
2921
2922       <see>VL Server</see>
2923     </indexterm>
2924
2925     <indexterm>
2926       <primary>starting</primary>
2927
2928       <secondary>VL Server</secondary>
2929
2930       <tertiary>first AFS machine</tertiary>
2931     </indexterm>
2932
2933     <indexterm>
2934       <primary>first AFS machine</primary>
2935
2936       <secondary>VL Server</secondary>
2937     </indexterm>
2938
2939     <indexterm>
2940       <primary>usr/afs/local/BosConfig</primary>
2941
2942       <see>BosConfig file</see>
2943     </indexterm>
2944
2945     <indexterm>
2946       <primary>BosConfig file</primary>
2947
2948       <secondary>adding entries</secondary>
2949
2950       <tertiary>first AFS machine</tertiary>
2951     </indexterm>
2952
2953     <indexterm>
2954       <primary>adding</primary>
2955
2956       <secondary>entries to BosConfig file</secondary>
2957
2958       <tertiary>first AFS machine</tertiary>
2959     </indexterm>
2960
2961     <indexterm>
2962       <primary>files</primary>
2963
2964       <secondary>BosConfig</secondary>
2965     </indexterm>
2966
2967     <indexterm>
2968       <primary>initializing</primary>
2969
2970       <secondary>server process</secondary>
2971
2972       <see>starting</see>
2973     </indexterm>
2974
2975     <indexterm>
2976       <primary>server process</primary>
2977
2978       <secondary>see also entry for each server's name</secondary>
2979     </indexterm>
2980   </sect1>
2981
2982   <sect1 id="HDRWQ52">
2983     <title>Starting the Database Server Processes</title>
2984
2985     <para>Next use the <emphasis role="bold">bos create</emphasis> command to create entries for the three database server processes
2986     in the <emphasis role="bold">/usr/afs/local/BosConfig</emphasis> file and start them running. The three processes run on database
2987     server machines only: <itemizedlist>
2988
2989         <listitem>
2990           <para>The Backup Server (the <emphasis role="bold">buserver</emphasis> process) maintains the Backup Database</para>
2991         </listitem>
2992
2993         <listitem>
2994           <para>The Protection Server (the <emphasis role="bold">ptserver</emphasis> process) maintains the Protection
2995           Database</para>
2996         </listitem>
2997
2998         <listitem>
2999           <para>The Volume Location (VL) Server (the <emphasis role="bold">vlserver</emphasis> process) maintains the Volume
3000           Location Database (VLDB)</para>
3001         </listitem>
3002       </itemizedlist></para>
3003
3004     <indexterm>
3005       <primary>Kerberos</primary>
3006     </indexterm>
3007
3008     <note>
3009       <para>AFS ships with an additional database server named 'kaserver', which
3010       was historically used to provide authentication services to AFS cells.
3011       kaserver was based on <emphasis>Kerberos v4</emphasis>, as such, it is
3012       not recommended for new cells. This guide assumes you have already
3013       configured a Kerberos v5 realm for your site, and details the procedures 
3014       required to use AFS with this realm. If you do wish to use
3015       <emphasis role="bold">kaserver</emphasis>, please see the modifications
3016       to these instructions detailed in 
3017       <link linkend="KAS006">Starting the kaserver Database Server Process</link>
3018       </para>
3019     </note>
3020
3021     <para>The remaining instructions in this chapter include the <emphasis role="bold">-cell</emphasis> argument on all applicable
3022     commands. Provide the cell name you assigned in <link linkend="HDRWQ51">Defining Cell Name and Membership for Server
3023     Processes</link>. If a command appears on multiple lines, it is only for legibility. <indexterm>
3024         <primary>commands</primary>
3025
3026         <secondary>bos create</secondary>
3027       </indexterm> <indexterm>
3028         <primary>bos commands</primary>
3029
3030         <secondary>create</secondary>
3031       </indexterm> <orderedlist>
3032         <listitem>
3033           <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the Backup Server. <programlisting>
3034    # <emphasis role="bold">./bos create</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">buserver simple /usr/afs/bin/buserver</emphasis>  \
3035  <emphasis role="bold">                 -cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt;  <emphasis role="bold">-noauth</emphasis>
3036 </programlisting></para>
3037         </listitem>
3038
3039         <listitem>
3040           <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the Protection Server. <programlisting>
3041    # <emphasis role="bold">./bos create</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">ptserver simple /usr/afs/bin/ptserver</emphasis>  \
3042  <emphasis role="bold">                 -cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt;  <emphasis role="bold">-noauth</emphasis>
3043 </programlisting></para>
3044         </listitem>
3045
3046         <listitem>
3047           <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the VL Server. <programlisting>
3048    # <emphasis role="bold">./bos create</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">vlserver simple /usr/afs/bin/vlserver</emphasis>  \
3049  <emphasis role="bold">                 -cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt;  <emphasis role="bold">-noauth</emphasis>
3050 </programlisting></para>
3051         </listitem>
3052       </orderedlist></para>
3053
3054     <indexterm>
3055       <primary>admin account</primary>
3056
3057       <secondary>creating</secondary>
3058     </indexterm>
3059
3060     <indexterm>
3061       <primary>afs entry in Kerberos Database</primary>
3062     </indexterm>
3063
3064     <indexterm>
3065       <primary>Kerberos Database</primary>
3066     </indexterm>
3067
3068     <indexterm>
3069       <primary>creating</primary>
3070
3071       <secondary>afs entry in Kerberos Database</secondary>
3072     </indexterm>
3073
3074     <indexterm>
3075       <primary>creating</primary>
3076
3077       <secondary>admin account in Kerberos Database</secondary>
3078     </indexterm>
3079
3080     <indexterm>
3081       <primary>security</primary>
3082
3083       <secondary>initializing cell-wide</secondary>
3084     </indexterm>
3085
3086     <indexterm>
3087       <primary>cell</primary>
3088
3089       <secondary>initializing security mechanisms</secondary>
3090     </indexterm>
3091
3092     <indexterm>
3093       <primary>initializing</primary>
3094
3095       <secondary>cell security mechanisms</secondary>
3096     </indexterm>
3097
3098     <indexterm>
3099       <primary>usr/afs/etc/KeyFile</primary>
3100
3101       <see>KeyFile file</see>
3102     </indexterm>
3103
3104     <indexterm>
3105       <primary>KeyFile file</primary>
3106
3107       <secondary>first AFS machine</secondary>
3108     </indexterm>
3109
3110     <indexterm>
3111       <primary>files</primary>
3112
3113       <secondary>KeyFile</secondary>
3114     </indexterm>
3115
3116     <indexterm>
3117       <primary>key</primary>
3118
3119       <see>server encryption key</see>
3120     </indexterm>
3121
3122     <indexterm>
3123       <primary>encryption key</primary>
3124
3125       <see>server encryption key</see>
3126     </indexterm>
3127   </sect1>
3128
3129   <sect1 id="HDRWQ53">
3130     <title>Initializing Cell Security </title>
3131
3132     <para>If you are working with an existing cell which uses
3133     <emphasis role="bold">kaserver</emphasis> or Kerberos v4 for authentication,
3134     please see 
3135     <link linkend="HDRWQ53">Initializing Cell Security with kaserver</link>
3136     for installation instructions which replace this section.</para>
3137     
3138     <para>Now initialize the cell's security mechanisms. Begin by creating the following two entires in your site's Kerberos database: <itemizedlist>
3139         <listitem>
3140           <para>A generic administrative account, called <emphasis role="bold">admin</emphasis> by convention. If you choose to
3141           assign a different name, substitute it throughout the remainder of this document.</para>
3142
3143           <para>After you complete the installation of the first machine, you can continue to have all administrators use the
3144           <emphasis role="bold">admin</emphasis> account, or you can create a separate administrative account for each of them. The
3145           latter scheme implies somewhat more overhead, but provides a more informative audit trail for administrative
3146           operations.</para>
3147         </listitem>
3148
3149         <listitem>
3150           <para>The entry for AFS server processes, called either 
3151           <emphasis role="bold">afs</emphasis> or 
3152           <emphasis role="bold">afs/<replaceable>cell</replaceable></emphasis>. 
3153           No user logs in under this identity, but it is used to encrypt the
3154           server tickets that granted to AFS clients for presentation to 
3155           server processes during mutual authentication. (The
3156           chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration and administration describes the
3157           role of server encryption keys in mutual authentication.)</para>
3158
3159           <para>In Step <link linkend="LIWQ58">7</link>, you also place the initial AFS server encryption key into the <emphasis
3160           role="bold">/usr/afs/etc/KeyFile</emphasis> file. The AFS server processes refer to this file to learn the server
3161           encryption key when they need to decrypt server tickets.</para>
3162         </listitem>
3163       </itemizedlist></para>
3164
3165     <para>You also issue several commands that enable the new <emphasis role="bold">admin</emphasis> user to issue privileged
3166     commands in all of the AFS suites.</para>
3167
3168     <para>The following instructions do not configure all of the security mechanisms related to the AFS Backup System. See the
3169     chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about configuring the Backup System.</para>
3170
3171     <para>The examples below assume you are using MIT Kerberos. Please refer 
3172     to the documentation for your KDC's administrative interface if you are 
3173     using a different vendor</para>
3174
3175     <orderedlist>
3176         <listitem>
3177           <para>Enter <emphasis role="bold">kadmin</emphasis> interactive mode.
3178 <programlisting>
3179    # <emphasis role="bold">kadmin</emphasis>
3180 Authenticating as principal <replaceable>you</replaceable>/admin@<replaceable>YOUR REALM</replaceable> with password
3181 Password for <replaceable>you/admin@REALM</replaceable>: <replaceable>your_password</replaceable>
3182 </programlisting> <indexterm>
3183               <primary>server encryption key</primary>
3184
3185               <secondary>in Kerberos Database</secondary>
3186             </indexterm> <indexterm>
3187               <primary>creating</primary>
3188
3189               <secondary>server encryption key</secondary>
3190
3191               <tertiary>Kerberos Database</tertiary>
3192             </indexterm></para>
3193         </listitem>
3194
3195         <listitem>
3196           <para><anchor id="LIWQ54" />Issue the 
3197           <emphasis role="bold">add_principal</emphasis> command to create 
3198           Kerberos Database entries called 
3199           <emphasis role="bold">admin</emphasis> and 
3200           <emphasis role="bold">afs/&lt;<replaceable>cell name</replaceable>&gt;</emphasis>.</para>
3201
3202           <para>You should make the <replaceable>admin_passwd</replaceable> as
3203           long and complex as possible, but keep in mind that administrators 
3204           need to enter it often. It must be at least six characters long.</para>
3205           <para>Note that when creating the 
3206           <emphasis role="bold">afs/&lt;<replaceable>cell name</replaceable>&gt;</emphasis> 
3207           entry, the encryption types should be restricted to des-cbc-crc:v4. 
3208           For more details regarding encryption types, see the documentation 
3209           for your Kerberos installation.
3210
3211 <programlisting>
3212    kadmin: <emphasis role="bold">add_principal -randkey -e des-cbc-crc:v4 afs/</emphasis>&lt;<replaceable>cell name</replaceable>&gt;
3213    Principal "afs/<replaceable>cell name</replaceable>@<replaceable>REALM</replaceable>" created.
3214    kadmin:  <emphasis role="bold">add_principal admin</emphasis>
3215    Enter password for principal "admin@<replaceable>REALM</replaceable>": <emphasis role="bold"><replaceable>admin_password</replaceable></emphasis>
3216    Principal "admin@<replaceable>REALM</replaceable>" created.
3217 </programlisting>
3218           </para>
3219
3220           <indexterm>
3221             <primary>commands</primary>
3222
3223             <secondary>kas examine</secondary>
3224           </indexterm>
3225
3226           <indexterm>
3227             <primary>kas commands</primary>
3228
3229             <secondary>examine</secondary>
3230           </indexterm>
3231
3232           <indexterm>
3233             <primary>displaying</primary>
3234
3235             <secondary>server encryption key</secondary>
3236
3237             <tertiary>Authentication Database</tertiary>
3238           </indexterm>
3239         </listitem>
3240
3241         <listitem>
3242           <para><anchor id="LIWQ55" />Issue the <emphasis role="bold">kadmin 
3243           get_principal</emphasis> command to display the <emphasis
3244           role="bold">afs/</emphasis>&lt;<replaceable>cell name</replaceable>&gt; entry. 
3245 <programlisting>
3246   kadmin: <emphasis role="bold">get_principal afs/&lt;<replaceable>cell name</replaceable>&gt;</emphasis>
3247   Principal: afs/<replaceable>cell</replaceable>
3248   [ ... ]
3249   Key: vno 2, DES cbc mode with CRC-32, no salt
3250   [ ... ]
3251 </programlisting>
3252 </para>
3253         </listitem>
3254         <listitem>
3255           <para>Extract the newly created key for <emphasis role="bold">afs/<replaceable>cell</replaceable></emphasis> to a keytab on the local machine. We will use <emphasis role="bold">/etc/afs.keytab</emphasis> as the location for this keytab.</para>
3256
3257           <para>The keytab contains the key material that ensures the security of your AFS cell. You should ensure that it is kept in a secure location at all times.</para>
3258
3259 <programlisting>
3260   kadmin: <emphasis role="bold">ktadd -k /etc/afs.keytab -e des-cbc-crc:v4 afs/&lt;<replaceable>cell name</replaceable>&gt;</emphasis>
3261 Entry for principal afs/&lt;<replaceable>cell name</replaceable>&gt; with kvno 3, encryption type DES cbc mode with CRC-32 added to keytab WRFILE:/etc/afs.keytab
3262 </programlisting>
3263           <para>Make a note of the key version number (kvno) given in the
3264           response, as you will need it to load the key into bos in a later
3265           step</para>
3266
3267           <note><para>Note that each time you run 
3268           <emphasis role="bold">ktadd</emphasis> a new key is generated
3269           for the item being extracted. This means that you cannot run ktadd
3270           multiple times and end up with the same key material each time.
3271           </para></note>
3272
3273         </listitem>
3274         <listitem>
3275           <para>Issue the <emphasis role="bold">kadmin quit</emphasis> command to leave <emphasis role="bold">kadmin</emphasis>
3276           interactive mode. <programlisting>
3277    kadmin: <emphasis role="bold">quit</emphasis>
3278 </programlisting> <indexterm>
3279               <primary>commands</primary>
3280
3281               <secondary>bos adduser</secondary>
3282             </indexterm> <indexterm>
3283               <primary>bos commands</primary>
3284
3285               <secondary>adduser</secondary>
3286             </indexterm> <indexterm>
3287               <primary>usr/afs/etc/UserList</primary>
3288
3289               <see>UserList file</see>
3290             </indexterm> <indexterm>
3291               <primary>UserList file</primary>
3292
3293               <secondary>first AFS machine</secondary>
3294             </indexterm> <indexterm>
3295               <primary>files</primary>
3296
3297               <secondary>UserList</secondary>
3298             </indexterm> <indexterm>
3299               <primary>creating</primary>
3300
3301               <secondary>UserList file entry</secondary>
3302             </indexterm> <indexterm>
3303               <primary>admin account</primary>
3304
3305               <secondary>adding</secondary>
3306
3307               <tertiary>to UserList file</tertiary>
3308             </indexterm></para>
3309         </listitem>
3310
3311         <listitem>
3312           <para><anchor id="LIWQ57" />Issue the <emphasis role="bold">bos adduser</emphasis> command to add the <emphasis
3313           role="bold">admin</emphasis> user to the <emphasis role="bold">/usr/afs/etc/UserList</emphasis> file. This enables the
3314           <emphasis role="bold">admin</emphasis> user to issue privileged <emphasis role="bold">bos</emphasis> and <emphasis
3315           role="bold">vos</emphasis> commands. <programlisting>
3316    # <emphasis role="bold">./bos adduser</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">admin -cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt; <emphasis
3317                 role="bold">-noauth</emphasis>
3318 </programlisting> 
3319             <indexterm>
3320               <primary>commands</primary>
3321               <secondary>asetkey</secondary>
3322             </indexterm>
3323             <indexterm>
3324               <primary>creating</primary>
3325               <secondary>server encryption key</secondary>
3326               <tertiary>KeyFile file</tertiary>
3327             </indexterm> 
3328             <indexterm>
3329               <primary>server encryption key</primary>
3330               <secondary>in KeyFile file</secondary>
3331             </indexterm></para>
3332         </listitem>
3333
3334         <listitem>
3335           <para><anchor id="LIWQ58" />Issue the 
3336           <emphasis role="bold">asetkey</emphasis> command to set the AFS 
3337           server encryption key in the 
3338           <emphasis role="bold">/usr/afs/etc/KeyFile</emphasis> file. This key 
3339           is created from the <emphasis role="bold">/etc/afs.keytab</emphasis> 
3340           file created earlier.</para>
3341
3342           <para>asetkey requires the key version number (or kvno) of the 
3343           <emphasis role="bold">afs/</emphasis><replaceable>cell</replaceable>
3344           key. You should have noted this down when creating the key earlier. 
3345           The key version number can also be found by running the 
3346           <emphasis role="bold">kvno</emphasis> command</para>
3347 <programlisting>
3348    # <emphasis role="bold">kvno afs/</emphasis>&lt;<replaceable>cell name</replaceable>&gt;
3349 </programlisting>
3350
3351           <para>Once the kvno is known, the key can then be extracted using 
3352           asetkey</para>
3353 <programlisting>
3354    # <emphasis role="bold">asetkey</emphasis> &lt;<replaceable>kvno</replaceable>&gt;  <emphasis role="bold">/etc/afs.keytab afs/</emphasis>&lt;<replaceable>cell name</replaceable>&gt;
3355 </programlisting>
3356
3357           <indexterm>
3358             <primary>commands</primary>
3359             <secondary>bos listkeys</secondary>
3360           </indexterm>
3361
3362           <indexterm>
3363             <primary>bos commands</primary>
3364             <secondary>listkeys</secondary>
3365           </indexterm>
3366
3367           <indexterm>
3368             <primary>displaying</primary>
3369             <secondary>server encryption key</secondary>
3370             <tertiary>KeyFile file</tertiary>
3371           </indexterm>
3372         </listitem>
3373
3374         <listitem>
3375           <para><anchor id="LIWQ59" />Issue the 
3376           <emphasis role="bold">bos listkeys</emphasis> command to verify that 
3377           the key version number for the new key in the 
3378           <emphasis role="bold">KeyFile</emphasis> file is the same as the key 
3379           version number in the Authentication Database's 
3380           <emphasis role="bold">afs/<replaceable>cell name</replaceable></emphasis> 
3381           entry, which you displayed in Step <link linkend="LIWQ55">3</link>. 
3382 <programlisting>
3383    # <emphasis role="bold">./bos listkeys</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">-cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt; <emphasis
3384                 role="bold">-noauth</emphasis>
3385    key 0 has cksum <replaceable>checksum</replaceable>    
3386 </programlisting></para>
3387
3388           <para>You can safely ignore any error messages indicating that <emphasis role="bold">bos</emphasis> failed to get tickets
3389           or that authentication failed.</para>
3390         </listitem>
3391       </orderedlist>
3392     </sect1>
3393     <sect1 id="HDRWQ53a">
3394       <title>Initializing the Protection Database</title>
3395       
3396       <para>Now continue to configure your cell's security systems by
3397       populating the Protection Database with the newly created
3398       <emphasis role="bold">admin</emphasis> user, and permitting it
3399       to issue priviledged commands on the AFS filesystem.</para>
3400           
3401         <orderedlist>
3402           <listitem>
3403           <indexterm>
3404             <primary>commands</primary>
3405             <secondary>pts createuser</secondary>
3406           </indexterm>
3407
3408           <indexterm>
3409             <primary>pts commands</primary>
3410             <secondary>createuser</secondary>
3411           </indexterm>
3412
3413           <indexterm>
3414             <primary>Protection Database</primary>
3415           </indexterm>
3416           <para>Issue the <emphasis role="bold">pts createuser</emphasis> command to create a Protection Database entry for the
3417           <emphasis role="bold">admin</emphasis> user.</para>
3418
3419           <para>By default, the Protection Server assigns AFS UID 1 (one) to the <emphasis role="bold">admin</emphasis> user,
3420           because it is the first user entry you are creating. If the local password file (<emphasis
3421           role="bold">/etc/passwd</emphasis> or equivalent) already has an entry for <emphasis role="bold">admin</emphasis> that
3422           assigns it a UNIX UID other than 1, it is best to use the <emphasis role="bold">-id</emphasis> argument to the <emphasis
3423           role="bold">pts createuser</emphasis> command to make the new AFS UID match the existing UNIX UID. Otherwise, it is best
3424           to accept the default.</para>
3425
3426           <programlisting>
3427    # <emphasis role="bold">pts createuser -name admin -cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt; [<emphasis
3428               role="bold">-id</emphasis> &lt;<replaceable>AFS UID</replaceable>&gt;]  <emphasis role="bold">-noauth</emphasis>
3429    User admin has id <replaceable>AFS UID</replaceable>
3430 </programlisting>
3431
3432           <indexterm>
3433             <primary>commands</primary>
3434             <secondary>pts adduser</secondary>
3435           </indexterm>
3436
3437           <indexterm>
3438             <primary>pts commands</primary>
3439             <secondary>adduser</secondary>
3440           </indexterm>
3441
3442           <indexterm>
3443             <primary>system:administrators group</primary>
3444           </indexterm>
3445
3446           <indexterm>
3447             <primary>admin account</primary>
3448             <secondary>adding</secondary>
3449             <tertiary>to system:administrators group</tertiary>
3450           </indexterm>
3451         </listitem>
3452
3453         <listitem>
3454           <para>Issue the <emphasis role="bold">pts adduser</emphasis> command to make the <emphasis role="bold">admin</emphasis>
3455           user a member of the <emphasis role="bold">system:administrators</emphasis> group, and the <emphasis role="bold">pts
3456           membership</emphasis> command to verify the new membership. Membership in the group enables the <emphasis
3457           role="bold">admin</emphasis> user to issue privileged <emphasis role="bold">pts</emphasis> commands and some privileged
3458           <emphasis role="bold">fs</emphasis> commands. <programlisting>
3459    # <emphasis role="bold">./pts adduser admin system:administrators -cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt; <emphasis
3460                 role="bold">-noauth</emphasis>
3461    # <emphasis role="bold">./pts membership admin -cell</emphasis>  &lt;<replaceable>cell name</replaceable>&gt; <emphasis
3462                 role="bold">-noauth</emphasis>
3463    Groups admin (id: 1) is a member of:
3464      system:administrators
3465 </programlisting> <indexterm>
3466               <primary>commands</primary>
3467               <secondary>bos restart</secondary>
3468               <tertiary>on first AFS machine</tertiary>
3469             </indexterm> <indexterm>
3470               <primary>bos commands</primary>
3471               <secondary>restart</secondary>
3472               <tertiary>on first AFS machine</tertiary>
3473             </indexterm> <indexterm>
3474               <primary>restarting server process</primary>
3475               <secondary>on first AFS machine</secondary>
3476             </indexterm> <indexterm>
3477               <primary>server process</primary>
3478               <secondary>restarting</secondary>
3479               <tertiary>on first AFS machine</tertiary>
3480             </indexterm></para>
3481         </listitem>
3482
3483         <listitem>
3484           <para>Issue the <emphasis role="bold">bos restart</emphasis> command with the <emphasis role="bold">-all</emphasis> flag
3485           to restart the database server processes, so that they start using the new server encryption key. <programlisting>
3486    # <emphasis role="bold">./bos restart</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">-all -cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt; <emphasis
3487                 role="bold">-noauth</emphasis>
3488 </programlisting></para>
3489         </listitem>
3490       </orderedlist>
3491
3492     <indexterm>
3493       <primary>File Server</primary>
3494
3495       <secondary>first AFS machine</secondary>
3496     </indexterm>
3497
3498     <indexterm>
3499       <primary>fileserver process</primary>
3500
3501       <see>File Server</see>
3502     </indexterm>
3503
3504     <indexterm>
3505       <primary>starting</primary>
3506
3507       <secondary>File Server</secondary>
3508
3509       <tertiary>first AFS machine</tertiary>
3510     </indexterm>
3511
3512     <indexterm>
3513       <primary>first AFS machine</primary>
3514
3515       <secondary>File Server, fs process</secondary>
3516     </indexterm>
3517
3518     <indexterm>
3519       <primary>Volume Server</primary>
3520
3521       <secondary>first AFS machine</secondary>
3522     </indexterm>
3523
3524     <indexterm>
3525       <primary>volserver process</primary>
3526
3527       <see>Volume Server</see>
3528     </indexterm>
3529
3530     <indexterm>
3531       <primary>starting</primary>
3532
3533       <secondary>Volume Server</secondary>
3534
3535       <tertiary>first AFS machine</tertiary>
3536     </indexterm>
3537
3538     <indexterm>
3539       <primary>first AFS machine</primary>
3540
3541       <secondary>Volume Server</secondary>
3542     </indexterm>
3543
3544     <indexterm>
3545       <primary>Salvager (salvager process)</primary>
3546
3547       <secondary>first AFS machine</secondary>
3548     </indexterm>
3549
3550     <indexterm>
3551       <primary>fs process</primary>
3552
3553       <secondary>first AFS machine</secondary>
3554     </indexterm>
3555
3556     <indexterm>
3557       <primary>starting</primary>
3558
3559       <secondary>fs process</secondary>
3560
3561       <tertiary>first AFS machine</tertiary>
3562     </indexterm>
3563
3564     <indexterm>
3565       <primary>first AFS machine</primary>
3566
3567       <secondary>Salvager</secondary>
3568     </indexterm>
3569   </sect1>
3570
3571   <sect1 id="HDRWQ60">
3572     <title>Starting the File Server, Volume Server, and Salvager</title>
3573
3574     <para>Start the <emphasis role="bold">fs</emphasis> process, which consists of the File Server, Volume Server, and Salvager
3575     (<emphasis role="bold">fileserver</emphasis>, <emphasis role="bold">volserver</emphasis> and <emphasis
3576     role="bold">salvager</emphasis> processes). <orderedlist>
3577         <listitem>
3578           <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the <emphasis role="bold">fs</emphasis>
3579           process. The command appears here on multiple lines only for legibility. <programlisting>
3580    # <emphasis role="bold">./bos create</emphasis>  &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">fs fs /usr/afs/bin/fileserver</emphasis>   \
3581                    <emphasis role="bold">/usr/afs/bin/volserver /usr/afs/bin/salvager</emphasis>  \
3582                    <emphasis role="bold">-cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt;  <emphasis role="bold">-noauth</emphasis>   
3583 </programlisting></para>
3584
3585           <para>Sometimes a message about Volume Location Database (VLDB) initialization appears, along with one or more instances
3586           of an error message similar to the following:</para>
3587
3588           <programlisting>
3589    FSYNC_clientInit temporary failure (will retry)   
3590 </programlisting>
3591
3592           <para>This message appears when the <emphasis role="bold">volserver</emphasis> process tries to start before the <emphasis
3593           role="bold">fileserver</emphasis> process has completed its initialization. Wait a few minutes after the last such message
3594           before continuing, to guarantee that both processes have started successfully. <indexterm>
3595               <primary>commands</primary>
3596
3597               <secondary>bos status</secondary>
3598             </indexterm> <indexterm>
3599               <primary>bos commands</primary>
3600
3601               <secondary>status</secondary>
3602             </indexterm></para>
3603
3604           <para>You can verify that the <emphasis role="bold">fs</emphasis> process has started successfully by issuing the
3605           <emphasis role="bold">bos status</emphasis> command. Its output mentions two <computeroutput>proc
3606           starts</computeroutput>.</para>
3607
3608           <programlisting>
3609    # <emphasis role="bold">./bos status</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">fs -long -noauth</emphasis>
3610 </programlisting>
3611         </listitem>
3612
3613         <listitem>
3614           <para>Your next action depends on whether you have ever run AFS file server machines in the cell: <itemizedlist>
3615               <indexterm>
3616                 <primary>commands</primary>
3617
3618                 <secondary>vos create</secondary>
3619
3620                 <tertiary>root.afs volume</tertiary>
3621               </indexterm>
3622
3623               <indexterm>
3624                 <primary>vos commands</primary>
3625
3626                 <secondary>create</secondary>
3627
3628                 <tertiary>root.afs volume</tertiary>
3629               </indexterm>
3630
3631               <indexterm>
3632                 <primary>root.afs volume</primary>
3633
3634                 <secondary>creating</secondary>
3635               </indexterm>
3636
3637               <indexterm>
3638                 <primary>volume</primary>
3639
3640                 <secondary>creating</secondary>
3641
3642                 <tertiary>root.afs</tertiary>
3643               </indexterm>
3644
3645               <indexterm>
3646                 <primary>creating</primary>
3647
3648                 <secondary>root.afs volume</secondary>
3649               </indexterm>
3650
3651               <listitem>
3652                 <para>If you are installing the first AFS server machine ever in the cell (that is, you are not upgrading the AFS
3653                 software from a previous version), create the first AFS volume, <emphasis role="bold">root.afs</emphasis>.</para>
3654
3655                 <para>For the <replaceable>partition name</replaceable> argument, substitute the name of one of the machine's AFS
3656                 server partitions (such as <emphasis role="bold">/vicepa</emphasis>).</para>
3657
3658                 <programlisting>
3659    # <emphasis role="bold">./vos create</emphasis>  &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>partition name</replaceable>&gt; <emphasis
3660                     role="bold">root.afs</emphasis>   \
3661                    <emphasis role="bold">-cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt;  <emphasis role="bold">-noauth</emphasis>   
3662 </programlisting>
3663
3664                 <para>The Volume Server produces a message confirming that it created the volume on the specified partition. You can
3665                 ignore error messages indicating that tokens are missing, or that authentication failed. <indexterm>
3666                     <primary>commands</primary>
3667
3668                     <secondary>vos syncvldb</secondary>
3669                   </indexterm> <indexterm>
3670                     <primary>vos commands</primary>
3671
3672                     <secondary>syncvldb</secondary>
3673                   </indexterm> <indexterm>
3674                     <primary>commands</primary>
3675
3676                     <secondary>vos syncserv</secondary>
3677                   </indexterm> <indexterm>
3678                     <primary>vos commands</primary>
3679
3680                     <secondary>syncserv</secondary>
3681                   </indexterm></para>
3682               </listitem>
3683
3684               <listitem>
3685                 <para>If there are existing AFS file server machines and volumes in the cell, issue the <emphasis role="bold">vos
3686                 syncvldb</emphasis> and <emphasis role="bold">vos syncserv</emphasis> commands to synchronize the VLDB with the
3687                 actual state of volumes on the local machine. To follow the progress of the synchronization operation, which can
3688                 take several minutes, use the <emphasis role="bold">-verbose</emphasis> flag. <programlisting>
3689    # <emphasis role="bold">./vos syncvldb</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">-cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt; <emphasis
3690                       role="bold">-verbose  -noauth</emphasis>
3691    # <emphasis role="bold">./vos syncserv</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis role="bold">-cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt; <emphasis
3692                       role="bold">-verbose  -noauth</emphasis>   
3693 </programlisting></para>
3694
3695                 <para>You can ignore error messages indicating that tokens are missing, or that authentication failed.</para>
3696               </listitem>
3697             </itemizedlist></para>
3698         </listitem>
3699       </orderedlist></para>
3700
3701     <indexterm>
3702       <primary>Update Server</primary>
3703
3704       <secondary>starting server portion</secondary>
3705
3706       <tertiary>first AFS machine</tertiary>
3707     </indexterm>
3708
3709     <indexterm>
3710       <primary>upserver process</primary>
3711
3712       <see>Update Server</see>
3713     </indexterm>
3714
3715     <indexterm>
3716       <primary>starting</primary>
3717
3718       <secondary>Update Server server portion</secondary>
3719
3720       <tertiary>first AFS machine</tertiary>
3721     </indexterm>
3722
3723     <indexterm>
3724       <primary>first AFS machine</primary>
3725
3726       <secondary>Update Server server portion</secondary>
3727     </indexterm>
3728
3729     <indexterm>
3730       <primary>first AFS machine</primary>
3731
3732       <secondary>defining</secondary>
3733
3734       <tertiary>as binary distribution machine</tertiary>
3735     </indexterm>
3736
3737     <indexterm>
3738       <primary>first AFS machine</primary>
3739
3740       <secondary>defining</secondary>
3741
3742       <tertiary>as system control machine</tertiary>
3743     </indexterm>
3744
3745     <indexterm>
3746       <primary>system control machine</primary>
3747     </indexterm>
3748
3749     <indexterm>
3750       <primary>binary distribution machine</primary>
3751     </indexterm>
3752   </sect1>
3753
3754   <sect1 id="HDRWQ61">
3755     <title>Starting the Server Portion of the Update Server</title>
3756
3757     <para>Start the server portion of the Update Server (the <emphasis role="bold">upserver</emphasis> process), to distribute the
3758     contents of directories on this machine to other server machines in the cell. It becomes active when you configure the client
3759     portion of the Update Server on additional server machines.</para>
3760
3761     <para>Distributing the contents of its <emphasis role="bold">/usr/afs/etc</emphasis> directory makes this machine the cell's
3762     <emphasis>system control machine</emphasis>. The other server machines in the cell run the <emphasis
3763     role="bold">upclientetc</emphasis> process (an instance of the client portion of the Update Server) to retrieve the
3764     configuration files. Use the <emphasis role="bold">-crypt</emphasis> argument to the <emphasis role="bold">upserver</emphasis>
3765     initialization command to specify that the Update Server distributes the contents of the <emphasis
3766     role="bold">/usr/afs/etc</emphasis> directory only in encrypted form, as shown in the following instruction. Several of the
3767     files in the directory, particularly the <emphasis role="bold">KeyFile</emphasis> file, are crucial to cell security and so must
3768     never cross the network unencrypted.</para>
3769
3770     <para>(You can choose not to configure a system control machine, in which case you must update the configuration files in each
3771     server machine's <emphasis role="bold">/usr/afs/etc</emphasis> directory individually. The <emphasis role="bold">bos</emphasis>
3772     commands used for this purpose also encrypt data before sending it across the network.)</para>
3773
3774     <para>Distributing the contents of its <emphasis role="bold">/usr/afs/bin</emphasis> directory to other server machines of its
3775     system type makes this machine a <emphasis>binary distribution machine</emphasis>. The other server machines of its system type
3776     run the <emphasis role="bold">upclientbin</emphasis> process (an instance of the client portion of the Update Server) to
3777     retrieve the binaries. If your platform has a package management system, 
3778     such as 'rpm' or 'apt', running the Update Server to distribute binaries 
3779     may interfere with this system.</para>
3780
3781     <para>The binaries in the <emphasis role="bold">/usr/afs/bin</emphasis> directory are not sensitive, so it is not necessary to
3782     encrypt them before transfer across the network. Include the <emphasis role="bold">-clear</emphasis> argument to the <emphasis
3783     role="bold">upserver</emphasis> initialization command to specify that the Update Server distributes the contents of the
3784     <emphasis role="bold">/usr/afs/bin</emphasis> directory in unencrypted form unless an <emphasis
3785     role="bold">upclientbin</emphasis> process requests encrypted transfer.</para>
3786
3787     <para>Note that the server and client portions of the Update Server always mutually authenticate with one another, regardless of
3788     whether you use the <emphasis role="bold">-clear</emphasis> or <emphasis role="bold">-crypt</emphasis> arguments. This protects
3789     their communications from eavesdropping to some degree.</para>
3790
3791     <para>For more information on the <emphasis role="bold">upclient</emphasis> and <emphasis role="bold">upserver</emphasis>
3792     processes, see their reference pages in the <emphasis>OpenAFS Administration Reference</emphasis>. The commands appear on
3793     multiple lines here only for legibility. <orderedlist>
3794         <listitem>
3795           <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the <emphasis role="bold">upserver</emphasis>
3796           process. <programlisting>
3797    # <emphasis role="bold">./bos create</emphasis>  &lt;<replaceable>machine name&gt;</replaceable> <emphasis role="bold">upserver simple</emphasis>  \ 
3798              <emphasis role="bold">"/usr/afs/bin/upserver  -crypt /usr/afs/etc</emphasis>    \
3799              <emphasis role="bold">-clear /usr/afs/bin" -cell</emphasis> &lt;<replaceable>cell name</replaceable>&gt;  <emphasis
3800                 role="bold">-noauth</emphasis> 
3801 </programlisting></para>
3802         </listitem>
3803       </orderedlist></para>
3804   </sect1>
3805
3806   <sect1 id="HDRWQ62">
3807     <title>Starting the Controller for NTPD</title>
3808
3809     <para>Keeping the clocks on all server and client machines in your cell synchronized is crucial to several functions, and in
3810     particular to the correct operation of AFS's distributed database technology, Ubik. The chapter in the <emphasis>OpenAFS
3811     Administration Guide</emphasis> about administering server machines explains how time skew can disturb Ubik's performance and
3812     cause service outages in your cell.</para>
3813
3814     <para>Historically, AFS used to distribute its own version of the Network 
3815 Time Protocol Daemon. Whilst this is still provided for existing sites, we 
3816 recommend that you configure and install your time service independently of 
3817 AFS. A reliable timeservice will also be required by your Kerberos realm, 
3818 and so may already be available at your site.</para>
3819
3820     <indexterm>
3821       <primary>overview</primary>
3822
3823       <secondary>installing client functionality on first machine</secondary>
3824     </indexterm>
3825
3826     <indexterm>
3827       <primary>first AFS machine</primary>
3828
3829       <secondary>client functionality</secondary>
3830
3831       <tertiary>installing</tertiary>
3832     </indexterm>
3833
3834     <indexterm>
3835       <primary>installing</primary>
3836
3837       <secondary>client functionality</secondary>
3838
3839       <tertiary>first AFS machine</tertiary>
3840     </indexterm>
3841   </sect1>
3842
3843   <sect1 id="HDRWQ63">
3844     <title>Overview: Installing Client Functionality</title>
3845
3846     <para>The machine you are installing is now an AFS file server machine, 
3847     database server machine, system control machine, and binary distribution 
3848     machine. Now make it a client machine by completing the following tasks: 
3849     <orderedlist>
3850         <listitem>
3851           <para>Define the machine's cell membership for client processes</para>
3852         </listitem>
3853
3854         <listitem>
3855           <para>Create the client version of the <emphasis role="bold">CellServDB</emphasis> file</para>
3856         </listitem>
3857
3858         <listitem>
3859           <para>Define cache location and size</para>
3860         </listitem>
3861
3862         <listitem>
3863           <para>Create the <emphasis role="bold">/afs</emphasis> directory and start the Cache Manager</para>
3864         </listitem>
3865       </orderedlist></para>
3866
3867     <indexterm>
3868       <primary>Distribution</primary>
3869
3870       <secondary>copying client files from</secondary>
3871
3872       <tertiary>first AFS machine</tertiary>
3873     </indexterm>
3874
3875     <indexterm>
3876       <primary>first AFS machine</primary>
3877
3878       <secondary>copying</secondary>
3879
3880       <tertiary>client files to local disk</tertiary>
3881     </indexterm>
3882
3883     <indexterm>
3884       <primary>copying</primary>
3885
3886       <secondary>client files to local disk</secondary>
3887
3888       <tertiary>first AFS machine</tertiary>
3889     </indexterm>
3890   </sect1>
3891
3892   <sect1 id="HDRWQ64">
3893     <title>Copying Client Files to the Local Disk</title>
3894
3895     <para>You need only undertake the steps in this section, if you are using
3896     a tar file distribution, or one built from scratch. Packaged distributions,
3897     such as RPMs or DEBs will already have installed the necessary files in
3898     the correct locations.</para>
3899
3900     <para>Before installing and configuring the AFS client, copy the necessary files from the tarball to the local <emphasis
3901     role="bold">/usr/vice/etc</emphasis> directory. <orderedlist>
3902         <listitem>
3903           <para>If you have not already done so, unpack the distribution 
3904           tarball for this machine's system type into a suitable location on 
3905           the filesystem, such as <emphasis role="bold">/tmp/afsdist</emphasis>.
3906           If you use a different location, substitue that in the examples that 
3907           follow.</para>
3908         </listitem>
3909
3910         <listitem>
3911           <para>Copy files to the local <emphasis role="bold">/usr/vice/etc</emphasis> directory.</para>
3912
3913           <para>This step places a copy of the AFS initialization script (and related files, if applicable) into the <emphasis
3914           role="bold">/usr/vice/etc</emphasis> directory. In the preceding instructions for incorporating AFS into the kernel, you
3915           copied the script directly to the operating system's conventional location for initialization files. When you incorporate
3916           AFS into the machine's startup sequence in a later step, you can choose to link the two files.</para>
3917
3918           <para>On some system types that use a dynamic kernel loader program, you previously copied AFS library files into a
3919           subdirectory of the <emphasis role="bold">/usr/vice/etc</emphasis> directory. On other system types, you copied the
3920           appropriate AFS library file directly to the directory where the operating system accesses it. The following commands do
3921           not copy or recopy the AFS library files into the <emphasis role="bold">/usr/vice/etc</emphasis> directory, because on
3922           some system types the library files consume a large amount of space. If you want to copy them, add the <emphasis
3923           role="bold">-r</emphasis> flag to the first <emphasis role="bold">cp</emphasis> command and skip the second <emphasis
3924           role="bold">cp</emphasis> command.</para>
3925
3926           <programlisting>
3927    # <emphasis role="bold">cd /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/root.client/usr/vice/etc</emphasis>
3928    # <emphasis role="bold">cp -p  *  /usr/vice/etc</emphasis>
3929    # <emphasis role="bold">cp -rp  C  /usr/vice/etc</emphasis>
3930 </programlisting>
3931         </listitem>
3932       </orderedlist></para>
3933
3934     <indexterm>
3935       <primary>cell name</primary>
3936
3937       <secondary>setting in client ThisCell file</secondary>
3938
3939       <tertiary>first AFS machine</tertiary>
3940     </indexterm>
3941
3942     <indexterm>
3943       <primary>setting</primary>
3944
3945       <secondary>cell name in client ThisCell file</secondary>
3946
3947       <tertiary>first AFS machine</tertiary>
3948     </indexterm>
3949
3950     <indexterm>
3951       <primary>first AFS machine</primary>
3952
3953       <secondary>ThisCell file (client)</secondary>
3954     </indexterm>
3955
3956     <indexterm>
3957       <primary>first AFS machine</primary>
3958
3959       <secondary>cell membership, defining</secondary>
3960
3961       <tertiary>for client processes</tertiary>
3962     </indexterm>
3963
3964     <indexterm>
3965       <primary>usr/vice/etc/ThisCell</primary>
3966
3967       <see>ThisCell file (client)</see>
3968     </indexterm>
3969
3970     <indexterm>
3971       <primary>ThisCell file (client)</primary>
3972
3973       <secondary>first AFS machine</secondary>
3974     </indexterm>
3975
3976     <indexterm>
3977       <primary>files</primary>
3978
3979       <secondary>ThisCell (client)</secondary>
3980     </indexterm>
3981   </sect1>
3982
3983   <sect1 id="HDRWQ65">
3984     <title>Defining Cell Membership for Client Processes</title>
3985
3986     <para>Every AFS client machine has a copy of the <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> file on its local disk
3987     to define the machine's cell membership for the AFS client programs that run on it. The <emphasis
3988     role="bold">ThisCell</emphasis> file you created in the <emphasis role="bold">/usr/afs/etc</emphasis> directory (in <link
3989     linkend="HDRWQ51">Defining Cell Name and Membership for Server Processes</link>) is used only by server processes.</para>
3990
3991     <para>Among other functions, the <emphasis role="bold">ThisCell</emphasis> file on a client machine determines the following:
3992     <itemizedlist>
3993         <listitem>
3994           <para>The cell in which users gain tokens when they log onto the 
3995           machine, assuming it is using an AFS-modified login utility</para>
3996         </listitem>
3997
3998         <listitem>
3999           <para>The cell in which users gain tokens by default when they issue
4000           the <emphasis role="bold">aklog</emphasis> command</para>
4001         </listitem>
4002
4003         <listitem>
4004           <para>The cell membership of the AFS server processes that the AFS 
4005           command interpreters on this machine contact by default</para>
4006         </listitem>
4007       </itemizedlist> 
4008     <orderedlist>
4009         <listitem>
4010           <para>Change to the <emphasis role="bold">/usr/vice/etc</emphasis> directory and remove the symbolic link created in <link
4011           linkend="HDRWQ50">Starting the BOS Server</link>. <programlisting>
4012    # <emphasis role="bold">cd /usr/vice/etc</emphasis>
4013    # <emphasis role="bold">rm ThisCell</emphasis>
4014 </programlisting></para>
4015         </listitem>
4016
4017         <listitem>
4018           <para>Create the <emphasis role="bold">ThisCell</emphasis> file as a copy of the <emphasis
4019           role="bold">/usr/afs/etc/ThisCell</emphasis> file. Defining the same local cell for both server and client processes leads
4020           to the most consistent AFS performance. <programlisting>
4021    # <emphasis role="bold">cp  /usr/afs/etc/ThisCell  ThisCell</emphasis>
4022 </programlisting></para>
4023         </listitem>
4024       </orderedlist></para>
4025
4026     <indexterm>
4027       <primary>database server machine</primary>
4028
4029       <secondary>entry in client CellServDB file</secondary>
4030
4031       <tertiary>on first AFS machine</tertiary>
4032     </indexterm>
4033
4034     <indexterm>
4035       <primary>usr/vice/etc/CellServDB</primary>
4036
4037       <see>CellServDB file (client)</see>
4038     </indexterm>
4039
4040     <indexterm>
4041       <primary>CellServDB file (client)</primary>
4042
4043       <secondary>creating</secondary>
4044
4045       <tertiary>on first AFS machine</tertiary>
4046     </indexterm>
4047
4048     <indexterm>
4049       <primary>creating</primary>
4050
4051       <secondary>CellServDB file (client)</secondary>
4052
4053       <tertiary>first AFS machine</tertiary>
4054     </indexterm>
4055
4056     <indexterm>
4057       <primary>CellServDB file (client)</primary>
4058
4059       <secondary>required format</secondary>
4060     </indexterm>
4061
4062     <indexterm>
4063       <primary>requirements</primary>
4064
4065       <secondary>CellServDB file format (client version)</secondary>
4066     </indexterm>
4067
4068     <indexterm>
4069       <primary>files</primary>
4070
4071       <secondary>CellServDB (client)</secondary>
4072     </indexterm>
4073
4074     <indexterm>
4075       <primary>first AFS machine</primary>
4076
4077       <secondary>CellServDB file (client)</secondary>
4078     </indexterm>
4079   </sect1>
4080
4081   <sect1 id="HDRWQ66">
4082     <title>Creating the Client CellServDB File</title>
4083
4084     <para>The <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> file on a client machine's local disk lists the database
4085     server machines for each cell that the local Cache Manager can contact. If there is no entry in the file for a cell, or if the
4086     list of database server machines is wrong, then users working on this machine cannot access the cell. The chapter in the
4087     <emphasis>OpenAFS Administration Guide</emphasis> about administering client machines explains how to maintain the file after
4088     creating it.</para>
4089
4090     <para>As the <emphasis role="bold">afsd</emphasis> program initializes the Cache Manager, it copies the contents of the
4091     <emphasis role="bold">CellServDB</emphasis> file into kernel memory. The Cache Manager always consults the list in kernel memory
4092     rather than the <emphasis role="bold">CellServDB</emphasis> file itself. Between reboots of the machine, you can use the
4093     <emphasis role="bold">fs newcell</emphasis> command to update the list in kernel memory directly; see the chapter in the
4094     <emphasis>OpenAFS Administration Guide</emphasis> about administering client machines.</para>
4095
4096     <para>The AFS distribution includes the file 
4097     <emphasis role="bold">CellServDB.dist</emphasis>. It includes an entry for 
4098     all AFS cells that agreed to share their database server machine 
4099     information at the time the distribution was 
4100     created. The definitive copy of this file is maintained at 
4101     grand.central.org, and updates may be obtained from
4102     /afs/grand.central.org/service/CellServDB or 
4103     <ulink url="http://grand.central.org/dl/cellservdb/CellServDB">
4104     http://grand.central.org/dl/cellservdb/CellServDB</ulink></para>
4105
4106     <para>The <emphasis role="bold">CellServDB.dist</emphasis> file can be a 
4107     good basis for the client <emphasis role="bold">CellServDB</emphasis> file, 
4108     because all of the entries in it use the correct format. You can add or 
4109     remove cell entries as you see fit. Depending on your cache manager
4110     configuration, additional steps (as detailed in 
4111     <link linkend="HDRWQ91">Enabling Access to Foreign Cells</link>) may be
4112     required to enable the Cache Manager to actually reach the cells.</para>
4113
4114     <para>In this section, you add an entry for the local cell to the local <emphasis role="bold">CellServDB</emphasis> file. The
4115     current working directory is still <emphasis role="bold">/usr/vice/etc</emphasis>. <orderedlist>
4116         <listitem>
4117           <para>Remove the symbolic link created in <link linkend="HDRWQ50">Starting the BOS Server</link> and rename the <emphasis
4118           role="bold">CellServDB.sample</emphasis> file to <emphasis role="bold">CellServDB</emphasis>. <programlisting>
4119    # <emphasis role="bold">rm CellServDB</emphasis>
4120    # <emphasis role="bold">mv CellServDB.sample CellServDB</emphasis>
4121 </programlisting></para>
4122         </listitem>
4123
4124         <listitem>
4125           <para>Add an entry for the local cell to the <emphasis role="bold">CellServDB</emphasis> file. One easy method is to use
4126           the <emphasis role="bold">cat</emphasis> command to append the contents of the server <emphasis
4127           role="bold">/usr/afs/etc/CellServDB</emphasis> file to the client version. <programlisting>
4128     # <emphasis role="bold">cat  /usr/afs/etc/CellServDB &gt;&gt;  CellServDB</emphasis>   
4129 </programlisting></para>
4130
4131           <para>Then open the file in a text editor to verify that there are no blank lines, and that all entries have the required
4132           format, which is described just following. The ordering of cells is not significant, but it can be convenient to have the
4133           client machine's home cell at the top; move it there now if you wish. <itemizedlist>
4134               <listitem>
4135                 <para>The first line of a cell's entry has the following format: <programlisting>
4136    &gt;<replaceable>cell_name</replaceable>      #<replaceable>organization</replaceable>   
4137 </programlisting></para>
4138
4139                 <para>where <replaceable>cell_name</replaceable> is the cell's complete Internet domain name (for example, <emphasis
4140                 role="bold">example.com</emphasis>) and <replaceable>organization</replaceable> is an optional field that follows any
4141                 number of spaces and the number sign (<computeroutput>#</computeroutput>). By convention it names the organization
4142                 to which the cell corresponds (for example, the Example Corporation).</para>
4143               </listitem>
4144
4145               <listitem>
4146                 <para>After the first line comes a separate line for each database server machine. Each line has the following
4147                 format: <programlisting>
4148    <replaceable>IP_address</replaceable>   #<replaceable>machine_name</replaceable>   
4149 </programlisting></para>
4150
4151                 <para>where <replaceable>IP_address</replaceable> is the machine's IP address in dotted decimal format (for example,
4152                 192.12.105.3). Following any number of spaces and the number sign (<computeroutput>#</computeroutput>) is
4153                 <replaceable>machine_name</replaceable>, the machine's fully-qualified hostname (for example, <emphasis
4154                 role="bold">db1.example.com</emphasis>). In this case, the number sign does not indicate a comment;
4155                 <replaceable>machine_name</replaceable> is a required field.</para>
4156               </listitem>
4157             </itemizedlist></para>
4158         </listitem>
4159
4160         <listitem>
4161           <para>If the file includes cells that you do not wish users of this machine to access, remove their entries.</para>
4162         </listitem>
4163       </orderedlist></para>
4164
4165     <para>The following example shows entries for two cells, each of which has three database server machines:</para>
4166
4167     <programlisting>
4168    &gt;example.com       #Example Corporation (home cell)
4169    192.12.105.3      #db1.example.com
4170    192.12.105.4      #db2.example.com
4171    192.12.105.55     #db3.example.com
4172    &gt;stateu.edu    #State University cell
4173    138.255.68.93     #serverA.stateu.edu
4174    138.255.68.72     #serverB.stateu.edu
4175    138.255.33.154    #serverC.stateu.edu
4176 </programlisting>
4177
4178     <indexterm>
4179       <primary>cache</primary>
4180
4181       <secondary>configuring</secondary>
4182
4183       <tertiary>first AFS machine</tertiary>
4184     </indexterm>
4185
4186     <indexterm>
4187       <primary>configuring</primary>
4188
4189       <secondary>cache</secondary>
4190
4191       <tertiary>first AFS machine</tertiary>
4192     </indexterm>
4193
4194     <indexterm>
4195       <primary>setting</primary>
4196
4197       <secondary>cache size and location</secondary>
4198
4199       <tertiary>first AFS machine</tertiary>
4200     </indexterm>
4201
4202     <indexterm>
4203       <primary>first AFS machine</primary>
4204
4205       <secondary>cache size and location</secondary>
4206     </indexterm>
4207   </sect1>
4208
4209   <sect1 id="HDRWQ67">
4210     <title>Configuring the Cache</title>
4211
4212     <para>The Cache Manager uses a cache on the local disk or in machine memory to store local copies of files fetched from file
4213     server machines. As the <emphasis role="bold">afsd</emphasis> program initializes the Cache Manager, it sets basic cache
4214     configuration parameters according to definitions in the local <emphasis role="bold">/usr/vice/etc/cacheinfo</emphasis> file.
4215     The file has three fields: <orderedlist>
4216         <listitem>
4217           <para>The first field names the local directory on which to mount the AFS filespace. The conventional location is the
4218           <emphasis role="bold">/afs</emphasis> directory.</para>
4219         </listitem>
4220
4221         <listitem>
4222           <para>The second field defines the local disk directory to use for the disk cache. The conventional location is the
4223           <emphasis role="bold">/usr/vice/cache</emphasis> directory, but you can specify an alternate directory if another
4224           partition has more space available. There must always be a value in this field, but the Cache Manager ignores it if the
4225           machine uses a memory cache.</para>
4226         </listitem>
4227
4228         <listitem>
4229           <para>The third field specifies the number of kilobyte (1024 byte) blocks to allocate for the cache.</para>
4230         </listitem>
4231       </orderedlist></para>
4232
4233     <para>The values you define must meet the following requirements. <itemizedlist>
4234         <listitem>
4235           <para>On a machine using a disk cache, the Cache Manager expects always to be able to use the amount of space specified in
4236           the third field. Failure to meet this requirement can cause serious problems, some of which can be repaired only by
4237           rebooting. You must prevent non-AFS processes from filling up the cache partition. The simplest way is to devote a
4238           partition to the cache exclusively.</para>
4239         </listitem>
4240
4241         <listitem>
4242           <para>The amount of space available in memory or on the partition housing the disk cache directory imposes an absolute
4243           limit on cache size.</para>
4244         </listitem>
4245
4246         <listitem>
4247           <para>The maximum supported cache size can vary in each AFS release; see the <emphasis>OpenAFS Release Notes</emphasis>
4248           for the current version.</para>
4249         </listitem>
4250
4251         <listitem>
4252           <para>For a disk cache, you cannot specify a value in the third field that exceeds 95% of the space available on the
4253           partition mounted at the directory named in the second field. If you violate this restriction, the <emphasis
4254           role="bold">afsd</emphasis> program exits without starting the Cache Manager and prints an appropriate message on the
4255           standard output stream. A value of 90% is more appropriate on most machines. Some operating systems (such as AIX) do not
4256           automatically reserve some space to prevent the partition from filling completely; for them, a smaller value (say, 80% to
4257           85% of the space available) is more appropriate.</para>
4258         </listitem>
4259
4260         <listitem>
4261           <para>For a memory cache, you must leave enough memory for other processes and applications to run. If you try to allocate
4262           more memory than is actually available, the <emphasis role="bold">afsd</emphasis> program exits without initializing the
4263           Cache Manager and produces the following message on the standard output stream. <programlisting>
4264    afsd: memCache allocation failure at <replaceable>number</replaceable> KB
4265 </programlisting></para>
4266
4267           <para>The <replaceable>number</replaceable> value is how many kilobytes were allocated just before the failure, and so
4268           indicates the approximate amount of memory available.</para>
4269         </listitem>
4270       </itemizedlist></para>
4271
4272     <para>Within these hard limits, the factors that determine appropriate cache size include the number of users working on the
4273     machine, the size of the files with which they work, and (for a memory cache) the number of processes that run on the machine.
4274     The higher the demand from these factors, the larger the cache needs to be to maintain good performance.</para>
4275
4276     <para>Disk caches smaller than 10 MB do not generally perform well. Machines serving multiple users usually perform better with
4277     a cache of at least 60 to 70 MB. The point at which enlarging the cache further does not really improve performance depends on
4278     the factors mentioned previously and is difficult to predict.</para>
4279
4280     <para>Memory caches smaller than 1 MB are nonfunctional, and the performance of caches smaller than 5 MB is usually
4281     unsatisfactory. Suitable upper limits are similar to those for disk caches but are probably determined more by the demands on
4282     memory from other sources on the machine (number of users and processes). Machines running only a few processes possibly can use
4283     a smaller memory cache.</para>
4284
4285     <sect2 id="HDRWQ68">
4286       <title>Configuring a Disk Cache</title>
4287
4288       <note>
4289         <para>Not all file system types that an operating system supports are necessarily supported for use as the cache partition.
4290         For possible restrictions, see the <emphasis>OpenAFS Release Notes</emphasis>.</para>
4291       </note>
4292
4293       <para>To configure the disk cache, perform the following procedures: <orderedlist>
4294           <listitem>
4295             <para>Create the local directory to use for caching. The following instruction shows the conventional location,
4296             <emphasis role="bold">/usr/vice/cache</emphasis>. If you are devoting a partition exclusively to caching, as
4297             recommended, you must also configure it, make a file system on it, and mount it at the directory created in this step.
4298             <programlisting>
4299    # <emphasis role="bold">mkdir /usr/vice/cache</emphasis>
4300 </programlisting></para>
4301           </listitem>
4302
4303           <listitem>
4304             <para>Create the <emphasis role="bold">cacheinfo</emphasis> file to define the configuration parameters discussed
4305             previously. The following instruction shows the standard mount location, <emphasis role="bold">/afs</emphasis>, and the
4306             standard cache location, <emphasis role="bold">/usr/vice/cache</emphasis>. <programlisting>
4307    # <emphasis role="bold">echo "/afs:/usr/vice/cache:</emphasis><replaceable>#blocks</replaceable><emphasis role="bold">" &gt; /usr/vice/etc/cacheinfo</emphasis>
4308 </programlisting></para>
4309
4310             <para>The following example defines the disk cache size as 50,000 KB:</para>
4311
4312             <programlisting>
4313    # <emphasis role="bold">echo "/afs:/usr/vice/cache:50000" &gt; /usr/vice/etc/cacheinfo</emphasis>
4314 </programlisting>
4315           </listitem>
4316         </orderedlist></para>
4317     </sect2>
4318
4319     <sect2 id="HDRWQ69">
4320       <title>Configuring a Memory Cache</title>
4321
4322       <para>To configure a memory cache, create the <emphasis role="bold">cacheinfo</emphasis> file to define the configuration
4323       parameters discussed previously. The following instruction shows the standard mount location, <emphasis
4324       role="bold">/afs</emphasis>, and the standard cache location, <emphasis role="bold">/usr/vice/cache</emphasis> (though the
4325       exact value of the latter is irrelevant for a memory cache).</para>
4326
4327       <programlisting>
4328    # <emphasis role="bold">echo "/afs:/usr/vice/cache:</emphasis><replaceable>#blocks</replaceable><emphasis role="bold">" &gt; /usr/vice/etc/cacheinfo</emphasis>
4329 </programlisting>
4330
4331       <para>The following example allocates 25,000 KB of memory for the cache.</para>
4332
4333       <programlisting>
4334    # <emphasis role="bold">echo "/afs:/usr/vice/cache:25000" &gt; /usr/vice/etc/cacheinfo</emphasis>
4335 </programlisting>
4336
4337       <indexterm>
4338         <primary>Cache Manager</primary>
4339
4340         <secondary>first AFS machine</secondary>
4341       </indexterm>
4342
4343       <indexterm>
4344         <primary>configuring</primary>
4345
4346         <secondary>Cache Manager</secondary>
4347
4348         <tertiary>first AFS machine</tertiary>
4349       </indexterm>
4350
4351       <indexterm>
4352         <primary>first AFS machine</primary>
4353
4354         <secondary>Cache Manager</secondary>
4355       </indexterm>
4356
4357       <indexterm>
4358         <primary>afs (/afs) directory</primary>
4359
4360         <secondary>creating</secondary>
4361
4362         <tertiary>first AFS machine</tertiary>
4363       </indexterm>
4364
4365       <indexterm>
4366         <primary>AFS initialization script</primary>
4367
4368         <secondary>setting afsd parameters</secondary>
4369
4370         <tertiary>first AFS machine</tertiary>
4371       </indexterm>
4372
4373       <indexterm>
4374         <primary>first AFS machine</primary>
4375
4376         <secondary>afsd command parameters</secondary>
4377       </indexterm>
4378     </sect2>
4379   </sect1>
4380
4381   <sect1 id="HDRWQ70">
4382     <title>Configuring the Cache Manager</title>
4383
4384     <para>By convention, the Cache Manager mounts the AFS filespace on the local <emphasis role="bold">/afs</emphasis> directory. In
4385     this section you create that directory.</para>
4386
4387     <para>The <emphasis role="bold">afsd</emphasis> program sets several cache configuration parameters as it initializes the Cache
4388     Manager, and starts daemons that improve performance. You can use the <emphasis role="bold">afsd</emphasis> command's arguments
4389     to override the parameters' default values and to change the number of some of the daemons. Depending on the machine's cache
4390     size, its amount of RAM, and how many people work on it, you can sometimes improve Cache Manager performance by overriding the
4391     default values. For a discussion of all of the <emphasis role="bold">afsd</emphasis> command's arguments, see its reference page
4392     in the <emphasis>OpenAFS Administration Reference</emphasis>.</para>
4393
4394     <para>On platforms using the standard 'afs' initialisation script (this does not apply to Fedora or RHEL based distributions), the <emphasis role="bold">afsd</emphasis> command line in the AFS initialization script on each system type includes an
4395     <computeroutput>OPTIONS</computeroutput> variable. You can use it to set nondefault values for the command's arguments, in one
4396     of the following ways: <itemizedlist>
4397         <listitem>
4398           <para>You can create an <emphasis role="bold">afsd</emphasis> <emphasis>options file</emphasis> that sets values for
4399           arguments to the <emphasis role="bold">afsd</emphasis> command. If the file exists, its contents are automatically
4400           substituted for the <computeroutput>OPTIONS</computeroutput> variable in the AFS initialization script. The AFS
4401           distribution for some system types includes an options file; on other system types, you must create it.</para>
4402
4403           <para>You use two variables in the AFS initialization script to specify the path to the options file:
4404           <computeroutput>CONFIG</computeroutput> and <computeroutput>AFSDOPT</computeroutput>. On system types that define a
4405           conventional directory for configuration files, the <computeroutput>CONFIG</computeroutput> variable indicates it by
4406           default; otherwise, the variable indicates an appropriate location.</para>
4407
4408           <para>List the desired <emphasis role="bold">afsd</emphasis> options on a single line in the options file, separating each
4409           option with one or more spaces. The following example sets the <emphasis role="bold">-stat</emphasis> argument to 2500,
4410           the <emphasis role="bold">-daemons</emphasis> argument to 4, and the <emphasis role="bold">-volumes</emphasis> argument to
4411           100.</para>
4412
4413           <programlisting>
4414    -stat 2500 -daemons 4 -volumes 100   
4415 </programlisting>
4416         </listitem>
4417
4418         <listitem>
4419           <para>On a machine that uses a disk cache, you can set the <computeroutput>OPTIONS</computeroutput> variable in the AFS
4420           initialization script to one of <computeroutput>$SMALL</computeroutput>, <computeroutput>$MEDIUM</computeroutput>, or
4421           <computeroutput>$LARGE</computeroutput>. The AFS initialization script uses one of these settings if the <emphasis
4422           role="bold">afsd</emphasis> options file named by the <computeroutput>AFSDOPT</computeroutput> variable does not exist. In
4423           the script as distributed, the <computeroutput>OPTIONS</computeroutput> variable is set to the value
4424           <computeroutput>$MEDIUM</computeroutput>.</para>
4425
4426           <note>
4427             <para>Do not set the <computeroutput>OPTIONS</computeroutput> variable to <computeroutput>$SMALL</computeroutput>,
4428             <computeroutput>$MEDIUM</computeroutput>, or <computeroutput>$LARGE</computeroutput> on a machine that uses a memory
4429             cache. The arguments it sets are appropriate only on a machine that uses a disk cache.</para>
4430           </note>
4431
4432           <para>The script (or on some system types the <emphasis role="bold">afsd</emphasis> options file named by the
4433           <computeroutput>AFSDOPT</computeroutput> variable) defines a value for each of <computeroutput>SMALL</computeroutput>,
4434           <computeroutput>MEDIUM</computeroutput>, and <computeroutput>LARGE</computeroutput> that sets <emphasis
4435           role="bold">afsd</emphasis> command arguments appropriately for client machines of different sizes: <itemizedlist>
4436               <listitem>
4437                 <para><computeroutput>SMALL</computeroutput> is suitable for a small machine that serves one or two users and has
4438                 approximately 8 MB of RAM and a 20-MB cache</para>
4439               </listitem>
4440
4441               <listitem>
4442                 <para><computeroutput>MEDIUM</computeroutput> is suitable for a medium-sized machine that serves two to six users
4443                 and has 16 MB of RAM and a 40-MB cache</para>
4444               </listitem>
4445
4446               <listitem>
4447                 <para><computeroutput>LARGE</computeroutput> is suitable for a large machine that serves five to ten users and has
4448                 32 MB of RAM and a 100-MB cache</para>
4449               </listitem>
4450             </itemizedlist></para>
4451         </listitem>
4452
4453         <listitem>
4454           <para>You can choose not to create an <emphasis role="bold">afsd</emphasis> options file and to set the
4455           <computeroutput>OPTIONS</computeroutput> variable in the initialization script to a null value rather than to the default
4456           <computeroutput>$MEDIUM</computeroutput> value. You can then either set arguments directly on the <emphasis
4457           role="bold">afsd</emphasis> command line in the script, or set no arguments (and so accept default values for all Cache
4458           Manager parameters).</para>
4459         </listitem>
4460       </itemizedlist>
4461
4462       <note>
4463       <para>If you are running on a Fedora or RHEL based system, the 
4464       openafs-client initialization script behaves differently from that 
4465       described above. It sources /etc/sysconfig/openafs, in which the
4466       AFSD_ARGS variable may be set to contain any, or all, of the afsd options
4467       detailed. Note that this script does not support setting an OPTIONS
4468       variable, or the SMALL, MEDIUM and LARGE methods of defining cache size
4469       </para>
4470       </note>
4471
4472  <orderedlist>
4473         <listitem>
4474           <para>Create the local directory on which to mount the AFS filespace, by convention <emphasis role="bold">/afs</emphasis>.
4475           If the directory already exists, verify that it is empty. <programlisting>
4476    # <emphasis role="bold">mkdir /afs</emphasis>
4477 </programlisting></para>
4478         </listitem>
4479
4480         <listitem>
4481           <para>On AIX systems, add the following line to the <emphasis role="bold">/etc/vfs</emphasis> file. It enables AIX to
4482           unmount AFS correctly during shutdown. <programlisting>
4483    afs     4     none     none
4484 </programlisting></para>
4485         </listitem>
4486
4487         <listitem>
4488           <para>On non-package based Linux systems, copy the <emphasis role="bold">afsd</emphasis> options file from the <emphasis
4489           role="bold">/usr/vice/etc</emphasis> directory to the <emphasis role="bold">/etc/sysconfig</emphasis> directory, removing
4490           the <emphasis role="bold">.conf</emphasis> extension as you do so. <programlisting>
4491    # <emphasis role="bold">cp /usr/vice/etc/afs.conf /etc/sysconfig/afs</emphasis>
4492 </programlisting></para>
4493         </listitem>
4494
4495         <listitem>
4496           <para>Edit the machine's AFS initialization script or <emphasis role="bold">afsd</emphasis> options file to set
4497           appropriate values for <emphasis role="bold">afsd</emphasis> command parameters. The script resides in the indicated
4498           location on each system type: <itemizedlist>
4499               <listitem>
4500                 <para>On AIX systems, <emphasis role="bold">/etc/rc.afs</emphasis></para>
4501               </listitem>
4502
4503               <listitem>
4504                 <para>On HP-UX systems, <emphasis role="bold">/sbin/init.d/afs</emphasis></para>
4505               </listitem>
4506
4507               <listitem>
4508                 <para>On IRIX systems, <emphasis role="bold">/etc/init.d/afs</emphasis></para>
4509               </listitem>
4510
4511                   <listitem>
4512                 <para>On Fedora and RHEL systems, <emphasis role="bold">/etc/sysconfg/openafs</emphasis></para>
4513               </listitem>
4514               
4515               <listitem>
4516                 <para>On non-package based Linux systems, <emphasis role="bold">/etc/sysconfig/afs</emphasis> (the <emphasis
4517                 role="bold">afsd</emphasis> options file)</para>
4518               </listitem>
4519
4520               <listitem>
4521                 <para>On Solaris systems, <emphasis role="bold">/etc/init.d/afs</emphasis></para>
4522               </listitem>
4523             </itemizedlist></para>
4524
4525           <para>Use one of the methods described in the introduction to this section to add the following flags to the <emphasis
4526           role="bold">afsd</emphasis> command line. If you intend for the machine to remain an AFS client, also set any
4527           performance-related arguments you wish. <itemizedlist>
4528               <listitem>
4529                 <para>Add the <emphasis role="bold">-memcache</emphasis> flag if the machine is to use a memory cache.</para>
4530               </listitem>
4531
4532               <listitem>
4533                 <para>Add the <emphasis role="bold">-verbose</emphasis> flag to display a trace of the Cache Manager's
4534                 initialization on the standard output stream.</para>
4535               </listitem>
4536             </itemizedlist></para>
4537         </listitem>
4538       </orderedlist>
4539       <note><para>In order to successfully complete the instructions in the
4540       remainder of this guide, it is important that the machine does not have
4541       a synthetic root (as discussed in <link linkend="HDRWQ91">Enabling Access
4542       to Foreign Cells</link>). As some distributions ship with this enabled, it
4543       may be necessary to remove any occurences of the 
4544       <emphasis role="bold">-dynroot</emphasis> and 
4545       <emphasis role="bold">-afsdb</emphasis> options from both the AFS 
4546       initialisation script and options file. If this functionality is 
4547       required it may be renabled as detailed in 
4548       <link linkend="HDRWQ91">Enabling Access to Foreign Cells</link>.
4549       </para></note>
4550       </para>
4551
4552     <indexterm>
4553       <primary>overview</primary>
4554
4555       <secondary>completing installation of first machine</secondary>
4556     </indexterm>
4557
4558     <indexterm>
4559       <primary>first AFS machine</primary>
4560
4561       <secondary>completion of installation</secondary>
4562     </indexterm>
4563   </sect1>
4564
4565   <sect1 id="HDRWQ71">
4566     <title>Overview: Completing the Installation of the First AFS Machine</title>
4567
4568     <para>The machine is now configured as an AFS file server and client machine. In this final phase of the installation, you
4569     initialize the Cache Manager and then create the upper levels of your AFS filespace, among other procedures. The procedures are:
4570     <orderedlist>
4571         <listitem>
4572           <para>Verify that the initialization script works correctly, and incorporate it into the operating system's startup and
4573           shutdown sequence</para>
4574         </listitem>
4575
4576         <listitem>
4577           <para>Create and mount top-level volumes</para>
4578         </listitem>
4579
4580         <listitem>
4581           <para>Create and mount volumes to store system binaries in AFS</para>
4582         </listitem>
4583
4584         <listitem>
4585           <para>Enable access to foreign cells</para>
4586         </listitem>
4587
4588         <listitem>
4589           <para>Institute additional security measures</para>
4590         </listitem>
4591
4592         <listitem>
4593           <para>Remove client functionality if desired</para>
4594         </listitem>
4595       </orderedlist></para>
4596
4597     <indexterm>
4598       <primary>AFS initialization script</primary>
4599
4600       <secondary>verifying on first AFS machine</secondary>
4601     </indexterm>
4602
4603     <indexterm>
4604       <primary>AFS initialization script</primary>
4605
4606       <secondary>running</secondary>
4607
4608       <tertiary>first AFS machine</tertiary>
4609     </indexterm>
4610
4611     <indexterm>
4612       <primary>first AFS machine</primary>
4613
4614       <secondary>AFS initialization script</secondary>
4615
4616       <tertiary>running/verifying</tertiary>
4617     </indexterm>
4618
4619     <indexterm>
4620       <primary>running AFS init. script</primary>
4621
4622       <secondary>first AFS machine</secondary>
4623     </indexterm>
4624
4625     <indexterm>
4626       <primary>invoking AFS init. script</primary>
4627
4628       <see>running</see>
4629     </indexterm>
4630   </sect1>
4631
4632   <sect1 id="HDRWQ72">
4633     <title>Verifying the AFS Initialization Script</title>
4634
4635     <para>At this point you run the AFS initialization script to verify that it correctly invokes all of the necessary programs and
4636     AFS processes, and that they start correctly. The following are the relevant commands: <itemizedlist>
4637         <listitem>
4638           <para>The command that dynamically loads AFS modifications into the kernel, on some system types (not applicable if the
4639           kernel has AFS modifications built in)</para>
4640         </listitem>
4641
4642         <listitem>
4643           <para>The <emphasis role="bold">bosserver</emphasis> command, which starts the BOS Server; it in turn starts the server
4644           processes for which you created entries in the <emphasis role="bold">/usr/afs/local/BosConfig</emphasis> file</para>
4645         </listitem>
4646
4647         <listitem>
4648           <para>The <emphasis role="bold">afsd</emphasis> command, which initializes the Cache Manager</para>
4649         </listitem>
4650       </itemizedlist></para>
4651
4652     <para>On system types that use a dynamic loader program, you must reboot the machine before running the initialization script,
4653     so that it can freshly load AFS modifications into the kernel.</para>
4654
4655     <para>If there are problems during the initialization, attempt to resolve them. The OpenAFS mailing lists can provide assistance if necessary. 
4656
4657      <orderedlist>
4658         <indexterm>
4659           <primary>commands</primary>
4660
4661           <secondary>bos shutdown</secondary>
4662         </indexterm>
4663
4664         <indexterm>
4665           <primary>bos commands</primary>
4666
4667           <secondary>shutdown</secondary>
4668         </indexterm>
4669
4670         <listitem>
4671           <para>Issue the <emphasis role="bold">bos shutdown</emphasis> command to shut down the AFS server processes other than the
4672           BOS Server. Include the <emphasis role="bold">-wait</emphasis> flag to delay return of the command shell prompt until all
4673           processes shut down completely. <programlisting>
4674    # <emphasis role="bold">/usr/afs/bin/bos shutdown</emphasis> &lt;<replaceable>machine name</replaceable>&gt; <emphasis
4675                 role="bold">-wait</emphasis>
4676 </programlisting></para>
4677         </listitem>
4678
4679         <listitem>
4680           <para>Issue the <emphasis role="bold">ps</emphasis> command to learn the <emphasis role="bold">bosserver</emphasis>
4681           process's process ID number (PID), and then the <emphasis role="bold">kill</emphasis> command to stop it. <programlisting>
4682    # <emphasis role="bold">ps</emphasis> <replaceable>appropriate_ps_options</replaceable> <emphasis role="bold">| grep bosserver</emphasis>
4683    # <emphasis role="bold">kill</emphasis> <replaceable>bosserver_PID</replaceable>
4684 </programlisting></para>
4685         </listitem>
4686
4687         <listitem>
4688           <para>Issue the appropriate commands to run the AFS initialization script for this system type.</para>
4689
4690           <indexterm>
4691             <primary>AIX</primary>
4692
4693             <secondary>AFS initialization script</secondary>
4694
4695             <tertiary>on first AFS machine</tertiary>
4696           </indexterm>
4697
4698           <para><emphasis role="bold">On AIX systems:</emphasis> <orderedlist>
4699               <listitem>
4700                 <para>Reboot the machine and log in again as the local superuser <emphasis role="bold">root</emphasis>.
4701                 <programlisting>
4702    # <emphasis role="bold">cd /</emphasis>
4703    # <emphasis role="bold">shutdown -r now</emphasis>
4704    login: <emphasis role="bold">root</emphasis>
4705    Password: <replaceable>root_password</replaceable>
4706 </programlisting></para>
4707               </listitem>
4708
4709               <listitem>
4710                 <para>Run the AFS initialization script. <programlisting>
4711    # <emphasis role="bold">/etc/rc.afs</emphasis>
4712 </programlisting></para>
4713               </listitem>
4714             </orderedlist></para>
4715
4716           <indexterm>
4717             <primary>HP-UX</primary>
4718
4719             <secondary>AFS initialization script</secondary>
4720
4721             <tertiary>on first AFS machine</tertiary>
4722           </indexterm>
4723
4724           <para><emphasis role="bold">On HP-UX systems:</emphasis> <orderedlist>
4725               <listitem>
4726                 <para>Run the AFS initialization script. <programlisting>
4727    # <emphasis role="bold">/sbin/init.d/afs  start</emphasis>
4728 </programlisting></para>
4729               </listitem>
4730             </orderedlist></para>
4731
4732           <indexterm>
4733             <primary>IRIX</primary>
4734
4735             <secondary>AFS initialization script</secondary>
4736
4737             <tertiary>on first AFS machine</tertiary>
4738           </indexterm>
4739
4740           <indexterm>
4741             <primary>afsclient variable (IRIX)</primary>
4742
4743             <secondary>first AFS machine</secondary>
4744           </indexterm>
4745
4746           <indexterm>
4747             <primary>variables</primary>
4748
4749             <secondary>afsclient (IRIX)</secondary>
4750
4751             <tertiary>first AFS machine</tertiary>
4752           </indexterm>
4753
4754           <indexterm>
4755             <primary>IRIX</primary>
4756
4757             <secondary>afsclient variable</secondary>
4758
4759             <tertiary>first AFS machine</tertiary>
4760           </indexterm>
4761
4762           <indexterm>
4763             <primary>afsserver variable (IRIX)</primary>
4764
4765             <secondary>first AFS machine</secondary>
4766           </indexterm>
4767
4768           <indexterm>
4769             <primary>variables</primary>
4770
4771             <secondary>afsserver (IRIX)</secondary>
4772
4773             <tertiary>first AFS machine</tertiary>
4774           </indexterm>
4775
4776           <indexterm>
4777             <primary>IRIX</primary>
4778
4779             <secondary>afsserver variable</secondary>
4780
4781             <tertiary>first AFS machine</tertiary>
4782           </indexterm>
4783
4784           <para><emphasis role="bold">On IRIX systems:</emphasis> <orderedlist>
4785               <listitem>
4786                 <para>If you have configured the machine to use the <emphasis role="bold">ml</emphasis> dynamic loader program,
4787                 reboot the machine and log in again as the local superuser <emphasis role="bold">root</emphasis>. <programlisting>
4788    # <emphasis role="bold">cd /</emphasis>
4789    # <emphasis role="bold">shutdown -i6 -g0 -y</emphasis>
4790    login: <emphasis role="bold">root</emphasis>
4791    Password: <replaceable>root_password</replaceable>
4792 </programlisting></para>
4793               </listitem>
4794
4795               <listitem>
4796                 <para>Issue the <emphasis role="bold">chkconfig</emphasis> command to activate the <emphasis
4797                 role="bold">afsserver</emphasis> and <emphasis role="bold">afsclient</emphasis> configuration variables.
4798                 <programlisting>
4799    # <emphasis role="bold">/etc/chkconfig -f afsserver on</emphasis>
4800    # <emphasis role="bold">/etc/chkconfig -f afsclient on</emphasis> 
4801 </programlisting></para>
4802               </listitem>
4803
4804               <listitem>
4805                 <para>Run the AFS initialization script. <programlisting>
4806    # <emphasis role="bold">/etc/init.d/afs  start</emphasis>
4807 </programlisting></para>
4808               </listitem>
4809             </orderedlist></para>
4810
4811           <indexterm>
4812             <primary>Linux</primary>
4813
4814             <secondary>AFS initialization script</secondary>
4815
4816             <tertiary>on first AFS machine</tertiary>
4817           </indexterm>
4818
4819           <para><emphasis role="bold">On Linux systems:</emphasis> <orderedlist>
4820               <listitem>
4821                 <para>Reboot the machine and log in again as the local superuser <emphasis role="bold">root</emphasis>.
4822                 <programlisting>
4823    # <emphasis role="bold">cd /</emphasis>
4824    # <emphasis role="bold">shutdown -r now</emphasis>
4825    login: <emphasis role="bold">root</emphasis>
4826    Password: <replaceable>root_password</replaceable>
4827 </programlisting></para>
4828               </listitem>
4829
4830               <listitem>
4831                 <para>Run the AFS initialization scripts. 
4832 <programlisting>
4833    # <emphasis role="bold">/etc/rc.d/init.d/openafs-client  start</emphasis>
4834    # <emphasis role="bold">/etc/rc.d/init.d/openafs-server  start</emphasis>
4835 </programlisting></para>
4836               </listitem>
4837             </orderedlist></para>
4838
4839           <indexterm>
4840             <primary>Solaris</primary>
4841
4842             <secondary>AFS initialization script</secondary>
4843
4844             <tertiary>on first AFS machine</tertiary>
4845           </indexterm>
4846
4847           <para><emphasis role="bold">On Solaris systems:</emphasis> <orderedlist>
4848               <listitem>
4849                 <para>Reboot the machine and log in again as the local superuser <emphasis role="bold">root</emphasis>.
4850                 <programlisting>
4851    # <emphasis role="bold">cd /</emphasis>
4852    # <emphasis role="bold">shutdown -i6 -g0 -y</emphasis>
4853    login: <emphasis role="bold">root</emphasis>
4854    Password: <replaceable>root_password</replaceable>
4855 </programlisting></para>
4856               </listitem>
4857
4858               <listitem>
4859                 <para>Run the AFS initialization script. <programlisting>
4860    # <emphasis role="bold">/etc/init.d/afs  start</emphasis>
4861 </programlisting></para>
4862               </listitem>
4863             </orderedlist></para>
4864         </listitem>
4865
4866         <listitem>
4867           <para>Wait for the message that confirms that Cache Manager initialization is complete.</para>
4868
4869           <para>On machines that use a disk cache, it can take a while to initialize the Cache Manager for the first time, because
4870           the <emphasis role="bold">afsd</emphasis> program must create all of the <emphasis
4871           role="bold">V</emphasis><replaceable>n</replaceable> files in the cache directory. Subsequent Cache Manager
4872           initializations do not take nearly as long, because the <emphasis role="bold">V</emphasis><replaceable>n</replaceable>
4873           files already exist.</para>
4874         </listitem>
4875         <listitem>
4876         
4877           <indexterm>
4878             <primary>commands</primary>
4879             <secondary>aklog</secondary>
4880           </indexterm>
4881
4882           <indexterm>
4883             <primary>aklog command</primary>
4884           </indexterm>
4885           
4886           <para>If you are working with an existing cell which uses
4887           <emphasis role="bold">kaserver</emphasis> for authentication, 
4888           please recall the note in 
4889           <link linkend="KAS003">Using this Appendix</link> detailing the 
4890           substitution of <emphasis role="bold">kinit</emphasis> and 
4891           <emphasis role="bold">aklog</emphasis> with 
4892           <emphasis role="bold">klog</emphasis>.</para>
4893           
4894           <para>As a basic test of correct AFS functioning, issue the 
4895           <emphasis role="bold">kinit</emphasis> and 
4896           <emphasis role="bold">aklog</emphasis> commands to authenticate
4897           as the <emphasis role="bold">admin</emphasis> user. 
4898           Provide the password (<replaceable>admin_passwd</replaceable>) you
4899           defined in <link linkend="HDRWQ53">Initializing Cell Security</link>.</para>
4900
4901           <programlisting>
4902    # <emphasis role="bold">kinit admin</emphasis>
4903    Password:  <replaceable>admin_passwd</replaceable>
4904    # <emphasis role="bold">aklog</emphasis>
4905 </programlisting>
4906
4907           <indexterm>
4908             <primary>commands</primary>
4909
4910             <secondary>tokens</secondary>
4911           </indexterm>
4912
4913           <indexterm>
4914             <primary>tokens command</primary>
4915           </indexterm>
4916         </listitem>
4917
4918         <listitem>
4919           <para>Issue the <emphasis role="bold">tokens</emphasis> command to 
4920           verify that the <emphasis role="bold">aklog</emphasis>
4921           command worked correctly. If it did, the output looks similar to the following example for the <emphasis
4922           role="bold">example.com</emphasis> cell, where <emphasis role="bold">admin</emphasis>'s AFS UID is 1. If the output does not
4923           seem correct, resolve the problem. Changes to the AFS initialization script are possibly necessary. The OpenAFS mailing lists can provide assistance as necessary. <programlisting>
4924    # <emphasis role="bold">tokens</emphasis>
4925    Tokens held by the Cache Manager:
4926    User's (AFS ID 1) tokens for afs@example.com [Expires May 22 11:52]
4927        --End of list--
4928 </programlisting></para>
4929         </listitem>
4930
4931         <listitem>
4932           <para>Issue the <emphasis role="bold">bos status</emphasis> command to verify that the output for each process reads
4933           <computeroutput>Currently running normally</computeroutput>. <programlisting>
4934    # <emphasis role="bold">/usr/afs/bin/bos status</emphasis> &lt;<replaceable>machine name</replaceable>&gt;
4935 </programlisting> <indexterm>
4936               <primary>fs commands</primary>
4937
4938               <secondary>checkvolumes</secondary>
4939             </indexterm> <indexterm>
4940               <primary>commands</primary>
4941
4942               <secondary>fs checkvolumes</secondary>
4943             </indexterm></para>
4944         </listitem>
4945
4946         <listitem>
4947           <para>Change directory to the local file system root (<emphasis role="bold">/</emphasis>) and issue the <emphasis
4948           role="bold">fs checkvolumes</emphasis> command. <programlisting>
4949    # <emphasis role="bold">cd /</emphasis>
4950    # <emphasis role="bold">/usr/afs/bin/fs checkvolumes</emphasis>
4951 </programlisting></para>
4952         </listitem>
4953       </orderedlist></para>
4954
4955     <indexterm>
4956       <primary>AFS initialization script</primary>
4957
4958       <secondary>adding to machine startup sequence</secondary>
4959
4960       <tertiary>first AFS machine</tertiary>
4961     </indexterm>
4962
4963     <indexterm>
4964       <primary>installing</primary>
4965
4966       <secondary>AFS initialization script</secondary>
4967
4968       <tertiary>first AFS machine</tertiary>
4969     </indexterm>
4970
4971     <indexterm>
4972       <primary>first AFS machine</primary>
4973
4974       <secondary>AFS initialization script</secondary>
4975
4976       <tertiary>activating</tertiary>
4977     </indexterm>
4978
4979     <indexterm>
4980       <primary>activating AFS init. script</primary>
4981
4982       <see>installing</see>
4983     </indexterm>
4984   </sect1>
4985
4986   <sect1 id="HDRWQ73">
4987     <title>Activating the AFS Initialization Script</title>
4988
4989     <para>Now that you have confirmed that the AFS initialization script works correctly, take the action necessary to have it run
4990     automatically at each reboot. Proceed to the instructions for your system type: <itemizedlist>
4991         <listitem>
4992           <para><link linkend="HDRWQ74">Activating the Script on AIX Systems</link></para>
4993         </listitem>
4994
4995         <listitem>
4996           <para><link linkend="HDRWQ76">Activating the Script on HP-UX Systems</link></para>
4997         </listitem>
4998
4999         <listitem>
5000           <para><link linkend="HDRWQ77">Activating the Script on IRIX Systems</link></para>
5001         </listitem>
5002
5003         <listitem>
5004           <para><link linkend="HDRWQ78">Activating the Script on Linux Systems</link></para>
5005         </listitem>
5006
5007         <listitem>
5008           <para><link linkend="HDRWQ79">Activating the Script on Solaris Systems</link></para>
5009         </listitem>
5010       </itemizedlist></para>
5011
5012     <indexterm>
5013       <primary>AIX</primary>
5014
5015       <secondary>AFS initialization script</secondary>
5016
5017       <tertiary>on first AFS machine</tertiary>
5018     </indexterm>
5019
5020     <sect2 id="HDRWQ74">
5021       <title>Activating the Script on AIX Systems</title>
5022
5023       <orderedlist>
5024         <listitem>
5025           <para>Edit the AIX initialization file, <emphasis role="bold">/etc/inittab</emphasis>, adding the following line to invoke
5026           the AFS initialization script. Place it just after the line that starts NFS daemons. <programlisting>
5027    rcafs:2:wait:/etc/rc.afs &gt; /dev/console 2&gt;&amp;1 # Start AFS services
5028 </programlisting></para>
5029         </listitem>
5030
5031         <listitem>
5032           <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
5033           <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc</emphasis> directories. If you want to avoid
5034           potential confusion by guaranteeing that they are always the same, create a link between them. You can always retrieve the
5035           original script from the AFS CD-ROM if necessary. <programlisting>
5036    # <emphasis role="bold">cd  /usr/vice/etc</emphasis>
5037    # <emphasis role="bold">rm  rc.afs</emphasis>
5038    # <emphasis role="bold">ln -s  /etc/rc.afs</emphasis>
5039 </programlisting></para>
5040         </listitem>
5041
5042         <listitem>
5043           <para>Proceed to <link linkend="HDRWQ80">Configuring the Top Levels of the AFS Filespace</link>.</para>
5044         </listitem>
5045       </orderedlist>
5046
5047       <indexterm>
5048         <primary>HP-UX</primary>
5049
5050         <secondary>AFS initialization script</secondary>
5051
5052         <tertiary>on first AFS machine</tertiary>
5053       </indexterm>
5054     </sect2>
5055
5056     <sect2 id="HDRWQ76">
5057       <title>Activating the Script on HP-UX Systems</title>
5058
5059       <orderedlist>
5060         <listitem>
5061           <para>Change to the <emphasis role="bold">/sbin/init.d</emphasis> directory and issue the <emphasis role="bold">ln
5062           -s</emphasis> command to create symbolic links that incorporate the AFS initialization script into the HP-UX startup and
5063           shutdown sequence. <programlisting>
5064    # <emphasis role="bold">cd /sbin/init.d</emphasis>
5065    # <emphasis role="bold">ln -s ../init.d/afs /sbin/rc2.d/S460afs</emphasis>
5066    # <emphasis role="bold">ln -s ../init.d/afs /sbin/rc2.d/K800afs</emphasis>
5067 </programlisting></para>
5068         </listitem>
5069
5070         <listitem>
5071           <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
5072           <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/sbin/init.d</emphasis> directories. If you want
5073           to avoid potential confusion by guaranteeing that they are always the same, create a link between them. You can always
5074           retrieve the original script from the AFS CD-ROM if necessary. <programlisting>
5075    # <emphasis role="bold">cd /usr/vice/etc</emphasis>
5076    # <emphasis role="bold">rm afs.rc</emphasis>
5077    # <emphasis role="bold">ln -s  /sbin/init.d/afs  afs.rc</emphasis>
5078 </programlisting></para>
5079         </listitem>
5080
5081         <listitem>
5082           <para>Proceed to <link linkend="HDRWQ80">Configuring the Top Levels of the AFS Filespace</link>.</para>
5083         </listitem>
5084       </orderedlist>
5085
5086       <indexterm>
5087         <primary>IRIX</primary>
5088
5089         <secondary>AFS initialization script</secondary>
5090
5091         <tertiary>on first AFS machine</tertiary>
5092       </indexterm>
5093     </sect2>
5094
5095     <sect2 id="HDRWQ77">
5096       <title>Activating the Script on IRIX Systems</title>
5097
5098       <orderedlist>
5099         <listitem>
5100           <para>Change to the <emphasis role="bold">/etc/init.d</emphasis> directory and issue the <emphasis role="bold">ln
5101           -s</emphasis> command to create symbolic links that incorporate the AFS initialization script into the IRIX startup and
5102           shutdown sequence. <programlisting>
5103    # <emphasis role="bold">cd /etc/init.d</emphasis>
5104    # <emphasis role="bold">ln -s ../init.d/afs /etc/rc2.d/S35afs</emphasis>
5105    # <emphasis role="bold">ln -s ../init.d/afs /etc/rc0.d/K35afs</emphasis>
5106 </programlisting></para>
5107         </listitem>
5108
5109         <listitem>
5110           <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
5111           <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/init.d</emphasis> directories. If you want
5112           to avoid potential confusion by guaranteeing that they are always the same, create a link between them. You can always
5113           retrieve the original script from the AFS CD-ROM if necessary. <programlisting>
5114    # <emphasis role="bold">cd /usr/vice/etc</emphasis>
5115    # <emphasis role="bold">rm afs.rc</emphasis>
5116    # <emphasis role="bold">ln -s  /etc/init.d/afs  afs.rc</emphasis>
5117 </programlisting></para>
5118         </listitem>
5119
5120         <listitem>
5121           <para>Proceed to <link linkend="HDRWQ80">Configuring the Top Levels of the AFS Filespace</link>.</para>
5122         </listitem>
5123       </orderedlist>
5124
5125       <indexterm>
5126         <primary>Linux</primary>
5127
5128         <secondary>AFS initialization script</secondary>
5129
5130         <tertiary>on first AFS machine</tertiary>
5131       </indexterm>
5132     </sect2>
5133
5134     <sect2 id="HDRWQ78">
5135       <title>Activating the Script on Linux Systems</title>
5136
5137       <orderedlist>
5138         <listitem>
5139           <para>Issue the <emphasis role="bold">chkconfig</emphasis> command to activate the <emphasis role="bold">openafs-client</emphasis> and <emphasis role="bold">openafs-server</emphasis>
5140           configuration variables. Based on the instruction in the AFS initialization file that begins with the string
5141           <computeroutput>#chkconfig</computeroutput>, the command automatically creates the symbolic links that incorporate the
5142           script into the Linux startup and shutdown sequence. <programlisting>
5143    # <emphasis role="bold">/sbin/chkconfig  --add openafs-client</emphasis>
5144    # <emphasis role="bold">/sbin/chkconfig  --add openafs-server</emphasis>
5145 </programlisting></para>
5146         </listitem>
5147
5148         <listitem>
5149           <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
5150           <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/rc.d/init.d</emphasis> directories, and
5151           copies of the <emphasis role="bold">afsd</emphasis> options file in both the <emphasis
5152           role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/sysconfig</emphasis> directories. If you want to avoid
5153           potential confusion by guaranteeing that the two copies of each file are always the same, create a link between them. You
5154           can always retrieve the original script or options file from the AFS CD-ROM if necessary. <programlisting>
5155    # <emphasis role="bold">cd /usr/vice/etc</emphasis>
5156    # <emphasis role="bold">rm afs.rc afs.conf</emphasis>
5157    # <emphasis role="bold">ln -s  /etc/rc.d/init.d/afs  afs.rc</emphasis>
5158    # <emphasis role="bold">ln -s  /etc/sysconfig/afs  afs.conf</emphasis>
5159 </programlisting></para>
5160         </listitem>
5161
5162         <listitem>
5163           <para>Proceed to <link linkend="HDRWQ80">Configuring the Top Levels of the AFS Filespace</link>.</para>
5164         </listitem>
5165       </orderedlist>
5166
5167       <indexterm>
5168         <primary>Solaris</primary>
5169
5170         <secondary>AFS initialization script</secondary>
5171
5172         <tertiary>on first AFS machine</tertiary>
5173       </indexterm>
5174     </sect2>
5175
5176     <sect2 id="HDRWQ79">
5177       <title>Activating the Script on Solaris Systems</title>
5178
5179       <orderedlist>
5180         <listitem>
5181           <para>Change to the <emphasis role="bold">/etc/init.d</emphasis> directory and issue the <emphasis role="bold">ln
5182           -s</emphasis> command to create symbolic links that incorporate the AFS initialization script into the Solaris startup and
5183           shutdown sequence. <programlisting>
5184    # <emphasis role="bold">cd /etc/init.d</emphasis>
5185    # <emphasis role="bold">ln -s ../init.d/afs /etc/rc3.d/S99afs</emphasis>
5186    # <emphasis role="bold">ln -s ../init.d/afs /etc/rc0.d/K66afs</emphasis>
5187 </programlisting></para>
5188         </listitem>
5189
5190         <listitem>
5191           <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
5192           <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/init.d</emphasis> directories. If you want
5193           to avoid potential confusion by guaranteeing that they are always the same, create a link between them. You can always
5194           retrieve the original script from the AFS CD-ROM if necessary. <programlisting>
5195    # <emphasis role="bold">cd /usr/vice/etc</emphasis>
5196    # <emphasis role="bold">rm afs.rc</emphasis>
5197    # <emphasis role="bold">ln -s  /etc/init.d/afs  afs.rc</emphasis>
5198 </programlisting></para>
5199         </listitem>
5200       </orderedlist>
5201
5202       <indexterm>
5203         <primary>AFS filespace</primary>
5204
5205         <secondary>configuring top levels</secondary>
5206       </indexterm>
5207
5208       <indexterm>
5209         <primary>configuring</primary>
5210
5211         <secondary>AFS filespace (top levels)</secondary>
5212       </indexterm>
5213     </sect2>
5214   </sect1>
5215
5216   <sect1 id="HDRWQ80">
5217     <title>Configuring the Top Levels of the AFS Filespace</title>
5218
5219     <para>If you have not previously run AFS in your cell, you now configure the top levels of your cell's AFS filespace. If you
5220     have run a previous version of AFS, the filespace is already configured. Proceed to <link linkend="HDRWQ83">Storing AFS Binaries
5221     in AFS</link>. <indexterm>
5222         <primary>root.cell volume</primary>
5223
5224         <secondary>creating and replicating</secondary>
5225       </indexterm> <indexterm>
5226         <primary>volume</primary>
5227
5228         <secondary>creating</secondary>
5229
5230         <tertiary>root.cell</tertiary>
5231       </indexterm> <indexterm>
5232         <primary>creating</primary>
5233
5234         <secondary>root.cell volume</secondary>
5235       </indexterm></para>
5236
5237     <para>You created the <emphasis role="bold">root.afs</emphasis> volume in <link linkend="HDRWQ60">Starting the File Server,
5238     Volume Server, and Salvager</link>, and the Cache Manager mounted it automatically on the local <emphasis
5239     role="bold">/afs</emphasis> directory when you ran the AFS initialization script in <link linkend="HDRWQ72">Verifying the AFS
5240     Initialization Script</link>. You now set the access control list (ACL) on the <emphasis role="bold">/afs</emphasis> directory;
5241     creating, mounting, and setting the ACL are the three steps required when creating any volume.</para>
5242
5243     <para>After setting the ACL on the <emphasis role="bold">root.afs</emphasis> volume, you create your cell's <emphasis
5244     role="bold">root.cell</emphasis> volume, mount it as a subdirectory of the <emphasis role="bold">/afs</emphasis> directory, and
5245     set the ACL. Create both a read/write and a regular mount point for the <emphasis role="bold">root.cell</emphasis> volume. The
5246     read/write mount point enables you to access the read/write version of replicated volumes when necessary. Creating both mount
5247     points essentially creates separate read-only and read-write copies of your filespace, and enables the Cache Manager to traverse
5248     the filespace on a read-only path or read/write path as appropriate. For further discussion of these concepts, see the chapter
5249     in the <emphasis>OpenAFS Administration Guide</emphasis> about administering volumes. <indexterm>
5250         <primary>root.afs volume</primary>
5251
5252         <secondary>replicating</secondary>
5253       </indexterm> <indexterm>
5254         <primary>volume</primary>
5255
5256         <secondary>replicating root.afs and root.cell</secondary>
5257       </indexterm> <indexterm>
5258         <primary>replicating volumes</primary>
5259       </indexterm></para>
5260
5261     <para>Then replicate both the <emphasis role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes.
5262     This is required if you want to replicate any other volumes in your cell, because all volumes mounted above a replicated volume
5263     must themselves be replicated in order for the Cache Manager to access the replica.</para>
5264
5265     <para>When the <emphasis role="bold">root.afs</emphasis> volume is replicated, the Cache Manager is programmed to access its
5266     read-only version (<emphasis role="bold">root.afs.readonly</emphasis>) whenever possible. To make changes to the contents of the
5267     <emphasis role="bold">root.afs</emphasis> volume (when, for example, you mount another cell's <emphasis
5268     role="bold">root.cell</emphasis> volume at the second level in your filespace), you must mount the <emphasis
5269     role="bold">root.afs</emphasis> volume temporarily, make the changes, release the volume and remove the temporary mount point.
5270     For instructions, see <link linkend="HDRWQ91">Enabling Access to Foreign Cells</link>. <indexterm>
5271         <primary>fs commands</primary>
5272
5273         <secondary>setacl</secondary>
5274       </indexterm> <indexterm>
5275         <primary>commands</primary>
5276
5277         <secondary>fs setacl</secondary>
5278       </indexterm> <indexterm>
5279         <primary>access control list (ACL), setting</primary>
5280       </indexterm> <indexterm>
5281         <primary>setting</primary>
5282
5283         <secondary>ACL</secondary>
5284       </indexterm> <orderedlist>
5285         <listitem>
5286           <para>Issue the <emphasis role="bold">fs setacl</emphasis> command to edit the ACL on the <emphasis
5287           role="bold">/afs</emphasis> directory. Add an entry that grants the <emphasis role="bold">l</emphasis> (<emphasis
5288           role="bold">lookup</emphasis>) and <emphasis role="bold">r</emphasis> (<emphasis role="bold">read</emphasis>) permissions
5289           to the <emphasis role="bold">system:anyuser</emphasis> group, to enable all AFS users who can reach your cell to traverse
5290           through the directory. If you prefer to enable access only to locally authenticated users, substitute the <emphasis
5291           role="bold">system:authuser</emphasis> group.</para>
5292
5293           <para>Note that there is already an ACL entry that grants all seven access rights to the <emphasis
5294           role="bold">system:administrators</emphasis> group. It is a default entry that AFS places on every new volume's root
5295           directory.</para>
5296
5297           <programlisting>
5298    # <emphasis role="bold">/usr/afs/bin/fs setacl /afs system:anyuser rl</emphasis>
5299 </programlisting>
5300
5301           <indexterm>
5302             <primary>commands</primary>
5303
5304             <secondary>vos create</secondary>
5305
5306             <tertiary>root.cell volume</tertiary>
5307           </indexterm>
5308
5309           <indexterm>
5310             <primary>vos commands</primary>
5311
5312             <secondary>create</secondary>
5313
5314             <tertiary>root.cell volume</tertiary>
5315           </indexterm>
5316
5317           <indexterm>
5318             <primary>fs commands</primary>
5319
5320             <secondary>mkmount</secondary>
5321           </indexterm>
5322
5323           <indexterm>
5324             <primary>commands</primary>
5325
5326             <secondary>fs mkmount</secondary>
5327           </indexterm>
5328
5329           <indexterm>
5330             <primary>mount point</primary>
5331           </indexterm>
5332
5333           <indexterm>
5334             <primary>creating</primary>
5335
5336             <secondary>mount point</secondary>
5337           </indexterm>
5338
5339           <indexterm>
5340             <primary>volume</primary>
5341
5342             <secondary>mounting</secondary>
5343           </indexterm>
5344         </listitem>
5345
5346         <listitem>
5347           <para><anchor id="LIWQ81" />Issue the <emphasis role="bold">vos create</emphasis> command to create the <emphasis
5348           role="bold">root.cell</emphasis> volume. Then issue the <emphasis role="bold">fs mkmount</emphasis> command to mount it as
5349           a subdirectory of the <emphasis role="bold">/afs</emphasis> directory, where it serves as the root of your cell's local
5350           AFS filespace. Finally, issue the <emphasis role="bold">fs setacl</emphasis> command to create an ACL entry for the
5351           <emphasis role="bold">system:anyuser</emphasis> group (or <emphasis role="bold">system:authuser</emphasis> group).</para>
5352
5353           <para>For the <replaceable>partition name</replaceable> argument, substitute the name of one of the machine's AFS server
5354           partitions (such as <emphasis role="bold">/vicepa</emphasis>). For the <replaceable>cellname</replaceable> argument,
5355           substitute your cell's fully-qualified Internet domain name (such as <emphasis role="bold">abc.com</emphasis>).</para>
5356
5357           <programlisting>
5358    # <emphasis role="bold">/usr/afs/bin/vos create</emphasis>  &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>partition name</replaceable>&gt; <emphasis
5359               role="bold">root.cell</emphasis> 
5360    # <emphasis role="bold">/usr/afs/bin/fs mkmount /afs/</emphasis><replaceable>cellname</replaceable>  <emphasis role="bold">root.cell</emphasis>
5361    # <emphasis role="bold">/usr/afs/bin/fs setacl /afs/</emphasis><replaceable>cellname</replaceable>  <emphasis role="bold">system:anyuser rl</emphasis>
5362 </programlisting>
5363
5364           <indexterm>
5365             <primary>creating</primary>
5366
5367             <secondary>symbolic link</secondary>
5368
5369             <tertiary>for abbreviated cell name</tertiary>
5370           </indexterm>
5371
5372           <indexterm>
5373             <primary>symbolic link</primary>
5374
5375             <secondary>for abbreviated cell name</secondary>
5376           </indexterm>
5377
5378           <indexterm>
5379             <primary>cell name</primary>
5380
5381             <secondary>symbolic link for abbreviated</secondary>
5382           </indexterm>
5383         </listitem>
5384
5385         <listitem>
5386           <para><emphasis role="bold">(Optional)</emphasis> Create a symbolic link to a shortened cell name, to reduce the length of
5387           pathnames for users in the local cell. For example, in the <emphasis role="bold">abc.com</emphasis> cell, <emphasis
5388           role="bold">/afs/abc</emphasis> is a link to <emphasis role="bold">/afs/abc.com</emphasis>. <programlisting>
5389    # <emphasis role="bold">cd /afs</emphasis>
5390    # <emphasis role="bold">ln -s</emphasis>  <replaceable>full_cellname</replaceable>  <replaceable>short_cellname</replaceable>
5391 </programlisting> <indexterm>
5392               <primary>read/write mount point for root.afs volume</primary>
5393             </indexterm> <indexterm>
5394               <primary>root.afs volume</primary>
5395
5396               <secondary>read/write mount point</secondary>
5397             </indexterm> <indexterm>
5398               <primary>creating</primary>
5399
5400               <secondary>read/write mount point</secondary>
5401             </indexterm></para>
5402         </listitem>
5403
5404         <listitem>
5405           <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to create a read/write mount point for the <emphasis
5406           role="bold">root.cell</emphasis> volume (you created a regular mount point in Step <link
5407           linkend="LIWQ81">2</link>).</para>
5408
5409           <para>By convention, the name of a read/write mount point begins with a period, both to distinguish it from the regular
5410           mount point and to make it visible only when the <emphasis role="bold">-a</emphasis> flag is used on the <emphasis
5411           role="bold">ls</emphasis> command.</para>
5412
5413           <para>Change directory to <emphasis role="bold">/usr/afs/bin</emphasis> to make it easier to access the command
5414           binaries.</para>
5415
5416           <programlisting>
5417    # <emphasis role="bold">cd /usr/afs/bin</emphasis>
5418    # <emphasis role="bold">./fs mkmount   /afs/.</emphasis><replaceable>cellname</replaceable>   <emphasis role="bold">root.cell -rw</emphasis>
5419 </programlisting>
5420
5421           <indexterm>
5422             <primary>commands</primary>
5423
5424             <secondary>vos addsite</secondary>
5425           </indexterm>
5426
5427           <indexterm>
5428             <primary>vos commands</primary>
5429
5430             <secondary>addsite</secondary>
5431           </indexterm>
5432
5433           <indexterm>
5434             <primary>volume</primary>
5435
5436             <secondary>defining replication site</secondary>
5437           </indexterm>
5438
5439           <indexterm>
5440             <primary>defining</primary>
5441
5442             <secondary>replication site for volume</secondary>
5443           </indexterm>
5444         </listitem>
5445
5446         <listitem>
5447           <para><anchor id="LIWQ82" />Issue the <emphasis role="bold">vos addsite</emphasis> command to define a replication site
5448           for both the <emphasis role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes. In each
5449           case, substitute for the <replaceable>partition name</replaceable> argument the partition where the volume's read/write
5450           version resides. When you install additional file server machines, it is a good idea to create replication sites on them
5451           as well. <programlisting>
5452    # <emphasis role="bold">./vos addsite</emphasis> &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>partition name</replaceable>&gt; <emphasis
5453                 role="bold">root.afs</emphasis>
5454    # <emphasis role="bold">./vos addsite</emphasis> &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>partition name</replaceable>&gt; <emphasis
5455                 role="bold">root.cell</emphasis>
5456 </programlisting> <indexterm>
5457               <primary>fs commands</primary>
5458
5459               <secondary>examine</secondary>
5460             </indexterm> <indexterm>
5461               <primary>commands</primary>
5462
5463               <secondary>fs examine</secondary>
5464             </indexterm></para>
5465         </listitem>
5466
5467         <listitem>
5468           <para>Issue the <emphasis role="bold">fs examine</emphasis> command to verify that the Cache Manager can access both the
5469           <emphasis role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes, before you attempt to
5470           replicate them. The output lists each volume's name, volumeID number, quota, size, and the size of the partition that
5471           houses them. If you get an error message instead, do not continue before taking corrective action. <programlisting>
5472    # <emphasis role="bold">./fs examine /afs</emphasis>
5473    # <emphasis role="bold">./fs examine /afs/</emphasis><replaceable>cellname</replaceable>
5474 </programlisting> <indexterm>
5475               <primary>commands</primary>
5476
5477               <secondary>vos release</secondary>
5478             </indexterm> <indexterm>
5479               <primary>vos commands</primary>
5480
5481               <secondary>release</secondary>
5482             </indexterm> <indexterm>
5483               <primary>volume</primary>
5484
5485               <secondary>releasing replicated</secondary>
5486             </indexterm> <indexterm>
5487               <primary>releasing replicated volume</primary>
5488             </indexterm></para>
5489         </listitem>
5490
5491         <listitem>
5492           <para>Issue the <emphasis role="bold">vos release</emphasis> command to release a replica of the <emphasis
5493           role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes to the sites you defined in Step
5494           <link linkend="LIWQ82">5</link>. <programlisting>
5495    # <emphasis role="bold">./vos release root.afs</emphasis>
5496    # <emphasis role="bold">./vos release root.cell</emphasis>
5497 </programlisting> <indexterm>
5498               <primary>fs commands</primary>
5499
5500               <secondary>checkvolumes</secondary>
5501             </indexterm> <indexterm>
5502               <primary>commands</primary>
5503
5504               <secondary>fs checkvolumes</secondary>
5505             </indexterm></para>
5506         </listitem>
5507
5508         <listitem>
5509           <para>Issue the <emphasis role="bold">fs checkvolumes</emphasis> to force the Cache Manager to notice that you have
5510           released read-only versions of the volumes, then issue the <emphasis role="bold">fs examine</emphasis> command again. This
5511           time its output mentions the read-only version of the volumes (<emphasis role="bold">root.afs.readonly</emphasis> and
5512           <emphasis role="bold">root.cell.readonly</emphasis>) instead of the read/write versions, because of the Cache Manager's
5513           bias to access the read-only version of the <emphasis role="bold">root.afs</emphasis> volume if it exists.
5514           <programlisting>
5515    # <emphasis role="bold">./fs checkvolumes</emphasis>
5516    # <emphasis role="bold">./fs examine /afs</emphasis>
5517    # <emphasis role="bold">./fs examine /afs/</emphasis><replaceable>cellname</replaceable>
5518 </programlisting></para>
5519         </listitem>
5520       </orderedlist></para>
5521
5522     <indexterm>
5523       <primary>storing</primary>
5524
5525       <secondary>AFS binaries in volumes</secondary>
5526     </indexterm>
5527
5528     <indexterm>
5529       <primary>creating</primary>
5530
5531       <secondary>volume</secondary>
5532
5533       <tertiary>for AFS binaries</tertiary>
5534     </indexterm>
5535
5536     <indexterm>
5537       <primary>volume</primary>
5538
5539       <secondary>for AFS binaries</secondary>
5540     </indexterm>
5541
5542     <indexterm>
5543       <primary>binaries</primary>
5544
5545       <secondary>storing AFS in volume</secondary>
5546     </indexterm>
5547
5548     <indexterm>
5549       <primary>usr/afsws directory</primary>
5550     </indexterm>
5551
5552     <indexterm>
5553       <primary>directories</primary>
5554
5555       <secondary>/usr/afsws</secondary>
5556     </indexterm>
5557   </sect1>
5558
5559   <sect1 id="HDRWQ83">
5560     <title>Storing AFS Binaries in AFS</title>
5561
5562     <note><para>Sites with existing binary distribution mechanisms, including
5563     those which use packaging systems such as RPM, may wish to skip this step,
5564     and use tools native to their operating system to manage AFS configuration
5565     information.</para></note>
5566     
5567     <para>In the conventional configuration, you make AFS client binaries and configuration files available in the subdirectories of
5568     the <emphasis role="bold">/usr/afsws</emphasis> directory on client machines (<emphasis role="bold">afsws</emphasis> is an
5569     acronym for <emphasis role="bold">AFS w</emphasis><emphasis>ork</emphasis><emphasis
5570     role="bold">s</emphasis><emphasis>tation</emphasis>). You can conserve local disk space by creating <emphasis
5571     role="bold">/usr/afsws</emphasis> as a link to an AFS volume that houses the AFS client binaries and configuration files for
5572     this system type.</para>
5573
5574     <para>In this section you create the necessary volumes. The conventional location to which to link <emphasis
5575     role="bold">/usr/afsws</emphasis> is <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5576     role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/usr/afsws</emphasis>, where
5577     <replaceable>sysname</replaceable> is the appropriate system type name as specified in the <emphasis>OpenAFS Release
5578     Notes</emphasis>. The instructions in <link linkend="HDRWQ133">Installing Additional Client Machines</link> assume that you have
5579     followed the instructions in this section.</para>
5580
5581     <para>If you have previously run AFS in the cell, the volumes possibly already exist. If so, you need to perform Step <link
5582     linkend="LIWQ86">8</link> only.</para>
5583
5584     <para>The current working directory is still <emphasis role="bold">/usr/afs/bin</emphasis>, which houses the <emphasis
5585     role="bold">fs</emphasis> and <emphasis role="bold">vos</emphasis> command suite binaries. In the following commands, it is
5586     possible you still need to specify the pathname to the commands, depending on how your PATH environment variable is set.
5587     <orderedlist>
5588         <indexterm>
5589           <primary>commands</primary>
5590
5591           <secondary>vos create</secondary>
5592
5593           <tertiary>volume for AFS binaries</tertiary>
5594         </indexterm>
5595
5596         <indexterm>
5597           <primary>vos commands</primary>
5598
5599           <secondary>create</secondary>
5600
5601           <tertiary>volume for AFS binaries</tertiary>
5602         </indexterm>
5603
5604         <listitem>
5605           <para><anchor id="LIWQ84" />Issue the <emphasis role="bold">vos create</emphasis> command to create volumes for storing
5606           the AFS client binaries for this system type. The following example instruction creates volumes called
5607           <replaceable>sysname</replaceable>, <replaceable>sysname</replaceable>.<emphasis role="bold">usr</emphasis>, and
5608           <replaceable>sysname</replaceable>.<emphasis role="bold">usr.afsws</emphasis>. Refer to the <emphasis>OpenAFS Release
5609           Notes</emphasis> to learn the proper value of <replaceable>sysname</replaceable> for this system type. <programlisting>
5610    # <emphasis role="bold">vos create</emphasis> &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>partition name</replaceable>&gt; <replaceable>sysname</replaceable>
5611    # <emphasis role="bold">vos create</emphasis> &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>partition name</replaceable>&gt; <replaceable>sysname</replaceable><emphasis
5612                 role="bold">.usr</emphasis>
5613    # <emphasis role="bold">vos create</emphasis> &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>partition name</replaceable>&gt; <replaceable>sysname</replaceable><emphasis
5614                 role="bold">.usr.afsws</emphasis>
5615 </programlisting></para>
5616         </listitem>
5617
5618         <listitem>
5619           <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to mount the newly created volumes. Because the
5620           <emphasis role="bold">root.cell</emphasis> volume is replicated, you must precede the <emphasis>cellname</emphasis> part
5621           of the pathname with a period to specify the read/write mount point, as shown. Then issue the <emphasis role="bold">vos
5622           release</emphasis> command to release a new replica of the <emphasis role="bold">root.cell</emphasis> volume, and the
5623           <emphasis role="bold">fs checkvolumes</emphasis> command to force the local Cache Manager to access them. <programlisting>
5624    # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable> <emphasis
5625                 role="bold">-vol</emphasis> <replaceable>sysname</replaceable>
5626    # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
5627                 role="bold">/usr</emphasis>  <emphasis role="bold">-vol</emphasis> <replaceable>sysname</replaceable><emphasis
5628                 role="bold">.usr</emphasis>
5629    # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
5630                 role="bold">/usr/afsws</emphasis> <emphasis role="bold">-vol</emphasis> <replaceable>sysname</replaceable><emphasis
5631                 role="bold">.usr.afsws</emphasis>
5632    # <emphasis role="bold">vos release root.cell</emphasis>
5633    # <emphasis role="bold">fs checkvolumes</emphasis>
5634 </programlisting></para>
5635         </listitem>
5636
5637         <listitem>
5638           <para>Issue the <emphasis role="bold">fs setacl</emphasis> command to grant the <emphasis role="bold">l</emphasis>
5639           (<emphasis role="bold">lookup</emphasis>) and <emphasis role="bold">r</emphasis> (<emphasis role="bold">read</emphasis>)
5640           permissions to the <emphasis role="bold">system:anyuser</emphasis> group on each new directory's ACL. <programlisting>
5641    # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable>
5642    # <emphasis role="bold">fs setacl  -dir  .  usr  usr/afsws  -acl  system:anyuser rl</emphasis> 
5643 </programlisting> <indexterm>
5644               <primary>commands</primary>
5645
5646               <secondary>fs setquota</secondary>
5647             </indexterm> <indexterm>
5648               <primary>fs commands</primary>
5649
5650               <secondary>setquota</secondary>
5651             </indexterm> <indexterm>
5652               <primary>quota for volume</primary>
5653             </indexterm> <indexterm>
5654               <primary>volume</primary>
5655
5656               <secondary>setting quota</secondary>
5657             </indexterm> <indexterm>
5658               <primary>setting</primary>
5659
5660               <secondary>volume quota</secondary>
5661             </indexterm></para>
5662         </listitem>
5663
5664         <listitem>
5665           <para><anchor id="LIWQ85" />Issue the <emphasis role="bold">fs setquota</emphasis> command to set an unlimited quota on
5666           the volume mounted at the <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5667           role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/usr/afsws</emphasis> directory. This
5668           enables you to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's
5669           quota.</para>
5670
5671           <para>If you wish, you can set the volume's quota to a finite value after you complete the copying operation. At that
5672           point, use the <emphasis role="bold">vos examine</emphasis> command to determine how much space the volume is occupying.
5673           Then issue the <emphasis role="bold">fs setquota</emphasis> command to set a quota that is slightly larger.</para>
5674
5675           <programlisting>
5676    # <emphasis role="bold">fs setquota /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
5677               role="bold">/usr/afsws  0</emphasis>
5678 </programlisting>
5679         </listitem>
5680
5681         <listitem>
5682           <para>Unpack the distribution tarball into the <emphasis role="bold">/tmp/afsdist</emphasis> directory,
5683           if it is not already. <indexterm>
5684               <primary>copying</primary>
5685
5686               <secondary>AFS binaries into volume</secondary>
5687             </indexterm> <indexterm>
5688               <primary>CD-ROM</primary>
5689
5690               <secondary>copying AFS binaries into volume</secondary>
5691             </indexterm> <indexterm>
5692               <primary>first AFS machine</primary>
5693
5694               <secondary>copying</secondary>
5695
5696               <tertiary>AFS binaries into volume</tertiary>
5697             </indexterm></para>
5698         </listitem>
5699
5700         <listitem>
5701           <para>Copy the contents of the indicated directories from the 
5702           distribution into the <emphasis
5703           role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5704           role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/usr/afsws</emphasis> directory.
5705           <programlisting>
5706    # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
5707                 role="bold">/usr/afsws</emphasis>
5708    # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/bin  .</emphasis>
5709    # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/etc  .</emphasis>
5710    # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/include  .</emphasis>
5711    # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/lib  .</emphasis>
5712 </programlisting> 
5713 <indexterm>
5714               <primary>creating</primary>
5715
5716               <secondary>symbolic link</secondary>
5717
5718               <tertiary>to AFS binaries</tertiary>
5719             </indexterm> <indexterm>
5720               <primary>symbolic link</primary>
5721
5722               <secondary>to AFS binaries from local disk</secondary>
5723             </indexterm></para>
5724         </listitem>
5725
5726         <listitem>
5727           <para><anchor id="LIWQ86" />Create <emphasis role="bold">/usr/afsws</emphasis> on the local disk as a symbolic link to the
5728           directory <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5729           role="bold">/@sys/usr/afsws</emphasis>. You can specify the actual system name instead of <emphasis
5730           role="bold">@sys</emphasis> if you wish, but the advantage of using <emphasis role="bold">@sys</emphasis> is that it
5731           remains valid if you upgrade this machine to a different system type. <programlisting>
5732    # <emphasis role="bold">ln -s /afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/@sys/usr/afsws  /usr/afsws</emphasis>
5733 </programlisting> <indexterm>
5734               <primary>PATH environment variable for users</primary>
5735             </indexterm> <indexterm>
5736               <primary>variables</primary>
5737
5738               <secondary>PATH, setting for users</secondary>
5739             </indexterm></para>
5740         </listitem>
5741
5742         <listitem>
5743           <para><emphasis role="bold">(Optional)</emphasis> To enable users to issue commands from the AFS suites (such as <emphasis
5744           role="bold">fs</emphasis>) without having to specify a pathname to their binaries, include the <emphasis
5745           role="bold">/usr/afsws/bin</emphasis> and <emphasis role="bold">/usr/afsws/etc</emphasis> directories in the PATH
5746           environment variable you define in each user's shell initialization file (such as <emphasis
5747           role="bold">.cshrc</emphasis>).</para>
5748         </listitem>
5749       </orderedlist></para>
5750
5751     <indexterm>
5752       <primary>storing</primary>
5753
5754       <secondary>AFS documentation in volumes</secondary>
5755     </indexterm>
5756
5757     <indexterm>
5758       <primary>creating</primary>
5759
5760       <secondary>volume</secondary>
5761
5762       <tertiary>for AFS documentation</tertiary>
5763     </indexterm>
5764
5765     <indexterm>
5766       <primary>volume</primary>
5767
5768       <secondary>for AFS documentation</secondary>
5769     </indexterm>
5770
5771     <indexterm>
5772       <primary>documentation, creating volume for AFS</primary>
5773     </indexterm>
5774
5775     <indexterm>
5776       <primary>usr/afsdoc directory</primary>
5777     </indexterm>
5778
5779     <indexterm>
5780       <primary>directories</primary>
5781
5782       <secondary>/usr/afsdoc</secondary>
5783     </indexterm>
5784   </sect1>
5785
5786   <sect1 id="HDRWQ87">
5787     <title>Storing AFS Documents in AFS</title>
5788
5789     <para>The AFS distribution includes the following documents: <itemizedlist>
5790         <listitem>
5791           <para><emphasis>OpenAFS Release Notes</emphasis></para>
5792         </listitem>
5793
5794         <listitem>
5795           <para><emphasis>OpenAFS Quick Beginnings</emphasis></para>
5796         </listitem>
5797
5798         <listitem>
5799           <para><emphasis>OpenAFS User Guide</emphasis></para>
5800         </listitem>
5801
5802         <listitem>
5803           <para><emphasis>OpenAFS Administration Reference</emphasis></para>
5804         </listitem>
5805
5806         <listitem>
5807           <para><emphasis>OpenAFS Administration Guide</emphasis></para>
5808         </listitem>
5809       </itemizedlist></para>
5810
5811     <note><para>OpenAFS Documentation is not currently provided with all 
5812     distributions, but may be downloaded separately from the OpenAFS 
5813     website</para></note>
5814     
5815     <para>The OpenAFS Documentation Distribution has a directory for each 
5816     document format provided. The different formats are suitable for online 
5817     viewing, printing, or both.</para>
5818
5819     <para>This section explains how to create and mount a volume to house the documents, making them available to your users. The
5820     recommended mount point for the volume is <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5821     role="bold">/afsdoc</emphasis>. If you wish, you can create a link to the mount point on each client machine's local disk,
5822     called <emphasis role="bold">/usr/afsdoc</emphasis>. Alternatively, you can create a link to the mount point in each user's home
5823     directory. You can also choose to permit users to access only certain documents (most probably, the <emphasis>OpenAFS User
5824     Guide</emphasis>) by creating different mount points or setting different ACLs on different document directories.</para>
5825
5826     <para>The current working directory is still <emphasis role="bold">/usr/afs/bin</emphasis>, which houses the <emphasis
5827     role="bold">fs</emphasis> and <emphasis role="bold">vos</emphasis> command suite binaries you use to create and mount volumes.
5828     In the following commands, it is possible you still need to specify the pathname to the commands, depending on how your PATH
5829     environment variable is set. <orderedlist>
5830         <indexterm>
5831           <primary>commands</primary>
5832
5833           <secondary>vos create</secondary>
5834
5835           <tertiary>volume for AFS documentation</tertiary>
5836         </indexterm>
5837
5838         <indexterm>
5839           <primary>vos commands</primary>
5840
5841           <secondary>create</secondary>
5842
5843           <tertiary>volume for AFS documentation</tertiary>
5844         </indexterm>
5845
5846         <listitem>
5847           <para>Issue the <emphasis role="bold">vos create</emphasis> command to create a volume for storing the AFS documentation.
5848           Include the <emphasis role="bold">-maxquota</emphasis> argument to set an unlimited quota on the volume. This enables you
5849           to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's quota.</para>
5850
5851           <para>If you wish, you can set the volume's quota to a finite value after you complete the copying operations. At that
5852           point, use the <emphasis role="bold">vos examine</emphasis> command to determine how much space the volume is occupying.
5853           Then issue the <emphasis role="bold">fs setquota</emphasis> command to set a quota that is slightly larger.</para>
5854
5855           <programlisting>
5856    # <emphasis role="bold">vos create</emphasis>  &lt;<replaceable>machine name</replaceable>&gt; &lt;<replaceable>partition name</replaceable>&gt;  <emphasis
5857               role="bold">afsdoc  -maxquota  0</emphasis> 
5858 </programlisting>
5859         </listitem>
5860
5861         <listitem>
5862           <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to mount the new volume. Because the <emphasis
5863           role="bold">root.cell</emphasis> volume is replicated, you must precede the <emphasis>cellname</emphasis> with a period to
5864           specify the read/write mount point, as shown. Then issue the <emphasis role="bold">vos release</emphasis> command to
5865           release a new replica of the <emphasis role="bold">root.cell</emphasis> volume, and the <emphasis role="bold">fs
5866           checkvolumes</emphasis> command to force the local Cache Manager to access them. <programlisting>
5867    # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc</emphasis> <emphasis
5868                 role="bold">-vol</emphasis> <emphasis role="bold">afsdoc</emphasis>
5869    # <emphasis role="bold">vos release root.cell</emphasis>
5870    # <emphasis role="bold">fs checkvolumes</emphasis>
5871 </programlisting></para>
5872         </listitem>
5873
5874         <listitem>
5875           <para>Issue the <emphasis role="bold">fs setacl</emphasis> command to grant the <emphasis role="bold">rl</emphasis>
5876           permissions to the <emphasis role="bold">system:anyuser</emphasis> group on the new directory's ACL. <programlisting>
5877    # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc</emphasis> 
5878    # <emphasis role="bold">fs setacl  .  system:anyuser rl</emphasis> 
5879 </programlisting></para>
5880         </listitem>
5881
5882         <listitem>
5883           <para>Unpack the OpenAFS documentation distribution into the 
5884           <emphasis role="bold">/tmp/afsdocs</emphasis> directory. You may use
5885           a different directory, in which case the location you use should be
5886           subsituted in the following examples. For instructions on unpacking
5887           the distribution, consult the documentation for your operating
5888           system's <emphasis role="bold">tar</emphasis> command.
5889           <indexterm>
5890               <primary>copying</primary>
5891
5892               <secondary>AFS documentation from distribution</secondary>
5893             </indexterm> <indexterm>
5894               <primary>OpenAFS Distribution</primary>
5895
5896               <secondary>copying AFS documentation from</secondary>
5897             </indexterm> <indexterm>
5898               <primary>first AFS machine</primary>
5899
5900               <secondary>copying</secondary>
5901
5902               <tertiary>AFS documentation from OpenAFS distribution</tertiary>
5903             </indexterm> <indexterm>
5904               <primary>index.htm file</primary>
5905             </indexterm> <indexterm>
5906               <primary>files</primary>
5907
5908               <secondary>index.htm</secondary>
5909             </indexterm></para>
5910         </listitem>
5911
5912         <listitem>
5913           <para>Copy the AFS documents in one or more formats from the unpacked distribution into subdirectories of the <emphasis
5914           role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc</emphasis> directory. Repeat
5915           the commands for each format. <programlisting>
5916    # <emphasis role="bold">mkdir</emphasis> <replaceable>format_name</replaceable>
5917    # <emphasis role="bold">cd</emphasis> <replaceable>format_name</replaceable>
5918    # <emphasis role="bold">cp -rp /tmp/afsdocs/</emphasis><replaceable>format</replaceable>  <emphasis role="bold">.</emphasis>      
5919 </programlisting></para>
5920
5921           <para>If you choose to store the HTML version of the documents in AFS, note that in addition to a subdirectory for each
5922           document there are several files with a <emphasis role="bold">.gif</emphasis> extension, which enable readers to move
5923           easily between sections of a document. The file called <emphasis role="bold">index.htm</emphasis> is an introductory HTML
5924           page that contains a hyperlink to each of the documents. For online viewing to work properly, these files must remain in
5925           the top-level HTML directory (the one named, for example, <emphasis
5926           role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc/html</emphasis>).</para>
5927         </listitem>
5928
5929         <listitem>
5930           <para><emphasis role="bold">(Optional)</emphasis> If you believe it is helpful to your users to access the AFS documents
5931           in a certain format via a local disk directory, create <emphasis role="bold">/usr/afsdoc</emphasis> on the local disk as a
5932           symbolic link to the documentation directory in AFS (<emphasis
5933           role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5934           role="bold">/afsdoc/</emphasis><replaceable>format_name</replaceable>). <programlisting>
5935    # <emphasis role="bold">ln -s /afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc/</emphasis><replaceable>format_name</replaceable> <emphasis
5936                 role="bold">/usr/afsdoc</emphasis>
5937 </programlisting></para>
5938
5939           <para>An alternative is to create a link in each user's home directory to the <emphasis
5940           role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5941           role="bold">/afsdoc/</emphasis><replaceable>format_name</replaceable> directory.</para>
5942         </listitem>
5943       </orderedlist></para>
5944
5945     <indexterm>
5946       <primary>storing</primary>
5947
5948       <secondary>system binaries in volumes</secondary>
5949     </indexterm>
5950
5951     <indexterm>
5952       <primary>creating</primary>
5953
5954       <secondary>volume</secondary>
5955
5956       <tertiary>for system binaries</tertiary>
5957     </indexterm>
5958
5959     <indexterm>
5960       <primary>volume</primary>
5961
5962       <secondary>for system binaries</secondary>
5963     </indexterm>
5964
5965     <indexterm>
5966       <primary>binaries</primary>
5967
5968       <secondary>storing system in volumes</secondary>
5969     </indexterm>
5970   </sect1>
5971
5972   <sect1 id="HDRWQ88">
5973     <title>Storing System Binaries in AFS</title>
5974
5975     <para>You can also choose to store other system binaries in AFS volumes, such as the standard UNIX programs conventionally
5976     located in local disk directories such as <emphasis role="bold">/etc</emphasis>, <emphasis role="bold">/bin</emphasis>, and
5977     <emphasis role="bold">/lib</emphasis>. Storing such binaries in an AFS volume not only frees local disk space, but makes it
5978     easier to update binaries on all client machines.</para>
5979
5980     <para>The following is a suggested scheme for storing system binaries in AFS. It does not include instructions, but you can use
5981     the instructions in <link linkend="HDRWQ83">Storing AFS Binaries in AFS</link> (which are for AFS-specific binaries) as a
5982     template.</para>
5983
5984     <para>Some files must remain on the local disk for use when AFS is inaccessible (during bootup and file server or network
5985     outages). The required binaries include the following: <itemizedlist>
5986         <listitem>
5987           <para>A text editor, network commands, and so on</para>
5988         </listitem>
5989
5990         <listitem>
5991           <para>Files used during the boot sequence before the <emphasis role="bold">afsd</emphasis> program runs, such as
5992           initialization and configuration files, and binaries for commands that mount file systems</para>
5993         </listitem>
5994
5995         <listitem>
5996           <para>Files used by dynamic kernel loader programs</para>
5997         </listitem>
5998       </itemizedlist></para>
5999
6000     <para>In most cases, it is more secure to enable only locally authenticated users to access system binaries, by granting the
6001     <emphasis role="bold">l</emphasis> (<emphasis role="bold">lookup</emphasis>) and <emphasis role="bold">r</emphasis> (<emphasis
6002     role="bold">read</emphasis>) permissions to the <emphasis role="bold">system:authuser</emphasis> group on the ACLs of
6003     directories that contain the binaries. If users need to access a binary while unauthenticated, however, the ACL on its directory
6004     must grant those permissions to the <emphasis role="bold">system:anyuser</emphasis> group.</para>
6005
6006     <para>The following chart summarizes the suggested volume and mount point names for storing system binaries. It uses a separate
6007     volume for each directory. You already created a volume called <replaceable>sysname</replaceable> for this machine's system type
6008     when you followed the instructions in <link linkend="HDRWQ83">Storing AFS Binaries in AFS</link>.</para>
6009
6010     <para>You can name volumes in any way you wish, and mount them at other locations than those suggested here. However, this
6011     scheme has several advantages: <itemizedlist>
6012         <listitem>
6013           <para>Volume names clearly identify volume contents</para>
6014         </listitem>
6015
6016         <listitem>
6017           <para>Using the <replaceable>sysname</replaceable> prefix on every volume makes it is easy to back up all of the volumes
6018           together, because the AFS Backup System enables you to define sets of volumes based on a string included in all of their
6019           names</para>
6020         </listitem>
6021
6022         <listitem>
6023           <para>It makes it easy to track related volumes, keeping them together on the same file server machine if desired</para>
6024         </listitem>
6025
6026         <listitem>
6027           <para>There is a clear relationship between volume name and mount point name</para>
6028         </listitem>
6029       </itemizedlist></para>
6030
6031     <informaltable frame="none">
6032       <tgroup cols="2">
6033         <colspec colwidth="50*" />
6034
6035         <colspec colwidth="50*" />
6036
6037         <thead>
6038           <row>
6039             <entry><emphasis role="bold">Volume Name</emphasis></entry>
6040
6041             <entry><emphasis role="bold">Mount Point</emphasis></entry>
6042           </row>
6043         </thead>
6044
6045         <tbody>
6046           <row>
6047             <entry><replaceable>sysname</replaceable></entry>
6048
6049             <entry><emphasis
6050             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable></entry>
6051           </row>
6052
6053           <row>
6054             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">bin</emphasis></entry>
6055
6056             <entry><emphasis
6057             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6058             role="bold">/bin</emphasis></entry>
6059           </row>
6060
6061           <row>
6062             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">etc</emphasis></entry>
6063
6064             <entry><emphasis
6065             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6066             role="bold">/etc</emphasis></entry>
6067           </row>
6068
6069           <row>
6070             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr</emphasis></entry>
6071
6072             <entry><emphasis
6073             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6074             role="bold">/usr</emphasis></entry>
6075           </row>
6076
6077           <row>
6078             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.afsws</emphasis></entry>
6079
6080             <entry><emphasis
6081             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6082             role="bold">/usr/afsws</emphasis></entry>
6083           </row>
6084
6085           <row>
6086             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.bin</emphasis></entry>
6087
6088             <entry><emphasis
6089             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6090             role="bold">/usr/bin</emphasis></entry>
6091           </row>
6092
6093           <row>
6094             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.etc</emphasis></entry>
6095
6096             <entry><emphasis
6097             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6098             role="bold">/usr/etc</emphasis></entry>
6099           </row>
6100
6101           <row>
6102             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.inc</emphasis></entry>
6103
6104             <entry><emphasis
6105             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6106             role="bold">/usr/include</emphasis></entry>
6107           </row>
6108
6109           <row>
6110             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.lib</emphasis></entry>
6111
6112             <entry><emphasis
6113             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6114             role="bold">/usr/lib</emphasis></entry>
6115           </row>
6116
6117           <row>
6118             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.loc</emphasis></entry>
6119
6120             <entry><emphasis
6121             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6122             role="bold">/usr/local</emphasis></entry>
6123           </row>
6124
6125           <row>
6126             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.man</emphasis></entry>
6127
6128             <entry><emphasis
6129             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6130             role="bold">/usr/man</emphasis></entry>
6131           </row>
6132
6133           <row>
6134             <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.sys</emphasis></entry>
6135
6136             <entry><emphasis
6137             role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6138             role="bold">/usr/sys</emphasis></entry>
6139           </row>
6140         </tbody>
6141       </tgroup>
6142     </informaltable>
6143
6144     <indexterm>
6145       <primary>foreign cell, enabling access</primary>
6146     </indexterm>
6147
6148     <indexterm>
6149       <primary>cell</primary>
6150
6151       <secondary>enabling access to foreign</secondary>
6152     </indexterm>
6153
6154     <indexterm>
6155       <primary>access</primary>
6156
6157       <secondary>to local and foreign cells</secondary>
6158     </indexterm>
6159
6160     <indexterm>
6161       <primary>AFS filespace</primary>
6162
6163       <secondary>enabling access to foreign cells</secondary>
6164     </indexterm>
6165
6166     <indexterm>
6167       <primary>root.cell volume</primary>
6168
6169       <secondary>mounting for foreign cells in local filespace</secondary>
6170     </indexterm>
6171
6172     <indexterm>
6173       <primary>database server machine</primary>
6174
6175       <secondary>entry in client CellServDB file</secondary>
6176
6177       <tertiary>for foreign cell</tertiary>
6178     </indexterm>
6179
6180     <indexterm>
6181       <primary>CellServDB file (client)</primary>
6182
6183       <secondary>adding entry</secondary>
6184
6185       <tertiary>for foreign cell</tertiary>
6186     </indexterm>
6187   </sect1>
6188
6189   <sect1 id="HDRWQ91">
6190     <title>Enabling Access to Foreign Cells</title>
6191     
6192     <para>With current OpenAFS releases, there exist a number of mechanisms for
6193     providing access to foreign cells. You may add mount points in your AFS
6194     filespace for each foreign cell you wish users to access, or you can
6195     enable a 'synthetic' AFS root, which contains mountpoints for either all
6196     AFS cells defined in the client machine's local 
6197     <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis>, or for all cells
6198     providing location information in the DNS.
6199     </para>
6200     
6201     <sect2>
6202     <title>Enabling a Synthetic AFS root</title>
6203     
6204     <para>When a synthetic root is enabled, the client cache machine creates its
6205     own root.afs volume, rather than using the one provided with your cell. This
6206     allows clients to access all cells in the 
6207     <emphasis role="bold">CellServDB</emphasis> file and, optionally, all cells
6208     registered in the DNS, without requiring system administrator action to 
6209     enable this access. Using a synthetic root has the additional advantage that
6210     it allows a client to start its AFS service without a network available, as
6211     it is no longer necessary to contact a fileserver to obtain the root volume.
6212     </para>
6213     
6214     <para>OpenAFS supports two complimentary mechanisms for creating the 
6215     synthetic root. Starting the cache manager with the 
6216     <emphasis role="bold">-dynroot</emphasis> option adds all cells listed
6217     in <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> to the client's
6218     AFS root. Adding the <emphasis role="bold">-afsdb</emphasis> option in
6219     addition to this enables DNS lookups for any cells that are not found in
6220     the client's CellServDB file. Both of these options are added to the AFS
6221     initialisation script, or options file, as detailed in 
6222     <link linkend="HDRWQ70">Configuring the Cache Manager</link>.</para>
6223     </sect2>
6224     <sect2>
6225       <title>Adding foreign cells to a conventional root volume</title>
6226     
6227     <para>In this section you create a mount point in your AFS filespace for the <emphasis role="bold">root.cell</emphasis> volume
6228     of each foreign cell that you want to enable your users to access. For users working on a client machine to access the cell,
6229     there must in addition be an entry for it in the client machine's local <emphasis
6230     role="bold">/usr/vice/etc/CellServDB</emphasis> file. (The instructions in <link linkend="HDRWQ66">Creating the Client
6231     CellServDB File</link> suggest that you use the <emphasis role="bold">CellServDB.sample</emphasis> file included in the AFS
6232     distribution as the basis for your cell's client <emphasis role="bold">CellServDB</emphasis> file. The sample file lists all of
6233     the cells that had agreed to participate in the AFS global namespace at the time your AFS CD-ROM was created. As mentioned in
6234     that section, the AFS Product Support group also maintains a copy of the file, updating it as necessary.)</para>
6235
6236     <para>The chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell administration and configuration issues
6237     discusses the implications of participating in the global AFS namespace. The chapter about administering client machines
6238     explains how to maintain knowledge of foreign cells on client machines, and includes suggestions for maintaining a central
6239     version of the file in AFS. <orderedlist>
6240         <listitem>
6241           <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to mount each foreign cell's <emphasis
6242           role="bold">root.cell</emphasis> volume on a directory called <emphasis
6243           role="bold">/afs/</emphasis><replaceable>foreign_cell</replaceable>. Because the <emphasis role="bold">root.afs</emphasis>
6244           volume is replicated, you must create a temporary mount point for its read/write version in a directory to which you have
6245           write access (such as your cell's <emphasis role="bold">/afs/.</emphasis><replaceable>cellname</replaceable> directory).
6246           Create the mount points, issue the <emphasis role="bold">vos release</emphasis> command to release new replicas to the
6247           read-only sites for the <emphasis role="bold">root.afs</emphasis> volume, and issue the <emphasis role="bold">fs
6248           checkvolumes</emphasis> command to force the local Cache Manager to access the new replica.</para>
6249
6250           <note>
6251             <para>You need to issue the <emphasis role="bold">fs mkmount</emphasis> command only once for each foreign cell's
6252             <emphasis role="bold">root.cell</emphasis> volume. You do not need to repeat the command on each client machine.</para>
6253           </note>
6254
6255           <para>Substitute your cell's name for <replaceable>cellname</replaceable>.</para>
6256
6257           <programlisting>
6258    # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable>
6259    # <emphasis role="bold">/usr/afs/bin/fs  mkmount  temp  root.afs</emphasis>   
6260 </programlisting>
6261
6262           <para>Repeat the <emphasis role="bold">fs mkmount</emphasis> command for each foreign cell you wish to mount at this
6263           time.</para>
6264
6265           <programlisting>
6266    # <emphasis role="bold">/usr/afs/bin/fs mkmount temp/</emphasis><replaceable>foreign_cell</replaceable> <emphasis role="bold">root.cell -c</emphasis> <replaceable>foreign_cell</replaceable>   
6267 </programlisting>
6268
6269           <para>Issue the following commands only once.</para>
6270
6271           <programlisting>
6272    # <emphasis role="bold">/usr/afs/bin/fs rmmount temp</emphasis>
6273    # <emphasis role="bold">/usr/afs/bin/vos release root.afs</emphasis>
6274    # <emphasis role="bold">/usr/afs/bin/fs checkvolumes</emphasis>
6275 </programlisting>
6276
6277           <indexterm>
6278             <primary>fs commands</primary>
6279
6280             <secondary>newcell</secondary>
6281           </indexterm>
6282
6283           <indexterm>
6284             <primary>commands</primary>
6285
6286             <secondary>fs newcell</secondary>
6287           </indexterm>
6288         </listitem>
6289
6290         <listitem>
6291           <para><anchor id="LIWQ92" />If this machine is going to remain an AFS client after you complete the installation, verify
6292           that the local <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> file includes an entry for each foreign
6293           cell.</para>
6294
6295           <para>For each cell that does not already have an entry, complete the following instructions: <orderedlist>
6296               <listitem>
6297                 <para>Create an entry in the <emphasis role="bold">CellServDB</emphasis> file. Be sure to comply with the formatting
6298                 instructions in <link linkend="HDRWQ66">Creating the Client CellServDB File</link>.</para>
6299               </listitem>
6300
6301               <listitem>
6302                 <para>Issue the <emphasis role="bold">fs newcell</emphasis> command to add an entry for the cell directly to the
6303                 list that the Cache Manager maintains in kernel memory. Provide each database server machine's fully qualified
6304                 hostname. <programlisting>
6305    # <emphasis role="bold">/usr/afs/bin/fs newcell</emphasis> &lt;<replaceable>foreign_cell</replaceable>&gt; &lt;<replaceable>dbserver1&gt;</replaceable>    \
6306             [&lt;<replaceable>dbserver2&gt;</replaceable>] [&lt;<replaceable>dbserver3&gt;</replaceable>]
6307 </programlisting></para>
6308               </listitem>
6309
6310               <listitem>
6311                 <para>If you plan to maintain a central version of the <emphasis role="bold">CellServDB</emphasis> file (the
6312                 conventional location is <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
6313                 role="bold">/common/etc/CellServDB</emphasis>), create it now as a copy of the local <emphasis
6314                 role="bold">/usr/vice/etc/CellServDB</emphasis> file. Verify that it includes an entry for each foreign cell you
6315                 want your users to be able to access. <programlisting>
6316    # <emphasis role="bold">mkdir common</emphasis>
6317    # <emphasis role="bold">mkdir common/etc</emphasis>
6318    # <emphasis role="bold">cp  /usr/vice/etc/CellServDB  common/etc</emphasis>
6319    # <emphasis role="bold">/usr/afs/bin/vos release root.cell</emphasis>
6320 </programlisting></para>
6321               </listitem>
6322             </orderedlist></para>
6323         </listitem>
6324
6325         <listitem>
6326           <para>Issue the <emphasis role="bold">ls</emphasis> command to verify that the new cell's mount point is visible in your
6327           filespace. The output lists the directories at the top level of the new cell's AFS filespace. <programlisting>
6328    # <emphasis role="bold">ls /afs/</emphasis><replaceable>foreign_cell</replaceable>
6329 </programlisting></para>
6330         </listitem>
6331              
6332         <listitem>
6333           <para>If you wish to participate in the global AFS namespace, and only
6334           intend running one database server, please
6335           register your cell with grand.central.org at this time.
6336           To do so, email the <emphasis role="bold">CellServDB</emphasis> fragment
6337           describing your cell, together with a contact name and email address
6338           for any queries, to cellservdb@grand.central.org. If you intend
6339           on deploying multiple database servers, please wait until you have 
6340           installed all of them before registering your cell.</para>
6341         </listitem>
6342         <listitem>
6343           <para>If you wish to allow your cell to be located through DNS lookups,
6344           at this time you should also add the necessary configuration to your
6345           DNS.</para>
6346           
6347           <para>AFS database servers may be located by creating AFSDB records
6348           in the DNS for the domain name corresponding to the name of your cell.
6349           It's outside the scope of this guide to give an indepth description of
6350           managing, or configuring, your site's DNS. You should consult the
6351           documentation for your DNS server for further details on AFSDB 
6352           records.</para>
6353         </listitem>
6354       </orderedlist></para>
6355     </sect2>
6356   </sect1>
6357
6358   <sect1 id="HDRWQ93">
6359     <title>Improving Cell Security</title>
6360
6361     <indexterm>
6362       <primary>cell</primary>
6363
6364       <secondary>improving security</secondary>
6365     </indexterm>
6366
6367     <indexterm>
6368       <primary>security</primary>
6369
6370       <secondary>improving</secondary>
6371     </indexterm>
6372
6373     <indexterm>
6374       <primary>root superuser</primary>
6375
6376       <secondary>controlling access</secondary>
6377     </indexterm>
6378
6379     <indexterm>
6380       <primary>access</primary>
6381
6382       <secondary>to root and admin accounts</secondary>
6383     </indexterm>
6384
6385     <indexterm>
6386       <primary>admin account</primary>
6387
6388       <secondary>controlling access to</secondary>
6389     </indexterm>
6390
6391     <indexterm>
6392       <primary>AFS filespace</primary>
6393
6394       <secondary>controlling access by root superuser</secondary>
6395     </indexterm>
6396
6397     <para>This section discusses ways to improve the security of AFS data
6398     in your cell. Also see the chapter in the <emphasis>OpenAFS
6399     Administration Guide</emphasis> about configuration and administration
6400     issues.</para>
6401
6402     <sect2 id="HDRWQ94">
6403       <title>Controlling root Access</title>
6404
6405       <para>As on any machine, it is important to prevent unauthorized users from logging onto an AFS server or client machine as
6406       the local superuser <emphasis role="bold">root</emphasis>. Take care to keep the <emphasis role="bold">root</emphasis>
6407       password secret.</para>
6408
6409       <para>The local <emphasis role="bold">root</emphasis> superuser does not have special access to AFS data through the Cache
6410       Manager (as members of the <emphasis role="bold">system:administrators</emphasis> group do), but it does have the following
6411       privileges: <itemizedlist>
6412           <listitem>
6413             <para>On client machines, the ability to issue commands from the <emphasis role="bold">fs</emphasis> suite that affect
6414             AFS performance</para>
6415           </listitem>
6416
6417           <listitem>
6418             <para>On server machines, the ability to disable authorization checking, or to install rogue process binaries</para>
6419           </listitem>
6420         </itemizedlist></para>
6421     </sect2>
6422
6423     <sect2 id="HDRWQ95">
6424       <title>Controlling System Administrator Access</title>
6425
6426       <para>Following are suggestions for managing AFS administrative privilege: <itemizedlist>
6427           <listitem>
6428             <para>Create an administrative account for each administrator named 
6429             something like 
6430             <replaceable>username</replaceable><emphasis role="bold">.admin</emphasis>. 
6431             Administrators authenticate under these identities only when 
6432             performing administrative tasks, and destroy the administrative 
6433             tokens immediately after finishing the task (either by issuing the 
6434             <emphasis role="bold">unlog</emphasis> command, or the 
6435             <emphasis role="bold">kinit</emphasis> and 
6436             <emphasis role="bold">aklog</emphasis> commands to adopt their 
6437             regular identity).</para>
6438           </listitem>
6439
6440           <listitem>
6441             <para>Set a short ticket lifetime for administrator accounts (for example, 20 minutes) by using the 
6442             facilities of your KDC. For instance, with a MIT Kerberos KDC, this
6443             can be performed using the 
6444             <emphasis role="bold">--max-ticket-life</emphasis> argument to
6445             the <emphasis role="bold">kadmin modify_principal</emphasis>
6446             command. Do not however, use a short lifetime for users
6447             who issue long-running <emphasis role="bold">backup</emphasis> commands.</para>
6448           </listitem>
6449
6450           <listitem>
6451             <para>Limit the number of system administrators in your cell, especially those who belong to the <emphasis
6452             role="bold">system:administrators</emphasis> group. By default they have all ACL rights on all directories in the local
6453             AFS filespace, and therefore must be trusted not to examine private files.</para>
6454           </listitem>
6455
6456           <listitem>
6457             <para>Limit the use of system administrator accounts on machines in public areas. It is especially important not to
6458             leave such machines unattended without first destroying the administrative tokens.</para>
6459           </listitem>
6460
6461           <listitem>
6462             <para>Limit the use by administrators of standard UNIX commands that make connections to remote machines (such as the
6463             <emphasis role="bold">telnet</emphasis> utility). Many of these programs send passwords across the network without
6464             encrypting them.</para>
6465           </listitem>
6466         </itemizedlist></para>
6467
6468       <indexterm>
6469         <primary>BOS Server</primary>
6470
6471         <secondary>checking mode bits on AFS directories</secondary>
6472       </indexterm>
6473
6474       <indexterm>
6475         <primary>mode bits on local AFS directories</primary>
6476       </indexterm>
6477
6478       <indexterm>
6479         <primary>UNIX mode bits on local AFS directories</primary>
6480       </indexterm>
6481     </sect2>
6482
6483     <sect2 id="HDRWQ96">
6484       <title>Protecting Sensitive AFS Directories</title>
6485
6486       <para>Some subdirectories of the <emphasis role="bold">/usr/afs</emphasis> directory contain files crucial to cell security.
6487       Unauthorized users must not read or write to these files because of the potential for misuse of the information they
6488       contain.</para>
6489
6490       <para>As the BOS Server initializes for the first time on a server machine, it creates several files and directories (as
6491       mentioned in <link linkend="HDRWQ50">Starting the BOS Server</link>). It sets their owner to the local superuser <emphasis
6492       role="bold">root</emphasis> and sets their mode bits to enable writing by the owner only; in some cases, it also restricts
6493       reading.</para>
6494
6495       <para>At each subsequent restart, the BOS Server checks that the owner and mode bits on these files are still set
6496       appropriately. If they are not, it write the following message to the <emphasis role="bold">/usr/afs/logs/BosLog</emphasis>
6497       file:</para>
6498
6499       <programlisting>
6500    Bosserver reports inappropriate access on server directories   
6501 </programlisting>
6502
6503       <para>The BOS Server does not reset the mode bits, which enables you to set alternate values if you wish.</para>
6504
6505       <para>The following charts lists the expected mode bit settings. A question mark indicates that the BOS Server does not check
6506       that mode bit.</para>
6507
6508       <informaltable frame="none">
6509         <tgroup cols="2">
6510           <colspec colwidth="30*" />
6511
6512           <colspec colwidth="70*" />
6513
6514           <tbody>
6515             <row>
6516               <entry><emphasis role="bold">/usr/afs</emphasis></entry>
6517
6518               <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
6519             </row>
6520
6521             <row>
6522               <entry><emphasis role="bold">/usr/afs/backup</emphasis></entry>
6523
6524               <entry><computeroutput>drwx</computeroutput>???<computeroutput>---</computeroutput></entry>
6525             </row>
6526
6527             <row>
6528               <entry><emphasis role="bold">/usr/afs/bin</emphasis></entry>
6529
6530               <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
6531             </row>
6532
6533             <row>
6534               <entry><emphasis role="bold">/usr/afs/db</emphasis></entry>
6535
6536               <entry><computeroutput>drwx</computeroutput>???<computeroutput>---</computeroutput></entry>
6537             </row>
6538
6539             <row>
6540               <entry><emphasis role="bold">/usr/afs/etc</emphasis></entry>
6541
6542               <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
6543             </row>
6544
6545             <row>
6546               <entry><emphasis role="bold">/usr/afs/etc/KeyFile</emphasis></entry>
6547
6548               <entry><computeroutput>-rw</computeroutput>????<computeroutput>---</computeroutput></entry>
6549             </row>
6550
6551             <row>
6552               <entry><emphasis role="bold">/usr/afs/etc/UserList</emphasis></entry>
6553
6554               <entry><computeroutput>-rw</computeroutput>?????<computeroutput>--</computeroutput></entry>
6555             </row>
6556
6557             <row>
6558               <entry><emphasis role="bold">/usr/afs/local</emphasis></entry>
6559
6560               <entry><computeroutput>drwx</computeroutput>???<computeroutput>---</computeroutput></entry>
6561             </row>
6562
6563             <row>
6564               <entry><emphasis role="bold">/usr/afs/logs</emphasis></entry>
6565
6566               <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
6567             </row>
6568           </tbody>
6569         </tgroup>
6570       </informaltable>
6571
6572       <indexterm>
6573         <primary>first AFS machine</primary>
6574
6575         <secondary>client functionality</secondary>
6576
6577         <tertiary>removing</tertiary>
6578       </indexterm>
6579
6580       <indexterm>
6581         <primary>removing</primary>
6582
6583         <secondary>client functionality from first AFS machine</secondary>
6584       </indexterm>
6585     </sect2>
6586   </sect1>
6587
6588   <sect1 id="HDRWQ98">
6589     <title>Removing Client Functionality</title>
6590
6591     <para>Follow the instructions in this section only if you do not wish this machine to remain an AFS client. Removing client
6592     functionality means that you cannot use this machine to access AFS files. <orderedlist>
6593         <listitem>
6594           <para>Remove the files from the <emphasis role="bold">/usr/vice/etc</emphasis> directory. The command does not remove the
6595           directory for files used by the dynamic kernel loader program, if it exists on this system type. Those files are still
6596           needed on a server-only machine. <programlisting>
6597    # <emphasis role="bold">cd /usr/vice/etc</emphasis>
6598    # <emphasis role="bold">rm  *</emphasis> 
6599    # <emphasis role="bold">rm -rf  C</emphasis>
6600 </programlisting></para>
6601         </listitem>
6602
6603         <listitem>
6604           <para>Create symbolic links to the <emphasis role="bold">ThisCell</emphasis> and <emphasis
6605           role="bold">CellServDB</emphasis> files in the <emphasis role="bold">/usr/afs/etc</emphasis> directory. This makes it
6606           possible to issue commands from the AFS command suites (such as <emphasis role="bold">bos</emphasis> and <emphasis
6607           role="bold">fs</emphasis>) on this machine. <programlisting>
6608    # <emphasis role="bold">ln -s /usr/afs/etc/ThisCell ThisCell</emphasis>
6609    # <emphasis role="bold">ln -s /usr/afs/etc/CellServDB CellServDB</emphasis>
6610 </programlisting></para>
6611         </listitem>
6612
6613         <listitem>
6614           <para>On IRIX systems, issue the <emphasis role="bold">chkconfig</emphasis> command to deactivate the <emphasis
6615           role="bold">afsclient</emphasis> configuration variable. <programlisting>
6616    # <emphasis role="bold">/etc/chkconfig -f afsclient off</emphasis>
6617 </programlisting></para>
6618         </listitem>
6619
6620         <listitem>
6621           <para>Reboot the machine. Most system types use the <emphasis role="bold">shutdown</emphasis> command, but the appropriate
6622           options vary. <programlisting>
6623    # <emphasis role="bold">cd /</emphasis>
6624    # <emphasis role="bold">shutdown</emphasis> <replaceable>appropriate_options</replaceable>
6625 </programlisting></para>
6626         </listitem>
6627       </orderedlist></para>
6628   </sect1>
6629 </chapter>