Home :: International :: Manuals :: Howto :: FAQ :: Man Pages :: Email Login

 
 

 

5. Building a Root Image

Building your own root image is necessary if you want to use a distribution other than Red Hat 7.2. Otherwise, feel free to skip this section.

These instructions describe how to build a Red Hat 7.2 image. At the end of this section is a brief discussion of how other distributions might differ. Building a root image for another distribution is left as an exercise for the reader.

5.1. Base Root Image

Download the Red Hat 7.2 root image from the User-Mode Linux (UML) project. As with the root image you downloaded in Section 2.1, it is over 150MB.

Extract the image.

host$ bunzip2 -c root_fs.rh72.pristine.bz2 >root_fs.ext2
   

Loopback mount the image.

host$ su
host# mkdir /mnt.ext2
host# mount root_fs.ext2 /mnt.ext2 -o loop,ro
   

5.2. GFS Root Image

Make a blank GFS root image. You also need to create an accompanying lock table image. Be sure you've added support for GFS to your host system by following the instructions in Section 4.5.

host# dd of=root_cidev bs=1024 seek=4096 count=0
host# dd of=root_fs bs=1024 seek=2097152 count=0
host# chmod a+w root_cidev root_fs
host# losetup /dev/loop1 root_cidev
host# losetup /dev/loop2 root_fs
   

Enter the following pool information into a file named pool0cidev.cf.

poolname pool0cidev
subpools 1
subpool 0 0 1 gfs_data
pooldevice 0 0 /dev/loop1 0
   

Enter the following pool information into a file named pool0.cf.

poolname pool0
subpools 1
subpool 0 0 1 gfs_data
pooldevice 0 0 /dev/loop2 0
   

Write the pool information to the loopback devices.

host# ptool pool0cidev.cf
host# ptool pool0.cf
   

Create the pool devices.

host# passemble
   

Enter the following lock table into a file named gfscf.cf.

datadev:	/dev/pool/pool0
cidev:		/dev/pool/pool0cidev
lockdev:	192.168.50.101:15697
cbport:		3001
timeout:	30
STOMITH: NUN
name:none
node: 192.168.50.1	1	SM: none
node: 192.168.50.2	2	SM: none
node: 192.168.50.3	3	SM: none
node: 192.168.50.4	4	SM: none
node: 192.168.50.5	5	SM: none
node: 192.168.50.6	6	SM: none
node: 192.168.50.7	7	SM: none
node: 192.168.50.8	8	SM: none
node: 192.168.50.9	9	SM: none
node: 192.168.50.10	10	SM: none
node: 192.168.50.11	11	SM: none
node: 192.168.50.12	12	SM: none
node: 192.168.50.13	13	SM: none
node: 192.168.50.14	14	SM: none
node: 192.168.50.15	15	SM: none
   

Write the lock table to the cidev pool device.

host# gfsconf -c gfscf.cf
   

Format the root disk image.

host# mkfs_gfs -p memexp -t /dev/pool/pool0cidev -j 15 -J 32 -i /dev/pool/pool0
   

Mount the root image.

host# mount -t gfs -o hostdata=192.168.50.1 /dev/pool/pool0 /mnt
   

Copy the ext2 root to the GFS image.

host# cp -a /mnt.ext2/. /mnt
   

Clean up.

host# umount /mnt.ext2
host# rmdir /mnt.ext2
host# Ctrl-D
host$ rm root_fs.ext2
   

5.3. Getting Cluster Tools Source

Cluster Tools source code is available as official release tarballs and through CVS. The CVS repository contains the latest, bleeding-edge code. It can be less stable than the official release, but it has features and bugfixes that the release does not have.

5.3.1. Official Release

The latest release can be found at the top of the Cluster-Tools section of this release list. At the time of this writing, the latest release is 0.6.5.

Download the latest release. Extract it.

host$ tar jxvf ~/cluster-tools-0.6.5.tar.bz2
    

5.3.2. CVS Checkout

Follow these instructions to do a CVS checkout of the latest Cluster Tools code. The modulename is cluster-tools.

To do a developer checkout, you must be a CI developer. If you are interested in becoming a developer, read Section 8.3 and Section 8.4.

5.4. Building and Installing Cluster Tools

host$ su
host# cd cluster-tools
host# make install_ssi_redhat UML_ROOT=/mnt
   

5.5. Installing Kernel Modules

If you built a kernel, as described in Section 4, then follow the instructions in Section 4.4 and Section 4.7 to install kernel and GFS modules onto your new root.

Otherwise, mount the old root image and copy the modules directory from /mnt/lib/modules. Then remount the new root image and copy the modules into it.

5.7. Unmounting the Root Image

host# umount /mnt
host# passemble -r all
host# losetup -d /dev/loop1
host# losetup -d /dev/loop2
   
 
 
 
 
Google
  Web Linuxinfor   
 

Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account

Document on this page is part of "Creating SSI Clusters Using UML HOWTO". See Index Page for more info about Authorship and Copyright.

1999-2008 Linuxinfor.com. No rights reserved.