Introduction

This page describes how to install the OpenAFS client on RPM-based Linux distributions using the Dynamic Kernel Module Support (DKMS) framework. Modules installed with DKMS are automatically rebuilt when a new kernel is installed.

Setup

The DKMS system is available in the base system on Fedora systems and is available in the 'Extra Packages for Enterprise Linux' (EPEL) on Red Hat and CentOS systems. Add the EPEL repository to your Red Hat/CentOS system with:

$ sudo yum install epel-release

It is recommended to be running a recent kernel release. If the system has just been installed, or has not been updated recently, be sure to update the kernel release with:

$ sudo yum update kernel
$ sudo reboot

Install the kernel development package for your running kernel version:

$ sudo yum install "kernel-devel-uname-r == $(uname -r)"

Be sure you are running a recent kernel version as described above, or you may in encounter the error:

Error: Unable to find a match: kernel-devel-uname-r == <version>

If you are installing OpenAFS 1.8.6 or older, ensure the make program is present before installing the OpenAFS packages.

$ sudo yum install make

OpenAFS RPM package files

First, you will need to download or build OpenAFS RPM package files, or have access to a yum repository which contains the OpenAFS RPM package files.

See HowToBuildOpenAfsRpmPackages for instructions on how to build the RPM package files.

The following is a yum repo configuration file for a public yum repo of prebuilt OpenAFS RPM package files. To use this repository, copy this file to /etc/yum.repos.d/sna-openafs.repo.

[sna-openafs]
name=SNA OpenAFS
baseurl=https://download.sinenomine.net/openafs/rpms/el$releasever/$basearch
enabled=1
gpgcheck=0

OpenAFS client installation

Install the OpenAFS client with yum (or dnf):

$ sudo yum install openafs openafs-krb5 openafs-doc dkms-openafs

Be sure to install the openafs package and the dkms-openafs package with a single yum install invocation.

Edit the /usr/vice/etc/ThisCell file to configure your cellname.

$ sudo bash -c 'echo example.com > /usr/vice/etc/ThisCell'

Edit the /usr/vice/etc/CellServDB.local file to configure your AFS database locations. The CellServDB.local file may be blank if your site uses DNS service records (SRV records) to publish the OpenAFS database server addresses. Here is an example CellServDB.local file to illustrate the file format:

>example.com         # Example
192.168.10.100       # afsdb1.example.com
192.168.10.101       # afsdb2.example.com
192.168.10.102       # afsdb3.example.com

Start the OpenAFS client with:

$ sudo systemctl enable openafs-client
$ sudo systemctl start openafs-client
$ sudo systemctl status openafs-client
...
Nov 04 15:20:28 cen8 systemd[1]: Started OpenAFS Client Service.
Nov 04 15:20:28 cen8 afsd[113313]: afsd: All AFS daemons started.

The kernel module should be loaded:

$ lsmod | grep openafs
openafs              2830336  2

The AFS filesystem should be mounted:

$ mount | grep AFS
AFS on /afs type afs (rw,relatime)