Summary
This article describes how to compile OpenAFS on a Xen Virtual Machine (XenVM) running one of the supported versions of the Red Hat Enterprise Linux (RHEL) operating system.
Background
AFS is a distributed file system product, pioneered at Carnegie Mellon University and supported and developed as a product by Transarc Corporation (now IBM Pittsburgh Labs). It offers a client-server architecture for file sharing, providing location independence, scalability, security, and transparent migration capabilities for data. Its primary use is in distributed computing.
IBM branched the source of the AFS product, and made a copy of the source available for community development and maintenance. They called the release OpenAFS.
Requirements
• RHEL installation media
• The XenSource Driver Development Kit (DDK), available from the XenSource downloads page
• The XenSource source RPMs CD #1, available from the XenSource downloads page
• OpenAFS software source RPM, available from OpenAFS.org.
Procedure
1. Install RHEL onto a XenVM, being sure to include the development tools. Download openafs-1.4.0-rhel4.1.src.rpm onto the RHEL XenVM. On the DDK XenVM, rebuild the RHELx kernel sources obtained from inside the kernel-rhel4x directory on the XenServer source RPMs CD 1 as follows:
ddk# rpm -ivh kernel-2.6.9-42.0.8.EL.xs3.2.0.284.src.rpm
ddk# cd /usr/src/redhat/SPECS
ddk# yum install m4
ddk# rpmbuild -ba kernel-2.6-xen.spec --target=i686
2. Copy the kernel-xenU-devel RPM and the kernel-2.6.9 directory to the RHEL XenVM as follows:
ddk# cd /usr/src/redat/RPMS/i686
ddk# scp kernel-xenU-devel-2.6.9-42.0.8.EL.xs3.2.0.284.i686.rpm Rhel_XenVM:/tmp
ddk# cd /usr/src/redhat/BUILD
ddk# scp -r kernel-2.6.9 Rhel_XenVM:/usr/src/redhat/BUILD
3. On the RHEL XenVM, compile AFS as follows:
Rhel_XenVM# rpm -ivh openafs-1.4.0-rhel4.1.src.rpm
Rhel_XenVM# rpm -ivh kernel-xenU-devel-2.6.9-42.0.8.EL.xs3.2.0.284.i686.rpm
Rhel_XenVM# cd /usr/src/redhat/BUILD/openafs-1.4.0/src
Rhel_XenVM# mv include include.old
Rhel_XenVM# ln -s /lib/modules/2.6.9-42.0.8.EL.xs3.2.0.284xenU/build/include include
Rhel_XenVM# cp -var include.old/* include
Rhel_XenVM# cp -var ../../kernel-2.6.9/linux-2.6.9/include/xen .
Rhel_XenVM# ./configure --with-afs-sysname=i386_linux26
Rhel_XenVM# make
Rhel_XenVM# make install