This walk-thru is targeting developers who want to explore the bleeding edge of Lustre. If you are evaluating Lustre for production, you should choose a Lustre Release.
Describe the steps you need to build and test a Lustre system (MGS, MDT, MDS, OSS, OST, client) from the
master branch on a x86_64, RHEL/CentOS 6.4 machine.
- A newly installed RHEL/CentOS 6.4 x86_64 machine connected to the internet.
- EPEL Repository: this is a convenient source for git.
NOTE the EPEL 5 repository is used because it includes
- NOTE It is suggested that you have at least 1GB of memory on the machine you are using for the build.
- NOTE Verify that SElinux is disabled.
pre-built RPMs are available
Lustre servers currently require a patched and compiled kernel. A patched and compiled Lustre server kernel is available from Whamcloud. A separate page is available to walk thru setting up Lustre with these pre-built RPMs. This document is for those who wish to build their Lustre system from source. Note that if you are not modifying the kernel patches on the server, it is possible to use the pre-built Lustre server kernel RPMs, and only build the Lustre code. Note that a patched kernel is NOT needed for the Lustre client.
Patches are available in the Git source repository. A test suite is included with the Lustre source. This document walks through the steps of patching the kernel, building Lustre and running a basic test of the complete system.
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 RHEL RPM based kernel is available from, among other sources, the CentOS site.
Provision machine and installing dependencies.
Once RHEL 6.3 is newly installed on
rhel6-master login as root.
Install the kernel development tools.
Problem with installing 'Development Tools'
If the Development Tools group is not be available for some reason, you may find the following list if individual packages necessary to install.
Install additional dependencies
Install EPEL 5. NOTE EPEL5 is used because it contains
Preparing the Lustre source.
Create a user
buildwith the home directory
Switch to the user
buildand change to the build
Get the MASTER branch from HPDD git.
Resolve any outstanding dependencies until
autogen.shcompletes successfully. Success will look like:
Prepare a patched kernel for Lustre
You can have different ways to prepare a patched kernel for Lustre. The easier method is to download built RPM packages from the Releases page. You're going to need the packages starting with '
kernel-'. After new kernel packages are downloaded, you can skip the following few steps and go to the section 'Installing the Lustre kernel and rebooting'.
If you want a more challenge life, you can patch the kernel by yourself, in that case, please follow the steps below.
Prepare the kernel source
In this walk-thru, the kernel is built using
rpmbuild - a tool specific to RPM based distributions.
Get the kernel source. First create the directory structure, then get the source from the RPM. Create a
.rpmmacrosfile to install the kernel source in our user dir.
Install the kernel source:
RHEL kernel versions
Red Hat periodically release updates to their distributed kernel. The Lustre Master attempts to stay up-to-date with 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 and ensure you are downloading the most recent kernel. The most recent supported kernel is recorded in
Prepare the source using rpmbuild.
This will end with:
At this point, we now have kernel source, with all the RHEL/CentOS patches applied, residing in the directory
Patch the kernel source with the Lustre code.
Add a unique build id so we can be certain our kernel is booted. Edit
~/kernel/rpmbuild/BUILD/kernel-2.6.32-431.5.1.el6/linux-2.6.32-431.5.1.el6.x86_64/Makefileand modify line 4, the
Enter the directory
Link the Lustre series and patches
Apply the patches to the kernel source using quilt
Build the new kernel as an RPM.
Go into the kernel source directory and issue the following commands to build a kernel rpm.
A successful build will return:
If you receive a request to generate more entropy, you need to trigger some disk I/O or keyboard I/O. In another terminal, you can either type randomly or execute the following command to generate entropy:
At this point, you should have a fresh kernel RPM
Installing the Lustre kernel and rebooting.
As root, Install the kernel
Depending on how you got your kernel packages, the PKG_PATH should be
~build/kernel/rpmbuild/RPMS/x86_64if you built the packages by yourself, or any other directory where you downloaded the packages from https://build.whamcloud.com/.
Create initrd using
dracut(*This may not be required because
initrdshould have been created by installing new kernel*)
optional turn on
lustreservices, and specify network type for
If you don't know what should be written to this file, just leave it empty for now.
- Reboot the sys
tem with the rebootcommand.
view the login prompt with satisfaction, and make sure that new kernel is running:
Configure and build Lustre
Configure Lustre source
You should now have build the following, similarly named, RPMs:
e2fsprogs is needed to run the test suite.
- Change to
rootand Change directory into
lustre-modulesand user space tools
Disable SELinux (Lustre Servers)
SELinux, which is on by default in RHEL/CentOS, will prevent the format commands for the various Lustre targets from completing. Therefore you must either disable it or adjust the settings. These instructions explain how to disable it.
- Run getenforce to see if SELinux is enabled. It should return 'Enforcing' or 'Disabled'.
- To disable it, edit
/etc/selinux/configand change the line '
selinux=enforcing' to '
Finally, reboot your system.
- You will now have a Lustre filesystem available at
- NOTE: if you receive an error similar to:
mkfs.lustre: Can't parse NID 'rhel6-master@tcp'you'll need to associate the IP address of a non-loopback interface with name of your machine into the