[omm@ecs-0001~]$ gs_om -t start
Starting cluster.=========================================[GAUSS-51400]: Failed to execute the command: scp ecs-0002:/appdata/app/opengauss_f892ccb7/bin/cluster_dynamic_config /appdata/app/opengauss_f892ccb7/bin/cluster_dynamic_config_ecs-0002. Error:
ssh: connect to host ecs-0002 port 22: No route to host
1.
2.
3.
4.
5.
2. 修改配置文件
postgresql.conf
pg_hba.conf
clusterconfig.xml (用于生成static configuration)
/etc/hosts
[root@ecs-0001~]# sed -i 's/192.168.0.10/192.168.0.30/g'/appdata/data/postgresql.conf /appdata/data/pg_hba.conf /opt/software/opengauss/clusterconfig.xml /etc/hosts
[root@ecs-0001~]# sed -i 's/192.168.0.20/192.168.0.40/g'/appdata/data/postgresql.conf /appdata/data/pg_hba.conf /opt/software/opengauss/clusterconfig.xml /etc/hosts
[root@ecs-0002~]# sed -i 's/192.168.0.10/192.168.0.30/g'/appdata/data/postgresql.conf /appdata/data/pg_hba.conf /opt/software/opengauss/clusterconfig.xml /etc/hosts
[root@ecs-0002~]# sed -i 's/192.168.0.20/192.168.0.40/g'/appdata/data/postgresql.conf /appdata/data/pg_hba.conf /opt/software/opengauss/clusterconfig.xml /etc/hosts
1.
2.
3.
4.
3. 生成集群文件并发送到备库
自动发送到备库
[omm@ecs-0001~]$ 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 /appdata/app/tools/script/static_config_files.
Distributing static configuration files to all nodes.
Successfully distributed static configuration files.
1.
2.
3.
4.
5.
6.
7.
8.
9.
4. 启动数据库验证
主库启动
[omm@ecs-0001~]$ gs_om -t start
Starting cluster.=========================================[SUCCESS] ecs-00012022-01-2012:45:15.721[unknown][unknown] localhost 28145764047259200[BACKEND] WARNING: Failed to initialize the memory protect for g_instance.attr.attr_storage.cstore_buffers(16 Mbytes) or shared memory(8004 Mbytes) is larger.[SUCCESS] ecs-00022022-01-2012:45:18.071[unknown][unknown] localhost 28146590148200000[BACKEND] WARNING: Failed to initialize the memory protect for g_instance.attr.attr_storage.cstore_buffers(16 Mbytes) or shared memory(8004 Mbytes) is larger.=========================================
Successfully started.