OpenAFS on (k)Ubuntu Linux (and possibly other (non-athena) Debian linux dists)

These instructions work as-is on Ubuntu Karmic Koala (version 9.10) and Lucid Lynx (version 10.04). They have been tested on Ubuntu 12.04.2 LTS (Precise Pangolin) and work if you use apt-get instead of aptitude.

Note for Ubuntu 12.04.3 and later

On August 23, Ubuntu released the latest set of updates to 12.04 ("Precise"). For systems installed from a CD or CD image, this includes a backported 3.8 kernel, and the version of OpenAFS included in Ubuntu 12.04 does not currently work with this kernel. As a workaround, you can install the OpenAFS PPA repository before attempting the steps below. This will allow you to install the current stable releases of openafs packages (which happen to be compatible with linux 3.8). See the Launchpad Page for more information.

This is also necessary for (at least some versions of) the kernels shipped with Ubuntu 14.04 ("Trusty"), and may be necessary with other versions.

To add the "stable" OpenAFS repository that works with 12.04.3+ and 14.04, run

sudo add-apt-repository -y ppa:openafs/stable

and then run

sudo apt-get update

so the system knows about the new OpenAFS package versions in the new repository.

  • Install the necessary packages.
sudo aptitude install openafs-krb5 openafs-client krb5-user module-assistant openafs-modules-dkms

On 12.04 or later:

sudo apt-get install openafs-krb5 openafs-client krb5-user module-assistant openafs-modules-dkms

NOTE: The openafs-modules-dkms package automatically does the compiling and installation of the openafs kernel module. More importantly, it keeps the kernel module up-to-date as software updates upgrade the kernel.

  • When asked, supply these answers to the following questions:
AFS cell this workstation belongs to: csail.mit.edu
Size of AFS cache: 512000 (this means 0.5GB, can be higher if you have the space)
Kerberos servers for your realm: kerberos-1.csail.mit.edu kerberos-2.csail.mit.edu
Administrative server for your Kerberos realm: kerberos.csail.mit.edu
DB server host names for your home cell: (blank)
Run openafs client now and at boot? (user preference)
  • Newer Ubuntu distribution may include a /etc/openafs/CellServDB that has pointers to csail.mit.edu. Comment these lines out, if they exist. (This was not necessary on 12.04 beta 1.)
  • For some versions of the OpenAFS packages, by default, debconf won't ask all the necessary questions on the first pass. You'll need to reconfigure. Run:
    =sudo dpkg-reconfigure krb5-config openafs-client=
    (On recent versions, though, the defaults may be correct.)
  • When asked, supply these answers to the following questions:
Default realm: CSAIL.MIT.EDU (all caps)
Does DNS contain pointers to your realm's Kerberos Servers? Yes
AFS cell this workstation belongs to: csail.mit.edu
Size of AFS cache: 512000 (this means 0.5GB, can be higher if you have the space)
Run openafs client now and at boot? (user preference)
Look up AFS cells in DNS? Yes
Encrypt authenticated traffic with AFS fileserver? Yes
Dynamically generate the contents of /afs Yes
Use fakestat? Yes
DB server host names for your home cell: (blank)
Run openafs client now and at boot? (user preference)
  • Compile the openafs kernel module, then restart the service. (This step is not necessary on recent versions with the openafs-modules-dkms package.)
sudo m-a prepare
sudo m-a auto-install openafs
sudo modprobe openafs
  • Use the proper restart command based on your Ubuntu version.
    • On or after 9.10 (Karmic Koala) use:
      sudo service openafs-client restart
    • Before 9.10 (Karmic Koala) use:
      sudo /etc/init.d/openafs-client restart
  • Things should be working. Test the functionality with:
    kinit (csail username) && klist
    aklog && tokens

NOTE: You will have to repeat the kernel module installation whenever the kernel gets upgraded. If, after a reboot, AFS stops working, type the following:
  ls /lib/modules/`uname -r`/fs/openafs.ko
If you get No such file or directory, you probably need to rebuild the openafs module for the currently-running kernel.
Topic revision: 17 Mar 2016, JaySekora
 

MIT Computer Science and Artificial Intelligence Laboratory

 

  • About CSAIL
  • Research
  • News + Events
  • Resources
  • People

This site is powered by Foswiki MIT: Massachusetts Institute of Technology