对Mogdb 3.0.3 使用 gs_ctl build -D /dir -b full -M standby 进行主备建立时,日志有告警信息如下:
[gs_ctl]: exists illegal characters backup_label, dn_6001
[gs_ctl]: receiving and unpacking files...
[gs_ctl]: exists illegal characters pg_hba.conf.bak, dn_6001 ,
[gs_ctl]: exists illegal characters pg_snapshots/, dn_6001 ,
[gs_ctl]: exists illegal characters postmaster.pid.lock, dn_6001 ,
[gs_ctl]: exists illegal characters pg_serial/, dn_6001
[gs_ctl]: exists illegal characters pg_xlog/, dn_6001
[gs_ctl]: exists illegal characters pg_multixact/, dn_6001
[gs_ctl]: exists illegal characters pg_multixact/members/, dn_6001 ,
[gs_ctl]: exists illegal characters pg_errorinfo/, dn_6001 ,
[gs_ctl]: exists illegal characters base/16014/15446, dn_6001 ,
[gs_ctl]: exists illegal characters base/16019/15456, dn_6001 ,
[gs_ctl]: exists illegal characters global/15440_fsm, dn_6001 ,
[gs_ctl]: exists illegal characters global/15747, dn_6001 ,
[gs_ctl]: exists illegal characters global/15819, dn_6001 ,
日志我摘抄了其中一部分,看日志意思应该是主备建立后备库觉得这些从主库同步来的数据文件(mogdb主库进程启动时指定的数据目录)不合法,但opengauss在执行如上命令时不会有这些警告信息。
告警信息不影响最终备份的结果,最终可以完成。但在备库断电后,备库再次重新启动后就会失败,日志如下:
[2023-12-11 09:08:17.389][1631][][gs_ctl]: gs_ctl started,datadir is /backup/db
[2023-12-11 09:08:17.678][1631][][gs_ctl]: waiting for server to start...
.0 LOG: [Alarm Module]can not read GAUSS_WARNING_TYPE env.
0 LOG: [Alarm Module]Host Name: 5432
0 LOG: [Alarm Module]Host IP: 0.0.21.56
0 LOG: [Alarm Module]Get ENV GS_CLUSTER_NAME failed!
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:|/usr/lib/systemd/
2023-12-11 09:08:17.808 65766101.1 [unknown] 140497251760320 [unknown] 0 dn_6001 DB010 0 [REDO] LOG: Recovery parallelism, cpu count = 4, max = 4, actual = 4
2023-12-11 09:08:17.808 65766101.1 [unknown] 140497251760320 [unknown] 0 dn_6001 DB010 0 [REDO] LOG: ConfigRecoveryParallelism, true_max_recovery_parallelism:4, max_recovery_parallelism:4
Failed to read gaussdb.state: 0Failed to set gaussdb.state with UNKNOWN_STATE[2023-12-11 09:08:18.679][1631][][gs_ctl]: waitpid 1673 failed, exitstatus is 256, ret is 2
[2023-12-11 09:08:18.679][1631][][gs_ctl]: stopped waiting
[2023-12-11 09:08:18.679][1631][][gs_ctl]: could not start server