Installation

Ubuntu

Follow the instructions at this location to install AFS on Ubuntu machines(If installation fails, update all the packages and retry. Sometimes, after a recent kernel upgrade the module compilation may break because the community needs some time to upgrade the AFS modules in Ubuntu's repository. In that case you can try booting up an older kernel and retrying all the steps)

Centos 6

Follow the instructions in section "Installing OpenAFS Client" from this page. Before installing AFS we need to make sure that:

# rpm -i http://openafs.org/dl/openafs/${version}/openafs-release-rhel-${version}-1.noarch.rpm

where <version> is the OpenAFS version you wish to install, e.g. "1.6.10".

Centos 7

RPMs for AFS are not available on Centos 7 and even the OpenAFS repository does not host them. So we need to compile from source rpm packages.

The source rpms for AFS version 1.6.15 can be downloaded from here

Before going ahead make sure that your system has kernel-headers for compiling kernel modules(if you have already compiled HTCondor on the machine below commands should be enough to install all the dependencies, except 1 perl package which needs to be installed.)

yum install -y dkms gcc

And finally run the following command as root to generate RPMS for all the kernel and user-space AFS utilities:

# rpmbuild --rebuild -bb --define 'build_userspace 1' --define 'build_modules 1' openafs-<version>-1.src.rpm

The RPMs will be generated in /root/rpmbuild/RPMS/x86_64 (depending on your arch)

Configuration

Most of the configuration is automatic. The AFS default Cell will be automatically configured if the hostname is correct. We only need to change the Kerberos settings in /etc/krb5.conf

To get the Kerberos configuration login to one of the CSL machines and copy the /etc/krb5.conf to the machine you are configuring. AFS service can be started by running the following command (on both Ubuntu and Centos):

# sudo service afsd start

Once the service starts successfully you should be able to see some directories listed in /afs

Logging In

Once the AFS starts you need to login with AFS credentials to get full access to the file system. To do this run the following command on the shell:

# klog.krb5

This command will work if your Username for HTCondor Lab machines and CSL lab machines is same, and prompt you for a password, please enter your CS password here(not HTCondor Lab machine login password) on being prompted. If your username is not same, please check the man page of klog.krb5 on how to proceed and update this wiki.