ptk 安装mogdb和小版本升级
一、环境准备
节点类别 | 主机名 | IP | 端口 |
---|---|---|---|
主节点 | ptkmog1 | 192.168.3.63 | 15400 |
备节点1 | ptkmog2 | 192.168.3.64 | 15400 |
备节点2 | ptkmog3 | 192.168.3.65 | 15400 |
二、关闭防火墙和透明大页
1、修改操作系统配置
1) 关闭 SELINUX
修改 /etc/selinux/config文件中的“SELINUX”值为“disabled”
2) 关闭防火墙并禁止开机重启
systemctl disable firewalld.service
systemctl stop firewalld.service
3) 修改主机名
在每个服务器节点修改hostname,以主机为例:
hostnamectl set-hostname ptkmog1
另外两台备机分别设置为ptkmog2和ptkmog3
4) 关闭透明大页
echo never > /sys/kernel/mm/transparent_hugepage/enabled
三、安装操作系统依赖包
3.1配置yum,安装系统包
mount /dev/cdrom /media/cdrom
vi /etc/yum.repos.d/oracle.repo
[Server]
name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source
baseurl=file:///media/cdrom
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
yum install -y bzip2 libaio-devel flex bison ncurses-devel glibc-devel libxml2-devel patch redhat-lsb-core unzip gcc gcc-c++ perl openssl-devel libffi-devel libtool zlib-devel
yum install -y libaio-devel gcc gcc-c++ zlib-devel expect
3.2安装Python3(每个节点)root执行
# 解压并安装python3
[root@mogdb1 ~]# cd /enmo/soft
[root@mogdb1 soft]# tar -zxvf python3-rpm.tar.gz
# 配置yum源
[root@mogdb1 ~]# cat > /etc/yum.repos.d/enmo.repo << EOF
[Server]
name=Server
baseurl=file:///media/cdrom
enabled=yes
gpgcheck=0
[python3]
name=python3
baseurl=file:///enmo/soft/python3-rpm
enabled=yes
gpgcheck=0
EOF
# 执行yum安装
[root@mogdb1 ~]# yum clean all
[root@mogdb1 ~]# yum install python3 python3-devel -y
# 修改软链接
[root@mogdb1 ~]# rm -f /usr/bin/python
[root@mogdb1 ~]# ln -s /usr/bin/python3 /usr/bin/python
# 查看版本,确认安装成功
[root@mogdb1 ~]# python -V
Python 3.6.8
# 全词匹配替换,python3安装后’yum’命令执行会报错,需要修改以下配置
[root@mogdb1 ~]# sed -i "s:\<python\>:python2:g" /usr/bin/yum
[root@mogdb1 ~]# sed -i "s:\<python\>:python2:g" /usr/libexec/urlgrabber-ext-down
四、ptk安装(每个节点)root执行
[root@ptkmog1 ptk]# pwd
/opt/ptk
[root@ptkmog1 ptk]# wget https://cdn-mogdb.enmotech.com/ptk/latest/ptk_linux_x86_64.tar.gz
[root@ptkmog1 ptk]# tar xf ptk_linux_x86_64.tar.gz
[root@ptkmog1 ptk]# ls -l
[root@ptkmog1 opt]# ll
total 136040
-rw-r--r--. 1 root root 775 Apr 16 19:37 config.yaml
drwx------. 7 omm omm 63 Apr 16 19:38 mogdb
-rw-r--r--. 1 root root 139264406 Oct 11 2022 MogDB-3.0.1-CentOS-x86_64.tar.gz
drwxr-xr-x. 3 root root 110 Apr 16 16:52 ptk
[root@ptkmog1 opt]# ptk -v
PTK Version: v0.7.0 release
Go Version: go1.19.4
Build Date: 2023-04-14T23:27:12
Git Hash: 3bd0bad
[root@ptkmog1 opt]#
五、安装mogdb(仅主节点)root执行:
5.1 准备配置文件
global:
cluster_name: mogdb_cluster
user: omm
group: omm
base_dir: /opt/mogdb
db_servers:
- host: 192.168.3.63
db_port: 15400
role: primary
ssh_option:
port: 22
user: root
password: pTk6ZGFmMTk1Yjg8QD1CPUU/QnJ1VjhaVEliZEtvT0pXcnhEQk5WN2pnUHFDeXp3bGs1T09mSkRUdWtva00=
- host: 192.168.3.64
db_port: 15400
role: standby
ssh_option:
port: 22
user: root
password: pTk6ZGFmMTk1Yjg8QD1CPUU/QmVUTTJiUF9GT3BjNUN6bDc2QUNhWnlMOHkwRkRseE9NbWZFcjdTaVd2NkE=
- host: 192.168.3.65
db_port: 15400
role: standby
ssh_option:
port: 22
user: root
password: pTk6ZGFmMTk1Yjg8QD1CPUU/QmFqODVlNk9FMmFfaUxsQ3d0dmlZNkEtSU55dktHbjJOZDBXWUFheU9RTU0=
#####注意配置文件中的主机名和ip
5.2 检查环境
[root@ptkmog1 opt]# ptk checkos -f config.yaml
INFO[2023-04-16T19:32:19.704] prechecking dependent tools...
INFO[2023-04-16T19:32:19.855] [192.168.3.63][omm] kernel version: 3.10.0-957.el7.x86_64
INFO[2023-04-16T19:32:19.862] [192.168.3.64][omm] kernel version: 3.10.0-957.el7.x86_64
INFO[2023-04-16T19:32:19.863] [192.168.3.65][omm] kernel version: 3.10.0-957.el7.x86_64
INFO[2023-04-16T19:32:19.866] [192.168.3.63][omm] timezone: +0800
INFO[2023-04-16T19:32:19.875] [192.168.3.64][omm] timezone: +0800
INFO[2023-04-16T19:32:19.876] [192.168.3.65][omm] timezone: +0800
INFO[2023-04-16T19:32:19.879] [192.168.3.63][omm] swap memory 10485756kB, total memory 3880620kB
INFO[2023-04-16T19:32:19.887] [192.168.3.65][omm] swap memory 10485756kB, total memory 3880620kB
INFO[2023-04-16T19:32:19.887] [192.168.3.64][omm] swap memory 10485756kB, total memory 3880620kB
WARN[2023-04-16T19:32:19.916] [192.168.3.63][omm] net.ipv4.tcp_rmem=4096 87380 6291456, expect 8192 250000 16777216
WARN[2023-04-16T19:32:19.922] [192.168.3.63][omm] net.core.somaxconn=128, expect 65535
WARN[2023-04-16T19:32:19.927] [192.168.3.63][omm] vm.min_free_kbytes=67584, expect 194031
WARN[2023-04-16T19:32:19.935] [192.168.3.65][omm] net.ipv4.tcp_rmem=4096 87380 6291456, expect 8192 250000 16777216
WARN[2023-04-16T19:32:19.935] [192.168.3.64][omm] net.ipv4.tcp_tw_reuse=0, expect 1
WARN[2023-04-16T19:32:19.936] [192.168.3.63][omm] net.core.netdev_max_backlog=1000, expect 65535
WARN[2023-04-16T19:32:19.940] [192.168.3.63][omm] net.ipv4.tcp_tw_recycle=0, expect 1
WARN[2023-04-16T19:32:19.942] [192.168.3.63][omm] net.ipv4.tcp_retries1=3, expect 5
WARN[2023-04-16T19:32:19.944] [192.168.3.63][omm] net.ipv4.tcp_wmem=4096 16384 4194304, expect 8192 250000 16777216
WARN[2023-04-16T19:32:19.946] [192.168.3.63][omm] net.ipv4.tcp_syn_retries=6, expect 5
WARN[2023-04-16T19:32:19.950] [192.168.3.64][omm] net.ipv4.tcp_rmem=4096 87380 6291456, expect 8192 250000 16777216
WARN[2023-04-16T19:32:19.952] [192.168.3.63][omm] net.ipv4.tcp_tw_reuse=0, expect 1
WARN[2023-04-16T19:32:19.954] [192.168.3.63][omm] net.ipv4.tcp_keepalive_time=7200, expect 30
WARN[2023-04-16T19:32:19.956] [192.168.3.63][omm] net.ipv4.tcp_keepalive_intvl=75, expect 30
WARN[2023-04-16T19:32:19.958] [192.168.3.65][omm] net.ipv4.tcp_tw_reuse=0, expect 1
WARN[2023-04-16T19:32:19.958] [192.168.3.63][omm] net.ipv4.tcp_retries2=15, expect 12
WARN[2023-04-16T19:32:19.964] [192.168.3.63][omm] net.ipv4.tcp_max_syn_backlog=128, expect 65535
INFO[2023-04-16T19:32:19.971] [192.168.3.63][omm] check kernel.core_pattern
INFO[2023-04-16T19:32:19.974] [192.168.3.63][omm] check removeIPC value
WARN[2023-04-16T19:32:19.985] [192.168.3.64][omm] net.core.netdev_max_backlog=1000, expect 65535
WARN[2023-04-16T19:32:20.007] [192.168.3.65][omm] net.ipv4.tcp_wmem=4096 16384 4194304, expect 8192 250000 16777216
WARN[2023-04-16T19:32:20.027] [192.168.3.64][omm] net.ipv4.tcp_retries1=3, expect 5
WARN[2023-04-16T19:32:20.042] [192.168.3.65][omm] net.ipv4.tcp_keepalive_time=7200, expect 30
WARN[2023-04-16T19:32:20.064] [192.168.3.65][omm] net.ipv4.tcp_syn_retries=6, expect 5
WARN[2023-04-16T19:32:20.071] [192.168.3.65][omm] net.ipv4.tcp_keepalive_intvl=75, expect 30
WARN[2023-04-16T19:32:20.071] [192.168.3.64][omm] net.ipv4.tcp_keepalive_time=7200, expect 30
WARN[2023-04-16T19:32:20.078] [192.168.3.64][omm] net.ipv4.tcp_keepalive_intvl=75, expect 30
WARN[2023-04-16T19:32:20.092] [192.168.3.64][omm] net.ipv4.tcp_max_syn_backlog=128, expect 65535
WARN[2023-04-16T19:32:20.093] [192.168.3.65][omm] net.ipv4.tcp_tw_recycle=0, expect 1
WARN[2023-04-16T19:32:20.100] [192.168.3.65][omm] net.core.somaxconn=128, expect 65535
WARN[2023-04-16T19:32:20.100] [192.168.3.64][omm] net.core.somaxconn=128, expect 65535
WARN[2023-04-16T19:32:20.117] [192.168.3.65][omm] net.core.netdev_max_backlog=1000, expect 65535
WARN[2023-04-16T19:32:20.117] [192.168.3.64][omm] vm.min_free_kbytes=67584, expect 194031
WARN[2023-04-16T19:32:20.124] [192.168.3.64][omm] net.ipv4.tcp_wmem=4096 16384 4194304, expect 8192 250000 16777216
WARN[2023-04-16T19:32:20.131] [192.168.3.64][omm] net.ipv4.tcp_syn_retries=6, expect 5
WARN[2023-04-16T19:32:20.135] [192.168.3.65][omm] vm.min_free_kbytes=67584, expect 194031
WARN[2023-04-16T19:32:20.139] [192.168.3.64][omm] net.ipv4.tcp_tw_recycle=0, expect 1
WARN[2023-04-16T19:32:20.151] [192.168.3.65][omm] net.ipv4.tcp_retries1=3, expect 5
WARN[2023-04-16T19:32:20.158] [192.168.3.65][omm] net.ipv4.tcp_retries2=15, expect 12
WARN[2023-04-16T19:32:20.167] [192.168.3.64][omm] net.ipv4.tcp_retries2=15, expect 12
WARN[2023-04-16T19:32:20.167] [192.168.3.65][omm] net.ipv4.tcp_max_syn_backlog=128, expect 65535
INFO[2023-04-16T19:32:20.174] [192.168.3.64][omm] check kernel.core_pattern
INFO[2023-04-16T19:32:20.178] [192.168.3.65][omm] check kernel.core_pattern
INFO[2023-04-16T19:32:20.189] [192.168.3.64][omm] check removeIPC value
INFO[2023-04-16T19:32:20.194] [192.168.3.65][omm] check removeIPC value
WARN[2023-04-16T19:32:20.232] [192.168.3.63][omm] device(sda) 'IO Request'=128, expect 256
WARN[2023-04-16T19:32:20.232] [192.168.3.63][omm] device(sr0) 'IO Request'=128, expect 256
WARN[2023-04-16T19:32:20.240] [192.168.3.64][omm] device(sda) 'IO Request'=128, expect 256
WARN[2023-04-16T19:32:20.240] [192.168.3.64][omm] device(sr0) 'IO Request'=128, expect 256
WARN[2023-04-16T19:32:20.243] [192.168.3.65][omm] device(sda) 'IO Request'=128, expect 256
WARN[2023-04-16T19:32:20.243] [192.168.3.65][omm] device(sr0) 'IO Request'=128, expect 256
INFO[2023-04-16T19:32:25.868] [192.168.3.63][omm] locale: LANG=en_US.UTF-8
INFO[2023-04-16T19:32:25.878] [192.168.3.64][omm] locale: LANG=en_US.UTF-8
INFO[2023-04-16T19:32:25.886] [192.168.3.65][omm] locale: LANG=en_US.UTF-8
INFO[2023-04-16T19:32:25.896] [192.168.3.65][omm] check port 15400
INFO[2023-04-16T19:32:25.897] [192.168.3.63][omm] check port 15400
INFO[2023-04-16T19:32:25.901] [192.168.3.64][omm] check port 15400
INFO[2023-04-16T19:32:25.903] [192.168.3.63][omm] port 15400 is free
INFO[2023-04-16T19:32:25.937] [192.168.3.64][omm] port 15400 is free
INFO[2023-04-16T19:32:25.974] [192.168.3.65][omm] port 15400 is free
INFO[2023-04-16T19:32:25.974] [192.168.3.65][omm] platform: rhel_7.6_64bit
INFO[2023-04-16T19:32:25.974] [192.168.3.63][omm] platform: rhel_7.6_64bit
INFO[2023-04-16T19:32:25.974] [192.168.3.64][omm] platform: rhel_7.6_64bit
WARN[2023-04-16T19:32:25.977] [192.168.3.63][omm] device(/dev/sda) readahead value=8192, expect 16384.
WARN[2023-04-16T19:32:25.999] [192.168.3.64][omm] device(/dev/sda) readahead value=8192, expect 16384.
WARN[2023-04-16T19:32:26.007] [192.168.3.65][omm] device(/dev/sda) readahead value=8192, expect 16384.
INFO[2023-04-16T19:32:26.231] all checkers finished
INFO[2023-04-16T19:32:26.231] time elapsed: 6s
# Check Results
Item | Level
------------------------------------+----------
A1.Check_OS_Version | OK
A2.Check_Kernel_Version | OK
A3.Check_Unicode | OK
A4.Check_TimeZone | OK
A5.Check_Swap_Memory_Configure | Warning
A6.Check_SysCtl_Parameter | Warning
A7.Check_FileSystem_Configure | OK
A8.Check_Disk_Configure | OK
A9.Check_BlockDev_Configure | Warning
A9.Check_Logical_Block | OK
A10.Check_IO_Request | Warning
A10.Check_Asynchronous_IO_Request | OK
A10.Check_IO_Configure | OK
A11.Check_Network_Configure | OK
A12.Check_Time_Consistency | OK
A13.Check_Firewall_Status | OK
A14.Check_THP_Status | OK
A15.Check_Dependent_Package | OK
A16.Check_CPU_Instruction_Set | OK
A17.Check_Port | OK
A18.Check_Selinux | OK
A19.Check_User_Ulimit | OK
Total count 22, abnormal count 0, warning count 4
确保输出的检查结果均为 OK 或者 Warning 。
如果有 Abnormal 的检查项出现,PTK默认会自动生成一个 root_fix_os 前缀的 Shell 脚本,您可以通过执行该 Shell 脚本来尝试自动修复异常的检查项。
大部分情况下都是可以自动修复的,如果出现特殊情况,PTK 没有兼容到,需您根据日志提示手动修正。
5.3 执行安装
[root@ptkmog1 opt]# ptk install -f config.yaml --pkg ./MogDB-3.0.1-CentOS-x86_64.tar.gz
INFO[2023-04-16T19:37:30.183] PTK Version: 0.7.0 release
INFO[2023-04-16T19:37:30.184] load config from config.yaml
? If you continue to install the software,
you are accepting the license agreement of the software.
[Y]: Accept and continue
[C]: Show content of licence agreement
[N]: Abort installation and exit
Please enter (Default [Y]): y
Cluster Name: "mogdb_cluster"
+--------------+--------------+-------------+-------+---------+-----------------+----------+
| az(priority) | ip | user(group) | port | role | data dir | upstream |
+--------------+--------------+-------------+-------+---------+-----------------+----------+
| AZ1(1) | 192.168.3.63 | omm(omm) | 15400 | primary | /opt/mogdb/data | - |
| | 192.168.3.65 | omm(omm) | 15400 | standby | /opt/mogdb/data | - |
| | 192.168.3.64 | omm(omm) | 15400 | standby | /opt/mogdb/data | - |
+--------------+--------------+-------------+-------+---------+-----------------+----------+
? Is cluster config correct(default=N) Yes
INFO[2023-04-16T19:37:41.414] start check os ...
INFO[2023-04-16T19:37:41.453] prechecking dependent tools...
INFO[2023-04-16T19:37:41.556] [192.168.3.63][omm] locale: LANG=en_US.UTF-8
INFO[2023-04-16T19:37:41.563] [192.168.3.64][omm] locale: LANG=en_US.UTF-8
INFO[2023-04-16T19:37:41.565] [192.168.3.65][omm] locale: LANG=en_US.UTF-8
WARN[2023-04-16T19:37:41.586] [192.168.3.63][omm] device(/dev/sda) readahead value=8192, expect 16384.
WARN[2023-04-16T19:37:41.614] [192.168.3.64][omm] device(/dev/sda) readahead value=8192, expect 16384.
WARN[2023-04-16T19:37:41.615] [192.168.3.65][omm] device(/dev/sda) readahead value=8192, expect 16384.
INFO[2023-04-16T19:37:45.643] [192.168.3.63][omm] kernel version: 3.10.0-957.el7.x86_64
INFO[2023-04-16T19:37:45.649] [192.168.3.65][omm] kernel version: 3.10.0-957.el7.x86_64
INFO[2023-04-16T19:37:45.649] [192.168.3.64][omm] kernel version: 3.10.0-957.el7.x86_64
WARN[2023-04-16T19:37:45.653] [192.168.3.63][omm] device(sda) 'IO Request'=128, expect 256
WARN[2023-04-16T19:37:45.654] [192.168.3.63][omm] device(sr0) 'IO Request'=128, expect 256
WARN[2023-04-16T19:37:45.662] [192.168.3.65][omm] device(sda) 'IO Request'=128, expect 256
WARN[2023-04-16T19:37:45.662] [192.168.3.65][omm] device(sr0) 'IO Request'=128, expect 256
WARN[2023-04-16T19:37:45.663] [192.168.3.64][omm] device(sda) 'IO Request'=128, expect 256
WARN[2023-04-16T19:37:45.663] [192.168.3.64][omm] device(sr0) 'IO Request'=128, expect 256
WARN[2023-04-16T19:37:45.763] [192.168.3.63][omm] net.ipv4.tcp_keepalive_time=7200, expect 30
WARN[2023-04-16T19:37:45.766] [192.168.3.63][omm] net.ipv4.tcp_syn_retries=6, expect 5
WARN[2023-04-16T19:37:45.773] [192.168.3.63][omm] net.ipv4.tcp_retries2=15, expect 12
WARN[2023-04-16T19:37:45.777] [192.168.3.64][omm] net.ipv4.tcp_keepalive_time=7200, expect 30
WARN[2023-04-16T19:37:45.781] [192.168.3.63][omm] net.ipv4.tcp_wmem=4096 16384 4194304, expect 8192 250000 16777216
WARN[2023-04-16T19:37:45.783] [192.168.3.63][omm] net.ipv4.tcp_max_syn_backlog=128, expect 65535
WARN[2023-04-16T19:37:45.785] [192.168.3.63][omm] net.ipv4.tcp_retries1=3, expect 5
WARN[2023-04-16T19:37:45.787] [192.168.3.63][omm] net.ipv4.tcp_rmem=4096 87380 6291456, expect 8192 250000 16777216
WARN[2023-04-16T19:37:45.794] [192.168.3.63][omm] vm.min_free_kbytes=67584, expect 194031
WARN[2023-04-16T19:37:45.796] [192.168.3.64][omm] net.ipv4.tcp_retries1=3, expect 5
WARN[2023-04-16T19:37:45.800] [192.168.3.63][omm] net.ipv4.tcp_tw_reuse=0, expect 1
WARN[2023-04-16T19:37:45.807] [192.168.3.63][omm] net.ipv4.tcp_tw_recycle=0, expect 1
WARN[2023-04-16T19:37:45.809] [192.168.3.63][omm] net.ipv4.tcp_keepalive_intvl=75, expect 30
WARN[2023-04-16T19:37:45.811] [192.168.3.63][omm] net.core.netdev_max_backlog=1000, expect 65535
WARN[2023-04-16T19:37:45.815] [192.168.3.65][omm] net.ipv4.tcp_tw_reuse=0, expect 1
WARN[2023-04-16T19:37:45.818] [192.168.3.63][omm] net.core.somaxconn=128, expect 65535
INFO[2023-04-16T19:37:45.820] [192.168.3.63][omm] check kernel.core_pattern
INFO[2023-04-16T19:37:45.824] [192.168.3.63][omm] check removeIPC value
WARN[2023-04-16T19:37:45.834] [192.168.3.64][omm] net.ipv4.tcp_wmem=4096 16384 4194304, expect 8192 250000 16777216
WARN[2023-04-16T19:37:45.834] [192.168.3.65][omm] net.ipv4.tcp_tw_recycle=0, expect 1
WARN[2023-04-16T19:37:45.841] [192.168.3.64][omm] net.core.somaxconn=128, expect 65535
WARN[2023-04-16T19:37:45.849] [192.168.3.65][omm] net.core.netdev_max_backlog=1000, expect 65535
WARN[2023-04-16T19:37:45.854] [192.168.3.64][omm] net.ipv4.tcp_tw_reuse=0, expect 1
WARN[2023-04-16T19:37:45.861] [192.168.3.64][omm] net.ipv4.tcp_syn_retries=6, expect 5
WARN[2023-04-16T19:37:45.863] [192.168.3.65][omm] net.ipv4.tcp_keepalive_time=7200, expect 30
WARN[2023-04-16T19:37:45.876] [192.168.3.64][omm] vm.min_free_kbytes=67584, expect 194031
WARN[2023-04-16T19:37:45.884] [192.168.3.65][omm] net.ipv4.tcp_keepalive_intvl=75, expect 30
WARN[2023-04-16T19:37:45.891] [192.168.3.65][omm] net.core.somaxconn=128, expect 65535
WARN[2023-04-16T19:37:45.897] [192.168.3.64][omm] net.ipv4.tcp_tw_recycle=0, expect 1
WARN[2023-04-16T19:37:45.905] [192.168.3.65][omm] vm.min_free_kbytes=67584, expect 194031
WARN[2023-04-16T19:37:45.935] [192.168.3.65][omm] net.ipv4.tcp_retries2=15, expect 12
WARN[2023-04-16T19:37:45.942] [192.168.3.65][omm] net.ipv4.tcp_max_syn_backlog=128, expect 65535
WARN[2023-04-16T19:37:45.953] [192.168.3.64][omm] net.ipv4.tcp_rmem=4096 87380 6291456, expect 8192 250000 16777216
WARN[2023-04-16T19:37:45.979] [192.168.3.64][omm] net.ipv4.tcp_max_syn_backlog=128, expect 65535
WARN[2023-04-16T19:37:45.983] [192.168.3.65][omm] net.ipv4.tcp_retries1=3, expect 5
WARN[2023-04-16T19:37:45.999] [192.168.3.64][omm] net.core.netdev_max_backlog=1000, expect 65535
WARN[2023-04-16T19:37:46.006] [192.168.3.64][omm] net.ipv4.tcp_keepalive_intvl=75, expect 30
WARN[2023-04-16T19:37:46.013] [192.168.3.65][omm] net.ipv4.tcp_rmem=4096 87380 6291456, expect 8192 250000 16777216
WARN[2023-04-16T19:37:46.019] [192.168.3.65][omm] net.ipv4.tcp_wmem=4096 16384 4194304, expect 8192 250000 16777216
WARN[2023-04-16T19:37:46.019] [192.168.3.64][omm] net.ipv4.tcp_retries2=15, expect 12
INFO[2023-04-16T19:37:46.019] [192.168.3.64][omm] check kernel.core_pattern
WARN[2023-04-16T19:37:46.026] [192.168.3.65][omm] net.ipv4.tcp_syn_retries=6, expect 5
INFO[2023-04-16T19:37:46.026] [192.168.3.65][omm] check kernel.core_pattern
INFO[2023-04-16T19:37:46.033] [192.168.3.64][omm] check removeIPC value
INFO[2023-04-16T19:37:46.040] [192.168.3.65][omm] check removeIPC value
INFO[2023-04-16T19:37:46.050] [192.168.3.63][omm] swap memory 10485756kB, total memory 3880620kB
INFO[2023-04-16T19:37:46.058] [192.168.3.64][omm] swap memory 10485756kB, total memory 3880620kB
INFO[2023-04-16T19:37:46.058] [192.168.3.65][omm] swap memory 10485756kB, total memory 3880620kB
INFO[2023-04-16T19:37:46.058] [192.168.3.65][omm] check port 15400
INFO[2023-04-16T19:37:46.059] [192.168.3.63][omm] check port 15400
INFO[2023-04-16T19:37:46.063] [192.168.3.64][omm] check port 15400
INFO[2023-04-16T19:37:46.065] [192.168.3.63][omm] port 15400 is free
INFO[2023-04-16T19:37:46.098] [192.168.3.65][omm] port 15400 is free
INFO[2023-04-16T19:37:46.099] [192.168.3.64][omm] port 15400 is free
INFO[2023-04-16T19:37:46.102] [192.168.3.63][omm] timezone: +0800
INFO[2023-04-16T19:37:46.110] [192.168.3.64][omm] timezone: +0800
INFO[2023-04-16T19:37:46.110] [192.168.3.65][omm] timezone: +0800
INFO[2023-04-16T19:37:46.138] [192.168.3.65][omm] platform: rhel_7.6_64bit
INFO[2023-04-16T19:37:46.138] [192.168.3.63][omm] platform: rhel_7.6_64bit
INFO[2023-04-16T19:37:46.138] [192.168.3.64][omm] platform: rhel_7.6_64bit
INFO[2023-04-16T19:37:46.138] all checkers finished
INFO[2023-04-16T19:37:46.138] time elapsed: 5s
INFO[2023-04-16T19:37:46.138] check os success
INFO[2023-04-16T19:37:46.138] start check distro ...
INFO[2023-04-16T19:37:46.138] check distro success
INFO[2023-04-16T19:37:46.138] start check user ...
INFO[2023-04-16T19:37:46.148] check user success
INFO[2023-04-16T19:37:46.148] start check port ...
INFO[2023-04-16T19:37:46.218] check port success
INFO[2023-04-16T19:37:46.218] [192.168.3.63][omm] create os user omm, group omm
INFO[2023-04-16T19:37:46.221] [192.168.3.65][omm] create os user omm, group omm
INFO[2023-04-16T19:37:46.221] [192.168.3.64][omm] create os user omm, group omm
INFO[2023-04-16T19:37:46.657] [192.168.3.65][omm] set ulimit configs
INFO[2023-04-16T19:37:46.680] [192.168.3.65][omm] make user omm's dir(s): /opt/mogdb
INFO[2023-04-16T19:37:46.691] [192.168.3.63][omm] set ulimit configs
INFO[2023-04-16T19:37:46.693] [192.168.3.63][omm] make user omm's dir(s): /opt/mogdb
INFO[2023-04-16T19:37:46.754] [192.168.3.64][omm] set ulimit configs
INFO[2023-04-16T19:37:46.770] [192.168.3.64][omm] make user omm's dir(s): /opt/mogdb
INFO[2023-04-16T19:37:47.319] start prepare installation package ...
INFO[2023-04-16T19:37:47.320] installation package is ready
INFO[2023-04-16T19:37:47.320] start validate installation package ...
INFO[2023-04-16T19:37:49.719] db product: MogDB, version: 3.0.1, number: 92.605, commit_id: 1a363ea9
INFO[2023-04-16T19:37:49.719] validate installation package success
INFO[2023-04-16T19:37:49.719] start complete the configuration ...
? Please enter db password (8~15 characters, 3 classes): [/ for help] ***********
? Retype db password: ***********
INFO[2023-04-16T19:38:19.006] complete the configuration success
INFO[2023-04-16T19:38:19.007] start distribute installation package ...
> upload MogDB-3.0.1-CentOS-x...: 132.81 MiB / 132.81 MiB [---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 73.28 MiB p/s 2.0s
> upload MogDB-3.0.1-CentOS-x...: 132.81 MiB / 132.81 MiB [---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 73.28 MiB p/s 2.0s
> upload MogDB-3.0.1-CentOS-x...: 132.81 MiB / 132.81 MiB [---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 100.00% 73.28 MiB p/s 2.0s
INFO[2023-04-16T19:38:21.054] distrubite packages success
INFO[2023-04-16T19:38:21.054] start setup db ...
INFO[2023-04-16T19:38:21.065] [192.168.3.64][omm] total memory(3GB) is less than 4GB, use default db config
INFO[2023-04-16T19:38:21.066] [192.168.3.64][omm] set user omm profiles
INFO[2023-04-16T19:38:21.068] [192.168.3.65][omm] total memory(3GB) is less than 4GB, use default db config
INFO[2023-04-16T19:38:21.068] [192.168.3.65][omm] set user omm profiles
INFO[2023-04-16T19:38:21.071] [192.168.3.63][omm] total memory(3GB) is less than 4GB, use default db config
INFO[2023-04-16T19:38:21.071] [192.168.3.63][omm] set user omm profiles
INFO[2023-04-16T19:38:21.125] [192.168.3.63][omm] make user omm's dir(s): /opt/mogdb/tool,/opt/mogdb/tool/ptk_tool/bin
INFO[2023-04-16T19:38:21.126] [192.168.3.65][omm] make user omm's dir(s): /opt/mogdb/tool,/opt/mogdb/tool/ptk_tool/bin
INFO[2023-04-16T19:38:21.129] [192.168.3.64][omm] make user omm's dir(s): /opt/mogdb/tool,/opt/mogdb/tool/ptk_tool/bin
INFO[2023-04-16T19:38:21.205] [192.168.3.63][omm] extract MogDB-3.0.1-CentOS-x86_64.tar.gz to dir /opt/mogdb/tool
INFO[2023-04-16T19:38:21.209] [192.168.3.64][omm] extract MogDB-3.0.1-CentOS-x86_64.tar.gz to dir /opt/mogdb/tool
INFO[2023-04-16T19:38:21.210] [192.168.3.65][omm] extract MogDB-3.0.1-CentOS-x86_64.tar.gz to dir /opt/mogdb/tool
INFO[2023-04-16T19:38:22.323] [192.168.3.63][omm] extract MogDB-3.0.1-CentOS-64bit-om.tar.gz to dir /opt/mogdb/tool
INFO[2023-04-16T19:38:22.364] [192.168.3.64][omm] extract MogDB-3.0.1-CentOS-64bit-om.tar.gz to dir /opt/mogdb/tool
INFO[2023-04-16T19:38:22.449] [192.168.3.65][omm] extract MogDB-3.0.1-CentOS-64bit-om.tar.gz to dir /opt/mogdb/tool
INFO[2023-04-16T19:38:22.812] [192.168.3.63][omm] try to fix psutil python lib
INFO[2023-04-16T19:38:22.844] [192.168.3.63][omm] write file /opt/mogdb/tool/ptk_tool/bin/README.md
INFO[2023-04-16T19:38:22.867] [192.168.3.64][omm] try to fix psutil python lib
INFO[2023-04-16T19:38:22.872] [192.168.3.63][omm] write file /opt/mogdb/tool/ptk_tool/bin/pscp
INFO[2023-04-16T19:38:22.900] [192.168.3.64][omm] write file /opt/mogdb/tool/ptk_tool/bin/README.md
INFO[2023-04-16T19:38:22.907] [192.168.3.63][omm] write file /opt/mogdb/tool/ptk_tool/bin/pssh
INFO[2023-04-16T19:38:22.934] [192.168.3.64][omm] write file /opt/mogdb/tool/ptk_tool/bin/pscp
INFO[2023-04-16T19:38:22.936] [192.168.3.63][omm] write file /opt/mogdb/tool/ptk_tool/bin/task_pool.py
INFO[2023-04-16T19:38:22.966] [192.168.3.65][omm] try to fix psutil python lib
INFO[2023-04-16T19:38:22.970] [192.168.3.63][omm] change /opt/mogdb/tool owner to omm
INFO[2023-04-16T19:38:22.970] [192.168.3.64][omm] write file /opt/mogdb/tool/ptk_tool/bin/pssh
INFO[2023-04-16T19:38:22.983] [192.168.3.63][omm] make user omm's dir(s): /opt/mogdb/app
INFO[2023-04-16T19:38:23.001] [192.168.3.65][omm] write file /opt/mogdb/tool/ptk_tool/bin/README.md
INFO[2023-04-16T19:38:23.005] [192.168.3.64][omm] write file /opt/mogdb/tool/ptk_tool/bin/task_pool.py
INFO[2023-04-16T19:38:23.017] [192.168.3.63][omm] extract MogDB-3.0.1-CentOS-64bit.tar.gz to dir /opt/mogdb/app
INFO[2023-04-16T19:38:23.039] [192.168.3.65][omm] write file /opt/mogdb/tool/ptk_tool/bin/pscp
INFO[2023-04-16T19:38:23.052] [192.168.3.64][omm] change /opt/mogdb/tool owner to omm
INFO[2023-04-16T19:38:23.064] [192.168.3.64][omm] make user omm's dir(s): /opt/mogdb/app
INFO[2023-04-16T19:38:23.075] [192.168.3.65][omm] write file /opt/mogdb/tool/ptk_tool/bin/pssh
INFO[2023-04-16T19:38:23.094] [192.168.3.64][omm] extract MogDB-3.0.1-CentOS-64bit.tar.gz to dir /opt/mogdb/app
INFO[2023-04-16T19:38:23.115] [192.168.3.65][omm] write file /opt/mogdb/tool/ptk_tool/bin/task_pool.py
INFO[2023-04-16T19:38:23.171] [192.168.3.65][omm] change /opt/mogdb/tool owner to omm
INFO[2023-04-16T19:38:23.183] [192.168.3.65][omm] make user omm's dir(s): /opt/mogdb/app
INFO[2023-04-16T19:38:23.216] [192.168.3.65][omm] extract MogDB-3.0.1-CentOS-64bit.tar.gz to dir /opt/mogdb/app
INFO[2023-04-16T19:38:26.222] [192.168.3.63][omm] change /opt/mogdb/app owner to omm
INFO[2023-04-16T19:38:26.234] [192.168.3.63][omm] validate and try to fix ld library for gs_initdb
INFO[2023-04-16T19:38:26.245] [192.168.3.63][omm] validate and try to fix ld library for mogdb
INFO[2023-04-16T19:38:26.370] [192.168.3.64][omm] change /opt/mogdb/app owner to omm
INFO[2023-04-16T19:38:26.384] [192.168.3.64][omm] validate and try to fix ld library for gs_initdb
INFO[2023-04-16T19:38:26.398] [192.168.3.64][omm] validate and try to fix ld library for mogdb
INFO[2023-04-16T19:38:26.684] [192.168.3.65][omm] change /opt/mogdb/app owner to omm
INFO[2023-04-16T19:38:26.695] [192.168.3.65][omm] validate and try to fix ld library for gs_initdb
INFO[2023-04-16T19:38:26.707] [192.168.3.65][omm] validate and try to fix ld library for mogdb
INFO[2023-04-16T19:38:28.108] [192.168.3.64][omm] change /opt/mogdb/app owner to omm
INFO[2023-04-16T19:38:28.122] [192.168.3.64][omm] make user omm's dir(s): /opt/mogdb/log/gs_profile,/opt/mogdb/log/pg_log,/opt/mogdb/log/pg_audit,/opt/mogdb/log/bin,/opt/mogdb/log/pg_log/dn_6002,/opt/mogdb/log/pg_audit/dn_6002
INFO[2023-04-16T19:38:28.341] [192.168.3.64][omm] make user omm's dir(s): /opt/mogdb/tmp
INFO[2023-04-16T19:38:28.367] [192.168.3.64][omm] save version to upgrade_version
INFO[2023-04-16T19:38:28.403] [192.168.3.64][omm] create file cluster_manual_start
INFO[2023-04-16T19:38:28.411] [192.168.3.64][omm] generate cluster_static_config file
INFO[2023-04-16T19:38:28.432] [192.168.3.64][omm] change /opt/mogdb/app/bin/cluster_static_config owner to omm
INFO[2023-04-16T19:38:28.441] [192.168.3.64][omm] make user omm's dir(s): /opt/mogdb/data
INFO[2023-04-16T19:38:28.467] [192.168.3.64][omm] change /opt/mogdb/data owner to omm
INFO[2023-04-16T19:38:28.474] [192.168.3.64][omm] the database is initializing, please wait a few minutes
INFO[2023-04-16T19:38:31.993] [192.168.3.63][omm] change /opt/mogdb/app owner to omm
INFO[2023-04-16T19:38:32.006] [192.168.3.63][omm] make user omm's dir(s): /opt/mogdb/log/gs_profile,/opt/mogdb/log/pg_log,/opt/mogdb/log/pg_audit,/opt/mogdb/log/bin,/opt/mogdb/log/pg_log/dn_6001,/opt/mogdb/log/pg_audit/dn_6001
INFO[2023-04-16T19:38:32.188] [192.168.3.65][omm] change /opt/mogdb/app owner to omm
INFO[2023-04-16T19:38:32.201] [192.168.3.65][omm] make user omm's dir(s): /opt/mogdb/log/gs_profile,/opt/mogdb/log/pg_log,/opt/mogdb/log/pg_audit,/opt/mogdb/log/bin,/opt/mogdb/log/pg_log/dn_6003,/opt/mogdb/log/pg_audit/dn_6003
INFO[2023-04-16T19:38:32.221] [192.168.3.63][omm] make user omm's dir(s): /opt/mogdb/tmp
INFO[2023-04-16T19:38:32.246] [192.168.3.63][omm] save version to upgrade_version
INFO[2023-04-16T19:38:32.285] [192.168.3.63][omm] create file cluster_manual_start
INFO[2023-04-16T19:38:32.293] [192.168.3.63][omm] generate cluster_static_config file
INFO[2023-04-16T19:38:32.304] [192.168.3.63][omm] change /opt/mogdb/app/bin/cluster_static_config owner to omm
INFO[2023-04-16T19:38:32.312] [192.168.3.63][omm] make user omm's dir(s): /opt/mogdb/data
INFO[2023-04-16T19:38:32.339] [192.168.3.63][omm] change /opt/mogdb/data owner to omm
INFO[2023-04-16T19:38:32.348] [192.168.3.63][omm] the database is initializing, please wait a few minutes
INFO[2023-04-16T19:38:32.529] [192.168.3.65][omm] make user omm's dir(s): /opt/mogdb/tmp
INFO[2023-04-16T19:38:32.557] [192.168.3.65][omm] save version to upgrade_version
INFO[2023-04-16T19:38:32.595] [192.168.3.65][omm] create file cluster_manual_start
INFO[2023-04-16T19:38:32.603] [192.168.3.65][omm] generate cluster_static_config file
INFO[2023-04-16T19:38:32.617] [192.168.3.65][omm] change /opt/mogdb/app/bin/cluster_static_config owner to omm
INFO[2023-04-16T19:38:32.625] [192.168.3.65][omm] make user omm's dir(s): /opt/mogdb/data
INFO[2023-04-16T19:38:32.649] [192.168.3.65][omm] change /opt/mogdb/data owner to omm
INFO[2023-04-16T19:38:32.658] [192.168.3.65][omm] the database is initializing, please wait a few minutes
INFO[2023-04-16T19:39:24.051] [192.168.3.64][omm] config postgresql.conf
INFO[2023-04-16T19:39:24.079] [192.168.3.64][omm] config pg_hba.conf
INFO[2023-04-16T19:39:24.787] [192.168.3.65][omm] config postgresql.conf
INFO[2023-04-16T19:39:24.835] [192.168.3.65][omm] config pg_hba.conf
INFO[2023-04-16T19:39:25.307] [192.168.3.63][omm] config postgresql.conf
INFO[2023-04-16T19:39:25.359] [192.168.3.63][omm] config pg_hba.conf
INFO[2023-04-16T19:39:25.419] setup db success
INFO[2023-04-16T19:39:25.419] generate certification files
INFO[2023-04-16T19:39:25.688] download certification files
INFO[2023-04-16T19:39:25.876] upload certification files to (192.168.3.64,omm)
INFO[2023-04-16T19:39:26.029] upload certification files to (192.168.3.65,omm)
INFO[2023-04-16T19:39:26.202] certification files setup success
INFO[2023-04-16T19:39:26.202] start build ssh trust ...
INFO[2023-04-16T19:39:26.397] ssh trust build success
INFO[2023-04-16T19:39:26.398] start launch db ...
INFO[2023-04-16T19:39:26.398] [192.168.3.63][omm] start db by gs_ctl ...
INFO[2023-04-16T19:39:26.398] [192.168.3.63][omm] the database is starting, please wait a few minutes
INFO[2023-04-16T19:39:26.398] [192.168.3.65][omm] start db by gs_ctl ...
INFO[2023-04-16T19:39:26.398] [192.168.3.65][omm] the database is starting, please wait a few minutes
INFO[2023-04-16T19:39:26.398] [192.168.3.64][omm] start db by gs_ctl ...
INFO[2023-04-16T19:39:26.398] [192.168.3.64][omm] the database is starting, please wait a few minutes
INFO[2023-04-16T19:39:27.512] [192.168.3.64][omm] start db success
INFO[2023-04-16T19:39:27.528] [192.168.3.65][omm] start db success
INFO[2023-04-16T19:39:27.752] [192.168.3.63][omm] start db success
INFO[2023-04-16T19:39:28.753] [192.168.3.63][omm] start alter db initial password ...
INFO[2023-04-16T19:39:28.816] [192.168.3.63][omm] alter db password success
INFO[2023-04-16T19:39:28.816] build standbys ...
INFO[2023-04-16T19:39:28.816] [192.168.3.65][omm] start build db ...
INFO[2023-04-16T19:39:28.816] [192.168.3.65][omm] the database is building from upstream, please wait a few minutes
INFO[2023-04-16T19:39:28.816] [192.168.3.64][omm] start build db ...
INFO[2023-04-16T19:39:28.816] [192.168.3.64][omm] the database is building from upstream, please wait a few minutes
INFO[2023-04-16T19:39:53.504] [192.168.3.64][omm] build db success
INFO[2023-04-16T19:39:54.015] [192.168.3.65][omm] build db success
INFO[2023-04-16T19:39:54.015] standbys build success
INFO[2023-04-16T19:39:54.015] launch db success
INFO[2023-04-16T19:39:54.015] clear temp dirs ...
INFO[2023-04-16T19:39:54.040] clear temp dirs success
INFO[2023-04-16T19:39:54.040] time elapsed: 2m18s
cluste_name | host | user | port | status | message
----------------+--------------+------+-------+---------------+----------
mogdb_cluster | 192.168.3.63 | omm | 15400 | start_success | success
| 192.168.3.64 | omm | 15400 | start_success | success
| 192.168.3.65 | omm | 15400 | start_success | success
六、安装验证
安装完成后,可使用omm用户通过“gsql -d postgres -p 26000 -r”命令连接MogDB数据库,其中“-p 26000”为数据库端口号,请根据实际情况替换。键入“\copyright”可查看版权信息
bash: gsql: command not found...
[root@ptkmog1 opt]# su - omm
[omm@ptkmog1 ~]$ gsql -d postgres -p 15400 -r
gsql ((MogDB 3.0.1 build 1a363ea9) compiled at 2022-08-05 17:31:04 commit 0 last mr )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.
MogDB=# \copyright
MogDB Database Management System
Copyright (c) Yunhe Enmo (Beijing) Information Technology Co., Ltd. Copyright 2020 , All rights reserved.
MogDB=# \q
七、状态检查
[root@ptkmog1 ~]# ptk cluster status --all
==================== cluster: "mogdb_cluster" status ====================
[ Cluster State ]
cluster_name : mogdb_cluster
cluster_state : Normal
database_version : MogDB 3.0.1 (build 1a363ea9)
[ Datanode State ]
cluster_name | id | ip | port | user | nodename | db_role | state | upstream
----------------+------+--------------+-------+------+----------+---------+--------+-----------
mogdb_cluster | 6001 | 192.168.3.63 | 15400 | omm | dn_6001 | primary | Normal | -
| 6002 | 192.168.3.64 | 15400 | omm | dn_6002 | standby | Normal | -
| 6003 | 192.168.3.65 | 15400 | omm | dn_6003 | standby | Normal | -
[root@ptkmog1 ~]#
八、 安装遇到的问题
8.1 少包 numactl
下载的地址
https://centos.pkgs.org/7/centos-x86_64/numactl-2.0.12-5.el7.x86_64.rpm.html
[root@ptkmog1 opt]# ls
config.yaml MogDB-3.0.1-CentOS-x86_64.tar.gz ptk rh root_fix_os.2023.0416.181908.sh
[root@ptkmog1 opt]# bash root_fix_os.2023.0416.181908.sh
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package numactl.x86_64 0:2.0.9-7.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================================================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================================================================================================================================================================
Installing:
numactl x86_64 2.0.9-7.el7 Server 66 k
Transaction Summary
============================================================================================================================================================================================================================================================================================================
Install 1 Package
Total download size: 66 k
Installed size: 141 k
Downloading packages:
Error downloading packages:
numactl-2.0.9-7.el7.x86_64: [Errno 256] No more mirrors to try.
8.2 配置文件 密码加密
[root@ptkmog2 ~]# ptk encrypt 123123
123123: pTk6ZGFmMTk1Yjg8QD1CPUU/QmVUTTJiUF9GT3BjNUN6bDc2QUNhWnlMOHkwRkRseE9NbWZFcjdTaVd2NkE=
[root@ptkmog2 ~]#
九、升级(每个节点)omm执行
su - omm
gs_ctl stop
mkdir -p /opt/mogdb304
tar -xvf MogDB-3.0.4-CentOS-x86_64.tar.gz -C /opt/mogdb304/
[omm@ptkmog3 opt]$ cd mogdb304/
[omm@ptkmog3 mogdb304]$ ll
total 138032
-rw-------. 1 omm omm 65 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-cm.sha256
-rw-------. 1 omm omm 6416169 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-cm.tar.gz
-rw-------. 1 omm omm 5077926 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-Libpq.tar.gz
-rw-------. 1 omm omm 65 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-om.sha256
-rw-------. 1 omm omm 14167831 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-om.tar.gz
-rw-------. 1 omm omm 65 Mar 3 19:09 MogDB-3.0.4-CentOS-64bit.sha256
-rw-------. 1 omm omm 107212757 Mar 3 19:09 MogDB-3.0.4-CentOS-64bit.tar.gz
-rw-------. 1 omm omm 8034026 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-tools.tar.gz
-rw-------. 1 omm omm 65 Mar 3 19:10 upgrade_sql.sha256
-rw-------. 1 omm omm 410646 Mar 3 19:10 upgrade_sql.tar.gz
drwxr-xr-x. 2 root root 6 Jun 18 2018 rh
[omm@ptkmog3 opt]$ cd mogdb304
[omm@ptkmog3 mogdb304]$ ll
total 138032
-rw-------. 1 omm omm 65 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-cm.sha256
-rw-------. 1 omm omm 6416169 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-cm.tar.gz
-rw-------. 1 omm omm 5077926 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-Libpq.tar.gz
-rw-------. 1 omm omm 65 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-om.sha256
-rw-------. 1 omm omm 14167831 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-om.tar.gz
-rw-------. 1 omm omm 65 Mar 3 19:09 MogDB-3.0.4-CentOS-64bit.sha256
-rw-------. 1 omm omm 107212757 Mar 3 19:09 MogDB-3.0.4-CentOS-64bit.tar.gz
-rw-------. 1 omm omm 8034026 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-tools.tar.gz
-rw-------. 1 omm omm 65 Mar 3 19:10 upgrade_sql.sha256
-rw-------. 1 omm omm 410646 Mar 3 19:10 upgrade_sql.tar.gz
[omm@ptkmog3 mogdb304]$
[omm@ptkmog3 mogdb304]$
[omm@ptkmog3 mogdb304]$
[omm@ptkmog3 mogdb304]$ tar -xvf MogDB-3.0.4-CentOS-64bit.tar.gz
./bin/
./bin/kadmind
./bin/mogdb
./bin/cluster_guc.conf
./bin/retry_errcodes.conf
./bin/pg_recvlogical
./bin/gs_dbmind
./bin/encrypt
./bin/gs_ctl
./bin/gsql
./bin/gstrace
./bin/gs_tar
./bin/gs_restore
./bin/lz4
./bin/kinit
./bin/klist
./bin/alarmItem.conf
./bin/pg_config
./bin/dbmind/
./bin/dbmind/ai_server/
./bin/dbmind/ai_server/main.py
./bin/dbmind/__init__.py
./bin/dbmind/app/
./bin/dbmind/app/__init__.py
./bin/dbmind/app/healing/
./bin/dbmind/app/healing/.gitkeep
./bin/dbmind/app/monitoring/
./bin/dbmind/app/monitoring/__init__.py
./bin/dbmind/app/diagnosis/
./bin/dbmind/app/diagnosis/__init__.py
./bin/dbmind/app/diagnosis/system/
./bin/dbmind/app/diagnosis/system/__init__.py
./bin/dbmind/app/diagnosis/query/
./bin/dbmind/app/diagnosis/query/__init__.py
./bin/dbmind/app/diagnosis/query/slow_sql/
./bin/dbmind/app/diagnosis/query/slow_sql/query_info_source.py
./bin/dbmind/app/diagnosis/query/slow_sql/__init__.py
./bin/dbmind/app/diagnosis/query/slow_sql/analyzer.py
./bin/dbmind/app/diagnosis/query/slow_sql/significance_detection/
./bin/dbmind/app/diagnosis/query/slow_sql/significance_detection/__init__.py
./bin/dbmind/app/diagnosis/query/slow_sql/significance_detection/sum_base.py
./bin/dbmind/app/diagnosis/query/slow_sql/significance_detection/ks_base.py
./bin/dbmind/app/diagnosis/query/slow_sql/significance_detection/average_base.py
./bin/dbmind/app/diagnosis/query/slow_sql/query_feature.py
./bin/dbmind/app/diagnosis/query/slow_sql/featurelib/
./bin/dbmind/app/diagnosis/query/slow_sql/featurelib/features.py
./bin/dbmind/app/diagnosis/query/slow_sql/featurelib/__init__.py
./bin/dbmind/app/diagnosis/query/slow_sql/featurelib/feature_mapping.py
./bin/dbmind/app/diagnosis/query/slow_sql/featurelib/feature_model.py
./bin/dbmind/app/diagnosis/cluster/
./bin/dbmind/app/diagnosis/cluster/__init__.py
./bin/dbmind/app/diagnosis/cluster/entry.py
./bin/dbmind/app/timed_app.py
./bin/dbmind/common/
./bin/dbmind/common/__init__.py
./bin/dbmind/common/exceptions.py
./bin/dbmind/common/daemon.py
./bin/dbmind/common/process.py
./bin/dbmind/common/dispatcher/
./bin/dbmind/common/dispatcher/__init__.py
./bin/dbmind/common/dispatcher/task_scheduler.py
./bin/dbmind/common/dispatcher/task_worker.py
./bin/dbmind/common/parser/
./bin/dbmind/common/parser/__init__.py
./bin/dbmind/common/parser/sql_parsing.py
./bin/dbmind/common/parser/plan_parsing.py
./bin/dbmind/common/algorithm/
./bin/dbmind/common/algorithm/__init__.py
./bin/dbmind/common/algorithm/forecasting/
./bin/dbmind/common/algorithm/forecasting/__init__.py
./bin/dbmind/common/algorithm/forecasting/forcasting_algorithm.py
./bin/dbmind/common/algorithm/forecasting/arima_model/
./bin/dbmind/common/algorithm/forecasting/arima_model/__init__.py
./bin/dbmind/common/algorithm/forecasting/arima_model/arima_common.py
./bin/dbmind/common/algorithm/forecasting/arima_model/arima_alg.py
./bin/dbmind/common/algorithm/forecasting/simple_forecasting.py
./bin/dbmind/common/algorithm/ml/
./bin/dbmind/common/algorithm/ml/__init__.py
./bin/dbmind/common/algorithm/ml/supervised.py
./bin/dbmind/common/algorithm/ml/metric.py
./bin/dbmind/common/algorithm/statistics.py
./bin/dbmind/common/algorithm/seasonal.py
./bin/dbmind/common/algorithm/basic.py
./bin/dbmind/common/platform/
./bin/dbmind/common/platform/__init__.py
./bin/dbmind/common/platform/_win32.py
./bin/dbmind/common/either.py
./bin/dbmind/common/types/
./bin/dbmind/common/types/__init__.py
./bin/dbmind/common/types/alarm.py
./bin/dbmind/common/types/enumerations.py
./bin/dbmind/common/types/root_cause.py
./bin/dbmind/common/types/sequence.py
./bin/dbmind/common/types/misc.py
./bin/dbmind/common/utils.py
./bin/dbmind/common/http/
./bin/dbmind/common/http/__init__.py
./bin/dbmind/common/http/controller_aop.py
./bin/dbmind/common/http/http_service.py
./bin/dbmind/common/tsdb/
./bin/dbmind/common/tsdb/__init__.py
./bin/dbmind/common/tsdb/opentsdb_client.py
./bin/dbmind/common/tsdb/tsdb_client.py
./bin/dbmind/common/tsdb/prometheus_client.py
./bin/dbmind/common/tsdb/influxdb_client.py
./bin/dbmind/common/tsdb/tsdb_client_factory.py
./bin/dbmind/common/security.py
./bin/dbmind/service/
./bin/dbmind/service/__init__.py
./bin/dbmind/service/dai.py
./bin/dbmind/global_vars.py
./bin/dbmind/cmd/
./bin/dbmind/cmd/__init__.py
./bin/dbmind/cmd/config_utils.py
./bin/dbmind/cmd/setup.py
./bin/dbmind/cmd/cli.py
./bin/dbmind/cmd/edbmind.py
./bin/dbmind/tests/
./bin/dbmind/tests/test_detection.py
./bin/dbmind/tests/__init__.py
./bin/dbmind/tests/test_types.py
./bin/dbmind/tests/test_daemon.py
./bin/dbmind/tests/test_slow_sql_feature.py
./bin/dbmind/tests/test_arima.py
./bin/dbmind/tests/test_timed_app.py
./bin/dbmind/tests/test_security.py
./bin/dbmind/tests/test_index_advisor_workload.py
./bin/dbmind/tests/test_basic_algorithms.py
./bin/dbmind/metadatabase/base.py
./bin/dbmind/__main__.py
./bin/dbmind/requirements-aarch64.txt
./bin/dbmind/anomaly_detection/
./bin/dbmind/anomaly_detection/structure.png
./bin/dbmind/anomaly_detection/task/
./bin/dbmind/anomaly_detection/task/database_exporter.py
./bin/dbmind/anomaly_detection/task/os_exporter.py
./bin/dbmind/anomaly_detection/task/metric_task.py
./bin/dbmind/requirements-optional.txt
./bin/dbmind/misc/
./bin/dbmind/misc/dbmind.conf
./bin/dbmind/misc/metric_value_range.conf
./bin/dbmind/misc/filter_label.conf
./bin/dbmind/misc/metric_map.conf
./bin/dbmind/components/
./bin/dbmind/components/predictor/
./bin/dbmind/components/predictor/python/
./bin/dbmind/components/predictor/python/uploads/
./bin/dbmind/components/predictor/python/uploads/.gitkeep
./bin/dbmind/components/predictor/python/log/
./bin/dbmind/components/predictor/python/log/.gitkeep
./bin/dbmind/components/predictor/python/e_log/
./bin/dbmind/components/predictor/python/e_log/.gitkeep
./bin/dbmind/components/predictor/python/certs.py
./bin/dbmind/components/predictor/python/run.py
./bin/dbmind/components/predictor/python/model.py
./bin/dbmind/components/predictor/python/saved_models/
./bin/dbmind/components/predictor/python/saved_models/.gitkeep
./bin/dbmind/components/predictor/python/settings.py
./bin/dbmind/components/predictor/python/log.conf
./bin/dbmind/components/predictor/install/
./bin/dbmind/components/predictor/install/ssl.sh
./bin/dbmind/components/predictor/install/ca_ext.txt
./bin/dbmind/components/predictor/install/requirements.txt
./bin/dbmind/components/predictor/install/requirements-gpu.txt
./bin/dbmind/components/__init__.py
./bin/dbmind/components/extract_log.py
./bin/dbmind/components/xtuner/
./bin/dbmind/components/xtuner/__init__.py
./bin/dbmind/components/xtuner/share/
./bin/dbmind/components/xtuner/share/xtuner.conf.template
./bin/dbmind/components/xtuner/share/knobs.json.template
./bin/dbmind/components/xtuner/share/server.json.template
./bin/dbmind/components/xtuner/README.md
./bin/dbmind/components/xtuner/test/
./bin/dbmind/components/xtuner/test/test_pso.py
./bin/dbmind/components/xtuner/test/test_ssh.py
./bin/dbmind/components/xtuner/test/test_db_agent.py
./bin/dbmind/components/xtuner/__main__.py
./bin/dbmind/components/xtuner/tuner/
./bin/dbmind/components/xtuner/tuner/__init__.py
./bin/dbmind/components/xtuner/tuner/character.py
./bin/dbmind/components/xtuner/tuner/exceptions.py
./bin/dbmind/components/xtuner/tuner/env.py
./bin/dbmind/components/xtuner/tuner/db_agent.py
./bin/dbmind/components/xtuner/tuner/db_env.py
./bin/dbmind/components/xtuner/tuner/executor.py
./bin/dbmind/components/xtuner/tuner/benchmark/
./bin/dbmind/components/xtuner/tuner/benchmark/__init__.py
./bin/dbmind/components/xtuner/tuner/benchmark/sysbench.py
./bin/dbmind/components/xtuner/tuner/benchmark/tpcc.py
./bin/dbmind/components/xtuner/tuner/benchmark/tpch.py
./bin/dbmind/components/xtuner/tuner/benchmark/period.py
./bin/dbmind/components/xtuner/tuner/benchmark/README.md
./bin/dbmind/components/xtuner/tuner/benchmark/tpcds.py
./bin/dbmind/components/xtuner/tuner/benchmark/template.py
./bin/dbmind/components/xtuner/tuner/recorder.py
./bin/dbmind/components/xtuner/tuner/xtuner.conf
./bin/dbmind/components/xtuner/tuner/xtuner.py
./bin/dbmind/components/xtuner/tuner/utils.py
./bin/dbmind/components/xtuner/tuner/knob.py
./bin/dbmind/components/xtuner/tuner/main.py
./bin/dbmind/components/xtuner/tuner/algorithms/
./bin/dbmind/components/xtuner/tuner/algorithms/__init__.py
./bin/dbmind/components/xtuner/tuner/algorithms/rl_agent.py
./bin/dbmind/components/xtuner/tuner/algorithms/pso.py
./bin/dbmind/components/xtuner/tuner/recommend.py
./bin/dbmind/components/index_advisor/
./bin/dbmind/components/index_advisor/__init__.py
./bin/dbmind/components/index_advisor/dao/
./bin/dbmind/components/index_advisor/dao/gsql_execute.py
./bin/dbmind/components/index_advisor/dao/execute_factory.py
./bin/dbmind/components/index_advisor/dao/driver_execute.py
./bin/dbmind/components/index_advisor/index_advisor_workload.py
./bin/dbmind/components/index_advisor/README.md
./bin/dbmind/components/index_advisor/__main__.py
./bin/dbmind/components/sqldiag/
./bin/dbmind/components/sqldiag/__init__.py
./bin/dbmind/components/sqldiag/load_sql_from_wdr.py
./bin/dbmind/components/sqldiag/sample_data/
./bin/dbmind/components/sqldiag/sample_data/predict.csv
./bin/dbmind/components/sqldiag/sample_data/train.csv
./bin/dbmind/components/sqldiag/algorithm/
./bin/dbmind/components/sqldiag/algorithm/diag.py
./bin/dbmind/components/sqldiag/algorithm/duration_time_model/
./bin/dbmind/components/sqldiag/algorithm/duration_time_model/__init__.py
./bin/dbmind/components/sqldiag/algorithm/duration_time_model/template.py
./bin/dbmind/components/sqldiag/algorithm/duration_time_model/dnn.py
./bin/dbmind/components/sqldiag/algorithm/sql_similarity/
./bin/dbmind/components/sqldiag/algorithm/sql_similarity/__init__.py
./bin/dbmind/components/sqldiag/algorithm/sql_similarity/parse_tree.py
./bin/dbmind/components/sqldiag/algorithm/sql_similarity/levenshtein.py
./bin/dbmind/components/sqldiag/algorithm/sql_similarity/list_distance.py
./bin/dbmind/components/sqldiag/algorithm/sql_similarity/cosine_distance.py
./bin/dbmind/components/sqldiag/algorithm/word2vec.py
./bin/dbmind/components/sqldiag/README.md
./bin/dbmind/components/sqldiag/preprocessing.py
./bin/dbmind/components/sqldiag/requirements.txt
./bin/dbmind/components/sqldiag/sqldiag.conf
./bin/dbmind/components/sqldiag/__main__.py
./bin/dbmind/components/sqldiag/utils.py
./bin/dbmind/components/sqldiag/main.py
./bin/dbmind/components/sqldiag/result.png
./bin/dbmind/components/opengauss_exporter/
./bin/dbmind/components/opengauss_exporter/__init__.py
./bin/dbmind/components/opengauss_exporter/yamls/
./bin/dbmind/components/opengauss_exporter/yamls/default.yml
./bin/dbmind/components/opengauss_exporter/yamls/pg_settings.yml
./bin/dbmind/components/opengauss_exporter/yamls/statements.yml
./bin/dbmind/components/opengauss_exporter/__main__.py
./bin/dbmind/components/opengauss_exporter/core/
./bin/dbmind/components/opengauss_exporter/core/__init__.py
./bin/dbmind/components/opengauss_exporter/core/opengauss_driver.py
./bin/dbmind/components/opengauss_exporter/core/controller.py
./bin/dbmind/components/opengauss_exporter/core/service.py
./bin/dbmind/components/opengauss_exporter/core/main.py
./bin/dbmind/components/reprocessing_exporter/
./bin/dbmind/components/reprocessing_exporter/__init__.py
./bin/dbmind/components/reprocessing_exporter/__main__.py
./bin/dbmind/components/reprocessing_exporter/reprocessing_exporter.yml
./bin/dbmind/components/reprocessing_exporter/core/
./bin/dbmind/components/reprocessing_exporter/core/__init__.py
./bin/dbmind/components/reprocessing_exporter/core/controller.py
./bin/dbmind/components/reprocessing_exporter/core/service.py
./bin/dbmind/components/reprocessing_exporter/core/main.py
./bin/dbmind/components/reprocessing_exporter/core/dao.py
./bin/dbmind/components/slow_query_diagnosis.py
./bin/dbmind/components/forecast.py
./bin/dbmind/constants.py
./bin/pg_resetxlog
./bin/krb5kdc
./bin/gs_dumpall
./bin/gs_guc
./bin/kadmin.local
./bin/openssl
./bin/gs_basebackup
./bin/gs_dump
./bin/gs_probackup
./bin/kdestroy
./bin/pg_controldata
./bin/gs_plan_simulator.sh
./bin/pg_receivexlog
./bin/kdb5_util
./bin/gs_cgroup
./bin/gs_initdb
./bin/gs_encrypt
./etc/
./etc/kerberos/
./etc/kerberos/krb5.conf
./etc/kerberos/kadm5.acl
./etc/kerberos/kdc.conf
./etc/kerberos/mppdb-site.xml
./include/
./include/postgresql/
./include/postgresql/server/
./include/postgresql/server/securectype.h
./include/postgresql/server/alarm/
./include/postgresql/server/alarm/alarm.h
./include/postgresql/server/pg_config_os.h
./include/postgresql/server/funcapi.h
./share/postgresql/tsearch_data/russian.stop
./share/postgresql/pg_hba.conf.sample
./share/postgresql/pg_cast_oid.txt
./share/sslcert/
./share/sslcert/gsql/
./share/sslcert/gsql/openssl.cnf
./share/sslcert/om/
./share/sslcert/om/openssl.cnf
./share/llvmir/
./share/llvmir/GaussDB_expr.ir
./simpleInstall/
./simpleInstall/README.md
./simpleInstall/school.sql
./simpleInstall/finance.sql
./simpleInstall/install.sh
./version.cfg
[omm@ptkmog3 mogdb304]$
[omm@ptkmog3 mogdb304]$
[omm@ptkmog3 mogdb304]$ ll
total 138048
drwx------. 3 omm omm 4096 Mar 3 18:07 bin
drwx------. 3 omm omm 22 Mar 3 18:07 etc
drwx------. 3 omm omm 24 Mar 3 18:07 include
drwx------. 4 omm omm 95 Mar 3 18:07 jre
drwx------. 5 omm omm 4096 Mar 3 18:07 lib
-rw-------. 1 omm omm 65 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-cm.sha256
-rw-------. 1 omm omm 6416169 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-cm.tar.gz
-rw-------. 1 omm omm 5077926 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-Libpq.tar.gz
-rw-------. 1 omm omm 65 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-om.sha256
-rw-------. 1 omm omm 14167831 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-om.tar.gz
-rw-------. 1 omm omm 65 Mar 3 19:09 MogDB-3.0.4-CentOS-64bit.sha256
-rw-------. 1 omm omm 107212757 Mar 3 19:09 MogDB-3.0.4-CentOS-64bit.tar.gz
-rw-------. 1 omm omm 8034026 Mar 3 19:10 MogDB-3.0.4-CentOS-64bit-tools.tar.gz
drwx------. 5 omm omm 53 Mar 3 18:07 share
drwx------. 2 omm omm 78 Mar 3 18:07 simpleInstall
-rw-------. 1 omm omm 65 Mar 3 19:10 upgrade_sql.sha256
-rw-------. 1 omm omm 410646 Mar 3 19:10 upgrade_sql.tar.gz
-rw-------. 1 omm omm 28 Mar 3 18:07 version.cfg
[omm@ptkmog3 mogdb304]$
[root@ptkmog3 ~]# cd /opt/mogdb/app/
[root@ptkmog3 app]# ll
total 16
drwxr-xr-x. 3 omm omm 4096 Apr 16 19:39 bin
drwxr-xr-x. 3 omm omm 22 Aug 5 2022 etc
drwxr-xr-x. 3 omm omm 24 Aug 5 2022 include
drwxr-xr-x. 4 omm omm 95 Aug 5 2022 jre
drwxr-xr-x. 5 omm omm 4096 Aug 5 2022 lib
drwx------. 2 omm omm 126 Apr 16 19:39 logs
drwxr-xr-x. 5 omm omm 53 Aug 5 2022 share
drwxr-xr-x. 2 omm omm 78 Aug 5 2022 simpleInstall
-rw-r--r--. 1 omm omm 28 Aug 5 2022 version.cfg
[root@ptkmog3 app]# mv bin/ bin_304
[root@ptkmog3 app]# mv lib/ lib_304
[root@ptkmog3 app]# ll
total 16
drwxr-xr-x. 3 omm omm 4096 Apr 16 19:39 bin_304
drwxr-xr-x. 3 omm omm 22 Aug 5 2022 etc
drwxr-xr-x. 3 omm omm 24 Aug 5 2022 include
drwxr-xr-x. 4 omm omm 95 Aug 5 2022 jre
drwxr-xr-x. 5 omm omm 4096 Aug 5 2022 lib_304
drwx------. 2 omm omm 126 Apr 16 19:39 logs
drwxr-xr-x. 5 omm omm 53 Aug 5 2022 share
drwxr-xr-x. 2 omm omm 78 Aug 5 2022 simpleInstall
-rw-r--r--. 1 omm omm 28 Aug 5 2022 version.cfg
[root@ptkmog3 app]# cp -r /opt/mogdb304/bin/ .
[omm@mogdb1 db]$ cp -r /opt/mogdb304/lib/ .
[omm@mogdb1 db]$ ls -lht
[omm@mogdb1 db]$ cp bin_304/cluster_static_config bin/
[omm@mogdb1 db]$ cp bin_304/upgrade_version bin/
[omm@ptkmog1 app]$ gs_ctl start
[root@ptkmog3 om]#
[root@ptkmog3 om]# pwd
/opt/mogdb/app/share/sslcert/om
[root@ptkmog3 om]#
十、 升级遇到问题
logout
[root@ptkmog1 opt]# ptk cluster status --all
==================== cluster: "mogdb_cluster" status ====================
[ Cluster State ]
cluster_name : mogdb_cluster
cluster_state : MultiPrimary
database_version : MogDB 3.0.1 (build 1a363ea9)
[ Datanode State ]
cluster_name | id | ip | port | user | nodename | db_role | state | upstream
----------------+------+--------------+-------+------+----------+---------+----------------------------------+-----------
mogdb_cluster | 6001 | 192.168.3.63 | 15400 | omm | dn_6001 | primary | Normal | -
| 6002 | 192.168.3.64 | 15400 | omm | dn_6002 | primary | Normal | -
| 6003 | 192.168.3.65 | 15400 | omm | dn_6003 | standby | Need repair(WAL segment removed) | -
[root@ptkmog1 opt]# ptk cluster stop --all
==================== stop cluster: "mogdb_cluster" ====================
INFO[2023-04-17T20:03:18.981] operation: stop
INFO[2023-04-17T20:03:18.981] ========================================
INFO[2023-04-17T20:03:18.981] stop db [192.168.3.65:15400] ...
INFO[2023-04-17T20:03:21.002] stop db [192.168.3.65:15400] successfully
INFO[2023-04-17T20:03:21.002] stop db [192.168.3.63:15400] ...
INFO[2023-04-17T20:03:32.038] stop db [192.168.3.63:15400] successfully
INFO[2023-04-17T20:03:32.038] stop db [192.168.3.64:15400] ...
⡿ executing...
⣯ executing...
⣷ executing...
INFO[2023-04-17T20:03:43.105] stop db [192.168.3.64:15400] successfully
INFO[2023-04-17T20:03:43.105] ========================================
INFO[2023-04-17T20:03:43.105] stop successfully
[root@ptkmog1 opt]#
[root@ptkmog1 opt]#
[root@ptkmog1 opt]#
[root@ptkmog1 opt]#
[root@ptkmog1 opt]# ptk cluster start --all
==================== start cluster: "mogdb_cluster" ====================
? Multiple primary instances are recorded in the metadata.
Please select the real one, the others will start as standby 192.168.3.63:15400
INFO[2023-04-17T20:04:31.262] operation: start
INFO[2023-04-17T20:04:31.262] ========================================
INFO[2023-04-17T20:04:31.262] start db [192.168.3.63:15400] ...
INFO[2023-04-17T20:04:32.330] start db [192.168.3.63:15400] successfully
INFO[2023-04-17T20:04:32.330] start db [192.168.3.65:15400] ...
INFO[2023-04-17T20:04:33.405] start db [192.168.3.65:15400] successfully
INFO[2023-04-17T20:04:33.405] start db [192.168.3.64:15400] ...
INFO[2023-04-17T20:04:34.475] start db [192.168.3.64:15400] successfully
INFO[2023-04-17T20:04:34.545] wait following dn to Normal:
INFO[2023-04-17T20:04:34.545] dn: 192.168.3.64 state: Need repair
INFO[2023-04-17T20:04:37.606] wait following dn to Normal:
INFO[2023-04-17T20:04:37.606] dn: 192.168.3.64 state: Need repair
INFO[2023-04-17T20:04:40.667] wait following dn to Normal:
INFO[2023-04-17T20:04:40.667] dn: 192.168.3.64 state: Need repair
INFO[2023-04-17T20:04:43.732] wait following dn to Normal:
INFO[2023-04-17T20:04:43.732] dn: 192.168.3.64 state: Need repair
INFO[2023-04-17T20:04:46.793] wait following dn to Normal:
INFO[2023-04-17T20:04:46.793] dn: 192.168.3.64 state: Need repair
INFO[2023-04-17T20:04:49.860] wait following dn to Normal:
INFO[2023-04-17T20:04:49.860] dn: 192.168.3.64 state: Need repair
INFO[2023-04-17T20:04:52.920] wait following dn to Normal:
INFO[2023-04-17T20:04:52.920] dn: 192.168.3.64 state: Need repair
INFO[2023-04-17T20:04:55.981] wait following dn to Normal:
INFO[2023-04-17T20:04:55.981] dn: 192.168.3.64 state: Need repair
INFO[2023-04-17T20:04:59.043] wait following dn to Normal:
INFO[2023-04-17T20:04:59.043] dn: 192.168.3.64 state: Need repair
INFO[2023-04-17T20:05:02.103] wait following dn to Normal:
INFO[2023-04-17T20:05:02.103] dn: 192.168.3.64 state: Need repair
INFO[2023-04-17T20:05:05.106] ========================================
ERRO[2023-04-17T20:05:05.106] start cluster "mogdb_cluster" failed: start timeout: some instance state is not Normal, please check manually
[omm@ptkmog2 ~]$ gs_ctl build -D /opt/mogdb/data
[2023-04-17 17:54:48.325][29379][][gs_ctl]: gs_ctl incremental build ,datadir is /opt/mogdb/data
[2023-04-17 17:54:48.333][29379][][gs_ctl]: The local server run as Primary,build cannot be executed.
[omm@ptkmog2 ~]$ gs_ctl stop
[2023-04-17 17:55:03.255][29396][][gs_ctl]: gs_ctl stopped ,datadir is /opt/mogdb/data
waiting for server to shut down.............. done
server stopped
[omm@ptkmog2 ~]$ gs_ctl build -D /opt/mogdb/data
[2023-04-17 17:58:50.439][30229][][gs_ctl]: gs_ctl incremental build ,datadir is /opt/mogdb/data
waiting for server to shut down.... done
server stopped
[2023-04-17 17:58:51.451][30229][][gs_ctl]: fopen build pid file "/opt/mogdb/data/gs_build.pid" success
[2023-04-17 17:58:51.451][30229][][gs_ctl]: fprintf build pid file "/opt/mogdb/data/gs_build.pid" success
[2023-04-17 17:58:51.452][30229][][gs_ctl]: fsync build pid file "/opt/mogdb/data/gs_build.pid" success
[2023-04-17 17:58:51.456][30229][dn_6001][gs_ctl]: build try host(192.168.3.63) port(15401) success
[2023-04-17 17:58:51.457][30229][dn_6001][gs_rewind]: set gaussdb state file when incremental build:db state(BUILDING_STATE), server mode(STANDBY_MODE), build mode(INC_BUILD).
[2023-04-17 17:58:51.460][30229][dn_6001][gs_rewind]: connected to server: host=192.168.3.63 port=15401 dbname=postgres application_name=gs_rewind connect_timeout=5 rw_timeout=600
[2023-04-17 17:58:51.464][30229][dn_6001][gs_rewind]: connect to primary success
[2023-04-17 17:58:51.465][30229][dn_6001][gs_rewind]: get pg_control success
[2023-04-17 17:58:51.465][30229][dn_6001][gs_rewind]: target server was interrupted in mode 2.
[2023-04-17 17:58:51.465][30229][dn_6001][gs_rewind]: sanityChecks success
[2023-04-17 17:58:51.465][30229][dn_6001][gs_rewind]: find last checkpoint at 0/58DC120 and checkpoint redo at 0/58DC120 from source control file
[2023-04-17 17:58:51.465][30229][dn_6001][gs_rewind]: find last checkpoint at 0/58DBE90 and checkpoint redo at 0/58DBE90 from target control file
[2023-04-17 17:58:51.473][30229][dn_6001][gs_rewind]: find max lsn success, find max lsn rec (0/58DBE90) success.
[2023-04-17 17:58:51.480][30229][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 17:58:51.480][30229][dn_6001][gs_rewind]: request lsn is 0/58DBE90 and its crc(source, target):[486014188, 4082598053]
[2023-04-17 17:58:51.483][30229][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 17:58:51.484][30229][dn_6001][gs_rewind]: request lsn is 0/58DBDF0 and its crc(source, target):[4054957225, 2974450636]
[2023-04-17 17:58:51.486][30229][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 17:58:51.486][30229][dn_6001][gs_rewind]: request lsn is 0/58DBCD0 and its crc(source, target):[476174018, 2900604168]
[2023-04-17 17:58:51.488][30229][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 17:58:51.489][30229][dn_6001][gs_rewind]: request lsn is 0/58DBBB0 and its crc(source, target):[474920523, 474920523]
[2023-04-17 17:58:51.489][30229][dn_6001][gs_rewind]: find common checkpoint 0/58DBBB0
[2023-04-17 17:58:51.489][30229][dn_6001][gs_rewind]: find diverge point success
[2023-04-17 17:58:51.489][30229][dn_6001][gs_rewind]: read checkpoint redo (0/58DBB30) success before rewinding.
[2023-04-17 17:58:51.489][30229][dn_6001][gs_rewind]: rewinding from checkpoint redo point at 0/58DBB30 on timeline 1
[2023-04-17 17:58:51.489][30229][dn_6001][gs_rewind]: diverge xlogfile is 000000010000000000000005, older ones will not be copied or removed.
[2023-04-17 17:58:51.490][30229][dn_6001][gs_rewind]: targetFileStatThread success pid 47218758067968.
[2023-04-17 17:58:51.490][30229][dn_6001][gs_rewind]: reading source file list
[2023-04-17 17:58:51.490][30229][dn_6001][gs_rewind]: traverse_datadir start.
[2023-04-17 17:58:51.493][30229][dn_6001][gs_rewind]: filemap_list_to_array start.
[2023-04-17 17:58:51.493][30229][dn_6001][gs_rewind]: filemap_list_to_array end sort start. length is 1475
[2023-04-17 17:58:51.493][30229][dn_6001][gs_rewind]: sort end.
[2023-04-17 17:58:51.502][30229][dn_6001][gs_rewind]: targetFileStatThread return success.
[2023-04-17 17:58:51.505][30229][dn_6001][gs_rewind]: reading target file list
[2023-04-17 17:58:51.506][30229][dn_6001][gs_rewind]: traverse target datadir success
[2023-04-17 17:58:51.506][30229][dn_6001][gs_rewind]: reading WAL in target
[2023-04-17 17:58:51.506][30229][dn_6001][gs_rewind]: could not read WAL record at 0/58DBF30: invalid record length at 0/58DBF30: wanted 32, got 0
[2023-04-17 17:58:51.507][30229][dn_6001][gs_rewind]: calculate totals rewind success
[2023-04-17 17:58:51.507][30229][dn_6001][gs_rewind]: need to copy 96MB (total source directory size is 96MB)
[2023-04-17 17:58:51.507][30229][dn_6001][gs_rewind]: starting background WAL receiver
[2023-04-17 17:58:51.507][30229][dn_6001][gs_rewind]: Starting copy xlog, start point: 0/58DBB30
[2023-04-17 17:58:51.507][30229][dn_6001][gs_rewind]: in gs_rewind proecess,so no need remove.
[2023-04-17 17:58:51.513][30229][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 17:58:51.513][30229][dn_6001][gs_rewind]: check identify system success
[2023-04-17 17:58:51.514][30229][dn_6001][gs_rewind]: send START_REPLICATION 0/5000000 success
[2023-04-17 17:58:51.644][30229][dn_6001][gs_rewind]: receiving and unpacking files...
[2023-04-17 17:58:51.986][30229][dn_6001][gs_rewind]: execute file map success
[2023-04-17 17:58:51.986][30229][dn_6001][gs_rewind]: find minRecoveryPoint success from xlog insert location 0/58E0AC8
[2023-04-17 17:58:51.986][30229][dn_6001][gs_rewind]: update pg_control file success, minRecoveryPoint: 0/58E0AC8, ckpLoc:0/58DC120, ckpRedo:0/58DC120, preCkp:0/58DC080
[2023-04-17 17:58:52.044][30229][dn_6001][gs_rewind]: update pg_dw file success
[2023-04-17 17:58:52.045][30229][dn_6001][gs_rewind]: xlog end point: 0/58E0AC8
[2023-04-17 17:58:52.045][30229][dn_6001][gs_rewind]: waiting for background process to finish streaming...
[2023-04-17 17:58:57.102][30229][dn_6001][gs_rewind]: creating backup label and updating control file
[2023-04-17 17:58:57.103][30229][dn_6001][gs_rewind]: create backup label success
[2023-04-17 17:58:57.103][30229][dn_6001][gs_rewind]: read checkpoint redo (0/58DBB30) success.
[2023-04-17 17:58:57.103][30229][dn_6001][gs_rewind]: read checkpoint rec (0/58DBBB0) success.
[2023-04-17 17:58:57.103][30229][dn_6001][gs_rewind]: dn incremental build completed.
[2023-04-17 17:58:57.106][30229][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 17:58:57.106][30229][dn_6001][gs_rewind]: fetching MOT checkpoint
[2023-04-17 17:58:57.155][30229][dn_6001][gs_ctl]: waiting for server to start...
.0 LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env.
0 LOG: [Alarm Module]Host Name: ptkmog2
0 LOG: [Alarm Module]Host IP: 192.168.3.64
0 LOG: [Alarm Module]Cluster Name: mogdb_cluster
0 WARNING: failed to open feature control file, please check whether it exists: FileName=gaussdb.version, Errno=2, Errmessage=No such file or directory.
0 WARNING: failed to parse feature control file: gaussdb.version.
0 WARNING: Failed to load the product control file, so gaussdb cannot distinguish product version.
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/var/log/coredump/
2023-04-17 17:58:57.247 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: when starting as multi_standby mode, we couldn't support data replicaton.
2023-04-17 17:58:57.250 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env.
2023-04-17 17:58:57.250 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]Host Name: ptkmog2
2023-04-17 17:58:57.250 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]Host IP: 192.168.3.64
2023-04-17 17:58:57.250 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]Cluster Name: mogdb_cluster
2023-04-17 17:58:57.253 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: loaded library "security_plugin"
2023-04-17 17:58:57.255 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets
2023-04-17 17:58:57.258 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2023-04-17 17:58:57.258 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: reserved memory for backend threads is: 340 MB
2023-04-17 17:58:57.258 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: reserved memory for WAL buffers is: 320 MB
2023-04-17 17:58:57.258 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: Set max backend reserve memory is: 660 MB, max dynamic memory is: 10752 MB
2023-04-17 17:58:57.258 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: shared memory 363 Mbytes, memory context 11412 Mbytes, max process memory 12288 Mbytes
2023-04-17 17:58:57.288 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [CACHE] LOG: set data cache size(402653184)
2023-04-17 17:58:57.296 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [CACHE] LOG: set metadata cache size(134217728)
2023-04-17 17:58:57.315 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [SEGMENT_PAGE] LOG: Segment-page constants: DF_MAP_SIZE: 8156, DF_MAP_BIT_CNT: 65248, DF_MAP_GROUP_EXTENTS: 4175872, IPBLOCK_SIZE: 8168, EXTENTS_PER_IPBLOCK: 1021, IPBLOCK_GROUP_SIZE: 4090, BMT_HEADER_LEVEL0_TOTAL_PAGES: 8323072, BktMapEntryNumberPerBlock: 2038, BktMapBlockNumber: 25, BktBitMaxMapCnt: 512
2023-04-17 17:58:57.392 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: mogdb: fsync file "/opt/mogdb/data/gaussdb.state.temp" success
2023-04-17 17:58:57.392 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: create gaussdb state file success: db state(STARTING_STATE), server mode(Standby), connection index(1)
2023-04-17 17:58:57.393 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: max_safe_fds = 974, usable_fds = 1000, already_open = 16
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/var/log/coredump/
2023-04-17 17:58:57.395 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: the configure file /opt/mogdb/app/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user!
2023-04-17 17:58:57.395 [unknown] [unknown] localhost 47633747193536 0[0:0#0] 0 [BACKEND] LOG: Failed to parse cgroup config file.
.
[2023-04-17 17:58:59.163][30229][dn_6001][gs_ctl]: done
[2023-04-17 17:58:59.163][30229][dn_6001][gs_ctl]: server started (/opt/mogdb/data)
[2023-04-17 17:58:59.163][30229][dn_6001][gs_ctl]: fopen build pid file "/opt/mogdb/data/gs_build.pid" success
[2023-04-17 17:58:59.163][30229][dn_6001][gs_ctl]: fprintf build pid file "/opt/mogdb/data/gs_build.pid" success
[2023-04-17 17:58:59.164][30229][dn_6001][gs_ctl]: fsync build pid file "/opt/mogdb/data/gs_build.pid" success
[omm@ptkmog2 ~]$ gs_ctl build -D /opt/mogdb/data
[2023-04-17 19:52:19.473][4969][][gs_ctl]: gs_ctl incremental build ,datadir is /opt/mogdb/data
[2023-04-17 19:52:19.481][4969][][gs_ctl]: The local server run as Primary,build cannot be executed.
[omm@ptkmog2 ~]$ gs_ctl build -D /opt/mogdb/data
[2023-04-17 20:05:24.026][6481][][gs_ctl]: gs_ctl incremental build ,datadir is /opt/mogdb/data
waiting for server to shut down.... done
server stopped
[2023-04-17 20:05:25.035][6481][][gs_ctl]: fopen build pid file "/opt/mogdb/data/gs_build.pid" success
[2023-04-17 20:05:25.035][6481][][gs_ctl]: fprintf build pid file "/opt/mogdb/data/gs_build.pid" success
[2023-04-17 20:05:25.037][6481][][gs_ctl]: fsync build pid file "/opt/mogdb/data/gs_build.pid" success
[2023-04-17 20:05:25.040][6481][dn_6001][gs_ctl]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.040][6481][dn_6001][gs_rewind]: set gaussdb state file when incremental build:db state(BUILDING_STATE), server mode(STANDBY_MODE), build mode(INC_BUILD).
[2023-04-17 20:05:25.043][6481][dn_6001][gs_rewind]: connected to server: host=192.168.3.63 port=15401 dbname=postgres application_name=gs_rewind connect_timeout=5 rw_timeout=600
[2023-04-17 20:05:25.046][6481][dn_6001][gs_rewind]: connect to primary success
[2023-04-17 20:05:25.047][6481][dn_6001][gs_rewind]: get pg_control success
[2023-04-17 20:05:25.047][6481][dn_6001][gs_rewind]: target server was interrupted in mode 2.
[2023-04-17 20:05:25.047][6481][dn_6001][gs_rewind]: sanityChecks success
[2023-04-17 20:05:25.047][6481][dn_6001][gs_rewind]: find last checkpoint at 0/58F0328 and checkpoint redo at 0/58F0328 from source control file
[2023-04-17 20:05:25.047][6481][dn_6001][gs_rewind]: find last checkpoint at 0/58F04C8 and checkpoint redo at 0/58F04C8 from target control file
[2023-04-17 20:05:25.051][6481][dn_6001][gs_rewind]: find max lsn success, find max lsn rec (0/58F04C8) success.
[2023-04-17 20:05:25.060][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.061][6481][dn_6001][gs_rewind]: request lsn is 0/58F0308 and its crc(source, target):[1, 1648101717]
[2023-04-17 20:05:25.064][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.064][6481][dn_6001][gs_rewind]: request lsn is 0/58F01E8 and its crc(source, target):[482696803, 3809005505]
[2023-04-17 20:05:25.067][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.068][6481][dn_6001][gs_rewind]: request lsn is 0/58F00C8 and its crc(source, target):[3203024580, 2005874452]
[2023-04-17 20:05:25.071][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.071][6481][dn_6001][gs_rewind]: request lsn is 0/58EFF90 and its crc(source, target):[658692248, 4232055142]
[2023-04-17 20:05:25.074][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.074][6481][dn_6001][gs_rewind]: request lsn is 0/58EFE70 and its crc(source, target):[2023300922, 1050701198]
[2023-04-17 20:05:25.078][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.078][6481][dn_6001][gs_rewind]: request lsn is 0/58EFD50 and its crc(source, target):[2297302096, 3470229220]
[2023-04-17 20:05:25.080][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.081][6481][dn_6001][gs_rewind]: request lsn is 0/58EFC30 and its crc(source, target):[1147219827, 39345607]
[2023-04-17 20:05:25.084][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.084][6481][dn_6001][gs_rewind]: request lsn is 0/58EFB10 and its crc(source, target):[2669258090, 3642808286]
[2023-04-17 20:05:25.086][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.087][6481][dn_6001][gs_rewind]: request lsn is 0/58EF9F0 and its crc(source, target):[4227698756, 1001075075]
[2023-04-17 20:05:25.089][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.090][6481][dn_6001][gs_rewind]: request lsn is 0/58EF8D0 and its crc(source, target):[545593949, 3771972506]
[2023-04-17 20:05:25.092][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.092][6481][dn_6001][gs_rewind]: request lsn is 0/58EF7B0 and its crc(source, target):[2829727007, 1761383640]
[2023-04-17 20:05:25.095][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.095][6481][dn_6001][gs_rewind]: request lsn is 0/58EF690 and its crc(source, target):[1943191302, 1943191302]
[2023-04-17 20:05:25.095][6481][dn_6001][gs_rewind]: find common checkpoint 0/58EF690
[2023-04-17 20:05:25.095][6481][dn_6001][gs_rewind]: find diverge point success
[2023-04-17 20:05:25.095][6481][dn_6001][gs_rewind]: read checkpoint redo (0/58EF610) success before rewinding.
[2023-04-17 20:05:25.095][6481][dn_6001][gs_rewind]: rewinding from checkpoint redo point at 0/58EF610 on timeline 1
[2023-04-17 20:05:25.095][6481][dn_6001][gs_rewind]: diverge xlogfile is 000000010000000000000005, older ones will not be copied or removed.
[2023-04-17 20:05:25.097][6481][dn_6001][gs_rewind]: targetFileStatThread success pid 47937720170240.
[2023-04-17 20:05:25.097][6481][dn_6001][gs_rewind]: reading source file list
[2023-04-17 20:05:25.097][6481][dn_6001][gs_rewind]: traverse_datadir start.
[2023-04-17 20:05:25.100][6481][dn_6001][gs_rewind]: filemap_list_to_array start.
[2023-04-17 20:05:25.100][6481][dn_6001][gs_rewind]: filemap_list_to_array end sort start. length is 1475
[2023-04-17 20:05:25.100][6481][dn_6001][gs_rewind]: sort end.
[2023-04-17 20:05:25.107][6481][dn_6001][gs_rewind]: targetFileStatThread return success.
[2023-04-17 20:05:25.113][6481][dn_6001][gs_rewind]: reading target file list
[2023-04-17 20:05:25.114][6481][dn_6001][gs_rewind]: traverse target datadir success
[2023-04-17 20:05:25.114][6481][dn_6001][gs_rewind]: reading WAL in target
[2023-04-17 20:05:25.114][6481][dn_6001][gs_rewind]: could not read WAL record at 0/58F0568: invalid record length at 0/58F0568: wanted 32, got 0
[2023-04-17 20:05:25.115][6481][dn_6001][gs_rewind]: calculate totals rewind success
[2023-04-17 20:05:25.115][6481][dn_6001][gs_rewind]: need to copy 96MB (total source directory size is 96MB)
[2023-04-17 20:05:25.115][6481][dn_6001][gs_rewind]: starting background WAL receiver
[2023-04-17 20:05:25.115][6481][dn_6001][gs_rewind]: Starting copy xlog, start point: 0/58EF610
[2023-04-17 20:05:25.115][6481][dn_6001][gs_rewind]: in gs_rewind proecess,so no need remove.
[2023-04-17 20:05:25.120][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:25.121][6481][dn_6001][gs_rewind]: check identify system success
[2023-04-17 20:05:25.121][6481][dn_6001][gs_rewind]: send START_REPLICATION 0/5000000 success
[2023-04-17 20:05:25.676][6481][dn_6001][gs_rewind]: receiving and unpacking files...
[2023-04-17 20:05:26.210][6481][dn_6001][gs_rewind]: execute file map success
[2023-04-17 20:05:26.210][6481][dn_6001][gs_rewind]: find minRecoveryPoint success from xlog insert location 0/58F4D50
[2023-04-17 20:05:26.210][6481][dn_6001][gs_rewind]: update pg_control file success, minRecoveryPoint: 0/58F4D50, ckpLoc:0/58F0328, ckpRedo:0/58F0328, preCkp:0/58F0288
[2023-04-17 20:05:26.269][6481][dn_6001][gs_rewind]: update pg_dw file success
[2023-04-17 20:05:26.270][6481][dn_6001][gs_rewind]: xlog end point: 0/58F4D50
[2023-04-17 20:05:26.270][6481][dn_6001][gs_rewind]: waiting for background process to finish streaming...
[2023-04-17 20:05:31.337][6481][dn_6001][gs_rewind]: creating backup label and updating control file
[2023-04-17 20:05:31.337][6481][dn_6001][gs_rewind]: create backup label success
[2023-04-17 20:05:31.337][6481][dn_6001][gs_rewind]: read checkpoint redo (0/58EF610) success.
[2023-04-17 20:05:31.337][6481][dn_6001][gs_rewind]: read checkpoint rec (0/58EF690) success.
[2023-04-17 20:05:31.337][6481][dn_6001][gs_rewind]: dn incremental build completed.
[2023-04-17 20:05:31.340][6481][dn_6001][gs_rewind]: build try host(192.168.3.63) port(15401) success
[2023-04-17 20:05:31.340][6481][dn_6001][gs_rewind]: fetching MOT checkpoint
[2023-04-17 20:05:31.391][6481][dn_6001][gs_ctl]: waiting for server to start...
.0 LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env.
0 LOG: [Alarm Module]Host Name: ptkmog2
0 LOG: [Alarm Module]Host IP: 192.168.3.64
0 LOG: [Alarm Module]Cluster Name: mogdb_cluster
0 WARNING: failed to open feature control file, please check whether it exists: FileName=gaussdb.version, Errno=2, Errmessage=No such file or directory.
0 WARNING: failed to parse feature control file: gaussdb.version.
0 WARNING: Failed to load the product control file, so gaussdb cannot distinguish product version.
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/var/log/coredump/
2023-04-17 20:05:31.487 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: when starting as multi_standby mode, we couldn't support data replicaton.
2023-04-17 20:05:31.491 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env.
2023-04-17 20:05:31.491 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]Host Name: ptkmog2
2023-04-17 20:05:31.491 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]Host IP: 192.168.3.64
2023-04-17 20:05:31.491 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: [Alarm Module]Cluster Name: mogdb_cluster
2023-04-17 20:05:31.494 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: loaded library "security_plugin"
2023-04-17 20:05:31.497 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] WARNING: could not create any HA TCP/IP sockets
2023-04-17 20:05:31.501 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2023-04-17 20:05:31.501 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: reserved memory for backend threads is: 340 MB
2023-04-17 20:05:31.501 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: reserved memory for WAL buffers is: 320 MB
2023-04-17 20:05:31.501 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: Set max backend reserve memory is: 660 MB, max dynamic memory is: 10752 MB
2023-04-17 20:05:31.501 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: shared memory 363 Mbytes, memory context 11412 Mbytes, max process memory 12288 Mbytes
2023-04-17 20:05:31.518 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [CACHE] LOG: set data cache size(402653184)
2023-04-17 20:05:31.526 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [CACHE] LOG: set metadata cache size(134217728)
2023-04-17 20:05:31.545 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [SEGMENT_PAGE] LOG: Segment-page constants: DF_MAP_SIZE: 8156, DF_MAP_BIT_CNT: 65248, DF_MAP_GROUP_EXTENTS: 4175872, IPBLOCK_SIZE: 8168, EXTENTS_PER_IPBLOCK: 1021, IPBLOCK_GROUP_SIZE: 4090, BMT_HEADER_LEVEL0_TOTAL_PAGES: 8323072, BktMapEntryNumberPerBlock: 2038, BktMapBlockNumber: 25, BktBitMaxMapCnt: 512
2023-04-17 20:05:31.561 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: mogdb: fsync file "/opt/mogdb/data/gaussdb.state.temp" success
2023-04-17 20:05:31.561 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: create gaussdb state file success: db state(STARTING_STATE), server mode(Standby), connection index(1)
2023-04-17 20:05:31.562 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: max_safe_fds = 974, usable_fds = 1000, already_open = 16
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/var/log/coredump/
2023-04-17 20:05:31.564 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: the configure file /opt/mogdb/app/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user!
2023-04-17 20:05:31.564 [unknown] [unknown] localhost 47410437623488 0[0:0#0] 0 [BACKEND] LOG: Failed to parse cgroup config file.
.
[2023-04-17 20:05:33.399][6481][dn_6001][gs_ctl]: done
[2023-04-17 20:05:33.399][6481][dn_6001][gs_ctl]: server started (/opt/mogdb/data)
[2023-04-17 20:05:33.399][6481][dn_6001][gs_ctl]: fopen build pid file "/opt/mogdb/data/gs_build.pid" success
[2023-04-17 20:05:33.399][6481][dn_6001][gs_ctl]: fprintf build pid file "/opt/mogdb/data/gs_build.pid" success
[2023-04-17 20:05:33.416][6481][dn_6001][gs_ctl]: fsync build pid file "/opt/mogdb/data/gs_build.pid" success
[omm@ptkmog2 ~]$