1 <?xml version="1.0" encoding="UTF-8"?>
3 <title>Installing the First AFS Machine</title>
7 <primary>file server machine</primary>
9 <seealso>first AFS machine</seealso>
11 <seealso>file server machine, additional</seealso>
15 <primary>instructions</primary>
17 <secondary>first AFS machine</secondary>
21 <primary>installing</primary>
23 <secondary>first AFS machine</secondary>
26 This chapter describes how to install the first AFS machine in your cell, configuring it as both a file server machine and a
27 client machine. After completing all procedures in this chapter, you can remove the client functionality if you wish, as described
28 in <link linkend="HDRWQ98">Removing Client Functionality</link>.</para>
30 <para>To install additional file server machines after completing this chapter, see <link linkend="HDRWQ99">Installing Additional
31 Server Machines</link>.</para>
33 <para>To install additional client machines after completing this chapter, see <link linkend="HDRWQ133">Installing Additional
34 Client Machines</link>. <indexterm>
35 <primary>requirements</primary>
37 <secondary>first AFS machine</secondary>
40 <sect1 id="Header_29">
41 <title>Requirements and Configuration Decisions</title>
43 <para>The instructions in this chapter assume that you meet the following requirements.
46 <para>You are logged onto the machine's console as the local superuser <emphasis role="bold">root</emphasis></para>
50 <para>A standard version of one of the operating systems supported by the current version of AFS is running on the
55 <para>You have either installed the provided OpenAFS packages for
56 your system, have access to a binary distribution tarball, or have
57 successfully built OpenAFS from source</para>
61 <para>You have a Kerberos v5 realm running for your site. If you are
62 working with an existing cell which uses
63 <emphasis role="bold">kaserver</emphasis> or Kerberos v4 for
64 authentication, please see
65 <link linkend="KAS001">kaserver and Legacy Kerberos v4 Authentication</link>
66 for the modifications required to this installation procedure.</para>
70 <para>You have NTP or a similar time service deployed to ensure
71 rough clock syncronistation between your clients and servers.</para>
73 </itemizedlist></para>
75 <para>You must make the following configuration decisions while installing the first AFS machine. To speed the installation
76 itself, it is best to make the decisions before beginning. See the chapter in the <emphasis>OpenAFS Administration
77 Guide</emphasis> about issues in cell administration and configuration for detailed guidelines. <indexterm>
78 <primary>cell name</primary>
80 <secondary>choosing</secondary>
81 </indexterm> <indexterm>
82 <primary>AFS filespace</primary>
84 <secondary>deciding how to configure</secondary>
85 </indexterm> <indexterm>
86 <primary>filespace</primary>
88 <see>AFS filespace</see>
89 </indexterm> <itemizedlist>
91 <para>Select the first AFS machine</para>
95 <para>Select the cell name</para>
99 <para>Decide which partitions or logical volumes to configure as AFS server partitions, and choose the directory names on
100 which to mount them</para>
104 <para>Decide how big to make the client cache</para>
108 <para>Decide how to configure the top levels of your cell's AFS filespace</para>
110 </itemizedlist></para>
112 <para>This chapter is divided into three large sections corresponding to the three parts of installing the first AFS machine.
113 Perform all of the steps in the order they appear. Each functional section begins with a summary of the procedures to perform.
114 The sections are as follows: <itemizedlist>
116 <para>Installing server functionality (begins in <link linkend="HDRWQ18">Overview: Installing Server
117 Functionality</link>)</para>
121 <para>Installing client functionality (begins in <link linkend="HDRWQ63">Overview: Installing Client
122 Functionality</link>)</para>
126 <para>Configuring your cell's filespace, establishing further security mechanisms, and enabling access to foreign cells
127 (begins in <link linkend="HDRWQ71">Overview: Completing the Installation of the First AFS Machine</link>)</para>
129 </itemizedlist></para>
132 <primary>overview</primary>
134 <secondary>installing server functionality on first AFS machine</secondary>
138 <primary>first AFS machine</primary>
140 <secondary>server functionality</secondary>
144 <primary>installing</primary>
146 <secondary>server functionality</secondary>
148 <tertiary>first AFS machine</tertiary>
153 <title>Overview: Installing Server Functionality</title>
155 <para>In the first phase of installing your cell's first AFS machine, you install file server and database server functionality
156 by performing the following procedures:
159 <para>Choose which machine to install as the first AFS machine</para>
163 <para>Create AFS-related directories on the local disk</para>
167 <para>Incorporate AFS modifications into the machine's kernel</para>
171 <para>Configure partitions or logical volumes for storing AFS volumes</para>
175 <para>On some system types, install and configure an AFS-modified version of the <emphasis role="bold">fsck</emphasis>
180 <para>If the machine is to remain a client machine, incorporate AFS into its authentication system</para>
184 <para>Start the Basic OverSeer (BOS) Server</para>
188 <para>Define the cell name and the machine's cell membership</para>
192 <para>Start the database server processes: Backup Server, Protection Server, and Volume Location
197 <para>Configure initial security mechanisms</para>
201 <para>Start the <emphasis role="bold">fs</emphasis> process, which incorporates three component processes: the File
202 Server, Volume Server, and Salvager</para>
206 <para>Optionally, start the server portion of the Update Server</para>
209 </orderedlist></para>
213 <title>Choosing the First AFS Machine</title>
215 <para>The first AFS machine you install must have sufficient disk space to store AFS volumes. To take best advantage of AFS's
216 capabilities, store client-side binaries as well as user files in volumes. When you later install additional file server
217 machines in your cell, you can distribute these volumes among the different machines as you see fit.</para>
219 <para>These instructions configure the first AFS machine as a <emphasis>database server machine</emphasis>, the <emphasis>binary
220 distribution machine</emphasis> for its system type, and the cell's <emphasis>system control machine</emphasis>. For a
221 description of these roles, see the <emphasis>OpenAFS Administration Guide</emphasis>.</para>
223 <para>Installation of additional machines is simplest if the first machine has the lowest IP address of any database server
224 machine you currently plan to install. If you later install database server functionality on a machine with a lower IP address,
225 you must first update the <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> file on all of your cell's client machines.
226 For more details, see <link linkend="HDRWQ114">Installing Database Server Functionality</link>.</para>
229 <sect1 id="Header_32">
230 <title>Creating AFS Directories</title>
233 <primary>usr/afs directory</primary>
235 <secondary>first AFS machine</secondary>
239 <primary>first AFS machine</primary>
241 <secondary>/usr/afs directory</secondary>
245 <primary>creating</primary>
247 <secondary>/usr/afs directory</secondary>
249 <tertiary>first AFS machine</tertiary>
253 <primary>usr/vice/etc directory</primary>
255 <secondary>first AFS machine</secondary>
259 <primary>first AFS machine</primary>
261 <secondary>/usr/vice/etc directory</secondary>
265 <primary>creating</primary>
267 <secondary>/usr/vice/etc directory</secondary>
269 <tertiary>first AFS machine</tertiary>
273 <primary>/ as start to file and directory names</primary>
275 <secondary>see alphabetized entries without initial slash</secondary>
278 <para>If you are installing from packages (such as Debian .deb or
279 Fedora/SuSe .rpm files), you should now install all of the available
280 OpenAFS packages for your system type. Typically, these will include
281 packages for client and server functionality, and a seperate package
282 containing a suitable kernel module for your running kernel. Consult
283 the package lists on the OpenAFS website to determine the packages
284 appropriate for your system.</para>
286 <para>If you are installing from a tarfile, or from a locally compiled
287 source tree you should create the <emphasis role="bold">/usr/afs</emphasis>
288 and <emphasis role="bold">/usr/vice/etc</emphasis> directories on the
289 local disk, to house server and client files respectively. Subsequent
290 instructions copy files from the distribution tarfile into them. </para>
292 # <emphasis role="bold">mkdir /usr/afs</emphasis>
293 # <emphasis role="bold">mkdir /usr/vice</emphasis>
294 # <emphasis role="bold">mkdir /usr/vice/etc</emphasis>
299 <title>Performing Platform-Specific Procedures</title>
301 <para>Several of the initial procedures for installing a file server machine differ for each system type. For convenience, the
302 following sections group them together for each system type: <itemizedlist>
304 <primary>kernel extensions</primary>
306 <see>AFS kernel extensions</see>
310 <primary>loading AFS kernel extensions</primary>
312 <see>incorporating</see>
316 <primary>building</primary>
318 <secondary>AFS extensions into kernel</secondary>
320 <see>incorporating AFS kernel extensions</see>
324 <para>Incorporate AFS modifications into the kernel.</para>
326 <para>The kernel on every AFS client machine and, on some systems,
327 the AFS fileservers, must incorporate AFS extensions. On machines
328 that use a dynamic kernel module loader, it is conventional to
329 alter the machine's initialization script to load the AFS extensions
330 at each reboot. <indexterm>
331 <primary>AFS server partition</primary>
333 <secondary>mounted on /vicep directory</secondary>
334 </indexterm> <indexterm>
335 <primary>partition</primary>
337 <see>AFS server partition</see>
338 </indexterm> <indexterm>
339 <primary>logical volume</primary>
341 <see>AFS server partition</see>
342 </indexterm> <indexterm>
343 <primary>requirements</primary>
345 <secondary>AFS server partition name and location</secondary>
346 </indexterm> <indexterm>
347 <primary>naming conventions for AFS server partition</primary>
348 </indexterm> <indexterm>
349 <primary>vicep<emphasis>xx</emphasis> directory</primary>
351 <see>AFS server partition</see>
352 </indexterm> <indexterm>
353 <primary>directories</primary>
355 <secondary>/vicep<emphasis>xx</emphasis></secondary>
357 <see>AFS server partition</see>
362 <para>Configure server partitions or logical volumes to house AFS volumes.</para>
364 <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes
365 (for convenience, the documentation hereafter refers to partitions only). Each server partition is mounted at a directory
366 named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where <replaceable>xx</replaceable> is one or
367 two lowercase letters. By convention, the first 26 partitions are mounted on the directories called <emphasis
368 role="bold">/vicepa</emphasis> through <emphasis role="bold">/vicepz</emphasis>, the 27th one is mounted on the <emphasis
369 role="bold">/vicepaa</emphasis> directory, and so on through <emphasis role="bold">/vicepaz</emphasis> and <emphasis
370 role="bold">/vicepba</emphasis>, continuing up to the index corresponding to the maximum number of server partitions
371 supported in the current version of AFS (which is specified in the <emphasis>OpenAFS Release Notes</emphasis>).</para>
373 <para>The <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server
374 machine's root directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is
375 not an acceptable directory location).
377 The <emphasis role="bold">fileserver</emphasis> will refuse to
379 any <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>
380 folders that are not separate partitions. </para>
383 <para>The separate partition requirement may be overridden by
384 creating a file named
385 <emphasis role="bold">/vicep<replaceable>xx</replaceable>/AlwaysAttach</emphasis>;
386 however, mixed-use partitions, whether cache or fileserver,
387 have the risk that a non-AFS use will fill the partition and
388 not leave enough free space for AFS. Even though it is
389 allowed, be wary of configuring a mixed-use partition
390 without understanding the ramifications of doing so with the
391 workload on your filesystem.
393 <primary>AFS server partition</primary>
394 <secondary>AlwaysAttach</secondary>
399 <para>You can also add or remove server partitions on an existing file server machine. For instructions, see the chapter
400 in the <emphasis>OpenAFS Administration Guide</emphasis> about maintaining server machines.</para>
403 <para>Not all file system types supported by an operating system are necessarily supported as AFS server partitions. For
404 possible restrictions, see the <emphasis>OpenAFS Release Notes</emphasis>.</para>
409 <para>On system types using the <emphasis role="bold">inode</emphasis> storage format, install and configure a modified <emphasis role="bold">fsck</emphasis> program which
410 recognizes the structures that the File Server uses to organize volume data on AFS server partitions. The <emphasis
411 role="bold">fsck</emphasis> program provided with the operating system does not understand the AFS data structures, and so
412 removes them to the <emphasis role="bold">lost+found</emphasis> directory.</para>
416 <para>If the machine is to remain an AFS client machine, modify the machine's authentication system so that users obtain
417 an AFS token as they log into the local file system. Using AFS is simpler and more convenient for your users if you make
418 the modifications on all client machines. Otherwise, users must perform a two or three step login procedure (login to the local
419 system, then obtain Kerberos credentials, and then issue the <emphasis role="bold">aklog</emphasis> command). For further discussion of AFS
420 authentication, see the chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration and
421 administration issues.</para>
423 </itemizedlist></para>
425 <para>To continue, proceed to the appropriate section: <itemizedlist>
427 <para><link linkend="HDRWQ21">Getting Started on AIX Systems</link></para>
431 <para><link linkend="HDRWQ31">Getting Started on HP-UX Systems</link></para>
435 <para><link linkend="HDRWQ36">Getting Started on IRIX Systems</link></para>
439 <para><link linkend="HDRWQ41">Getting Started on Linux Systems</link></para>
443 <para><link linkend="HDRWQ45">Getting Started on Solaris Systems</link></para>
445 </itemizedlist></para>
449 <title>Getting Started on AIX Systems</title>
451 <para>Begin by running the AFS initialization script to call the AIX kernel extension facility, which dynamically loads AFS
452 modifications into the kernel. Then use the <emphasis role="bold">SMIT</emphasis> program to configure partitions for storing
453 AFS volumes, and replace the AIX <emphasis role="bold">fsck</emphasis> program helper with a version that correctly handles AFS
454 volumes. If the machine is to remain an AFS client machine, incorporate AFS into the AIX secondary authentication system.
456 <primary>incorporating AFS kernel extensions</primary>
458 <secondary>first AFS machine</secondary>
460 <tertiary>AIX</tertiary>
461 </indexterm> <indexterm>
462 <primary>AFS kernel extensions</primary>
464 <secondary>on first AFS machine</secondary>
466 <tertiary>AIX</tertiary>
467 </indexterm> <indexterm>
468 <primary>first AFS machine</primary>
470 <secondary>AFS kernel extensions</secondary>
472 <tertiary>on AIX</tertiary>
473 </indexterm> <indexterm>
474 <primary>AIX</primary>
476 <secondary>AFS kernel extensions</secondary>
478 <tertiary>on first AFS machine</tertiary>
482 <title>Loading AFS into the AIX Kernel</title>
484 <para>The AIX kernel extension facility is the dynamic kernel loader
485 provided by IBM Corporation. AIX does not support incorporation of
486 AFS modifications during a kernel build.</para>
488 <para>For AFS to function correctly, the kernel extension facility must run each time the machine reboots, so the AFS
489 initialization script (included in the AFS distribution) invokes it automatically. In this section you copy the script to the
490 conventional location and edit it to select the appropriate options depending on whether NFS is also to run.</para>
492 <para>After editing the script, you run it to incorporate AFS into the kernel. In later sections you verify that the script
493 correctly initializes all AFS components, then configure the AIX <emphasis role="bold">inittab</emphasis> file so that the
494 script runs automatically at reboot. <orderedlist>
496 <para>Unpack the distribution tarball. The examples below assume
497 that you have unpacked the files into the
498 <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you
499 pick a different location, substitute this in all of the following
500 examples. Once you have unpacked the distribution,
501 change directory as indicated.
503 # <emphasis role="bold">cd /tmp/afsdist/rs_aix42/root.client/usr/vice/etc</emphasis>
504 </programlisting></para>
508 <para>Copy the AFS kernel library files to the local <emphasis role="bold">/usr/vice/etc/dkload</emphasis> directory,
509 and the AFS initialization script to the <emphasis role="bold">/etc</emphasis> directory. <programlisting>
510 # <emphasis role="bold">cp -rp dkload /usr/vice/etc</emphasis>
511 # <emphasis role="bold">cp -p rc.afs /etc/rc.afs</emphasis>
512 </programlisting></para>
516 <para>Edit the <emphasis role="bold">/etc/rc.afs</emphasis> script, setting the <computeroutput>NFS</computeroutput>
517 variable as indicated.</para>
519 <para>If the machine is not to function as an NFS/AFS Translator, set the <computeroutput>NFS</computeroutput> variable
526 <para>If the machine is to function as an NFS/AFS Translator and is running AIX 4.2.1 or higher, set the
527 <computeroutput>NFS</computeroutput> variable as follows. Note that NFS must already be loaded into the kernel, which
528 happens automatically on systems running AIX 4.1.1 and later, as long as the file <emphasis
529 role="bold">/etc/exports</emphasis> exists.</para>
537 <para>Invoke the <emphasis role="bold">/etc/rc.afs</emphasis> script to load AFS modifications into the kernel. You can
538 ignore any error messages about the inability to start the BOS Server or the Cache Manager or AFS client.
540 # <emphasis role="bold">/etc/rc.afs</emphasis>
541 </programlisting></para>
543 </orderedlist></para>
546 <primary>configuring</primary>
548 <secondary>AFS server partition on first AFS machine</secondary>
550 <tertiary>AIX</tertiary>
554 <primary>AFS server partition</primary>
556 <secondary>configuring on first AFS machine</secondary>
558 <tertiary>AIX</tertiary>
562 <primary>first AFS machine</primary>
564 <secondary>AFS server partition</secondary>
566 <tertiary>on AIX</tertiary>
570 <primary>AIX</primary>
572 <secondary>AFS server partition</secondary>
574 <tertiary>on first AFS machine</tertiary>
579 <title>Configuring Server Partitions on AIX Systems</title>
581 <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
582 server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
583 <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
584 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
585 directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
586 directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific
587 Procedures</link>.</para>
589 <para>To configure server partitions on an AIX system, perform the following procedures: <orderedlist>
591 <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
592 partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
593 # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
594 </programlisting></para>
598 <para>Use the <emphasis role="bold">SMIT</emphasis> program to create a journaling file system on each partition to be
599 configured as an AFS server partition.</para>
603 <para>Mount each partition at one of the <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>
604 directories. Choose one of the following three methods: <itemizedlist>
606 <para>Use the <emphasis role="bold">SMIT</emphasis> program</para>
610 <para>Use the <emphasis role="bold">mount -a</emphasis> command to mount all partitions at once</para>
614 <para>Use the <emphasis role="bold">mount</emphasis> command on each partition in turn</para>
616 </itemizedlist></para>
618 <para>Also configure the partitions so that they are mounted automatically at each reboot. For more information, refer
619 to the AIX documentation.</para>
621 </orderedlist></para>
624 <primary>replacing fsck program</primary>
626 <secondary>first AFS machine</secondary>
628 <tertiary>AIX</tertiary>
632 <primary>fsck program</primary>
634 <secondary>on first AFS machine</secondary>
636 <tertiary>AIX</tertiary>
640 <primary>first AFS machine</primary>
642 <secondary>fsck program</secondary>
644 <tertiary>on AIX</tertiary>
648 <primary>AIX</primary>
650 <secondary>fsck program</secondary>
652 <tertiary>on first AFS machine</tertiary>
657 <title>Replacing the fsck Program Helper on AIX Systems</title>
659 <note><para>The AFS modified fsck program is not required on AIX 5.1
660 systems, and the <emphasis role="bold">v3fshelper</emphasis> program
661 refered to below is not shipped for these systems.</para></note>
663 <para>In this section, you make modifications to guarantee that the appropriate <emphasis role="bold">fsck</emphasis> program
664 runs on AFS server partitions. The <emphasis role="bold">fsck</emphasis> program provided with the operating system must never
665 run on AFS server partitions. Because it does not recognize the structures that the File Server uses to organize volume data,
666 it removes all of the data. To repeat:</para>
668 <para><emphasis role="bold">Never run the standard fsck program on AFS server partitions. It discards AFS
669 volumes.</emphasis></para>
671 <para>On AIX systems, you do not replace the <emphasis role="bold">fsck</emphasis> binary itself, but rather the
672 <emphasis>program helper</emphasis> file included in the AIX distribution as <emphasis
673 role="bold">/sbin/helpers/v3fshelper</emphasis>. <orderedlist>
675 <para>Move the AIX <emphasis role="bold">fsck</emphasis> program helper to a safe location and install the version from
676 the AFS distribution in its place.
678 # <emphasis role="bold">cd /sbin/helpers</emphasis>
679 # <emphasis role="bold">mv v3fshelper v3fshelper.noafs</emphasis>
680 # <emphasis role="bold">cp -p /tmp/afsdist/rs_aix42/root.server/etc/v3fshelper v3fshelper</emphasis>
681 </programlisting></para>
685 <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
686 linkend="HDRWQ25">Enabling AFS Login on AIX Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
687 BOS Server</link>.</para>
689 </orderedlist></para>
692 <primary>enabling AFS login</primary>
694 <secondary>file server machine</secondary>
696 <tertiary>AIX</tertiary>
700 <primary>AFS login</primary>
702 <secondary>on file server machine</secondary>
704 <tertiary>AIX</tertiary>
708 <primary>first AFS machine</primary>
710 <secondary>AFS login</secondary>
712 <tertiary>on AIX</tertiary>
716 <primary>AIX</primary>
718 <secondary>AFS login</secondary>
720 <tertiary>on file server machine</tertiary>
724 <primary>secondary authentication system (AIX)</primary>
726 <secondary>server machine</secondary>
731 <title>Enabling AFS Login on AIX Systems</title>
734 <para>If you plan to remove client functionality from this machine after completing the installation, skip this section and
735 proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
738 <para>In modern AFS installations, you should be using Kerberos v5
739 for user login, and obtaining AFS tokens following this authentication
742 <para>There are currently no instructions available on configuring AIX to
743 automatically obtain AFS tokens at login. Following login, users can
744 obtain tokens by running the <emphasis role="bold">aklog</emphasis>
747 <para>Sites which still require <emphasis role="bold">kaserver</emphasis>
748 or external Kerberos v4 authentication should consult
749 <link linkend="KAS012">Enabling kaserver based AFS login on AIX systems</link>
750 for details of how to enable AIX login.</para>
752 <para>Proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>
753 (or if referring to these instructions while installing an additional
754 file server machine, return to <link linkend="HDRWQ108">Starting Server
755 Programs</link>).</para>
760 <title>Getting Started on HP-UX Systems</title>
762 <para>Begin by building AFS modifications into a new kernel; HP-UX
763 does not support dynamic loading. Then create partitions for storing
764 AFS volumes, and install and configure the AFS-modified <emphasis
765 role="bold">fsck</emphasis> program to run on AFS server
766 partitions. If the machine is to remain an AFS client machine,
767 incorporate AFS into the machine's Pluggable Authentication Module
768 (PAM) scheme. <indexterm>
769 <primary>incorporating AFS kernel extensions</primary>
771 <secondary>first AFS machine</secondary>
773 <tertiary>HP-UX</tertiary>
774 </indexterm> <indexterm>
775 <primary>AFS kernel extensions</primary>
777 <secondary>on first AFS machine</secondary>
779 <tertiary>HP-UX</tertiary>
780 </indexterm> <indexterm>
781 <primary>first AFS machine</primary>
783 <secondary>AFS kernel extensions</secondary>
785 <tertiary>on HP-UX</tertiary>
786 </indexterm> <indexterm>
787 <primary>HP-UX</primary>
789 <secondary>AFS-modified kernel</secondary>
791 <tertiary>on first AFS machine</tertiary>
795 <title>Building AFS into the HP-UX Kernel</title>
797 <para>Use the following instructions to build AFS modifications into the kernel on an HP-UX system. <orderedlist>
799 <para>Move the existing kernel-related files to a safe location. <programlisting>
800 # <emphasis role="bold">cp /stand/vmunix /stand/vmunix.noafs</emphasis>
801 # <emphasis role="bold">cp /stand/system /stand/system.noafs</emphasis>
802 </programlisting></para>
806 <para>Unpack the OpenAFS HP-UX distribution tarball. The examples
807 below assume that you have unpacked the files into the
808 <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you
809 pick a different location, substitute this in all of the following
810 examples. Once you have unpacked the distribution, change directory
813 # <emphasis role="bold">cd /tmp/afsdist/hp_ux110/root.client</emphasis>
814 </programlisting></para>
818 <para>Copy the AFS initialization file to the local directory for initialization files (by convention, <emphasis
819 role="bold">/sbin/init.d</emphasis> on HP-UX machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
820 extension as you copy the file. <programlisting>
821 # <emphasis role="bold">cp usr/vice/etc/afs.rc /sbin/init.d/afs</emphasis>
822 </programlisting></para>
826 <para>Copy the file <emphasis role="bold">afs.driver</emphasis> to the local <emphasis
827 role="bold">/usr/conf/master.d</emphasis> directory, changing its name to <emphasis role="bold">afs</emphasis> as you
829 # <emphasis role="bold">cp usr/vice/etc/afs.driver /usr/conf/master.d/afs</emphasis>
830 </programlisting></para>
834 <para>Copy the AFS kernel module to the local <emphasis role="bold">/usr/conf/lib</emphasis> directory.</para>
836 <para>If the machine's kernel supports NFS server functionality:</para>
839 # <emphasis role="bold">cp bin/libafs.a /usr/conf/lib</emphasis>
842 <para>If the machine's kernel does not support NFS server functionality, change the file's name as you copy it:</para>
845 # <emphasis role="bold">cp bin/libafs.nonfs.a /usr/conf/lib/libafs.a</emphasis>
850 <para>Incorporate the AFS driver into the kernel, either using the <emphasis role="bold">SAM</emphasis> program or a
851 series of individual commands. <itemizedlist>
853 <para>To use the <emphasis role="bold">SAM</emphasis> program: <orderedlist>
855 <para>Invoke the <emphasis role="bold">SAM</emphasis> program, specifying the hostname of the local machine
856 as <replaceable>local_hostname</replaceable>. The <emphasis role="bold">SAM</emphasis> graphical user
857 interface pops up. <programlisting>
858 # <emphasis role="bold">sam -display</emphasis> <replaceable>local_hostname</replaceable><emphasis role="bold">:0</emphasis>
859 </programlisting></para>
863 <para>Choose the <emphasis role="bold">Kernel Configuration</emphasis> icon, then the <emphasis
864 role="bold">Drivers</emphasis> icon. From the list of drivers, select <emphasis
865 role="bold">afs</emphasis>.</para>
869 <para>Open the pull-down <emphasis role="bold">Actions</emphasis> menu and choose the <emphasis
870 role="bold">Add Driver to Kernel</emphasis> option.</para>
874 <para>Open the <emphasis role="bold">Actions</emphasis> menu again and choose the <emphasis
875 role="bold">Create a New Kernel</emphasis> option.</para>
879 <para>Confirm your choices by choosing <emphasis role="bold">Yes</emphasis> and <emphasis
880 role="bold">OK</emphasis> when prompted by subsequent pop-up windows. The <emphasis
881 role="bold">SAM</emphasis> program builds the kernel and reboots the system.</para>
885 <para>Login again as the superuser <emphasis role="bold">root</emphasis>. <programlisting>
886 login: <emphasis role="bold">root</emphasis>
887 Password: <replaceable>root_password</replaceable>
888 </programlisting></para>
890 </orderedlist></para>
894 <para>To use individual commands: <orderedlist>
896 <para>Edit the file <emphasis role="bold">/stand/system</emphasis>, adding an entry for <emphasis
897 role="bold">afs</emphasis> to the <computeroutput>Subsystems</computeroutput> section.</para>
901 <para>Change to the <emphasis role="bold">/stand/build</emphasis> directory and issue the <emphasis
902 role="bold">mk_kernel</emphasis> command to build the kernel. <programlisting>
903 # <emphasis role="bold">cd /stand/build</emphasis>
904 # <emphasis role="bold">mk_kernel</emphasis>
905 </programlisting></para>
909 <para>Move the new kernel to the standard location (<emphasis role="bold">/stand/vmunix</emphasis>), reboot
910 the machine to start using it, and login again as the superuser <emphasis role="bold">root</emphasis>.
912 # <emphasis role="bold">mv /stand/build/vmunix_test /stand/vmunix</emphasis>
913 # <emphasis role="bold">cd /</emphasis>
914 # <emphasis role="bold">shutdown -r now</emphasis>
915 login: <emphasis role="bold">root</emphasis>
916 Password: <replaceable>root_password</replaceable>
917 </programlisting></para>
919 </orderedlist></para>
921 </itemizedlist></para>
923 </orderedlist></para>
926 <primary>configuring</primary>
928 <secondary>AFS server partition on first AFS machine</secondary>
930 <tertiary>HP-UX</tertiary>
934 <primary>AFS server partition</primary>
936 <secondary>configuring on first AFS machine</secondary>
938 <tertiary>HP-UX</tertiary>
942 <primary>first AFS machine</primary>
944 <secondary>AFS server partition</secondary>
946 <tertiary>on HP-UX</tertiary>
950 <primary>HP-UX</primary>
952 <secondary>AFS server partition</secondary>
954 <tertiary>on first AFS machine</tertiary>
959 <title>Configuring Server Partitions on HP-UX Systems</title>
961 <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
962 server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
963 <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
964 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
965 directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
966 directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific Procedures</link>.
969 <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
970 partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
971 # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
972 </programlisting></para>
976 <para>Use the <emphasis role="bold">SAM</emphasis> program to create a file system on each partition. For instructions,
977 consult the HP-UX documentation.</para>
981 <para>On some HP-UX systems that use logical volumes, the <emphasis role="bold">SAM</emphasis> program automatically
982 mounts the partitions. If it has not, mount each partition by issuing either the <emphasis role="bold">mount
983 -a</emphasis> command to mount all partitions at once or the <emphasis role="bold">mount</emphasis> command to mount
984 each partition in turn.</para>
986 </orderedlist></para>
989 <primary>replacing fsck program</primary>
991 <secondary>first AFS machine</secondary>
993 <tertiary>HP-UX</tertiary>
997 <primary>fsck program</primary>
999 <secondary>on first AFS machine</secondary>
1001 <tertiary>HP-UX</tertiary>
1005 <primary>first AFS machine</primary>
1007 <secondary>fsck program</secondary>
1009 <tertiary>on HP-UX</tertiary>
1013 <primary>HP-UX</primary>
1015 <secondary>fsck program</secondary>
1017 <tertiary>on first AFS machine</tertiary>
1021 <sect2 id="HDRWQ34">
1022 <title>Configuring the AFS-modified fsck Program on HP-UX Systems</title>
1024 <para>In this section, you make modifications to guarantee that the appropriate <emphasis role="bold">fsck</emphasis> program
1025 runs on AFS server partitions. The <emphasis role="bold">fsck</emphasis> program provided with the operating system must never
1026 run on AFS server partitions. Because it does not recognize the structures that the File Server uses to organize volume data,
1027 it removes all of the data. To repeat:</para>
1029 <para><emphasis role="bold">Never run the standard fsck program on AFS server partitions. It discards AFS
1030 volumes.</emphasis></para>
1032 <para>On HP-UX systems, there are several configuration files to install in addition to the AFS-modified <emphasis
1033 role="bold">fsck</emphasis> program (the <emphasis role="bold">vfsck</emphasis> binary). <orderedlist>
1035 <para>Create the command configuration file <emphasis role="bold">/sbin/lib/mfsconfig.d/afs</emphasis>. Use a text
1036 editor to place the indicated two lines in it: <programlisting>
1038 fsck 0 m,P,p,d,f,b:c:y,n,Y,N,q,
1039 </programlisting></para>
1043 <para>Create and change directory to an AFS-specific command directory called <emphasis
1044 role="bold">/sbin/fs/afs</emphasis>. <programlisting>
1045 # <emphasis role="bold">mkdir /sbin/fs/afs</emphasis>
1046 # <emphasis role="bold">cd /sbin/fs/afs</emphasis>
1047 </programlisting></para>
1051 <para>Copy the AFS-modified version of the <emphasis role="bold">fsck</emphasis> program (the <emphasis
1052 role="bold">vfsck</emphasis> binary) and related files from the distribution directory to the new AFS-specific command
1053 directory. <programlisting>
1054 # <emphasis role="bold">cp -p /tmp/afsdist/hp_ux110/root.server/etc/* .</emphasis>
1055 </programlisting></para>
1059 <para>Change the <emphasis role="bold">vfsck</emphasis> binary's name to <emphasis role="bold">fsck</emphasis> and set
1060 the mode bits appropriately on all of the files in the <emphasis role="bold">/sbin/fs/afs</emphasis> directory.
1062 # <emphasis role="bold">mv vfsck fsck</emphasis>
1063 # <emphasis role="bold">chmod 755 *</emphasis>
1064 </programlisting></para>
1068 <para>Edit the <emphasis role="bold">/etc/fstab</emphasis> file, changing the file system type for each AFS server
1069 partition from <computeroutput>hfs</computeroutput> to <computeroutput>afs</computeroutput>. This ensures that the
1070 AFS-modified <emphasis role="bold">fsck</emphasis> program runs on the appropriate partitions.</para>
1072 <para>The sixth line in the following example of an edited file shows an AFS server partition, <emphasis
1073 role="bold">/vicepa</emphasis>.</para>
1076 /dev/vg00/lvol1 / hfs defaults 0 1
1077 /dev/vg00/lvol4 /opt hfs defaults 0 2
1078 /dev/vg00/lvol5 /tmp hfs defaults 0 2
1079 /dev/vg00/lvol6 /usr hfs defaults 0 2
1080 /dev/vg00/lvol8 /var hfs defaults 0 2
1081 /dev/vg00/lvol9 /vicepa afs defaults 0 2
1082 /dev/vg00/lvol7 /usr/vice/cache hfs defaults 0 2
1087 <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
1088 linkend="HDRWQ35">Enabling AFS Login on HP-UX Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
1089 BOS Server</link>.</para>
1091 </orderedlist></para>
1094 <primary>enabling AFS login</primary>
1096 <secondary>file server machine</secondary>
1098 <tertiary>HP-UX</tertiary>
1102 <primary>AFS login</primary>
1104 <secondary>on file server machine</secondary>
1106 <tertiary>HP-UX</tertiary>
1110 <primary>first AFS machine</primary>
1112 <secondary>AFS login</secondary>
1114 <tertiary>on HP-UX</tertiary>
1118 <primary>HP-UX</primary>
1120 <secondary>AFS login</secondary>
1122 <tertiary>on file server machine</tertiary>
1126 <primary>PAM</primary>
1128 <secondary>on HP-UX</secondary>
1130 <tertiary>file server machine</tertiary>
1134 <primary>Pluggable Authentication Module</primary>
1140 <sect2 id="HDRWQ35">
1141 <title>Enabling AFS Login on HP-UX Systems</title>
1143 <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>
1145 <para>At this point you incorporate AFS into the operating system's
1146 Pluggable Authentication Module (PAM) scheme. PAM integrates all
1147 authentication mechanisms on the machine, including login, to
1148 provide the security infrastructure for authenticated access to and
1149 from the machine.</para>
1151 <para>In modern AFS installations, you should be using Kerberos v5
1152 for user login, and obtaining AFS tokens subsequent to this
1153 authentication step. OpenAFS does not currently distribute a PAM
1154 module allowing AFS tokens to be automatically gained at
1155 login. Whilst there are a number of third party modules providing
1156 this functionality, it is not know if these have been tested with
1159 <para>Following login, users can obtain tokens by running the
1160 <emphasis role="bold">aklog</emphasis> command</para>
1162 <para>Sites which still require <emphasis
1163 role="bold">kaserver</emphasis> or external Kerberos v4
1164 authentication should consult <link linkend="KAS013">Enabling
1165 kaserver based AFS login on HP-UX systems</link> for details of how
1166 to enable HP-UX login.</para>
1168 <para>Proceed to <link linkend="HDRWQ50">Starting the BOS
1169 Server</link> (or if referring to these instructions while
1170 installing an additional file server machine, return to <link
1171 linkend="HDRWQ108">Starting Server Programs</link>).</para>
1175 <sect1 id="HDRWQ36">
1176 <title>Getting Started on IRIX Systems</title>
1179 <primary>incorporating AFS kernel extensions</primary>
1181 <secondary>first AFS machine</secondary>
1183 <tertiary>IRIX</tertiary>
1187 <primary>AFS kernel extensions</primary>
1189 <secondary>on first AFS machine</secondary>
1191 <tertiary>IRIX</tertiary>
1195 <primary>first AFS machine</primary>
1197 <secondary>AFS kernel extensions</secondary>
1199 <tertiary>on IRIX</tertiary>
1203 <primary>replacing fsck program</primary>
1205 <secondary>not necessary on IRIX</secondary>
1209 <primary>fsck program</primary>
1211 <secondary>on first AFS machine</secondary>
1213 <tertiary>IRIX</tertiary>
1217 <primary>first AFS machine</primary>
1219 <secondary>fsck program</secondary>
1221 <tertiary>on IRIX</tertiary>
1225 <primary>IRIX</primary>
1227 <secondary>fsck program replacement not necessary</secondary>
1230 <para>To incorporate AFS into the kernel on IRIX systems, choose one of two methods: <itemizedlist>
1232 <para>Run the AFS initialization script to invoke the <emphasis role="bold">ml</emphasis> program distributed by Silicon
1233 Graphics, Incorporated (SGI), which dynamically loads AFS modifications into the kernel</para>
1237 <para>Build a new static kernel</para>
1239 </itemizedlist></para>
1241 <para>Then create partitions for storing AFS volumes. You do not need to replace the IRIX <emphasis role="bold">fsck</emphasis>
1242 program because SGI has already modified it to handle AFS volumes properly. If the machine is to remain an AFS client machine,
1243 verify that the IRIX login utility installed on the machine grants an AFS token.</para>
1245 <para>In preparation for either dynamic loading or kernel building, perform the following procedures: <orderedlist>
1247 <para>Unpack the OpenAFS IRIX distribution tarball. The examples
1248 below assume that you have unpacked the files into the
1249 <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you
1250 pick a different location, substitue this in all of the following
1251 examples. Once you have unpacked the distribution, change directory
1254 # <emphasis role="bold">cd /tmp/afsdist/sgi_65/root.client</emphasis>
1255 </programlisting></para>
1259 <para>Copy the AFS initialization script to the local directory for initialization files (by convention, <emphasis
1260 role="bold">/etc/init.d</emphasis> on IRIX machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
1261 extension as you copy the script. <programlisting>
1262 # <emphasis role="bold">cp -p usr/vice/etc/afs.rc /etc/init.d/afs</emphasis>
1263 </programlisting></para>
1267 <para>Issue the <emphasis role="bold">uname -m</emphasis> command to determine the machine's CPU board type. The <emphasis
1268 role="bold">IP</emphasis><replaceable>xx</replaceable> value in the output must match one of the supported CPU board types
1269 listed in the <emphasis>OpenAFS Release Notes</emphasis> for the current version of AFS. <programlisting>
1270 # <emphasis role="bold">uname -m</emphasis>
1271 </programlisting></para>
1275 <para>Proceed to either <link linkend="HDRWQ37">Loading AFS into the IRIX Kernel</link> or <link
1276 linkend="HDRWQ38">Building AFS into the IRIX Kernel</link>.</para>
1278 </orderedlist></para>
1281 <primary>IRIX</primary>
1283 <secondary>AFS kernel extensions</secondary>
1285 <tertiary>on first AFS machine</tertiary>
1289 <primary>afsml variable (IRIX)</primary>
1291 <secondary>first AFS machine</secondary>
1295 <primary>variables</primary>
1297 <secondary>afsml (IRIX)</secondary>
1299 <tertiary>first AFS machine</tertiary>
1303 <primary>IRIX</primary>
1305 <secondary>afsml variable</secondary>
1307 <tertiary>first AFS machine</tertiary>
1311 <primary>afsxnfs variable (IRIX)</primary>
1313 <secondary>first AFS machine</secondary>
1317 <primary>variables</primary>
1319 <secondary>afsxnfs (IRIX)</secondary>
1321 <tertiary>first AFS machine</tertiary>
1325 <primary>IRIX</primary>
1327 <secondary>afsxnfs variable</secondary>
1329 <tertiary>first AFS machine</tertiary>
1332 <sect2 id="HDRWQ37">
1333 <title>Loading AFS into the IRIX Kernel</title>
1335 <para>The <emphasis role="bold">ml</emphasis> program is the dynamic kernel loader provided by SGI for IRIX systems. If you
1336 use it rather than building AFS modifications into a static kernel, then for AFS to function correctly the <emphasis
1337 role="bold">ml</emphasis> program must run each time the machine reboots. Therefore, the AFS initialization script (included
1338 on the AFS CD-ROM) invokes it automatically when the <emphasis role="bold">afsml</emphasis> configuration variable is
1339 activated. In this section you activate the variable and run the script.</para>
1341 <para>In later sections you verify that the script correctly initializes all AFS components, then create the links that
1342 incorporate AFS into the IRIX startup and shutdown sequence. <orderedlist>
1344 <para>Create the local <emphasis role="bold">/usr/vice/etc/sgiload</emphasis> directory to house the AFS kernel library
1345 file. <programlisting>
1346 # <emphasis role="bold">mkdir /usr/vice/etc/sgiload</emphasis>
1347 </programlisting></para>
1351 <para>Copy the appropriate AFS kernel library file to the <emphasis role="bold">/usr/vice/etc/sgiload</emphasis>
1352 directory. The <emphasis role="bold">IP</emphasis><replaceable>xx</replaceable> portion of the library file name must
1353 match the value previously returned by the <emphasis role="bold">uname -m</emphasis> command. Also choose the file
1354 appropriate to whether the machine's kernel supports NFS server functionality (NFS must be supported for the machine to
1355 act as an NFS/AFS Translator). Single- and multiprocessor machines use the same library file.</para>
1357 <para>(You can choose to copy all of the kernel library files into the <emphasis
1358 role="bold">/usr/vice/etc/sgiload</emphasis> directory, but they require a significant amount of space.)</para>
1360 <para>If the machine's kernel supports NFS server functionality:</para>
1363 # <emphasis role="bold">cp -p usr/vice/etc/sgiload/libafs.IP</emphasis><replaceable>xx</replaceable><emphasis role="bold">.o /usr/vice/etc/sgiload</emphasis>
1366 <para>If the machine's kernel does not support NFS server functionality:</para>
1369 # <emphasis role="bold">cp -p usr/vice/etc/sgiload/libafs.IP</emphasis><replaceable>xx</replaceable><emphasis role="bold">.nonfs.o</emphasis> \
1370 <emphasis role="bold">/usr/vice/etc/sgiload</emphasis>
1375 <para>Issue the <emphasis role="bold">chkconfig</emphasis> command to activate the <emphasis
1376 role="bold">afsml</emphasis> configuration variable. <programlisting>
1377 # <emphasis role="bold">/etc/chkconfig -f afsml on</emphasis>
1378 </programlisting></para>
1380 <para>If the machine is to function as an NFS/AFS Translator and the kernel supports NFS server functionality, activate
1381 the <emphasis role="bold">afsxnfs</emphasis> variable.</para>
1384 # <emphasis role="bold">/etc/chkconfig -f afsxnfs on</emphasis>
1389 <para>Run the <emphasis role="bold">/etc/init.d/afs</emphasis> script to load AFS extensions into the kernel. The script
1390 invokes the <emphasis role="bold">ml</emphasis> command, automatically determining which kernel library file to use
1391 based on this machine's CPU type and the activation state of the <emphasis role="bold">afsxnfs</emphasis>
1394 <para>You can ignore any error messages about the inability to start the BOS Server or the Cache Manager or AFS
1398 # <emphasis role="bold">/etc/init.d/afs start</emphasis>
1403 <para>Proceed to <link linkend="HDRWQ39">Configuring Server Partitions on IRIX Systems</link>.</para>
1405 </orderedlist></para>
1408 <primary>IRIX</primary>
1410 <secondary>AFS-modified kernel</secondary>
1412 <tertiary>on first AFS machine</tertiary>
1416 <sect2 id="HDRWQ38">
1417 <title>Building AFS into the IRIX Kernel</title>
1419 <para>Use the following instructions to build AFS modifications into the kernel on an IRIX system. <orderedlist>
1421 <para>Copy the kernel initialization file <emphasis role="bold">afs.sm</emphasis> to the local <emphasis
1422 role="bold">/var/sysgen/system</emphasis> directory, and the kernel master file <emphasis role="bold">afs</emphasis> to
1423 the local <emphasis role="bold">/var/sysgen/master.d</emphasis> directory. <programlisting>
1424 # <emphasis role="bold">cp -p bin/afs.sm /var/sysgen/system</emphasis>
1425 # <emphasis role="bold">cp -p bin/afs /var/sysgen/master.d</emphasis>
1426 </programlisting></para>
1430 <para>Copy the appropriate AFS kernel library file to the local file <emphasis
1431 role="bold">/var/sysgen/boot/afs.a</emphasis>; the <emphasis role="bold">IP</emphasis><replaceable>xx</replaceable>
1432 portion of the library file name must match the value previously returned by the <emphasis role="bold">uname
1433 -m</emphasis> command. Also choose the file appropriate to whether the machine's kernel supports NFS server
1434 functionality (NFS must be supported for the machine to act as an NFS/AFS Translator). Single- and multiprocessor
1435 machines use the same library file.</para>
1437 <para>If the machine's kernel supports NFS server functionality:</para>
1440 # <emphasis role="bold">cp -p bin/libafs.IP</emphasis><replaceable>xx</replaceable><emphasis role="bold">.a /var/sysgen/boot/afs.a</emphasis>
1443 <para>If the machine's kernel does not support NFS server functionality:</para>
1446 # <emphasis role="bold">cp -p bin/libafs.IP</emphasis><replaceable>xx</replaceable><emphasis role="bold">.nonfs.a /var/sysgen/boot/afs.a</emphasis>
1451 <para>Issue the <emphasis role="bold">chkconfig</emphasis> command to deactivate the <emphasis
1452 role="bold">afsml</emphasis> configuration variable. <programlisting>
1453 # <emphasis role="bold">/etc/chkconfig -f afsml off</emphasis>
1454 </programlisting></para>
1456 <para>If the machine is to function as an NFS/AFS Translator and the kernel supports NFS server functionality, activate
1457 the <emphasis role="bold">afsxnfs</emphasis> variable.</para>
1460 # <emphasis role="bold">/etc/chkconfig -f afsxnfs on</emphasis>
1465 <para>Copy the existing kernel file, <emphasis role="bold">/unix</emphasis>, to a safe location. Compile the new kernel,
1466 which is created in the file <emphasis role="bold">/unix.install</emphasis>. It overwrites the existing <emphasis
1467 role="bold">/unix</emphasis> file when the machine reboots in the next step. <programlisting>
1468 # <emphasis role="bold">cp /unix /unix_noafs</emphasis>
1469 # <emphasis role="bold">autoconfig</emphasis>
1470 </programlisting></para>
1474 <para>Reboot the machine to start using the new kernel, and login again as the superuser <emphasis
1475 role="bold">root</emphasis>. <programlisting>
1476 # <emphasis role="bold">cd /</emphasis>
1477 # <emphasis role="bold">shutdown -i6 -g0 -y</emphasis>
1478 login: <emphasis role="bold">root</emphasis>
1479 Password: <replaceable>root_password</replaceable>
1480 </programlisting></para>
1482 </orderedlist></para>
1485 <primary>configuring</primary>
1487 <secondary>AFS server partition on first AFS machine</secondary>
1489 <tertiary>IRIX</tertiary>
1493 <primary>AFS server partition</primary>
1495 <secondary>configuring on first AFS machine</secondary>
1497 <tertiary>IRIX</tertiary>
1501 <primary>first AFS machine</primary>
1503 <secondary>AFS server partition</secondary>
1505 <tertiary>on IRIX</tertiary>
1509 <primary>IRIX</primary>
1511 <secondary>AFS server partition</secondary>
1513 <tertiary>on first AFS machine</tertiary>
1517 <sect2 id="HDRWQ39">
1518 <title>Configuring Server Partitions on IRIX Systems</title>
1520 <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
1521 server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
1522 <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
1523 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
1524 directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
1525 directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific
1526 Procedures</link>.</para>
1528 <para>AFS supports use of both EFS and XFS partitions for housing AFS volumes. SGI encourages use of XFS partitions.
1531 <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
1532 partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
1533 # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
1534 </programlisting></para>
1538 <para>Add a line with the following format to the file systems registry file, <emphasis
1539 role="bold">/etc/fstab</emphasis>, for each partition (or logical volume created with the XLV volume manager) to be
1540 mounted on one of the directories created in the previous step.</para>
1542 <para>For an XFS partition or logical volume:</para>
1545 /dev/dsk/<replaceable>disk</replaceable> /vicep<replaceable>xx</replaceable> xfs rw,raw=/dev/rdsk/<replaceable>disk</replaceable> 0 0
1548 <para>For an EFS partition:</para>
1551 /dev/dsk/<replaceable>disk</replaceable> /vicep<replaceable>xx</replaceable> efs rw,raw=/dev/rdsk/<replaceable>disk</replaceable> 0 0
1554 <para>The following are examples of an entry for each file system type:</para>
1557 /dev/dsk/dks0d2s6 /vicepa xfs rw,raw=/dev/rdsk/dks0d2s6 0 0
1558 /dev/dsk/dks0d3s1 /vicepb efs rw,raw=/dev/rdsk/dks0d3s1 0 0
1563 <para>Create a file system on each partition that is to be mounted on a <emphasis
1564 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directory. The following commands are probably appropriate,
1565 but consult the IRIX documentation for more information. In both cases, <replaceable>raw_device</replaceable> is a raw
1566 device name like <emphasis role="bold">/dev/rdsk/dks0d0s0</emphasis> for a single disk partition or <emphasis
1567 role="bold">/dev/rxlv/xlv0</emphasis> for a logical volume.</para>
1569 <para>For XFS file systems, include the indicated options to configure the partition or logical volume with inodes large
1570 enough to accommodate AFS-specific information:</para>
1573 # <emphasis role="bold">mkfs -t xfs -i size=512 -l size=4000b</emphasis> <replaceable>raw_device</replaceable>
1576 <para>For EFS file systems:</para>
1579 # <emphasis role="bold">mkfs -t efs</emphasis> <replaceable>raw_device</replaceable>
1584 <para>Mount each partition by issuing either the <emphasis role="bold">mount -a</emphasis> command to mount all
1585 partitions at once or the <emphasis role="bold">mount</emphasis> command to mount each partition in turn.</para>
1589 <para><emphasis role="bold">(Optional)</emphasis> If you have configured partitions or logical volumes to use XFS, issue
1590 the following command to verify that the inodes are configured properly (are large enough to accommodate AFS-specific
1591 information). If the configuration is correct, the command returns no output. Otherwise, it specifies the command to run
1592 in order to configure each partition or logical volume properly. <programlisting>
1593 # <emphasis role="bold">/usr/afs/bin/xfs_size_check</emphasis>
1594 </programlisting></para>
1598 <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
1599 linkend="HDRWQ40">Enabling AFS Login on IRIX Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
1600 BOS Server</link>.</para>
1602 </orderedlist></para>
1605 <primary>enabling AFS login</primary>
1607 <secondary>file server machine</secondary>
1609 <tertiary>IRIX</tertiary>
1613 <primary>AFS login</primary>
1615 <secondary>on file server machine</secondary>
1617 <tertiary>IRIX</tertiary>
1621 <primary>first AFS machine</primary>
1623 <secondary>AFS login</secondary>
1625 <tertiary>on IRIX</tertiary>
1629 <primary>IRIX</primary>
1631 <secondary>AFS login</secondary>
1635 <sect2 id="HDRWQ40">
1636 <title>Enabling AFS Login on IRIX Systems</title>
1639 <para>If you plan to remove client functionality from this machine after completing the installation, skip this section and
1640 proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1643 <para>Whilst the standard IRIX command-line
1644 <emphasis role="bold">login</emphasis> program and the
1645 graphical <emphasis role="bold">xdm</emphasis> login program both have
1646 the ability to grant AFS tokens, this ability relies upon the deprecated
1647 kaserver authentication system.</para>
1649 <para>Users who have been successfully authenticated via Kerberos 5
1650 authentication may obtain AFS tokens following login by running the
1651 <emphasis role="bold">aklog</emphasis> command.</para>
1653 <para>Sites which still require <emphasis role="bold">kaserver</emphasis>
1654 or external Kerberos v4 authentication should consult
1655 <link linkend="KAS014">Enabling kaserver based AFS Login on IRIX Systems</link>
1656 for details of how to enable IRIX login.</para>
1658 <para>After taking any necessary action, proceed to
1659 <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1663 <sect1 id="HDRWQ41">
1664 <title>Getting Started on Linux Systems</title>
1667 <primary>replacing fsck program</primary>
1669 <secondary>not necessary on Linux</secondary>
1673 <primary>fsck program</primary>
1675 <secondary>on first AFS machine</secondary>
1677 <tertiary>Linux</tertiary>
1681 <primary>first AFS machine</primary>
1683 <secondary>fsck program</secondary>
1685 <tertiary>on Linux</tertiary>
1689 <primary>Linux</primary>
1691 <secondary>fsck program replacement not necessary</secondary>
1694 <para>Since this guide was originally written, the procedure for starting
1695 OpenAFS has diverged significantly between different Linux distributions.
1696 The instructions that follow are appropriate for both the Fedora and
1697 RedHat Enterprise Linux packages distributed by OpenAFS. Additional
1698 instructions are provided for those building from source.</para>
1700 <para>Begin by running the AFS client startup scripts, which call the
1701 <emphasis role="bold">modprobe</emphasis> program to dynamically
1702 load the AFS modifications into the kernel. Then create partitions for
1703 storing AFS volumes. You do not need to replace the Linux <emphasis
1704 role="bold">fsck</emphasis> program. If the machine is to remain an
1705 AFS client machine, incorporate AFS into the machine's Pluggable
1706 Authentication Module (PAM) scheme. <indexterm>
1707 <primary>incorporating AFS kernel extensions</primary>
1709 <secondary>first AFS machine</secondary>
1711 <tertiary>Linux</tertiary>
1712 </indexterm> <indexterm>
1713 <primary>AFS kernel extensions</primary>
1715 <secondary>on first AFS machine</secondary>
1717 <tertiary>Linux</tertiary>
1718 </indexterm> <indexterm>
1719 <primary>first AFS machine</primary>
1721 <secondary>AFS kernel extensions</secondary>
1723 <tertiary>on Linux</tertiary>
1724 </indexterm> <indexterm>
1725 <primary>Linux</primary>
1727 <secondary>AFS kernel extensions</secondary>
1729 <tertiary>on first AFS machine</tertiary>
1732 <sect2 id="HDRWQ42">
1733 <title>Loading AFS into the Linux Kernel</title>
1735 <para>The <emphasis role="bold">modprobe</emphasis> program is the dynamic kernel loader for Linux. Linux does not support
1736 incorporation of AFS modifications during a kernel build.</para>
1738 <para>For AFS to function correctly, the <emphasis role="bold">modprobe</emphasis> program must run each time the machine
1739 reboots, so your distribution's AFS initialization script invokes it automatically. The script also includes
1740 commands that select the appropriate AFS library file automatically. In this section you run the script.</para>
1742 <para>In later sections you verify that the script correctly initializes all AFS components, then activate a configuration
1743 variable, which results in the script being incorporated into the Linux startup and shutdown sequence.</para>
1745 <para>The procedure for starting up OpenAFS depends upon your distribution</para>
1747 <title>Fedora and RedHat Enterprise Linux</title>
1748 <para>OpenAFS provides RPMS for all current Fedora and RedHat Enterprise Linux (RHEL) releases on the OpenAFS web site and the OpenAFS yum repository.
1752 http://dl.openafs.org/dl/openafs/<replaceable>VERSION</replaceable>,
1753 where VERSION is the latest stable release of
1754 OpenAFS. Download the
1755 openafs-repository-<replaceable>VERSION</replaceable>.noarch.rpm
1756 file for Fedora systems or the
1757 openafs-repository-rhel-<replaceable>VERSION</replaceable>.noarch.rpm
1758 file for RedHat-based systems.
1762 <para>Install the downloaded RPM file using the following command:
1764 # rpm -U openafs-repository*.rpm
1769 <para>Install the RPM set for your operating system using the yum command as follows:
1771 # yum -y install openafs-client openafs-server openafs-krb5 kmod-openafs
1775 <para>Alternatively, you may use dynamically-compiled kernel
1776 modules if you have the kernel headers, a compiler, and the
1778 <ulink url="http://fedoraproject.org/wiki/EPEL"><citetitle>EPEL</citetitle></ulink> installed.
1781 <para>To use dynamically-compiled kernel modules instead of statically compiled modules, use the following command instead of the kmod-openafs as shown above:
1783 # yum install openafs-client openafs-server openafs-krb5 dkms-openafs
1787 <!-- If you do this with current RHEL and Fedora releases you end up with
1788 a dynroot'd client running - this breaks setting up the root.afs volume
1789 as described later in this guide
1791 <para>Run the AFS initialization script to load AFS extensions into
1792 the kernel. You can ignore any error messages about the inability
1793 to start the BOS Server or the Cache Manager or AFS client.</para>
1795 # <emphasis role="bold">/etc/rc.d/init.d/openafs-client start</emphasis>
1803 <title>Systems packaged as tar files</title>
1804 <para>If you are running a system where the OpenAFS Binary Distribution
1805 is provided as a tar file, or where you have built the system from
1806 source yourself, you need to install the relevant components by hand
1811 <para>Unpack the distribution tarball. The examples below assume
1812 that you have unpacked the files into the
1813 <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you
1814 pick a different location, substitute this in all of the following
1815 examples. Once you have unpacked the distribution,
1816 change directory as indicated.
1818 # <emphasis role="bold">cd /tmp/afsdist/linux/root.client/usr/vice/etc</emphasis>
1819 </programlisting></para>
1823 <para>Copy the AFS kernel library files to the local <emphasis role="bold">/usr/vice/etc/modload</emphasis> directory.
1824 The filenames for the libraries have the format <emphasis
1825 role="bold">libafs-</emphasis><replaceable>version</replaceable><emphasis role="bold">.o</emphasis>, where
1826 <replaceable>version</replaceable> indicates the kernel build level. The string <emphasis role="bold">.mp</emphasis> in
1827 the <replaceable>version</replaceable> indicates that the file is appropriate for machines running a multiprocessor
1828 kernel. <programlisting>
1829 # <emphasis role="bold">cp -rp modload /usr/vice/etc</emphasis>
1830 </programlisting></para>
1834 <para>Copy the AFS initialization script to the local directory for initialization files (by convention, <emphasis
1835 role="bold">/etc/rc.d/init.d</emphasis> on Linux machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
1836 extension as you copy the script. <programlisting>
1837 # <emphasis role="bold">cp -p afs.rc /etc/rc.d/init.d/afs</emphasis>
1838 </programlisting></para>
1841 <!-- I don't think we need to do this for Linux, and it complicates things if
1842 dynroot is enabled ...
1844 <para>Run the AFS initialization script to load AFS extensions into the kernel. You can ignore any error messages about
1845 the inability to start the BOS Server or the Cache Manager or AFS client.</para>
1847 # <emphasis role="bold">/etc/rc.d/init.d/afs start</emphasis>
1854 <primary>configuring</primary>
1856 <secondary>AFS server partition on first AFS machine</secondary>
1858 <tertiary>Linux</tertiary>
1862 <primary>AFS server partition</primary>
1864 <secondary>configuring on first AFS machine</secondary>
1866 <tertiary>Linux</tertiary>
1870 <primary>first AFS machine</primary>
1872 <secondary>AFS server partition</secondary>
1874 <tertiary>on Linux</tertiary>
1878 <primary>Linux</primary>
1880 <secondary>AFS server partition</secondary>
1882 <tertiary>on first AFS machine</tertiary>
1887 <sect2 id="HDRWQ43">
1888 <title>Configuring Server Partitions on Linux Systems</title>
1890 <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
1891 server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
1892 <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
1893 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
1894 directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
1895 directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific Procedures</link>.
1898 <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
1899 partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
1900 # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
1901 </programlisting></para>
1905 <para>Add a line with the following format to the file systems registry file, <emphasis
1906 role="bold">/etc/fstab</emphasis>, for each directory just created. The entry maps the directory name to the disk
1907 partition to be mounted on it. <programlisting>
1908 /dev/<replaceable>disk</replaceable> /vicep<replaceable>xx</replaceable> ext2 defaults 0 2
1909 </programlisting></para>
1911 <para>The following is an example for the first partition being configured.</para>
1914 /dev/sda8 /vicepa ext2 defaults 0 2
1919 <para>Create a file system on each partition that is to be mounted at a <emphasis
1920 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directory. The following command is probably appropriate, but
1921 consult the Linux documentation for more information. <programlisting>
1922 # <emphasis role="bold">mkfs -v /dev/</emphasis><replaceable>disk</replaceable>
1923 </programlisting></para>
1927 <para>Mount each partition by issuing either the <emphasis role="bold">mount -a</emphasis> command to mount all
1928 partitions at once or the <emphasis role="bold">mount</emphasis> command to mount each partition in turn.</para>
1932 <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
1933 linkend="HDRWQ44">Enabling AFS Login on Linux Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
1934 BOS Server</link>.</para>
1936 </orderedlist></para>
1939 <primary>enabling AFS login</primary>
1941 <secondary>file server machine</secondary>
1943 <tertiary>Linux</tertiary>
1947 <primary>AFS login</primary>
1949 <secondary>on file server machine</secondary>
1951 <tertiary>Linux</tertiary>
1955 <primary>first AFS machine</primary>
1957 <secondary>AFS login</secondary>
1959 <tertiary>on Linux</tertiary>
1963 <primary>Linux</primary>
1965 <secondary>AFS login</secondary>
1967 <tertiary>on file server machine</tertiary>
1971 <primary>PAM</primary>
1973 <secondary>on Linux</secondary>
1975 <tertiary>file server machine</tertiary>
1979 <sect2 id="HDRWQ44">
1980 <title>Enabling AFS Login on Linux Systems</title>
1983 <para>If you plan to remove client functionality from this machine
1984 after completing the installation, skip this section and proceed
1985 to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1988 <para>At this point you incorporate AFS into the operating system's
1989 Pluggable Authentication Module (PAM) scheme. PAM integrates all
1990 authentication mechanisms on the machine, including login, to provide
1991 the security infrastructure for authenticated access to and from the
1994 <para>You should first configure your system to obtain Kerberos v5
1995 tickets as part of the authentication process, and then run an AFS PAM
1996 module to obtain tokens from those tickets after authentication. Many
1997 Linux distributions come with a Kerberos v5 PAM module (usually called
1998 pam-krb5 or pam_krb5), or you can download and install <ulink
1999 url="http://www.eyrie.org/~eagle/software/pam-krb5">Russ Allbery's
2000 Kerberos v5 PAM module</ulink>, which is tested regularly with AFS.
2001 See the instructions of whatever PAM module you use for how to
2002 configure it.</para>
2004 <para>Some Kerberos v5 PAM modules do come with native AFS support
2005 (usually requiring the Heimdal Kerberos implementation rather than the
2006 MIT Kerberos implementation). If you are using one of those PAM
2007 modules, you can configure it to obtain AFS tokens. It's more common,
2008 however, to separate the AFS token acquisition into a separate PAM
2011 <para>The recommended AFS PAM module is <ulink
2012 url="http://www.eyrie.org/~eagle/software/pam-afs-session/">Russ
2013 Allbery's pam-afs-session module</ulink>. It should work with any of
2014 the Kerberos v5 PAM modules. To add it to the PAM configuration, you
2015 often only need to add configuration to the session group:</para>
2018 <title>Linux PAM session example</title>
2019 <literallayout>session required pam_afs_session.so</literallayout>
2022 <para>If you also want to obtain AFS tokens for <command>scp</command>
2023 and similar commands that don't open a session, you will also need to
2024 add the AFS PAM module to the auth group so that the PAM
2025 <function>setcred</function> call will obtain tokens. The
2026 <literal>pam_afs_session</literal> module will always return success
2027 for authentication so that it can be added to the auth group only for
2028 <function>setcred</function>, so make sure that it's not marked as
2029 <literal>sufficient</literal>.</para>
2032 <title>Linux PAM auth example</title>
2033 <literallayout>auth [success=ok default=1] pam_krb5.so
2034 auth [default=done] pam_afs_session.so
2035 auth required pam_unix.so try_first_pass</literallayout>
2038 <para>This example will work if you want to try Kerberos v5 first and
2039 then fall back to regular Unix authentication.
2040 <literal>success=ok</literal> for the Kerberos PAM module followed by
2041 <literal>default=done</literal> for the AFS PAM module will cause a
2042 successful Kerberos login to run the AFS PAM module and then skip the
2043 Unix authentication module. <literal>default=1</literal> on the
2044 Kerberos PAM module causes failure of that module to skip the next
2045 module (the AFS PAM module) and fall back to the Unix module. If you
2046 want to try Unix authentication first and rearrange the order, be sure
2047 to use <literal>default=die</literal> instead.</para>
2049 <para>The PAM configuration is stored in different places in different
2050 Linux distributions. On Red Hat, look in
2051 <filename>/etc/pam.d/system-auth</filename>. On Debian and
2052 derivatives, look in <filename>/etc/pam.d/common-session</filename>
2053 and <filename>/etc/pam.d/common-auth</filename>.</para>
2055 <para>For additional configuration examples and the configuration
2056 options of the AFS PAM module, see its documentation. For more
2057 details on the available options for the PAM configuration, see the
2058 Linux PAM documentation.</para>
2060 <para>Sites which still require <command>kaserver</command> or
2061 external Kerberos v4 authentication should consult <link
2062 linkend="KAS015">Enabling kaserver based AFS Login on Linux
2063 Systems</link> for details of how to enable AFS login on Linux.</para>
2065 <para>Proceed to <link linkend="HDRWQ50">Starting the BOS
2066 Server</link> (or if referring to these instructions while installing
2067 an additional file server machine, return to <link
2068 linkend="HDRWQ108">Starting Server Programs</link>).</para>
2072 <sect1 id="HDRWQ45">
2073 <title>Getting Started on Solaris Systems</title>
2075 <para>Begin by running the AFS initialization script to call the <emphasis role="bold">modload</emphasis> program distributed by
2076 Sun Microsystems, which dynamically loads AFS modifications into the kernel. Then create partitions for storing AFS volumes, and
2077 install and configure the AFS-modified <emphasis role="bold">fsck</emphasis> program to run on AFS server partitions. If the
2078 machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable Authentication Module (PAM) scheme.
2080 <primary>incorporating AFS kernel extensions</primary>
2082 <secondary>first AFS machine</secondary>
2084 <tertiary>Solaris</tertiary>
2085 </indexterm> <indexterm>
2086 <primary>AFS kernel extensions</primary>
2088 <secondary>on first AFS machine</secondary>
2090 <tertiary>Solaris</tertiary>
2091 </indexterm> <indexterm>
2092 <primary>first AFS machine</primary>
2094 <secondary>AFS kernel extensions</secondary>
2096 <tertiary>on Solaris</tertiary>
2097 </indexterm> <indexterm>
2098 <primary>Solaris</primary>
2100 <secondary>AFS kernel extensions</secondary>
2102 <tertiary>on first AFS machine</tertiary>
2105 <sect2 id="HDRWQ46">
2106 <title>Loading AFS into the Solaris Kernel</title>
2108 <para>The <emphasis role="bold">modload</emphasis> program is the dynamic kernel loader provided by Sun Microsystems for
2109 Solaris systems. Solaris does not support incorporation of AFS modifications during a kernel build.</para>
2111 <para>For AFS to function correctly, the <emphasis role="bold">modload</emphasis> program must run each time the machine
2112 reboots, so the AFS initialization script (included on the AFS CD-ROM) invokes it automatically. In this section you copy the
2113 appropriate AFS library file to the location where the <emphasis role="bold">modload</emphasis> program accesses it and then
2114 run the script.</para>
2116 <para>In later sections you verify that the script correctly initializes all AFS components, then create the links that
2117 incorporate AFS into the Solaris startup and shutdown sequence. <orderedlist>
2119 <para>Unpack the OpenAFS Solaris distribution tarball. The examples
2120 below assume that you have unpacked the files into the
2121 <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you
2122 pick a diferent location, substitute this in all of the following
2123 exmaples. Once you have unpacked the distribution, change directory
2126 # <emphasis role="bold">cd /tmp/afsdist/sun4x_56/root.client/usr/vice/etc</emphasis>
2127 </programlisting></para>
2131 <para>Copy the AFS initialization script to the local directory for initialization files (by convention, <emphasis
2132 role="bold">/etc/init.d</emphasis> on Solaris machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
2133 extension as you copy the script. <programlisting>
2134 # <emphasis role="bold">cp -p afs.rc /etc/init.d/afs</emphasis>
2135 </programlisting></para>
2139 <para>Copy the appropriate AFS kernel library file to the local file <emphasis
2140 role="bold">/kernel/fs/afs</emphasis>.</para>
2142 <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, its kernel supports NFS server
2143 functionality, and the <emphasis role="bold">nfsd</emphasis> process is running:</para>
2146 # <emphasis role="bold">cp -p modload/libafs.o /kernel/fs/afs</emphasis>
2149 <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, and its kernel does not support NFS
2150 server functionality or the <emphasis role="bold">nfsd</emphasis> process is not running:</para>
2153 # <emphasis role="bold">cp -p modload/libafs.nonfs.o /kernel/fs/afs</emphasis>
2156 <para>If the machine is running the 64-bit version of Solaris 7, its kernel supports NFS server functionality, and the
2157 <emphasis role="bold">nfsd</emphasis> process is running:</para>
2160 # <emphasis role="bold">cp -p modload/libafs64.o /kernel/fs/sparcv9/afs</emphasis>
2163 <para>If the machine is running the 64-bit version of Solaris 7, and its kernel does not support NFS server
2164 functionality or the <emphasis role="bold">nfsd</emphasis> process is not running:</para>
2167 # <emphasis role="bold">cp -p modload/libafs64.nonfs.o /kernel/fs/sparcv9/afs</emphasis>
2172 <para>Run the AFS initialization script to load AFS modifications into the kernel. You can ignore any error messages
2173 about the inability to start the BOS Server or the Cache Manager or AFS client. <programlisting>
2174 # <emphasis role="bold">/etc/init.d/afs start</emphasis>
2175 </programlisting></para>
2177 <para>When an entry called <computeroutput>afs</computeroutput> does not already exist in the local <emphasis
2178 role="bold">/etc/name_to_sysnum</emphasis> file, the script automatically creates it and reboots the machine to start
2179 using the new version of the file. If this happens, log in again as the superuser <emphasis role="bold">root</emphasis>
2180 after the reboot and run the initialization script again. This time the required entry exists in the <emphasis
2181 role="bold">/etc/name_to_sysnum</emphasis> file, and the <emphasis role="bold">modload</emphasis> program runs.</para>
2184 login: <emphasis role="bold">root</emphasis>
2185 Password: <replaceable>root_password</replaceable>
2186 # <emphasis role="bold">/etc/init.d/afs start</emphasis>
2189 </orderedlist></para>
2192 <primary>replacing fsck program</primary>
2194 <secondary>first AFS machine</secondary>
2196 <tertiary>Solaris</tertiary>
2200 <primary>fsck program</primary>
2202 <secondary>on first AFS machine</secondary>
2204 <tertiary>Solaris</tertiary>
2208 <primary>first AFS machine</primary>
2210 <secondary>fsck program</secondary>
2212 <tertiary>on Solaris</tertiary>
2216 <primary>Solaris</primary>
2218 <secondary>fsck program</secondary>
2220 <tertiary>on first AFS machine</tertiary>
2224 <sect2 id="HDRWQ47">
2225 <title>Configuring the AFS-modified fsck Program on Solaris Systems</title>
2227 <para>In this section, you make modifications to guarantee that the appropriate <emphasis role="bold">fsck</emphasis> program
2228 runs on AFS server partitions. The <emphasis role="bold">fsck</emphasis> program provided with the operating system must never
2229 run on AFS server partitions. Because it does not recognize the structures that the File Server uses to organize volume data,
2230 it removes all of the data. To repeat:</para>
2232 <para><emphasis role="bold">Never run the standard fsck program on AFS server partitions. It discards AFS volumes.</emphasis>
2235 <para>Create the <emphasis role="bold">/usr/lib/fs/afs</emphasis> directory to house the AFS-modified <emphasis
2236 role="bold">fsck</emphasis> program and related files. <programlisting>
2237 # <emphasis role="bold">mkdir /usr/lib/fs/afs</emphasis>
2238 # <emphasis role="bold">cd /usr/lib/fs/afs</emphasis>
2239 </programlisting></para>
2243 <para>Copy the <emphasis role="bold">vfsck</emphasis> binary to the newly created directory, changing the name as you do
2244 so. <programlisting>
2245 # <emphasis role="bold">cp /tmp/afsdist/sun4x_56/root.server/etc/vfsck fsck</emphasis>
2246 </programlisting></para>
2250 <para>Working in the <emphasis role="bold">/usr/lib/fs/afs</emphasis> directory, create the following links to Solaris
2251 libraries: <programlisting>
2252 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/clri</emphasis>
2253 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/df</emphasis>
2254 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/edquota</emphasis>
2255 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ff</emphasis>
2256 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fsdb</emphasis>
2257 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fsirand</emphasis>
2258 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fstyp</emphasis>
2259 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/labelit</emphasis>
2260 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/lockfs</emphasis>
2261 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/mkfs</emphasis>
2262 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/mount</emphasis>
2263 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ncheck</emphasis>
2264 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/newfs</emphasis>
2265 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quot</emphasis>
2266 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quota</emphasis>
2267 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quotaoff</emphasis>
2268 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quotaon</emphasis>
2269 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/repquota</emphasis>
2270 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/tunefs</emphasis>
2271 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ufsdump</emphasis>
2272 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ufsrestore</emphasis>
2273 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/volcopy</emphasis>
2274 </programlisting></para>
2278 <para>Append the following line to the end of the file <emphasis role="bold">/etc/dfs/fstypes</emphasis>.
2281 </programlisting></para>
2285 <para>Edit the <emphasis role="bold">/sbin/mountall</emphasis> file, making two changes. <itemizedlist>
2287 <para>Add an entry for AFS to the <computeroutput>case</computeroutput> statement for option 2, so that it reads
2288 as follows: <programlisting>
2290 ufs) foptions="-o p"
2292 afs) foptions="-o p"
2294 s5) foptions="-y -t /var/tmp/tmp$$ -D"
2298 </programlisting></para>
2302 <para>Edit the file so that all AFS and UFS partitions are checked in parallel. Replace the following section of
2303 code: <programlisting>
2304 # For fsck purposes, we make a distinction between ufs and
2305 # other file systems
2307 if [ "$fstype" = "ufs" ]; then
2308 ufs_fscklist="$ufs_fscklist $fsckdev"
2309 saveentry $fstype "$OPTIONS" $special $mountp
2312 </programlisting></para>
2314 <para>with the following section of code:</para>
2317 # For fsck purposes, we make a distinction between ufs/afs
2318 # and other file systems.
2320 if [ "$fstype" = "ufs" -o "$fstype" = "afs" ]; then
2321 ufs_fscklist="$ufs_fscklist $fsckdev"
2322 saveentry $fstype "$OPTIONS" $special $mountp
2327 </itemizedlist></para>
2329 </orderedlist></para>
2332 <primary>configuring</primary>
2334 <secondary>AFS server partition on first AFS machine</secondary>
2336 <tertiary>Solaris</tertiary>
2340 <primary>AFS server partition</primary>
2342 <secondary>configuring on first AFS machine</secondary>
2344 <tertiary>Solaris</tertiary>
2348 <primary>first AFS machine</primary>
2350 <secondary>AFS server partition</secondary>
2352 <tertiary>on Solaris</tertiary>
2356 <primary>Solaris</primary>
2358 <secondary>AFS server partition</secondary>
2360 <tertiary>on first AFS machine</tertiary>
2364 <sect2 id="HDRWQ48">
2365 <title>Configuring Server Partitions on Solaris Systems</title>
2367 <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
2368 server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
2369 <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
2370 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
2371 directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
2372 directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific Procedures</link>.
2375 <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
2376 partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
2377 # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
2378 </programlisting></para>
2382 <para>Add a line with the following format to the file systems registry file, <emphasis
2383 role="bold">/etc/vfstab</emphasis>, for each partition to be mounted on a directory created in the previous step. Note
2384 the value <computeroutput>afs</computeroutput> in the fourth field, which tells Solaris to use the AFS-modified
2385 <emphasis role="bold">fsck</emphasis> program on this partition. <programlisting>
2386 /dev/dsk/<replaceable>disk</replaceable> /dev/rdsk/<replaceable>disk</replaceable> /vicep<replaceable>xx</replaceable> afs <replaceable>boot_order</replaceable> yes
2387 </programlisting></para>
2389 <para>The following is an example for the first partition being configured.</para>
2392 /dev/dsk/c0t6d0s1 /dev/rdsk/c0t6d0s1 /vicepa afs 3 yes
2397 <para>Create a file system on each partition that is to be mounted at a <emphasis
2398 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directory. The following command is probably appropriate, but
2399 consult the Solaris documentation for more information. <programlisting>
2400 # <emphasis role="bold">newfs -v /dev/rdsk/</emphasis><replaceable>disk</replaceable>
2401 </programlisting></para>
2405 <para>Issue the <emphasis role="bold">mountall</emphasis> command to mount all partitions at once.</para>
2409 <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
2410 linkend="HDRWQ49">Enabling AFS Login and Editing the File Systems Clean-up Script on Solaris Systems</link>. Otherwise,
2411 proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
2413 </orderedlist></para>
2416 <sect2 id="HDRWQ49">
2417 <title>Enabling AFS Login on Solaris Systems</title>
2419 <primary>enabling AFS login</primary>
2421 <secondary>file server machine</secondary>
2423 <tertiary>Solaris</tertiary>
2427 <primary>AFS login</primary>
2429 <secondary>on file server machine</secondary>
2431 <tertiary>Solaris</tertiary>
2435 <primary>first AFS machine</primary>
2437 <secondary>AFS login</secondary>
2439 <tertiary>on Solaris</tertiary>
2443 <primary>Solaris</primary>
2445 <secondary>AFS login</secondary>
2447 <tertiary>on file server machine</tertiary>
2451 <primary>PAM</primary>
2453 <secondary>on Solaris</secondary>
2455 <tertiary>file server machine</tertiary>
2459 <para>If you plan to remove client functionality from this machine after completing the installation, skip this section and
2460 proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
2463 <para>At this point you incorporate AFS into the operating system's
2464 Pluggable Authentication Module (PAM) scheme. PAM integrates all
2465 authentication mechanisms on the machine, including login, to provide
2466 the security infrastructure for authenticated access to and from the
2469 <para>Explaining PAM is beyond the scope of this document. It is
2470 assumed that you understand the syntax and meanings of settings in the
2471 PAM configuration file (for example, how the
2472 <computeroutput>other</computeroutput> entry works, the effect of
2473 marking an entry as <computeroutput>required</computeroutput>,
2474 <computeroutput>optional</computeroutput>, or
2475 <computeroutput>sufficient</computeroutput>, and so on).</para>
2477 <para>You should first configure your system to obtain Kerberos v5
2478 tickets as part of the authentication process, and then run an AFS PAM
2479 module to obtain tokens from those tickets after authentication.
2480 Current versions of Solaris come with a Kerberos v5 PAM module that
2481 will work, or you can download and install <ulink
2482 url="http://www.eyrie.org/~eagle/software/pam-krb5">Russ Allbery's
2483 Kerberos v5 PAM module</ulink>, which is tested regularly with AFS.
2484 See the instructions of whatever PAM module you use for how to
2485 configure it.</para>
2487 <para>Some Kerberos v5 PAM modules do come with native AFS support
2488 (usually requiring the Heimdal Kerberos implementation rather than the
2489 MIT Kerberos implementation). If you are using one of those PAM
2490 modules, you can configure it to obtain AFS tokens. It's more common,
2491 however, to separate the AFS token acquisition into a separate PAM
2494 <para>The recommended AFS PAM module is <ulink
2495 url="http://www.eyrie.org/~eagle/software/pam-afs-session/">Russ
2496 Allbery's pam-afs-session module</ulink>. It should work with any of
2497 the Kerberos v5 PAM modules. To add it to the PAM configuration, you
2498 often only need to add configuration to the session group in
2499 <filename>pam.conf</filename>:</para>
2502 <title>Solaris PAM session example</title>
2503 <literallayout>login session required pam_afs_session.so</literallayout>
2506 <para>This example enables PAM authentication only for console login.
2507 You may want to add a similar line for the ssh service and for any
2508 other login service that you use, including possibly the
2509 <literal>other</literal> service (which serves as a catch-all). You
2510 may also want to add options to the AFS PAM session module
2511 (particularly <literal>retain_after_close</literal>, which is
2512 necessary for some versions of Solaris.</para>
2514 <para>For additional configuration examples and the configuration
2515 options of the AFS PAM module, see its documentation. For more
2516 details on the available options for the PAM configuration, see the
2517 <filename>pam.conf</filename> manual page.</para>
2519 <para>Sites which still require <emphasis
2520 role="bold">kaserver</emphasis> or external Kerberos v4 authentication
2521 should consult <link linkend="KAS016">"Enabling kaserver based AFS
2522 Login on Solaris Systems"</link> for details of how to enable AFS
2523 login on Solaris.</para>
2525 <para>Proceed to <link linkend="HDRWQ49a">Editing the File Systems
2526 Clean-up Script on Solaris Systems</link></para>
2528 <sect2 id="HDRWQ49a">
2529 <title>Editing the File Systems Clean-up Script on Solaris Systems</title>
2531 <primary>Solaris</primary>
2533 <secondary>file systems clean-up script</secondary>
2535 <tertiary>on file server machine</tertiary>
2539 <primary>file systems clean-up script (Solaris)</primary>
2541 <secondary>file server machine</secondary>
2545 <primary>scripts</primary>
2547 <secondary>file systems clean-up (Solaris)</secondary>
2549 <tertiary>file server machine</tertiary>
2555 <para>Some Solaris distributions include a script that locates and removes unneeded files from various file systems. Its
2556 conventional location is <emphasis role="bold">/usr/lib/fs/nfs/nfsfind</emphasis>. The script generally uses an argument
2557 to the <emphasis role="bold">find</emphasis> command to define which file systems to search. In this step you modify the
2558 command to exclude the <emphasis role="bold">/afs</emphasis> directory. Otherwise, the command traverses the AFS
2559 filespace of every cell that is accessible from the machine, which can take many hours. The following alterations are
2560 possibilities, but you must verify that they are appropriate for your cell.</para>
2562 <para>The first possible alteration is to add the <emphasis role="bold">-local</emphasis> flag to the existing command,
2563 so that it looks like the following:</para>
2566 find $dir -local -name .nfs\* -mtime +7 -mount -exec rm -f {} \;
2569 <para>Another alternative is to exclude any directories whose names begin with the lowercase letter <emphasis
2570 role="bold">a</emphasis> or a non-alphabetic character.</para>
2573 find /[A-Zb-z]* <replaceable>remainder of existing command</replaceable>
2576 <para>Do not use the following command, which still searches under the <emphasis role="bold">/afs</emphasis> directory,
2577 looking for a subdirectory of type <emphasis role="bold">4.2</emphasis>.</para>
2580 find / -fstype 4.2 /* <replaceable>do not use</replaceable> */
2585 <para>Proceed to <link linkend="HDRWQ50">Starting the BOS Server</link> (or if referring to these instructions while
2586 installing an additional file server machine, return to <link linkend="HDRWQ108">Starting Server
2587 Programs</link>).</para>
2592 <primary>Basic OverSeer Server</primary>
2594 <see>BOS Server</see>
2598 <primary>BOS Server</primary>
2600 <secondary>starting</secondary>
2602 <tertiary>first AFS machine</tertiary>
2606 <primary>starting</primary>
2608 <secondary>BOS Server</secondary>
2610 <tertiary>first AFS machine</tertiary>
2614 <primary>first AFS machine</primary>
2616 <secondary>BOS Server</secondary>
2620 <primary>authorization checking (disabling)</primary>
2622 <secondary>first AFS machine</secondary>
2626 <primary>disabling authorization checking</primary>
2628 <secondary>first AFS machine</secondary>
2632 <primary>first AFS machine</primary>
2634 <secondary>authorization checking (disabling)</secondary>
2638 <sect1 id="HDRWQ50">
2639 <title>Starting the BOS Server</title>
2641 <para>You are now ready to start the AFS server processes on this machine.
2642 If you are not working from a packaged distribution, begin by copying the
2643 AFS server binaries from the distribution to the conventional local disk
2644 location, the <emphasis role="bold">/usr/afs/bin</emphasis> directory. The
2645 following instructions also create files in other subdirectories of the
2646 <emphasis role="bold">/usr/afs</emphasis> directory.</para>
2648 <para>Then issue the <emphasis role="bold">bosserver</emphasis> command to initialize the Basic OverSeer (BOS) Server, which
2649 monitors and controls other AFS server processes on its server machine. Include the <emphasis role="bold">-noauth</emphasis>
2650 flag to disable authorization checking. Because you have not yet configured your cell's AFS authentication and authorization
2651 mechanisms, the BOS Server cannot perform authorization checking as it does during normal operation. In no-authorization mode,
2652 it does not verify the identity or privilege of the issuer of a <emphasis role="bold">bos</emphasis> command, and so performs
2653 any operation for anyone.</para>
2655 <para>Disabling authorization checking gravely compromises cell security. You must complete all subsequent steps in one
2656 uninterrupted pass and must not leave the machine unattended until you restart the BOS Server with authorization checking
2657 enabled, in <link linkend="HDRWQ72">Verifying the AFS Initialization Script</link>.</para>
2659 <para>As it initializes for the first time, the BOS Server creates the following directories and files, setting the owner to the
2660 local superuser <emphasis role="bold">root</emphasis> and the mode bits to limit the ability to write (and in some cases, read)
2661 them. For a description of the contents and function of these directories and files, see the chapter in the <emphasis>OpenAFS
2662 Administration Guide</emphasis> about administering server machines. For further discussion of the mode bit settings, see <link
2663 linkend="HDRWQ96">Protecting Sensitive AFS Directories</link>. <indexterm>
2664 <primary>Binary Distribution</primary>
2666 <secondary>copying server files from</secondary>
2668 <tertiary>first AFS machine</tertiary>
2669 </indexterm> <indexterm>
2670 <primary>first AFS machine</primary>
2672 <secondary>subdirectories of /usr/afs</secondary>
2673 </indexterm> <indexterm>
2674 <primary>creating</primary>
2676 <secondary>/usr/afs/bin directory</secondary>
2678 <tertiary>first AFS machine</tertiary>
2679 </indexterm> <indexterm>
2680 <primary>creating</primary>
2682 <secondary>/usr/afs/etc directory</secondary>
2684 <tertiary>first AFS machine</tertiary>
2685 </indexterm> <indexterm>
2686 <primary>copying</primary>
2688 <secondary>server files to local disk</secondary>
2690 <tertiary>first AFS machine</tertiary>
2691 </indexterm> <indexterm>
2692 <primary>first AFS machine</primary>
2694 <secondary>copying</secondary>
2696 <tertiary>server files to local disk</tertiary>
2697 </indexterm> <indexterm>
2698 <primary>usr/afs/bin directory</primary>
2700 <secondary>first AFS machine</secondary>
2701 </indexterm> <indexterm>
2702 <primary>usr/afs/etc directory</primary>
2704 <secondary>first AFS machine</secondary>
2705 </indexterm> <indexterm>
2706 <primary>usr/afs/db directory</primary>
2707 </indexterm> <indexterm>
2708 <primary>usr/afs/local directory</primary>
2709 </indexterm> <indexterm>
2710 <primary>usr/afs/logs directory</primary>
2711 </indexterm> <itemizedlist>
2713 <para><emphasis role="bold">/usr/afs/db</emphasis></para>
2717 <para><emphasis role="bold">/usr/afs/etc/CellServDB</emphasis></para>
2721 <para><emphasis role="bold">/usr/afs/etc/ThisCell</emphasis></para>
2725 <para><emphasis role="bold">/usr/afs/local</emphasis></para>
2729 <para><emphasis role="bold">/usr/afs/logs</emphasis></para>
2731 </itemizedlist></para>
2733 <para>The BOS Server also creates symbolic links called <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
2734 role="bold">/usr/vice/etc/CellServDB</emphasis> to the corresponding files in the <emphasis role="bold">/usr/afs/etc</emphasis>
2735 directory. The AFS command interpreters consult the <emphasis role="bold">CellServDB</emphasis> and <emphasis
2736 role="bold">ThisCell</emphasis> files in the <emphasis role="bold">/usr/vice/etc</emphasis> directory because they generally run
2737 on client machines. On machines that are AFS servers only (as this machine currently is), the files reside only in the <emphasis
2738 role="bold">/usr/afs/etc</emphasis> directory; the links enable the command interpreters to retrieve the information they need.
2739 Later instructions for installing the client functionality replace the links with actual files. <orderedlist>
2741 <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.
2743 # <emphasis role="bold">cd /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/root.server/usr/afs</emphasis>
2744 # <emphasis role="bold">cp -rp * /usr/afs</emphasis>
2745 </programlisting> <indexterm>
2746 <primary>commands</primary>
2748 <secondary>bosserver</secondary>
2749 </indexterm> <indexterm>
2750 <primary>bosserver command</primary>
2755 <para>Issue the <emphasis role="bold">bosserver</emphasis> command. Include the <emphasis role="bold">-noauth</emphasis>
2756 flag to disable authorization checking. <programlisting>
2757 # <emphasis role="bold">/usr/afs/bin/bosserver -noauth &</emphasis>
2758 </programlisting></para>
2762 <para>Verify that the BOS Server created <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
2763 role="bold">/usr/vice/etc/CellServDB</emphasis> as symbolic links to the corresponding files in the <emphasis
2764 role="bold">/usr/afs/etc</emphasis> directory. <programlisting>
2765 # <emphasis role="bold">ls -l /usr/vice/etc</emphasis>
2766 </programlisting></para>
2768 <para>If either or both of <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
2769 role="bold">/usr/vice/etc/CellServDB</emphasis> do not exist, or are not links, issue the following commands.</para>
2772 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
2773 # <emphasis role="bold">ln -s /usr/afs/etc/ThisCell</emphasis>
2774 # <emphasis role="bold">ln -s /usr/afs/etc/CellServDB</emphasis>
2777 </orderedlist></para>
2780 <primary>cell name</primary>
2782 <secondary>defining during installation of first machine</secondary>
2786 <primary>defining</primary>
2788 <secondary>cell name during installation of first machine</secondary>
2792 <primary>cell name</primary>
2794 <secondary>setting in server ThisCell file</secondary>
2796 <tertiary>first AFS machine</tertiary>
2800 <primary>setting</primary>
2802 <secondary>cell name in server ThisCell file</secondary>
2804 <tertiary>first AFS machine</tertiary>
2808 <primary>first AFS machine</primary>
2810 <secondary>ThisCell file (server)</secondary>
2814 <primary>usr/afs/etc/ThisCell</primary>
2816 <see>ThisCell file (server)</see>
2820 <primary>ThisCell file (server)</primary>
2822 <secondary>first AFS machine</secondary>
2826 <primary>files</primary>
2828 <secondary>ThisCell (server)</secondary>
2832 <primary>database server machine</primary>
2834 <secondary>entry in server CellServDB file</secondary>
2836 <tertiary>on first AFS machine</tertiary>
2840 <primary>first AFS machine</primary>
2842 <secondary>cell membership, defining</secondary>
2844 <tertiary>for server processes</tertiary>
2848 <primary>usr/afs/etc/CellServDB file</primary>
2850 <see>CellServDB file (server)</see>
2854 <primary>CellServDB file (server)</primary>
2856 <secondary>creating</secondary>
2858 <tertiary>on first AFS machine</tertiary>
2862 <primary>creating</primary>
2864 <secondary>CellServDB file (server)</secondary>
2866 <tertiary>first AFS machine</tertiary>
2870 <primary>files</primary>
2872 <secondary>CellServDB (server)</secondary>
2876 <primary>first AFS machine</primary>
2878 <secondary>CellServDB file (server)</secondary>
2882 <primary>first AFS machine</primary>
2884 <secondary>defining</secondary>
2886 <tertiary>as database server</tertiary>
2890 <primary>defining</primary>
2892 <secondary>first AFS machine as database server</secondary>
2896 <sect1 id="HDRWQ51">
2897 <title>Defining Cell Name and Membership for Server Processes</title>
2899 <para>Now assign your cell's name. The chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration
2900 and administration issues discusses the important considerations, explains why changing the name is difficult, and outlines the
2901 restrictions on name format. Two of the most important restrictions are that the name cannot include uppercase letters or more
2902 than 64 characters.</para>
2904 <para>Use the <emphasis role="bold">bos setcellname</emphasis> command to assign the cell name. It creates two files:
2907 <para><emphasis role="bold">/usr/afs/etc/ThisCell</emphasis>, which defines this machine's cell membership</para>
2911 <para><emphasis role="bold">/usr/afs/etc/CellServDB</emphasis>, which lists the cell's database server machines; the
2912 machine named on the command line is placed on the list automatically</para>
2914 </itemizedlist> <note>
2915 <para>In the following and every instruction in this guide, for the <replaceable>machine name</replaceable> argument
2916 substitute the fully-qualified hostname (such as <emphasis role="bold">fs1.example.com</emphasis>) of the machine you are
2917 installing. For the <replaceable>cell name</replaceable> argument substitute your cell's complete name (such as <emphasis
2918 role="bold">example.com</emphasis>).</para>
2922 <primary>commands</primary>
2924 <secondary>bos setcellname</secondary>
2928 <primary>bos commands</primary>
2930 <secondary>setcellname</secondary>
2935 <para>If necessary, add the directory containing the <emphasis role="bold">bos</emphasis> command to your path.
2937 # <emphasis role="bold">export PATH=$PATH:/usr/afs/bin</emphasis>
2943 <para>Issue the <emphasis role="bold">bos setcellname</emphasis> command to set the cell name. <programlisting>
2944 # <emphasis role="bold">bos setcellname</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>cell name</replaceable>> <emphasis
2945 role="bold">-noauth</emphasis>
2946 </programlisting></para>
2948 <para>Because you are not authenticated and authorization checking is disabled, the <emphasis role="bold">bos</emphasis>
2949 command interpreter possibly produces error messages about being unable to obtain tickets and running unauthenticated. You
2950 can safely ignore the messages. <indexterm>
2951 <primary>commands</primary>
2953 <secondary>bos listhosts</secondary>
2954 </indexterm> <indexterm>
2955 <primary>bos commands</primary>
2957 <secondary>listhosts</secondary>
2958 </indexterm> <indexterm>
2959 <primary>CellServDB file (server)</primary>
2961 <secondary>displaying entries</secondary>
2962 </indexterm> <indexterm>
2963 <primary>displaying</primary>
2965 <secondary>CellServDB file (server) entries</secondary>
2970 <para>Issue the <emphasis role="bold">bos listhosts</emphasis> command to verify that the machine you are installing is now
2971 registered as the cell's first database server machine. <programlisting>
2972 # <emphasis role="bold">bos listhosts</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">-noauth</emphasis>
2973 Cell name is <replaceable>cell_name</replaceable>
2974 Host 1 is <replaceable>machine_name</replaceable>
2975 </programlisting></para>
2980 <primary>database server machine</primary>
2982 <secondary>installing</secondary>
2984 <tertiary>first</tertiary>
2988 <primary>instructions</primary>
2990 <secondary>database server machine, installing first</secondary>
2994 <primary>installing</primary>
2996 <secondary>database server machine</secondary>
2998 <tertiary>first</tertiary>
3002 <primary>Backup Server</primary>
3004 <secondary>starting</secondary>
3006 <tertiary>first AFS machine</tertiary>
3010 <primary>buserver process</primary>
3012 <see>Backup Server</see>
3016 <primary>starting</primary>
3018 <secondary>Backup Server</secondary>
3020 <tertiary>first AFS machine</tertiary>
3024 <primary>first AFS machine</primary>
3026 <secondary>Backup Server</secondary>
3030 <primary>Protection Server</primary>
3032 <secondary>starting</secondary>
3034 <tertiary>first AFS machine</tertiary>
3038 <primary>ptserver process</primary>
3040 <see>Protection Server</see>
3044 <primary>starting</primary>
3046 <secondary>Protection Server</secondary>
3048 <tertiary>first AFS machine</tertiary>
3052 <primary>first AFS machine</primary>
3054 <secondary>Protection Server</secondary>
3058 <primary>VL Server (vlserver process)</primary>
3060 <secondary>starting</secondary>
3062 <tertiary>first AFS machine</tertiary>
3066 <primary>Volume Location Server</primary>
3068 <see>VL Server</see>
3072 <primary>starting</primary>
3074 <secondary>VL Server</secondary>
3076 <tertiary>first AFS machine</tertiary>
3080 <primary>first AFS machine</primary>
3082 <secondary>VL Server</secondary>
3086 <primary>usr/afs/local/BosConfig</primary>
3088 <see>BosConfig file</see>
3092 <primary>BosConfig file</primary>
3094 <secondary>adding entries</secondary>
3096 <tertiary>first AFS machine</tertiary>
3100 <primary>adding</primary>
3102 <secondary>entries to BosConfig file</secondary>
3104 <tertiary>first AFS machine</tertiary>
3108 <primary>files</primary>
3110 <secondary>BosConfig</secondary>
3114 <primary>initializing</primary>
3116 <secondary>server process</secondary>
3122 <primary>server process</primary>
3124 <secondary>see also entry for each server's name</secondary>
3128 <sect1 id="HDRWQ52">
3129 <title>Starting the Database Server Processes</title>
3131 <para>Next use the <emphasis role="bold">bos create</emphasis> command to create entries for the three database server processes
3132 in the <emphasis role="bold">/usr/afs/local/BosConfig</emphasis> file and start them running. The three processes run on database
3133 server machines only: <itemizedlist>
3136 <para>The Backup Server (the <emphasis role="bold">buserver</emphasis> process) maintains the Backup Database</para>
3140 <para>The Protection Server (the <emphasis role="bold">ptserver</emphasis> process) maintains the Protection
3145 <para>The Volume Location (VL) Server (the <emphasis role="bold">vlserver</emphasis> process) maintains the Volume
3146 Location Database (VLDB)</para>
3148 </itemizedlist></para>
3151 <primary>Kerberos</primary>
3155 <para>AFS ships with an additional database server named 'kaserver', which
3156 was historically used to provide authentication services to AFS cells.
3157 kaserver was based on <emphasis>Kerberos v4</emphasis>, as such, it is
3158 not recommended for new cells. This guide assumes you have already
3159 configured a Kerberos v5 realm for your site, and details the procedures
3160 required to use AFS with this realm. If you do wish to use
3161 <emphasis role="bold">kaserver</emphasis>, please see the modifications
3162 to these instructions detailed in
3163 <link linkend="KAS006">Starting the kaserver Database Server Process</link>
3167 <para>The remaining instructions in this chapter include the <emphasis role="bold">-cell</emphasis> argument on all applicable
3168 commands. Provide the cell name you assigned in <link linkend="HDRWQ51">Defining Cell Name and Membership for Server
3169 Processes</link>. If a command appears on multiple lines, it is only for legibility. <indexterm>
3170 <primary>commands</primary>
3172 <secondary>bos create</secondary>
3173 </indexterm> <indexterm>
3174 <primary>bos commands</primary>
3176 <secondary>create</secondary>
3177 </indexterm> <orderedlist>
3179 <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the Backup Server. <programlisting>
3180 # <emphasis role="bold">./bos create</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">buserver simple /usr/afs/bin/buserver</emphasis> <emphasis role="bold">-noauth</emphasis>
3181 </programlisting></para>
3185 <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the Protection Server. <programlisting>
3186 # <emphasis role="bold">./bos create</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">ptserver simple /usr/afs/bin/ptserver</emphasis> <emphasis role="bold">-noauth</emphasis>
3187 </programlisting></para>
3191 <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the VL Server. <programlisting>
3192 # <emphasis role="bold">./bos create</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">vlserver simple /usr/afs/bin/vlserver</emphasis> <emphasis role="bold">-noauth</emphasis>
3193 </programlisting></para>
3195 </orderedlist></para>
3198 <primary>admin account</primary>
3200 <secondary>creating</secondary>
3204 <primary>afs entry in Kerberos Database</primary>
3208 <primary>Kerberos Database</primary>
3212 <primary>creating</primary>
3214 <secondary>afs entry in Kerberos Database</secondary>
3218 <primary>creating</primary>
3220 <secondary>admin account in Kerberos Database</secondary>
3224 <primary>security</primary>
3226 <secondary>initializing cell-wide</secondary>
3230 <primary>cell</primary>
3232 <secondary>initializing security mechanisms</secondary>
3236 <primary>initializing</primary>
3238 <secondary>cell security mechanisms</secondary>
3242 <primary>usr/afs/etc/KeyFile</primary>
3244 <see>KeyFile file</see>
3248 <primary>KeyFile file</primary>
3250 <secondary>first AFS machine</secondary>
3254 <primary>files</primary>
3256 <secondary>KeyFile</secondary>
3260 <primary>key</primary>
3262 <see>server encryption key</see>
3266 <primary>encryption key</primary>
3268 <see>server encryption key</see>
3272 <sect1 id="HDRWQ53">
3273 <title>Initializing Cell Security </title>
3275 <para>If you are working with an existing cell which uses
3276 <emphasis role="bold">kaserver</emphasis> or Kerberos v4 for authentication,
3278 <link linkend="HDRWQ53">Initializing Cell Security with kaserver</link>
3279 for installation instructions which replace this section.</para>
3281 <para>Now initialize the cell's security mechanisms. Begin by creating the following two entires in your site's Kerberos database: <itemizedlist>
3283 <para>A generic administrative account, called <emphasis role="bold">admin</emphasis> by convention. If you choose to
3284 assign a different name, substitute it throughout the remainder of this document.</para>
3286 <para>After you complete the installation of the first machine, you can continue to have all administrators use the
3287 <emphasis role="bold">admin</emphasis> account, or you can create a separate administrative account for each of them. The
3288 latter scheme implies somewhat more overhead, but provides a more informative audit trail for administrative
3293 <para>The entry for AFS server processes, called either
3294 <emphasis role="bold">afs</emphasis> or
3295 <emphasis role="bold">afs/<replaceable>cell</replaceable></emphasis>.
3296 The latter form is preferred since it works regardless of whether
3297 your cell name matches your Kerberos realm name and allows multiple
3298 AFS cells to be served from a single Kerberos realm.
3299 No user logs in under this identity, but it is used to encrypt the
3300 server tickets that granted to AFS clients for presentation to
3301 server processes during mutual authentication. (The
3302 chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration and administration describes the
3303 role of server encryption keys in mutual authentication.)</para>
3305 <para>In Step <link linkend="LIWQ58">7</link>, you also place the initial AFS server encryption key into the <emphasis
3306 role="bold">/usr/afs/etc/KeyFile</emphasis> file. The AFS server processes refer to this file to learn the server
3307 encryption key when they need to decrypt server tickets.</para>
3309 </itemizedlist></para>
3311 <para>You also issue several commands that enable the new <emphasis role="bold">admin</emphasis> user to issue privileged
3312 commands in all of the AFS suites.</para>
3314 <para>The following instructions do not configure all of the security mechanisms related to the AFS Backup System. See the
3315 chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about configuring the Backup System.</para>
3317 <para>The examples below assume you are using MIT Kerberos. Please refer
3318 to the documentation for your KDC's administrative interface if you are
3319 using a different vendor</para>
3323 <para>Enter <emphasis role="bold">kadmin</emphasis> interactive mode.
3325 # <emphasis role="bold">kadmin</emphasis>
3326 Authenticating as principal <replaceable>you</replaceable>/admin@<replaceable>YOUR REALM</replaceable> with password
3327 Password for <replaceable>you/admin@REALM</replaceable>: <replaceable>your_password</replaceable>
3328 </programlisting> <indexterm>
3329 <primary>server encryption key</primary>
3331 <secondary>in Kerberos Database</secondary>
3332 </indexterm> <indexterm>
3333 <primary>creating</primary>
3335 <secondary>server encryption key</secondary>
3337 <tertiary>Kerberos Database</tertiary>
3341 <listitem id="LIWQ54">
3343 <emphasis role="bold">add_principal</emphasis> command to create
3344 Kerberos Database entries called
3345 <emphasis role="bold">admin</emphasis> and
3346 <emphasis role="bold">afs/<<replaceable>cell name</replaceable>></emphasis>.</para>
3348 <para>You should make the <replaceable>admin_passwd</replaceable> as
3349 long and complex as possible, but keep in mind that administrators
3350 need to enter it often. It must be at least six characters long.</para>
3351 <para>Note that when creating the
3352 <emphasis role="bold">afs/<<replaceable>cell name</replaceable>></emphasis>
3353 entry, the encryption types should be restricted to des-cbc-crc:v4.
3354 For more details regarding encryption types, see the documentation
3355 for your Kerberos installation.
3358 kadmin: <emphasis role="bold">add_principal -randkey -e des-cbc-crc:v4 afs/</emphasis><<replaceable>cell name</replaceable>>
3359 Principal "afs/<replaceable>cell name</replaceable>@<replaceable>REALM</replaceable>" created.
3360 kadmin: <emphasis role="bold">add_principal admin</emphasis>
3361 Enter password for principal "admin@<replaceable>REALM</replaceable>": <emphasis role="bold"><replaceable>admin_password</replaceable></emphasis>
3362 Principal "admin@<replaceable>REALM</replaceable>" created.
3367 <primary>commands</primary>
3369 <secondary>kas examine</secondary>
3373 <primary>kas commands</primary>
3375 <secondary>examine</secondary>
3379 <primary>displaying</primary>
3381 <secondary>server encryption key</secondary>
3383 <tertiary>Authentication Database</tertiary>
3387 <listitem id="LIWQ55">
3388 <para>Issue the <emphasis role="bold">kadmin
3389 get_principal</emphasis> command to display the <emphasis
3390 role="bold">afs/</emphasis><<replaceable>cell name</replaceable>> entry.
3392 kadmin: <emphasis role="bold">get_principal afs/<<replaceable>cell name</replaceable>></emphasis>
3393 Principal: afs/<replaceable>cell</replaceable>
3395 Key: vno 2, DES cbc mode with CRC-32, no salt
3401 <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>
3403 <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>
3406 kadmin: <emphasis role="bold">ktadd -k /etc/afs.keytab -e des-cbc-crc:v4 afs/<<replaceable>cell name</replaceable>></emphasis>
3407 Entry for principal afs/<<replaceable>cell name</replaceable>> with kvno 3, encryption type DES cbc mode with CRC-32 added to keytab WRFILE:/etc/afs.keytab
3409 <para>Make a note of the key version number (kvno) given in the
3410 response, as you will need it to load the key into bos in a later
3413 <note><para>Note that each time you run
3414 <emphasis role="bold">ktadd</emphasis> a new key is generated
3415 for the item being extracted. This means that you cannot run ktadd
3416 multiple times and end up with the same key material each time.
3421 <para>Issue the <emphasis role="bold">quit</emphasis> command to leave <emphasis role="bold">kadmin</emphasis>
3422 interactive mode. <programlisting>
3423 kadmin: <emphasis role="bold">quit</emphasis>
3424 </programlisting> <indexterm>
3425 <primary>commands</primary>
3427 <secondary>bos adduser</secondary>
3428 </indexterm> <indexterm>
3429 <primary>bos commands</primary>
3431 <secondary>adduser</secondary>
3432 </indexterm> <indexterm>
3433 <primary>usr/afs/etc/UserList</primary>
3435 <see>UserList file</see>
3436 </indexterm> <indexterm>
3437 <primary>UserList file</primary>
3439 <secondary>first AFS machine</secondary>
3440 </indexterm> <indexterm>
3441 <primary>files</primary>
3443 <secondary>UserList</secondary>
3444 </indexterm> <indexterm>
3445 <primary>creating</primary>
3447 <secondary>UserList file entry</secondary>
3448 </indexterm> <indexterm>
3449 <primary>admin account</primary>
3451 <secondary>adding</secondary>
3453 <tertiary>to UserList file</tertiary>
3457 <listitem id="LIWQ57">
3458 <para>Issue the <emphasis role="bold">bos adduser</emphasis> command to add the <emphasis
3459 role="bold">admin</emphasis> user to the <emphasis role="bold">/usr/afs/etc/UserList</emphasis> file. This enables the
3460 <emphasis role="bold">admin</emphasis> user to issue privileged <emphasis role="bold">bos</emphasis> and <emphasis
3461 role="bold">vos</emphasis> commands. <programlisting>
3462 # <emphasis role="bold">./bos adduser</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">admin -noauth</emphasis>
3465 <primary>commands</primary>
3466 <secondary>asetkey</secondary>
3469 <primary>creating</primary>
3470 <secondary>server encryption key</secondary>
3471 <tertiary>KeyFile file</tertiary>
3474 <primary>server encryption key</primary>
3475 <secondary>in KeyFile file</secondary>
3479 <listitem id="LIWQ58">
3481 <emphasis role="bold">asetkey</emphasis> command to set the AFS
3482 server encryption key in the
3483 <emphasis role="bold">/usr/afs/etc/KeyFile</emphasis> file. This key
3484 is created from the <emphasis role="bold">/etc/afs.keytab</emphasis>
3485 file created earlier.</para>
3487 <para>asetkey requires the key version number (or kvno) of the
3488 <emphasis role="bold">afs/</emphasis><replaceable>cell</replaceable>
3489 key. You should have made note of the kvno when creating the key
3490 earlier. The key version number can also be found by running the
3491 <emphasis role="bold">kvno</emphasis> command</para>
3493 # <emphasis role="bold">kvno -k /etc/afs.keytab afs/</emphasis><<replaceable>cell name</replaceable>>
3496 <para>Once the kvno is known, the key can then be extracted using
3499 # <emphasis role="bold">asetkey add</emphasis> <<replaceable>kvno</replaceable>> <emphasis role="bold">/etc/afs.keytab afs/</emphasis><<replaceable>cell name</replaceable>>
3503 <primary>commands</primary>
3504 <secondary>bos listkeys</secondary>
3508 <primary>bos commands</primary>
3509 <secondary>listkeys</secondary>
3513 <primary>displaying</primary>
3514 <secondary>server encryption key</secondary>
3515 <tertiary>KeyFile file</tertiary>
3519 <listitem id="LIWQ59">
3521 <emphasis role="bold">bos listkeys</emphasis> command to verify that
3522 the key version number for the new key in the
3523 <emphasis role="bold">KeyFile</emphasis> file is the same as the key
3524 version number in the Authentication Database's
3525 <emphasis role="bold">afs/<replaceable>cell name</replaceable></emphasis>
3526 entry, which you displayed in Step <link linkend="LIWQ55">3</link>.
3528 # <emphasis role="bold">./bos listkeys</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">-noauth</emphasis>
3529 key 0 has cksum <replaceable>checksum</replaceable>
3530 </programlisting></para>
3532 <para>You can safely ignore any error messages indicating that <emphasis role="bold">bos</emphasis> failed to get tickets
3533 or that authentication failed.</para>
3537 <sect1 id="HDRWQ53a">
3538 <title>Initializing the Protection Database</title>
3540 <para>Now continue to configure your cell's security systems by
3541 populating the Protection Database with the newly created
3542 <emphasis role="bold">admin</emphasis> user, and permitting it
3543 to issue priviledged commands on the AFS filesystem.</para>
3548 <primary>commands</primary>
3549 <secondary>pts createuser</secondary>
3553 <primary>pts commands</primary>
3554 <secondary>createuser</secondary>
3558 <primary>Protection Database</primary>
3560 <para>Issue the <emphasis role="bold">pts createuser</emphasis> command to create a Protection Database entry for the
3561 <emphasis role="bold">admin</emphasis> user.</para>
3563 <para>By default, the Protection Server assigns AFS UID 1 (one) to the <emphasis role="bold">admin</emphasis> user,
3564 because it is the first user entry you are creating. If the local password file (<emphasis
3565 role="bold">/etc/passwd</emphasis> or equivalent) already has an entry for <emphasis role="bold">admin</emphasis> that
3566 assigns it a UNIX UID other than 1, it is best to use the <emphasis role="bold">-id</emphasis> argument to the <emphasis
3567 role="bold">pts createuser</emphasis> command to make the new AFS UID match the existing UNIX UID. Otherwise, it is best
3568 to accept the default.</para>
3571 # <emphasis role="bold">pts createuser -name admin</emphasis> [<emphasis
3572 role="bold">-id</emphasis> <<replaceable>AFS UID</replaceable>>] <emphasis role="bold">-noauth</emphasis>
3573 User admin has id <replaceable>AFS UID</replaceable>
3577 <primary>commands</primary>
3578 <secondary>pts adduser</secondary>
3582 <primary>pts commands</primary>
3583 <secondary>adduser</secondary>
3587 <primary>system:administrators group</primary>
3591 <primary>admin account</primary>
3592 <secondary>adding</secondary>
3593 <tertiary>to system:administrators group</tertiary>
3598 <para>Issue the <emphasis role="bold">pts adduser</emphasis> command to make the <emphasis role="bold">admin</emphasis>
3599 user a member of the <emphasis role="bold">system:administrators</emphasis> group, and the <emphasis role="bold">pts
3600 membership</emphasis> command to verify the new membership. Membership in the group enables the <emphasis
3601 role="bold">admin</emphasis> user to issue privileged <emphasis role="bold">pts</emphasis> commands and some privileged
3602 <emphasis role="bold">fs</emphasis> commands. <programlisting>
3603 # <emphasis role="bold">./pts adduser admin system:administrators</emphasis> <emphasis role="bold">-noauth</emphasis>
3604 # <emphasis role="bold">./pts membership admin</emphasis> <emphasis role="bold">-noauth</emphasis>
3605 Groups admin (id: 1) is a member of:
3606 system:administrators
3607 </programlisting> <indexterm>
3608 <primary>commands</primary>
3609 <secondary>bos restart</secondary>
3610 <tertiary>on first AFS machine</tertiary>
3611 </indexterm> <indexterm>
3612 <primary>bos commands</primary>
3613 <secondary>restart</secondary>
3614 <tertiary>on first AFS machine</tertiary>
3615 </indexterm> <indexterm>
3616 <primary>restarting server process</primary>
3617 <secondary>on first AFS machine</secondary>
3618 </indexterm> <indexterm>
3619 <primary>server process</primary>
3620 <secondary>restarting</secondary>
3621 <tertiary>on first AFS machine</tertiary>
3626 <para>Issue the <emphasis role="bold">bos restart</emphasis> command with the <emphasis role="bold">-all</emphasis> flag
3627 to restart the database server processes, so that they start using the new server encryption key. <programlisting>
3628 # <emphasis role="bold">./bos restart</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">-all</emphasis>
3629 <emphasis role="bold">-noauth</emphasis>
3630 </programlisting></para>
3635 <primary>File Server</primary>
3637 <secondary>first AFS machine</secondary>
3641 <primary>fileserver process</primary>
3643 <see>File Server</see>
3647 <primary>starting</primary>
3649 <secondary>File Server</secondary>
3651 <tertiary>first AFS machine</tertiary>
3655 <primary>first AFS machine</primary>
3657 <secondary>File Server, fs process</secondary>
3661 <primary>Volume Server</primary>
3663 <secondary>first AFS machine</secondary>
3667 <primary>volserver process</primary>
3669 <see>Volume Server</see>
3673 <primary>starting</primary>
3675 <secondary>Volume Server</secondary>
3677 <tertiary>first AFS machine</tertiary>
3681 <primary>first AFS machine</primary>
3683 <secondary>Volume Server</secondary>
3687 <primary>Salvager (salvager process)</primary>
3689 <secondary>first AFS machine</secondary>
3693 <primary>fs process</primary>
3695 <secondary>first AFS machine</secondary>
3699 <primary>starting</primary>
3701 <secondary>fs process</secondary>
3703 <tertiary>first AFS machine</tertiary>
3707 <primary>first AFS machine</primary>
3709 <secondary>Salvager</secondary>
3713 <sect1 id="HDRWQ60">
3714 <title>Starting the File Server processes</title>
3716 <para>Start either the <emphasis role="bold">fs</emphasis> process or, if you want to run the Demand-Attach File Server, the
3717 <emphasis role="bold">dafs</emphasis> process. The <emphasis role="bold">fs</emphasis> process consists of the File Server,
3718 Volume Server, and Salvager (<emphasis role="bold">fileserver</emphasis>, <emphasis role="bold">volserver</emphasis> and
3719 <emphasis role="bold">salvager</emphasis> processes). The <emphasis role="bold">dafs</emphasis> process consists of the
3720 Demand-Attach File Server, Volume Server, Salvage Server, and Salvager (<emphasis role="bold">dafileserver</emphasis>,
3721 <emphasis role="bold"> davolserver</emphasis>, <emphasis role="bold">salvageserver</emphasis>, and <emphasis
3722 role="bold">dasalvager</emphasis> processes). For information about the Demand-Attach File Server and to see whether or not
3723 you should run it, see <link linkend="DAFS">Appendix C, The Demand-Attach File Server</link>.
3726 <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the <emphasis role="bold">fs</emphasis>
3727 process or the <emphasis role="bold">dafs</emphasis> process. The commands appear here on multiple lines only for legibility.
3731 <para>If you are not planning on running the Demand-Attach File Server, create the <emphasis role="bold">fs</emphasis>
3734 # <emphasis role="bold">./bos create</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">fs fs /usr/afs/bin/fileserver</emphasis> \
3735 <emphasis role="bold">/usr/afs/bin/volserver /usr/afs/bin/salvager</emphasis> \
3736 <emphasis role="bold">-noauth</emphasis>
3737 </programlisting></para>
3740 <para>If you are planning on running the Demand-Attach File Server, create the <emphasis
3741 role="bold">dafs</emphasis> process:
3743 # <emphasis role="bold">./bos create</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">dafs dafs /usr/afs/bin/dafileserver</emphasis> \
3744 <emphasis role="bold">/usr/afs/bin/davolserver /usr/afs/bin/salvageserver</emphasis> \
3745 <emphasis role="bold">/usr/afs/bin/dasalvager</emphasis> <emphasis role="bold">-noauth</emphasis>
3746 </programlisting></para>
3751 <para>Sometimes a message about Volume Location Database (VLDB) initialization appears, along with one or more instances
3752 of an error message similar to the following:</para>
3755 FSYNC_clientInit temporary failure (will retry)
3758 <para>This message appears when the <emphasis role="bold">volserver</emphasis> process tries to start before the <emphasis
3759 role="bold">fileserver</emphasis> process has completed its initialization. Wait a few minutes after the last such message
3760 before continuing, to guarantee that both processes have started successfully. <indexterm>
3761 <primary>commands</primary>
3763 <secondary>bos status</secondary>
3764 </indexterm> <indexterm>
3765 <primary>bos commands</primary>
3767 <secondary>status</secondary>
3770 <para>You can verify that the <emphasis role="bold">fs</emphasis> or <emphasis role="bold">dafs</emphasis> process has started
3771 successfully by issuing the <emphasis role="bold">bos status</emphasis> command. Its output mentions two <computeroutput>proc
3772 starts</computeroutput>.</para>
3776 <para>If you are not running the Demand-Attach File Server:
3779 # <emphasis role="bold">./bos status</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">fs -long -noauth</emphasis>
3780 </programlisting></para></listitem>
3783 <para>If you are running the Demand-Attach File Server:
3785 # <emphasis role="bold">./bos status</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">dafs -long -noauth</emphasis>
3786 </programlisting></para></listitem>
3792 <para>Your next action depends on whether you have ever run AFS file server machines in the cell: <itemizedlist>
3794 <primary>commands</primary>
3796 <secondary>vos create</secondary>
3798 <tertiary>root.afs volume</tertiary>
3802 <primary>vos commands</primary>
3804 <secondary>create</secondary>
3806 <tertiary>root.afs volume</tertiary>
3810 <primary>root.afs volume</primary>
3812 <secondary>creating</secondary>
3816 <primary>volume</primary>
3818 <secondary>creating</secondary>
3820 <tertiary>root.afs</tertiary>
3824 <primary>creating</primary>
3826 <secondary>root.afs volume</secondary>
3830 <para>If you are installing the first AFS server machine ever in the cell (that is, you are not upgrading the AFS
3831 software from a previous version), create the first AFS volume, <emphasis role="bold">root.afs</emphasis>.</para>
3833 <para>For the <replaceable>partition name</replaceable> argument, substitute the name of one of the machine's AFS
3834 server partitions (such as <emphasis role="bold">/vicepa</emphasis>).</para>
3837 # <emphasis role="bold">./vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <emphasis
3838 role="bold">root.afs</emphasis> \
3839 <emphasis role="bold">-noauth</emphasis>
3842 <para>The Volume Server produces a message confirming that it created the volume on the specified partition. You can
3843 ignore error messages indicating that tokens are missing, or that authentication failed. <indexterm>
3844 <primary>commands</primary>
3846 <secondary>vos syncvldb</secondary>
3847 </indexterm> <indexterm>
3848 <primary>vos commands</primary>
3850 <secondary>syncvldb</secondary>
3851 </indexterm> <indexterm>
3852 <primary>commands</primary>
3854 <secondary>vos syncserv</secondary>
3855 </indexterm> <indexterm>
3856 <primary>vos commands</primary>
3858 <secondary>syncserv</secondary>
3863 <para>If there are existing AFS file server machines and volumes in the cell, issue the <emphasis role="bold">vos
3864 syncvldb</emphasis> and <emphasis role="bold">vos syncserv</emphasis> commands to synchronize the VLDB with the
3865 actual state of volumes on the local machine. To follow the progress of the synchronization operation, which can
3866 take several minutes, use the <emphasis role="bold">-verbose</emphasis> flag. <programlisting>
3867 # <emphasis role="bold">./vos syncvldb</emphasis> <<replaceable>machine name</replaceable>> <emphasis
3868 role="bold">-verbose -noauth</emphasis>
3869 # <emphasis role="bold">./vos syncserv</emphasis> <<replaceable>machine name</replaceable>> <emphasis
3870 role="bold">-verbose -noauth</emphasis>
3871 </programlisting></para>
3873 <para>You can ignore error messages indicating that tokens are missing, or that authentication failed.</para>
3875 </itemizedlist></para>
3877 </orderedlist></para>
3880 <primary>Update Server</primary>
3882 <secondary>starting server portion</secondary>
3884 <tertiary>first AFS machine</tertiary>
3888 <primary>upserver process</primary>
3890 <see>Update Server</see>
3894 <primary>starting</primary>
3896 <secondary>Update Server server portion</secondary>
3898 <tertiary>first AFS machine</tertiary>
3902 <primary>first AFS machine</primary>
3904 <secondary>Update Server server portion</secondary>
3908 <primary>first AFS machine</primary>
3910 <secondary>defining</secondary>
3912 <tertiary>as binary distribution machine</tertiary>
3916 <primary>first AFS machine</primary>
3918 <secondary>defining</secondary>
3920 <tertiary>as system control machine</tertiary>
3924 <primary>system control machine</primary>
3928 <primary>binary distribution machine</primary>
3932 <sect1 id="HDRWQ61">
3933 <title>Starting the Server Portion of the Update Server</title>
3935 <para>Start the server portion of the Update Server (the <emphasis role="bold">upserver</emphasis> process), to distribute the
3936 contents of directories on this machine to other server machines in the cell. It becomes active when you configure the client
3937 portion of the Update Server on additional server machines.</para>
3939 <para>Distributing the contents of its <emphasis role="bold">/usr/afs/etc</emphasis> directory makes this machine the cell's
3940 <emphasis>system control machine</emphasis>. The other server machines in the cell run the <emphasis
3941 role="bold">upclientetc</emphasis> process (an instance of the client portion of the Update Server) to retrieve the
3942 configuration files. Use the <emphasis role="bold">-crypt</emphasis> argument to the <emphasis role="bold">upserver</emphasis>
3943 initialization command to specify that the Update Server distributes the contents of the <emphasis
3944 role="bold">/usr/afs/etc</emphasis> directory only in encrypted form, as shown in the following instruction. Several of the
3945 files in the directory, particularly the <emphasis role="bold">KeyFile</emphasis> file, are crucial to cell security and so must
3946 never cross the network unencrypted.</para>
3948 <para>(You can choose not to configure a system control machine, in which case you must update the configuration files in each
3949 server machine's <emphasis role="bold">/usr/afs/etc</emphasis> directory individually. The <emphasis role="bold">bos</emphasis>
3950 commands used for this purpose also encrypt data before sending it across the network.)</para>
3952 <para>Distributing the contents of its <emphasis role="bold">/usr/afs/bin</emphasis> directory to other server machines of its
3953 system type makes this machine a <emphasis>binary distribution machine</emphasis>. The other server machines of its system type
3954 run the <emphasis role="bold">upclientbin</emphasis> process (an instance of the client portion of the Update Server) to
3955 retrieve the binaries. If your platform has a package management system,
3956 such as 'rpm' or 'apt', running the Update Server to distribute binaries
3957 may interfere with this system.</para>
3959 <para>The binaries in the <emphasis role="bold">/usr/afs/bin</emphasis> directory are not sensitive, so it is not necessary to
3960 encrypt them before transfer across the network. Include the <emphasis role="bold">-clear</emphasis> argument to the <emphasis
3961 role="bold">upserver</emphasis> initialization command to specify that the Update Server distributes the contents of the
3962 <emphasis role="bold">/usr/afs/bin</emphasis> directory in unencrypted form unless an <emphasis
3963 role="bold">upclientbin</emphasis> process requests encrypted transfer.</para>
3965 <para>Note that the server and client portions of the Update Server always mutually authenticate with one another, regardless of
3966 whether you use the <emphasis role="bold">-clear</emphasis> or <emphasis role="bold">-crypt</emphasis> arguments. This protects
3967 their communications from eavesdropping to some degree.</para>
3969 <para>For more information on the <emphasis role="bold">upclient</emphasis> and <emphasis role="bold">upserver</emphasis>
3970 processes, see their reference pages in the <emphasis>OpenAFS Administration Reference</emphasis>. The commands appear on
3971 multiple lines here only for legibility. <orderedlist>
3973 <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the <emphasis role="bold">upserver</emphasis>
3974 process. <programlisting>
3975 # <emphasis role="bold">./bos create</emphasis> <<replaceable>machine name></replaceable> <emphasis role="bold">upserver simple</emphasis> \
3976 <emphasis role="bold">"/usr/afs/bin/upserver -crypt /usr/afs/etc</emphasis> \
3977 <emphasis role="bold">-clear /usr/afs/bin"</emphasis> <emphasis role="bold">-noauth</emphasis>
3978 </programlisting></para>
3980 </orderedlist></para>
3983 <sect1 id="HDRWQ62">
3984 <title>Clock Sync Considerations</title>
3986 <para>Keeping the clocks on all server and client machines in your cell synchronized is crucial to several functions, and in
3987 particular to the correct operation of AFS's distributed database technology, Ubik. The chapter in the <emphasis>OpenAFS
3988 Administration Guide</emphasis> about administering server machines explains how time skew can disturb Ubik's performance and
3989 cause service outages in your cell.</para>
3991 <para>You should install and configure your time service independently of
3992 AFS. Your Kerberos realm will also require a reliable time source, so your site
3993 may already have one available.</para>
3996 <primary>overview</primary>
3998 <secondary>installing client functionality on first machine</secondary>
4002 <primary>first AFS machine</primary>
4004 <secondary>client functionality</secondary>
4006 <tertiary>installing</tertiary>
4010 <primary>installing</primary>
4012 <secondary>client functionality</secondary>
4014 <tertiary>first AFS machine</tertiary>
4018 <sect1 id="HDRWQ63">
4019 <title>Overview: Installing Client Functionality</title>
4021 <para>The machine you are installing is now an AFS file server machine,
4022 database server machine, system control machine, and binary distribution
4023 machine. Now make it a client machine by completing the following tasks:
4026 <para>Define the machine's cell membership for client processes</para>
4030 <para>Create the client version of the <emphasis role="bold">CellServDB</emphasis> file</para>
4034 <para>Define cache location and size</para>
4038 <para>Create the <emphasis role="bold">/afs</emphasis> directory and start the Cache Manager</para>
4040 </orderedlist></para>
4043 <primary>Distribution</primary>
4045 <secondary>copying client files from</secondary>
4047 <tertiary>first AFS machine</tertiary>
4051 <primary>first AFS machine</primary>
4053 <secondary>copying</secondary>
4055 <tertiary>client files to local disk</tertiary>
4059 <primary>copying</primary>
4061 <secondary>client files to local disk</secondary>
4063 <tertiary>first AFS machine</tertiary>
4067 <sect1 id="HDRWQ64">
4068 <title>Copying Client Files to the Local Disk</title>
4070 <para>You need only undertake the steps in this section, if you are using
4071 a tar file distribution, or one built from scratch. Packaged distributions,
4072 such as RPMs or DEBs will already have installed the necessary files in
4073 the correct locations.</para>
4075 <para>Before installing and configuring the AFS client, copy the necessary files from the tarball to the local <emphasis
4076 role="bold">/usr/vice/etc</emphasis> directory. <orderedlist>
4078 <para>If you have not already done so, unpack the distribution
4079 tarball for this machine's system type into a suitable location on
4080 the filesystem, such as <emphasis role="bold">/tmp/afsdist</emphasis>.
4081 If you use a different location, substitue that in the examples that
4086 <para>Copy files to the local <emphasis role="bold">/usr/vice/etc</emphasis> directory.</para>
4088 <para>This step places a copy of the AFS initialization script (and related files, if applicable) into the <emphasis
4089 role="bold">/usr/vice/etc</emphasis> directory. In the preceding instructions for incorporating AFS into the kernel, you
4090 copied the script directly to the operating system's conventional location for initialization files. When you incorporate
4091 AFS into the machine's startup sequence in a later step, you can choose to link the two files.</para>
4093 <para>On some system types that use a dynamic kernel loader program, you previously copied AFS library files into a
4094 subdirectory of the <emphasis role="bold">/usr/vice/etc</emphasis> directory. On other system types, you copied the
4095 appropriate AFS library file directly to the directory where the operating system accesses it. The following commands do
4096 not copy or recopy the AFS library files into the <emphasis role="bold">/usr/vice/etc</emphasis> directory, because on
4097 some system types the library files consume a large amount of space. If you want to copy them, add the <emphasis
4098 role="bold">-r</emphasis> flag to the first <emphasis role="bold">cp</emphasis> command and skip the second <emphasis
4099 role="bold">cp</emphasis> command.</para>
4102 # <emphasis role="bold">cd /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/root.client/usr/vice/etc</emphasis>
4103 # <emphasis role="bold">cp -p * /usr/vice/etc</emphasis>
4104 # <emphasis role="bold">cp -rp C /usr/vice/etc</emphasis>
4107 </orderedlist></para>
4110 <primary>cell name</primary>
4112 <secondary>setting in client ThisCell file</secondary>
4114 <tertiary>first AFS machine</tertiary>
4118 <primary>setting</primary>
4120 <secondary>cell name in client ThisCell file</secondary>
4122 <tertiary>first AFS machine</tertiary>
4126 <primary>first AFS machine</primary>
4128 <secondary>ThisCell file (client)</secondary>
4132 <primary>first AFS machine</primary>
4134 <secondary>cell membership, defining</secondary>
4136 <tertiary>for client processes</tertiary>
4140 <primary>usr/vice/etc/ThisCell</primary>
4142 <see>ThisCell file (client)</see>
4146 <primary>ThisCell file (client)</primary>
4148 <secondary>first AFS machine</secondary>
4152 <primary>files</primary>
4154 <secondary>ThisCell (client)</secondary>
4158 <sect1 id="HDRWQ65">
4159 <title>Defining Cell Membership for Client Processes</title>
4161 <para>Every AFS client machine has a copy of the <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> file on its local disk
4162 to define the machine's cell membership for the AFS client programs that run on it. The <emphasis
4163 role="bold">ThisCell</emphasis> file you created in the <emphasis role="bold">/usr/afs/etc</emphasis> directory (in <link
4164 linkend="HDRWQ51">Defining Cell Name and Membership for Server Processes</link>) is used only by server processes.</para>
4166 <para>Among other functions, the <emphasis role="bold">ThisCell</emphasis> file on a client machine determines the following:
4169 <para>The cell in which users gain tokens when they log onto the
4170 machine, assuming it is using an AFS-modified login utility</para>
4174 <para>The cell in which users gain tokens by default when they issue
4175 the <emphasis role="bold">aklog</emphasis> command</para>
4179 <para>The cell membership of the AFS server processes that the AFS
4180 command interpreters on this machine contact by default</para>
4185 <para>Change to the <emphasis role="bold">/usr/vice/etc</emphasis> directory and remove the symbolic link created in <link
4186 linkend="HDRWQ50">Starting the BOS Server</link>. <programlisting>
4187 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
4188 # <emphasis role="bold">rm ThisCell</emphasis>
4189 </programlisting></para>
4193 <para>Create the <emphasis role="bold">ThisCell</emphasis> file as a copy of the <emphasis
4194 role="bold">/usr/afs/etc/ThisCell</emphasis> file. Defining the same local cell for both server and client processes leads
4195 to the most consistent AFS performance. <programlisting>
4196 # <emphasis role="bold">cp /usr/afs/etc/ThisCell ThisCell</emphasis>
4197 </programlisting></para>
4199 </orderedlist></para>
4202 <primary>database server machine</primary>
4204 <secondary>entry in client CellServDB file</secondary>
4206 <tertiary>on first AFS machine</tertiary>
4210 <primary>usr/vice/etc/CellServDB</primary>
4212 <see>CellServDB file (client)</see>
4216 <primary>CellServDB file (client)</primary>
4218 <secondary>creating</secondary>
4220 <tertiary>on first AFS machine</tertiary>
4224 <primary>creating</primary>
4226 <secondary>CellServDB file (client)</secondary>
4228 <tertiary>first AFS machine</tertiary>
4232 <primary>CellServDB file (client)</primary>
4234 <secondary>required format</secondary>
4238 <primary>requirements</primary>
4240 <secondary>CellServDB file format (client version)</secondary>
4244 <primary>files</primary>
4246 <secondary>CellServDB (client)</secondary>
4250 <primary>first AFS machine</primary>
4252 <secondary>CellServDB file (client)</secondary>
4256 <sect1 id="HDRWQ66">
4257 <title>Creating the Client CellServDB File</title>
4259 <para>The <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> file on a client machine's local disk lists the database
4260 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
4261 list of database server machines is wrong, then users working on this machine cannot access the cell. The chapter in the
4262 <emphasis>OpenAFS Administration Guide</emphasis> about administering client machines explains how to maintain the file after
4265 <para>As the <emphasis role="bold">afsd</emphasis> program initializes the Cache Manager, it copies the contents of the
4266 <emphasis role="bold">CellServDB</emphasis> file into kernel memory. The Cache Manager always consults the list in kernel memory
4267 rather than the <emphasis role="bold">CellServDB</emphasis> file itself. Between reboots of the machine, you can use the
4268 <emphasis role="bold">fs newcell</emphasis> command to update the list in kernel memory directly; see the chapter in the
4269 <emphasis>OpenAFS Administration Guide</emphasis> about administering client machines.</para>
4271 <para>The AFS distribution includes the file
4272 <emphasis role="bold">CellServDB.dist</emphasis>. It includes an entry for
4273 all AFS cells that agreed to share their database server machine
4274 information at the time the distribution was
4275 created. The definitive copy of this file is maintained at
4276 grand.central.org, and updates may be obtained from
4277 /afs/grand.central.org/service/CellServDB or
4278 <ulink url="http://grand.central.org/dl/cellservdb/CellServDB">
4279 http://grand.central.org/dl/cellservdb/CellServDB</ulink></para>
4281 <para>The <emphasis role="bold">CellServDB.dist</emphasis> file can be a
4282 good basis for the client <emphasis role="bold">CellServDB</emphasis> file,
4283 because all of the entries in it use the correct format. You can add or
4284 remove cell entries as you see fit. Depending on your cache manager
4285 configuration, additional steps (as detailed in
4286 <link linkend="HDRWQ91">Enabling Access to Foreign Cells</link>) may be
4287 required to enable the Cache Manager to actually reach the cells.</para>
4289 <para>In this section, you add an entry for the local cell to the local <emphasis role="bold">CellServDB</emphasis> file. The
4290 current working directory is still <emphasis role="bold">/usr/vice/etc</emphasis>. <orderedlist>
4292 <para>Remove the symbolic link created in <link linkend="HDRWQ50">Starting the BOS Server</link> and rename the <emphasis
4293 role="bold">CellServDB.sample</emphasis> file to <emphasis role="bold">CellServDB</emphasis>. <programlisting>
4294 # <emphasis role="bold">rm CellServDB</emphasis>
4295 # <emphasis role="bold">mv CellServDB.sample CellServDB</emphasis>
4296 </programlisting></para>
4300 <para>Add an entry for the local cell to the <emphasis role="bold">CellServDB</emphasis> file. One easy method is to use
4301 the <emphasis role="bold">cat</emphasis> command to append the contents of the server <emphasis
4302 role="bold">/usr/afs/etc/CellServDB</emphasis> file to the client version. <programlisting>
4303 # <emphasis role="bold">cat /usr/afs/etc/CellServDB >> CellServDB</emphasis>
4304 </programlisting></para>
4306 <para>Then open the file in a text editor to verify that there are no blank lines, and that all entries have the required
4307 format, which is described just following. The ordering of cells is not significant, but it can be convenient to have the
4308 client machine's home cell at the top; move it there now if you wish. <itemizedlist>
4310 <para>The first line of a cell's entry has the following format: <programlisting>
4311 ><replaceable>cell_name</replaceable> #<replaceable>organization</replaceable>
4312 </programlisting></para>
4314 <para>where <replaceable>cell_name</replaceable> is the cell's complete Internet domain name (for example, <emphasis
4315 role="bold">example.com</emphasis>) and <replaceable>organization</replaceable> is an optional field that follows any
4316 number of spaces and the number sign (<computeroutput>#</computeroutput>). By convention it names the organization
4317 to which the cell corresponds (for example, the Example Corporation).</para>
4321 <para>After the first line comes a separate line for each database server machine. Each line has the following
4322 format: <programlisting>
4323 <replaceable>IP_address</replaceable> #<replaceable>machine_name</replaceable>
4324 </programlisting></para>
4326 <para>where <replaceable>IP_address</replaceable> is the machine's IP address in dotted decimal format (for example,
4327 192.12.105.3). Following any number of spaces and the number sign (<computeroutput>#</computeroutput>) is
4328 <replaceable>machine_name</replaceable>, the machine's fully-qualified hostname (for example, <emphasis
4329 role="bold">db1.example.com</emphasis>). In this case, the number sign does not indicate a comment;
4330 <replaceable>machine_name</replaceable> is a required field.</para>
4332 </itemizedlist></para>
4336 <para>If the file includes cells that you do not wish users of this machine to access, remove their entries.</para>
4338 </orderedlist></para>
4340 <para>The following example shows entries for two cells, each of which has three database server machines:</para>
4343 >example.com #Example Corporation (home cell)
4344 192.12.105.3 #db1.example.com
4345 192.12.105.4 #db2.example.com
4346 192.12.105.55 #db3.example.com
4347 >example.org #Example Organization cell
4348 138.255.68.93 #serverA.example.org
4349 138.255.68.72 #serverB.example.org
4350 138.255.33.154 #serverC.example.org
4354 <primary>cache</primary>
4356 <secondary>configuring</secondary>
4358 <tertiary>first AFS machine</tertiary>
4362 <primary>configuring</primary>
4364 <secondary>cache</secondary>
4366 <tertiary>first AFS machine</tertiary>
4370 <primary>setting</primary>
4372 <secondary>cache size and location</secondary>
4374 <tertiary>first AFS machine</tertiary>
4378 <primary>first AFS machine</primary>
4380 <secondary>cache size and location</secondary>
4384 <sect1 id="HDRWQ67">
4385 <title>Configuring the Cache</title>
4387 <para>The Cache Manager uses a cache on the local disk or in machine memory to store local copies of files fetched from file
4388 server machines. As the <emphasis role="bold">afsd</emphasis> program initializes the Cache Manager, it sets basic cache
4389 configuration parameters according to definitions in the local <emphasis role="bold">/usr/vice/etc/cacheinfo</emphasis> file.
4390 The file has three fields: <orderedlist>
4392 <para>The first field names the local directory on which to mount the AFS filespace. The conventional location is the
4393 <emphasis role="bold">/afs</emphasis> directory.</para>
4397 <para>The second field defines the local disk directory to use for the disk cache. The conventional location is the
4398 <emphasis role="bold">/usr/vice/cache</emphasis> directory, but you can specify an alternate directory if another
4399 partition has more space available. There must always be a value in this field, but the Cache Manager ignores it if the
4400 machine uses a memory cache.</para>
4404 <para>The third field specifies the number of kilobyte (1024 byte) blocks to allocate for the cache.</para>
4406 </orderedlist></para>
4408 <para>The values you define must meet the following requirements. <itemizedlist>
4410 <para>On a machine using a disk cache, the Cache Manager expects always to be able to use the amount of space specified in
4411 the third field. Failure to meet this requirement can cause serious problems, some of which can be repaired only by
4412 rebooting. You must prevent non-AFS processes from filling up the cache partition. The simplest way is to devote a
4413 partition to the cache exclusively.</para>
4417 <para>The amount of space available in memory or on the partition housing the disk cache directory imposes an absolute
4418 limit on cache size.</para>
4422 <para>The maximum supported cache size can vary in each AFS release; see the <emphasis>OpenAFS Release Notes</emphasis>
4423 for the current version.</para>
4427 <para>For a disk cache, you cannot specify a value in the third field that exceeds 95% of the space available on the
4428 partition mounted at the directory named in the second field. If you violate this restriction, the <emphasis
4429 role="bold">afsd</emphasis> program exits without starting the Cache Manager and prints an appropriate message on the
4430 standard output stream. A value of 90% is more appropriate on most machines. Some operating systems (such as AIX) do not
4431 automatically reserve some space to prevent the partition from filling completely; for them, a smaller value (say, 80% to
4432 85% of the space available) is more appropriate.</para>
4436 <para>For a memory cache, you must leave enough memory for other processes and applications to run. If you try to allocate
4437 more memory than is actually available, the <emphasis role="bold">afsd</emphasis> program exits without initializing the
4438 Cache Manager and produces the following message on the standard output stream. <programlisting>
4439 afsd: memCache allocation failure at <replaceable>number</replaceable> KB
4440 </programlisting></para>
4442 <para>The <replaceable>number</replaceable> value is how many kilobytes were allocated just before the failure, and so
4443 indicates the approximate amount of memory available.</para>
4445 </itemizedlist></para>
4447 <para>Within these hard limits, the factors that determine appropriate cache size include the number of users working on the
4448 machine, the size of the files with which they work, and (for a memory cache) the number of processes that run on the machine.
4449 The higher the demand from these factors, the larger the cache needs to be to maintain good performance.</para>
4451 <para>Disk caches smaller than 10 MB do not generally perform well. Machines serving multiple users usually perform better with
4452 a cache of at least 60 to 70 MB. The point at which enlarging the cache further does not really improve performance depends on
4453 the factors mentioned previously and is difficult to predict.</para>
4455 <para>Memory caches smaller than 1 MB are nonfunctional, and the performance of caches smaller than 5 MB is usually
4456 unsatisfactory. Suitable upper limits are similar to those for disk caches but are probably determined more by the demands on
4457 memory from other sources on the machine (number of users and processes). Machines running only a few processes possibly can use
4458 a smaller memory cache.</para>
4460 <sect2 id="HDRWQ68">
4461 <title>Configuring a Disk Cache</title>
4464 <para>Not all file system types that an operating system supports are necessarily supported for use as the cache partition.
4465 For possible restrictions, see the <emphasis>OpenAFS Release Notes</emphasis>.</para>
4468 <para>To configure the disk cache, perform the following procedures: <orderedlist>
4470 <para>Create the local directory to use for caching. The following instruction shows the conventional location,
4471 <emphasis role="bold">/usr/vice/cache</emphasis>. If you are devoting a partition exclusively to caching, as
4472 recommended, you must also configure it, make a file system on it, and mount it at the directory created in this step.
4474 # <emphasis role="bold">mkdir /usr/vice/cache</emphasis>
4475 </programlisting></para>
4479 <para>Create the <emphasis role="bold">cacheinfo</emphasis> file to define the configuration parameters discussed
4480 previously. The following instruction shows the standard mount location, <emphasis role="bold">/afs</emphasis>, and the
4481 standard cache location, <emphasis role="bold">/usr/vice/cache</emphasis>. <programlisting>
4482 # <emphasis role="bold">echo "/afs:/usr/vice/cache:</emphasis><replaceable>#blocks</replaceable><emphasis role="bold">" > /usr/vice/etc/cacheinfo</emphasis>
4483 </programlisting></para>
4485 <para>The following example defines the disk cache size as 50,000 KB:</para>
4488 # <emphasis role="bold">echo "/afs:/usr/vice/cache:50000" > /usr/vice/etc/cacheinfo</emphasis>
4491 </orderedlist></para>
4494 <sect2 id="HDRWQ69">
4495 <title>Configuring a Memory Cache</title>
4497 <para>To configure a memory cache, create the <emphasis role="bold">cacheinfo</emphasis> file to define the configuration
4498 parameters discussed previously. The following instruction shows the standard mount location, <emphasis
4499 role="bold">/afs</emphasis>, and the standard cache location, <emphasis role="bold">/usr/vice/cache</emphasis> (though the
4500 exact value of the latter is irrelevant for a memory cache).</para>
4503 # <emphasis role="bold">echo "/afs:/usr/vice/cache:</emphasis><replaceable>#blocks</replaceable><emphasis role="bold">" > /usr/vice/etc/cacheinfo</emphasis>
4506 <para>The following example allocates 25,000 KB of memory for the cache.</para>
4509 # <emphasis role="bold">echo "/afs:/usr/vice/cache:25000" > /usr/vice/etc/cacheinfo</emphasis>
4513 <primary>Cache Manager</primary>
4515 <secondary>first AFS machine</secondary>
4519 <primary>configuring</primary>
4521 <secondary>Cache Manager</secondary>
4523 <tertiary>first AFS machine</tertiary>
4527 <primary>first AFS machine</primary>
4529 <secondary>Cache Manager</secondary>
4533 <primary>afs (/afs) directory</primary>
4535 <secondary>creating</secondary>
4537 <tertiary>first AFS machine</tertiary>
4541 <primary>AFS initialization script</primary>
4543 <secondary>setting afsd parameters</secondary>
4545 <tertiary>first AFS machine</tertiary>
4549 <primary>first AFS machine</primary>
4551 <secondary>afsd command parameters</secondary>
4556 <sect1 id="HDRWQ70">
4557 <title>Configuring the Cache Manager</title>
4559 <para>By convention, the Cache Manager mounts the AFS filespace on the local <emphasis role="bold">/afs</emphasis> directory. In
4560 this section you create that directory.</para>
4562 <para>The <emphasis role="bold">afsd</emphasis> program sets several cache configuration parameters as it initializes the Cache
4563 Manager, and starts daemons that improve performance. You can use the <emphasis role="bold">afsd</emphasis> command's arguments
4564 to override the parameters' default values and to change the number of some of the daemons. Depending on the machine's cache
4565 size, its amount of RAM, and how many people work on it, you can sometimes improve Cache Manager performance by overriding the
4566 default values. For a discussion of all of the <emphasis role="bold">afsd</emphasis> command's arguments, see its reference page
4567 in the <emphasis>OpenAFS Administration Reference</emphasis>.</para>
4569 <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
4570 <computeroutput>OPTIONS</computeroutput> variable. You can use it to set nondefault values for the command's arguments, in one
4571 of the following ways: <itemizedlist>
4573 <para>You can create an <emphasis role="bold">afsd</emphasis> <emphasis>options file</emphasis> that sets values for
4574 arguments to the <emphasis role="bold">afsd</emphasis> command. If the file exists, its contents are automatically
4575 substituted for the <computeroutput>OPTIONS</computeroutput> variable in the AFS initialization script. The AFS
4576 distribution for some system types includes an options file; on other system types, you must create it.</para>
4578 <para>You use two variables in the AFS initialization script to specify the path to the options file:
4579 <computeroutput>CONFIG</computeroutput> and <computeroutput>AFSDOPT</computeroutput>. On system types that define a
4580 conventional directory for configuration files, the <computeroutput>CONFIG</computeroutput> variable indicates it by
4581 default; otherwise, the variable indicates an appropriate location.</para>
4583 <para>List the desired <emphasis role="bold">afsd</emphasis> options on a single line in the options file, separating each
4584 option with one or more spaces. The following example sets the <emphasis role="bold">-stat</emphasis> argument to 2500,
4585 the <emphasis role="bold">-daemons</emphasis> argument to 4, and the <emphasis role="bold">-volumes</emphasis> argument to
4589 -stat 2500 -daemons 4 -volumes 100
4594 <para>On a machine that uses a disk cache, you can set the <computeroutput>OPTIONS</computeroutput> variable in the AFS
4595 initialization script to one of <computeroutput>$SMALL</computeroutput>, <computeroutput>$MEDIUM</computeroutput>, or
4596 <computeroutput>$LARGE</computeroutput>. The AFS initialization script uses one of these settings if the <emphasis
4597 role="bold">afsd</emphasis> options file named by the <computeroutput>AFSDOPT</computeroutput> variable does not exist. In
4598 the script as distributed, the <computeroutput>OPTIONS</computeroutput> variable is set to the value
4599 <computeroutput>$MEDIUM</computeroutput>.</para>
4602 <para>Do not set the <computeroutput>OPTIONS</computeroutput> variable to <computeroutput>$SMALL</computeroutput>,
4603 <computeroutput>$MEDIUM</computeroutput>, or <computeroutput>$LARGE</computeroutput> on a machine that uses a memory
4604 cache. The arguments it sets are appropriate only on a machine that uses a disk cache.</para>
4607 <para>The script (or on some system types the <emphasis role="bold">afsd</emphasis> options file named by the
4608 <computeroutput>AFSDOPT</computeroutput> variable) defines a value for each of <computeroutput>SMALL</computeroutput>,
4609 <computeroutput>MEDIUM</computeroutput>, and <computeroutput>LARGE</computeroutput> that sets <emphasis
4610 role="bold">afsd</emphasis> command arguments appropriately for client machines of different sizes: <itemizedlist>
4612 <para><computeroutput>SMALL</computeroutput> is suitable for a small machine that serves one or two users and has
4613 approximately 8 MB of RAM and a 20-MB cache</para>
4617 <para><computeroutput>MEDIUM</computeroutput> is suitable for a medium-sized machine that serves two to six users
4618 and has 16 MB of RAM and a 40-MB cache</para>
4622 <para><computeroutput>LARGE</computeroutput> is suitable for a large machine that serves five to ten users and has
4623 32 MB of RAM and a 100-MB cache</para>
4625 </itemizedlist></para>
4629 <para>You can choose not to create an <emphasis role="bold">afsd</emphasis> options file and to set the
4630 <computeroutput>OPTIONS</computeroutput> variable in the initialization script to a null value rather than to the default
4631 <computeroutput>$MEDIUM</computeroutput> value. You can then either set arguments directly on the <emphasis
4632 role="bold">afsd</emphasis> command line in the script, or set no arguments (and so accept default values for all Cache
4633 Manager parameters).</para>
4638 <para>If you are running on a Fedora or RHEL based system, the
4639 openafs-client initialization script behaves differently from that
4640 described above. It sources /etc/sysconfig/openafs, in which the
4641 AFSD_ARGS variable may be set to contain any, or all, of the afsd options
4642 detailed. Note that this script does not support setting an OPTIONS
4643 variable, or the SMALL, MEDIUM and LARGE methods of defining cache size
4649 <para>Create the local directory on which to mount the AFS filespace, by convention <emphasis role="bold">/afs</emphasis>.
4650 If the directory already exists, verify that it is empty. <programlisting>
4651 # <emphasis role="bold">mkdir /afs</emphasis>
4652 </programlisting></para>
4656 <para>On AIX systems, add the following line to the <emphasis role="bold">/etc/vfs</emphasis> file. It enables AIX to
4657 unmount AFS correctly during shutdown. <programlisting>
4659 </programlisting></para>
4663 <para>On non-package based Linux systems, copy the <emphasis role="bold">afsd</emphasis> options file from the <emphasis
4664 role="bold">/usr/vice/etc</emphasis> directory to the <emphasis role="bold">/etc/sysconfig</emphasis> directory, removing
4665 the <emphasis role="bold">.conf</emphasis> extension as you do so. <programlisting>
4666 # <emphasis role="bold">cp /usr/vice/etc/afs.conf /etc/sysconfig/afs</emphasis>
4667 </programlisting></para>
4671 <para>Edit the machine's AFS initialization script or <emphasis role="bold">afsd</emphasis> options file to set
4672 appropriate values for <emphasis role="bold">afsd</emphasis> command parameters. The script resides in the indicated
4673 location on each system type: <itemizedlist>
4675 <para>On AIX systems, <emphasis role="bold">/etc/rc.afs</emphasis></para>
4679 <para>On HP-UX systems, <emphasis role="bold">/sbin/init.d/afs</emphasis></para>
4683 <para>On IRIX systems, <emphasis role="bold">/etc/init.d/afs</emphasis></para>
4687 <para>On Fedora and RHEL systems, <emphasis role="bold">/etc/sysconfg/openafs</emphasis></para>
4691 <para>On non-package based Linux systems, <emphasis role="bold">/etc/sysconfig/afs</emphasis> (the <emphasis
4692 role="bold">afsd</emphasis> options file)</para>
4696 <para>On Solaris systems, <emphasis role="bold">/etc/init.d/afs</emphasis></para>
4698 </itemizedlist></para>
4700 <para>Use one of the methods described in the introduction to this section to add the following flags to the <emphasis
4701 role="bold">afsd</emphasis> command line. If you intend for the machine to remain an AFS client, also set any
4702 performance-related arguments you wish. <itemizedlist>
4704 <para>Add the <emphasis role="bold">-memcache</emphasis> flag if the machine is to use a memory cache.</para>
4708 <para>Add the <emphasis role="bold">-verbose</emphasis> flag to display a trace of the Cache Manager's
4709 initialization on the standard output stream.</para>
4711 </itemizedlist></para>
4714 <note><para>In order to successfully complete the instructions in the
4715 remainder of this guide, it is important that the machine does not have
4716 a synthetic root (as discussed in <link linkend="HDRWQ91">Enabling Access
4717 to Foreign Cells</link>). As some distributions ship with this enabled, it
4718 may be necessary to remove any occurences of the
4719 <emphasis role="bold">-dynroot</emphasis> and
4720 <emphasis role="bold">-afsdb</emphasis> options from both the AFS
4721 initialisation script and options file. If this functionality is
4722 required it may be renabled as detailed in
4723 <link linkend="HDRWQ91">Enabling Access to Foreign Cells</link>.
4728 <primary>overview</primary>
4730 <secondary>completing installation of first machine</secondary>
4734 <primary>first AFS machine</primary>
4736 <secondary>completion of installation</secondary>
4740 <sect1 id="HDRWQ71">
4741 <title>Overview: Completing the Installation of the First AFS Machine</title>
4743 <para>The machine is now configured as an AFS file server and client machine. In this final phase of the installation, you
4744 initialize the Cache Manager and then create the upper levels of your AFS filespace, among other procedures. The procedures are:
4747 <para>Verify that the initialization script works correctly, and incorporate it into the operating system's startup and
4748 shutdown sequence</para>
4752 <para>Create and mount top-level volumes</para>
4756 <para>Create and mount volumes to store system binaries in AFS</para>
4760 <para>Enable access to foreign cells</para>
4764 <para>Institute additional security measures</para>
4768 <para>Remove client functionality if desired</para>
4770 </orderedlist></para>
4773 <primary>AFS initialization script</primary>
4775 <secondary>verifying on first AFS machine</secondary>
4779 <primary>AFS initialization script</primary>
4781 <secondary>running</secondary>
4783 <tertiary>first AFS machine</tertiary>
4787 <primary>first AFS machine</primary>
4789 <secondary>AFS initialization script</secondary>
4791 <tertiary>running/verifying</tertiary>
4795 <primary>running AFS init. script</primary>
4797 <secondary>first AFS machine</secondary>
4801 <primary>invoking AFS init. script</primary>
4807 <sect1 id="HDRWQ72">
4808 <title>Verifying the AFS Initialization Script</title>
4810 <para>At this point you run the AFS initialization script to verify that it correctly invokes all of the necessary programs and
4811 AFS processes, and that they start correctly. The following are the relevant commands: <itemizedlist>
4813 <para>The command that dynamically loads AFS modifications into the kernel, on some system types (not applicable if the
4814 kernel has AFS modifications built in)</para>
4818 <para>The <emphasis role="bold">bosserver</emphasis> command, which starts the BOS Server; it in turn starts the server
4819 processes for which you created entries in the <emphasis role="bold">/usr/afs/local/BosConfig</emphasis> file</para>
4823 <para>The <emphasis role="bold">afsd</emphasis> command, which initializes the Cache Manager</para>
4825 </itemizedlist></para>
4827 <para>On system types that use a dynamic loader program, you must reboot the machine before running the initialization script,
4828 so that it can freshly load AFS modifications into the kernel.</para>
4830 <para>If there are problems during the initialization, attempt to resolve them. The OpenAFS mailing lists can provide assistance if necessary.
4834 <primary>commands</primary>
4836 <secondary>bos shutdown</secondary>
4840 <primary>bos commands</primary>
4842 <secondary>shutdown</secondary>
4846 <para>Issue the <emphasis role="bold">bos shutdown</emphasis> command to shut down the AFS server processes other than the
4847 BOS Server. Include the <emphasis role="bold">-wait</emphasis> flag to delay return of the command shell prompt until all
4848 processes shut down completely. <programlisting>
4849 # <emphasis role="bold">/usr/afs/bin/bos shutdown</emphasis> <<replaceable>machine name</replaceable>> <emphasis
4850 role="bold">-wait</emphasis>
4851 </programlisting></para>
4855 <para>Issue the <emphasis role="bold">ps</emphasis> command to learn the <emphasis role="bold">bosserver</emphasis>
4856 process's process ID number (PID), and then the <emphasis role="bold">kill</emphasis> command to stop it. <programlisting>
4857 # <emphasis role="bold">ps</emphasis> <replaceable>appropriate_ps_options</replaceable> <emphasis role="bold">| grep bosserver</emphasis>
4858 # <emphasis role="bold">kill</emphasis> <replaceable>bosserver_PID</replaceable>
4859 </programlisting></para>
4863 <para>Issue the appropriate commands to run the AFS initialization script for this system type.</para>
4866 <primary>AIX</primary>
4868 <secondary>AFS initialization script</secondary>
4870 <tertiary>on first AFS machine</tertiary>
4873 <para><emphasis role="bold">On AIX systems:</emphasis> <orderedlist>
4875 <para>Reboot the machine and log in again as the local superuser <emphasis role="bold">root</emphasis>.
4877 # <emphasis role="bold">cd /</emphasis>
4878 # <emphasis role="bold">shutdown -r now</emphasis>
4879 login: <emphasis role="bold">root</emphasis>
4880 Password: <replaceable>root_password</replaceable>
4881 </programlisting></para>
4885 <para>Run the AFS initialization script. <programlisting>
4886 # <emphasis role="bold">/etc/rc.afs</emphasis>
4887 </programlisting></para>
4889 </orderedlist></para>
4892 <primary>HP-UX</primary>
4894 <secondary>AFS initialization script</secondary>
4896 <tertiary>on first AFS machine</tertiary>
4899 <para><emphasis role="bold">On HP-UX systems:</emphasis> <orderedlist>
4901 <para>Run the AFS initialization script. <programlisting>
4902 # <emphasis role="bold">/sbin/init.d/afs start</emphasis>
4903 </programlisting></para>
4905 </orderedlist></para>
4908 <primary>IRIX</primary>
4910 <secondary>AFS initialization script</secondary>
4912 <tertiary>on first AFS machine</tertiary>
4916 <primary>afsclient variable (IRIX)</primary>
4918 <secondary>first AFS machine</secondary>
4922 <primary>variables</primary>
4924 <secondary>afsclient (IRIX)</secondary>
4926 <tertiary>first AFS machine</tertiary>
4930 <primary>IRIX</primary>
4932 <secondary>afsclient variable</secondary>
4934 <tertiary>first AFS machine</tertiary>
4938 <primary>afsserver variable (IRIX)</primary>
4940 <secondary>first AFS machine</secondary>
4944 <primary>variables</primary>
4946 <secondary>afsserver (IRIX)</secondary>
4948 <tertiary>first AFS machine</tertiary>
4952 <primary>IRIX</primary>
4954 <secondary>afsserver variable</secondary>
4956 <tertiary>first AFS machine</tertiary>
4959 <para><emphasis role="bold">On IRIX systems:</emphasis> <orderedlist>
4961 <para>If you have configured the machine to use the <emphasis role="bold">ml</emphasis> dynamic loader program,
4962 reboot the machine and log in again as the local superuser <emphasis role="bold">root</emphasis>. <programlisting>
4963 # <emphasis role="bold">cd /</emphasis>
4964 # <emphasis role="bold">shutdown -i6 -g0 -y</emphasis>
4965 login: <emphasis role="bold">root</emphasis>
4966 Password: <replaceable>root_password</replaceable>
4967 </programlisting></para>
4971 <para>Issue the <emphasis role="bold">chkconfig</emphasis> command to activate the <emphasis
4972 role="bold">afsserver</emphasis> and <emphasis role="bold">afsclient</emphasis> configuration variables.
4974 # <emphasis role="bold">/etc/chkconfig -f afsserver on</emphasis>
4975 # <emphasis role="bold">/etc/chkconfig -f afsclient on</emphasis>
4976 </programlisting></para>
4980 <para>Run the AFS initialization script. <programlisting>
4981 # <emphasis role="bold">/etc/init.d/afs start</emphasis>
4982 </programlisting></para>
4984 </orderedlist></para>
4987 <primary>Linux</primary>
4989 <secondary>AFS initialization script</secondary>
4991 <tertiary>on first AFS machine</tertiary>
4994 <para><emphasis role="bold">On Linux systems:</emphasis> <orderedlist>
4996 <para>Reboot the machine and log in again as the local superuser <emphasis role="bold">root</emphasis>.
4998 # <emphasis role="bold">cd /</emphasis>
4999 # <emphasis role="bold">shutdown -r now</emphasis>
5000 login: <emphasis role="bold">root</emphasis>
5001 Password: <replaceable>root_password</replaceable>
5002 </programlisting></para>
5006 <para>Run the AFS initialization scripts.
5008 # <emphasis role="bold">/etc/rc.d/init.d/openafs-client start</emphasis>
5009 # <emphasis role="bold">/etc/rc.d/init.d/openafs-server start</emphasis>
5010 </programlisting></para>
5012 </orderedlist></para>
5015 <primary>Solaris</primary>
5017 <secondary>AFS initialization script</secondary>
5019 <tertiary>on first AFS machine</tertiary>
5022 <para><emphasis role="bold">On Solaris systems:</emphasis> <orderedlist>
5024 <para>Reboot the machine and log in again as the local superuser <emphasis role="bold">root</emphasis>.
5026 # <emphasis role="bold">cd /</emphasis>
5027 # <emphasis role="bold">shutdown -i6 -g0 -y</emphasis>
5028 login: <emphasis role="bold">root</emphasis>
5029 Password: <replaceable>root_password</replaceable>
5030 </programlisting></para>
5034 <para>Run the AFS initialization script. <programlisting>
5035 # <emphasis role="bold">/etc/init.d/afs start</emphasis>
5036 </programlisting></para>
5038 </orderedlist></para>
5042 <para>Wait for the message that confirms that Cache Manager initialization is complete.</para>
5044 <para>On machines that use a disk cache, it can take a while to initialize the Cache Manager for the first time, because
5045 the <emphasis role="bold">afsd</emphasis> program must create all of the <emphasis
5046 role="bold">V</emphasis><replaceable>n</replaceable> files in the cache directory. Subsequent Cache Manager
5047 initializations do not take nearly as long, because the <emphasis role="bold">V</emphasis><replaceable>n</replaceable>
5048 files already exist.</para>
5053 <primary>commands</primary>
5054 <secondary>aklog</secondary>
5058 <primary>aklog command</primary>
5061 <para>If you are working with an existing cell which uses
5062 <emphasis role="bold">kaserver</emphasis> for authentication,
5063 please recall the note in
5064 <link linkend="KAS003">Using this Appendix</link> detailing the
5065 substitution of <emphasis role="bold">kinit</emphasis> and
5066 <emphasis role="bold">aklog</emphasis> with
5067 <emphasis role="bold">klog</emphasis>.</para>
5069 <para>As a basic test of correct AFS functioning, issue the
5070 <emphasis role="bold">kinit</emphasis> and
5071 <emphasis role="bold">aklog</emphasis> commands to authenticate
5072 as the <emphasis role="bold">admin</emphasis> user.
5073 Provide the password (<replaceable>admin_passwd</replaceable>) you
5074 defined in <link linkend="HDRWQ53">Initializing Cell Security</link>.</para>
5077 # <emphasis role="bold">kinit admin</emphasis>
5078 Password: <replaceable>admin_passwd</replaceable>
5079 # <emphasis role="bold">aklog</emphasis>
5083 <primary>commands</primary>
5085 <secondary>tokens</secondary>
5089 <primary>tokens command</primary>
5094 <para>Issue the <emphasis role="bold">tokens</emphasis> command to
5095 verify that the <emphasis role="bold">aklog</emphasis>
5096 command worked correctly. If it did, the output looks similar to the following example for the <emphasis
5097 role="bold">example.com</emphasis> cell, where <emphasis role="bold">admin</emphasis>'s AFS UID is 1. If the output does not
5098 seem correct, resolve the problem. Changes to the AFS initialization script are possibly necessary. The OpenAFS mailing lists can provide assistance as necessary. <programlisting>
5099 # <emphasis role="bold">tokens</emphasis>
5100 Tokens held by the Cache Manager:
5101 User's (AFS ID 1) tokens for afs@example.com [Expires May 22 11:52]
5103 </programlisting></para>
5107 <para>Issue the <emphasis role="bold">bos status</emphasis> command to verify that the output for each process reads
5108 <computeroutput>Currently running normally</computeroutput>. <programlisting>
5109 # <emphasis role="bold">/usr/afs/bin/bos status</emphasis> <<replaceable>machine name</replaceable>>
5110 </programlisting> <indexterm>
5111 <primary>fs commands</primary>
5113 <secondary>checkvolumes</secondary>
5114 </indexterm> <indexterm>
5115 <primary>commands</primary>
5117 <secondary>fs checkvolumes</secondary>
5122 <para>Change directory to the local file system root (<emphasis role="bold">/</emphasis>) and issue the <emphasis
5123 role="bold">fs checkvolumes</emphasis> command. <programlisting>
5124 # <emphasis role="bold">cd /</emphasis>
5125 # <emphasis role="bold">/usr/afs/bin/fs checkvolumes</emphasis>
5126 </programlisting></para>
5128 </orderedlist></para>
5131 <primary>AFS initialization script</primary>
5133 <secondary>adding to machine startup sequence</secondary>
5135 <tertiary>first AFS machine</tertiary>
5139 <primary>installing</primary>
5141 <secondary>AFS initialization script</secondary>
5143 <tertiary>first AFS machine</tertiary>
5147 <primary>first AFS machine</primary>
5149 <secondary>AFS initialization script</secondary>
5151 <tertiary>activating</tertiary>
5155 <primary>activating AFS init. script</primary>
5157 <see>installing</see>
5161 <sect1 id="HDRWQ73">
5162 <title>Activating the AFS Initialization Script</title>
5164 <para>Now that you have confirmed that the AFS initialization script works correctly, take the action necessary to have it run
5165 automatically at each reboot. Proceed to the instructions for your system type: <itemizedlist>
5167 <para><link linkend="HDRWQ74">Activating the Script on AIX Systems</link></para>
5171 <para><link linkend="HDRWQ76">Activating the Script on HP-UX Systems</link></para>
5175 <para><link linkend="HDRWQ77">Activating the Script on IRIX Systems</link></para>
5179 <para><link linkend="HDRWQ78">Activating the Script on Linux Systems</link></para>
5183 <para><link linkend="HDRWQ79">Activating the Script on Solaris Systems</link></para>
5185 </itemizedlist></para>
5188 <primary>AIX</primary>
5190 <secondary>AFS initialization script</secondary>
5192 <tertiary>on first AFS machine</tertiary>
5195 <sect2 id="HDRWQ74">
5196 <title>Activating the Script on AIX Systems</title>
5200 <para>Edit the AIX initialization file, <emphasis role="bold">/etc/inittab</emphasis>, adding the following line to invoke
5201 the AFS initialization script. Place it just after the line that starts NFS daemons. <programlisting>
5202 rcafs:2:wait:/etc/rc.afs > /dev/console 2>&1 # Start AFS services
5203 </programlisting></para>
5207 <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
5208 <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc</emphasis> directories. If you want to avoid
5209 potential confusion by guaranteeing that they are always the same, create a link between them. You can always retrieve the
5210 original script from the AFS CD-ROM if necessary. <programlisting>
5211 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
5212 # <emphasis role="bold">rm rc.afs</emphasis>
5213 # <emphasis role="bold">ln -s /etc/rc.afs</emphasis>
5214 </programlisting></para>
5218 <para>Proceed to <link linkend="HDRWQ80">Configuring the Top Levels of the AFS Filespace</link>.</para>
5223 <primary>HP-UX</primary>
5225 <secondary>AFS initialization script</secondary>
5227 <tertiary>on first AFS machine</tertiary>
5231 <sect2 id="HDRWQ76">
5232 <title>Activating the Script on HP-UX Systems</title>
5236 <para>Change to the <emphasis role="bold">/sbin/init.d</emphasis> directory and issue the <emphasis role="bold">ln
5237 -s</emphasis> command to create symbolic links that incorporate the AFS initialization script into the HP-UX startup and
5238 shutdown sequence. <programlisting>
5239 # <emphasis role="bold">cd /sbin/init.d</emphasis>
5240 # <emphasis role="bold">ln -s ../init.d/afs /sbin/rc2.d/S460afs</emphasis>
5241 # <emphasis role="bold">ln -s ../init.d/afs /sbin/rc2.d/K800afs</emphasis>
5242 </programlisting></para>
5246 <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
5247 <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/sbin/init.d</emphasis> directories. If you want
5248 to avoid potential confusion by guaranteeing that they are always the same, create a link between them. You can always
5249 retrieve the original script from the AFS CD-ROM if necessary. <programlisting>
5250 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
5251 # <emphasis role="bold">rm afs.rc</emphasis>
5252 # <emphasis role="bold">ln -s /sbin/init.d/afs afs.rc</emphasis>
5253 </programlisting></para>
5257 <para>Proceed to <link linkend="HDRWQ80">Configuring the Top Levels of the AFS Filespace</link>.</para>
5262 <primary>IRIX</primary>
5264 <secondary>AFS initialization script</secondary>
5266 <tertiary>on first AFS machine</tertiary>
5270 <sect2 id="HDRWQ77">
5271 <title>Activating the Script on IRIX Systems</title>
5275 <para>Change to the <emphasis role="bold">/etc/init.d</emphasis> directory and issue the <emphasis role="bold">ln
5276 -s</emphasis> command to create symbolic links that incorporate the AFS initialization script into the IRIX startup and
5277 shutdown sequence. <programlisting>
5278 # <emphasis role="bold">cd /etc/init.d</emphasis>
5279 # <emphasis role="bold">ln -s ../init.d/afs /etc/rc2.d/S35afs</emphasis>
5280 # <emphasis role="bold">ln -s ../init.d/afs /etc/rc0.d/K35afs</emphasis>
5281 </programlisting></para>
5285 <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
5286 <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/init.d</emphasis> directories. If you want
5287 to avoid potential confusion by guaranteeing that they are always the same, create a link between them. You can always
5288 retrieve the original script from the AFS CD-ROM if necessary. <programlisting>
5289 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
5290 # <emphasis role="bold">rm afs.rc</emphasis>
5291 # <emphasis role="bold">ln -s /etc/init.d/afs afs.rc</emphasis>
5292 </programlisting></para>
5296 <para>Proceed to <link linkend="HDRWQ80">Configuring the Top Levels of the AFS Filespace</link>.</para>
5301 <primary>Linux</primary>
5303 <secondary>AFS initialization script</secondary>
5305 <tertiary>on first AFS machine</tertiary>
5309 <sect2 id="HDRWQ78">
5310 <title>Activating the Script on Linux Systems</title>
5314 <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>
5315 configuration variables. Based on the instruction in the AFS initialization file that begins with the string
5316 <computeroutput>#chkconfig</computeroutput>, the command automatically creates the symbolic links that incorporate the
5317 script into the Linux startup and shutdown sequence. <programlisting>
5318 # <emphasis role="bold">/sbin/chkconfig --add openafs-client</emphasis>
5319 # <emphasis role="bold">/sbin/chkconfig --add openafs-server</emphasis>
5320 </programlisting></para>
5324 <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
5325 <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/rc.d/init.d</emphasis> directories, and
5326 copies of the <emphasis role="bold">afsd</emphasis> options file in both the <emphasis
5327 role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/sysconfig</emphasis> directories. If you want to avoid
5328 potential confusion by guaranteeing that the two copies of each file are always the same, create a link between them. You
5329 can always retrieve the original script or options file from the AFS CD-ROM if necessary. <programlisting>
5330 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
5331 # <emphasis role="bold">rm afs.rc afs.conf</emphasis>
5332 # <emphasis role="bold">ln -s /etc/rc.d/init.d/afs afs.rc</emphasis>
5333 # <emphasis role="bold">ln -s /etc/sysconfig/afs afs.conf</emphasis>
5334 </programlisting></para>
5338 <para>Proceed to <link linkend="HDRWQ80">Configuring the Top Levels of the AFS Filespace</link>.</para>
5343 <primary>Solaris</primary>
5345 <secondary>AFS initialization script</secondary>
5347 <tertiary>on first AFS machine</tertiary>
5351 <sect2 id="HDRWQ79">
5352 <title>Activating the Script on Solaris Systems</title>
5356 <para>Change to the <emphasis role="bold">/etc/init.d</emphasis> directory and issue the <emphasis role="bold">ln
5357 -s</emphasis> command to create symbolic links that incorporate the AFS initialization script into the Solaris startup and
5358 shutdown sequence. <programlisting>
5359 # <emphasis role="bold">cd /etc/init.d</emphasis>
5360 # <emphasis role="bold">ln -s ../init.d/afs /etc/rc3.d/S99afs</emphasis>
5361 # <emphasis role="bold">ln -s ../init.d/afs /etc/rc0.d/K66afs</emphasis>
5362 </programlisting></para>
5366 <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
5367 <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/init.d</emphasis> directories. If you want
5368 to avoid potential confusion by guaranteeing that they are always the same, create a link between them. You can always
5369 retrieve the original script from the AFS CD-ROM if necessary. <programlisting>
5370 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
5371 # <emphasis role="bold">rm afs.rc</emphasis>
5372 # <emphasis role="bold">ln -s /etc/init.d/afs afs.rc</emphasis>
5373 </programlisting></para>
5378 <primary>AFS filespace</primary>
5380 <secondary>configuring top levels</secondary>
5384 <primary>configuring</primary>
5386 <secondary>AFS filespace (top levels)</secondary>
5391 <sect1 id="HDRWQ80">
5392 <title>Configuring the Top Levels of the AFS Filespace</title>
5394 <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
5395 have run a previous version of AFS, the filespace is already configured. Proceed to <link linkend="HDRWQ83">Storing AFS Binaries
5396 in AFS</link>. <indexterm>
5397 <primary>root.cell volume</primary>
5399 <secondary>creating and replicating</secondary>
5400 </indexterm> <indexterm>
5401 <primary>volume</primary>
5403 <secondary>creating</secondary>
5405 <tertiary>root.cell</tertiary>
5406 </indexterm> <indexterm>
5407 <primary>creating</primary>
5409 <secondary>root.cell volume</secondary>
5412 <para>You created the <emphasis role="bold">root.afs</emphasis> volume in <link linkend="HDRWQ60">Starting the File Server,
5413 Volume Server, and Salvager</link>, and the Cache Manager mounted it automatically on the local <emphasis
5414 role="bold">/afs</emphasis> directory when you ran the AFS initialization script in <link linkend="HDRWQ72">Verifying the AFS
5415 Initialization Script</link>. You now set the access control list (ACL) on the <emphasis role="bold">/afs</emphasis> directory;
5416 creating, mounting, and setting the ACL are the three steps required when creating any volume.</para>
5418 <para>After setting the ACL on the <emphasis role="bold">root.afs</emphasis> volume, you create your cell's <emphasis
5419 role="bold">root.cell</emphasis> volume, mount it as a subdirectory of the <emphasis role="bold">/afs</emphasis> directory, and
5420 set the ACL. Create both a read/write and a regular mount point for the <emphasis role="bold">root.cell</emphasis> volume. The
5421 read/write mount point enables you to access the read/write version of replicated volumes when necessary. Creating both mount
5422 points essentially creates separate read-only and read-write copies of your filespace, and enables the Cache Manager to traverse
5423 the filespace on a read-only path or read/write path as appropriate. For further discussion of these concepts, see the chapter
5424 in the <emphasis>OpenAFS Administration Guide</emphasis> about administering volumes. <indexterm>
5425 <primary>root.afs volume</primary>
5427 <secondary>replicating</secondary>
5428 </indexterm> <indexterm>
5429 <primary>volume</primary>
5431 <secondary>replicating root.afs and root.cell</secondary>
5432 </indexterm> <indexterm>
5433 <primary>replicating volumes</primary>
5436 <para>Then replicate both the <emphasis role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes.
5437 This is required if you want to replicate any other volumes in your cell, because all volumes mounted above a replicated volume
5438 must themselves be replicated in order for the Cache Manager to access the replica.</para>
5440 <para>When the <emphasis role="bold">root.afs</emphasis> volume is replicated, the Cache Manager is programmed to access its
5441 read-only version (<emphasis role="bold">root.afs.readonly</emphasis>) whenever possible. To make changes to the contents of the
5442 <emphasis role="bold">root.afs</emphasis> volume (when, for example, you mount another cell's <emphasis
5443 role="bold">root.cell</emphasis> volume at the second level in your filespace), you must mount the <emphasis
5444 role="bold">root.afs</emphasis> volume temporarily, make the changes, release the volume and remove the temporary mount point.
5445 For instructions, see <link linkend="HDRWQ91">Enabling Access to Foreign Cells</link>. <indexterm>
5446 <primary>fs commands</primary>
5448 <secondary>setacl</secondary>
5449 </indexterm> <indexterm>
5450 <primary>commands</primary>
5452 <secondary>fs setacl</secondary>
5453 </indexterm> <indexterm>
5454 <primary>access control list (ACL), setting</primary>
5455 </indexterm> <indexterm>
5456 <primary>setting</primary>
5458 <secondary>ACL</secondary>
5459 </indexterm> <orderedlist>
5461 <para>Issue the <emphasis role="bold">fs setacl</emphasis> command to edit the ACL on the <emphasis
5462 role="bold">/afs</emphasis> directory. Add an entry that grants the <emphasis role="bold">l</emphasis> (<emphasis
5463 role="bold">lookup</emphasis>) and <emphasis role="bold">r</emphasis> (<emphasis role="bold">read</emphasis>) permissions
5464 to the <emphasis role="bold">system:anyuser</emphasis> group, to enable all AFS users who can reach your cell to traverse
5465 through the directory. If you prefer to enable access only to locally authenticated users, substitute the <emphasis
5466 role="bold">system:authuser</emphasis> group.</para>
5468 <para>Note that there is already an ACL entry that grants all seven access rights to the <emphasis
5469 role="bold">system:administrators</emphasis> group. It is a default entry that AFS places on every new volume's root
5472 <para>The top-level AFS directory, typically /afs, is a special case:
5473 when the client is configured to run in dynroot mode (e.g.
5474 <emphasis role="bold">afsd -dynroot</emphasis>, attempts to set
5475 the ACL on this directory will return <emphasis role="bold">
5476 Connection timed out</emphasis>. This is because the dynamically-
5477 generated root directory is not a part of the global AFS space,
5478 and cannot have an access control list set on it.</para>
5481 # <emphasis role="bold">/usr/afs/bin/fs setacl /afs system:anyuser rl</emphasis>
5485 <primary>commands</primary>
5487 <secondary>vos create</secondary>
5489 <tertiary>root.cell volume</tertiary>
5493 <primary>vos commands</primary>
5495 <secondary>create</secondary>
5497 <tertiary>root.cell volume</tertiary>
5501 <primary>fs commands</primary>
5503 <secondary>mkmount</secondary>
5507 <primary>commands</primary>
5509 <secondary>fs mkmount</secondary>
5513 <primary>mount point</primary>
5517 <primary>creating</primary>
5519 <secondary>mount point</secondary>
5523 <primary>volume</primary>
5525 <secondary>mounting</secondary>
5529 <listitem id="LIWQ81">
5530 <para>Issue the <emphasis role="bold">vos create</emphasis> command to create the <emphasis
5531 role="bold">root.cell</emphasis> volume. Then issue the <emphasis role="bold">fs mkmount</emphasis> command to mount it as
5532 a subdirectory of the <emphasis role="bold">/afs</emphasis> directory, where it serves as the root of your cell's local
5533 AFS filespace. Finally, issue the <emphasis role="bold">fs setacl</emphasis> command to create an ACL entry for the
5534 <emphasis role="bold">system:anyuser</emphasis> group (or <emphasis role="bold">system:authuser</emphasis> group).</para>
5536 <para>For the <replaceable>partition name</replaceable> argument, substitute the name of one of the machine's AFS server
5537 partitions (such as <emphasis role="bold">/vicepa</emphasis>). For the <replaceable>cellname</replaceable> argument,
5538 substitute your cell's fully-qualified Internet domain name (such as <emphasis role="bold">example.com</emphasis>).</para>
5541 # <emphasis role="bold">/usr/afs/bin/vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <emphasis
5542 role="bold">root.cell</emphasis>
5543 # <emphasis role="bold">/usr/afs/bin/fs mkmount /afs/</emphasis><replaceable>cellname</replaceable> <emphasis role="bold">root.cell</emphasis>
5544 # <emphasis role="bold">/usr/afs/bin/fs setacl /afs/</emphasis><replaceable>cellname</replaceable> <emphasis role="bold">system:anyuser rl</emphasis>
5548 <primary>creating</primary>
5550 <secondary>symbolic link</secondary>
5552 <tertiary>for abbreviated cell name</tertiary>
5556 <primary>symbolic link</primary>
5558 <secondary>for abbreviated cell name</secondary>
5562 <primary>cell name</primary>
5564 <secondary>symbolic link for abbreviated</secondary>
5569 <para><emphasis role="bold">(Optional)</emphasis> Create a symbolic link to a shortened cell name, to reduce the length of
5570 pathnames for users in the local cell. For example, in the <emphasis role="bold">example.com</emphasis> cell, <emphasis
5571 role="bold">/afs/example</emphasis> is a link to <emphasis role="bold">/afs/example.com</emphasis>. <programlisting>
5572 # <emphasis role="bold">cd /afs</emphasis>
5573 # <emphasis role="bold">ln -s</emphasis> <replaceable>full_cellname</replaceable> <replaceable>short_cellname</replaceable>
5574 </programlisting> <indexterm>
5575 <primary>read/write mount point for root.afs volume</primary>
5576 </indexterm> <indexterm>
5577 <primary>root.afs volume</primary>
5579 <secondary>read/write mount point</secondary>
5580 </indexterm> <indexterm>
5581 <primary>creating</primary>
5583 <secondary>read/write mount point</secondary>
5588 <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to create a read/write mount point for the <emphasis
5589 role="bold">root.cell</emphasis> volume (you created a regular mount point in Step <link
5590 linkend="LIWQ81">2</link>).</para>
5592 <para>By convention, the name of a read/write mount point begins with a period, both to distinguish it from the regular
5593 mount point and to make it visible only when the <emphasis role="bold">-a</emphasis> flag is used on the <emphasis
5594 role="bold">ls</emphasis> command.</para>
5596 <para>Change directory to <emphasis role="bold">/usr/afs/bin</emphasis> to make it easier to access the command
5600 # <emphasis role="bold">cd /usr/afs/bin</emphasis>
5601 # <emphasis role="bold">./fs mkmount /afs/.</emphasis><replaceable>cellname</replaceable> <emphasis role="bold">root.cell -rw</emphasis>
5605 <primary>commands</primary>
5607 <secondary>vos addsite</secondary>
5611 <primary>vos commands</primary>
5613 <secondary>addsite</secondary>
5617 <primary>volume</primary>
5619 <secondary>defining replication site</secondary>
5623 <primary>defining</primary>
5625 <secondary>replication site for volume</secondary>
5629 <listitem id="LIWQ82">
5630 <para>Issue the <emphasis role="bold">vos addsite</emphasis> command to define a replication site
5631 for both the <emphasis role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes. In each
5632 case, substitute for the <replaceable>partition name</replaceable> argument the partition where the volume's read/write
5633 version resides. When you install additional file server machines, it is a good idea to create replication sites on them
5634 as well. <programlisting>
5635 # <emphasis role="bold">./vos addsite</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <emphasis
5636 role="bold">root.afs</emphasis>
5637 # <emphasis role="bold">./vos addsite</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <emphasis
5638 role="bold">root.cell</emphasis>
5639 </programlisting> <indexterm>
5640 <primary>fs commands</primary>
5642 <secondary>examine</secondary>
5643 </indexterm> <indexterm>
5644 <primary>commands</primary>
5646 <secondary>fs examine</secondary>
5651 <para>Issue the <emphasis role="bold">fs examine</emphasis> command to verify that the Cache Manager can access both the
5652 <emphasis role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes, before you attempt to
5653 replicate them. The output lists each volume's name, volumeID number, quota, size, and the size of the partition that
5654 houses them. If you get an error message instead, do not continue before taking corrective action. <programlisting>
5655 # <emphasis role="bold">./fs examine /afs</emphasis>
5656 # <emphasis role="bold">./fs examine /afs/</emphasis><replaceable>cellname</replaceable>
5657 </programlisting> <indexterm>
5658 <primary>commands</primary>
5660 <secondary>vos release</secondary>
5661 </indexterm> <indexterm>
5662 <primary>vos commands</primary>
5664 <secondary>release</secondary>
5665 </indexterm> <indexterm>
5666 <primary>volume</primary>
5668 <secondary>releasing replicated</secondary>
5669 </indexterm> <indexterm>
5670 <primary>releasing replicated volume</primary>
5675 <para>Issue the <emphasis role="bold">vos release</emphasis> command to release a replica of the <emphasis
5676 role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes to the sites you defined in Step
5677 <link linkend="LIWQ82">5</link>. <programlisting>
5678 # <emphasis role="bold">./vos release root.afs</emphasis>
5679 # <emphasis role="bold">./vos release root.cell</emphasis>
5680 </programlisting> <indexterm>
5681 <primary>fs commands</primary>
5683 <secondary>checkvolumes</secondary>
5684 </indexterm> <indexterm>
5685 <primary>commands</primary>
5687 <secondary>fs checkvolumes</secondary>
5692 <para>Issue the <emphasis role="bold">fs checkvolumes</emphasis> to force the Cache Manager to notice that you have
5693 released read-only versions of the volumes, then issue the <emphasis role="bold">fs examine</emphasis> command again. This
5694 time its output mentions the read-only version of the volumes (<emphasis role="bold">root.afs.readonly</emphasis> and
5695 <emphasis role="bold">root.cell.readonly</emphasis>) instead of the read/write versions, because of the Cache Manager's
5696 bias to access the read-only version of the <emphasis role="bold">root.afs</emphasis> volume if it exists.
5698 # <emphasis role="bold">./fs checkvolumes</emphasis>
5699 # <emphasis role="bold">./fs examine /afs</emphasis>
5700 # <emphasis role="bold">./fs examine /afs/</emphasis><replaceable>cellname</replaceable>
5701 </programlisting></para>
5703 </orderedlist></para>
5706 <primary>storing</primary>
5708 <secondary>AFS binaries in volumes</secondary>
5712 <primary>creating</primary>
5714 <secondary>volume</secondary>
5716 <tertiary>for AFS binaries</tertiary>
5720 <primary>volume</primary>
5722 <secondary>for AFS binaries</secondary>
5726 <primary>binaries</primary>
5728 <secondary>storing AFS in volume</secondary>
5732 <primary>usr/afsws directory</primary>
5736 <primary>directories</primary>
5738 <secondary>/usr/afsws</secondary>
5742 <sect1 id="HDRWQ83">
5743 <title>Storing AFS Binaries in AFS</title>
5745 <note><para>Sites with existing binary distribution mechanisms, including
5746 those which use packaging systems such as RPM, may wish to skip this step,
5747 and use tools native to their operating system to manage AFS configuration
5748 information.</para></note>
5750 <para>In the conventional configuration, you make AFS client binaries and configuration files available in the subdirectories of
5751 the <emphasis role="bold">/usr/afsws</emphasis> directory on client machines (<emphasis role="bold">afsws</emphasis> is an
5752 acronym for <emphasis role="bold">AFS w</emphasis><emphasis>ork</emphasis><emphasis
5753 role="bold">s</emphasis><emphasis>tation</emphasis>). You can conserve local disk space by creating <emphasis
5754 role="bold">/usr/afsws</emphasis> as a link to an AFS volume that houses the AFS client binaries and configuration files for
5755 this system type.</para>
5757 <para>In this section you create the necessary volumes. The conventional location to which to link <emphasis
5758 role="bold">/usr/afsws</emphasis> is <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5759 role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/usr/afsws</emphasis>, where
5760 <replaceable>sysname</replaceable> is the appropriate system type name as specified in the <emphasis>OpenAFS Release
5761 Notes</emphasis>. The instructions in <link linkend="HDRWQ133">Installing Additional Client Machines</link> assume that you have
5762 followed the instructions in this section.</para>
5764 <para>If you have previously run AFS in the cell, the volumes possibly already exist. If so, you need to perform Step <link
5765 linkend="LIWQ86">8</link> only.</para>
5767 <para>The current working directory is still <emphasis role="bold">/usr/afs/bin</emphasis>, which houses the <emphasis
5768 role="bold">fs</emphasis> and <emphasis role="bold">vos</emphasis> command suite binaries. In the following commands, it is
5769 possible you still need to specify the pathname to the commands, depending on how your PATH environment variable is set.
5772 <primary>commands</primary>
5774 <secondary>vos create</secondary>
5776 <tertiary>volume for AFS binaries</tertiary>
5780 <primary>vos commands</primary>
5782 <secondary>create</secondary>
5784 <tertiary>volume for AFS binaries</tertiary>
5787 <listitem id="LIWQ84">
5788 <para>Issue the <emphasis role="bold">vos create</emphasis> command to create volumes for storing
5789 the AFS client binaries for this system type. The following example instruction creates volumes called
5790 <replaceable>sysname</replaceable>, <replaceable>sysname</replaceable>.<emphasis role="bold">usr</emphasis>, and
5791 <replaceable>sysname</replaceable>.<emphasis role="bold">usr.afsws</emphasis>. Refer to the <emphasis>OpenAFS Release
5792 Notes</emphasis> to learn the proper value of <replaceable>sysname</replaceable> for this system type. <programlisting>
5793 # <emphasis role="bold">vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <replaceable>sysname</replaceable>
5794 # <emphasis role="bold">vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <replaceable>sysname</replaceable><emphasis
5795 role="bold">.usr</emphasis>
5796 # <emphasis role="bold">vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <replaceable>sysname</replaceable><emphasis
5797 role="bold">.usr.afsws</emphasis>
5798 </programlisting></para>
5802 <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to mount the newly created volumes. Because the
5803 <emphasis role="bold">root.cell</emphasis> volume is replicated, you must precede the <emphasis>cellname</emphasis> part
5804 of the pathname with a period to specify the read/write mount point, as shown. Then issue the <emphasis role="bold">vos
5805 release</emphasis> command to release a new replica of the <emphasis role="bold">root.cell</emphasis> volume, and the
5806 <emphasis role="bold">fs checkvolumes</emphasis> command to force the local Cache Manager to access them. <programlisting>
5807 # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable> <emphasis
5808 role="bold">-vol</emphasis> <replaceable>sysname</replaceable>
5809 # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
5810 role="bold">/usr</emphasis> <emphasis role="bold">-vol</emphasis> <replaceable>sysname</replaceable><emphasis
5811 role="bold">.usr</emphasis>
5812 # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
5813 role="bold">/usr/afsws</emphasis> <emphasis role="bold">-vol</emphasis> <replaceable>sysname</replaceable><emphasis
5814 role="bold">.usr.afsws</emphasis>
5815 # <emphasis role="bold">vos release root.cell</emphasis>
5816 # <emphasis role="bold">fs checkvolumes</emphasis>
5817 </programlisting></para>
5821 <para>Issue the <emphasis role="bold">fs setacl</emphasis> command to grant the <emphasis role="bold">l</emphasis>
5822 (<emphasis role="bold">lookup</emphasis>) and <emphasis role="bold">r</emphasis> (<emphasis role="bold">read</emphasis>)
5823 permissions to the <emphasis role="bold">system:anyuser</emphasis> group on each new directory's ACL. <programlisting>
5824 # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable>
5825 # <emphasis role="bold">fs setacl -dir . usr usr/afsws -acl system:anyuser rl</emphasis>
5826 </programlisting> <indexterm>
5827 <primary>commands</primary>
5829 <secondary>fs setquota</secondary>
5830 </indexterm> <indexterm>
5831 <primary>fs commands</primary>
5833 <secondary>setquota</secondary>
5834 </indexterm> <indexterm>
5835 <primary>quota for volume</primary>
5836 </indexterm> <indexterm>
5837 <primary>volume</primary>
5839 <secondary>setting quota</secondary>
5840 </indexterm> <indexterm>
5841 <primary>setting</primary>
5843 <secondary>volume quota</secondary>
5847 <listitem id="LIWQ85">
5848 <para>Issue the <emphasis role="bold">fs setquota</emphasis> command to set an unlimited quota on
5849 the volume mounted at the <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5850 role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/usr/afsws</emphasis> directory. This
5851 enables you to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's
5854 <para>If you wish, you can set the volume's quota to a finite value after you complete the copying operation. At that
5855 point, use the <emphasis role="bold">vos examine</emphasis> command to determine how much space the volume is occupying.
5856 Then issue the <emphasis role="bold">fs setquota</emphasis> command to set a quota that is slightly larger.</para>
5859 # <emphasis role="bold">fs setquota /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
5860 role="bold">/usr/afsws 0</emphasis>
5865 <para>Unpack the distribution tarball into the <emphasis role="bold">/tmp/afsdist</emphasis> directory,
5866 if it is not already. <indexterm>
5867 <primary>copying</primary>
5869 <secondary>AFS binaries into volume</secondary>
5870 </indexterm> <indexterm>
5871 <primary>CD-ROM</primary>
5873 <secondary>copying AFS binaries into volume</secondary>
5874 </indexterm> <indexterm>
5875 <primary>first AFS machine</primary>
5877 <secondary>copying</secondary>
5879 <tertiary>AFS binaries into volume</tertiary>
5884 <para>Copy the contents of the indicated directories from the
5885 distribution into the <emphasis
5886 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5887 role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/usr/afsws</emphasis> directory.
5889 # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
5890 role="bold">/usr/afsws</emphasis>
5891 # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/bin .</emphasis>
5892 # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/etc .</emphasis>
5893 # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/include .</emphasis>
5894 # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/lib .</emphasis>
5897 <primary>creating</primary>
5899 <secondary>symbolic link</secondary>
5901 <tertiary>to AFS binaries</tertiary>
5902 </indexterm> <indexterm>
5903 <primary>symbolic link</primary>
5905 <secondary>to AFS binaries from local disk</secondary>
5909 <listitem id="LIWQ86">
5910 <para>Create <emphasis role="bold">/usr/afsws</emphasis> on the local disk as a symbolic link to the
5911 directory <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
5912 role="bold">/@sys/usr/afsws</emphasis>. You can specify the actual system name instead of <emphasis
5913 role="bold">@sys</emphasis> if you wish, but the advantage of using <emphasis role="bold">@sys</emphasis> is that it
5914 remains valid if you upgrade this machine to a different system type. <programlisting>
5915 # <emphasis role="bold">ln -s /afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/@sys/usr/afsws /usr/afsws</emphasis>
5916 </programlisting> <indexterm>
5917 <primary>PATH environment variable for users</primary>
5918 </indexterm> <indexterm>
5919 <primary>variables</primary>
5921 <secondary>PATH, setting for users</secondary>
5926 <para><emphasis role="bold">(Optional)</emphasis> To enable users to issue commands from the AFS suites (such as <emphasis
5927 role="bold">fs</emphasis>) without having to specify a pathname to their binaries, include the <emphasis
5928 role="bold">/usr/afsws/bin</emphasis> and <emphasis role="bold">/usr/afsws/etc</emphasis> directories in the PATH
5929 environment variable you define in each user's shell initialization file (such as <emphasis
5930 role="bold">.cshrc</emphasis>).</para>
5932 </orderedlist></para>
5935 <primary>storing</primary>
5937 <secondary>AFS documentation in volumes</secondary>
5941 <primary>creating</primary>
5943 <secondary>volume</secondary>
5945 <tertiary>for AFS documentation</tertiary>
5949 <primary>volume</primary>
5951 <secondary>for AFS documentation</secondary>
5955 <primary>documentation, creating volume for AFS</primary>
5959 <primary>usr/afsdoc directory</primary>
5963 <primary>directories</primary>
5965 <secondary>/usr/afsdoc</secondary>
5969 <sect1 id="HDRWQ87">
5970 <title>Storing AFS Documents in AFS</title>
5972 <para>The AFS distribution includes the following documents: <itemizedlist>
5974 <para><emphasis>OpenAFS Release Notes</emphasis></para>
5978 <para><emphasis>OpenAFS Quick Beginnings</emphasis></para>
5982 <para><emphasis>OpenAFS User Guide</emphasis></para>
5986 <para><emphasis>OpenAFS Administration Reference</emphasis></para>
5990 <para><emphasis>OpenAFS Administration Guide</emphasis></para>
5992 </itemizedlist></para>
5994 <note><para>OpenAFS Documentation is not currently provided with all
5995 distributions, but may be downloaded separately from the OpenAFS
5996 website</para></note>
5998 <para>The OpenAFS Documentation Distribution has a directory for each
5999 document format provided. The different formats are suitable for online
6000 viewing, printing, or both.</para>
6002 <para>This section explains how to create and mount a volume to house the documents, making them available to your users. The
6003 recommended mount point for the volume is <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
6004 role="bold">/afsdoc</emphasis>. If you wish, you can create a link to the mount point on each client machine's local disk,
6005 called <emphasis role="bold">/usr/afsdoc</emphasis>. Alternatively, you can create a link to the mount point in each user's home
6006 directory. You can also choose to permit users to access only certain documents (most probably, the <emphasis>OpenAFS User
6007 Guide</emphasis>) by creating different mount points or setting different ACLs on different document directories.</para>
6009 <para>The current working directory is still <emphasis role="bold">/usr/afs/bin</emphasis>, which houses the <emphasis
6010 role="bold">fs</emphasis> and <emphasis role="bold">vos</emphasis> command suite binaries you use to create and mount volumes.
6011 In the following commands, it is possible you still need to specify the pathname to the commands, depending on how your PATH
6012 environment variable is set. <orderedlist>
6014 <primary>commands</primary>
6016 <secondary>vos create</secondary>
6018 <tertiary>volume for AFS documentation</tertiary>
6022 <primary>vos commands</primary>
6024 <secondary>create</secondary>
6026 <tertiary>volume for AFS documentation</tertiary>
6030 <para>Issue the <emphasis role="bold">vos create</emphasis> command to create a volume for storing the AFS documentation.
6031 Include the <emphasis role="bold">-maxquota</emphasis> argument to set an unlimited quota on the volume. This enables you
6032 to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's quota.</para>
6034 <para>If you wish, you can set the volume's quota to a finite value after you complete the copying operations. At that
6035 point, use the <emphasis role="bold">vos examine</emphasis> command to determine how much space the volume is occupying.
6036 Then issue the <emphasis role="bold">fs setquota</emphasis> command to set a quota that is slightly larger.</para>
6039 # <emphasis role="bold">vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <emphasis
6040 role="bold">afsdoc -maxquota 0</emphasis>
6045 <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to mount the new volume. Because the <emphasis
6046 role="bold">root.cell</emphasis> volume is replicated, you must precede the <emphasis>cellname</emphasis> with a period to
6047 specify the read/write mount point, as shown. Then issue the <emphasis role="bold">vos release</emphasis> command to
6048 release a new replica of the <emphasis role="bold">root.cell</emphasis> volume, and the <emphasis role="bold">fs
6049 checkvolumes</emphasis> command to force the local Cache Manager to access them. <programlisting>
6050 # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc</emphasis> <emphasis
6051 role="bold">-vol</emphasis> <emphasis role="bold">afsdoc</emphasis>
6052 # <emphasis role="bold">vos release root.cell</emphasis>
6053 # <emphasis role="bold">fs checkvolumes</emphasis>
6054 </programlisting></para>
6058 <para>Issue the <emphasis role="bold">fs setacl</emphasis> command to grant the <emphasis role="bold">rl</emphasis>
6059 permissions to the <emphasis role="bold">system:anyuser</emphasis> group on the new directory's ACL. <programlisting>
6060 # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc</emphasis>
6061 # <emphasis role="bold">fs setacl . system:anyuser rl</emphasis>
6062 </programlisting></para>
6066 <para>Unpack the OpenAFS documentation distribution into the
6067 <emphasis role="bold">/tmp/afsdocs</emphasis> directory. You may use
6068 a different directory, in which case the location you use should be
6069 subsituted in the following examples. For instructions on unpacking
6070 the distribution, consult the documentation for your operating
6071 system's <emphasis role="bold">tar</emphasis> command.
6073 <primary>copying</primary>
6075 <secondary>AFS documentation from distribution</secondary>
6076 </indexterm> <indexterm>
6077 <primary>OpenAFS Distribution</primary>
6079 <secondary>copying AFS documentation from</secondary>
6080 </indexterm> <indexterm>
6081 <primary>first AFS machine</primary>
6083 <secondary>copying</secondary>
6085 <tertiary>AFS documentation from OpenAFS distribution</tertiary>
6086 </indexterm> <indexterm>
6087 <primary>index.htm file</primary>
6088 </indexterm> <indexterm>
6089 <primary>files</primary>
6091 <secondary>index.htm</secondary>
6096 <para>Copy the AFS documents in one or more formats from the unpacked distribution into subdirectories of the <emphasis
6097 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc</emphasis> directory. Repeat
6098 the commands for each format. <programlisting>
6099 # <emphasis role="bold">mkdir</emphasis> <replaceable>format_name</replaceable>
6100 # <emphasis role="bold">cd</emphasis> <replaceable>format_name</replaceable>
6101 # <emphasis role="bold">cp -rp /tmp/afsdocs/</emphasis><replaceable>format</replaceable> <emphasis role="bold">.</emphasis>
6102 </programlisting></para>
6104 <para>If you choose to store the HTML version of the documents in AFS, note that in addition to a subdirectory for each
6105 document there are several files with a <emphasis role="bold">.gif</emphasis> extension, which enable readers to move
6106 easily between sections of a document. The file called <emphasis role="bold">index.htm</emphasis> is an introductory HTML
6107 page that contains a hyperlink to each of the documents. For online viewing to work properly, these files must remain in
6108 the top-level HTML directory (the one named, for example, <emphasis
6109 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc/html</emphasis>).</para>
6113 <para><emphasis role="bold">(Optional)</emphasis> If you believe it is helpful to your users to access the AFS documents
6114 in a certain format via a local disk directory, create <emphasis role="bold">/usr/afsdoc</emphasis> on the local disk as a
6115 symbolic link to the documentation directory in AFS (<emphasis
6116 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
6117 role="bold">/afsdoc/</emphasis><replaceable>format_name</replaceable>). <programlisting>
6118 # <emphasis role="bold">ln -s /afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc/</emphasis><replaceable>format_name</replaceable> <emphasis
6119 role="bold">/usr/afsdoc</emphasis>
6120 </programlisting></para>
6122 <para>An alternative is to create a link in each user's home directory to the <emphasis
6123 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
6124 role="bold">/afsdoc/</emphasis><replaceable>format_name</replaceable> directory.</para>
6126 </orderedlist></para>
6129 <primary>storing</primary>
6131 <secondary>system binaries in volumes</secondary>
6135 <primary>creating</primary>
6137 <secondary>volume</secondary>
6139 <tertiary>for system binaries</tertiary>
6143 <primary>volume</primary>
6145 <secondary>for system binaries</secondary>
6149 <primary>binaries</primary>
6151 <secondary>storing system in volumes</secondary>
6155 <sect1 id="HDRWQ88">
6156 <title>Storing System Binaries in AFS</title>
6158 <para>You can also choose to store other system binaries in AFS volumes, such as the standard UNIX programs conventionally
6159 located in local disk directories such as <emphasis role="bold">/etc</emphasis>, <emphasis role="bold">/bin</emphasis>, and
6160 <emphasis role="bold">/lib</emphasis>. Storing such binaries in an AFS volume not only frees local disk space, but makes it
6161 easier to update binaries on all client machines.</para>
6163 <para>The following is a suggested scheme for storing system binaries in AFS. It does not include instructions, but you can use
6164 the instructions in <link linkend="HDRWQ83">Storing AFS Binaries in AFS</link> (which are for AFS-specific binaries) as a
6167 <para>Some files must remain on the local disk for use when AFS is inaccessible (during bootup and file server or network
6168 outages). The required binaries include the following: <itemizedlist>
6170 <para>A text editor, network commands, and so on</para>
6174 <para>Files used during the boot sequence before the <emphasis role="bold">afsd</emphasis> program runs, such as
6175 initialization and configuration files, and binaries for commands that mount file systems</para>
6179 <para>Files used by dynamic kernel loader programs</para>
6181 </itemizedlist></para>
6183 <para>In most cases, it is more secure to enable only locally authenticated users to access system binaries, by granting the
6184 <emphasis role="bold">l</emphasis> (<emphasis role="bold">lookup</emphasis>) and <emphasis role="bold">r</emphasis> (<emphasis
6185 role="bold">read</emphasis>) permissions to the <emphasis role="bold">system:authuser</emphasis> group on the ACLs of
6186 directories that contain the binaries. If users need to access a binary while unauthenticated, however, the ACL on its directory
6187 must grant those permissions to the <emphasis role="bold">system:anyuser</emphasis> group.</para>
6189 <para>The following chart summarizes the suggested volume and mount point names for storing system binaries. It uses a separate
6190 volume for each directory. You already created a volume called <replaceable>sysname</replaceable> for this machine's system type
6191 when you followed the instructions in <link linkend="HDRWQ83">Storing AFS Binaries in AFS</link>.</para>
6193 <para>You can name volumes in any way you wish, and mount them at other locations than those suggested here. However, this
6194 scheme has several advantages: <itemizedlist>
6196 <para>Volume names clearly identify volume contents</para>
6200 <para>Using the <replaceable>sysname</replaceable> prefix on every volume makes it is easy to back up all of the volumes
6201 together, because the AFS Backup System enables you to define sets of volumes based on a string included in all of their
6206 <para>It makes it easy to track related volumes, keeping them together on the same file server machine if desired</para>
6210 <para>There is a clear relationship between volume name and mount point name</para>
6212 </itemizedlist></para>
6214 <informaltable frame="none">
6216 <colspec colwidth="50*" />
6218 <colspec colwidth="50*" />
6222 <entry><emphasis role="bold">Volume Name</emphasis></entry>
6224 <entry><emphasis role="bold">Mount Point</emphasis></entry>
6230 <entry><replaceable>sysname</replaceable></entry>
6233 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable></entry>
6237 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">bin</emphasis></entry>
6240 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6241 role="bold">/bin</emphasis></entry>
6245 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">etc</emphasis></entry>
6248 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6249 role="bold">/etc</emphasis></entry>
6253 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr</emphasis></entry>
6256 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6257 role="bold">/usr</emphasis></entry>
6261 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.afsws</emphasis></entry>
6264 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6265 role="bold">/usr/afsws</emphasis></entry>
6269 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.bin</emphasis></entry>
6272 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6273 role="bold">/usr/bin</emphasis></entry>
6277 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.etc</emphasis></entry>
6280 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6281 role="bold">/usr/etc</emphasis></entry>
6285 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.inc</emphasis></entry>
6288 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6289 role="bold">/usr/include</emphasis></entry>
6293 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.lib</emphasis></entry>
6296 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6297 role="bold">/usr/lib</emphasis></entry>
6301 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.loc</emphasis></entry>
6304 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6305 role="bold">/usr/local</emphasis></entry>
6309 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.man</emphasis></entry>
6312 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6313 role="bold">/usr/man</emphasis></entry>
6317 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.sys</emphasis></entry>
6320 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
6321 role="bold">/usr/sys</emphasis></entry>
6328 <primary>foreign cell, enabling access</primary>
6332 <primary>cell</primary>
6334 <secondary>enabling access to foreign</secondary>
6338 <primary>access</primary>
6340 <secondary>to local and foreign cells</secondary>
6344 <primary>AFS filespace</primary>
6346 <secondary>enabling access to foreign cells</secondary>
6350 <primary>root.cell volume</primary>
6352 <secondary>mounting for foreign cells in local filespace</secondary>
6356 <primary>database server machine</primary>
6358 <secondary>entry in client CellServDB file</secondary>
6360 <tertiary>for foreign cell</tertiary>
6364 <primary>CellServDB file (client)</primary>
6366 <secondary>adding entry</secondary>
6368 <tertiary>for foreign cell</tertiary>
6372 <sect1 id="HDRWQ91">
6373 <title>Enabling Access to Foreign Cells</title>
6375 <para>With current OpenAFS releases, there exist a number of mechanisms for
6376 providing access to foreign cells. You may add mount points in your AFS
6377 filespace for each foreign cell you wish users to access, or you can
6378 enable a 'synthetic' AFS root, which contains mountpoints for either all
6379 AFS cells defined in the client machine's local
6380 <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis>, or for all cells
6381 providing location information in the DNS.
6385 <title>Enabling a Synthetic AFS root</title>
6387 <para>When a synthetic root is enabled, the client cache machine creates its
6388 own root.afs volume, rather than using the one provided with your cell. This
6389 allows clients to access all cells in the
6390 <emphasis role="bold">CellServDB</emphasis> file and, optionally, all cells
6391 registered in the DNS, without requiring system administrator action to
6392 enable this access. Using a synthetic root has the additional advantage that
6393 it allows a client to start its AFS service without a network available, as
6394 it is no longer necessary to contact a fileserver to obtain the root volume.
6397 <para>OpenAFS supports two complimentary mechanisms for creating the
6398 synthetic root. Starting the cache manager with the
6399 <emphasis role="bold">-dynroot</emphasis> option adds all cells listed
6400 in <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> to the client's
6401 AFS root. Adding the <emphasis role="bold">-afsdb</emphasis> option in
6402 addition to this enables DNS lookups for any cells that are not found in
6403 the client's CellServDB file. Both of these options are added to the AFS
6404 initialisation script, or options file, as detailed in
6405 <link linkend="HDRWQ70">Configuring the Cache Manager</link>.</para>
6408 <title>Adding foreign cells to a conventional root volume</title>
6410 <para>In this section you create a mount point in your AFS filespace for the <emphasis role="bold">root.cell</emphasis> volume
6411 of each foreign cell that you want to enable your users to access. For users working on a client machine to access the cell,
6412 there must in addition be an entry for it in the client machine's local <emphasis
6413 role="bold">/usr/vice/etc/CellServDB</emphasis> file. (The instructions in <link linkend="HDRWQ66">Creating the Client
6414 CellServDB File</link> suggest that you use the <emphasis role="bold">CellServDB.sample</emphasis> file included in the AFS
6415 distribution as the basis for your cell's client <emphasis role="bold">CellServDB</emphasis> file. The sample file lists all of
6416 the cells that had agreed to participate in the AFS global namespace at the time your AFS CD-ROM was created. As mentioned in
6417 that section, the AFS Product Support group also maintains a copy of the file, updating it as necessary.)</para>
6419 <para>The chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell administration and configuration issues
6420 discusses the implications of participating in the global AFS namespace. The chapter about administering client machines
6421 explains how to maintain knowledge of foreign cells on client machines, and includes suggestions for maintaining a central
6422 version of the file in AFS. <orderedlist>
6424 <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to mount each foreign cell's <emphasis
6425 role="bold">root.cell</emphasis> volume on a directory called <emphasis
6426 role="bold">/afs/</emphasis><replaceable>foreign_cell</replaceable>. Because the <emphasis role="bold">root.afs</emphasis>
6427 volume is replicated, you must create a temporary mount point for its read/write version in a directory to which you have
6428 write access (such as your cell's <emphasis role="bold">/afs/.</emphasis><replaceable>cellname</replaceable> directory).
6429 Create the mount points, issue the <emphasis role="bold">vos release</emphasis> command to release new replicas to the
6430 read-only sites for the <emphasis role="bold">root.afs</emphasis> volume, and issue the <emphasis role="bold">fs
6431 checkvolumes</emphasis> command to force the local Cache Manager to access the new replica.</para>
6434 <para>You need to issue the <emphasis role="bold">fs mkmount</emphasis> command only once for each foreign cell's
6435 <emphasis role="bold">root.cell</emphasis> volume. You do not need to repeat the command on each client machine.</para>
6438 <para>Substitute your cell's name for <replaceable>cellname</replaceable>.</para>
6441 # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable>
6442 # <emphasis role="bold">/usr/afs/bin/fs mkmount temp root.afs</emphasis>
6445 <para>Repeat the <emphasis role="bold">fs mkmount</emphasis> command for each foreign cell you wish to mount at this
6449 # <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>
6452 <para>Issue the following commands only once.</para>
6455 # <emphasis role="bold">/usr/afs/bin/fs rmmount temp</emphasis>
6456 # <emphasis role="bold">/usr/afs/bin/vos release root.afs</emphasis>
6457 # <emphasis role="bold">/usr/afs/bin/fs checkvolumes</emphasis>
6461 <primary>fs commands</primary>
6463 <secondary>newcell</secondary>
6467 <primary>commands</primary>
6469 <secondary>fs newcell</secondary>
6473 <listitem id="LIWQ92">
6474 <para>If this machine is going to remain an AFS client after you complete the installation, verify
6475 that the local <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> file includes an entry for each foreign
6478 <para>For each cell that does not already have an entry, complete the following instructions: <orderedlist>
6480 <para>Create an entry in the <emphasis role="bold">CellServDB</emphasis> file. Be sure to comply with the formatting
6481 instructions in <link linkend="HDRWQ66">Creating the Client CellServDB File</link>.</para>
6485 <para>Issue the <emphasis role="bold">fs newcell</emphasis> command to add an entry for the cell directly to the
6486 list that the Cache Manager maintains in kernel memory. Provide each database server machine's fully qualified
6487 hostname. <programlisting>
6488 # <emphasis role="bold">/usr/afs/bin/fs newcell</emphasis> <<replaceable>foreign_cell</replaceable>> <<replaceable>dbserver1></replaceable> \
6489 [<<replaceable>dbserver2></replaceable>] [<<replaceable>dbserver3></replaceable>]
6490 </programlisting></para>
6494 <para>If you plan to maintain a central version of the <emphasis role="bold">CellServDB</emphasis> file (the
6495 conventional location is <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
6496 role="bold">/common/etc/CellServDB</emphasis>), create it now as a copy of the local <emphasis
6497 role="bold">/usr/vice/etc/CellServDB</emphasis> file. Verify that it includes an entry for each foreign cell you
6498 want your users to be able to access. <programlisting>
6499 # <emphasis role="bold">mkdir common</emphasis>
6500 # <emphasis role="bold">mkdir common/etc</emphasis>
6501 # <emphasis role="bold">cp /usr/vice/etc/CellServDB common/etc</emphasis>
6502 # <emphasis role="bold">/usr/afs/bin/vos release root.cell</emphasis>
6503 </programlisting></para>
6505 </orderedlist></para>
6509 <para>Issue the <emphasis role="bold">ls</emphasis> command to verify that the new cell's mount point is visible in your
6510 filespace. The output lists the directories at the top level of the new cell's AFS filespace. <programlisting>
6511 # <emphasis role="bold">ls /afs/</emphasis><replaceable>foreign_cell</replaceable>
6512 </programlisting></para>
6516 <para>If you wish to participate in the global AFS namespace, and only
6517 intend running one database server, please
6518 register your cell with grand.central.org at this time.
6519 To do so, email the <emphasis role="bold">CellServDB</emphasis> fragment
6520 describing your cell, together with a contact name and email address
6521 for any queries, to cellservdb@grand.central.org. If you intend
6522 on deploying multiple database servers, please wait until you have
6523 installed all of them before registering your cell.</para>
6526 <para>If you wish to allow your cell to be located through DNS lookups,
6527 at this time you should also add the necessary configuration to your
6530 <para>AFS database servers may be located by creating AFSDB records
6531 in the DNS for the domain name corresponding to the name of your cell.
6532 It's outside the scope of this guide to give an indepth description of
6533 managing, or configuring, your site's DNS. You should consult the
6534 documentation for your DNS server for further details on AFSDB
6537 </orderedlist></para>
6541 <sect1 id="HDRWQ93">
6542 <title>Improving Cell Security</title>
6545 <primary>cell</primary>
6547 <secondary>improving security</secondary>
6551 <primary>security</primary>
6553 <secondary>improving</secondary>
6557 <primary>root superuser</primary>
6559 <secondary>controlling access</secondary>
6563 <primary>access</primary>
6565 <secondary>to root and admin accounts</secondary>
6569 <primary>admin account</primary>
6571 <secondary>controlling access to</secondary>
6575 <primary>AFS filespace</primary>
6577 <secondary>controlling access by root superuser</secondary>
6580 <para>This section discusses ways to improve the security of AFS data
6581 in your cell. Also see the chapter in the <emphasis>OpenAFS
6582 Administration Guide</emphasis> about configuration and administration
6585 <sect2 id="HDRWQ94">
6586 <title>Controlling root Access</title>
6588 <para>As on any machine, it is important to prevent unauthorized users from logging onto an AFS server or client machine as
6589 the local superuser <emphasis role="bold">root</emphasis>. Take care to keep the <emphasis role="bold">root</emphasis>
6590 password secret.</para>
6592 <para>The local <emphasis role="bold">root</emphasis> superuser does not have special access to AFS data through the Cache
6593 Manager (as members of the <emphasis role="bold">system:administrators</emphasis> group do), but it does have the following
6594 privileges: <itemizedlist>
6596 <para>On client machines, the ability to issue commands from the <emphasis role="bold">fs</emphasis> suite that affect
6597 AFS performance</para>
6601 <para>On server machines, the ability to disable authorization checking, or to install rogue process binaries</para>
6603 </itemizedlist></para>
6606 <sect2 id="HDRWQ95">
6607 <title>Controlling System Administrator Access</title>
6609 <para>Following are suggestions for managing AFS administrative privilege: <itemizedlist>
6611 <para>Create an administrative account for each administrator named
6613 <replaceable>username</replaceable><emphasis role="bold">.admin</emphasis>.
6614 Administrators authenticate under these identities only when
6615 performing administrative tasks, and destroy the administrative
6616 tokens immediately after finishing the task (either by issuing the
6617 <emphasis role="bold">unlog</emphasis> command, or the
6618 <emphasis role="bold">kinit</emphasis> and
6619 <emphasis role="bold">aklog</emphasis> commands to adopt their
6620 regular identity).</para>
6624 <para>Set a short ticket lifetime for administrator accounts (for example, 20 minutes) by using the
6625 facilities of your KDC. For instance, with a MIT Kerberos KDC, this
6626 can be performed using the
6627 <emphasis role="bold">--max-ticket-life</emphasis> argument to
6628 the <emphasis role="bold">kadmin modify_principal</emphasis>
6629 command. Do not however, use a short lifetime for users
6630 who issue long-running <emphasis role="bold">backup</emphasis> commands.</para>
6634 <para>Limit the number of system administrators in your cell, especially those who belong to the <emphasis
6635 role="bold">system:administrators</emphasis> group. By default they have all ACL rights on all directories in the local
6636 AFS filespace, and therefore must be trusted not to examine private files.</para>
6640 <para>Limit the use of system administrator accounts on machines in public areas. It is especially important not to
6641 leave such machines unattended without first destroying the administrative tokens.</para>
6645 <para>Limit the use by administrators of standard UNIX commands that make connections to remote machines (such as the
6646 <emphasis role="bold">telnet</emphasis> utility). Many of these programs send passwords across the network without
6647 encrypting them.</para>
6649 </itemizedlist></para>
6652 <primary>BOS Server</primary>
6654 <secondary>checking mode bits on AFS directories</secondary>
6658 <primary>mode bits on local AFS directories</primary>
6662 <primary>UNIX mode bits on local AFS directories</primary>
6666 <sect2 id="HDRWQ96">
6667 <title>Protecting Sensitive AFS Directories</title>
6669 <para>Some subdirectories of the <emphasis role="bold">/usr/afs</emphasis> directory contain files crucial to cell security.
6670 Unauthorized users must not read or write to these files because of the potential for misuse of the information they
6673 <para>As the BOS Server initializes for the first time on a server machine, it creates several files and directories (as
6674 mentioned in <link linkend="HDRWQ50">Starting the BOS Server</link>). It sets their owner to the local superuser <emphasis
6675 role="bold">root</emphasis> and sets their mode bits to enable writing by the owner only; in some cases, it also restricts
6678 <para>At each subsequent restart, the BOS Server checks that the owner and mode bits on these files are still set
6679 appropriately. If they are not, it write the following message to the <emphasis role="bold">/usr/afs/logs/BosLog</emphasis>
6683 Bosserver reports inappropriate access on server directories
6686 <para>The BOS Server does not reset the mode bits, which enables you to set alternate values if you wish.</para>
6688 <para>The following charts lists the expected mode bit settings. A question mark indicates that the BOS Server does not check
6689 that mode bit.</para>
6691 <informaltable frame="none">
6693 <colspec colwidth="30*" />
6695 <colspec colwidth="70*" />
6699 <entry><emphasis role="bold">/usr/afs</emphasis></entry>
6701 <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
6705 <entry><emphasis role="bold">/usr/afs/backup</emphasis></entry>
6707 <entry><computeroutput>drwx</computeroutput>???<computeroutput>---</computeroutput></entry>
6711 <entry><emphasis role="bold">/usr/afs/bin</emphasis></entry>
6713 <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
6717 <entry><emphasis role="bold">/usr/afs/db</emphasis></entry>
6719 <entry><computeroutput>drwx</computeroutput>???<computeroutput>---</computeroutput></entry>
6723 <entry><emphasis role="bold">/usr/afs/etc</emphasis></entry>
6725 <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
6729 <entry><emphasis role="bold">/usr/afs/etc/KeyFile</emphasis></entry>
6731 <entry><computeroutput>-rw</computeroutput>????<computeroutput>---</computeroutput></entry>
6735 <entry><emphasis role="bold">/usr/afs/etc/UserList</emphasis></entry>
6737 <entry><computeroutput>-rw</computeroutput>?????<computeroutput>--</computeroutput></entry>
6741 <entry><emphasis role="bold">/usr/afs/local</emphasis></entry>
6743 <entry><computeroutput>drwx</computeroutput>???<computeroutput>---</computeroutput></entry>
6747 <entry><emphasis role="bold">/usr/afs/logs</emphasis></entry>
6749 <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
6756 <primary>first AFS machine</primary>
6758 <secondary>client functionality</secondary>
6760 <tertiary>removing</tertiary>
6764 <primary>removing</primary>
6766 <secondary>client functionality from first AFS machine</secondary>
6771 <sect1 id="HDRWQ98">
6772 <title>Removing Client Functionality</title>
6774 <para>Follow the instructions in this section only if you do not wish this machine to remain an AFS client. Removing client
6775 functionality means that you cannot use this machine to access AFS files. <orderedlist>
6777 <para>Remove the files from the <emphasis role="bold">/usr/vice/etc</emphasis> directory. The command does not remove the
6778 directory for files used by the dynamic kernel loader program, if it exists on this system type. Those files are still
6779 needed on a server-only machine. <programlisting>
6780 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
6781 # <emphasis role="bold">rm *</emphasis>
6782 # <emphasis role="bold">rm -rf C</emphasis>
6783 </programlisting></para>
6787 <para>Create symbolic links to the <emphasis role="bold">ThisCell</emphasis> and <emphasis
6788 role="bold">CellServDB</emphasis> files in the <emphasis role="bold">/usr/afs/etc</emphasis> directory. This makes it
6789 possible to issue commands from the AFS command suites (such as <emphasis role="bold">bos</emphasis> and <emphasis
6790 role="bold">fs</emphasis>) on this machine. <programlisting>
6791 # <emphasis role="bold">ln -s /usr/afs/etc/ThisCell ThisCell</emphasis>
6792 # <emphasis role="bold">ln -s /usr/afs/etc/CellServDB CellServDB</emphasis>
6793 </programlisting></para>
6797 <para>On IRIX systems, issue the <emphasis role="bold">chkconfig</emphasis> command to deactivate the <emphasis
6798 role="bold">afsclient</emphasis> configuration variable. <programlisting>
6799 # <emphasis role="bold">/etc/chkconfig -f afsclient off</emphasis>
6800 </programlisting></para>
6804 <para>Reboot the machine. Most system types use the <emphasis role="bold">shutdown</emphasis> command, but the appropriate
6805 options vary. <programlisting>
6806 # <emphasis role="bold">cd /</emphasis>
6807 # <emphasis role="bold">shutdown</emphasis> <replaceable>appropriate_options</replaceable>
6808 </programlisting></para>
6810 </orderedlist></para>