|
|||||||||||||||||||
|
|
5. Building a Root ImageBuilding 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 ImageDownload 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.
Loopback mount the image.
5.2. GFS Root ImageMake 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.
Enter the following pool information into a file named pool0cidev.cf.
Enter the following pool information into a file named pool0.cf.
Write the pool information to the loopback devices.
Create the pool devices.
Enter the following lock table into a file named gfscf.cf.
Write the lock table to the cidev pool device.
Format the root disk image.
Mount the root image.
Copy the ext2 root to the GFS image.
Clean up.
5.3. Getting Cluster Tools SourceCluster 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 ReleaseThe 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.
5.3.2. CVS CheckoutFollow 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
5.5. Installing Kernel ModulesIf 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.6. Configuring the RootRemake the ubd devices. At some point, the UML team switched the device numbering scheme from 98,1 for dev/ubd/1, 98,2 for dev/ubd/2, etc. Now they use 98,16 for dev/ubd/1, 98,32 for dev/ubd/2, etc. Comment and uncomment the appropriate lines in /mnt/etc/inittab.ssi. Search for the phrase 'For UML' to see which lines to change. Basically, you should disable the DHCP daemon, and change the getty to use tty0 rather than tty1. You may want to strip down the operating system so that it boots quicker. For the prepackaged root image, I removed the following files.
You might also want to copy dbdemo and its associated alphabet file into /root/dbdemo. This lets you run the demo described in Section 3.1. 5.7. Unmounting the Root Image
5.8. Distributions Other Than Red HatCluster Tools has make rules for Caldera and Debian, in addition to Red Hat. Respectively, the rules are install_ssi_caldera and install_ssi_debian. The main difference between the distributions is the /etc/inittab.ssi installed. It is the inittab used by the clusterized init.ssi program. It is based on the distribution's /etc/inittab, but has some cluster-specific enhancements that are recognized by init.ssi. There is also some logic in the /etc/rc.d/rc.nodeup script to detect which distribution it's on. This script is run whenever a node joins the cluster, and it needs to do different things for different distributions. Finally, there are some modifications to the networking scripts to prevent them from tromping on the cluster interconnect configuration. They're a short-term hack, and they've only been implemented for Red Hat so far. The modified files are /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/network-functions. | ||||||||||||||||||
|
|||||||||||||||||||