1.环境准备
- 登录omm
[root@enmoedu ~]# su - omm
Last login: Mon Nov 28 22:29:58 CST 2022 on pts/0
- 登录数据库
[omm@enmoedu ~]$ gsql -d postgres -p 15400 -r
failed to connect /opt/huawei/tmp:15400.
- 查看当前状态
[omm@enmoedu ~]$ 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 enmoedu 192.168.94.135 15400 6001 /opt/huawei/install/data/dn P Primary Manually stopped
- 将数据库拉起来
[omm@enmoedu ~]$ gs_om -t start
Starting cluster.
=========================================
[SUCCESS] enmoedu
2022-11-29 17:43:18.778 6385d436.1 [unknown] 140169551084608 [unknown] 0 dn_6001 01000 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets
2022-11-29 17:43:18.778 6385d436.1 [unknown] 140169551084608 [unknown] 0 dn_6001 01000 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets
2022-11-29 17:43:18.804 6385d436.1 [unknown] 140169551084608 [unknown] 0 dn_6001 01000 0 [BACKEND] WARNING: Failed to initialize the memory protect for g_instance.attr.attr_storage.cstore_buffers (1024 Mbytes) or shared memory (1894 Mbytes) is larger.
=========================================
Successfully started.
- 登录数据库
[omm@enmoedu ~]$ gsql -d postgres -p 15400 -r
gsql ((openGauss 3.0.0 build 02c14696) compiled at 2022-04-01 18:12:34 commit 0 last mr )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.