First off, I cannot recommend Peter Membrey’s “The Definitive Guide to CentOS” enough. If you’re a new admin or just want to make sure you’re doing it right, this is the book to get.

AFS is a distributed filesystem not unlike NFS but more robust and geared towards replicated / read-only implementations. It’s used a great deal here at JPL, where I work as an admin.

OpenAFS is an open source implementation of AFS that works nicely with JPL’s setup. It’s easy to install and quite stable.

I’ve tested these instructions in 9.04, 8.10, and even recently in 6.06 (Yes, the apt-get method of maintaining a Linux machine is far superior to using RPMs).

The first step is to build and install the OpenAFS kernel module. The following steps take care of downloading the appropriate software, compiling and installing everything. As usual, this needs to be done as root, or using the sudo command.

$ apt-get install module-assistant openafs-modules-source
$ module-assistant prepare
$ module-assistant auto-install openafs-modules
$ depmod -a

If all of that is successful, your computer should now have the OpenAFS kernel module buit and installed. The next step is to install the OpenAFS client software.

$ apt-get install openafs-client openafs-krb5

Ok, you now have all the software you should need. The last step on Ubuntu systems is to configure OpenAFS per your site. Running the following command will start an interactive program that asks you about your site specific AFS configuration. The most important piece of info you’ll need is your “Cell” name. For us at JPL, it’s jpl.nasa.gov. I’ve found that most of the time, the default responses for the rest of the questions are fine.

Configure OpenAFS:

$ dpkg-reconfigure openafs-client

Installing on Fedora / CentOS / Red Hat:
Unfortunately, installing OpenAFS requires a few more steps on RPM based distributions, but nothing too tough. Mostly, this involves hunting down the appropriate RPMs for your system. I’m using CentOS for this example. For those not in the know, CentOS is basically a free, binary compatible version of RedHat Enterprise Linux. Please visit CentOS.org for more details.

First, you’ll need to locate the appropriate RPMs for your distribution and kernel version. The following RPMs were required on my CentOS 5.3 machines:

$ rpm -qa | grep afs

You can find these RPMs in a few places as none of these distributions provide them for you. First off, ATrpms has them. In the past, I’ve also found them at the main OpenAFS site, OpenAFS.org. Pbone, another third party RPM repository, has OpenAFS rpms that where built for Redhat EL5 here. Those RPMs will work just fine with CentOS 5 too. Lastly, another place to get hard to find RPMs is RPMforge.

Once you have your RPMs installed, then you only have to edit one config file. Populate /etc/openafs/ThisCell with your sites specific cell name. Some smaller sites will have to configure /etc/openafs/CellServDB as well.

Thats it. You should be able to start the OpenAfs daemon (/etc/init.d/openafs start) and then start using AFS.

  • It’s worth noting that the various RPM packages you list are all different, built with different compile time options and, in some cases, using different configuration paths.

    • Kevin

      Yes, the package management situation for Red Hat based distributions is very yucky, but workable.

  • Everaldo Aguiar

    Thanks for the tutorial. This seems to be the only one that always works for me.