DEV Community

leo
leo

Posted on

Static configuration files generated using the gs_om tool

generate configuration file
Background Information
During the use of openGauss, if the static configuration file is accidentally damaged, it will affect the openGauss perception of the openGauss topology and the master-backup relationship. The static configuration file generated by the gs_om tool can replace the damaged configuration file to ensure the normal operation of openGauss.

Preconditions
none.

Steps
Log in to the active database node as the operating system user omm.

Executing the following command will generate a configuration file in the specified directory of the server.

gs_om -t generateconf -X /opt/software/openGauss/clusterconfig.xml --distribute
/opt/software/openGauss/clusterconfig.xml is the XML configuration file when openGauss is installed.

illustrate:

After the command is executed, the directory where the new file is stored will be displayed in the log information. Taking the environment of one master and two backups as an example, when you open the new file storage directory, three configuration files named after the host name will appear, and you need to use these three files to replace the configuration files of the corresponding hosts.

If you do not use the --distribute parameter, you need to perform step 3 to distribute the static configuration file to the corresponding node; if you use the --distribute parameter, the generated static configuration file will be automatically distributed to the corresponding node without performing step 3 .

(Optional) Replace the damaged static configuration files in the /opt/gaussdb/app/bin directory of the three hosts respectively.

Here we take one of the hosts as an example.

mv /opt/huawei/wisequery/script/static_config_files/cluster_static_config_SIA1000056771 /opt/gaussdb/app/bin/cluster_static_config
example
Execute the following command on any host in openGauss to generate a configuration file:

gs_om -t generateconf -X /opt/software/openGauss/clusterconfig.xml --distribute
Generating static configuration files for all nodes.
Creating temp directory to store static configuration files.
Successfully created the temp directory.
Generating static configuration files.
Successfully generated static configuration files.
Static configuration files for all nodes are saved in /opt/huawei/Bigdata/mppdb/wisequery/script/static_config_files.
Distributing static configuration files to all nodes.
Successfully distributed static configuration files.
Open the generated configuration file directory, and you will see 3 newly generated files:

cd /opt/huawei/Bigdata/mppdb/wisequery/script/static_config_files
ll
total 456
-rwxr-xr-x 1 omm dbgrp 155648 2016-07-13 15:51 cluster_static_config_plat1
-rwxr-xr-x 1 omm dbgrp 155648 2016-07-13 15:51 cluster_static_config_plat2
-rwxr-xr-x 1 omm dbgrp 155648 2016-07-13 15:51 cluster_static_config_plat3

Top comments (0)