Creating an XML Configuration File

Before installing the openGauss, you need to create the cluster_config.xml file. The cluster_config.xml file contains the information about the server where the openGauss is deployed, installation path, IP address, and port number. This file is used to guide how to deploy the openGauss. You need to configure the XML configuration file according to the actual deployment requirements.

The following describes how to create an XML configuration file based on the deployment solution of one primary node and one standby node.

Configuring the Database Name and Directories

Obtain the XML file template from script/gspylib/etc/conf/cluster_config_template.xml. The following configuration is only an example. You can replace it as required. Each line is described with a comment.

<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
  <!-- Overall information -->
  <CLUSTER>
  <!-- Database name -->
    <PARAM name="clusterName" value="Cluster_template" />  
  <!-- Database node name (hostname) -->
    <PARAM name="nodeNames" value="node1_hostname,node2_hostname" />
  <!-- Database installation directory -->
    <PARAM name="gaussdbAppPath" value="/opt/huawei/install/app" />
  <!-- Log directory -->
    <PARAM name="gaussdbLogPath" value="/var/log/omm" />
  <!-- Temporary file directory -->
    <PARAM name="tmpMppdbPath" value="/opt/huawei/tmp" />
  <!-- Database tool directory -->
    <PARAM name="gaussdbToolPath" value="/opt/huawei/install/om" />
  <!--Directory of the core file of the database -->
    <PARAM name="corePath" value="/opt/huawei/corefile"/>
  <!-- Node IP addresses corresponding to the node names, respectively -->
    <PARAM name="backIp1s" value="192.168.0.1,192.168.0.2"/>
    <!-- Whether to enable automatic primary database node selection -->
    <PARAM name="enable_dcf" value="on"/>
    <!-- Node IP address, port number, and role information after the function is enabled -->
    <PARAM name="dcf_config" value="[{&quot;stream_id&quot;:1,&quot;node_id&quot;:1,&quot;ip&quot;:&quot;8.92.1.85&quot;,&quot;port&quot;:16683,&quot;role&quot;:&quot;LEADER&quot;},{&quot;stream_id&quot;:1,&quot;node_id&quot;:2,&quot;ip&quot;:&quot;8.92.1.86&quot;,&quot;port&quot;:16683,&quot;role&quot;:&quot;FOLLOWER&quot;},{&quot;stream_id&quot;:1,&quot;node_id&quot;:3,&quot;ip&quot;:&quot;8.92.1.87&quot;,&quot;port&quot;:16683,&quot;role&quot;:&quot;FOLLOWER&quot;}]"/>
    <!-- Enabling or disabling shared storage mode -->
    <PARAM name="enable_dss" value="on"/>
    <!-- DSS instance directory -->
    <PARAM name="dss_home" value="/opt/huawei/install/data/dss"/>
    <!-- DSS shared volume name -->
    <PARAM name="ss_dss_vg_name" value="data"/>
    <!-- Name and other information about the volume groups mounted to DSS, including shared volumes -->
    <PARAM name="dss_vg_info" value="data:/dev/sdb,p0:/dev/sdc,p1:/dev/sdd"/>
    <!-- CM vote volume -->
    <PARAM name="votingDiskPath" value="/dev/sde"/>
    <!-- CM shared volume -->
    <PARAM name="shareDiskDir" value="/dev/sdf"/>
    <!-- Enabling SSL authentication for DSS -->
    <PARAM name="dss_ssl_enable" value="on"/>
    <!-- MES communication protocol type -->
    <PARAM name="ss_interconnect_type" value="TCP"/>
    <!-- CPU sequence bound to the RDMA -->
    <PARAM name="ss_rdma_work_config" value="1 7"/>
  
  </CLUSTER>

