Setting Up Volumes and Loading Binaries into AFS

Note

If you are using an operating system which uses packaged binaries, such as .rpms or .debs, you should allow these package management systems to maintain your AFS binaries, rather than following the instructions in this section.

In this section, you link /usr/afsws on the local disk to the directory in AFS that houses AFS binaries for this system type. The conventional name for the AFS directory is /afs/cellname/sysname/usr/afsws.

If this machine is an existing system type, the AFS directory presumably already exists. You can simply create a link from the local /usr/afsws directory to it. Follow the instructions in Linking /usr/afsws on an Existing System Type.

If this machine is a new system type (there are no AFS machines of this type in your cell), you must first create and mount volumes to store its AFS binaries, and then create the link from /usr/afsws to the new directory. See Creating Binary Volumes for a New System Type.

You can also store UNIX system binaries (the files normally stored in local disk directories such as /bin, /etc, and /lib) in volumes mounted under /afs/cellname/sysname. See Storing System Binaries in AFS .

Linking /usr/afsws on an Existing System Type

If this client machine is an existing system type, there is already a volume mounted in the AFS filespace that houses AFS client binaries for it.

  1. 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
    
  2. (Optional) If you believe it is helpful to your users to access the AFS documents in a certain format via a local disk directory, create /usr/afsdoc on the local disk as a symbolic link to the documentation directory in AFS (/afs/cellname/afsdoc/format_name).

       # ln -s /afs/cellname/afsdoc/format_name /usr/afsdoc
    

    An alternative is to create a link in each user's home directory to the /afs/cellname/afsdoc/format_name directory.

Creating Binary Volumes for a New System Type

If this client machine is a new system type, you must create and mount volumes for its binaries before you can link the local /usr/afsws directory to an AFS directory.

To create and mount the volumes, you use the kinit command to authenticate as an administrator, followed by the aklog command to gain tokens, and then issue commands from the vos and fs command suites. However, the command binaries are not yet available on this machine (by convention, they are accessible via the /usr/afsws link that you are about to create). You have two choices:

  • Perform all steps except the last one (Step 10) on an existing AFS machine. On a file server machine, the aklog, fs and vos binaries reside in the /usr/afs/bin directory. On client machines, the aklog and fs binaries reside in the /usr/afsws/bin directory and the vos binary in the /usr/afsws/etc directory. Depending on how your PATH environment variable is set, you possibly need to precede the command names with a pathname.

    If you work on another AFS machine, be sure to substitute the new system type name for the sysname argument in the following commands, not the system type of the machine on which you are issuing the commands.

  • Copy the necessary command binaries to a temporary location on the local disk, which enables you to perform the steps on the local machine. The following procedure installs them in the /tmp directory and removes them at the end. Depending on how your PATH environment variable is set, you possibly need to precede the command names with a pathname.

Perform the following steps to create a volume for housing AFS binaries.

  1. Working either on the local machine or another AFS machine, extract the Open AFS distribtion tarball onto a directory on that machine. The following instructions assume that you are using the /tmp/afsdist directory.

  2. If working on the local machine, copy the necessary binaries to a temporary location on the local disk. Substitute a different directory name for /tmp if you wish.

       # cd  /tmp/afsdist/new_sysname/root.server/usr/afs/bin
       # cp -p  aklog  /tmp
       # cp -p  fs  /tmp
       # cp -p  vos  /tmp
    
  3. Authenticate as the user admin.

       # kinit admin
       Password: admin_password
       # aklog
    
  4. 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
    
  5. 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
    
  6. 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 
    
  7. 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
    
  8. Copy the contents of the indicated directories from the OpenAFS binary distribution into the /afs/cellname/sysname/usr/afsws directory.

       # cd /afs/.cellname/sysname/usr/afsws
       # cp -rp /cdrom/sysname/bin  .
       # cp -rp /cdrom/sysname/etc  .
       # cp -rp /cdrom/sysname/include  .
       # cp -rp /cdrom/sysname/lib  .
    
  9. Issue the fs setacl command to set the ACL on each directory appropriately. If you wish to enable access to the software for locally authenticated users only, set the ACL on the etc, include, and lib subdirectories to grant the l and r permissions to the system:authuser group rather than the system:anyuser group. The system:anyuser group must retain the l and r permissions on the bin subdirectory to enable unauthenticated users to access the aklog binary.

       # cd /afs/.cellname/sysname/usr/afsws
       # fs setacl  -dir etc include lib  -acl  system:authuser rl  \
                  system:anyuser none
    
  10. Perform this step on the new client machine even if you have performed the previous steps on another machine. 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
    
  11. (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).

  12. (Optional) If you believe it is helpful to your users to access the AFS documents in a certain format via a local disk directory, create /usr/afsdoc on the local disk as a symbolic link to the documentation directory in AFS (/afs/cellname/afsdoc/format_name).

       # ln -s /afs/cellname/afsdoc/format_name /usr/afsdoc
    

    An alternative is to create a link in each user's home directory to the /afs/cellname/afsdoc/format_name directory.

  13. (Optional) If working on the local machine, remove the AFS binaries from the temporary location. They are now accessible in the /usr/afsws directory.

       # cd  /tmp
       # rm  klog  fs  vos