Skip to end of metadata
Go to start of metadata

Purpose

Describe the steps you need to build and test a 1.8 Lustre system (MGS, MDT, MDS, OSS, OST, client) on a CentOS 5.5 or 5.6 machine. The only difference between building on 5.5 and 5.6 is that a different kernel SRPM is required. Minor differences may appear in the output of some commands below.

This walk-thou has reportedly been used successfully on CentOS 6.0. One significant difference is that CentOS 6.0 replaces /etc/modprobe.conf with a directory: /etc/modprobe.d/. For CentOS 6.0 clients, the advice is to create a file /etc/modprobe.d/lustre.conf to contain Lustre specific module configurations.

Prerequisite

  • A newly installed CentOS 5.5 x86_64 machine with the hostname: client-10.
  • EPEL Repository: this is a convenient source for git.

Overview

Lustre 1.8 servers require a patched and compiled kernel. Patches are readily available in the Whamcloud git source repository. A test suite is included with the Lustre 1.8 source. This document walks through the steps of patching the kernel, building Lustre and running a basic test of the complete system.

Procedure

The procedure requires that a OS is setup for development - this includes Lustre sources, kernel source and build tools. Once setup, a new kernel can be patched, compiled, run and tested. Further reading on building a CentOS RPM based kernel is available on the CentOS site.

Provision Machine

Once CentOS 5.5 is newly installed on client-10 login as root.

  1. Install required kernel development tools.
  2. Create a user build with the home directory /build
  3. Switch to the user build and change to the build $HOME directory.
  4. Get the 1.8 branch from the Whamcloud git account.
  5. Run sh ./autogen.sh
  6. Resolve any outstanding dependencies until autogen.sh completes successfully. Success will look like:

Prepare the kernel source

In this walk-thru, the kernel is built using rpmbuild - a tool specific to RPM based distributions.

  1. Get the kernel source. First create the directory structure, then get the source from the RPM. Create a .rpmmacros file to install the kernel source in our user dir.
  2. Install the kernel source:

    Kernel versions

    RHEL periodically releases updates to the kernel. The Lustre Master branch tracks the most recent kernel from Red Hat. In the event that the link above is not completely up-to-date, you should visit the Red Hat source RPM download site or CentOS source RPM download site and manually ensure you are downloading the most recent kernel.

NOTE If you are performing this walk-thru on CentOS 5.6, the kernel source can be found here:
http://vault.centos.org/5.6/os/SRPMS/kernel-2.6.18-238.el5.src.rpm

  1. Expand the source. Using rpmbuild will also apply CentOS patches.

    This will end with:

At this point, we now have kernel souce, with all the CentOS patches applied, residing in the directory /build/kernel/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.x86_64

Patch the kernel source with the Lustre code.

  1. Add a unique build id so we can be certain our kernel is booted. Edit ~build/kernel/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/Makefile and modify line 4, the EXTRAVERSION to read:
  2. enter the directory /build/kernel/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.x86_64
  3. overwrite the .config file with /build/lustre-release/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config
  4. link the Lustre series and patches
  5. Apply the patches to the kernel source using quilt

Build the new kernel as an RPM.

  1. Go into the kernel source directory and issue the following commands to build a kernel rpm.
  2. A successful build will return:

NOTE If you receive a request to generate more entropy, you need to trigger some disk I/O or keyboard I/O. I would recommend (in another terminal):

At this point, you should have a fresh kernel RPM /build/kernel/rpmbuild/RPMS/x86_64/kernel-2.6.18.lustre18-1.x86_64.rpm

Configure and build Lustre

  1. Configure Lustre source
  2. make rpms:
  3. You should now have build the following, similarly named, rpms:

Installing the Lustre kernel and rebooting.

  1. As root, Install the kernel
  2. Create a initrd
  3. Check that /boot/grub/menu.lst is configured to boot the new kernel. Add the following lines to /boot/grub/menu.lst
  4. Ensure /boot/grub/menu.lst has the Lustre kernel is selected: This is 1:
  5. reboot
  6. view the login prompt with satisfaction:

Installing Lustre.

  1. Change to root and Change directory into /build/kernel/rpmbuild/RPMS/x86_64/
  2. Install modules lustre-modules and user space tools lustre-

Installing e2fsprogs

e2fsprogs is needed to run the test suite.

  1. Download e2fsprogs from http://downloads.whamcloud.com/
  2. Install with rpm -ivh e2fsprogs

A quick test

  1. run /usr/lib64/lustre/tests/llmount.sh
  2. you will now have a Lustre filesystem available at /mnt/lustre
  3. NOTE: if you receive an error: mkfs.lustre: Can't parse NID 'client-10@tcp' you'll need to associate the ip address of a non-loopback interface with name of your machine into the /etc/hosts file.

ENDS~

Labels
  • No labels
  1. Sorry about the delay in commenting, looks generally great.

    Is there a how-to on running loadhudsonbuild.rb?

    You misspelled 'Prepare' as in 'Prepare the kernel source'

    Have you run auster? That would also  be good to doc.

    1. Thanks for the comments Cliff. I've fixed the spelling.

      Auster would indeed be worthwhile to document - but I'm dodging that bullet for the moment!

  2. The e2fsprogs link does work, it seems.

    1. Thanks for this: it's updated and live again now!