关于GBase的双机HAC配置不成功的问题
【GBase版本】:
GBase8sV8.8_TL_3.6.3_3X2_1_783c8d_RHEL6_x86_64
【操作系统】:
Kylin-Server-V10-SP3-2403-Release-20240426-X86_64 (银河麒麟服务器高级版本V10)
【CPU】:
虚拟机CPU (x64 2核2线程)
【问题描述】*:
我是按教程 安装和配置 | GBASE南大通用 来操作的。我的节点信息如下:
primary 172.16.30.213 9088
secondary 172.16.30.214 9088
我只验证同城双机,所以只准备了这两个节点。
先是primary的相关配置如下
其中primary的相关配置如下:
/home/gbasedbt/profile.gbaseserver:
[ -f ~/.bashrc ] && . ~/.bashrcexport GBASEDBTSERVER=gbaseserverexport GBASEDBTDIR=/opt/GBASE/gbaseexport ONCONFIG=onconfig.gbaseserverexport GBASEDBTSQLHOSTS=$GBASEDBTDIR/etc/sqlhosts.gbaseserverexport PATH=$GBASEDBTDIR/bin:$GBASEDBTDIR/sbin:/usr/bin:${PATH}:.export GL_DATE="%iY-%m-%d" export DATETIME="%iY-%m-%d %H:%M:%S" export DB_LOCALE=zh_cn.GB18030-2000 export CLIENT_LOCALE=zh_cn.GB18030-2000 export LD_LIBRARY_PATH=${GBASEDBTDIR}/lib:${GBASEDBTDIR}/lib/esql:${GBASEDBTDIR}/lib/cli export TERM=vt100 export TERMCAP=$GBASEDBTDIR/etc/termcap export GBASEDBTTERM=termcap export DBTEMP=$GBASEDBTDIR/tmp
/opt/GBASE/gbase/etc/sqlhosts.gbaseserver:
#**************************************************************************## Licensed Material - Property Of GBASE## "Restricted Materials of GBASE"## GBase# Copyright General Data Corp. 2014, 2015## Title: sqlhosts.demo# Description: Default sqlhosts file for running demos.##**************************************************************************# The connectivity information for each database server includes four fields# of required information and one optional field. You can also configure# database server groups.## The format for the five fields of connectivity information for a database# server is one line in the UNIX sqlhosts file, as follows:## ## dbservername is the name of a database server on the network.## nettype is an 8-character string specifying the protocol in this format:## ddiiippp## where# dd = Database product [|ol|on|dr]# iii = Interface type [ipc|soc|tli|sql]# ppp = Protocol [imc|nmp|shm|spx|str|tcp|ssl|mux]## hostname is the name of the computer where the database server resides.## servicename is a service name entry from the services file.## options in the fifth field:## b=# c=# g=# i=# e=# m=# k=# r=# s=# csm=# cfd=## To create an entry for a group, put a group name in the dbservername field,# the word group in the nettype field, a hyphen in both the hostname and the# servicename fileds, and i= in the options field.## For additional information on the parameters, see the GBase# Administrator's Guide.#**************************************************************************# IANA (www.iana.org) assigned port number/service names for GBase:# sqlexec 9088/tcp# sqlexec-ssl 9089/tcp
demo_on onipcshm on_hostname on_servernamegbaseserver onsoctcp 172.16.30.213 9088gbaseserver_hac onsoctcp 172.16.30.214 9088
/opt/GBASE/gbase/etc/onconfig.gbaseserver(由于内容过多,我只粘贴修改了的部分)
ROOTNAME rootdbsROOTPATH $GBASEDBTDIR/gbaseserver_dbs/rootdbsROOTSIZE 300000PHYSFILE 50000MSGPATH $GBASEDBTDIR/tmp/gbaseserver.logDBSPACETEMP dbspacetempSBSPACETEMP sbspacetempSBSPACENAME sbspaceSERVERNUM 1DBSERVERNAME gbaseserverDRAUTO 3
/home/gbasedbt/.rhosts:
172.16.30.213 gbasedbt172.16.30.214 gbasedbt
系统其他配置如文档描述那样配置的
然后是secondary的相关配置如下
/home/gbasedbt/profile.gbaseserver_hac:
export GBASEDBTSERVER=gbaseserver_hacexport GBASEDBTDIR=/opt/GBASE/gbaseexport ONCONFIG=onconfig.gbaseserver_hacexport GBASEDBTSQLHOSTS=$GBASEDBTDIR/etc/sqlhosts.gbaseserver_hacexport PATH=$GBASEDBTDIR/bin:$GBASEDBTDIR/sbin:/usr/bin:${PATH}:.export GL_DATE="%iY-%m-%d" export DATETIME="%iY-%m-%d %H:%M:%S" export DB_LOCALE=zh_cn.GB18030-2000 export CLIENT_LOCALE=zh_cn.GB18030-2000 export LD_LIBRARY_PATH=${GBASEDBTDIR}/lib:${GBASEDBTDIR}/lib/esql:${GBASEDBTDIR}/lib/cli export TERM=vt100 export TERMCAP=$GBASEDBTDIR/etc/termcap export GBASEDBTTERM=termcap export DBTEMP=$GBASEDBTDIR/tmp
/opt/GBASE/gbase/etc/sqlhosts.gbaseserver_hac:
#**************************************************************************## Licensed Material - Property Of GBASE## "Restricted Materials of GBASE"## GBase# Copyright General Data Corp. 2014, 2015## Title: sqlhosts.demo# Description: Default sqlhosts file for running demos.##**************************************************************************# The connectivity information for each database server includes four fields# of required information and one optional field. You can also configure# database server groups.## The format for the five fields of connectivity information for a database# server is one line in the UNIX sqlhosts file, as follows:## ## dbservername is the name of a database server on the network.## nettype is an 8-character string specifying the protocol in this format:## ddiiippp## where# dd = Database product [|ol|on|dr]# iii = Interface type [ipc|soc|tli|sql]# ppp = Protocol [imc|nmp|shm|spx|str|tcp|ssl|mux]## hostname is the name of the computer where the database server resides.## servicename is a service name entry from the services file.## options in the fifth field:## b=# c=# g=# i=# e=# m=# k=# r=# s=# csm=# cfd=## To create an entry for a group, put a group name in the dbservername field,# the word group in the nettype field, a hyphen in both the hostname and the# servicename fileds, and i= in the options field.## For additional information on the parameters, see the GBase# Administrator's Guide.#**************************************************************************# IANA (www.iana.org) assigned port number/service names for GBase:# sqlexec 9088/tcp# sqlexec-ssl 9089/tcp
demo_on onipcshM on_hostname on_servernamegbaseserver onsoctcp 172.16.30.213 9088gbaseserver_hac onsoctcp 172.16.30.214 9088
/opt/GBASE/gbase/etc/onconfig.gbaseserver_hac
ROOTNAME rootdbsROOTPATH $GBASEDBTDIR/gbaseserver_dbs/rootdbsROOTOFFSET 0ROOTSIZE 300000PHYSFILE 50000MSGPATH $GBASEDBTDIR/tmp/gbaseserver.logDBSPACETEMP dbspacetemp SBSPACETEMP sbspacetempSBSPACENAME sbspaceSERVERNUM 10DBSERVERNAME gbaseserver_hacDRAUTO 3
/home/gbasedbt/.rhosts:
172.16.30.213 gbasedbt
172.16.30.214 gbasedbt
服务器其他配置和primary保持一致。
我在172.16.30.213(primary)上执行 oninit -ivwy得到如下结果:Your evaluation license will expire on 2026-11-03 00:00:00Reading configuration file '/opt/GBASE/gbase/etc/onconfig.gbaseserver'...succeededCreating /GBASEDBTTMP/.infxdirs...succeededAllocating and attaching to shared memory...succeededCreating resident pool 4310 kbytes...succeededCreating infos file "/opt/GBASE/gbase/etc/.infos.gbaseserver"...succeededLinking conf file "/opt/GBASE/gbase/etc/.conf.gbaseserver"...succeededInitializing rhead structure...rhlock_t 16384 (512K)... rlock_t (2656K)... Writing to infos file...succeededInitialization of Encryption...succeededInitializing ASF...succeededInitializing Dictionary Cache and SPL Routine Cache...succeededBringing up ADM VP...succeededCreating VP classes...succeededForking main_loop thread...succeededInitializing DR structures...succeededForking 1 'soctcp' listener threads...succeededStarting tracing...succeededInitializing 8 flushers...succeededInitializing SDS Server network connections...succeededInitializing log/checkpoint information...succeededInitializing dbspaces...succeededOpening primary chunks...succeededValidating chunks...succeededInitialize Async Log Flusher...succeededStarting B-tree Scanner...succeededInit ReadAhead Daemon...succeededInit DB Util Daemon...succeededInitializing DBSPACETEMP list...succeededInit Auto Tuning Daemon...succeededChecking database partition index...succeededInitializing dataskip structure...succeededChecking for temporary tables to drop...succeededUpdating Global Row Counter...succeededForking onmode_mon thread...succeededCreating periodic thread...succeededCreating periodic thread...succeededStarting scheduling system...succeededVerbose output complete: mode = 5
查看onstat -g dri得到如下结果:Your evaluation license will expire on 2026-11-03 00:00:00On-Line (Prim) -- Up 00:15:09 -- 156976 KbytesBlocked:LAST_LOG_RESERVED4BACKUP
Data Replication at 0x45fe5028: Type State Paired server Last DR CKPT (id/pg) Supports Proxy Writes primary off gbaseserver_hac -1 / -1 NA
DRINTERVAL 0 DRTIMEOUT 30 DRAUTO 3 DRLOSTFOUND /opt/GBASE/gbase/etc/dr.lostfound DRIDXAUTO 0 ENCRYPT_HDR 0 Backlog 0 Nothing Sent Nothing Received No Pings Last log page applied(log id,page): 0,0
然后再去172.16.30.214(secondary)上执行:
[gbasedbt@localhost gbase]$ ontape -s -L 0 -t STDIO | ssh 172.16.30.214 "source /home/gbasedbt/profile.gbaseserver_hac && ontape -p -t STDIO "Your evaluation license will expire on 2026-11-03 00:00:00Shared memory not initialized for GBASEDBTSERVER 'gbaseserver_hac'.
Authorized users only. All activities may be monitored and reported.gbasedbt@172.16.30.214's password: Your evaluation license will expire on 2026-11-03 00:00:00Physical restore failed - function read archive backup failed code -1 errno 0
我都不知道备机上失败的原因是什么,因为tmp/gbaseserver.log里都没有记录日志。使用onstat -m也没有对应的日志。
我不确定教程上面提到的“确保可正常启动数据库服务但是不需要启动数据库服务”怎么check,“主节点进行0级全备”应该要做什么操作。这些概念对于刚接触GBase 8s的人还不了解。
请问我的双机安装配置是哪里出了问题,我应该在哪里能看到错误日志。是否有能做技术沟通的即时渠道,我们后续会持续使用该库以应对信创,所以有迫切的想要掌握该库的基本使用的愿望。
评论
如果是有项目上后续会用的话,建议还是联系上项目销售,去申请专门的技术支持支撑,安装个测试环境之类的,手册上只是一个简单的教程,实际上这么装上去之后项目里后续使用还是会存在数据空间不足等问题。
如果单纯只是先学习的话,需要先把单机的手动安装步骤先学好,理解调的这些参数都是什么意思,怎么去调整配置,再安装备机,因为安装的时候备机就是一个主机的镜像,完全还原主机,有难度
主节点状态都不对了,继续不下去。。
执行onmode -wf LTAPEDEV=/dev/null 暂时不进行逻辑日志备份吧。该参数需要备机同时改。
热门帖子
- 12025-12-01浏览数:182759
- 22023-05-09浏览数:25052
- 42023-09-25浏览数:18521
- 52020-05-11浏览数:17526