Creating and Removing Processes

To start a new AFS server process on a server machine, issue the bos create command, which creates an entry in the /usr/afs/local/BosConfig file, sets the process's status flag to Run both in the file and in the BOS Server's memory, and starts it running immediately. The binary file for the new process must already be installed, by convention in the /usr/afs/bin directory (see Installing New Binaries).

To stop a process permanently, first issue the bos stop command, which changes the process's status flag to NotRun in both the BosConfig file and the BOS Server's memory; it is marked as disabled in the output from the bos status command. If desired, issue the bos delete command to remove the process's entry from the BosConfig file; the process no longer appears in the bos status command's output.

Note

If you are starting or stopping a database server process in the manner described in this section, follow the complete instructions in the OpenAFS Quick Beginnings for creating or removing a database server machine. If you run one database server process on a given machine, you must run them all; for more information, see About Starting and Stopping the Database Server Processes. Similarly, if you are stopping the upserver process on the system control machine or a binary distribution machine, you must complete the additional tasks described in About Starting and Stopping the Update Server.

To create and start a new process

  1. Verify that you are authenticated as a user listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. (Optional) Verify that the process's binaries are installed in the /usr/afs/bin directory on this machine. If necessary, login at the console or telnet to the machine and list the contents of the /usr/afs/bin directory.

    If the binaries are not present, install them on the binary distribution machine of the appropriate system type, and wait for the Update Server to copy them to this machine. For instructions, see Installing New Binaries.

       % ls /usr/afs/bin
    
  3. Issue the bos create command to create an entry in the BosConfig file and start the process.

       % bos create <machine name> <server process name>   \
                 <server type> <command lines>+ [ -notifier <Notifier program>]
    

    where

    cr

    Is the shortest acceptable abbreviation of create.

    machine name

    Specifies the file server machine on which to create the process.

    server process name

    Names the process to create and start. For simple processes, the conventional value is the name of the process's binary file. It is best to use the same name on every server machine that runs the process. The following is a list of the conventional names for simple and fs-type processes (there are no standard cron processes).

    • buserver for the Backup Server

    • fs for the process that combines the File Server, Volume Server, and Salvager

    • kaserver for the Authentication Server

    • ptserver for the Protection Server

    • upclientbin for the client portion of the Update Server that references the binary distribution machine of this machine's system type

    • upclientetc for the client portion of the Update Server that references the system control machine

    • vlserver for the Volume Location (VL) Server

    server type

    Defines the process's type. Choose one of the following values:

    • cron for a cron process

    • fs for the process named fs

    • simple for all other processes listed as acceptable values for the server process name argument

    command lines

    Specifies each command the BOS Server runs to start the process. Specify no more than six commands (which can include the command's options, in which case the entire string is surrounded by double quotes); any additional commands are ignored.

    For a simple process, provide the complete pathname of the process's binary file on the local disk (for example, /usr/afs/bin/ptserver for the Protection Server). If including any of the initialization command's options, surround the entire command in double quotes (" "). The upclient process has a required argument, and the commands for all other processes take optional arguments.

    For the fs process, provide the complete pathname of the local disk binary file for each of the component processes: fileserver, volserver, and salvager, in that order. The standard binary directory is /usr/afs/bin. If including any of an initialization command's options, surround the entire command in double quotes (" ").

    For a cron process, provide two parameters:

    • The complete local disk pathname of either an executable file or a command from one of the AFS suites (complete with all of the necessary arguments). Surround this parameter with double quotes (" ") if it contains spaces.

    • A specification of when the BOS Server executes the file or command indicated by the first parameter. There are three acceptable values:

      • The string now, which directs the BOS Server to execute the file or command immediately and only once. It is usually simpler to issue the command directly or issue the bos exec command.

      • A time of day. The BOS Server executes the file or command daily at the indicated time. Separate the hours and minutes with a colon (hh:MM), and use either 24-hour format, or a value in the range from 1:00 through 12:59 with the addition of am or pm. For example, both 14:30 and "2:30 pm" indicate 2:30 in the afternoon. Surround this parameter with double quotes (" ") if it contains a space.

      • A day of the week and time of day, separated by a space and surrounded with double quotes (" "). The BOS Server executes the file or command weekly at the indicated day and time. For the day, provide either the whole name or the first three letters, all in lowercase letters (sunday or sun, thursday or thu, and so on). For the time, use the same format as when specifying the time alone.

    -notifier

    Specifies the pathname of a program that the BOS Server runs when the process terminates. For more information on notifier programs, see the bos create command reference page in the OpenAFS Administration Reference.

The following example defines and starts the Protection Server on the machine db2.example.com:

   % bos create db2.example.com ptserver simple /usr/afs/bin/ptserver

The following example defines and starts the fs process on the machine fs6.example.com.

   % bos create fs6.example.com fs fs /usr/afs/bin/fileserver   \
        /usr/afs/bin/volserver /usr/afs/bin/salvager

The following example defines and starts a cron process called backupuser process on the machine fs3.example.com, scheduling it to run each day at 3:00 a.m.

   % bos create fs3.example.com backupuser cron  "/usr/afs/bin/vos backupsys -prefix user -local" 3:00

To stop a process and remove it from the BosConfig file

  1. Verify that you are authenticated as a user listed in the /usr/afs/etc/UserList file. If necessary, issue the bos listusers command, which is fully described in To display the users in the UserList file.

       % bos listusers <machine name>
    
  2. Issue the bos stop command to change each process's status flag in the BosConfig file to NotRun and to stop it. You must issue this command even for cron processes that you wish to remove from the BosConfig file, even though they do not run continuously. For a detailed description of this command, see To stop a process by changing its status to NotRun.

       % bos stop <machine name> <server process name>+ [-wait]
    
  3. Issue the bos delete command to remove each process from the BosConfig file.

       % bos delete <machine name> <server process name>+
    

    where

    d

    Is the shortest acceptable abbreviation of delete.

    machine name

    Specifies the server machine on which to remove processes from the BosConfig file.

    server process name

    Names each process entry to remove from the BosConfig file. Provide the same names as in Step 2.