[root@gauss1 ~]# su - omm -c "gs_om -t status --detail" [ Cluster State ]
cluster_state : Normal redistributing : No current_az : AZ_ALL
[ Datanode State ]
node node_ip port instance state ------------------------------------------------------------------------------------------ 1 gauss1 10.125.9.45 15400 6001 /usr/bin/gaussdb/data/dn P Primary Normal
gauss2数据库状态[^2]
[root@gauss2 ~]# su - omm -c "gs_om -t status --detail" [ Cluster State ]
cluster_state : Normal redistributing : No current_az : AZ_ALL
[ Datanode State ]
node node_ip port instance state ------------------------------------------------------------------------------------------ 1 gauss2 10.125.10.75 15400 6001 /usr/bin/gaussdb/data/dn P Primary Normal [root@gauss2 ~]# su - omm -c "gaussdb -V" gaussdb (openGauss 5.0.0 build 331ae190) compiled at 2024-08-23 14:39:45 commit 0 last mr
[root@gauss1 ~]# /opt/openGauss/script/gs_sshexkey -f /home/omm/ip.txt <<<Cloud@1234 Checking network information. All nodes in the network are Normal. Successfully checked network information. Creating SSH trust. Creating the local key file. Successfully created the local key files. Appending local ID to authorized_keys. Successfully appended local ID to authorized_keys. Updating the known_hosts file. Successfully updated the known_hosts file. Appending authorized_key on the remote node. Successfully appended authorized_key on all remote node. Checking common authentication file content. Successfully checked common authentication content. Distributing SSH trust file to all node. Distributing trust keys file to all node successfully. Successfully distributed SSH trust file to all node. Verifying SSH trust on all hosts. Successfully verified SSH trust on all hosts. Successfully created SSH trust.
为omm用户创建免密,同上
[root@gauss1 .ssh]# su - omm -c "/opt/openGauss/script/gs_sshexkey -f /home/omm/ip.txt <<<Cloud@1234" Checking network information. All nodes in the network are Normal. Successfully checked network information. Creating SSH trust. Creating the local key file. Successfully created the local key files. Appending local ID to authorized_keys. Successfully appended local ID to authorized_keys. Updating the known_hosts file. Successfully updated the known_hosts file. Appending authorized_key on the remote node. Successfully appended authorized_key on all remote node. Checking common authentication file content. Successfully checked common authentication content. Distributing SSH trust file to all node. Distributing trust keys file to all node successfully. Successfully distributed SSH trust file to all node. Verifying SSH trust on all hosts. Successfully verified SSH trust on all hosts. Successfully created SSH trust.
Checking gaussdb and gs_om version. End to check gaussdb and gs_om version.
Start to establish the relationship. Start to build standby 10.125.10.75. Build standby 10.125.10.75 success. Start to generate and send cluster static file. End to generate and send cluster static file.
[root@gauss1 ~]# su - omm -c "gs_om -t status --detail" [ Cluster State ]
cluster_state : Normal redistributing : No current_az : AZ_ALL
[ Datanode State ]
node node_ip port instance state ------------------------------------------------------------------------------------------ 1 gauss1 10.125.9.45 15400 6001 /usr/bin/gaussdb/data/dn P Primary Normal 2 gauss2 10.125.10.75 15400 6002 /usr/bin/gaussdb/data/dn S Standby Normal
[root@gauss1 ~]# su - omm -c "gs_ctl stop -D /usr/bin/gaussdb/data/dn" [2024-09-02 19:21:03.773][79008][][gs_ctl]: gs_ctl stopped ,datadir is /usr/bin/gaussdb/data/dn waiting for server to shut down..... done server stopped [root@gauss1 ~]# su - omm -c "gs_om -t status --detail" [ Cluster State ]
cluster_state : Unavailable redistributing : No current_az : AZ_ALL
[ Datanode State ]
node node_ip port instance state ------------------------------------------------------------------------------------------ 1 gauss1 10.125.9.45 15400 6001 /usr/bin/gaussdb/data/dn P Down Manually stopped 2 gauss2 10.125.10.75 15400 6002 /usr/bin/gaussdb/data/dn S Standby Need repair(Disconnected)
[root@gauss1 ~]# su - omm -c "/usr/bin/gaussdb/app/tool/cm_tool/cm_install -X /home/omm/cm_config.xml --cmpkg=/opt/openGauss/openGauss-5.0.0-openEuler-64bit-cm.tar.gz" Start to install cm tool. Preparing CM path. Decompressing CM pacakage. Creating cluster_manual_start file. Initializing cm_server. Initializing cm_agent. Creating CM ca files. Refreshing static and dynamic file using xml file with cm. Setting om_monitor crontab. Starting cluster. [ CMServer State ]
cluster_state : Normal redistributing : No balanced : Yes current_az : AZ_ALL
[ Datanode State ]
node instance state | node instance state ---------------------------------------------------------------------------- 1 gauss1 6001 P Primary Normal | 2 gauss2 6002 S Standby Normal Install CM tool success. [root@gauss1 ~]# su - omm -c "gs_om -t status --detail" [ CMServer State ]
cluster_state : Normal redistributing : No balanced : Yes current_az : AZ_ALL
[ Datanode State ]
node node_ip instance state ------------------------------------------------------------------------- 1 gauss1 10.125.9.45 6001 /usr/bin/gaussdb/data/dn P Primary Normal 2 gauss2 10.125.10.75 6002 /usr/bin/gaussdb/data/dn S Standby Normal
cluster_state : Normal redistributing : No balanced : Yes current_az : AZ_ALL
[ Datanode State ]
node node_ip instance state ------------------------------------------------------------------------- 1 gauss1 10.125.9.45 6001 /usr/bin/gaussdb/data/dn P Primary Normal 2 gauss2 10.125.10.75 6002 /usr/bin/gaussdb/data/dn S Standby Normal [root@gauss1 ~]# su - omm -c "cm_ctl show"
[ Network Connect State ]
Network timeout: 6s Current CMServer time: 2024-09-02 22:10:51 Network stat('Y' means connected, otherwise 'N'): | \ | Y | | Y | \ |
[ Node Disk HB State ]
Node disk hb timeout: 200s Current CMServer time: 2024-09-02 22:10:52 Node disk hb stat('Y' means connected, otherwise 'N'): | N | N |
[root@gauss1 ~]# su - omm -c "gs_guc reload -N all -I all -h \"host all all 10.125.9.46/32 sha256\"" The gs_guc run with the following arguments: [gs_guc -N all -I all -h host all all 10.125.9.46/32 sha256 reload ]. Begin to perform the total nodes: 2. Popen count is 2, Popen success count is 2, Popen failure count is 0. Begin to perform gs_guc for datanodes. Command count is 2, Command success count is 2, Command failure count is 0.
Total instances: 2. Failed instances: 0. ALL: Success to perform gs_guc!