AFS not starting, module fail to load

Upon the update of a new Linux kernel, it may be that OpenAFS does not start due to a module load failure. Here is a recipe on how to fix that:
  • Assuming the new Linux Kernel is 2.6.32-504.3.3.el6.x86_64
  • Assuming the new AFS version is openafs-kernel-1.6.10
  • Assuming you have the package openafs-kernel-source package installed
  • Assuming you have the openafs-module-tools package installed
  • Assuming you have the linux kernel devel package kernel-devel installed

follow the below steps

[1] First, build the new kernel module like below
% cd /usr/src/openafs-kernel-1.6.10/src
% ./configure
% make
This will build the Linux kernel module support for OpenAFS. The file should be named like libafs*.ko . In our example, it will be . Note the result of uname -srv below and the presence of an SMP (indicating multiple cores, multiple CPUs, ...).
% uname -srv
Linux 2.6.18-371.11.1.el5 #1 SMP Wed Jul 23 11:39:05 CDT 2014

[2] Prepare adding the new module to the active Linux kernel and add where it should be
% mkdir -p /lib/modules/2.6.32-504.3.3.el6.x86_64/kernel/fs/openafs
% cp src/libafs/MODLOAD-2.6.32-504.3.3.el6.x86_64-MP/ \

[3] Tell OpenAFS where the module is located so you can start the service with no problems
% echo /lib/modules/2.6.32-504.3.3.el6.x86_64/kernel/fs/openafs/openafs.ko | openafs-modules --add-modules

[4] Start the service
% service afs start