首页 > 数据库 > > 服务端工具-gs_om
GaussDB 200提供了gs_om工具帮助对集群进行维护,包括启动集群、停止集群、重启集群、查询集群状态、切换主备实例、管理CN、修改IP、生成静态配置文件、格式化列存文件、升级时间评估、安装,扩容,增加CN、节点替换和温备相关时间评估、管理虚拟IP、SSL证书替换、输出相对表空间路径、启停kerberos认证、ec工具、管理javaUDF文件、删除PostGIS文件、执行日常巡检并上报告警、集群拓扑结构比较、慢节点检测和隔离、显示帮助信息和显示版本号信息等功能。
gs_om -t start [-h HOSTNAME] [--az=AZNAME] [--time-out=SECS] [-l LOGFILE]
gs_om -t stop [-h HOSTNAME] [--az=AZNAME] [-m MODE] [-l LOGFILE]
gs_om -t restart [--nodegroup-name=NODEGROUPNAME] [-l LOGFILE]
gs_om -t status [-h HOSTNAME] [-o OUTPUT] [--detail] [-l LOGFILE]
switch为维护操作:确保集群状态正常,所有业务结束,并使用pgxc_get_senders_catchup_time()视图查询无主备追赶后,再进行switch操作。
gs_om -t switch [-h HOSTNAME \ --az=AZNAME] [-D INSTANCEDIR] [--reset] [--time-out=SECS] [-l LOGFILE]
gs_om -t managecn -m MODE -X XMLFILE [-l LOGFILE]
gs_om -t changeip -X XMLFILE [--rollback] [-l LOGFILE]
gs_om -t generateconf -X XMLFILE [--distribute] [-l LOGFILE]
gs_om -t formatcu [-j NUM] [-l LOGFILE]
gs_om -t estimate -m upgrade [-l LOGFILE] gs_om -t estimate -m install -X XMLFILE [-l LOGFILE] gs_om -t estimate -m expand -X XMLFILE [-l LOGFILE] gs_om -t estimate -m replace -h HOSTNAME [-l LOGFILE] gs_om -t estimate -m warm-standby -h HOSTNAME [-l LOGFILE] gs_om -t estimate -m addCN [-l LOGFILE]
gs_om -t virtualip -m MODE [-X XMLFILE | --virtual-ip=Ips] [-L] [-l LOGFILE]
gs_om -t cert --cert-file=CERTFILE [-l LOGFILE] gs_om -t cert --rollback
gs_om -t tablespace [-h HOSTNAME] [-l LOGFILE]
gs_om -t kerberos -m [install|uninstall] -U USER [-l LOGFILE]
gs_om -t ec -m [install|uninstall|add|delete|restart] [-N] [-U] [--type] [--target] [--all] [--key-files] [--force] [-L]
gs_om -t javaUDF -m [addjar|rmjar|ls] [-d REMOTERELATIVEPATH] [-s LOCALPATH]
gs_om -t postgis -m rmlib
gs_om -t dailyAlarm -U USER
gs_om -t compare-cluster --remote-host=HOSTNAME --remote-env-file=MPPRCFILE [-l LOGFILE]
gs_om -t slow_node [-m MODE] [--interval=INTERVALS] [--check-count=COUNT] [--threshold=RATIO] [--wait-count=COUNT] [-l LOGFILE]
gs_om -t isolate_stop -h HOSTNAME [-l LOGFILE] gs_om -t isolate_tostandby -h HOSTNAME [-l LOGFILE] gs_om -t isolate_restore -h HOSTNAME [-l LOGFILE] gs_om -t killsession [-l LOGFILE]
gs_om -? | --help
gs_om -V | --version
gs_om -t startetcd [-l LOGFILE]
gs_om命令的类型。
取值范围:start、stop、restart、status、switch、managecn、changeip、generateconf、formatcu、estimate、virtualip、cert、tablespace、kerberos、ec、startetcd、javaUDF、postgis、dailyAlarm、isolate_stop、isolate_tostandby、isolate_restore、killsession、slow_node、compare-cluster。
指定日志文件及存放路径。
默认值:$GAUSSLOG/om/gs_om-YYYY-MM-DD_hhmmss.log(virtualip的默认值:/tmp/gs_virtualip/gs_om-YYYY-MM-DD_hhmmss.log)
显示帮助信息。
显示版本号信息。
指定需要启动的服务器名称。一次只能启动一个服务器。
取值范围:服务器名称。
不指定服务器名称时,表示启动整个集群。
指定超时时间,如果超时,om脚本自动退出。单位:s。
取值范围:正整数,建议值300。
默认值:300
预留给OLTP数据库的接口。GaussDB 200不支持。
指定需要启动的AZ名称。一次只能启动一个AZ。
取值范围:AZ名称。
不指定AZ名称时,表示启动所有AZ。
指定需要停止实例所在的服务器名称。一次只能停止一个服务器。
取值范围:实例所在的服务器名称。
不指定服务器名称时,表示停止整个集群。
指定需要停止实例所在的AZ名称,一次只能停止一个AZ。
取值范围:AZ名称。
不指定AZ名称时,表示停止所有AZ。
停止模式设置。
取值范围:支持三种停止模式。
默认值:fast方式。
预留给OLTP数据库的接口。GaussDB 200不支持。
--nodegroup-name
指定需要重启的逻辑集群名。一次只能重启一个逻辑集群。
取值范围:集群内所有逻辑集群名,不可指定弹性集群elastic_group。
指定需要待查询的服务器名称。
取值范围:服务器名称。
不指定服务器时,表示查询整个集群。
输出到指定的output文件中。
如果不指定,直接显示在屏幕上。
显示详细信息。如果不指定,只提示该服务器是否正常。
预留给OLTP数据库的接口。GaussDB 200不支持。
指定需要切换实例的服务器名称。
取值范围:实例所在服务器名称。
指定需要切换实例所在的AZ名称。
取值范围:实例所在AZ名称。
实例指定的目录。
切换节点最大等待时间。
如果超时,om脚本自动退出。单位:s。
取值范围:正整型。
重置主备状态。
预留给OLTP数据库的接口。GaussDB 200不支持。
新的集群配置文件路径。
指定所要进行的操作。
取值范围:
新的集群配置文件路径。
当自动回滚失败时,用户排除错误后,输入该参数执行手动回滚操作。
选择集群配置文件路径。
将静态配置文件发布到集群实例的安装目录。
指定集群中每个节点上的并发处理列存数据文件的数目。
取值范围:正整型。
缺省值:32。
指定所要进行的评估操作
取值范围:upgrade、install、expand、replace、warm-standby、addCN
执行安装或扩容所配置的xml文件路径。当评估模式为安装或扩容时,该参数是必选项。
指定故障主机的名称。可以指定多个主机名称,以逗号分隔。当评估模式为节点替换或温备时,该参数是必选项。
取值范围:主机名称。
指定所要进行的操作。
取值范围:
新的集群配置xml文件路径。
指定需要删除的本地的虚拟IP地址,该参数存在时必须指定-L参数。
指定该参数时,仅对当前节点进行操作。
若为SuSE12 SP0系统进行虚拟IP操作时,操作系统有如下限制:
1.添加虚拟IP之后如网络、网络服务重启或者机器重启,无法通过ifconfig查看所配虚拟IP,请使用ip a命令进行查看;
2.删除虚拟IP之后必须重启网络服务,才能使虚拟IP失效。
指定本地SSL证书zip压缩包所在路径。
--rollback
证书回退到上一次成功备份的状态。
指定数据库集群部署用户。
取值范围:数据库集群部署用户
指定所要进行的操作。
取值范围:
指定所要进行的操作。
清理集群所有节点${BIGDATA_HOME}/mppdb/core/utilslib/下的内容,或${BIGDATA_HOME}/mppdb/core/bin/下的datasource.key.cipher和datasource.key.rand秘钥文件,并将env_ec文件内容置空。
以DSN为单位,自动安装部署EC连接。 支持对接Spark,oracle,以及 GaussDB 200。
自动卸载通过add(自动安装部署模式)安装的EC连接。支持指定DSN卸载,或者指定--type=all进行全量卸载。卸载${BIGDATA_HOME}/mppdb/core/utilslib/fc_conf路径下的全部EC连接。
重启集群,并清理om_monitor进程后重新拉起。方便om_monitor进程感知新的环境变量。-L模式下仅清理并拉起本地om_monitor进程。
当用户需要修改DSN.ini配置文件中的内容,并刷新到对应的EC连接时,可使用修改更新模式。
当用户需要修改配置文件中的DSN和Driver字段时,需要卸载该EC连接并重新安装,不可使用修改更新模式。
包含${BIGDATA_HOME}/mppdb/core/utilslib/下所有文件、目录,以及${BIGDATA_HOME}/mppdb/core/bin/目录下文件名分别为datasource.key.cipher和datasource.key.rand的秘钥文件,若为部署模式,则默认覆盖。
需要部署或清理的秘钥文件,存放于${BIGDATA_HOME}/mppdb/core/bin/目录下,文件名分别为datasource.key.cipher和datasource.key.rand。
需要部署或清理的目标,可以为文件,也可以为目录,必须存在于${BIGDATA_HOME}/mppdb/core/utilslib/目录下。
gs_om -t ec -m install --target=t1,t2 [--force] --t1 t2为文件或文件夹,可附加多个
覆盖模式,部署模式下,若未选择--force参数,检查到需部署节点存在部署目标,需用户输入是否确认覆盖,若不覆盖,程序中止,用户确认已存在文件是否需要做其他处理,完成后再使用覆盖模式重新部署。
-N
DSN名参数。用于指定DSN名称,DSN名与非EC自动化部署的DSN重名时会覆盖原有DSN,名称只能由数字,字母,下划线组成。在--type=remoteip时,用于指定需要配置在对端 GaussDB 200的连接用IP文件。
--type
安装,卸载类型。安装支持spark,oracle,native, remoteip四种集群类型。其中native对应 GaussDB 200。remoteip对应配置对端 GaussDB 200的连接IP。卸载支持all一种类型,卸载全部EC连接。
-U
GaussDB 200的集群用户。
-L
本地模式。只安装或者卸载本节点的EC配置。
指定所要进行的操作。
将当前节点指定目录的文件或文件夹部署到集群的所有节点${BIGDATA_HOME}/mppdb/core/lib/postgresql/java下的指定目录里。
查看当前集群各节点上部署的jar文件是否一致并显示出文件列表。
将集群内所有节点${BIGDATA_HOME}/mppdb/core/lib/postgresql/java下的指定目录或文件删除。
指定所要进行的操作。
将集群内所有节点的postgis相关文件删除。
${BIGDATA_HOME}/mppdb/core/lib/postgresql/postgis-*.*+.so
${BIGDATA_HOME}/mppdb/core/lib/libgeos_c.so.*
${BIGDATA_HOME}/mppdb/core/lib/libproj.so.*
${BIGDATA_HOME}/mppdb/core/lib/libjson-c.so.*
${BIGDATA_HOME}/mppdb/core/lib/libgeos-*.*.*so
${BIGDATA_HOME}/mppdb/core/lib/libgcc_s.so.*
${BIGDATA_HOME}/mppdb/core/lib/libstdc++.so.*
${BIGDATA_HOME}/mppdb/core/share/postgresql/extension/postgis--*.*.*.sql
${BIGDATA_HOME}/mppdb/core/share/postgresql/extension/postgis.control
${BIGDATA_HOME}/mppdb/core/bin/pgsql2shp
${BIGDATA_HOME}/mppdb/core/bin/shp2pgsql
指定数据库集群用户。
取值范围:数据库集群用户
指定远程集群的一个正常节点名。
取值范围:和本地集群用户已建立互信的远程集群节点。
指定远程节点的用户环境变量文件。
取值范围:指定节点集群用户的环境变量文件,若未环境变量分离则为用户目录下的.bashrc文件
两次检查之间的时间间隔。
取值范围:正整型
默认值:240秒
一个周期内的检查次数。
取值范围:正整型
默认值:5次
某个节点检查出的CN/DN等待次数占CN/DN等待总次数的最小百分比。
取值范围:1~99
默认值:50
所有CN/所有DN实例出现等待的最小总次数。
取值范围:0~1000
默认值:10
指定需要隔离或者恢复的服务器名称。
字段 | 字段含义 | 字段值 |
|---|---|---|
cluster_state | 集群状态。显示整个集群是否运行正常。 |
|
redistributing | 数据重分布状态 |
|
balanced | 平衡状态。显示是否有集群实例发生过主备切换而导致主机负载不均衡。 |
|
node | 主机名称 | 表示该实例所在的主机名称。 |
node_ip | 主机IP | 表示该实例所在的主机IP。 |
instance | 实例ID | 表示该实例的ID。 |
state | 实例状态 |
|
gs_om -t start
Starting cluster.
======================================================================
Successfully started primary instance. Wait for standby instance.
======================================================================
.
Successfully started cluster.
======================================================================
cluster_state : Normal
redistributing : No
node_count : 3
Coordinator State
normal : 2
abnormal : 0
GTM State
primary : 1
standby : 1
abnormal : 0
down : 0
Datanode State
primary : 4
standby : 4
secondary : 4
building : 0
abnormal : 0
down : 0
Successfully started cluster.gs_om -t stop Stopping cluster. ========================================= Successfully stopped cluster. ========================================= End stop cluster.
gs_om -t restart
Stopping cluster.
=========================================
Successfully stopped cluster.
=========================================
End stop cluster.
Starting cluster.
======================================================================
Successfully started primary instance. Wait for standby instance.
======================================================================
.
Successfully started cluster.
======================================================================
cluster_state : Normal
redistributing : No
node_count : 3
Coordinator State
normal : 2
abnormal : 0
GTM State
primary : 1
standby : 1
abnormal : 0
down : 0
Datanode State
primary : 4
standby : 4
secondary : 4
building : 0
abnormal : 0
down : 0gs_om -t restart --nodegroup-name group1 Restarting logical cluster group1. ========================================= Successfully restarted nodegroup group1.
gs_om -t status --detail [ CMServer State ] node node_ip instance state --------------------------------------------------------------------------------- 1 linux-221 10.90.57.221 1 /opt/huawei/Bigdata/mppdb/cm/cm_server Standby 2 linux-222 10.90.57.222 2 /opt/huawei/Bigdata/mppdb/cm/cm_server Primary [ Cluster State ] cluster_state : Normal redistributing : No balanced : Yes [ Coordinator State ] node node_ip instance state -------------------------------------------------------------------------------- 1 linux-221 10.90.57.221 5001 /srv/BigData/mppdb/data1/coordinator Normal 2 linux-222 10.90.57.222 5002 /srv/BigData/mppdb/data1/coordinator Normal 3 linux-ncqd 10.90.57.223 5003 /srv/BigData/mppdb/data1/coordinator Normal [ Central Coordinator State ] node node_ip instance state -------------------------------------------------------------------------------- 2 linux-222 10.90.57.222 5002 /srv/BigData/mppdb/data1/coordinator Normal [ GTM State ] node node_ip instance state sync_state -------------------------------------------------------------------------------------------------------- 2 linux-222 10.90.57.222 1001 /opt/huawei/Bigdata/mppdb/gtm P Primary Connection ok Sync 1 linux-221 10.90.57.221 1002 /opt/huawei/Bigdata/mppdb/gtm S Standby Connection ok Sync [ Datanode State ] node node_ip instance state | node node_ip instance state | node node_ip instance state -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 linux-221 10.90.57.221 6001 /srv/BigData/mppdb/data1/master1 P Standby Normal | 2 linux-222 10.90.57.222 6002 /srv/BigData/mppdb/data1/slave1 S Primary Normal | 3 linux-ncqd 10.90.57.223 3002 /srv/BigData/mppdb/data1/dummyslave1 R Secondary Normal 1 linux-221 10.90.57.221 6003 /srv/BigData/mppdb/data2/master2 P Standby Normal | 3 linux-ncqd 10.90.57.223 6004 /srv/BigData/mppdb/data2/slave2 S Primary Normal | 2 linux-222 10.90.57.222 3003 /srv/BigData/mppdb/data2/dummyslave2 R Secondary Normal 1 linux-221 10.90.57.221 6005 /srv/BigData/mppdb/data3./master3 P Standby Normal | 2 linux-222 10.90.57.222 6006 /srv/BigData/mppdb/data3./slave3 S Primary Normal | 3 linux-ncqd 10.90.57.223 3004 /srv/BigData/mppdb/data3./dummyslave3 R Secondary Normal 2 linux-222 10.90.57.222 6007 /srv/BigData/mppdb/data1/master1 P Primary Normal | 3 linux-ncqd 10.90.57.223 6008 /srv/BigData/mppdb/data1/slave1 S Standby Normal | 1 linux-221 10.90.57.221 3005 /srv/BigData/mppdb/data1/dummyslave R Secondary Normal 2 linux-222 10.90.57.222 6009 /srv/BigData/mppdb/data2/master2 P Primary Normal | 1 linux-221 10.90.57.221 6010 /srv/BigData/mppdb/data2/slave2 S Standby Normal | 3 linux-ncqd 10.90.57.223 3006 /srv/BigData/mppdb/data2/dummyslave2 R Secondaryby Normal 2 linux-222 10.90.57.222 6011 /srv/BigData/mppdb/data3./master3 P Primary Normal | 3 linux-ncqd 10.90.57.223 6012 /srv/BigData/mppdb/data3./slave3 S Standby Normal | 1 linux-221 10.90.57.221 3007 /srv/BigData/mppdb/data3./dummyslave3 R Secondary Normal 3 linux-ncqd 10.90.57.223 6013 /srv/BigData/mppdb/data1/master1 P Primary Normal | 1 linux-221 10.90.57.221 6014 /srv/BigData/mppdb/data1/slave1 S Standby Normal | 2 linux-222 10.90.57.222 3008 /srv/BigData/mppdb/data1/dummyslave1 R Secondary Normal 3 linux-ncqd 10.90.57.223 6015 /srv/BigData/mppdb/data2/master2 P Primary Normal | 2 linux-222 10.90.57.222 6016 /srv/BigData/mppdb/data2/slave2 S Standby Normal | 1 linux-221 10.90.57.221 3009 /srv/BigData/mppdb/data2/dummyslave2 R Secondary Normal 3 linux-ncqd 10.90.57.223 6017 /srv/BigData/mppdb/data3./master3 P Primary Normal | 1 linux-221 10.90.57.221 6018 /srv/BigData/mppdb/data3./slave3 S Standby Normal | 2 linux-222 10.90.57.222 3010 /srv/BigData/mppdb/data3./dummyslave3 R Secondary Normal
gs_om -t switch -h plat1 -D /gaussdb/data/data_dnS1 Switching instances. Successfully switched instances.
gs_om -t switch Operation: Switch query. [ GTM State ] node instance state -------------------------------------------------------------------- (no need to switchover gtm) [ Datanode State ] node node_ip instance state | node node_ip instance state | node node_ip instance state -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 plat1 192.168.0.11 6001 /gaussdb/data/data_dn1 P Standby Normal | 2 plat2 192.168.0.12 6002 /gaussdb/data/data_dnS1 S Primary Normal | 3 plat1 192.168.0.13 3002 /gaussdb/data/data_dnDS1 R Secondary Normal Operation succeeded: Switch query.
gs_om -t switch --reset --time-out=60 Operating: Switch reset. cm_ctl: cmserver is rebalancing the cluster automatically. ...... cm_ctl: switchover successfully. Operation succeeded: Switch reset.
gs_om -t formatcu Formatting column store data file on all nodes. Successfully formatted column store data file on all nodes.
gs_om -t generateconf -X ${BIGDATA_HOME}/FusionInsight_MPPDB_6.5.1/*_*_MPPDBServer/etc/mppdb-install-config.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.cd /opt/huawei/Bigdata/mppdb/wisequery/script/static_config_files ll total 456 -rwxr-xr-x 1 omm wheel 155648 2016-07-13 15:51 cluster_static_config_plat1 -rwxr-xr-x 1 omm wheel 155648 2016-07-13 15:51 cluster_static_config_plat2 -rwxr-xr-x 1 omm wheel 155648 2016-07-13 15:51 cluster_static_config_plat3
前提条件:在xml中配置好需要增加的CN信息,执行前置命令。
gs_om -t managecn -m add -X ${BIGDATA_HOME}/FusionInsight_MPPDB_6.5.1/*_*_MPPDBServer/etc/mppdb-install-config.xml
Checking the cluster configuration difference.
Successfully checked the cluster configuration difference.
Checking the cluster status.
Successfully checked the cluster status.
Distributing the XML configuration file to all nodes.
Successfully distributed the XML configuration file.
Creating backup directory.
Successfully created backup directory.
Backing up cluster configuration.
Successfully backed up cluster configuration.
Modifying static configuration files.
Static configuration file's modification is completed.
Locking cluster.
Successfully locked cluster.
Building CN instance.
Successfully built CN instance.
Creating pgxc_node catalog.
Successfully created pgxc_node catalog.
Configuring pg_hba on all nodes.
Unlocking cluster.
Successfully unlock cluster.
Waiting for cluster status to become Normal or Degraded.
.
The cluster status is Normal.gs_om -t managecn -m delete -X ${BIGDATA_HOME}/FusionInsight_MPPDB_6.5.1/*_*_MPPDBServer/etc/mppdb-install-config.xml
Checking the cluster configuration difference.
Successfully checked the cluster configuration difference.
Checking the cluster status.
Successfully checked the cluster status.
Distributing the XML configuration file to all nodes.
Successfully distributed the XML configuration file.
Creating backup directory.
Successfully created backup directory.
Backing up cluster configuration.
Successfully backed up cluster configuration.
Modifying static configuration files.
Static configuration file's modification is completed.
Locking cluster.
Successfully locked cluster.
Dropping pgxc_node catalog.
Successfully dropped pgxc_node catalog.
Configuring pg_hba on all nodes.
Unlocking cluster.
Successfully unlock cluster.
Waiting for cluster status to become Normal or Degraded.
.
The cluster status is Normal.
Deleting the CN instance.
Successfully cleaned CN instance.gs_om -t managecn -m delete -X ${BIGDATA_HOME}/FusionInsight_MPPDB_6.5.1/*_*_MPPDBServer/etc/mppdb-install-config.xml
Checking the cluster configuration difference.
Successfully checked the cluster configuration difference.
Warning: Failed to connect to the node SIA1000022048.
Checking the cluster status.
Successfully checked the cluster status.
Distributing the XML configuration file to all nodes.
Successfully distributed the XML configuration file.
Creating backup directory.
Successfully created backup directory.
Backing up cluster configuration.
Successfully backed up cluster configuration.
Modifying static configuration files.
Static configuration file's modification is completed.
Locking cluster.
Successfully locked cluster.
Dropping pgxc_node catalog.
Successfully dropped pgxc_node catalog.
Configuring pg_hba on all nodes.
Successfully configured pg_hba on all nodes.
Unlocking cluster.
Successfully unlock cluster.
Waiting for cluster status to become Normal or Degraded.
...........
The cluster status is Degraded.
Manage CN is completed.如果执行完删除节点SIA1000022048的CN后,该节点又从故障中恢复,此时该节点上记录的集群信息为删除CN前的,造成该节点与真实的集群信息不相同,因此需要对该节点执行如下操作,以保障集群信息的统一。
gs_om -t changeip -X ${BIGDATA_HOME}/FusionInsight_MPPDB_6.5.1/*_*_MPPDBServer/etc/mppdb-install-config.xml
Changing cluster's IP addresses.
Distributing files to all nodes.
Successfully distributed files.
Checking the cluster configuration differences.
Successfully checked the cluster configuration differences.
Creating the backup directory.
Successfully created backup directory.
Backing up cluster configuration.
Successfully backed up cluster configuration.
Changing static configuration files.
Successfully changed static configuration files.
Modifying instance configuration files.
Successfully modified instance configuration files.
Starting the cluster.
Successfully started the cluster.
Updating catalog.
Successfully updated catalog.
Checking the cluster status.
Successfully checked the cluster status.
Successfully changed cluster's IP addresses.gs_om -t estimate -m upgrade NOTICE: The estimated error of time is within 30 percent. Estimating upgrade time, please wait. Total estimated time for upgrade: 27m-22s Distributing software packages : 1m Checking upgrade environment : 1m Dumping database objects : 1m Stopping the old clusters : 5m Backing up the old cluster : 1m Installing the new cluster : 1m Configuring the new cluster. : 5m Restoring database objects : 6m-51s Upgrading data : 1s Starting the new cluster in read-only mode : 5m Starting the new cluster in normal mode : 30s
gs_om -t estimate -m install -X ${BIGDATA_HOME}/FusionInsight_MPPDB_6.5.1/*_*_MPPDBServer/etc/mppdb-install-config.xml
NOTICE: The estimated error of time is within 30 percent.
Installation time is proportional to the number of nodes and datanodes. The more nodes and datanodes, the longer it takes.
The number of nodes: 3.
The maximum number of datanodes in the nodes: 4.
Total estimated time for installation: 3m-18sgs_om -t estimate -m expand -X ${BIGDATA_HOME}/FusionInsight_MPPDB_6.5.1/*_*_MPPDBServer/etc/mppdb-install-config.xml
NOTICE: The estimated error of time is within 30 percent.
Estimating expand time, please wait.
Total estimated time for expand: 13m-35s
Performing check and initialize : 19s
Performing health check : 9s
Installing new nodes : 12s
Configuring new nodes : 1m-19s
Dumping database objects : 1m
Restoring database objects : 6m-51s
Configuring new instances : 35s
Starting new nodes : 6s
Synchronizing : 8s
Starting new cluster : 1m-9sgs_om -t estimate -m replace -h plat1 NOTICE: The estimated error of time is within 30 percent. Estimating replace time, please wait. Total estimated time for replacement: 13m-23s Installing node : 40s Fixing CMAgents instances : 2m-5s Configuring instances : 1m-36s Dumping database objects : 1m Restoring database objects : 6m-51s Starting node : 59s
gs_om -t estimate -m warm-standby -h plat1 NOTICE: The estimated error of time is within 30 percent. Estimating warm-standby time, please wait. Total estimated time for warm-standby: 13m-55s Replacing IP : 40s Installing node : 40s Fixing CMAgents instances : 2m-5s Configuring instances : 1m-36s Dumping database objects : 1m Restoring database objects : 6m-51s Starting node : 51s
gs_om -t estimate -m addCN NOTICE: The estimated error of time is within 30 percent. Estimating addCN time, please wait. Total estimated time for CN-Addition: 9m-41s Checking and Prepare : 1m-43s Dumping database objects : 1m Restoring database objects : 6m-51s Starting node : 8s
gs_om -t virtualip -m add -X ${BIGDATA_HOME}/FusionInsight_MPPDB_6.5.1/*_*_MPPDBServer/etc/mppdb-install-config.xml
Setting the virtual IP service.
Successfully set virtual IP service.
Virtual Ip is completed.
Default path of Virtual Ip log is saved in /tmp/gs_virtualip.gs_om -t virtualip -m delete -X ${BIGDATA_HOME}/FusionInsight_MPPDB_6.5.1/*_*_MPPDBServer/etc/mppdb-install-config.xml
Deleting virtual IP service.
Successfully deleted virtual IP service.
NOTICE: If you have done a virtual IP clean on the SUSE12 SP0 OS, please restart the network service to ensure that the virtual IP fails.
Virtual Ip is completed.
Default path of Virtual Ip log is saved in /tmp/gs_virtualip.对用户手动添加到pg_hba.conf文件中的ip映射不进行注释。
gs_om -t cert --rollback [plat1] SSL cert files rollback successfully. [plat2] SSL cert files rollback successfully. [plat3] SSL cert files rollback successfully.
gs_om -t tablespace -h plat1 Collecting relative tablespace mount points. --------------------plat1------------------------------------------------------------ cn_5001:/gaussdb/data/coordinator/pg_location/ dn_6001:/gaussdb/data/master1/pg_location/ dn_3003:/gaussdb/data/dummy1/pg_location/ dn_6006:/gaussdb/data/slave1/pg_location/
gs_om -t isolate_stop -h plat1 Performing checkpoint. Checkpoint is completed. Stopping [plat1]. Successfully stopped [plat1]. Waiting for cluster status to become available. . The cluster status is Degraded.
gs_om -t isolate_tostandby -h plat2 Performing checkpoint. Checkpoint is completed. Switching the master to standby. plat2:6002:/gaussdb/data1/standby1 is Down-Abnormal, skip it. plat2:6005:/gaussdb/data1/master1 is Primary, switch to Standby. plat2:6007:/gaussdb/data2/master2 is Primary, switch to Standby. plat2:6012:/gaussdb/data2/standby2 is Standby, no need to switch it. plat2:1002:/gaussdb/manager/gtm is Standby, no need to switch it. Switching the master to standby is completed. Waiting for cluster status to become available. . The cluster status is Degraded.
gs_om -t isolate_restore -h plat1 Starting [plat1]. Successfully started [plat1]. Waiting for cluster status to become available. ........... The cluster status is Degraded. Performing checkpoint. Checkpoint is completed. Switching the nodes to balanced state. plat1:6001:/gaussdb/data1/master1 is Primary, matched with static role, no need to switch it. plat1:6003:/gaussdb/data2/master2 is Standby, switch to Primary. plat1:6008:/gaussdb/data2/standby2 is Standby, matched with static role, no need to switch it. plat1:6010:/gaussdb/data1/standby1 is Standby, matched with static role, no need to switch it. Switching the nodes to balanced state is completed. Waiting for cluster status to become available. . The cluster status is Degraded.
gs_om -t killsession Killing all active sessions. Killing all active sessions is completed. Performing checkpoint. Checkpoint is completed.
perfadm@SIA1000139657:~> gs_om -t slow_node -m confirm --interval=10 --threshold=30 --wait-count=20 --check-count=3 Add a slow node crontab. Successfully added slow node crontab. Start monitoring: check every 10 seconds, 3 times in one cycle. Parsing all result. Parsed all result success. Get alarm config path. alarm component path: /opt/huawei/snas/bin/snas_cm_cmd Last slowNode: [] Current slowNode: []
gs_om -t javaUDF -m addjar -s jarLibPath Deploy the jar files. Check the source file. Check the source file successfully. Check the deployed files. Check the deployed files successfully. Deploy new jar files. Deploy new jar files successfully. Successfully deploy jar file.
gs_om -t javaUDF -m ls Check the jar files consistency. Success: File consistent [${BIGDATA_HOME}/mppdb/core/lib/postgresql/java/1.jar] Success: File consistent [${BIGDATA_HOME}/mppdb/core/lib/postgresql/java/2.jar] Success: File consistent [${BIGDATA_HOME}/mppdb/core/lib/postgresql/java/3.jar] Success: File consistent [${BIGDATA_HOME}/mppdb/core/lib/postgresql/java/4.jar] All jar file is consistent in the cluster.
gs_om -t javaUDF -m rmjar Delete the jar files. The java UDF file delete is completed.
覆盖模式,部署所有组件以及密钥文件 gs_om -t ec -m install --all --force Starting to distribute extension connector files. Successfully distributed extension connector files. 覆盖模式,部署密钥文件 gs_om -t ec -m install --key-files --force Starting to distribute extension connector files. Successfully distributed extension connector files. 覆盖模式,部署指定组件文件 gs_om -t ec -m install --target=env_ec,odbc.ini --force Starting to distribute extension connector files. Successfully distributed extension connector files. 覆盖模式,同时部署指定组件文件和密钥文件 gs_om -t ec -m install --target=env_ec,odbc.ini --key-files --force Starting to distribute extension connector files. Successfully distributed extension connector files. 说明:不使用 --force 参数为非覆盖模式
gs_om -t ec -m add -N spark -U perfadm --type=spark -L Begin to add new extension connector. Check enviroment for adding extension connector. Enviroment is alright. Begin to install unixODBC. Successfully installing unixODBC. Begin to release package. Successfully releasing package. Begin to install rpm package of sparkodbc. Successfully installing rpm package of sparkodbc. Begin to set env value of jars in env_ec file. Successfully setting env value of jars in env_ec file. Begin to install kerberos client. Successfully installing kerberos client. Begin to create jaas file. Successfully creating jaas file. Begin to write information in odbc.ini and odbcinst.ini. Successfully writting information in odbc.ini and odbcinst.ini. Begin to set finish flag. Successfully setting finish flag. Successfully adding new extension connector.
gs_om -t ec -m upgrade -N spark -U perfadm --type=spark -L Begin to upgrade extension connector. Check enviroment for upgrading extension connector. Enviroment is alright. Begin to upgrade config file of sparkodbc.Successfully upgrading config file of sparkodbc. Begin to write information in odbc.ini and odbcinst.ini. Successfully writting information in odbc.ini and odbcinst.ini. Successfully upgrading extension connector.
gs_om -t ec -m delete -U perfadm --type=all -L Begin to delete extension connector. Check enviroment for deleting extension connector. Enviroment is alright.
清理所有组件文件及密钥文件 gs_om -t ec -m uninstall --all Starting to clean extension connector files. Successfully clean extension connector files. 清理指定组件文件 gs_om -t ec -m uninstall --target=odbc.ini Starting to clean extension connector files. Successfully clean extension connector files. 清理密钥文件 gs_om -t ec -m uninstall --key-files Starting to clean extension connector files. Successfully clean extension connector files. 清理指定组件文件和密钥文件 gs_om -t ec -m uninstall --key-files --target=odbc.ini Starting to clean extension connector files. Successfully clean extension connector files.
gs_om -t dailyAlarm -U omm
Start CheckMTU CheckMultiQueue and alarm.
Successfully CheckMTU CheckMultiQueue.
Get check results on all nodes.
Successfully get check results on all nodes.
Parse the check result.
Successfully parse the check result.
Analysis check results and alarm.gs_om -t compare-cluster --remote-host=linux-224 --remote-env-file='/home/omm/.bashrc'
Get remote host linux-224 GAUSSHOME env.
Copy node linux-224 cluster static config to the local.
Init remote cluster info.
Compare cluster configuration differences.
No difference in cluster topology.来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3163872/ ,如需转载,请注明出处,否则将追究法律责任。