You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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 Toro machine.

Prerequisite

  • Account on Toro
  • Reservations on the nodes: client-10, client-11, client-12
  • CentOS 5 provisioned on client-10 using loadhudsonbuild.rb

Overview

Lustre 1.8 servers require a patched and compiled kernel. Patches are readily available in the Whamcloud git source repository. The test suite is included with the Lustre 1.8 source.

Procedure

The procedure requires that a OS is setup for development - this includes Lustre source and kernel headers. Once setup, a new kernel can be patched, compiled, run and tested. Building a RPM based kernel is described in detail on the Lustre.org wiki.

Provision Machine

Once CentOS5.5 is provisioned on client-10 login as root.

  1. Get git installed. A simple way to do this is by installing the EPEL repository:
    rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
    yum install git
    
  2. Get the 1.8 branch from the Whamcloud git account.
    git clone git://git.whamcloud.com/fs/lustre-release.git
    cd lustre-release
    git checkout --track -b b1_8 origin/b1_8
    
  3. Run sh ./autogen.sh
  4. Resolve the outstanding dependencies until autogen.sh completes successfully. Success will look like:
    [root@client-10 lustre-release]# sh ./autogen.sh 
    Checking for a complete tree...
    checking for automake-1.9 >= 1.9... found 1.9.6
    ...
    Running automake-1.9...
    Running autoconf...
    [root@client-10 lustre-release]#
    

Prepeare the kernel source

This section of the walk-thru is taken from http://wiki.centos.org/HowTos/Custom_Kernel

  1. Create a user build with the home directory /build
    useradd -d /build build
    
  2. Install development tools: yum groupinstall "Development Tools"
  3. Install a bunch of useful stuff: yum install rpm-build redhat-rpm-config unifdef gnupg quilt
  4. Switch to user build
  5. 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.
    cd
    mkdir -p kernel/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
    cd kernel
    echo '%_topdir %(echo $HOME)/kernel/rpmbuild' > ~/.rpmmacros
    
  6. Install the kernel source:
    rpm -i http://mirror.centos.org/centos/5/updates/SRPMS/kernel-2.6.18-194.32.1.el5.src.rpm 2>&1 | grep -v mockb
    
  7. Expand the source. NOTE you may need to resolve some dependencies (see below)
    cd ~/kernel/rpmbuild/SPECS
    rpmbuild -bp --target=`uname -m` ./kernel-2.6.spec
    

    This should return a bunch of stuff and end:
    ...
    + echo 'Patch #20216 (xen-hvm-correct-accuracy-of-pmtimer.patch):'
    Patch #20216 (xen-hvm-correct-accuracy-of-pmtimer.patch):
    + patch -p1 --fuzz=2 -s
    + exit 0
    

Patch the kernel source with the Lustre code.

  1. enter the directory /build/kernel/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.x86_64
  2. overwrite the .config file with /build/lustre-release/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config
    cp /build/lustre-release/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config ./.config
    
  3. link the luster series and patches
    ln -s ~/lustre-release/lustre/kernel_patches/series/2.6-rhel5.series series
    ln -s ~/lustre-release/lustre/kernel_patches/patches patches
    
  4. Apply the patches to the kernel source using quilt
    quilt push -av
    ...
    ...
    Applying patch patches/jbd2_stats_proc_init-wrong-place.patch
    patching file fs/jbd2/journal.c
    Hunk #1 succeeded at 1042 (offset 143 lines).
    
    Now at patch patches/jbd2_stats_proc_init-wrong-place.patch
    
  5. Add a unique build id so we can be certain our kernel is booted. Edit ~/build/kernel/rpmbuild/SPECS/kernel-2.6.spec and add the line
    %define buildid .lustre18
    at line 73.

Build the new kernel.

  1. Go into the rpmbuild directory and issue rpm build command
    cd ~build/kernel/rpmbuild
    rpmbuild -bb --target=`uname -m` ./SPECS/kernel-2.6.spec
    
  2. make a coffee.
  3. If you receive a request to generate more entropy, you need to trigger some disk I/O or keyboard I/O. I would recommend:
    grep -Ri 'whamcloud' /usr
    

ENDS

  • No labels