guides and info: cleanup
[openafs-wiki.git] / InstallingAdditionalServerMachines.mdwn
1 [[!toc levels=3]]
2
3 # Installing Additional Server Machines
4
5 Instructions for the following procedures appear in the indicated section of this chapter.
6
7 - Installing an Additional File Server Machine
8
9 - Installing Database Server Functionality
10
11 - Removing Database Server Functionality
12
13 The instructions make the following assumptions.
14
15 - You have already installed your cell's first file server machine by following the instructions in Installing the First AFS Machine
16
17 - You are logged in as the local superuser root
18
19 - You are working at the console
20
21 - A standard version of one of the operating systems supported by the current version of AFS is running on the machine
22
23 - You can access the data on the AFS CD-ROMs, either through a local CD-ROM drive or via an NFS mount of a CD-ROM drive attached to a machine that is accessible by network
24
25 - All files on the CD-ROM are owned by root. i.e. The files that you install should be owned by root, or the standard application user for the system.
26
27 # Installing an Additional File Server Machine
28
29 The procedure for installing a new file server machine is similar to installing the first file server machine in your cell. There are a few parts of the installation that differ depending on whether the machine is the same AFS system type as an existing file server machine or is the first file server machine of its system type in your cell. The differences mostly concern the source for the needed binaries and files, and what portions of the Update Server you install:
30
31 - On a new system type, you must load files and binaries from the AFS CD-ROM. You install the server portion of the Update Server to make this machine the binary distribution machine for its system type.
32
33 - On an existing system type, you can copy files and binaries from a previously installed file server machine, rather than from the CD-ROM. You install the client portion of the Update Server to accept updates of binaries, because a previously installed machine of this type was installed as the binary distribution machine.
34
35 These instructions are brief; for more detailed information, refer to the corresponding steps in Installing the First AFS Machine.
36
37 To install a new file server machine, perform the following procedures:
38
39 1. Copy needed binaries and files onto this machine's local disk
40
41 1. Incorporate AFS modifications into the kernel
42
43 1. Configure partitions for storing volumes
44
45 1. Replace the standard fsck utility with the AFS-modified version on some system types
46
47 1. Start the Basic [[OverSeer]] (BOS) Server
48
49 1. Start the appropriate portion of the Update Server
50
51 1. Start the fs process, which incorporates three component processes: the File Server, Volume Server, and Salvager
52
53 1. Start the controller process (called runntp) for the Network Time Protocol Daemon, which synchronizes clocks
54
55 After completing the instructions in this section, you can install database server functionality on the machine according to the instructions in Installing Database Server Functionality.
56
57 # Creating AFS Directories and Performing Platform-Specific Procedures
58
59 Create the /usr/afs and /usr/vice/etc directories on the local disk. Subsequent instructions copy files from the AFS distribution CD-ROM into them, at the appropriate point for each system type.
60
61        # mkdir /usr/afs
62
63        # mkdir /usr/afs/bin
64
65        # mkdir /usr/vice
66
67        # mkdir /usr/vice/etc
68
69        # mkdir /cdrom
70
71 As on the first file server machine, the initial procedures in installing an additional file server machine vary a good deal from platform to platform. For convenience, the following sections group together all of the procedures for a system type. Most of the remaining procedures are the same on every system type, but differences are noted as appropriate. The initial procedures are the following.
72
73 - Incorporate AFS modifications into the kernel, either by using a dynamic kernel loader program or by building a new static kernel
74
75 - Configure server partitions to house AFS volumes
76
77 - Replace the operating system vendor's fsck program with a version that recognizes AFS data
78
79 - If the machine is to remain an AFS client machine, modify the machine's authentication system so that users obtain an AFS token as they log into the local file system. (For this procedure only, the instructions direct you to the platform-specific section in Installing the First AFS Machine.)
80
81 To continue, proceed to the section for this system type:
82
83 - Getting Started on AIX Systems
84
85 - Getting Started on Digital UNIX Systems
86
87 - Getting Started on HP-UX Systems
88
89 - Getting Started on IRIX Systems
90
91 - Getting Started on Linux Systems
92
93 - Getting Started on Solaris Systems
94
95 # Getting Started on AIX Systems
96
97 [[Loading AFS into the AIX Kernel|LoadingAFSIntoTheAIXKernel]]
98
99 ## Replacing the fsck Program Helper on AIX Systems
100
101 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
102
103 [[Replacing the fsck Program Helper on AIX Systems|ReplacingTheFsckProgramHelperOnAIXSystems]]
104
105 ## Configuring Server Volumes on AIX Systems
106
107 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
108
109 [[Configuring Server Volumes on AIX|ConfiguringServerVolumesOnAIX]]
110
111 If the machine is to remain an AFS client, incorporate AFS into its authentication system, following the instructions in [[Enabling AFS Login on AIX Systems|EnablingAFSLoginOnAIXSystems]].
112
113 Proceed to Starting Server Programs.
114
115 # Getting Started on Digital UNIX Systems
116
117 Begin by building AFS modifications into the kernel, then configure server partitions and replace the Digital UNIX fsck program with a version that correctly handles AFS volumes.
118
119 If the machine's hardware and software configuration exactly matches another Digital UNIX machine on which AFS is already built into the kernel, you can copy the kernel from that machine to this one. In general, however, it is better to build AFS modifications into the kernel on each machine according to the following instructions.
120
121 [[Building AFS into the Digital UNIX Kernel|BuildingAFSIntoTheDigitalUNIXKernel]]
122
123 ## Replacing the fsck Program on Digital UNIX Systems
124
125 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
126
127 [[Replacing the fsck Program on Digital UNIX Systems|ReplacingTheFsckProgramOnDigitalUNIXSystems]]
128
129 ## Configuring Server Volumes on Digital UNIX Systems
130
131 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
132
133 [[Configuring Server Volumes on Digital UNIX|ConfiguringServerVolumesOnDigitalUNIX]]
134
135 If the machine is to remain an AFS client, incorporate AFS into its authentication system, following the instructions in [[Enabling AFS Login on Digital UNIX Systems|EnablingAFSLoginOnDigitalUNIXSystems]].
136
137 Proceed to Starting Server Programs.
138
139 # Getting Started on HP-UX Systems
140
141 Begin by building AFS modifications into the kernel, then configure server partitions and replace the HP-UX fsck program with a version that correctly handles AFS volumes.
142
143 [[Building AFS into the HP-UX Kernel|BuildingAFSIntoTheHP-UXKernel]]
144
145 ## Configuring the AFS-modified fsck Program on HP-UX Systems
146
147 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
148
149 [[Configuring the AFS-modified fsck Program on HP-UX Systems|ConfiguringTheAFS-modifiedFsckProgramOnHP-UXSystems]]
150
151 ## Configuring Server Volumes on HP-UX Systems
152
153 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
154
155 [[Configuring Server Volumes on HP-UX|ConfiguringServerVolumesOnHP-UX]]
156
157 If the machine is to remain an AFS client, incorporate AFS into its authentication system, following the instructions in [[Enabling AFS Login on HP-UX Systems|EnablingAFSLoginOnHP-UXSystems]].
158
159 Proceed to Starting Server Programs.
160
161 # Getting Started on IRIX Systems
162
163 Begin by incorporating AFS modifications into the kernel. Either use the ml dynamic loader program, or build a static kernel. Then configure partitions to house AFS volumes. AFS supports use of both EFS and XFS partitions for housing AFS volumes. SGI encourages use of XFS partitions.
164
165 You do not need to replace IRIX fsck program, because the version that SGI distributes handles AFS volumes properly.
166
167 [[Loading AFS into the IRIX Kernel|LoadingAFSIntoTheIRIXKernel]]
168
169 ## Configuring Server Volumes on IRIX Systems
170
171 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
172
173 [[Configuring Server Volumes on IRIX|ConfiguringServerVolumesOnIRIX]]
174
175 1. If the machine is to remain an AFS client, incorporate AFS into its authentication system, following the instructions in [[Enabling AFS Login on IRIX Systems|EnablingAFSLoginOnIRIXSystems]].
176
177 1. Proceed to Starting Server Programs.
178
179 # Getting Started on Linux Systems
180
181 [[Loading AFS into the Linux Kernel|LoadingAFSIntoTheLinuxKernel]]
182
183 ## Configuring Server Volumes on Linux Systems
184
185 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
186
187 [[Configuring Server Volumes on Linux|ConfiguringServerVolumesOnLinux]]
188
189 If the machine is to remain an AFS client, incorporate AFS into its authentication system, following the instructions in [[Enabling AFS Login on Linux Systems|EnablingAFSLoginOnLinuxSystems]].
190
191 Proceed to Starting Server Programs.
192
193 # Getting Started on Solaris Systems
194
195 [[Loading AFS into the Solaris Kernel|LoadingAFSIntoTheSolarisKernel]]
196
197 ## Configuring the AFS-modified fsck Program on Solaris Systems
198
199 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
200
201 [[Configuring the AFS-modified fsck Program on Solaris Systems|ConfiguringTheAFS-modifiedFsckProgramOnSolarisSystems]]
202
203 ## Configuring Server Volumes On Solaris
204
205 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
206
207 [[Configuring Server Volumes on Solaris|ConfiguringServerVolumesOnSolaris]]
208
209 If the machine is to remain an AFS client, incorporate AFS into its authentication system, following the instructions in [[Enabling AFS Login on Solaris Systems|EnablingAFSLoginOnSolarisSystems]].
210
211 Proceed to Starting Server Programs.
212
213 # Starting Server Programs
214
215 In this section you initialize the BOS Server, the Update Server, the controller process for NTPD, and the fs process. You begin by copying the necessary server files to the local disk.
216
217 - Copy file server binaries to the local /usr/afs/bin directory.
218
219 - On a machine of an existing system type, you can either load files from the AFS CD-ROM or use a remote file transfer protocol to copy files from an existing server machine of the same system type. To load from the CD-ROM, see the instructions just following for a machine of a new system type. If using a remote file transfer protocol, copy the complete contents of the existing server machine's /usr/afs/bin directory.
220
221 - On a machine of a new system type, you must use the following instructions to copy files from the AFS CD-ROM.
222
223 - - On the local /cdrom directory, mount the AFS CD-ROM for this machine's system type, if it is not already. For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
224
225 - - Copy files from the CD-ROM to the local /usr/afs directory.
226
227     `# cd /cdrom/<sys_version>/dest/root.server/usr/afs`
228     `# cp -rp  *  /usr/afs`
229
230 1. Copy the contents of the /usr/afs/etc directory from an existing file server machine, using a remote file transfer protocol such as ftp or NFS. If you use a system control machine, it is best to copy the contents of its /usr/afs/etc directory. If you choose not to run a system control machine, copy the directory's contents from any existing file server machine.
231
232 1. Change to the /usr/afs/bin directory and start the BOS Server (bosserver process). Include the -noauth flag to prevent the AFS processes from performing authorization checking. This is a grave compromise of security; finish the remaining instructions in this section in an uninterrupted pass.
233
234        # cd /usr/afs/bin
235
236        # ./bosserver -noauth &
237
238 1. If you run a system control machine, create the upclientetc process as an instance of the client portion of the Update Server. It accepts updates of the common configuration files stored in the system control machine's /usr/afs/etc directory from the upserver process (server portion of the Update Server) running on that machine. The cell's first file server machine was installed as the system control machine in Starting the Server Portion of the Update Server. (If you do not run a system control machine, you must update the contents of the /usr/afs/etc directory on each file server machine, using the appropriate bos commands.)
239
240 By default, the Update Server performs updates every 300 seconds (five minutes). Use the -t argument to specify a different number of seconds. For the machine name argument, substitute the name of the machine you are installing. The command appears on multiple lines here only for legibility reasons.
241
242
243        # ./bos create  <machine name> upclientetc simple  \
244              "/usr/afs/bin/upclient  <system control machine>  \
245              [-t  <time>]  /usr/afs/etc" -cell  <cell name>  -noauth
246
247 1. Create an instance of the Update Server to handle distribution of the file server binaries stored in the /usr/afs/bin directory.
248
249 \* If this is the first file server machine of its AFS system type, create the upserver process as an instance of the server portion of the Update Server. It distributes its copy of the file server process binaries to the other file server machines of this system type that you install in future. Creating this process makes this machine the binary distribution machine for its type.
250
251
252        # ./bos create  <machine name> upserver  simple  \
253              "/usr/afs/bin/upserver -clear /usr/afs/bin"   \
254              -cell <cell name>  -noauth
255
256 \* If this machine is an existing system type, create the upclientbin process as an instance of the client portion of the Update Server. It accepts updates of the AFS binaries from the upserver process running on the binary distribution machine for its system type. For distribution to work properly, the upserver process must already by running on that machine.
257
258 Use the -clear argument to specify that the upclientbin process requests unencrypted transfer of the binaries in the /usr/afs/bin directory. Binaries are not sensitive and encrypting them is time-consuming.
259
260 By default, the Update Server performs updates every 300 seconds (five minutes). Use the -t argument to specify an different number of seconds.
261
262        # ./bos create  <machine name> upclientbin simple  \
263             "/usr/afs/bin/upclient <binary distribution machine>   \
264             [-t <time>] -clear /usr/afs/bin" -cell <cell name>  -noauth
265
266 1. Start the runntp process, which configures the Network Time Protocol Daemon (NTPD) to choose a database server machine chosen randomly from the local /usr/afs/etc/CellServDB file as its time source. In the standard configuration, the first database server machine installed in your cell refers to a time source outside the cell, and serves as the basis for clock synchronization on all server machines.
267
268        # ./bos create  <machine name> runntp simple  \
269              /usr/afs/bin/runntp -cell <cell name>  -noauth
270
271 <dl>
272   <dd>
273     <dl>
274       <dt> Note</dt>
275       <dd> Do not run the runntp process if NTPD or another time synchronization protocol is already running on the machine. Some versions of some operating systems run a time synchronization program by default, as detailed in the IBM AFS Release Notes. </dd>
276     </dl>
277   </dd>
278 </dl>
279
280 Attempting to run multiple instances of the NTPD causes an error. Running NTPD together with another time synchronization protocol is unnecessary and can cause instability in the clock setting.
281
282 1. Start the fs process, which binds together the File Server, Volume Server, and Salvager.
283
284        # ./bos create  <machine name> fs fs   \
285              /usr/afs/bin/fileserver /usr/afs/bin/volserver  \
286              /usr/afs/bin/salvager -cell <cell name>  -noauth
287
288 # Installing Client Functionality
289
290 If you want this machine to be a client as well as a server, follow the instructions in this section. Otherwise, skip to Completing the Installation.
291
292 Begin by loading the necessary client files to the local disk. Then create the necessary configuration files and start the Cache Manager. For more detailed explanation of the procedures involved, see the corresponding instructions in Installing the First AFS Machine (in the sections following Overview: Installing Client Functionality).
293
294 If another AFS machine of this machine's system type exists, the AFS binaries are probably already accessible in your AFS filespace (the conventional location is /afs/cellname/sysname/usr/afsws). If not, or if this is the first AFS machine of its type, copy the AFS binaries for this system type into an AFS volume by following the instructions in Storing AFS Binaries in AFS. Because this machine is not yet an AFS client, you must perform the procedure on an existing AFS machine. However, remember to perform the final step (linking the local directory /usr/afsws to the appropriate location in the AFS file tree) on this machine itself. If you also want to create AFS volumes to house UNIX system binaries for the new system type, see Storing System Binaries in AFS.
295
296 1. Copy client binaries and files to the local disk.
297
298 \* On a machine of an existing system type, you can either load files from the AFS CD-ROM or use a remote file transfer protocol to copy files from an existing server machine of the same system type. To load from the CD-ROM, see the instructions just following for a machine of a new system type. If using a remote file transfer protocol, copy the complete contents of the existing client machine's /usr/vice/etc directory.
299
300 \* On a machine of a new system type, you must use the following instructions to copy files from the AFS CD-ROM.
301
302 1. 1. 1. 1. 1. On the local /cdrom directory, mount the AFS CD-ROM for this machine's system type, if it is not already. For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
303
304 1. 1. 1. 1. 1. Copy files to the local /usr/vice/etc directory.
305
306 This step places a copy of the AFS initialization script (and related files, if applicable) into the /usr/vice/etc directory. In the preceding instructions for incorporating AFS into the kernel, you copied the script directly to the operating system's conventional location for initialization files. When you incorporate AFS into the machine's startup sequence in a later step, you can choose to link the two files.
307
308 On some system types that use a dynamic kernel loader program, you previously copied AFS library files into a subdirectory of the /usr/vice/etc directory. On other system types, you copied the appropriate AFS library file directly to the directory where the operating system accesses it. The following commands do not copy or recopy the AFS library files into the /usr/vice/etc directory, because on some system types the library files consume a large amount of space. If you want to copy them, add the -r flag to the first cp command and skip the second cp command.
309
310        # cd /cdrom/<sys_version>/dest/root.client/usr/vice/etc
311
312        # cp -p  *  /usr/vice/etc
313
314        # cp -rp  C  /usr/vice/etc
315
316 1. Change to the /usr/vice/etc directory and create the [[ThisCell]] file as a copy of the /usr/afs/etc/ThisCell file. You must first remove the symbolic link to the /usr/afs/etc/ThisCell file that the BOS Server created automatically in Starting Server Programs.
317
318        # cd  /usr/vice/etc
319
320        # rm  ThisCell
321
322        # cp  /usr/afs/etc/ThisCell  ThisCell
323
324 1. Remove the symbolic link to the /usr/afs/etc/CellServDB file.
325
326        # rm  CellServDB
327
328 1. Create the /usr/vice/etc/CellServDB file. Use a network file transfer program such as ftp or NFS to copy it from one of the following sources, which are listed in decreasing order of preference:
329
330 \* Your cell's central [[CellServDB]] source file (the conventional location is /afs/cellname/common/etc/CellServDB)
331
332 \* The global [[CellServDB]] file maintained by the AFS Product Support group
333
334 \* An existing client machine in your cell
335
336 \* The [[CellServDB]].sample file included in the sysname/root.client/usr/vice/etc directory of each AFS CD-ROM; add an entry for the local cell by following the instructions in [[Creating the Client CellServDB File|CreatingTheClientCellServDBFile]]
337
338 1. Create the cacheinfo file for either a disk cache or a memory cache. [[Configuring the Cache|ConfiguringTheCache]]
339
340 1. Proceed to [[Configuring the CacheManager|ConfiguringTheCacheManager]]
341
342 1. If appropriate, follow the instructions in Storing AFS Binaries in AFS to copy the AFS binaries for this system type into an AFS volume. See the introduction to this section for further discussion.
343
344 # Completing the Installation
345
346 At this point you run the machine's AFS initialization script to verify that it correctly loads AFS modifications into the kernel and starts the BOS Server, which starts the other server processes. If you have installed client files, the script also starts the Cache Manager. If the script works correctly, perform the steps that incorporate it into the machine's startup and shutdown sequence. If there are problems during the initialization, attempt to resolve them. The AFS Product Support group can provide assistance if necessary.
347
348 If the machine is configured as a client using a disk cache, it can take a while for the afsd program to create all of the Vn files in the cache directory. Messages on the console trace the initialization process.
349
350 1. Issue the bos shutdown command to shut down the AFS server processes other than the BOS Server. Include the -wait flag to delay return of the command shell prompt until all processes shut down completely.
351
352        # /usr/afs/bin/bos shutdown <machine name> -wait -noauth
353
354 1. Issue the ps command to learn the BOS Server's process ID number (PID), and then the kill command to stop the bosserver process.
355
356        # ps appropriate_ps_options | grep bosserver
357
358        # kill bosserver_PID
359
360 1. Run the AFS initialization script by issuing the appropriate commands for this system type.
361
362 ## On AIX systems:
363
364 [[Initialization Script on AIX|InitializationScriptOnAIX]]
365
366 Proceed to Step 4.
367
368 ## On Digital UNIX systems:
369
370 [[Initialization Script on Digital UNIX|InitializationScriptOnDigitalUNIX]]
371
372 Proceed to Step 4.
373
374 ## On HP-UX systems:
375
376 [[Initialization Script on HP-UX|InitializationScriptOnHP-UX]]
377
378 Proceed to Step 4.
379
380 ## On IRIX systems:
381
382 [[Initialization Script on IRIX|InitializationScriptOnIRIX]]
383
384 Proceed to Step 4.
385
386 ## On Linux systems:
387
388 [[Initialization Script on Linux|InitializationScriptOnLinux]]
389
390 Proceed to Step 4.
391
392 ## On Solaris systems:
393
394 [[Initialization Script on Solaris|InitializationScriptOnSolaris]]
395
396 Step 4. Verify that /usr/afs and its subdirectories on the new file server machine meet the ownership and mode bit requirements outlined in Protecting Sensitive AFS Directories. If necessary, use the chmod command to correct the mode bits.
397
398 1. To configure this machine as a database server machine, proceed to Installing Database Server Functionality.
399
400 # Installing Database Server Functionality
401
402 This section explains how to install database server functionality. Database server machines have two defining characteristics. First, they run the Authentication Server, Protection Server, and Volume Location (VL) Server processes. They also run the Backup Server if the cell uses the AFS Backup System, as is assumed in these instructions. Second, they appear in the [[CellServDB]] file of every machine in the cell (and of client machines in foreign cells, if they are to access files in this cell).
403
404 Note the following requirements for database server machines.
405
406 \* In the conventional configuration, database server machines also serve as file server machines (run the File Server, Volume Server and Salvager processes). If you choose not to run file server functionality on a database server machine, then the kernel does not have to incorporate AFS modifications, but the local /usr/afs directory must house most of the standard files and subdirectories. In particular, the /usr/afs/etc/KeyFile file must contain the same keys as all other server machines in the cell. If you run a system control machine, run the upclientetc process on every database server machine other than the system control machine; if you do not run a system control machine, use the bos addkey command as instructed in the chapter in the IBM AFS Administration Guide about maintaining server encryption keys.
407
408 The instructions in this section assume that the machine on which you are installing database server functionality is already a file server machine. Contact the AFS Product Support group to learn how to install database server functionality on a non-file server machine.
409
410 \* During the installation of database server functionality, you must restart all of the database server machines to force the election of a new Ubik coordinator (synchronization site) for each database server process. This can cause a system outage, which usually lasts less than 5 minutes.
411
412 \* Updating the kernel memory list of database server machines on each client machine is generally the most time-consuming part of installing a new database server machine. It is, however, crucial for correct functioning in your cell. Incorrect knowledge of your cell's database server machines can prevent your users from authenticating, accessing files, and issuing AFS commands.
413
414 You update a client's kernel memory list by changing the /usr/vice/etc/CellServDB file and then either rebooting or issuing the fs newcell command. For instructions, see the chapter in the IBM AFS Administration Guide about administering client machines.
415
416 The point at which you update your clients' knowledge of database server machines depends on which of the database server machines has the lowest IP address. The following instructions indicate the appropriate place to update your client machines in either case.
417
418 o If the new database server machine has a lower IP address than any existing database server machine, update the [[CellServDB]] file on every client machine before restarting the database server processes. If you do not, users can become unable to update (write to) any of the AFS databases. This is because the machine with the lowest IP address is usually elected as the Ubik coordinator, and only the Coordinator accepts database writes. On client machines that do not have the new list of database server machines, the Cache Manager cannot locate the new coordinator. (Be aware that if clients contact the new coordinator before it is actually in service, they experience a timeout before contacting another database server machine. This is a minor, and temporary, problem compared to being unable to write to the database.)
419
420 o If the new database server machine does not have the lowest IP address of any database server machine, then it is better to update clients after restarting the database server processes. Client machines do not start using the new database server machine until you update their kernel memory list, but that does not usually cause timeouts or update problems (because the new machine is not likely to become the coordinator).
421
422 ## Summary of Procedures
423
424 To install a database server machine, perform the following procedures.
425
426 1. Install the bos suite of commands locally, as a precaution
427
428 1. Add the new machine to the /usr/afs/etc/CellServDB file on existing file server machines
429
430 1. Update your cell's central [[CellServDB]] source file and the file you make available to foreign cells
431
432 1. Update every client machine's /usr/vice/etc/CellServDB file and kernel memory list of database server machines
433
434 1. Start the database server processes (Authentication Server, Backup Server, Protection Server, and Volume Location Server)
435
436 1. Restart the database server processes on every database server machine
437
438 1. Notify the AFS Product Support group that you have installed a new database server machine
439
440 ## Instructions
441
442 Note: It is assumed that your PATH environment variable includes the directory that houses the AFS command binaries. If not, you possibly need to precede the command names with the appropriate pathname.
443
444 1. You can perform the following instructions on either a server or client machine. Login as an AFS administrator who is listed in the /usr/afs/etc/UserList file on all server machines.
445
446        % klog admin_user
447        Password: admin_password
448
449 1. If you are working on a client machine configured in the conventional manner, the bos command suite resides in the /usr/afsws/bin directory, a symbolic link to an AFS directory. An error during installation can potentially block access to AFS, in which case it is helpful to have a copy of the bos binary on the local disk. This step is not necessary if you are working on a server machine, where the binary resides in the local /usr/afs/bin directory.
450
451        % cp  /usr/afsws/bin/bos   /tmp
452
453 1. Issue the bos addhost command to add the new database server machine to the /usr/afs/etc/CellServDB file on existing server machines (as well as the new database server machine itself).
454
455 Substitute the new database server machine's fully-qualified hostname for the host name argument. If you run a system control machine, substitute its fully-qualified hostname for the machine name argument. If you do not run a system control machine, repeat the bos addhost command once for each server machine in your cell (including the new database server machine itself), by substituting each one's fully-qualified hostname for the machine name argument in turn.
456
457        % bos addhost <machine name>  <host name>
458
459 If you run a system control machine, wait for the Update Server to distribute the new [[CellServDB]] file, which takes up to five minutes by default. If you are issuing individual bos addhost commands, attempt to issue all of them within five minutes.
460
461 <dl>
462   <dd>
463     <dl>
464       <dt> Note</dt>
465       <dd> It is best to maintain a one-to-one mapping between hostnames and IP addresses on a multihomed database server machine (the conventional configuration for any AFS machine). The BOS Server uses the gethostbyname( ) routine to obtain the IP address associated with the host name argument. If there is more than one address, the BOS Server records in the [[CellServDB]] entry the one that appears first in the list of addresses returned by the routine. The routine possibly returns addresses in a different order on different machines, which can create inconsistency. </dd>
466     </dl>
467   </dd>
468 </dl>
469
470 1. (Optional) Issue the bos listhosts command on each server machine to verify that the new database server machine appears in its [[CellServDB]] file.
471
472        % bos listhosts <machine name>
473
474 1. Add the new database server machine to your cell's central [[CellServDB]] source file, if you use one. The standard location is /afs/cellname/common/etc/CellServDB.
475
476 If you are willing to make your cell accessible to users in foreign cells, add the new database server machine to the file that lists your cell's database server machines. The conventional location is /afs/cellname/service/etc/CellServDB.local.
477
478 1. If this machine's IP address is lower than any existing database server machine's, update every client machine's /usr/vice/etc/CellServDB file and kernel memory list to include this machine. (If this machine's IP address is not the lowest, it is acceptable to wait until Step 12.)
479
480 There are several ways to update the [[CellServDB]] file on client machines, as detailed in the chapter of the IBM AFS Administration Guide about administering client machines. One option is to copy over the central update source (which you updated in Step 5), with or without using the package program. To update the machine's kernel memory list, you can either reboot after changing the [[CellServDB]] file or issue the fs newcell command.
481
482 1. Start the Authentication Server (the kaserver process).
483
484        % bos create <machine name> kaserver simple /usr/afs/bin/kaserver
485
486 1. Start the Backup Server (the buserver process). You must perform other configuration procedures before actually using the AFS Backup System, as detailed in the IBM AFS Administration Guide.
487
488        % bos create <machine name> buserver simple /usr/afs/bin/buserver
489
490 1. Start the Protection Server (the ptserver process).
491
492        % bos create <machine name> ptserver simple /usr/afs/bin/ptserver
493
494 10. Start the Volume Location (VL) Server (the vlserver process).
495
496        `% bos create <machine name> vlserver simple /usr/afs/bin/vlserver`
497
498 11. Issue the bos restart command on every database server machine in the cell, including the new machine. The command restarts the Authentication, Backup, Protection, and VL Servers, which forces an election of a new Ubik coordinator for each process. The new machine votes in the election and is considered as a potential new coordinator.
499
500 A cell-wide service outage is possible during the election of a new coordinator for the VL Server, but it normally lasts less than five minutes. Such an outage is particularly likely if you are installing your cell's second database server machine. Messages tracing the progress of the election appear on the console.
501
502 Repeat this command on each of your cell's database server machines in quick succession. Begin with the machine with the lowest IP address.
503
504        %  bos restart <machine name> kaserver buserver ptserver vlserver
505
506 If an error occurs, restart all server processes on the database server machines again by using one of the following methods:
507
508 \* Issue the bos restart command with the -bosserver flag for each database server machine
509
510 \* Reboot each database server machine, either using the bos exec command or at its console
511
512 12. If you did not update the [[CellServDB]] file on client machines in Step 6, do so now.
513
514 13. Send the new database server machine's name and IP address to the AFS Product Support group.
515
516 If you wish to participate in the AFS global name space, your cell's entry appear in a [[CellServDB]] file that the AFS Product Support group makes available to all AFS sites. Otherwise, they list your cell in a private file that they do not share with other AFS sites.
517
518 # Removing Database Server Functionality
519
520 Removing database server machine functionality is nearly the reverse of installing it.
521
522 ## Summary of Procedures
523
524 To decommission a database server machine, perform the following procedures.
525
526 1. Install the bos suite of commands locally, as a precaution
527
528 1. Notify the AFS Product Support group that you are decommissioning a database server machine
529
530 1. Update your cell's central [[CellServDB]] source file and the file you make available to foreign cells
531
532 1. Update every client machine's /usr/vice/etc/CellServDB file and kernel memory list of database server machines
533
534 1. Remove the machine from the /usr/afs/etc/CellServDB file on file server machines
535
536 1. Stop the database server processes and remove them from the /usr/afs/local/BosConfig file if desired
537
538 1. Restart the database server processes on the remaining database server machines
539
540 ## Instructions
541
542 Note: It is assumed that your PATH environment variable includes the directory that houses the AFS command binaries. If not, you possibly need to precede the command names with the appropriate pathname.
543
544 1. You can perform the following instructions on either a server or client machine. Login as an AFS administrator who is listed in the /usr/afs/etc/UserList file on all server machines.
545
546        % klog admin_user
547        Password: admin_password
548
549 1. If you are working on a client machine configured in the conventional manner, the bos command suite resides in the /usr/afsws/bin directory, a symbolic link to an AFS directory. An error during installation can potentially block access to AFS, in which case it is helpful to have a copy of the bos binary on the local disk. This step is not necessary if you are working on a server machine, where the binary resides in the local /usr/afs/bin directory.
550
551        % cp  /usr/afsws/bin/bos   /tmp
552
553 1. Send the revised list of your cell's database server machines to the AFS Product Support group.
554
555 This step is particularly important if your cell is included in the global [[CellServDB]] file. If the administrators in foreign cells do not learn about the change in your cell, they cannot update the [[CellServDB]] file on their client machines. Users in foreign cells continue to send database requests to the decommissioned machine, which creates needless network traffic and activity on the machine. Also, the users experience time-out delays while their request is forwarded to a valid database server machine.
556
557 1. Remove the decommissioned machine from your cell's central [[CellServDB]] source file, if you use one. The conventional location is /afs/cellname/common/etc/CellServDB.
558
559 If you maintain a file that users in foreign cells can access to learn about your cell's database server machines, update it also. The conventional location is /afs/cellname/service/etc/CellServDB.local.
560
561 1. Update every client machine's /usr/vice/etc/CellServDB file and kernel memory list to exclude this machine. Altering the [[CellServDB]] file and kernel memory list before stopping the actual database server processes avoids possible time-out delays that result when users send requests to a decommissioned database server machine that is still listed in the file.
562
563 There are several ways to update the [[CellServDB]] file on client machines, as detailed in the chapter of the IBM AFS Administration Guide about administering client machines. One option is to copy over the central update source (which you updated in Step 5), with or without using the package program. To update the machine's kernel memory list, you can either reboot after changing the [[CellServDB]] file or issue the fs newcell command.
564
565 1. Issue the bos removehost command to remove the decommissioned database server machine from the /usr/afs/etc/CellServDB file on server machines.
566
567 Substitute the decommissioned database server machine's fully-qualified hostname for the host name argument. If you run a system control machine, substitute its fully-qualified hostname for the machine name argument. If you do not run a system control machine, repeat the bos removehost command once for each server machine in your cell (including the decommissioned database server machine itself), by substituting each one's fully-qualified hostname for the machine name argument in turn.
568
569        % bos removehost <machine name>  <host name>
570
571 If you run a system control machine, wait for the Update Server to distribute the new [[CellServDB]] file, which takes up to five minutes by default. If issuing individual bos removehost commands, attempt to issue all of them within five minutes.
572
573 1. (Optional) Issue the bos listhosts command on each server machine to verify that the decommissioned database server machine no longer appears in its [[CellServDB]] file.
574
575        % bos listhosts <machine name>
576
577 1. Issue the bos stop command to stop the database server processes on the machine, by substituting its fully-qualified hostname for the machine name argument. The command changes each process's status in the /usr/afs/local/BosConfig file to [[NotRun]], but does not remove its entry from the file.
578
579        % bos stop <machine name> kaserver buserver ptserver vlserver
580
581 1. (Optional) Issue the bos delete command to remove the entries for database server processes from the [[BosConfig]] file. This step is unnecessary if you plan to restart the database server functionality on this machine in future.
582
583        % bos delete <machine name> kaserver buserver ptserver vlserver
584
585 10. Issue the bos restart command on every database server machine in the cell, to restart the Authentication, Backup, Protection, and VL Servers. This forces the election of a Ubik coordinator for each process, ensuring that the remaining database server processes recognize that the machine is no longer a database server.
586
587 A cell-wide service outage is possible during the election of a new coordinator for the VL Server, but it normally lasts less than five minutes. Messages tracing the progress of the election appear on the console.
588
589 Repeat this command on each of your cell's database server machines in quick succession. Begin with the machine with the lowest IP address.
590
591        %  bos restart <machine name> kaserver buserver ptserver vlserver
592
593 If an error occurs, restart all server processes on the database server machines again by using one of the following methods:
594
595 \* Issue the bos restart command with the -bosserver flag for each database server machine
596
597 \* Reboot each database server machine, either using the bos exec command or at its console
598
599 Copyright IBM Corporation 2000. All Rights Reserved