Storing AFS Binaries in AFS
| Chapter 2. Installing the First AFS Machine |

## Storing AFS Binaries in AFS

### Note

Sites with existing binary distribution mechanisms, including those which use packaging systems such as RPM, may wish to skip this step, and use tools native to their operating system to manage AFS configuration information.

In the conventional configuration, you make AFS client binaries and configuration files available in the subdirectories of the /usr/afsws directory on client machines (afsws is an acronym for AFS w ork s tation). You can conserve local disk space by creating /usr/afsws as a link to an AFS volume that houses the AFS client binaries and configuration files for this system type.

In this section you create the necessary volumes. The conventional location to which to link /usr/afsws is /afs/`cellname`/`sysname`/usr/afsws, where `sysname` is the appropriate system type name as specified in the OpenAFS Release Notes. The instructions in Installing Additional Client Machines assume that you have followed the instructions in this section.

If you have previously run AFS in the cell, the volumes possibly already exist. If so, you need to perform Step 8 only.

The current working directory is still /usr/afs/bin, which houses the fs and vos command suite binaries. In the following commands, it is possible you still need to specify the pathname to the commands, depending on how your PATH environment variable is set.

1. Issue the vos create command to create volumes for storing the AFS client binaries for this system type. The following example instruction creates volumes called `sysname`, `sysname`.usr, and `sysname`.usr.afsws. Refer to the OpenAFS Release Notes to learn the proper value of `sysname` for this system type.

          # vos create <machine name> <partition name> sysname
          # vos create <machine name> <partition name> sysname.usr
          # vos create <machine name> <partition name> sysname.usr.afsws

2. Issue the fs mkmount command to mount the newly created volumes. Because the root.cell volume is replicated, you must precede the cellname part of the pathname with a period to specify the read/write mount point, as shown. Then issue the vos release command to release a new replica of the root.cell volume, and the fs checkvolumes command to force the local Cache Manager to access them.

          # fs mkmount -dir /afs/.cellname/sysname -vol sysname
          # fs mkmount -dir /afs/.cellname/sysname/usr  -vol sysname.usr
          # fs mkmount -dir /afs/.cellname/sysname/usr/afsws -vol sysname.usr.afsws
          # vos release root.cell
          # fs checkvolumes

3. Issue the fs setacl command to grant the l (lookup) and r (read) permissions to the system:anyuser group on each new directory's ACL.

          # cd /afs/.cellname/sysname
          # fs setacl  -dir  .  usr  usr/afsws  -acl  system:anyuser rl

4. Issue the fs setquota command to set an unlimited quota on the volume mounted at the /afs/`cellname`/`sysname`/usr/afsws directory. This enables you to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's quota.

   If you wish, you can set the volume's quota to a finite value after you complete the copying operation. At that point, use the vos examine command to determine how much space the volume is occupying. Then issue the fs setquota command to set a quota that is slightly larger.

          # fs setquota /afs/.cellname/sysname/usr/afsws  0

5. Unpack the distribution tarball into the /tmp/afsdist directory, if it is not already.

6. Copy the contents of the indicated directories from the distribution into the /afs/`cellname`/`sysname`/usr/afsws directory.

          # cd /afs/.cellname/sysname/usr/afsws
          # cp -rp /tmp/afsdist/sysname/bin  .
          # cp -rp /tmp/afsdist/sysname/etc  .
          # cp -rp /tmp/afsdist/sysname/include  .
          # cp -rp /tmp/afsdist/sysname/lib  .

7. Create /usr/afsws on the local disk as a symbolic link to the directory /afs/`cellname`/@sys/usr/afsws. You can specify the actual system name instead of @sys if you wish, but the advantage of using @sys is that it remains valid if you upgrade this machine to a different system type.

          # ln -s /afs/cellname/@sys/usr/afsws  /usr/afsws

8. (Optional) To enable users to issue commands from the AFS suites (such as fs) without having to specify a pathname to their binaries, include the /usr/afsws/bin and /usr/afsws/etc directories in the PATH environment variable you define in each user's shell initialization file (such as .cshrc).

Configuring the Top Levels of the AFS Filespace |  | Storing AFS Documents in AFS