[an error occurred while processing this directive]

NCSA Linux AFS Client Installation Guide

This document is for installing the AFS client on machines running Linux 2.2.x 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. If this is the first time installing AFS on this machine, then it is going to require a reboot.



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 using a dynamic kernel loader (modload). 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/modload

Fix the permissions
  # chmod 755 /usr/vice
  # chmod 755 /usr/vice/etc
  # chmod 755 /usr/vice/etc/modload
Now
  # cd /usr/vice/etc

We need to determine what kernel the machine is running. If you do a
  # uname -r

it should tell you which kernel you are running. Some RedHat version have non-standard kernel versions that don't have an exact match is the afs distribution. You may have to use a different afs module or kernel, if this is the case.

Now in the /usr/vice/etc directory, ftp to the anonymous afs distribution server where you can access AFS install files.

  # ftp linux.ncsa.uiuc.edu
  # user: ftp
  # passwd: 
Once the ftp session is established then go to the following directory:
  ftp> cd /pub/afs-linux22

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> prompt
  ftp> mget afsd afs.rc afs.conf

Then cd to the modload directory on both the local and remote machines to get the next set of files.
  ftp> cd modload
  ftp> lcd modload

Now get the files that corresponds to your kernel (libafs-2.2.x.o -- where x is your minor revision level). For example, if `uname -r` gave you 2.2.14-5, then you would do this:
  ftp> mget libafs-2.2.14*

On the local machine go back up a directory to /usr/vice/etc.
  ftp> lcd ..

Then...
  ftp> cd /pub/afs-linux22/usr/contrib

Then get the following files:
  ftp> get modutils-2.2.2-pre6.tar

Then:
  ftp> cd /pub/afs-linux22/service/etc

Then get the following files:
  ftp> mget ThisCell CellServDB

This is all the local files you are going to need to retrieve for the AFS client.
  ftp> quit

Now make sure the correct permissions are set for all of the files:
  # chmod 755 /usr/vice/etc/afsd
  # chmod 644 /usr/vice/etc/CellServDB
  # chmod 644 /usr/vice/etc/ThisCell
  # chmod 755 /usr/vice/etc/modload/lib*

Installing updated versions of modutils that work with SMP kernels.

Untar the modutils distribution.
   # tar -xf modutils-2.2.2-pre6.tar
Next configure, make, and install the new modutils.
   # cd modutils-2.2.2-pre6
   # ./configure
   # make
   # make install

Loading AFS into the kernel

If you are using RedHat 6.2 you will need to make the following sym links
   # cd /usr/vice/etc/modload
   # ln -s ./libafs-2.2.14.o libafs-2.2.14-5.0.o
   # ln -s ./libafs-2.2.14smp.mp.o libafs-2.2.14-5.0smp.mp.o
You may need to change these if you upgrade to a later kernel.

Insert the module into the kernel, replacing "libafs-2.2.14-5smp.mp.o" with the appropriate one for your kernel. If you are using a smp kernel use this line

  # /sbin/insmod -P smp -fm /usr/vice/etc/modload/libafs-2.2.14-5.0smp.mp.o
otherwise use
  # /sbin/insmod -fm /usr/vice/etc/modload/libafs-2.2.14-5.0.o

If you wish to verify that AFS loaded correctly, use the modinfo comand:
  # /sbin/lsmod | grep afs

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 40 to 50 MB, and if you are going to be using AFS heavily then 75 to 100MB 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

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 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 invoke the cache manager:
  # chmod 755 /usr/vice/etc/afsd
  # /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 path

Now you need to set up the path to access all of the afs binaries.
  # ln -s /afs/ncsa/i386_linux22/usr/afsws /usr/afsws

Enabling AFS to start on boot

Put the standard Linux startup file in the /etc/rc.d/init.d directory as afs. You can copy this from the following location:
  # install -m 755 /usr/vice/etc/afs.rc /etc/rc.d/init.d/afs
  # install -m 755 /usr/vice/etc/afs.conf /etc/sysconfig/afs

Note: This only applies to Redhat.
Then run the following command to finish the installation:
  # /sbin/chkconfig --add afs

and to verify that it worked...
  # /sbin/chkconfig --list | grep afs

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:

  # ln -s /afs/ncsa/packages/.link/Linux /usr/ncsa

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

AFS login on console
If you want to be able to log onto the the console of the machine and use your AFS password, use your AFS home directory, and get an AFS token, then refer to the Setting up Linux console login page.

/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]