NOTICE:

  • The /opt/huawei/install/om directory is used to store tools such as the mutual trust tool. To avoid permission problems, do not store instance data in the directory.
  • The installation and data directories must be empty or do not exist. Otherwise, the installation may fail.
  • When configuring database instances, ensure that the configured directories are not coupled with each other. This means that the configured directories must not be associated with each other. If any directory is deleted, the other directories will not be deleted accordingly. For example, gaussdbAppPath is /opt/huawei/install/app and gaussdbLogPath is /opt/huawei/install/app/omm. When the gaussdbAppPath directory is deleted, the gaussdbLogPath directory will also be deleted, causing unexpected problems.
  • If the installation script is required to automatically create installation users, ensure that the configured directories are not coupled with the default user directories created by the system.
  • The openGauss and instance paths cannot contain the following special characters: “|”, “;”, “&”, “$”, “<”, “>”, “`”, “\\”, “'”, “\”", “{”, “}”, “(”, “)”, “[”, “]”, “~”, “*”, and “?”.
  • When configuring the database node name, run the hostname command to obtain the host name of the database node and replace node1_hostname and node2_hostname in the example with the obtained host name.
  • During dcf_config configuration, the roles include leader, follower, passive, and logger. The roles that can vote include leader, follower, and logger. During role networking configuration, at least three roles can vote. Therefore, at least three nodes are required in DCF mode.
  • Exercise caution when configuring all parameters that contain disk information in the shared storage. During the installation, the tool performs low formatting on the disks configured in all parameters. The disks in all parameters must be unique.
  • The IP address in the shared storage must be the same as the data IP address of the DN. The DSS port number is the database port number plus 10, and the DMS port number is the database port number plus 20.

Table 1 Parameter description

occupied by

Instance Type

Parameter

Description

Overall information

clusterName

openGauss name.

nodeNames

Host name in openGauss.

backIp1s

Intranet IP address of the host in the backend storage network. All the openGauss hosts communicate with each other on this network.

gaussdbAppPath

Installation directory of the openGauss program. This directory must meet the following requirements:

  • The disk space is greater than 1 GB.
  • This directory is independent of other directories required by the database.

gaussdbLogPath

Directory that stores run logs and operation logs of the openGauss. This directory must meet the following requirements:

  • You are advised to plan the disk space based on the number of database nodes on the host. Reserve 1 GB space for database nodes and reserve redundant space.
  • This directory is independent of other directories required by openGauss.

This path is optional. If the directory is not specified, $GAUSSLOG/Installation user account will be specified as the log directory by default during the openGauss installation.

tmpMppdbPath

Directory for storing temporary database files.

If tmpMppdbPath is not set, the files are stored in /opt/huawei/wisequery/Installation user name_mppdb by default. In the path, opt/huawei/wisequery is the default directory for storing database system tools.

gaussdbToolPath

Directory for storing openGauss system tools. This directory is used to store tools for mutual trust. This directory must meet the following requirements:

  • The disk space is greater than 100 MB.
  • This directory cannot be changed and is independent of other directories required by the database.

This directory is optional. If this parameter is not specified, /opt/huawei/wisequery is specified as the database system tool directory by default during the installation.

corePath

Directory for storing the openGauss core file.

enable_dcf

Determines whether to enable the DCF mode.

dcf_config

DCF startup node information, which is configured when the DCF mode is enabled.

enable_dss

Determines whether to enable the shared storage mode. The value can be on or off. The default value is off. Shared storage does not support the DCF mode.

dss_home

DSS instance directory. If enable_dss is set to on, this parameter is mandatory.

ss_dss_vg_name

DSS shared volume name. If enable_dss is set to on, this parameter is mandatory.

dss_vg_info

Information about the volume groups mounted to DSS, including a shared volume group and log volume groups. The number of log volume groups must be the same as the number of DNs. Each node in the centralized system has a maximum of one DN. An example of the volume group format is data:/dev/sdb. Volume groups are separated by commas (,). When enable_dss is set to on, this parameter is mandatory. The disk size of the log volume group must be greater than the value of the DN parameter max_size_for_xlog_prune.

votingDiskPath

CM vote volume. When enable_dss is set to on, this parameter is mandatory.

shareDiskDir

CM shared volume. When enable_dss is set to on, this parameter is mandatory.

dss_ssl_enable

Determines whether to enable SSL authentication for DSS. The value can be on or off. The default value is on.

ss_interconnect_type

MES communication protocol type. The value can be TCP or RDMA. The default value is TCP.

ss_rdma_work_config

Specifies the start and end CPUs used in the RDMA user-mode poll. When ss_interconnect_type is set to RDMA, this parameter is valid. An example of the format is "10 15" (separated by a space).

Configuring the Basic Host Information

NOTE:

Each server must contain the following information. The following uses node1 as an example.

The content is an example and can be replaced as required. Each line of information is commented out.

Configure the following information on the host:

<!-- Information about the node deployment on each server -->
<DEVICELIST>
<!-- Deployment information on node 1 -->
<DEVICE sn="node1_hostname">
<!-- Host name of node 1 -->
<PARAM name="name" value="node1_hostname" />
<!-- AZ where node1 is located and priority of the AZ -->
<PARAM name="azName" value="AZ1"/>
<PARAM name="azPriority" value="1"/>
<!-- IP address of node 1. If only one NIC is available for the server, set backIP1 and sshIP1 to the same IP address. -->
<PARAM name="backIp1" value="192.168.0.1"/>
<PARAM name="sshIp1" value="192.168.0.1"/>
<!-- Specifies whether node 1 is a cascaded standby node. Thevalue on indicates that the instance is a cascaded standby node. In addition, the cascaded standby node must be configured with a standby node in the same AZ.-->
<PARAM name="cascadeRole" value="on"/>

Table 1 Parameter description

Instance Type

Parameter

Description

Overall Information

name

Host name.

azName

Available zone (AZ) name. The value is a character string that cannot contain special characters, for example, AZ1, AZ2, and AZ3.

azPriority

AZ priority.

backIp1

Intranet IP address of the host in the backend storage network. All the openGauss hosts communicate with each other on this network.

sshIp1

External IP address of the SSH reliable channel. If the external is not used, you can leave it empty or set the same IP address as backIp1.

NOTE: Only one IP address can be configured for all IP parameters (including backIp, sshIp, and listenIp) in the configuration file. Excessive IP addresses are ignored. For example, you can configure backIp1 and backIp2 in the XML configuration file as follows: When the file is parsed, only backIp1 takes effect.

<PARAM name="backIp1" value="192.168.0.1"/>
<PARAM name="backIp2" value="192.168.0.2"/>

Configuring Primary Database Node Information

The content is an example and can be replaced as required. Each line of information is commented out.

Configure the following information for the primary database node:

<!--DBnode-->
<PARAM name="dataNum" value="1"/>
<!-- Database port number -->
<PARAM name="dataPortBase" value=""/>
<!-- Listening IP address of the database node -->
<PARAM name="dataListenIp1" value="172.31.13.124,172.31.6.198"/>
<!-- Data directories on the primary database node and on the standby database node -->
<PARAM name="dataNode1" value="/opt/huawei/install/data/dn,node2_hostname,/opt/huawei/install/data/dn"/>
<!-- Xlog directories on the primary database node and on the standby database node -->
<PARAM name="dataNodeXlogPath1" value="/home/omm/gauss_xlog,/home/omm/gauss_xlog "/>
<!-- Number of nodes for which the synchronization mode is set on the database node -->
<PARAM name="dataNode1_syncNum" value="0"/>
<!-- Set the mode, quantity, and sequence of nodes in synchronization mode on the database node. Replace "hostname" with the actual host name. -->
<PARAM name="syncNode_hostname" value="ANY 1(node1_hostname,node2_hostname)"/>

Table 1 Parameter description

Instance Type

Parameter

Description

DBnode

dataNum

Number of database nodes to be deployed on the current host.

dataPortBase

Basic port number of the database node. The default value is 40000.

dataListenIp1

Listening IP address. If this parameter is not set, the value is determined based on backIp1 of the corresponding host.

The first and second IP addresses are the IP addresses of the hosts where the primary and standby nodes reside, respectively.

dataNode1

Directory for storing data of the database nodes on the current host. It is a data storage directory, The directory should be planned on the data disk.

dataNodeXlogPath1

Path for storing Xlogs in the current database. This parameter is optional. This directory is used to store database Xlogs and can only be an absolute path. If this parameter is not specified, the log file is stored in the pg\_xlog directory of the data directory by default.

dataNode1_syncNum

You can set either this parameter or syncNode_hostname. This parameter can be set only on the primary node. This parameter specifies the number of nodes in synchronization mode in the current database. The value ranges from 0 to the number of standby database nodes.

syncNode_hostname

You can set either this parameter or dataNode1_syncNum This parameter needs to be set on all nodes. This parameter specifies the mode, quantity, and sequence of standby nodes in synchronization mode on the current database. Replace hostname in syncNode_hostname with the actual host name. Ensure that the names of the synchronization standby hosts specified in the parameter exist. The number of synchronization standby hosts cannot exceed the number of standby hosts. FIRST and ANY cannot coexist. ANY supports combined configuration, but FIRST does not support combined configuration. For details, see the "Configuration file of one primary node and four standby nodes (User-defined FIRST and ANY can be used to synchronize data to the standby node.)".

Configuring the CM Server (Primary/Non-Primary) Information

Configure the following information for the non-primary CMS nodes:

<!-- cm --> 
<PARAM name="cmServerPortStandby" value="25500"/> 
<PARAM name="cmDir" value="/opt/huawei/data/cm"/>

Table 1 Parameter description

IP address used by the

Instance Type

Parameter

Description

CM

cmServerPortBase

Port number of the primary CM server. The default value is 5000.

cmServerPortStandby

Port number of the standby CM server. The default value is 5500.

cmServerListenIp1

IP address used by the CM server to listen to the CM agent connection requests or the database administrator's cluster management requests.

cmServerHaIp1

IP addresses for communication between the primary and standby CM servers.

In

In the parameter value, the first and second IP addresses are the IP addresses of the hosts where the primary and standby CM servers reside, respectively. If this parameter is not set, the value is determined based on backIp1 of the hosts where the primary and standby CM servers reside.

cmDir

CM data file directory. The path is used to save the data files and parameter files used by the CM Server and CM Agent.

This parameter must be set on every host in the cluster.

Table 2 Directory description

Directory

Description

/opt/huawei/data

Directory that stores instance data of the cluster. This directory is used to store data of the database. The directory should be planned on the data disk.

This directory must meet the following requirements:

  • The disk space is planned according the actual service data volume.
  • Directories for storing data of each instance are independent from each other. Table 3 lists planning for the data directory of each instance in this document.

Table 3 Database instance data directories

Instance Name

Instance Data Directory

CM

/opt/huawei/data/cm

Primary DN

/opt/huawei/data/masterX

In the directory, X is a consecutive positive integer starting from 1, identifying the Xth DN on the current host.

Standby DN

/opt/huawei/data/slaveX

In the directory, X is a consecutive positive integer starting from 1, identifying the Xth standby DN on the current host.

Examples

Configuration file for a single node

<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
    <!-- Overall information about openGauss -->
    <CLUSTER>
        <!-- Database name -->
        <PARAM name="clusterName" value="dbCluster" />
        <!-- Database node name (hostname) -->
        <PARAM name="nodeNames" value="node1_hostname" />
        <!-- Database installation directory -->
        <PARAM name="gaussdbAppPath" value="/opt/huawei/install/app" />
        <!-- Log directory -->
        <PARAM name="gaussdbLogPath" value="/var/log/omm" />
        <!-- Temporary file directory -->
        <PARAM name="tmpMppdbPath" value="/opt/huawei/tmp" />
        <!-- Database tool directory -->
        <PARAM name="gaussdbToolPath" value="/opt/huawei/install/om" />
        <!--Directory of the core file of the database -->
        <PARAM name="corePath" value="/opt/huawei/corefile" />
        <!-- Node IP address, which corresponds to the database node name list -->
        <PARAM name="backIp1s" value="192.168.0.1"/> 
    </CLUSTER>
    <!-- Information about the node deployment on each server -->
    <DEVICELIST>
        <!-- Deployment information on node 1 -->
        <DEVICE sn="node1_hostname">
            <!-- Host name of node 1 -->
            <PARAM name="name" value="node1_hostname"/>
            <!-- AZ where node1 is located and priority of the AZ -->
            <PARAM name="azName" value="AZ1"/>
            <PARAM name="azPriority" value="1"/>
            <!-- IP address of node 1. If only one NIC is available for the server, set backIP1 and sshIP1 to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.1"/>
            <PARAM name="sshIp1" value="192.168.0.1"/>
               
	    <!--dbnode-->
	    <PARAM name="dataNum" value="1"/>
	    <PARAM name="dataPortBase" value="15400"/>
	    <PARAM name="dataNode1" value="/opt/huawei/install/data/dn"/>
            <PARAM name="dataNode1_syncNum" value="0"/>
        </DEVICE>
    </DEVICELIST>
</ROOT>

Configuration file for primary/standby nodes

<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
    <!-- Overall information about openGauss -->
    <CLUSTER>
        <!-- Database name -->
        <PARAM name="clusterName" value="Cluster_template" />
        <!-- Database node name (hostname) -->
        <PARAM name="nodeNames" value="node1_hostname,node2_hostname" />
        <!-- Database installation directory -->
        <PARAM name="gaussdbAppPath" value="/opt/huawei/install/app" />
        <!-- Log directory -->
        <PARAM name="gaussdbLogPath" value="/var/log/omm" />
        <!-- Temporary file directory -->
        <PARAM name="tmpMppdbPath" value="/opt/huawei/tmp"/>
        <!-- Database tool directory -->
        <PARAM name="gaussdbToolPath" value="/opt/huawei/install/om" />
        <!--Directory of the core file of the database -->
        <PARAM name="corePath" value="/opt/huawei/corefile"/>
        <!-- Node IP address, which corresponds to the database node name list -->
        <PARAM name="backIp1s" value="192.168.0.1,192.168.0.2"/> 
    </CLUSTER>
    <!-- Information about the node deployment on each server -->
    <DEVICELIST>
        <!-- Deployment information on node 1 -->
        <DEVICE sn="node1_hostname">
            <!-- Host name of node 1 -->
            <PARAM name="name" value="node1_hostname"/>
            <!-- AZ where node1 is located and priority of the AZ -->
            <PARAM name="azName" value="AZ1"/>
            <PARAM name="azPriority" value="1"/>
            <!-- IP address of node 1. If only one NIC is available for the server, set backIP1 and sshIP1 to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.1"/>
            <PARAM name="sshIp1" value="192.168.0.1"/>
            
	    <!--dn-->
            <PARAM name="dataNum" value="1"/>
	    <PARAM name="dataPortBase" value="15400"/>
	    <PARAM name="dataNode1" value="/opt/huawei/install/data/dn,node2_hostname,/opt/huawei/install/data/dn"/>
            <PARAM name="dataNode1_syncNum" value="0"/>
        </DEVICE>

        <!-- Node deployment information on node 2. The value of name is the host name. -->
        <DEVICE sn="node2_hostname">
            <!-- Host name of node 2 -->
            <PARAM name="name" value="node2_hostname"/>
            <!-- AZ where node 2 is located and priority of the AZ -->
            <PARAM name="azName" value="AZ1"/>
            <PARAM name="azPriority" value="1"/>
            <!-- IP address of node 2. If only one NIC is available for the server, set backIP1 and sshIP1 to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.2"/>
            <PARAM name="sshIp1" value="192.168.0.2"/>
	</DEVICE>
    </DEVICELIST>
</ROOT>

Configuration file for primary/standby/cascaded nodes

<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
    <!-- Overall information about openGauss -->
    <CLUSTER>
        <PARAM name="clusterName" value="Cluster_template" />
        <PARAM name="nodeNames" value="node1_hostname,node2_hostname,node3_hostname" />
   
        <PARAM name="gaussdbAppPath" value="/opt/huawei/install/app" />
        <PARAM name="gaussdbLogPath" value="/var/log/omm" />
        <PARAM name="tmpMppdbPath" value="/opt/huawei/tmp"/>
        <PARAM name="gaussdbToolPath" value="/opt/huawei/install/om" />
        <PARAM name="corePath" value="/opt/huawei/corefile"/>
        <PARAM name="backIp1s" value="192.168.0.1,192.168.0.2,192.168.0.3"/>
    
    </CLUSTER>
    <!-- Information about the node deployment on each server -->
    <DEVICELIST>
        <!-- Information about node deployment on **node1** -->
        <DEVICE sn="node1_hostname">
            <PARAM name="name" value="node1_hostname"/>
            <PARAM name="azName" value="AZ1"/>
            <PARAM name="azPriority" value="1"/>
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.1"/>
            <PARAM name="sshIp1" value="192.168.0.1"/>
            
      	<!-- Primary CM -->
	    <PARAM name="cmsNum" value="1"/> 
	    <PARAM name="cmDir" value="/opt/huawei/install/cm"/> 
	    <PARAM name="cmServerPortBase" value="15300"/> 
	    <PARAM name="cmServerListenIp1" value="192.168.0.1,192.168.0.2,192.168.0.3"/> 
	    <PARAM name="cmServerHaIp1" value="192.168.0.1,192.168.0.2,192.168.0.3"/> 
	    <!-- CM server level. Currently, only 1 is supported. -->
	    <PARAM name="cmServerlevel" value="1"/> 
	    <!-- Host names of the primary and standby CMS nodes -->
	    <PARAM name="cmServerRelation" value="node1_hostname,node2_hostname,node3_hostname"/>       
	   
       <!--dn-->
         <PARAM name="dataNum" value="1"/>
	    <PARAM name="dataPortBase" value="26000"/>
	    <PARAM name="dataNode1" value="/opt/huawei/install/data/dn,node2_hostname,/opt/huawei/install/data/dn,node3_hostname,/opt/huawei/install/data/dn"/>
        <PARAM name="dataNode1_syncNum" value="0"/>
        </DEVICE>

        <!-- Node deployment information on node 2. The value of name is the host name. -->
        <DEVICE sn="node2_hostname">
            <PARAM name="name" value="node2_hostname"/>
            <PARAM name="azName" value="AZ1"/>
            <PARAM name="azPriority" value="1"/>
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.2"/>
            <PARAM name="sshIp1" value="192.168.0.2"/>
             <!-- cm --> 
            <PARAM name="cmDir" value="/opt/huawei/install/cm"/> 
            <PARAM name="cmServerPortStandby" value="15300"/> 
	</DEVICE>

        <!-- Node deployment information on node 3. The value of name is the host name. -->
        <DEVICE sn="node3_hostname">
            <PARAM name="name" value="node3_hostname"/>
            <PARAM name="azName" value="AZ1"/>
            <PARAM name="azPriority" value="1"/>
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.3"/>
            <PARAM name="sshIp1" value="192.168.0.3"/>
            <PARAM name="cascadeRole" value="on"/>
            <!-- cm --> 
            <PARAM name="cmDir" value="/opt/huawei/install/cm"/> 
            <PARAM name="cmServerPortStandby" value="15300"/> 
	</DEVICE>
    </DEVICELIST>
</ROOT>

Configuration file for one primary node and two standby nodes

<?xml version="1.0" encoding="UTF-8"?> 
<ROOT> 
    <!-- Overall information about openGauss -->
    <CLUSTER> 
        <PARAM name="clusterName" value="Cluster_template" /> 
        <PARAM name="nodeNames" value="node1_hostname,node2_hostname,node3_hostname" /> 
    
        <PARAM name="gaussdbAppPath" value="/opt/huawei/install/app" /> 
        <PARAM name="gaussdbLogPath" value="/var/log/omm" /> 
        <PARAM name="tmpMppdbPath" value="/opt/huawei/tmp"/> 
        <PARAM name="gaussdbToolPath" value="/opt/huawei/install/om" /> 
        <PARAM name="corePath" value="/opt/huawei/corefile"/> 
        <PARAM name="backIp1s" value="192.168.0.1,192.168.0.2,192.168.0.3"/> 
     
    </CLUSTER> 
    <!-- Information about the node deployment on each server -->
    <DEVICELIST> 
        <!-- Information about node deployment on **node1** -->
        <DEVICE sn="node1_hostname"> 
            <PARAM name="name" value="node1_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.1"/> 
            <PARAM name="sshIp1" value="192.168.0.1"/> 
            <!-- CM node deployment information -->
            <PARAM name="cmsNum" value="1"/> 
            <PARAM name="cmServerPortBase" value="15000"/> 
            <PARAM name="cmServerListenIp1" value="192.168.0.1,192.168.0.2,192.168.0.3"/> 
            <PARAM name="cmServerHaIp1" value="192.168.0.1,192.168.0.2,192.168.0.3"/> 
            <PARAM name="cmServerlevel" value="1"/> 
            <PARAM name="cmServerRelation" value="node1_hostname,node2_hostname,node3_hostname"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	    <!--dn--> 
            <PARAM name="dataNum" value="1"/> 
	    <PARAM name="dataPortBase" value="15400"/> 
	    <PARAM name="dataNode1" value="/opt/huawei/install/data/dn,node2_hostname,/opt/huawei/install/data/dn,node3_hostname,/opt/huawei/install/data/dn"/> 
            <PARAM name="dataNode1_syncNum" value="0"/> 
        </DEVICE> 
 
        <!-- Node deployment information on node 2. The value of name is the host name. -->
        <DEVICE sn="node2_hostname"> 
            <PARAM name="name" value="node2_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.2"/> 
            <PARAM name="sshIp1" value="192.168.0.2"/> 
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
 
        <!-- Node deployment information on node 3. The value of name is the host name. -->
        <DEVICE sn="node3_hostname"> 
            <PARAM name="name" value="node3_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.3"/> 
            <PARAM name="sshIp1" value="192.168.0.3"/> 
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
    </DEVICELIST> 
</ROOT>

Configuration file for one primary node and three standby nodes

<?xml version="1.0" encoding="UTF-8"?> 
<ROOT> 
    <!-- Overall information about openGauss -->
    <CLUSTER> 
        <PARAM name="clusterName" value="Cluster_template" /> 
        <PARAM name="nodeNames" value="node1_hostname,node2_hostname,node3_hostname,node4_hostname" /> 
    
        <PARAM name="gaussdbAppPath" value="/opt/huawei/install/app" /> 
        <PARAM name="gaussdbLogPath" value="/var/log/omm" /> 
        <PARAM name="tmpMppdbPath" value="/opt/huawei/tmp"/> 
        <PARAM name="gaussdbToolPath" value="/opt/huawei/install/om" /> 
        <PARAM name="corePath" value="/opt/huawei/corefile"/> 
        <PARAM name="backIp1s" value="192.168.0.1,192.168.0.2,192.168.0.3,192.168.0.4"/> 
         
    </CLUSTER> 
    <!-- Information about the node deployment on each server -->
    <DEVICELIST> 
        <!-- Information about node deployment on **node1** -->
        <DEVICE sn="node1_hostname"> 
            <PARAM name="name" value="node1_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.1"/> 
            <PARAM name="sshIp1" value="192.168.0.1"/> 
            <!-- CM node deployment information -->
            <PARAM name="cmsNum" value="1"/> 
            <PARAM name="cmServerPortBase" value="15000"/> 
            <PARAM name="cmServerListenIp1" value="192.168.0.1,192.168.0.2,192.168.0.3,192.168.0.4"/> 
            <PARAM name="cmServerHaIp1" value="192.168.0.1,192.168.0.2,192.168.0.3,192.168.0.4"/> 
            <PARAM name="cmServerlevel" value="1"/> 
            <PARAM name="cmServerRelation" value="node1_hostname,node2_hostname,node3_hostname,node4_hostname"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	    <!--dn--> 
            <PARAM name="dataNum" value="1"/> 
	    <PARAM name="dataPortBase" value="15400"/> 
	    <PARAM name="dataNode1" value="/opt/huawei/install/data/dn,node2_hostname,/opt/huawei/install/data/dn,node3_hostname,/opt/huawei/install/data/dn,node4_hostname,/opt/huawei/install/data/dn"/>
            <PARAM name="dataNode1_syncNum" value="0"/>
        </DEVICE> 
 
        <!-- Node deployment information on node 2. The value of name is the host name. -->
        <DEVICE sn="node2_hostname"> 
            <PARAM name="name" value="node2_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.2"/> 
            <PARAM name="sshIp1" value="192.168.0.2"/> 
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
 
        <!-- Node deployment information on node 3. The value of name is the host name. -->
        <DEVICE sn="node3_hostname"> 
            <PARAM name="name" value="node3_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.3"/> 
            <PARAM name="sshIp1" value="192.168.0.3"/> 
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
 
        <!-- Node deployment information on node 4. The value of name is the host name. -->
        <DEVICE sn="node4_hostname"> 
            <PARAM name="name" value="node4_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.4"/> 
            <PARAM name="sshIp1" value="192.168.0.4"/> 
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
    </DEVICELIST> 
</ROOT>

Configuration file for one primary node and four standby nodes

<?xml version="1.0" encoding="UTF-8"?> 
<ROOT> 
    <!-- Overall information about openGauss -->
    <CLUSTER> 
        <PARAM name="clusterName" value="Cluster_template" /> 
        <PARAM name="nodeNames" value="node1_hostname,node2_hostname,node3_hostname,node4_hostname,node5_hostname" /> 
    
        <PARAM name="gaussdbAppPath" value="/opt/huawei/install/app" /> 
        <PARAM name="gaussdbLogPath" value="/var/log/omm" /> 
        <PARAM name="tmpMppdbPath" value="/opt/huawei/tmp"/> 
        <PARAM name="gaussdbToolPath" value="/opt/huawei/install/om" /> 
        <PARAM name="corePath" value="/opt/huawei/corefile"/> 
        <PARAM name="backIp1s" value="192.168.0.1,192.168.0.2,192.168.0.3,192.168.0.4,192.168.0.5"/> 
         
    </CLUSTER> 
    <!-- Information about the node deployment on each server -->
    <DEVICELIST> 
        <!-- Information about node deployment on **node1** -->
        <DEVICE sn="node1_hostname"> 
            <PARAM name="name" value="node1_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.1"/> 
            <PARAM name="sshIp1" value="192.168.0.1"/> 
            <!-- CM node deployment information -->
            <PARAM name="cmsNum" value="1"/> 
            <PARAM name="cmServerPortBase" value="15000"/> 
            <PARAM name="cmServerListenIp1" value="192.168.0.1,192.168.0.2,192.168.0.3,192.168.0.4,192.168.0.5"/> 
            <PARAM name="cmServerHaIp1" value="192.168.0.1,192.168.0.2,192.168.0.3,192.168.0.4,192.168.0.5"/> 
            <PARAM name="cmServerlevel" value="1"/> 
            <PARAM name="cmServerRelation" value="node1_hostname,node2_hostname,node3_hostname,node4_hostname,node5_hostname"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	    <!--dn--> 
            <PARAM name="dataNum" value="1"/> 
	    <PARAM name="dataPortBase" value="15400"/> 
	    <PARAM name="dataNode1" value="/opt/huawei/install/data/dn,node2_hostname,/opt/huawei/install/data/dn,node3_hostname,/opt/huawei/install/data/dn,node4_hostname,/opt/huawei/install/data/dn,node5_hostname,/opt/huawei/install/data/dn"/> 
            <PARAM name="dataNode1_syncNum" value="0"/> 
        </DEVICE> 
 
        <!-- Node deployment information on node 2. The value of name is the host name. -->
        <DEVICE sn="node2_hostname"> 
            <PARAM name="name" value="node2_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.2"/> 
            <PARAM name="sshIp1" value="192.168.0.2"/> 
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
 
        <!-- Node deployment information on node 3. The value of name is the host name. -->
        <DEVICE sn="node3_hostname"> 
            <PARAM name="name" value="node3_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.3"/> 
            <PARAM name="sshIp1" value="192.168.0.3"/> 
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
 
        <!-- Node deployment information on node 4. The value of name is the host name. -->
        <DEVICE sn="node4_hostname"> 
            <PARAM name="name" value="node4_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.4"/> 
            <PARAM name="sshIp1" value="192.168.0.4"/> 
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
 
        <!-- Node deployment information on node 5. The value of name is the host name. -->
        <DEVICE sn="node5_hostname"> 
            <PARAM name="name" value="node5_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.5"/> 
            <PARAM name="sshIp1" value="192.168.0.5"/> 
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
    </DEVICELIST> 
</ROOT>

Configuration file of one primary node and four standby nodes (User-defined FIRST and ANY can be used to synchronize data to the standby node.)

<?xml version="1.0" encoding="UTF-8"?> 
<ROOT> 
    <!-- Overall information about openGauss -->
    <CLUSTER> 
        <PARAM name="clusterName" value="Cluster_template" /> 
        <PARAM name="nodeNames" value="node1_hostname,node2_hostname,node3_hostname,node4_hostname,node5_hostname" /> 
    
        <PARAM name="gaussdbAppPath" value="/opt/huawei/install/app" /> 
        <PARAM name="gaussdbLogPath" value="/var/log/omm" /> 
        <PARAM name="tmpMppdbPath" value="/opt/huawei/tmp"/> 
        <PARAM name="gaussdbToolPath" value="/opt/huawei/install/om" /> 
        <PARAM name="corePath" value="/opt/huawei/corefile"/> 
        <PARAM name="backIp1s" value="192.168.0.1,192.168.0.2,192.168.0.3,192.168.0.4,192.168.0.5"/> 
         
    </CLUSTER> 
    <!-- Information about the node deployment on each server -->
    <DEVICELIST> 
        <!-- Information about node deployment on **node1** -->
        <DEVICE sn="node1_hostname"> 
            <PARAM name="name" value="node1_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.1"/> 
            <PARAM name="sshIp1" value="192.168.0.1"/> 
            <!-- CM node deployment information -->
            <PARAM name="cmsNum" value="1"/> 
            <PARAM name="cmServerPortBase" value="15000"/> 
            <PARAM name="cmServerListenIp1" value="192.168.0.1,192.168.0.2,192.168.0.3,192.168.0.4,192.168.0.5"/> 
            <PARAM name="cmServerHaIp1" value="192.168.0.1,192.168.0.2,192.168.0.3,192.168.0.4,192.168.0.5"/> 
            <PARAM name="cmServerlevel" value="1"/> 
            <PARAM name="cmServerRelation" value="node1_hostname,node2_hostname,node3_hostname,node4_hostname,node5_hostname"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	    <!--dn--> 
            <PARAM name="dataNum" value="1"/> 
	    <PARAM name="dataPortBase" value="15400"/> 
	    <PARAM name="dataNode1" value="/opt/huawei/install/data/dn,node2_hostname,/opt/huawei/install/data/dn,node3_hostname,/opt/huawei/install/data/dn,node4_hostname,/opt/huawei/install/data/dn,node5_hostname,/opt/huawei/install/data/dn"/> 
            <!-- Replace "hostname" in "syncNode_hostname" with your host name. -->
            <PARAM name="syncNode_node1_hostname" value="ANY 2(node2_hostname, node4_hostname), ANY 1(node3_hostname, node5_hostname)"/> 
        </DEVICE> 
 
        <!-- Node deployment information on node 2. The value of name is the host name. -->
        <DEVICE sn="node2_hostname"> 
            <PARAM name="name" value="node2_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.2"/> 
            <PARAM name="sshIp1" value="192.168.0.2"/> 
            <!-- Replace "hostname" in "syncNode_hostname" with your host name. -->
            <PARAM name="syncNode_node2_hostname" value="ANY 2(node1_hostname, node3_hostname), ANY 1(node5_hostname, node4_hostname)"/>
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
 
        <!-- Node deployment information on node 3. The value of name is the host name. -->
        <DEVICE sn="node3_hostname"> 
            <PARAM name="name" value="node3_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.3"/> 
            <PARAM name="sshIp1" value="192.168.0.3"/> 
            <!-- Replace "hostname" in "syncNode_hostname" with your host name. -->
            <PARAM name="syncNode_node3_hostname" value="FIRST 3(node2_hostname, node1_hostname, node4_hostname, node5_hostname)"/>
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
 
        <!-- Node deployment information on node 4. The value of name is the host name. -->
        <DEVICE sn="node4_hostname"> 
            <PARAM name="name" value="node4_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.4"/> 
            <PARAM name="sshIp1" value="192.168.0.4"/> 
            <!-- Replace "hostname" in "syncNode_hostname" with your host name. -->
            <PARAM name="syncNode_node4_hostname" value="ANY 2(node2_hostname, node1_hostname, node5_hostname, node3_hostname)"/>
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
 
        <!-- Node deployment information on node 5. The value of name is the host name. -->
        <DEVICE sn="node5_hostname"> 
            <PARAM name="name" value="node5_hostname"/> 
            <PARAM name="azName" value="AZ1"/> 
            <PARAM name="azPriority" value="1"/> 
            <!-- If only one NIC is available for the server, set <b>backIP1/<b> and <b>sshIP1</b> to the same IP address. -->
            <PARAM name="backIp1" value="192.168.0.5"/> 
            <PARAM name="sshIp1" value="192.168.0.5"/> 
            <!-- Replace "hostname" in "syncNode_hostname" with your host name. -->
            <PARAM name="syncNode_node5_hostname" value="ANY 1(node1_hostname, node2_hostname, node3_hostname, node4_hostname)"/>
            <!-- cm --> 
            <PARAM name="cmServerPortStandby" value="15000"/> 
            <PARAM name="cmDir" value="/opt/huawei/data/cmserver"/> 
	</DEVICE> 
    </DEVICELIST> 
</ROOT>
Feedback
编组 3备份
    openGauss 2024-05-07 00:46:52
    cancel