Setting Up Additional Network Adapters w/CSM During Node Installation


Author: Bruce Potter, Document Version 0.1, 10/4/04

Introduction

Most of the time nodes have more network adapters than just the primary adapter that is used to install the node. CSM does not yet store information for these additional adapters, or set them up. This mini howto describes one way to get the adapters set up automatically and explains the utilities within xCSM that help accomplish that.

Warning: this capability will likely be supported in a future release of CSM, but will probably have a different interface.

Defining the Network Information

The first task is to give CSM the network information in a way that it will be available to the post install script described in the next section. We store the node's network information as node "properties". Properties are defined as node attributes that the user has added. Currently they are stored in the UserComment node attribute in a special format. You can use the xCSM commands chnodeprop, lsnodeprop, and rmnodeprop to manipulate the properties.

We make the assumption that the convention used for the hostnames of the additional adapters is to add the interface name on to the end of the primary hostname. For example, if eth0 is the primary (install) adapter for node 3 and the short hostname of eth0 on node 3 is n003, then the hostname for eth1 on node 3 is n003-eth1.

You need to populate the node properties with the IP address of each interface you want set up. You can set IP addresses for individual nodes using the chnodeprop cmd, for example: chnodeprop n003 eth1=1.2.3.4 . Normally, you will do this in a script to set all the adapters in the cluster. Another option is to pull the IP info from the /etc/hosts file on the management server. You can do this using the command hosts2csm. If you have already put IP info in the node properties, you can pull out that info and create a hosts file with that info using the command csm2hosts. Both of these commands use the hostname convention described above.

The adapter configuration script described in the next section will by default use a netmask of 255.255.0.0 for all of the adapters. If you want to use a different netmask for some nodes, you can add the property called netmask to those nodes, for example: hnodeprop n003 netmask=255.255.255.0 . If you need to use a different netmask for different adapaters, you will have to customize the adapter configuration script below.

All of these commands can be run with the -h option to get usage information.

Automating Adapter Configuration

A script called ###_configOtherNICs is provided with xCSM (in /opt/xcsm/install/postrebootscripts) that can be used to automatically configure the node's adapters immediately after it has been installed. Examine the code of the script to make sure it does what you want it to and the place it in /csminstall/csm/scripts/installpostreboot. (It would actually be better for this script to go in installprereboot, but I haven't yet figured out why it won't run successfully there.)

This script depends on the information defined in the node properties in the previous section. It also depends on a patch to ServerUtils.pm to make the UserComment attribute available to the node during installation. This patch is available in xCSM in /opt/xcsm/csm-patches/opt/csm/pm .

If you put ###_configOtherNICs in /csminstall/csm/scripts/installpostreboot, then it will run after the node is installed and create the appropriate files in /etc/sysconfig/network-scripts (or /etc/sysconfig/network for SuSE). The script does not automatically restart the network. If other post install scripts don't restart the network, you can uncomment the line in this script to restart the network.