<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Configuring_Secondary_Adapters_Old</title><link>https://sourceforge.net/p/xcat/wiki/Configuring_Secondary_Adapters_Old/</link><description>Recent changes to Configuring_Secondary_Adapters_Old</description><atom:link href="https://sourceforge.net/p/xcat/wiki/Configuring_Secondary_Adapters_Old/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 23 Jun 2014 15:49:30 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/xcat/wiki/Configuring_Secondary_Adapters_Old/feed" rel="self" type="application/rss+xml"/><item><title>Configuring_Secondary_Adapters_Old modified by Guang Cheng Li</title><link>https://sourceforge.net/p/xcat/wiki/Configuring_Secondary_Adapters_Old/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The &lt;strong&gt;configeth&lt;/strong&gt; sample postscript can be used to automatically configure additional ethernet adapters on nodes as they are being deployed. ("Additional adapters" means adapters other than the primary adapter that the node is being installed/booted over.) &lt;/p&gt;
&lt;p&gt;The way the configeth postscript decides what IP address to give the secondary adapter is by forming the hostname of the adapter using a convention of &amp;lt;hostname&amp;gt;-&amp;lt;interfacename&amp;gt; and then using name resolution to determine the IP address of that hostname. For example, if the node being installed/booted is sn2 and configeth is trying to configure the eth1 adapter, it will look up the IP address for sn2-eth1 and use that to configure the eth1 NIC. (You can use configeth even if you use a different naming convention, but you will have to modify the postscript more.) &lt;/p&gt;
&lt;p&gt;To use the configeth postscript to define a secondary adapter on one or more nodes, follow these steps: &lt;/p&gt;
&lt;p&gt;&lt;strong&gt; Define Hostnames for the Secondary Adapters &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you are defining secondary adapters on a whole range of nodes, it can be easier to put a single regular expression in the xCAT &lt;strong&gt;hosts&lt;/strong&gt; table that represents the hostnames and IP addresses of the whole range. (It is not required to put this info in the hosts table. The only thing that is really required is that the information gets into the /etc/hosts table and DNS.) If you want to put a regular expression in the xCAT hosts table, here is an example: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;chdef&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="n"&gt;sn&lt;/span&gt; &lt;span class="n"&gt;ip&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;D&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="mf"&gt;10.1.1&lt;/span&gt;&lt;span class="p"&gt;.(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt; &lt;span class="n"&gt;otherinterfaces&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;D&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="err"&gt;\&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="o"&gt;|-&lt;/span&gt;&lt;span class="n"&gt;eth1&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="mf"&gt;10.2.1&lt;/span&gt;&lt;span class="p"&gt;.(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="err"&gt;'&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you have a group called &lt;strong&gt;sn&lt;/strong&gt; that includes sn1, sn2, sn3, the above chdef command will give sn1 an IP address of 10.1.1.1 and an otherinterfaces setting of "-eth1:10.2.1.1". It will give sn2 an IP address of 10.1.1.2 and an otherinterfaces setting of "-eth1:10.2.1.2", etc. For a more detailed explanation of regular expressions in xCAT tables, see &lt;a href="http://xcat.sf.net/man5/xcatdb.5.html"&gt;http://xcat.sf.net/man5/xcatdb.5.html&lt;/a&gt; . &lt;/p&gt;
&lt;p&gt;Once you have this entry in the xCAT hosts table, you can run: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;makehosts&lt;/span&gt; &lt;span class="n"&gt;sn&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;and it will put these entries in the /etc/hosts table: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="mf"&gt;10.1.1.1&lt;/span&gt;  &lt;span class="n"&gt;sn1&lt;/span&gt; &lt;span class="n"&gt;sn1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;
&lt;span class="mf"&gt;10.2.1.1&lt;/span&gt;  &lt;span class="n"&gt;sn1&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;eth1&lt;/span&gt; &lt;span class="n"&gt;sn1&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;eth1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;
&lt;span class="mf"&gt;10.1.1.2&lt;/span&gt;  &lt;span class="n"&gt;sn2&lt;/span&gt; &lt;span class="n"&gt;sn2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;
&lt;span class="mf"&gt;10.2.1.2&lt;/span&gt;  &lt;span class="n"&gt;sn2&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;eth1&lt;/span&gt; &lt;span class="n"&gt;sn2&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;eth1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;
&lt;span class="mf"&gt;10.1.1.3&lt;/span&gt;  &lt;span class="n"&gt;sn3&lt;/span&gt; &lt;span class="n"&gt;sn3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;
&lt;span class="mf"&gt;10.2.1.3&lt;/span&gt;  &lt;span class="n"&gt;sn3&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;eth1&lt;/span&gt; &lt;span class="n"&gt;sn3&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;eth1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cluster&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you don't want to use regular expressions in the xCAT hosts table, you can put the secondary adapter IP addresses and hostnames directly in the /etc/hosts file by hand. &lt;/p&gt;
&lt;p&gt;Assuming you are using DNS for name resolution throughout the cluster (and not just using /etc/hosts), run the following command to copy the hostname/IP pairs from /etc/hosts to DNS: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;makedns&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Verify that DNS now knows the hostname/IP of the secondary adapters: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;nslookup&lt;/span&gt; &lt;span class="n"&gt;sn1&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;eth1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If you are not using DNS for name resolution in your cluster, you need to ensure that the updated /etc/hosts file will get to the nodes during node deployment. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt; Modify and Use the configeth Postscript &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Make a copy of the sample configeth postscript so you can customize it for your site: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;install&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;postscripts&lt;/span&gt;
&lt;span class="n"&gt;cp&lt;/span&gt; &lt;span class="n"&gt;configeth&lt;/span&gt; &lt;span class="n"&gt;snconfigeth1&lt;/span&gt;
&lt;span class="n"&gt;chmod&lt;/span&gt; &lt;span class="mi"&gt;755&lt;/span&gt; &lt;span class="n"&gt;snconfigeth1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Edit snconfigeth1 and set the variables &lt;strong&gt;$nic_num&lt;/strong&gt; and &lt;strong&gt;$netmask&lt;/strong&gt; appropriately for your site. For example: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="k"&gt;my&lt;/span&gt; &lt;span class="nv"&gt;$nic_num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;my&lt;/span&gt; &lt;span class="nv"&gt;$netmask&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'255.255.0.0'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Put snconfigeth1 in the postscripts table: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;chdef&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="n"&gt;sn&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="n"&gt;postscripts&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;snconfigeth1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If one of your nodes is already installed/booted, you can test your postscript using updatenode: &lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;updatenode&lt;/span&gt; &lt;span class="n"&gt;sn1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;V&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;P&lt;/span&gt; &lt;span class="n"&gt;snconfigeth1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once your postscript is working correctly, you can install or diskless boot your nodes and the secondary adapter will get configured automatically. &lt;/p&gt;
&lt;p&gt;Note: Do not forget that the new adapter interface hostnames must be resolvable on the node. To accomplish this on AIX you can use the NIM resolve.conf resource to automatically create a resolv.conf file on the nodes when they are installed/booted. On linux, DHCP will create the resolv.conf file. &lt;/p&gt;
&lt;p&gt;If you wish to configure IB interfaces please refer to: &lt;a class="alink" href="/p/xcat/newwiki/Managing_the_Mellanox_Infiniband_Network/"&gt;[Managing_the_Mellanox_Infiniband_Network]&lt;/a&gt; or &lt;a class="" href="/p/xcat/newwiki/Managing_the_Infiniband_Network/"&gt;Managing the QLogic Infiniband Network&lt;/a&gt;. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Guang Cheng Li</dc:creator><pubDate>Mon, 23 Jun 2014 15:49:30 -0000</pubDate><guid>https://sourceforge.net16a73c801acc79da6eeaf61d3749ee8dcd758860</guid></item></channel></rss>