1.x升级到2.6失败

nebula老版本:nebula-1.0.0.el7-5.x86_64.rpm
nebula新版本:nebula-graph-2.6.0.el7.x86_64.rpm
参考升级文档连接:升级历史版本至当前版本 - Nebula Graph Database 手册

linux版本:Linux 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

1.x的安装目录:/usr/local/nebula_v1
2.6的安装目录: /usr/local/nebula_v2

先执行1.x到2.6的etc配置覆盖,并启动2.6的metad,nebula-metad.ERROR显示如下:
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
E0726 14:51:22.330767 30882 FileUtils.cpp:370] Failed to read the directory “data/meta/nebula” (2): No such file or directory
E0726 15:12:01.085906 30994 ActiveHostsMan.cpp:247] Get last update time failed, error: E_KEY_NOT_FOUND

  • 查看metad进程启动正常 ps -ef|grep nebula-mated
  • 在2.6的目录下执行 :mkdir -p data/storage
  • 在2.6的bin目录下执行:./db_upgrader --src_db_path=/usr/local/nebula_v1/data/storage --dst_db_path=/usr/local/nebula_v2/data/storage/ --upgrade_meta_server=127.0.0.1:45500 --upgrade_version=1
    日志打印如下:
===========================PARAMS============================
meta server: 127.0.0.1:45500
source data path: /usr/local/nebula_v1/data/storage
destination data path: /usr/local/nebula_v2/data/storage/
The size of the batch written: 100
upgrade data from version: 1
whether to compact all data: true
maximum number of concurrent parts allowed:10
maximum number of concurrent spaces allowed: 5
===========================PARAMS============================

I0726 15:12:01.083415 36586 DbUpgraderTool.cpp:114] Prepare phase begin
I0726 15:12:01.083742 36586 MetaClient.cpp:58] Create meta client to "127.0.0.1":45500
I0726 15:12:01.098573 36586 MetaClient.cpp:3013] Load leader ok
I0726 15:12:01.098693 36586 MetaClient.cpp:118] Register time task for heartbeat!
I0726 15:12:01.098714 36586 DbUpgraderTool.cpp:173] Prepare phase end
I0726 15:12:01.098721 36586 DbUpgraderTool.cpp:176] Upgrade phase bengin
I0726 15:12:01.098925 36590 DbUpgraderTool.cpp:187] Upgrade from path /usr/local/nebula_v1/data/storage to path /usr/local/nebula_v2/data/storage/ begin
I0726 15:12:01.099059 36590 DbUpgrader.cpp:1048] Upgrade from path /usr/local/nebula_v1/data/storage to path /usr/local/nebula_v2/data/storage/ in DbUpgrader run begin
E0726 15:12:01.099169 36590 MetaClient.cpp:1214] Space 1 not found!
E0726 15:12:01.099354 36590 DbUpgrader.cpp:72] Space id 1 no found
E0726 15:12:01.099364 36590 DbUpgrader.cpp:55] Init /usr/local/nebula_v1/data/storage space id 1 failed
W0726 15:12:01.099372 36590 DbUpgrader.cpp:1059] Upgrade from path /usr/local/nebula_v1/data/storage space id 1 to path /usr/local/nebula_v2/data/storage/ init failed
W0726 15:12:01.099380 36590 DbUpgrader.cpp:1061] Ignore upgrade /usr/local/nebula_v1/data/storage space id 1
E0726 15:12:01.099392 36590 MetaClient.cpp:1214] Space 4 not found!
E0726 15:12:01.099400 36590 DbUpgrader.cpp:72] Space id 4 no found
E0726 15:12:01.099407 36590 DbUpgrader.cpp:55] Init /usr/local/nebula_v1/data/storage space id 4 failed
W0726 15:12:01.099414 36590 DbUpgrader.cpp:1059] Upgrade from path /usr/local/nebula_v1/data/storage space id 4 to path /usr/local/nebula_v2/data/storage/ init failed
W0726 15:12:01.099421 36590 DbUpgrader.cpp:1061] Ignore upgrade /usr/local/nebula_v1/data/storage space id 4
I0726 15:12:01.099426 36590 DbUpgrader.cpp:1075] Max concurrenct spaces: 0
I0726 15:12:01.099431 36590 DbUpgrader.cpp:1085] Upgrade from path /usr/local/nebula_v1/data/storage to path /usr/local/nebula_v2/data/storage/ in DbUpgrader run end
I0726 15:12:01.099435 36590 DbUpgraderTool.cpp:195] Upgrade from path /usr/local/nebula_v1/data/storage to path /usr/local/nebula_v2/data/storage/ end
I0726 15:12:01.099568 36586 DbUpgraderTool.cpp:204] Upgrade phase end
  • 在2.6版本的storage目录下未发现任何数据

请问出现上面异常时什么原因呢?

问题已解决,看了升级的源码之后发现拷贝错了meta目录,应该cp {nebula_home}/data/meta目录

2 个赞

最终是准备升级到3.5版本吗?可以把升级过程记录下来给大家学习下,毕竟1.0这么老的版本了,用了这么久 :joy:

是的,准备升级到3.5,这个过程估计有点复杂,除了考虑语法兼容问题以外服务还不能停机,到时候弄完了我梳理一下过程 :grinning:

嗯嗯,过程估计比较复杂,不过很有参考价值

此话题已在最后回复的 7 天后被自动关闭。不再允许新回复。