8 Creating and changing per node files

NOTE: This section applies only to the image version of Cluster Test.

In Cluster Test Image v3.2 and later, per-node files for the compute nodes (used for /tmp, /etc/ sysconfig/network-scripts, and a few other things) are implemented differently than in previous versions. Instead of seeing per-node files on the head node under /shadow with suffixes like $$IP=192.168.1.2$$, they will appear as symbolic links to something under /node-specific/thisnode . The Cluster Test set up process does all of this for you automatically, but if you need to create or change per-node files yourself, this chapter describes how to do it.

There are two ways per-node files and directories can be represented, depending on what is needed. A simple per-node file is visible on the head node as a symbolic link somewhere under /shadow to the same location under /node-specific/thisnode. The actual per-node file or directory is located in /node-specific/<ip-addr>/.

A cloned per-node directory is where individual nodes are expected to have unique files present, but share some files. In this case, the original directory under /shadow is copied to the corresponding location under /node-specific/cloneand replaced with a symbolic link to the corresponding directory under /node-specific/thisnode. The real per-node directory located under /node-specific/<ip-addr>/is filled with symbolic links to the corresponding files, now located under /node-specific/clone. Any files in the directory that must be added, changed, or removed for a particular node are handled by removing the symbolic link under /node-specific/<ip-addr>and creating or changing the file as necessary.

An example per-node directory

The per-node directory, /shadow/tmp, is visible on the head node as a symbolic link to /node-specific/thisnode/tmp. Each compute node has its own copy. The /node-specific/thisnode/tmpdirectory doesn’t exist on the head node.

The actual per-node /tmpdirectory appears on the head node in /node-specific/<ip-addr>/tmpand is NFS-mounted appropriately so it appears as /node-specific/thisnode/tmpon the compute nodes. So, on the head node, /tmp for node2 (IP address 10.0.1.2) is located in /node-specific/10.0.1.2/tmp, and /tmp for node10 (IP address 10.0.1.10) is located in /node-specific/10.0.1.10/tmp.

An example cloned per-node directory

The /etc/sysconfig/network-scriptsdirectory is a typical cloned per-node directory. It contains configuration scripts for setting up the network on a node, with files named ifcfg-eth0, ifcfg-eth1, and so forth, corresponding to Ethernet NICs. Different node models have different numbers of NICs, and of course different nodes will have different IP addresses assigned to the NIC of the same name.

There are some additional scripts associated with starting and stopping the network that are the same across all nodes. In Cluster Test, this scripts directory is a cloned per-node directory (after running clsetup.pl). The /shadow/etc/sysconfig/network-scriptsdirectory has been copied to /node-specific/clone/etc/sysconfig/network-scripts. The /shadow/ etc/sysconfig/network-scriptsdirectory is then replaced with a symbolic link to /node-specific/thisnode/etc/sysconfig/network-scripts. Each node has a /node-specific/<ip-addr>/etc/sysconfig/network-scriptsdirectory created, initially populated with symbolic links to the contents of /node-specific/clone/etc/sysconfig/network-scripts. The clsetup.pl command replaces entries such as

/node-specific/<ip-addr>/etc/sysconfig/network-scripts/ifcfg-eth0 with files containing the appropriate IP address for eth0 on that node.

42 Creating and changing per node files