[an error occurred while processing this directive]

NCSA HPUX AFS Installation Guide

This document is for installing the AFS client on machines running HPUX 10.20 / 11.00 in the NCSA environment. Please read through these instructions once before installing AFS so you are familiar with some of the setup options. The commands shown below will need to be executed as "root". If there are any questions or problems with this document, or an installation, then please contact afs@ncsa.uiuc.edu.



Loading client files onto the local disk

The first step in installing a client is to load AFS binaries onto the local disk - namely, the afsd binary and files needed to incorporate AFS into the kernel. These files must reside on the local disk of every client machine.

Create the following directories for the local files:

  # mkdir -p /usr/vice/etc
  # chmod 755 /usr/vice/etc
Now
  # cd /usr/vice/etc
We need to determine what version of HPUX you are running. If you do a
  # uname -r
it should tell you whether it is: B.10.20, or B.11.00. Now in the /usr/vice/etc directory, ftp to the anonymous afs distribution server where you can access AFS install files.

  # ftp hpux.ncsa.uiuc.edu
  # user: ftp
  # passwd: 
Once the ftp session is established then go to one of the following directories depending on the version of HPUX you are using: Once you are in one of the above directories then
  ftp> cd usr/afsws/root.client/usr/vice/etc
Warning: Make sure you do not cd to /usr/afsws/root.client/usr/vice/etc above, (the / is in front of the usr) or else you could get the wrong versions of the binaries.

Now get the following files from this directory (make sure you are doing a binary transfer):

  ftp> bin
  ftp> get afsd
  ftp> get afs.driver
Then cd to the directory to get the libraries.
  ftp> cd ../../../bin
Now get the library files:
  ftp> get libafs.nonfs.a
  ftp> get libafs.a
If you get an error on the file that is fine (It isn't present in all versions of AFS.)

On the remote machine

  ftp> cd /service/etc
Then get the following files:
  ftp> get ThisCell
  ftp> get CellServDB
This is all the local files you are going to need to retrieve for the AFS client.
  ftp> quit

Compiling AFS into the kernel

Now we are ready to compile the AFS library into the kernel. Sometime in the lifetime of HP-UX 10.20, HP decided to stop supporting kload, the kernel module loader. Because of this Transarc wants all HP machines to build AFS into the kernel.

Copy the AFS driver file:

  # cp /usr/vice/etc/afs.driver /usr/conf/master.d/afs
Copy the library file:
  # cp /usr/vice/etc/libafs.nonfs.a /usr/conf/lib/libafs.a
Backup the existing kernel and configuration files to a safe place:
  # cp /stand/vmunix /stand/vmunix.prev
  # cp /stand/system /stand/system.prev
Now use method A or B to install the new kernel.

(A) Using SAM to install the AFS kernel

Issue the following command to invoke SAM:
  # sam -display your_display:0
Where your_display represents the hostname of the machine on which you are invoking SAM.

Choose the Kernel Configuration icon.
Choose the Drivers icon.
From the list of drivers, select afs.

Pull down the Actions menu.
Choose Add Driver to Kernel.

Pull down the Actions menu.
Choose Create a New Kernel.

Confirm your choices by choosing Yes and OK when prompted by subsequent popup windows. SAM will rebuild the kernel and reboot the system.

(B) Installing the AFS kernel manually

Edit /stand/system by adding a line with afs to the Subsystems section.

Change directories to /stand/build and build the kernel.

  # cd /stand/build
  # mk_kernel

Save the original kernel to a safe location, move the new kernel into /stand/vmunix, and reboot.

  # mv /stand/vmunix /stand/vmunix.orig
  # mv /stand/build/vmunix_test /stand/vmunix
  # reboot

Setting up the cache

Every AFS client must have a cache in which to store local copies of files brought over from file server machines. The cache manager is set up on local disk. When setting up the local cache you need to figure out how much cache do I need, and how much local disk space do I have for the cache? A typical cache size for a normal user is 80 to 100 MB, and if you are going to be using AFS heavily then 150 to 200MB should be used.

First create the cache directory and set the correct permissions:

  # mkdir /usr/vice/cache
  # chmod 700 /usr/vice/cache
Now create the cache configuration file:
  # echo "/afs:/usr/vice/cache:80000" > /usr/vice/etc/cacheinfo
  # chmod 644 /usr/vice/etc/cacheinfo
The above is the standard mount location, /afs, and the standard cache location, /usr/vice/cache. It also is setting a cache size of 80MB. This can be increased or decreased as needed. The best method for setting up the cache area is creating a seperate partition (logical volume) of a local disk and mount it at /usr/vice/cache. Otherwise just use a portion of the /usr partition.

If you are having problems then contact us at afs@ncsa.uiuc.edu.

Starting the cache manager

We are now going to start the cache manager which will initailize the cache files in /usr/vice/cache and mount /afs.

First create the mount point for AFS:

  # mkdir /afs
  # chmod 777 /afs
Now make sure the cache manager mode bits are set correctly and the configuration files, then invoke the cache manager:
  # chmod 755 /usr/vice/etc/afsd
  # chmod 644 /usr/vice/etc/CellServDB
  # chmod 644 /usr/vice/etc/ThisCell
  # /usr/vice/etc/afsd -verbose
You should now see it creating all the cache files. This may take awhile depending on the size of your cache.

Setting up AFS binary paths and the AFS login

Now you need to set up the path to access all of the afs binaries.

We used to replace the login program supplied with HPUX with the AFS one. However, since we have transitioned to Kerberos authentication we can now use the login binary compile with the kerberos code. This binary will get a kerberos ticket and an AFS token when logging in.

  # mv /bin/login /bin/login.orig
  # cp /afs/ncsa/packages/kerberos/HPUX_10.20/sbin/login.krb5 /bin/login.krb5
  # ln -s /bin/login.krb5 /bin/login

Enabling AFS to start on boot

Put the standard HPUX startup file in the /sbin/init.d directory as afs. You can copy this from the following location:
  # cp /afs/ncsa/service/etc/rc/hp_afs.rc /sbin/init.d/afs
Then set the permissions:
  # chmod 755 /sbin/init.d/afs
Now set the following links for proper startup and shutdown:
  # ln -s /sbin/init.d/afs /sbin/rc2.d/S460afs
  # ln -s /sbin/init.d/afs /sbin/rc0.d/K800afs

Other configurations

At this point the AFS client should be running and it should start up and shut down properly on reboot. There are a few more items that may need to be configured to have access to other resources in the NCSA environment.

AFS binaries
If you want access to the AFS binaries then make sure that /usr/afsws/bin and /usr/afsws/lib are in your PATH environment variable.

Setting up /usr/ncsa
In order to have access to other binaries we make available in AFS create the following link:

Then make sure that /usr/ncsa/bin and /usr/ncsa/lib are in your PATH environment variable.

/etc/passwd entries
If you need to add user entries to the local /etc/passwd file then you can find most users in the following file:
/afs/ncsa/common/etc/passwd
Grep for the user in the above file and copy the line to the local passwd file.

[an error occurred while processing this directive]