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 "Debian Install"

From Obsolete Lustre Wiki
Jump to navigationJump to search
 
(14 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Lustre on Debian =
+
<small>
 +
''DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT''
  
If you are brave, use Lenny. There are lustre client packages there. However, you will still need a lustre-patched kernel for a server. These instructions come from a mailing list post on how to recompile the lenny packages for etch.
+
''This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.''
 +
</small>
 +
 
 +
== Lustre on Debian ==
 +
 
 +
If you are brave, use Lenny. There are Lustre client packages there. However, you will still need a lustre-patched kernel for a server. These instructions come from a user-contributed mailing list post on how to recompile the lenny packages for etch.
  
 
There are also prebuilt packages and kernel images at:
 
There are also prebuilt packages and kernel images at:
Line 8: Line 14:
 
== Pre-Requisites ==
 
== Pre-Requisites ==
  
Any debian machine can be used to build the packages. It does not have to be a
+
Any Debian machine can be used to build the packages. It does not have to be a
lustre client or server. You can skip this and the next section if you are on lenny.
+
Lustre client or server. You can skip this and the next section if you are on Lenny.
  
 
* Install build essentials
 
* Install build essentials
Install the packages required to build debs. (build-essential, module-assistant etc)
+
Install the packages required to build debs. (build-essential, module-assistant etc) Better use http://packages.debian.org/etch-backports/debhelper (dh_lintian is missing in sable).
  
 
  apt-get install build-essential module-assistant
 
  apt-get install build-essential module-assistant
Line 18: Line 24:
 
* Get Source
 
* Get Source
  
Make sure you have deb-src lines for lenny in /etc/apt/sources.list
+
Make sure you have '''deb-src''' lines for Lenny in /etc/apt/sources.list
 
from your favorite Debian mirror, such as:
 
from your favorite Debian mirror, such as:
  
Line 35: Line 41:
 
  apt-get source lustre
 
  apt-get source lustre
  
This will unpack two directories, one with the lustre source and one with the
+
This will unpack two directories, one with the Lustre source and one with the
 
kernel source.
 
kernel source.
  
== Build lustre userspace ==
+
== Build Lustre userspace ==
  
Change to the lustre directory.
+
Change to the '''lustre''' directory.
  
 
  cd lustre-X.X.X
 
  cd lustre-X.X.X
Line 56: Line 62:
 
  linux-patch-lustre  #Patch for the linux kernel.
 
  linux-patch-lustre  #Patch for the linux kernel.
  
Install the lustre-source and linux-patch-lustre packages on the build machine.
+
Install the '''lustre-source''' and '''linux-patch-lustre''' packages on the build machine.
 
These packages contain the patches to the kernel source tree that are used in
 
These packages contain the patches to the kernel source tree that are used in
 
the next step of the build.
 
the next step of the build.
Line 63: Line 69:
 
  dpkg -i  lustre-source_XXX.deb
 
  dpkg -i  lustre-source_XXX.deb
  
== Build lustre patched kernel ==
+
== Build Lustre patched kernel ==
  
 
If building on Lenny you can skip above and run
 
If building on Lenny you can skip above and run
Line 74: Line 80:
 
  cd linux-source-2.6.18
 
  cd linux-source-2.6.18
  
We need to grab the .config file for the debian kernel. We should be able to
+
We need to grab the '''.config''' file for the debian kernel. We should be able to
 
generate the config from the source package, but I'm not sure how. The easiest
 
generate the config from the source package, but I'm not sure how. The easiest
 
way to get the correct config is to copy /boot/config-X.X.X from a machine
 
way to get the correct config is to copy /boot/config-X.X.X from a machine
already running the debian kernel.
+
already running the Debian kernel.
  
 
  cp /boot/config-2.6.XXX-686 .config
 
  cp /boot/config-2.6.XXX-686 .config
  
 
Check the kernel config works: (This might generate 1 or 2 minor questions. Just
 
Check the kernel config works: (This might generate 1 or 2 minor questions. Just
hit "m" or "y".)
+
hit '''m''' or '''y'''.)
  
 
  make oldconfig
 
  make oldconfig
Line 96: Line 102:
 
a good idea)
 
a good idea)
  
If your lustre patch is not recognized, you might need to create the following symlinks:
+
If your Lustre patch is not recognized, you might need to create the following symlinks:
  
 
  ln -s /usr/src/kernel-patches/lustre/scripts/apply /usr/src/kernel-patches/all/XXX/apply/lustre
 
  ln -s /usr/src/kernel-patches/lustre/scripts/apply /usr/src/kernel-patches/all/XXX/apply/lustre
 
  ln -s /usr/src/kernel-patches/lustre/scripts/unpatch /usr/src/kernel-patches/all/XXX/unpatch/lustre
 
  ln -s /usr/src/kernel-patches/lustre/scripts/unpatch /usr/src/kernel-patches/all/XXX/unpatch/lustre
  
You should now have a kernel-image deb.
+
You should now have a '''kernel-image''' deb.
  
 
== Build lustre kernel modules ==
 
== Build lustre kernel modules ==
  
The lustre kernel modules can now be built.
+
The Lustre kernel modules can now be built.
  
 
  module-assistant -u/your/working/directory \
 
  module-assistant -u/your/working/directory \
 
   -k /path/to/the/kernel/linux-2.6-X.X
 
   -k /path/to/the/kernel/linux-2.6-X.X
  
