Discussion:
[CI] cluster initialization.
Aneesh Kumar K.V
2002-06-09 04:56:03 UTC
Permalink
Hi,

Instead of going and modifying /etc/rc.d/rc.sysinit for all the mount. I
guess it is better to execute a script there.

ie /etc/init.d/clusterinit.

and /etc/init.d/clusterinit as of now on the Redhat Machine i have here
looks like.

#! /bin/bash

NETWORK_SCRIPTS_DIR=/etc/sysconfig/network-scripts
VAR_RUN_DIR=/var/run
VAR_LOCK_DIR=/var/lock

/usr/sbin/clusternode_num 2>/dev/null
if [ $? -ne 0 ]; then
# Not inside a NSC cluster.
# Cluster cannot have a node number 0
echo "Configuring in a Non SSI Cluster"
mount --bind $NETWORK_SCRIPTS_DIR-0 $NETWORK_SCRIPTS_DIR
mount --bind $VAR_RUN_DIR-0 $VAR_RUN_DIR
mount --bind $VAR_LOCK_DIR-0 $VAR_LOCK_DIR
else
#Inside a NSC cluster.
echo "Configuring in a SSI Cluster"
mount --bind $NETWORK_SCRIPTS_DIR-`/usr/sbin/clusternode_num` $NETWORK_SCRIPTS_DIR
mount --bind $VAR_RUN_DIR-`/usr/sbin/clusternode_num` $VAR_RUN_DIR
mount --bind $VAR_LOCK_DIR-`/usr/sbin/clusternode_num` $VAR_LOCK_DIR
fi


this file will grow over a period of time.

Changes needed in cluster installation on node 1
cd /etc/sysconfig
mkdir network-scripts-1
cd network-scripts-1
cp ../network-script/* .

mv network-scripts network-scripts-0
mkdir network-scripts

Why network-scritps-0 ?
Well Most of the people will be trying SSI with a general machine that
is already running linux, and they want to boot a normal kernel and a
SSI kernel out of the same machine. We don't want to create problems
just because he did a SSI kernel installation.( I will tell more about
that later ).In the methods described in the web page once you modify
the networking scripts there is no way you can boot a normal kernel
because we already screwed the configuration file. So for NON SSI we
here uses dirname-0 and then mount it as dirname . That seems to be a
safe game for me. This need to be done only in master node.
Over a period of time we will identify more and more directories that
are node specific :)( already we have three )

How to distribute SSI ?
rpm and bebian packages. I guess if we ask guys to download the kernel
patch it run cluster-tools compile and install it, it is going to be a
tough job and most of them stop after downloading the kernel itself. A
solution is to provide an rpm or debian package that will install the
kernel with the respective modules and then ask the user to run the
configure_cluster script. This script will configure the cluster for
him. I guess it is fine to say that CFS is the default configuration and
each node should have a boot disk( including normal nodes ) . So that we
can remove dhcp and network booting. It scares people. :) May be we can
have dhcp and network booting configuration in a production
environment.


Any volunteers for preparing RPM and debian packages ?

-aneesh

Loading...