From d721c661aa25b00d5793f1eaf3b8635ab757239a Mon Sep 17 00:00:00 2001 From: Richard Henwood Date: Wed, 18 May 2011 12:14:04 -0500 Subject: [PATCH] FIX: xrefs and tidying --- InstallingLustreFromSourceCode.xml | 324 +++++++++++++++---------------------- 1 file changed, 129 insertions(+), 195 deletions(-) diff --git a/InstallingLustreFromSourceCode.xml b/InstallingLustreFromSourceCode.xml index 7e08e9f..d2b5ee9 100644 --- a/InstallingLustreFromSourceCode.xml +++ b/InstallingLustreFromSourceCode.xml @@ -1,92 +1,63 @@ - + - Installing Lustre from Source Code + Installing Lustre from Source Code If you need to build a customized Lustre server kernel or are using a Linux kernel that has not been tested with the version of Lustre you are installing, you may need to build and install Lustre from source code. This chapter describes: + - Overview and Prerequisites + + - + + - Patching the Kernel + + - - - - Creating and Installing the Lustre Packages - - - - - - Installing Lustre with a Third-Party Network Stack - - - + + -
- <anchor xml:id="dbdoclet.50438210_pgfId-1297212" xreflabel=""/> -
- 29.1 <emphasis role="bold">Overview and Prerequisites</emphasis><anchor xml:id="dbdoclet.50438210_69313" xreflabel=""/> + +
+ 29.1 Overview and Prerequisites Lustre can be installed from either pre-built binary packages (RPMs) or freely-available source code. Installing from the package release is recommended unless you need to customize the Lustre server kernel or will be using an Linux kernel that has not been tested with Lustre. For a list of supported Linux distributions and architectures, see the topic Lustre_2.0 on the Lustre wiki. The procedure for installing Lustre from RPMs is describe in Chapter 8: Installing the Lustre Software. To install Lustre from source code, the following are required: Linux kernel patched with Lustre-specific patches - - - + Lustre modules compiled for the Linux kernel - - - + Lustre utilities required for Lustre configuration - - - + The installation procedure involves several steps: Patching the core kernel - - - + Configuring the kernel to work with Lustre - - - + Creating Lustre and kernel RPMs from source code. - - - + - - - - - - Note -When using third-party network hardware with Lustre, the third-party modules (typically, the drivers) must be linked against the Linux kernel. The LNET modules in Lustre also need these references. To meet these requirements, a specific process must be followed to install and recompile Lustre. See Installing Lustre with a Third-Party Network Stack, for an example showing how to install Lustre 1.6.6 using the Myricom MX 1.2.7 driver. The same process can be used for other third-party network stacks. - - - - + When using third-party network hardware with Lustre, the third-party modules (typically, the drivers) must be linked against the Linux kernel. The LNET modules in Lustre also need these references. To meet these requirements, a specific process must be followed to install and recompile Lustre. See Installing Lustre with a Third-Party Network Stack, for an example showing how to install Lustre 1.6.6 using the Myricom MX 1.2.7 driver. The same process can be used for other third-party network stacks.
-
- 29.2 <anchor xml:id="dbdoclet.50438210_65411" xreflabel=""/>Patching the Kernel +
+ 29.2 Patching the Kernel If you are using non-standard hardware, plan to apply a Lustre patch, or have another reason not to use packaged Lustre binaries, you have to apply several Lustre patches to the core kernel and run the Lustre configure script against the kernel.
<anchor xml:id="dbdoclet.50438210_pgfId-1296831" xreflabel=""/>29.2.1 Introducing the Quilt Utility @@ -95,27 +66,19 @@ Apply patches from the stack (quilt push) - - - + Remove patches from the stack (quilt pop) - - - + Query the contents of the series file (quilt series), the contents of the stack (quilt applied, quilt previous, quilt top), and the patches that are not applied at a particular moment (quilt next, quilt unapplied). - - - + Edit and refresh (update) patches with Quilt, as well as revert inadvertent changes, and fork or clone patches and show the diffs before and after work. - - - + A variety of Quilt packages (RPMs, SRPMs and tarballs) are available from various sources. Use the most recent version you can find. Quilt depends on several other utilities, e.g., the coreutils RPM that is only available in RedHat 9. For other RedHat kernels, you have to get the required packages to successfully install Quilt. If you cannot locate a Quilt package or fulfill its dependencies, you can build Quilt from a tarball, available at the Quilt project website: http://savannah.nongnu.org/projects/quilt @@ -124,71 +87,52 @@
<anchor xml:id="dbdoclet.50438210_pgfId-1296842" xreflabel=""/>29.2.2 <anchor xml:id="dbdoclet.50438210_44148" xreflabel=""/>Get the Lustre Source and Unpatched Kernel The Lustre Engineering Team has targeted several Linux kernels for use with Lustre servers (MDS/OSS) and provides a series of patches for each one. The Lustre patches are maintained in the kernel_patch directory bundled with the Lustre source code. - - - - - - - - - - - - - - - - Caution -Lustre contains kernel modifications which interact with storage devices and may introduce security issues and data loss if not installed, configured and administered correctly. Before installing Lustre, be cautious and back up ALL data. - - - - - - - - - - Note - Each patch series has been tailored to a specific kernel version, and may or may not apply cleanly to other versions of the kernel. - - - - + + Lustre contains kernel modifications which interact with storage devices and may introduce security issues and data loss if not installed, configured and administered correctly. Before installing Lustre, be cautious and back up ALL data. + Each patch series has been tailored to a specific kernel version, and may or may not apply cleanly to other versions of the kernel. To obtain the Lustre source and unpatched kernel: - 1. Verify that all of the Lustre installation requirements have been met. + + Verify that all of the Lustre installation requirements have been met. For more information on these prerequisites, see: Hardware requirements in Chapter 5: Setting Up a Lustre File System - - - + Software and environmental requirements in Preparing to Install the Lustre Software - - - + - 2. Download the Lustre source code. - On the Lustre download site, select a version of Lustre to download and then select “Source†as the platform. - 3. Download the unpatched kernel. + + + Download the Lustre source code. + On the Lustre download site, select a version of Lustre to download and then select 'Source' as the platform. + + Download the unpatched kernel. For convenience, Oracle maintains an archive of unpatched kernel sources at: http://downloads.lustre.org/public/kernels/ +
<anchor xml:id="dbdoclet.50438210_pgfId-1305280" xreflabel=""/>29.2.3 Patch the Kernel This procedure describes how to use Quilt to apply the Lustre patches to the kernel. To illustrate the steps in this procedure, a RHEL 5 kernel is patched for Lustre 1.6.5.1. - 1. Unpack the Lustre source and kernel to separate source trees. - a. Unpack the Lustre source. + + Unpack the Lustre source and kernel to separate source trees. + + Unpack the Lustre source. For this procedure, we assume that the resulting source tree is in /tmp/lustre-1.6.5.1 - b. Unpack the kernel. + + Unpack the kernel. For this procedure, we assume that the resulting source tree (also known as the destination tree) is in /tmp/kernels/linux-2.6.18 - 2. Select a config file for your kernel, located in the kernel_configs directory (lustre/kernel_patches/kernel_config). + + + Select a config file for your kernel, located in the kernel_configs directory (lustre/kernel_patches/kernel_config). The kernel_config directory contains the .config files, which are named to indicate the kernel and architecture with which they are associated. For example, the configuration file for the 2.6.18 kernel shipped with RHEL 5 (suitable for i686 SMP systems) is kernel-2.6.18-2.6-rhel5-i686-smp.config. - 3. Select the series file for your kernel, located in the series directory (lustre/kernel_patches/series). + + Select the series file for your kernel, located in the series directory (lustre/kernel_patches/series). The series file contains the patches that need to be applied to the kernel. - 4. Set up the necessary symlinks between the kernel patches and the Lustre source. + + Set up the necessary symlinks between the kernel patches and the Lustre source. This example assumes that the Lustre source files are unpacked under /tmp/lustre-1.6.5.1 and you have chosen the 2.6-rhel5.series file). Run: $ cd /tmp/kernels/linux-2.6.18 $ rm -f patches series @@ -196,41 +140,37 @@ ./series $ ln -s /tmp/lustre-1.6.5.1/lustre/kernel_patches/patches . - 5. Use Quilt to apply the patches in the selected series file to the unpatched kernel. Run: + + Use Quilt to apply the patches in the selected series file to the unpatched kernel. Run: $ cd /tmp/kernels/linux-2.6.18 $ quilt push -av The patched destination tree acts as a base Linux source tree for Lustre. +
-
- 29.3 <anchor xml:id="dbdoclet.50438210_47529" xreflabel=""/>Creating and Installing the Lustre Packages +
+ 29.3 Creating and Installing the Lustre Packages After patching the kernel, configure it to work with Lustre, create the Lustre packages (RPMs) and install them. - 1. Configure the patched kernel to run with Lustre. Run: + + + Configure the patched kernel to run with Lustre. Run: $ cd <path to kernel tree> -$ cp /boot/config-‘uname -r‘ .config +$ cp /boot/config-`uname -r` .config $ make oldconfig || make menuconfig $ make include/asm $ make include/linux/version.h $ make SUBDIRS=scripts $ make include/linux/utsrelease.h - 2. Run the Lustre configure script against the patched kernel and create the Lustre packages. + + Run the Lustre configure script against the patched kernel and create the Lustre packages. $ cd <path to lustre source tree> $ ./configure --with-linux=<path to kernel tree> $ make rpms This creates a set of .rpms in /usr/src/redhat/RPMS/<arch> with an appended date-stamp. The SuSE path is /usr/src/packages. - - - - - - Note -You do not need to run the Lustre configure script against an unpatched kernel. - - - - + You do not need to run the Lustre configure script against an unpatched kernel. Example set of RPMs: lustre-1.6.5.1-\2.6.18_53.xx.xx.el5_lustre.1.6.5.1.custom_20081021.i686.rpm @@ -243,94 +183,75 @@ lustre-source-1.6.5.1-\2.6.18_53.xx.xx.el5_lustre.1.6.5.1.custom_20081021.i\ 686.rpm - - - - - - Note -If the steps to create the RPMs fail, contact Lustre Support by reporting a bug. See Reporting a Lustre Bug. - - - - - - - - - - Note -Several features and packages are available that extend the core functionality of Lustre. These features/packages can be enabled at the build time by issuing appropriate arguments to the configure command. For a list of these features and packages, run ./configure -help in the Lustre source tree. The configs/ directory of the kernel source contains the config files matching each the kernel version. Copy one to .config at the root of the kernel tree. - - - - - 3. Create the kernel package. Navigate to the kernel source directory and run: + If the steps to create the RPMs fail, contact Lustre Support by reporting a bug. See Reporting a Lustre Bug. + Several features and packages are available that extend the core functionality of Lustre. These features/packages can be enabled at the build time by issuing appropriate arguments to the configure command. For a list of these features and packages, run ./configure -help in the Lustre source tree. The configs/ directory of the kernel source contains the config files matching each the kernel version. Copy one to .config at the root of the kernel tree. + + Create the kernel package. Navigate to the kernel source directory and run: $ make rpm Example result: kernel-2.6.95.0.3.EL_lustre.1.6.5.1custom-1.i686.rpm - - - - - - Note -Step 3 is only valid for RedHat and SuSE kernels. If you are using a stock Linux kernel, you need to get a script to create the kernel RPM. - - - - - 4. Install the Lustre packages. + Step 3 is only valid for RedHat and SuSE kernels. If you are using a stock Linux kernel, you need to get a script to create the kernel RPM. + + Install the Lustre packages. Some Lustre packages are installed on servers (MDS and OSSs), and others are installed on Lustre clients. For guidance on where to install specific packages, see TABLE 8-1 in Preparing to Install the Lustre Software. which lists required packages and for each package, where to install it. Depending on the selected platform, not all of the packages listed in TABLE 8-1 need to be installed. - - - - - - Note -Running the patched server kernel on the clients is optional. It is not necessary unless the clients will be used for multiple purposes, for example, to run as a client and an OST. - - - - + Running the patched server kernel on the clients is optional. It is not necessary unless the clients will be used for multiple purposes, for example, to run as a client and an OST. Lustre packages should be installed in this order: - a. Install the kernel, modules and ldiskfs packages. + + Install the kernel, modules and ldiskfs packages. Navigate to the directory where the RPMs are stored, and use the rpm -ivh command to install the kernel, module and ldiskfs packages. $ rpm -ivh kernel-lustre-smp-<ver> \ kernel-ib-<ver> \ lustre-modules-<ver> \ lustre-ldiskfs-<ver> - b. Install the utilities/userspace packages. + + Install the utilities/userspace packages. Use the rpm -ivh command to install the utilities packages. For example: $ rpm -ivh lustre-<ver> - c. Install the e2fsprogs package. + + Install the e2fsprogs package. Make sure the e2fsprogs package is unpacked, and use the rpm -i command to install it. For example: $ rpm -i e2fsprogs-<ver> - d. (Optional) If you want to add optional packages to your Lustre system, install them now. - 5. Verify that the boot loader (grub.conf or lilo.conf) has been updated to load the patched kernel. - 6. Reboot the patched clients and the servers. - a. If you applied the patched kernel to any clients, reboot them. + + (Optional) If you want to add optional packages to your Lustre system, install them now. + + + Verify that the boot loader (grub.conf or lilo.conf) has been updated to load the patched kernel. + + Reboot the patched clients and the servers. + + If you applied the patched kernel to any clients, reboot them. Unpatched clients do not need to be rebooted. - b. Reboot the servers. + + Reboot the servers. Once all the machines have rebooted, the next steps are to configure Lustre Networking (LNET) and the Lustre file system. See Chapter 10: Configuring Lustre. + +
-
- 29.4 <anchor xml:id="dbdoclet.50438210_27248" xreflabel=""/>Installing Lustre with a Third-Party Network Stack - When using third-party network hardware, you must follow a specific process to install and recompile Lustre. This section provides an installation example, describing how to install Lustre 1.6.6 while using the Myricom MX 1.2.7 driver. The same process is used for other third-party network stacks, by replacing MX-specific references in Step 2 with the stack-specific build and using the proper --with option when configuring the Lustre source code. - 1. Compile and install the Lustre kernel. - a. Install the necessary build tools. +
+ 29.4 Installing Lustre with a Third-Party Network Stack + When using third-party network hardware, you must follow a specific process to install and recompile Lustre. This section provides an installation example, describing how to install Lustre 1.6.6 while using the Myricom MX 1.2.7 driver. The same process is used for other third-party network stacks, by replacing MX-specific references in (Step 2) with the stack-specific build and using the proper --with option when configuring the Lustre source code. + + Compile and install the Lustre kernel. + + Install the necessary build tools. GCC and related tools must be installed. For more information, see Required Software. $ yum install rpm-build redhat-rpm-config $ mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} $ echo '%_topdir %(echo $HOME)/rpmbuild' > .rpmmacros - b. Install the patched Lustre source code. + + Install the patched Lustre source code. This RPM is available at the Lustre download site. $ rpm -ivh \ kernel-lustre-source-2.6.18-92.1.10.el5_lustre.1.6.6.x86_64.rpm - a. Build the Linux kernel RPM. + + Build the Linux kernel RPM. $ cd /usr/src/linux-2.6.18-92.1.10.el5_lustre.1.6.6 $ make distclean $ make oldconfig dep bzImage modules @@ -341,16 +262,20 @@ $ make SUBDIRS=scripts $ make rpm - b. Install the Linux kernel RPM. + + Install the Linux kernel RPM. If you are building a set of RPMs for a cluster installation, this step is not necessary. Source RPMs are only needed on the build machine. $ rpm -ivh \ ~/rpmbuild/kernel-lustre-2.6.18-92.1.10.el5_\lustre.1.6.6.x86_64.rpm $ mkinitrd /boot/2.6.18-92.1.10.el5_lustre.1.6.6 - c. Update the boot loader (/etc/grub.conf) with the new kernel boot information. + + Update the boot loader (/etc/grub.conf) with the new kernel boot information. $ /sbin/shutdown 0 -r - 2. Compile and install the MX stack. + + + Compile and install the MX stack. $ cd /usr/src/ $ gunzip mx_1.2.7.tar.gz (can be obtained from www.myri.com/scs/) $ tar -xvf mx_1.2.7.tar @@ -360,13 +285,16 @@ $ make $ make install - 3. Compile and install the Lustre source code. - a. Install the Lustre source (this can be done via RPM or tarball). The source file is available at the Lustre download site. This example shows installation via the tarball. + + Compile and install the Lustre source code. + + Install the Lustre source (this can be done via RPM or tarball). The source file is available at the Lustre download site. This example shows installation via the tarball. $ cd /usr/src/ $ gunzip lustre-1.6.6.tar.gz $ tar -xvf lustre-1.6.6.tar - b. Configure and build the Lustre source code. + + Configure and build the Lustre source code. The ./configure --help command shows a list of all of the --with options. All third-party network stacks are built in this manner. $ cd lustre-1.6.6 $ ./configure --with-linux=/usr/src/linux \ @@ -375,7 +303,9 @@ $ make rpms The make rpms command output shows the location of the generated RPMs - 4. Use the rpm -ivh command to install the RPMS. + + + Use the rpm -ivh command to install the RPMS. $ rpm -ivh \ lustre-1.6.6-2.6.18_92.1.10.el5_lustre.1.6.6smp.x86_64.rpm $ rpm -ivh \ @@ -385,18 +315,22 @@ lustre-ldiskfs-3.0.6-2.6.18_92.1.10.el5_lustre.1.6.6\ smp.x86_64.rpm - 5. Add the following lines to the /etc/modprobe.conf file. + + Add the following lines to the /etc/modprobe.conf file. options kmxlnd hosts=/etc/hosts.mxlnd options lnet networks=mx0(myri0),tcp0(eth0) - 6. Populate the myri0 configuration with the proper IP addresses. + + Populate the myri0 configuration with the proper IP addresses. vim /etc/sysconfig/network-scripts/myri0 - 7. Add the following line to the /etc/hosts.mxlnd file. + + Add the following line to the /etc/hosts.mxlnd file. $ IP HOST BOARD EP_ID - 8. Start Lustre. + + Start Lustre. Once all the machines have rebooted, the next steps are to configure Lustre Networking (LNET) and the Lustre file system. See Chapter 10: Installing Lustre from Source Code. +
-
-- 1.8.3.1