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.

Difference between revisions of "Building Lustre Code"

From Obsolete Lustre Wiki
Jump to navigationJump to search
(Created page with 'The procedure on this page describes how to build and configure Lustre code in a development environment. It assumes that you have: * Checked out Lustre source code from CVS (see...')
 
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The procedure on this page describes how to build and configure Lustre code in a development environment. It assumes that you have:
+
<small>''(Updated: Dec 2009)''</small>
* Checked out Lustre source code from CVS (see [[Accessing Lustre Code]]
+
 
* Obtained an unmodified kernel source supported by the version of Lustre you have checked out (supported kernel sources can be found at [http://downloads.lustre.org/public/kernels/ http://downloads.lustre.org/public/kernels/]). [[Is this the correct link to use?]]
+
The procedure on this page describes how to build and configure Lustre™ code in a development environment. It assumes that you have:
 +
* Checked out Lustre source code from Git (see [[Accessing Lustre Code]]).
 +
* Obtained an unmodified kernel source supported by the version of Lustre you have checked out (supported kernel sources can be found at [http://downloads.lustre.org/public/kernels/ http://downloads.lustre.org/public/kernels/]).
 +
 
 +
'''''Note:''''' For how to install Lustre from source for a non-supported system configuration, see [[Building and Installing Lustre from Source Code]].
  
 
== Configuring and Building Lustre ==
 
== Configuring and Building Lustre ==
Line 15: Line 19:
 
running autogen for liblustre...
 
running autogen for liblustre...
 
</pre>
 
</pre>
2. ''Apply Lustre patches to your unmodified Linux distribution.'' For instructions, see [[Applying Lustre Patches to a Kernel]].
+
2. ''Apply Lustre patches to your Linux kernel sources.'' For instructions, see [[Applying Lustre Patches to a Kernel]].
  
3. ''Run '' configure ''to set up your system to compile the Lustre code.'' Configure performs extensive checks of the underlying system and kernel and then produces ''autoMakefiles'' and ''Makefiles''.  
+
3. ''Build a new kernel.''
 +
 
 +
4. ''Run '' configure ''to set up your system to compile the Lustre code.'' Configure performs extensive checks of the underlying system and kernel and then produces ''makefiles''.  
  
 
'''''Note:''''' Replace ''/path/to/linux'' with the path to your patched kernel source (for example, ''/tmp/kernels/linux-2.6.18-128.1.1'')
 
'''''Note:''''' Replace ''/path/to/linux'' with the path to your patched kernel source (for example, ''/tmp/kernels/linux-2.6.18-128.1.1'')
Line 27: Line 33:
 
...
 
...
 
LLCFLAGS: -g -Wall -fPIC
 
LLCFLAGS: -g -Wall -fPIC
 +
 +
Type 'make' to build Lustre.
 
</pre>
 
</pre>
  
4. ''Type 'make' to build Lustre.''
+
5. ''Type ''make'' to build Lustre.''
 
<pre>
 
<pre>
 
$ make
 
$ make
Line 35: Line 43:
 
</pre>
 
</pre>
  
5. ''Install the built Lustre modules in the kernel''. We recommend installing them in the ''modules'' directory and running the ''depmod'' command. '''[[Is more detail needed here?]]'''
+
==== Building and Testing Your Code ====
 +
Before you submit code for possible inclusion in Lustre, it must pass the ''acceptance-small'' acceptance test suite. For more details about the Lustre testing framework and ''acceptance-small'', see [[Testing Lustre Code]].
 +
 
 +
To initiate a loopback-based Lustre mount for local testing, run:
 +
<pre>
 +
lustre/tests/llmount.sh
 +
</pre>
 +
 
 +
To clean up the loopback mount (reverse the actions of the ''llmount.sh'' script), run <pre>
 +
lustre/tests/llmountcleanup.sh
 +
</pre>

Latest revision as of 06:37, 22 February 2010

(Updated: Dec 2009)

The procedure on this page describes how to build and configure Lustre™ code in a development environment. It assumes that you have:

Note: For how to install Lustre from source for a non-supported system configuration, see Building and Installing Lustre from Source Code.

Configuring and Building Lustre

To configure and build Lustre, follow these steps:

1. Run the autogen script. The autogen script performs a few checks and then bootstraps the build system using the GNU automake and autoconf functions.

$ sh autogen.sh
Checking for a complete tree...
checking for automake-1.7 1.7.8... found 1.7.9
checking for autoconf 2.57... found 2.59
...
running autogen for liblustre...

2. Apply Lustre patches to your Linux kernel sources. For instructions, see Applying Lustre Patches to a Kernel.

3. Build a new kernel.

4. Run configure to set up your system to compile the Lustre code. Configure performs extensive checks of the underlying system and kernel and then produces makefiles.

Note: Replace /path/to/linux with the path to your patched kernel source (for example, /tmp/kernels/linux-2.6.18-128.1.1)

$ ./configure --with-linux=/path/to/linux
checking build system type... i686-redhat-linux-gnu
checking host system type... i686-redhat-linux-gnu
checking target system type... i686-redhat-linux-gnu
...
LLCFLAGS: -g -Wall -fPIC

Type 'make' to build Lustre.

5. Type make to build Lustre.

$ make
...

Building and Testing Your Code

Before you submit code for possible inclusion in Lustre, it must pass the acceptance-small acceptance test suite. For more details about the Lustre testing framework and acceptance-small, see Testing Lustre Code.

To initiate a loopback-based Lustre mount for local testing, run:

lustre/tests/llmount.sh

To clean up the loopback mount (reverse the actions of the llmount.sh script), run

lustre/tests/llmountcleanup.sh