After the build has finished you should now have a lustre-modules.deb
+
After the build has finished you should now have a '''lustre-modules.deb'''
  
 
You might want to try this if it the previous line fails
 
You might want to try this if it the previous line fails
Line 118: Line 124:
 
   m-a a-i lustre
 
   m-a a-i lustre
  
This should auto-install the lustre modules
+
This should auto-install the Lustre modules
  
 
= Install =
 
= Install =
  
To install lustre on a client or server machine, simply install the packages you have created:
+
To install Lustre on a client or server machine, simply install the packages you have created:
  
 
  linux-image-2.6.XX-lustre-X.X.X._XXXXXX.deb
 
  linux-image-2.6.XX-lustre-X.X.X._XXXXXX.deb

Latest revision as of 08:49, 22 February 2010

DISCLAIMER - EXTERNAL CONTRIBUTOR CONTENT

This content was submitted by an external contributor. We provide this information as a resource for the Lustre™ open-source community, but we make no representation as to the accuracy, completeness or reliability of this information.

Lustre on Debian

If you are brave, use Lenny. There are Lustre client packages there. However, you will still need a lustre-patched kernel for a server. These instructions come from a user-contributed mailing list post on how to recompile the lenny packages for etch.

There are also prebuilt packages and kernel images at: http://www.pdsi-scidac.org/respository/debian

Pre-Requisites

Any Debian machine can be used to build the packages. It does not have to be a Lustre client or server. You can skip this and the next section if you are on Lenny.

  • Install build essentials

Install the packages required to build debs. (build-essential, module-assistant etc) Better use http://packages.debian.org/etch-backports/debhelper (dh_lintian is missing in sable).

apt-get install build-essential module-assistant
  • Get Source

Make sure you have deb-src lines for Lenny in /etc/apt/sources.list from your favorite Debian mirror, such as:

deb http://mirror.scl.ameslab.gov/debian/ etch main non-free contrib
deb-src http://mirror.scl.ameslab.gov/debian/ lenny main contrib non-free

or

deb http://mirror.mcs.anl.gov/debian/ etch main non-free contrib
deb-src http://mirror.mcs.anl.gov/debian/ lenny main contrib non-free
  • Download the source with:
aptitude update
apt-get source linux-image-2.6.18-X-686
apt-get source lustre

This will unpack two directories, one with the Lustre source and one with the kernel source.

Build Lustre userspace

Change to the lustre directory.

cd lustre-X.X.X
dpkg-buildpackage -rfakeroot

If the build fails with automake errors you will need to install a later automake version. (debian/etch provides several to choose from.)

This will build the following packages in the parent directory:

lustre-utils        #Userspace lustre util
lustre-dev          #Development headers
lustre-source       #Source for the kernel module
lustre-tests        #Test suite
linux-patch-lustre  #Patch for the linux kernel.

Install the lustre-source and linux-patch-lustre packages on the build machine. These packages contain the patches to the kernel source tree that are used in the next step of the build.

dpkg -i linux-patch-lustre_XXX.deb
dpkg -i  lustre-source_XXX.deb

Build Lustre patched kernel

If building on Lenny you can skip above and run

apt-get install linux-patch-lustre lustre-source linux-tree-2.6.18
cd /usr/src/
tar jxvf linux-source-2.6.18.tar.bz2

Now you can CD to the kernel directory

cd linux-source-2.6.18

We need to grab the .config file for the debian kernel. We should be able to generate the config from the source package, but I'm not sure how. The easiest way to get the correct config is to copy /boot/config-X.X.X from a machine already running the Debian kernel.

cp /boot/config-2.6.XXX-686 .config

Check the kernel config works: (This might generate 1 or 2 minor questions. Just hit m or y.)

make oldconfig

We can now build the kernel.

export CONCURRENCY_LEVEL=3
make-kpkg clean
make-kpkg --rootcmd fakeroot --added-patches=lustre --initrd \
  --append-to-version "-lustre-1.6.5.1" --revision=yyyymmdd kernel_image

(You might be asked about extra scsi statistics options; selecting Y is probably a good idea)

If your Lustre patch is not recognized, you might need to create the following symlinks:

ln -s /usr/src/kernel-patches/lustre/scripts/apply /usr/src/kernel-patches/all/XXX/apply/lustre
ln -s /usr/src/kernel-patches/lustre/scripts/unpatch /usr/src/kernel-patches/all/XXX/unpatch/lustre

You should now have a kernel-image deb.

Build lustre kernel modules

The Lustre kernel modules can now be built.

module-assistant -u/your/working/directory \
  -k /path/to/the/kernel/linux-2.6-X.X

After the build has finished you should now have a lustre-modules.deb

You might want to try this if it the previous line fails

 reboot (and boot with the lustre kernel)
 m-a update
 m-a a-i lustre

This should auto-install the Lustre modules

Install

To install Lustre on a client or server machine, simply install the packages you have created:

linux-image-2.6.XX-lustre-X.X.X._XXXXXX.deb
lustre-modules-2.6.XX-lustre-X.X.X._XXXXXX.deb
lustre-utils_X.X.deb
liblustre-X-X.deb
lustre-dev-X.X.deb