High Performance Linux Clusters with OSCAR, Rocks, OpenMosix, and MPI [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

High Performance Linux Clusters with OSCAR, Rocks, OpenMosix, and MPI [Electronic resources] - نسخه متنی

Joseph D. Sloan

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید








5.4 Installing a Precompiled Kernel


The basic steps for installing a
precompiled kernel are selecting and downloading the appropriate
files and packages, installing those packages, and making a few minor
configuration changes.


5.4.1 Downloading


You'll
find links to
available packages at http://openmosix.sourceforge.net.[3] You'll need to select from among several
versions and compilations. At the time this was written, there were
half a dozen different kernel versions available. For each of these,
there were eight possible downloads, including a README file, a
kernel patch file, a source file that contains both a clean copy of
the kernel and the patches, and five precompiled kernels for
different processors. The precompiled versions are for an Intel 386
processor, an Intel 686 processor, an Athlon processor, Intel 686 SMP
processors, or Athlon SMP processors. The Intel 386 is said to be the
safest version. The Intel 686 version is for Intel Pentium II and
later CPUs. With the exception of the text README file and a
compressed (gz) set of patches, the files are in
RPM format.

[3] And while you are at it, you should also download a copy of
Kris Buytaert's

openMosix HOWTO
from http://www.tldp.org/HOWTO/openMosix-HOWTO/.


The example that follows uses the package
openmosix-kernel-2.4.24-openmosix.i686.rpm for a
single processor Pentium II system running Red Hat 9. Be sure you
read the README file! While you are at it, you should also download a
copy of the latest suitable version of the
openMosix user tools from the same site. Again,
you'll have a number of choices. You can download
binaries in RPM or DEB format as well as the sources. For this
example, the file
openmosix-tools-0.3.5-1.i386.rpm was used.

Perhaps the easiest thing to do is to download everything at once and
burn it to a CD so you'll have everything handy as
you move from machine to machine. But you could use any of the
techniques described in Chapter 8, or you could use the C3 tools described in
Chapter 10. Whatever
your preference, you'll need to get copies of these
files on each machine in your cluster.

There is one last thing to do before you installcreate an
emergency boot disk if you don't have one. While it
is unlikely that you'll run into any problems with
openMosix, you are adding a new kernel.


Don't delete the old kernel. As long as you keep it
and leave it in your boot configuration file, you should still be
able to go back to it. If you do delete it, an emergency boot disk
will be your only hope.

To create a boot disk, you use the mkbootdisk
command as shown here:

[root@fanny root]# uname -r
2.4.20-6
[root@fanny root]# mkbootdisk \
> --device /dev/fd0 2.4.20-6
Insert a disk in /dev/fd0. Any information on the disk will be lost.
Press <Enter> to continue or ^C to abort:

(The last argument to mkbootdisk is the kernel
version. If you can't remember this, use the command
uname -r first to refresh your memory.)


5.4.2 Installing


Since
we are working with RPM packages, installation is a breeze. Just
change to the directory where you have the files and, as root, run

rpm .

[root@fanny root]# rpm -vih openmosix-kernel-2.4.24-openmosix1.i686.rpm
Preparing... ########################################### [100%]
1:openmosix-kernel ########################################### [100%]
[root@fanny root]# rpm -vih openmosix-tools-0.3.5-1.i386.rpm
Preparing... ########################################### [100%]
1:openmosix-tools ########################################### [100%]
Edit /etc/openmosix.map if you don't want to use the autodiscovery daemon.

That's it! The kernel has been installed for you in
the /boot directory.

This example uses the 2.4.24-om1 release.
2.4.24-om2 should be available by the time you
read this. This newer release corrects several bugs and should be
used.

You should also take care to use an openMosix tool set that is in
sync with the kernel you are using, i.e., one that has been compiled
with the same kernel header files. If you are compiling both, this
shouldn't be a problem. Otherwise, you should
consult the release notes for the tools.


5.4.3 Configuration Changes


While
the installation will take care of the stuff that can be automated,
there are a few changes you'll have to do manually
to get openMosix running. These are very straightforward.

As currently installed, the next time you reboot your systems, your
loader will give you the option of starting openMosix but it
won't be your default kernel. To boot to the new
openMosix kernel, you'll just need to select it from
the menu. However, unless you set openMosix as the default kernel,
you'll need to manually select it every time you
reboot a system.

If you want openMosix as the default kernel, you'll
need to reconfigure your boot loader. For example, if you are using
grub, then
you'll need to edit
/etc/grub.conf to select the openMosix kernel.
The installation will have added openMosix to this file, but will not
have set it as the default kernel. You should see two sets of entries
in this file. (You'll see more than two if you
already have other additional kernels). Change the variable
default to select which kernel you want as the
default. The variable is indexed from 0. If openMosix is the first
entry in the file, change the line to setting
default so that it reads
default=0.

If you are using LILO, the procedure is pretty much
the same except that you will need to manually create the entry in
the configuration file and rerun the loader. Edit the file
/etc/lilo.conf. You can use a current entry as a
template. Just copy the entry, edit it to use the new kernel, and
give it a new label. Change default so that it
matches your new label, e.g., default=openMosix.
Save the file and run the command /sbin/lilo -v.

Another issue is whether your firewall will block
openMosix traffic. The openMosix
FAQ
reports that openMosix uses UDP ports in the 5000-5700
range, UDP port 5428, and TCP ports 723 and 4660. (You can easily
confirm this by monitoring network traffic, if in doubt.) You will
also need to allow any other related traffic such as NFS or SSH
traffic. Address this before you proceed with the configuration of
openMosix.

In general, security has not been a driving issue with the
development of openMosix. Consequently, it is probably best to use
openMosix in a restrictive environment. You should either locate your
firewall between your openMosix cluster and all external networks, or
you should completely eliminate the external connection.

openMosix needs to know about the other machines in your cluster. You
can either use the autodiscovery tool
omdiscd to dynamically create a map, or you can
create a static map by editing the file
/etc/openmosix.map (or
/etc/mosix.map or
/etc/hpc.map on earlier versions of openMosix).
omdiscd can be run as a foreground command or as
a daemon in the background. Routing must be correctly configured for
omdiscd to run correctly. For small, static
clusters, it is probably easier to edit
/etc/openmosix.map once and be done with it.

For a simple cluster, this file can be very short. Its simplest form
has one entry for each machine. In this format, each entry consists
of three fieldsa unique device node number (starting at 1) for
each machine, the machine's IP address, and a 1
indicating that it is a single machine. It is also possible to have a
single entry for a range of machines that have contiguous IP
addresses. In that case, the first two fields are the samethe
node number for the first machine and the IP address of the first
machine. The third field is the number of machines in the range. The
address can be an IP number or a device name from your
/etc/hosts file. For example, consider the
following entry:

1       fanny.wofford.int       5

This says that fanny.wofford.int is the first of
five nodes in a cluster. Since fanny's IP address is
10.0.32.144, the cluster consists of the following five machines:
10.0.32.144, 10.0.32.145, 10.0.32.146, 10.0.32.147, and 10.0.32.148.
Their node numbers are 1 through 5. You could use separate entries
for each machine. For example,

1       fanny.wofford.int       1
2 george.wofford.int 1
3 hector.wofford.int 1
4 ida.wofford.int 1
5 james.wofford.int 1

or, equivalently

1       10.0.32.144         1
2 10.0.32.145 1
3 10.0.32.146 1
4 10.0.32.147 1
5 10.0.32.148 1

Again, you can use the first of these two formats only if you have
entries for each machine in /etc/hosts. If you
have multiple blocks of noncontiguous machines, you will need an
entry for each contiguous block. If you use host names, be sure you
have an entry in your host table for your node that has its actual IP
address, not just the local host address. That is, you need lines
that look like

127.0.0.1       localhost
172.16.1.1 amy

not

127.0.0.1       localhost   amy

You can list the map that openMosix is using with the
showmap command. (This is nice to know if you
are using autodiscovery.)

[root@fanny etc]# showmap
My Node-Id: 0x0001
Base Node-Id Address Count
------------ ---------------- -----
0x0001 10.0.32.144 1
0x0002 10.0.32.145 1
0x0003 10.0.32.146 1
0x0004 10.0.32.147 1
0x0005 10.0.32.148 1

Keep in mind that the format depends on the map file format. If you
use the range format for your map file, you will see something like
this instead:

[root@fanny etc]# showmap
My Node-Id: 0x0001
Base Node-Id Address Count
------------ ---------------- -----
0x0001 10.0.32.144 5

While the difference is insignificant, it can be confusing if you
aren't expecting it.

There is also a configuration file
/etc/openmosix/openmosix.config. If you are
using autodiscovery, you can edit this to start the discovery daemon
whenever openMosix is started. This file is heavily commented, so it
should be clear what you might need to change, if anything. It can be
ignored for most small clusters using a map file.

Of course, you will need to duplicate this configuration on each node
on your cluster. You'll also need to reboot each
machine so that the openMosix kernel is loaded. As root, you can turn
openMosix on or off as needed. When you install the user tools
package, a script called
openmosix is copied to
/etc/init.d so that openMosix will be started
automatically. (If you are manually compiling the tools,
you'll need to copy this script over.) The script
takes the arguments start,
stop, status,
restart, and reload, as you
might have guessed. For example,

[root@james root]# /etc/init.d/openmosix status
This is OpenMosix node #5
Network protocol: 2 (AF_INET)
OpenMosix range 1-5 begins at fanny.wofford.int
Total configured: 5

Use this script to control openMosix as needed. You can also use the
setpe command, briefly described later in this
chapter, to control openMosix.

Congratulations, you are up and running.


/ 142