== How to build lustre with 2.6.18/3tera applogic == by: GDR! 1) this is mostly right: http://mergingbusinessandit.blogspot.com/2008/10/building-lustre-1651-against-latest.html [1] 2) make symlinks in kernel from 3tera 3) quilt push - wo. options, until fails 4) fix .c file that fails, quilt push again 5) build kernel (with infiniband support, which in turn requires pci support!) 6) goto lustre dir 7) ./configure --with-linux ... 8) make 9) patches fail - apply all patches in series by hand (manually quilt push) 10) copy linux-stage directory somewhere, just in case 11) vim ldiskfs/ldiskfs/autoMakefile, remove 'quilt push' and 'cp' and all in surrounding that can destroy your patched data 12) make should succeed n ow 13) To build rpm: make rpms will fail, use rpmbuild -bb lustre.spec 14) Create tar file that is missing for rpmbuild from source directory. Don't make clean, ever. 15) rpmbuild -bb lustre.spec again 16) works! :) Copy of http://mergingbusinessandit.blogspot.com/2008/10/building-lustre-1651-against-latest.html follows: I was at a customer site this week and had the need to build Lustre 1.6.5.1 against the latest kernel from Redhat, 2.6.18-92.1.13. Being this process has multiple steps, I thought I would document it so that others do not have to reinvent the wheel. 1) Prep a build environment - cd ~ - yum install rpm-build redhat-rpm-config unifdef - mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} - echo '%_topdir %(echo $HOME)/rpmbuild' > .rpmmacros - rpm -i http://mirror.centos.org/centos/5/updates/SRPMS/kernel-2.6.18-92.1.13.el5.src.rpm - cd ~/rpmbuild/SPECS - rpmbuild -bp --target=`uname -m` kernel-2.6.spec 2> prep-err.log | tee prep-out.log 2) Download and install quilt (quilt is used for applying kernel patches from a series file) - cd ~ - wget http://download.savannah.gnu.org/releases/quilt/quilt-0.47.tar.gz - gunzip quilt-0.47.tar.gz - tar -xvf quilt-0.47.tar - cd quilt-0.47 - ./configure - make - make install 3) Prepare the Lustre source code - Download from http://www.sun.com/software/products/lustre/get.jsp - mv lustre-1.6.5.1.tar.gz /usr/src - gunzip lustre-1.6.5.1.tar.gz - tar -xvf lustre-1.6.5.1.tar 4) Apply the Lustre kernel-space patches to the kernel source tree - cd /root/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/ - ln -s /usr/src/lustre-1.6.5.1/lustre/kernel_patches/series/2.6-rhel5.series series (there are several diffrent series files in the series dir, choose the one closest to your environment) - ln -s /usr/src/lustre-1.6.5.1/lustre/kernel_patches/patches patches - quilt push -av 5) Compile a new kernel from source - make distclean - make oldconfig dep bzImage modules - cp /boot/config-`uname -r` .config - make oldconfig || make menuconfig - make include/asm - make include/linux/version.h - make SUBDIRS=scripts - make rpm - rpm -ivh ~/rpmbuild/RPMS/kernel-2.6.18prep-1.x86_64.rpm - mkinitrd /boot/initrd-2.6.18-prep.img 2.6.18-prep - Update /etc/grub.conf with new kernel boot information 6) Reboot system with new, patched kernel 7) Compile Lustre with the new kernel running - cd /usr/src/lustre-1.6.5.1 - ./configure --with-linux=/root/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.x86_64 - make rpms (Build RPMs will be in ~/rpmbuild/RPMS) 8) Install the appropriate RPMs for your environment