WARNING: This is the _old_ Lustre wiki, and it is in the process of being retired. The information found here is all likely to be out of date. Please search the new wiki for more up to date information.
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 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
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 build essentials
Install the packages required to build debs. (build-essential, module-assistant etc) Better use http://packages.debian.org/etch-backports/debhelper (dh_lintian missing in sable).
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
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
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".)
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-184.108.40.206" --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
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