No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

FusionInsight HD 6.5.0 Administrator Guide 02

Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
What Do I Do If Linux Is Running Slowly When Changing an IP Address?

What Do I Do If Linux Is Running Slowly When Changing an IP Address?

Question

Before changing an IP address, you may need to change the IP address configuration of the node in the Linux operating system. If doing so, operations on all nodes in the cluster may become very slow after the network service restarts.

NOTE:

After logging in to the system, run the su - omm, ntpq - pn or id admin command. It proves that the system runs slowly if the command output is returned after more than three seconds.

Answer

If you do not modify the IP addresses of the cluster after Linux IP addresses are modified, LdapClient will retain the old service IP address of LdapServer. After restarting network services and before modifying the IP address configuration file, you need to manually modify configurations of all nodes. The configuration file automatically takes effect upon the modification of all nodes.

Procedure

  1. Obtain a matched tool package and use WinScp to upload it to any node of the cluster (for example, the /opt directory) as user root. Then, run the following command to decompress the package:

    tar -zxvf FusionInsight_SetupTool_.tar.gz

  2. Use PuTTY to log in to the node where the tool package resides as user root, and switch to the tool path (for example, the cd /opt/FusionInsight_SetupTool/preinstall/tools/cluster/ directory) in the package.
  3. Check the OS type of nodes in the cluster.

    • If the SUSE operating system is used, go to Step 4.
    • If the Red Hat, CentOS, or EulerOS operating system is used, go to Step 5.

  4. Run the following commands:

    main()
    {    
    local argv="${1}"
    if [ "${argv}" == "modify" ];then
        cp /etc/nsswitch.conf /etc/nsswitch.conf_bak
        sed -i "s/ldap//g"  "/etc/nsswitch.conf"
    elif [ "${argv}" == "restore" ];then
        mv /etc/nsswitch.conf_bak /etc/nsswitch.conf
    fi
    }
    source /home/omm/.profile
    main "$@"

  5. Run the following commands:

    main()
    {    
    if [ "${argv}" == "modify" ];then
        cp /etc/nsswitch.conf /etc/nsswitch.conf_bak
        sed -i "s/sss//g"  "/etc/nsswitch.conf"
    elif [ "${argv}" == "restore" ];then
        mv /etc/nsswitch.conf_bak /etc/nsswitch.conf
    fi
    }
    source /home/omm/.profile
    main "$@"

  6. Save the commands executed in Step 4 or Step 5 to the script named modifynss.sh. Put the script in the preinstall/tools/cluster/ directory of the tool package's root directory.
  7. Run the following commands:

    main()
    {
    local ip1="${1}"
    local ip2="${2}"
    if [ -z "$ip1" -a -z "${ip2}" ];then
    echo "IP paramters should not be null."
    exit 1
    fi
    
    local basepath=$(ls "${BIGDATA_HOME}/" | grep "FusionInsight_BASE_")
    local path=$(ls "${BIGDATA_HOME}/${basepath}/" | grep "SlapdClient")
    local file="${BIGDATA_HOME}/${basepath}/"${path}/etc/ENV_VARS
    local server_list_lines=$(grep -w "LDAP_SERVER_LIST" "${file}" | grep -v "#")
    local server_list_lines_replace="LDAP_SERVER_LIST=${ip1},${ip2}"
    local upg_list_lines=$(grep -w "LDAP_SERVER_LIST_UPGRADE" "${file}" | grep -v "#")
    local upg_list_lines_replace="LDAP_SERVER_LIST_UPGRADE=${ip1},${ip2}"
    if [ -n "${server_list_lines}" ];then
    sed -i "s#${server_list_lines}#${server_list_lines_replace}#g" "${file}"
    fi
    if [ -n "${upg_list_lines}" ];then
    sed -i "s#${upg_list_lines}#${upg_list_lines_replace}#g" "${file}"
    fi
    }
    source /home/omm/.profile
    main "$@"

  8. Save the commands executed in Step 7 to the script named modify.sh. Put the script in the preinstall/tools/cluster/ directory of the tool package's root directory.
  9. Run the following command in the preinstall/tools/cluster/ directory as user root:

    vi cluster.ini

    Change the value of g_hosts and add all node IP addresses (obtaining them from the installation template) in the cluster to the value. Then, save the settings and exit the editing mode.

  10. Run the following commands in the preinstall/tools/cluster/ directory of the tool package as user root to distribute the execution script to each node:

    ./clusterscp.sh put /opt/FusionInsight_SetupTool/preinstall/tools/cluster/modifynss.sh /tmp/

    ./clusterscp.sh put /opt/FusionInsight_SetupTool/preinstall/tools/cluster/modify.sh /tmp/

  11. Run the following commands in the preinstall/tools/cluster/ directory as user root:

    ./clustercmd.sh "sh /tmp/modifynss.sh modify"

    ./clustercmd.sh "sh /tmp/modify.sh LDAPIP1 LDAPIP2"

    LDAPIP1 and LDAPIP2 are the service IP addresses of the new LdapServer service. For example, ./clustercmd.sh "sh /tmp/modify.sh 10.0.0.9 10.0.0.12".

  12. Wait for five minutes and run the following commands in the preinstall/tools/cluster/ directory as user root to check whether the queried IP addresses are LDAPIP1 and LDAPIP2:

    ./clustercmd.sh "cat /etc/ldap.conf | grep URI" (This command only needs to be executed in a SUSE system.)

    ./clustercmd.sh "cat /etc/openldap/ldap.conf | grep URI"

  13. Run the following commands in the preinstall/tools/cluster/ directory as user root:

    ./clustercmd.sh "sh /tmp/modifynss.sh restore"

Download
Updated: 2019-05-17

Document ID: EDOC1100074522

Views: 6056

Downloads: 12

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next