Debian Install

Lustre on Debian
If you are brave, use Lenny. There are Lustre client packages there. However, you will still need a lustre-patched kernel for a server. These instructions come from a user-contributed mailing list post on how to recompile the lenny packages for etch.

There are also prebuilt packages and kernel images at: http://www.pdsi-scidac.org/respository/debian

Pre-Requisites
Any Debian machine can be used to build the packages. It does not have to be a Lustre client or server. You can skip this and the next section if you are on Lenny.

Install the packages required to build debs. (build-essential, module-assistant etc) Better use http://packages.debian.org/etch-backports/debhelper (dh_lintian is missing in sable).
 * Install build essentials

apt-get install build-essential module-assistant


 * Get Source

Make sure you have deb-src lines for Lenny in /etc/apt/sources.list from your favorite Debian mirror, such as:

deb http://mirror.scl.ameslab.gov/debian/ etch main non-free contrib deb-src http://mirror.scl.ameslab.gov/debian/ lenny main contrib non-free

or

deb http://mirror.mcs.anl.gov/debian/ etch main non-free contrib deb-src http://mirror.mcs.anl.gov/debian/ lenny main contrib non-free


 * Download the source with:

aptitude update apt-get source linux-image-2.6.18-X-686 apt-get source lustre

This will unpack two directories, one with the Lustre source and one with the kernel source.

Build Lustre userspace
Change to the lustre directory.

cd lustre-X.X.X dpkg-buildpackage -rfakeroot

If the build fails with automake errors you will need to install a later automake version. (debian/etch provides several to choose from.)

This will build the following packages in the parent directory:

lustre-utils       #Userspace lustre util lustre-dev         #Development headers lustre-source      #Source for the kernel module lustre-tests       #Test suite linux-patch-lustre #Patch for the linux kernel.

Install the lustre-source and linux-patch-lustre packages on the build machine. These packages contain the patches to the kernel source tree that are used in the next step of the build.

dpkg -i linux-patch-lustre_XXX.deb dpkg -i lustre-source_XXX.deb

Build Lustre patched kernel
If building on Lenny you can skip above and run apt-get install linux-patch-lustre lustre-source linux-tree-2.6.18 cd /usr/src/ tar jxvf linux-source-2.6.18.tar.bz2

Now you can CD to the kernel directory

cd linux-source-2.6.18

We need to grab the .config file for the debian kernel. We should be able to generate the config from the source package, but I'm not sure how. The easiest way to get the correct config is to copy /boot/config-X.X.X from a machine already running the Debian kernel.

cp /boot/config-2.6.XXX-686 .config

Check the kernel config works: (This might generate 1 or 2 minor questions. Just hit m or y.)

make oldconfig

We can now build the kernel.

export CONCURRENCY_LEVEL=3 make-kpkg clean make-kpkg --rootcmd fakeroot --added-patches=lustre --initrd \ --append-to-version "-lustre-1.6.5.1" --revision=yyyymmdd kernel_image

(You might be asked about extra scsi statistics options; selecting Y is probably a good idea)

If your Lustre patch is not recognized, you might need to create the following symlinks:

ln -s /usr/src/kernel-patches/lustre/scripts/apply /usr/src/kernel-patches/all/XXX/apply/lustre ln -s /usr/src/kernel-patches/lustre/scripts/unpatch /usr/src/kernel-patches/all/XXX/unpatch/lustre

You should now have a kernel-image deb.

Build lustre kernel modules
The Lustre kernel modules can now be built.

module-assistant -u/your/working/directory \ -k /path/to/the/kernel/linux-2.6-X.X

After the build has finished you should now have a lustre-modules.deb

You might want to try this if it the previous line fails

reboot (and boot with the lustre kernel) m-a update m-a a-i lustre

This should auto-install the Lustre modules

= Install =

To install Lustre on a client or server machine, simply install the packages you have created:

linux-image-2.6.XX-lustre-X.X.X._XXXXXX.deb lustre-modules-2.6.XX-lustre-X.X.X._XXXXXX.deb lustre-utils_X.X.deb liblustre-X-X.deb lustre-dev-X.X.deb