部署之后如何修改集群数据文件存储目录,部署的时候发现全部放在home 下, 还有在部署的时候怎么修改
关闭observer,将文件转换至新目录,在原来的位置创建软连接即可。
停掉 ob。 在软件目录下找到 store 目录下的 sstable 和 slog,移动到 /data/1 下,找到 clog 移动到/data/log1。然后用 ln 命令在原位置建一个软链接
示例如下,根据实际目录情况修改。
ln -s /data/1/stable /home/admin/myoceanbase/store/sstable
你的部署方式是什么,
例如obd 部署:
将 oceanbase-ce 和 obproxy-ce 部署到 /data/demo 下并根据组件建立对应的工作目录
obd demo -c oceanbase-ce,obproxy-ce --home_path=/data/demo
指定部署全部组件的安装路径
obd demo --home_path=/path
指定部署特定组件的安装路径
将 oceanbase-ce 部署到家目录下并根据组件建立对应的工作目录,而 obproxy-ce 部署到 /data/demo/obproxy-ce
obd demo -c oceanbase-ce,obproxy-ce --obproxy-ce.home_path=/data/demo/
更多详细的可参考
https://www.oceanbase.com/docs/community-obd-cn-10000000001690698
1、如何修改集群数据文件存储目录这个问题,可以通过软链接的方式来解决,上面其他人给出解决方案可以参考;
2、在部署的时候怎么修改? 这个得看你是采用什么方式部署的,如果是obd部署的,那么在部署的修改一些相关的配置文件应该可以了。obd命令行支持编辑配置文件。
–home_path=可以指定安装的路径;粒度更细的化,可以修改obd部署使用的配置文件来实现灵活部署。
原先使用obd部署的,重启用的/home/admin/myoceanbase/oceanbase/bin/observer ,发现原先启动是带有参数的
,这个应该是怎么启动,现在发现其他节点起不来
[2024-07-09 21:51:42.868660] INFO [RPC.FRAME] batch_rpc_easy_timer_cb (ob_net_easy.cpp:641) [27283][BatchIO][T0][Y0-0000000000000000-0-0] [lt=3] [BATCH_RPC EASY STAT](log_str=conn count=0/0, request done=0/0, request doing=0/0)
[2024-07-09 21:51:42.868667] INFO [RPC.FRAME] mysql_easy_timer_cb (ob_net_easy.cpp:676) [27291][MysqlUnix][T0][Y0-0000000000000000-0-0] [lt=2] [MYSQL EASY STAT](log_str=conn count=0/0, request done=0/0, request doing=0/0)
[2024-07-09 21:51:42.868675] INFO [RPC.FRAME] batch_rpc_easy_timer_cb (ob_net_easy.cpp:641) [27280][BatchIO][T0][Y0-0000000000000000-0-0] [lt=1] [BATCH_RPC EASY STAT](log_str=conn count=0/0, request done=0/0, request doing=0/0)
[2024-07-09 21:51:42.868690] INFO [RPC.FRAME] rpc_easy_timer_cb (ob_net_easy.cpp:603) [27276][RpcIO][T0][Y0-0000000000000000-0-0] [lt=2] [RPC EASY STAT](log_str=conn count=0/0, request done=0/0, request doing=0/0)
[2024-07-09 21:51:42.869211] INFO eloop_run (eloop.c:127) [27181][pnio1][T0][Y0-0000000000000000-0-0] [lt=8] PNIO [ratelimit] time: 1720533102869210, bytes: 4411236806, bw: 0.056690 MB/s, add_ts: 1007450, add_bytes: 59887
[2024-07-09 21:51:42.869273] INFO [RPC.FRAME] batch_rpc_easy_timer_cb (ob_net_easy.cpp:641) [27284][BatchIO][T0][Y0-0000000000000000-0-0] [lt=3] [BATCH_RPC EASY STAT](log_str=conn count=0/0, request done=0/0, request doing=0/0)
[2024-07-09 21:51:42.872813] INFO [SHARE.PT] update (ob_rpc_ls_table.cpp:196) [27204][LSSysTblUp0][T0][YB42C0A80C0C-00061A9C5803858D-0-0] [lt=1] update sys_tenant’s ls replica(ret=-4122, ret=“OB_RPC_POST_ERROR”, replica={modify_time_us:0, create_time_us:0, tenant_id:1, ls_id:{id:1}, server:“192.168.12.12:2882”, sql_port:2881, role:2, member_list:[{server:“192.168.12.11:2882”, timestamp:1}, {server:“192.168.12.12:2882”, timestamp:1}, {server:“192.168.12.13:2882”, timestamp:1}], replica_type:0, proposal_id:10, replica_status:“NORMAL”, restore_status:{status:0}, property:{memstore_percent_:100}, unit_id:2, zone:“zone2”, paxos_replica_number:3, data_size:0, required_size:0, in_member_list:false, member_time_us:0, learner_list:{learner_num:0, learner_array:[]}, in_learner_list:false, rebuild:false})
[2024-07-09 21:51:42.872852] INFO [SHARE.PT] update (ob_ls_table_operator.cpp:145) [27204][LSSysTblUp0][T0][YB42C0A80C0C-00061A9C5803858D-0-0] [lt=0] update ls replica(ret=-4122, ret=“OB_RPC_POST_ERROR”, time_used=57, replica={modify_time_us:0, create_time_us:0, tenant_id:1, ls_id:{id:1}, server:“192.168.12.12:2882”, sql_port:2881, role:2, member_list:[{server:“192.168.12.11:2882”, timestamp:1}, {server:“192.168.12.12:2882”, timestamp:1}, {server:“192.168.12.13:2882”, timestamp:1}], replica_type:0, proposal_id:10, replica_status:“NORMAL”, restore_status:{status:0}, property:{memstore_percent_:100}, unit_id:2, zone:“zone2”, paxos_replica_number:3, data_size:0, required_size:0, in_member_list:false, member_time_us:0, learner_list:{learner_num:0, learner_array:[]}, in_learner_list:false, rebuild:false}, inner_table_only=false)
[2024-07-09 21:51:42.883239] INFO [SHARE.PT] update (ob_rpc_ls_table.cpp:196) [27204][LSSysTblUp0][T0][YB42C0A80C0C-00061A9C5803858E-0-0] [lt=1] update sys_tenant’s ls replica(ret=-4122, ret=“OB_RPC_POST_ERROR”, replica={modify_time_us:0, create_time_us:0, tenant_id:1, ls_id:{id:1}, server:“192.168.12.12:2882”, sql_port:2881, role:2, member_list:[{server:“192.168.12.11:2882”, timestamp:1}, {server:“192.168.12.12:2882”, timestamp:1}, {server:“192.168.12.13:2882”, timestamp:1}], replica_type:0, proposal_id:10, replica_status:“NORMAL”, restore_status:{status:0}, property:{memstore_percent_:100}, unit_id:2, zone:“zone2”, paxos_replica_number:3, data_size:0, required_size:0, in_member_list:false, member_time_us:0, learner_list:{learner_num:0, learner_array:[]}, in_learner_list:false, rebuild:false})
[2024-07-09 21:51:42.883259] INFO [SHARE.PT] update (ob_ls_table_operator.cpp:145) [27204][LSSysTblUp0][T0][YB42C0A80C0C-00061A9C5803858E-0-0] [lt=1] update ls replica(ret=-4122, ret=“OB_RPC_POST_ERROR”, time_used=37, replica={modify_time_us:0, create_time_us:0, tenant_id:1, ls_id:{id:1}, server:“192.168.12.12:2882”, sql_port:2881, role:2, member_list:[{server:“192.168.12.11:2882”, timestamp:1}, {server:“192.168.12.12:2882”, timestamp:1}, {server:“192.168.12.13:2882”, timestamp:1}], replica_type:0, proposal_id:10, replica_status:“NORMAL”, restore_status:{status:0}, property:{memstore_percent_:100}, unit_id:2, zone:“zone2”, paxos_replica_number:3, data_size:0, required_size:0, in_member_list:false, member_time_us:0, learner_list:{learner_num:0, learner_array:[]}, in_learner_list:false, rebuild:false}, inner_table_only=false)
1、首次启动可以在进程带有参数信息,会保存在本地配置文件中;
2、重新启动, 不需要自己再带参数,在etc/observer.config.bin有记录上次启动的配置参数,你可以查看确定一下。
3、不要直接/home/admin/myoceanbase/oceanbase/bin/observer这样启动,
试试下面的方法启动看是否可以解决
进入到/home/admin/myoceanbase/oceanbase
然后./bin/observer