diff --git a/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst b/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst index 2b7ef02b2..544f577cd 100644 --- a/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst +++ b/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst @@ -1,11 +1,11 @@ -Changing the hostname/IP address +Changing the Hostname/IP address ================================ Background ---------- -If the hostname or ip address has already been modified on compute nodes, you -can follow the steps to change the configuration in xcat. +If the hostname or IP address has already been modified on compute nodes, +follow the steps to change the configuration in xcat. Remove Old Provision Environment -------------------------------- @@ -32,11 +32,14 @@ Change Definition The output may be like :: 10_0_0_0-255_0_0_0 (network) - fd03:2e76:8631::/64 (network) + 192_168_122_0-255_255_255_0 (network) - Change the networks table definitions, take ``10_0_0_0-255_0_0_0`` as a example :: + Change the networks table definitions, For example ``192_168_122_0-255_255_255_0`` + is a original network configuration which should be modified to + ``192_168_123_0-255_255_255_0``:: - chdef -t network 10_0_0_0-255_0_0_0 gateway=10.0.0.103 + rmdef -t network 192_168_122_0-255_255_255_0 + mkdef -t network 192_168_123_0-255_255_255_0 net=192.168.123.0 mask=255.255.255.0 #. Change the hostname in the xCAT database (This command only supports one node at a time). For many nodes you will have to write a script. :: @@ -44,21 +47,21 @@ Change Definition # changes node1 to node2 in the database chdef -t node -o node1 -n node2 -#. Change the hostname and ip address in the ``/etc/hosts`` file +#. Change the hostname and IP address in the ``/etc/hosts`` file - If you do not use the hosts table in xCAT to create the ``/etc/hosts`` file, - edit the ``/etc/hosts`` file and change your hostnames/ipaddresses entries + edit the ``/etc/hosts`` file and change your hostname and IP address entries directly. - If you use the xCAT hosts table, and your nodes are defined by name in the hosts table, the hosts table must be updated with the new names when - we changed the node name using chdef command. If the hosts tables contains + we changed the node name using ``chdef`` command. If the hosts tables contains regular expression, you have to rewrite the regular expression to - match your new hostnames/ip addresses. + match your new hostname and IP address. - If these is no regular expression in the hosts table, you can run :: - # change the ip address for the new hostname in the hosts table. + # change the IP address for the new hostname in the hosts table. nodech hosts.ip="x.xx.xx.xx" - # add host/ip records in /etc/hosts from the definition in the xCAT hosts + # add hostname/IP records in /etc/hosts from the definition in the xCAT hosts # table for the makehosts diff --git a/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst b/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst index 8d343e866..85bbe9886 100644 --- a/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst +++ b/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst @@ -13,8 +13,7 @@ any other tools. Backup your xCAT data --------------------- -It is good to backup all your xCAT data at first if necessary. Clean up the -database by running the following: :: +Clean up the database by running ``tabprune`` command: :: tabprune -a auditlog tabprune -a eventlog @@ -46,22 +45,22 @@ For example :: service postgresql stop service mysqld stop -Change the Management Host name +Change the Management Hostname ------------------------------- * hostname command :: - hostname + hostname * Edit hostname configuration file - Add hostname in ``/etc/hostname`` - Add HOSTNAME attribute in ``/etc/sysconfig/network`` (only for [RHEL]) + | Add hostname in ``/etc/hostname`` + | Add HOSTNAME attribute in ``/etc/sysconfig/network`` (only for [RHEL]) Update Database Files --------------------- -You need to update the new MN hostname or ip address in several database +You need to update the new MN hostname or IP address in several database configuration files. SQLite @@ -72,18 +71,18 @@ Nothing to do. Postgresql ^^^^^^^^^^ -- Edit ``/etc/xcat/cfgloc`` file, replace ``Pg:dbname=xcatdb;host=|xcatadm|xcat20`` - with ``Pg:dbname=xcatdb;host=|xcatadm|xcat20``. +- Edit ``/etc/xcat/cfgloc`` file, replace ``Pg:dbname=xcatdb;host=|xcatadm|xcat20`` + with ``Pg:dbname=xcatdb;host=|xcatadm|xcat20``. - Edit config database config file ``/var/lib/pgsql/data/pg_hba.conf``, - replace ``host all all /32 md5`` - with ``host all all /32 md5``. + replace ``host all all /32 md5`` + with ``host all all /32 md5``. Mysql ^^^^^ -Edit ``/etc/xcat/cfglooc``, replace ``mysql:dbname=xcatdb;host=|xcatadmin|xcat20`` -with ``mysql:dbname=xcatdb;host=|xcatadmin|xcat20``. +Edit ``/etc/xcat/cfglooc``, replace ``mysql:dbname=xcatdb;host=|xcatadmin|xcat20`` +with ``mysql:dbname=xcatdb;host=|xcatadmin|xcat20``. Start the database ------------------ @@ -112,10 +111,10 @@ Change the site table master attribute :: - chdef -t site master= + chdef -t site master= -Change all ip address attribute relevant to the MN ipaddress -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Change all IP address attribute relevant to the MN IP address +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ For example, old address was "10.6.0.1" @@ -139,7 +138,7 @@ For example, old address was "10.6.0.1" servicenode=10.6.0.1 xcatmaster=10.6.0.1 -* As the attribute with the old ip address is list above, take conserver as +* As the attribute with the old IP address is list above, take conserver as a example, query the nodes with ``conserver=10.6.0.1``. :: @@ -153,7 +152,7 @@ For example, old address was "10.6.0.1" * Change the conserver address for cn1,cn2,cn3,cn4 :: - chdef -t node cn1-cn4 conserver= + chdef -t node cn1-cn4 conserver= Repeat the same process for the other attributes. @@ -192,8 +191,8 @@ command. xcatconfig -c * Update the policy table with new MN name, - replace ``"1.4","oldMNname",,,,,,"trusted",,`` with - ``"1.4","newMNname",,,,,,"trusted",,`` + replace ``"1.4","old_MN_name",,,,,,"trusted",,`` with + ``"1.4","new_MN_name",,,,,,"trusted",,`` * Setup up conserver with new credentials :: @@ -205,11 +204,11 @@ External DNS Server Changed * Update nameserver entries in ``/etc/resolv.conf`` * Update nameserver attribute in ``site`` table :: - chdef -t site -o clustersite nameservers="newipaddress1,newipaddress2" + chdef -t site -o clustersite nameservers="new_ip_address1,new_ip_address2" * Update site forwarders in DB :: - chdef -t site -o clustersite forwarders="newipaddress1,newipaddress2" + chdef -t site -o clustersite forwarders="new_ip_address1,new_ip_address2" * Run command ``makedns -n`` @@ -225,13 +224,13 @@ Change the ``/etc/resolv.conf``, forwarders attribute in site table. :: Change the domain name in the xCAT database site table. :: - chdef -t site -o clustersite domain= + chdef -t site -o clustersite domain= From xCAT 2.8, multiple domains is supported in the cluster. Update the networks table definition. :: lsdef -t network -l - chdef -t network -o ddnsdomain= + chdef -t network -o ddnsdomain= Update the Provision Environment -------------------------------- @@ -245,19 +244,19 @@ If it exists, then use the return name and do the following: - Remove the MN from DNS configuration :: - makedns -d + makedns -d - Remove the MN from the DHCP configuration :: - makedns -d + makedns -d - Remove the MN from the conserver configuration :: - makedns -d + makedns -d - Change the MN name in the xCAT database :: - chdef -t node -o -n + chdef -t node -o -n - Add the new MN to DNS :: diff --git a/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst b/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst index 2a80f7e8b..faffe3cbe 100644 --- a/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst +++ b/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst @@ -1,18 +1,18 @@ -Changing the hostname/IP address +Changing the Hostname/IP address ================================ Change compute node definition relevant to the service node ----------------------------------------------------------- Change the settings in database. Below shows a method to find out where the old -ip address settings (take 10.6.0.1 as a example) are used in Hierarchy +IP address settings (take 10.6.0.1 as a example) are used in Hierarchy environment. * Query the old attribute :: lsdef -t node -l | grep "10.6.0.1" # below is output of the above command. We can find out that nfsserver - # and servicenode are using the old ip address setting. + # and servicenode are using the old IP address setting. nfsserver=10.6.0.1 servicenode=10.6.0.1 @@ -29,7 +29,7 @@ environment. * Change the nfsserver address for cn1,cn2,cn3,cn4 by running the following command: :: - chdef -t node cn1-cn4 nfsserver= + chdef -t node cn1-cn4 nfsserver= Database Connection Changes --------------------------- @@ -57,4 +57,4 @@ Reinstall the nodes to pick up all changes :: nodeset osimage= -Then use your normal command to install the nodes like rinstall,rnetboot,etc. \ No newline at end of file +Then use your normal command to install the nodes like rinstall, rnetboot, etc.