博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ob简易版合设部署
阅读量:2065 次
发布时间:2019-04-29

本文共 21303 字,大约阅读时间需要 71 分钟。

1、主机规划

主机名

ip

内存(G)

cpu

安装软件

占用端口

mgr1

172.16.80.57

128

32

observer(zone1)、obclient

3881、3882、

4881、4882

mgr2

172.16.80.58

128

32

observer(zone2)、obclient、obproxy

3881、3882、

4881、4882、3883

mgr3

172.16.80.59

128

32

observer(zone3)、obclient

3881、3882、

4881、4882

2、所有主机初始化

按照文档

执行:

【2、所有主机初始化(关键步骤)】对主机初始化

【3、安装ob集群--安装oceanbase软件、安装obclient】

3、清理目录(第一次部署不用)

三个主机都要执行:

kill掉observer进程

ps -ef|grep observer

image.png

kill -9 17397 19716

/bin/rm -rf ~/{node1,node2} /data/{1,log1}/{node1,node2}

4、创建目录

三个主机都要执行:

su - admin

for i in {node1,node2};    do \

echo $i; \

mkdir -p ~/$i/{admin,bin,etc}; cp ~/oceanbase/bin/* ~/$i/bin/;cd ~; \

cp ~/oceanbase/admin/* ~/$i/admin/;cd ~; \

cp -r ~/oceanbase/etc/* ~/$i/etc/;cd ~; \

rm -f ~/$i/etc/observer.config.bin;rm -f ~/$i/etc/observer.config.bin.history;cd ~; \

mkdir -p /data/1/$i/obcc/{etc3,sort_dir,sstable} /data/log1/$i/obcc/{clog,etc2,ilog,slog,oob_clog} ;\

mkdir -p ~/$i/store/obcc; \

for t in {etc3,sort_dir,sstable};do ln -s /data/1/$i/obcc/$t /home/admin/$i/store/obcc/$t; done; \

for t in {clog,etc2,ilog,slog,oob_clog};do ln -s /data/log1/$i/obcc/$t /home/admin/$i/store/obcc/$t; done; \

done

tree ~/node*

tree /data/{1,log1}/node*

5、初始化OB集群

mgr1(zone1):

su - admin

cd /home/admin/node1/ && /home/admin/node1/bin/observer -i ens5f0 -p 3881 -P 3882 -z zone1 -d /home/admin/node1/store/obcc -r '172.16.80.57:3882:3881;172.16.80.58:3882:3881;172.16.80.59:3882:3881' -c 20210219 -n obcc -o "memory_limit=8G,cache_wash_threshold=1G,row_purge_thread_count=1,net_thread_count=1,enable_syslog_recycle=True,enable_merge_by_turn=FALSE,cpu_count=16,location_refresh_thread_count=2,max_syslog_file_count=3,major_freeze_duty_time=Disable,__easy_memory_limit=1G,schema_history_expire_time=1d,merge_thread_count=1,writing_throttling_trigger_percentage=70,_max_trx_size=2M,workers_per_cpu_quota=2,enable_separate_sys_clog=0,datafile_disk_percentage=50,__min_full_resource_pool_memory=536870912,system_memory=5G,memory_chunk_cache_size=128M,trace_log_slow_query_watermark=10s,writing_throttling_maximum_duration=1m,switchover_process_thread_count=1,datafile_size=10G,minor_freeze_times=500,stack_size=1536K,disk_io_thread_coun=1,config_additional_dir=/data/1/node1/obcc/etc3;/data/log1/node1/obcc/etc2"  

 

cd /home/admin/node2/ && /home/admin/node2/bin/observer -i ens5f0 -p 4881 -P 4882 -z zone1 -d /home/admin/node2/store/obcc -r '172.16.80.57:4882:4881;172.16.80.58:4882:4881;172.16.80.59:4882:4881' -c 20210219 -n obcc -o "memory_limit=8G,cache_wash_threshold=1G,row_purge_thread_count=1,net_thread_count=1,enable_syslog_recycle=True,enable_merge_by_turn=FALSE,cpu_count=16,location_refresh_thread_count=2,max_syslog_file_count=3,major_freeze_duty_time=Disable,__easy_memory_limit=1G,schema_history_expire_time=1d,merge_thread_count=1,writing_throttling_trigger_percentage=70,_max_trx_size=2M,workers_per_cpu_quota=2,enable_separate_sys_clog=0,datafile_disk_percentage=50,__min_full_resource_pool_memory=536870912,system_memory=5G,memory_chunk_cache_size=128M,trace_log_slow_query_watermark=10s,writing_throttling_maximum_duration=1m,switchover_process_thread_count=1,datafile_size=10G,minor_freeze_times=500,stack_size=1536K,disk_io_thread_coun=1,config_additional_dir=/data/1/node2/obcc/etc3;/data/log1/node2/obcc/etc2"  

 

mgr2(zone2):

su - admin

cd /home/admin/node1/ && /home/admin/node1/bin/observer -i ens5f0 -p 3881 -P 3882 -z zone2 -d /home/admin/node1/store/obcc -r '172.16.80.57:3882:3881;172.16.80.58:3882:3881;172.16.80.59:3882:3881' -c 20210219 -n obcc -o "memory_limit=8G,cache_wash_threshold=1G,row_purge_thread_count=1,net_thread_count=1,enable_syslog_recycle=True,enable_merge_by_turn=FALSE,cpu_count=16,location_refresh_thread_count=2,max_syslog_file_count=3,major_freeze_duty_time=Disable,__easy_memory_limit=1G,schema_history_expire_time=1d,merge_thread_count=1,writing_throttling_trigger_percentage=70,_max_trx_size=2M,workers_per_cpu_quota=2,enable_separate_sys_clog=0,datafile_disk_percentage=50,__min_full_resource_pool_memory=536870912,system_memory=5G,memory_chunk_cache_size=128M,trace_log_slow_query_watermark=10s,writing_throttling_maximum_duration=1m,switchover_process_thread_count=1,datafile_size=10G,minor_freeze_times=500,stack_size=1536K,disk_io_thread_coun=1,config_additional_dir=/data/1/node1/obcc/etc3;/data/log1/node1/obcc/etc2"  

 

cd /home/admin/node2/ && /home/admin/node2/bin/observer -i ens5f0 -p 4881 -P 4882 -z zone2 -d /home/admin/node2/store/obcc -r '172.16.80.57:4882:4881;172.16.80.58:4882:4881;172.16.80.59:4882:4881' -c 20210219 -n obcc -o "memory_limit=8G,cache_wash_threshold=1G,row_purge_thread_count=1,net_thread_count=1,enable_syslog_recycle=True,enable_merge_by_turn=FALSE,cpu_count=16,location_refresh_thread_count=2,max_syslog_file_count=3,major_freeze_duty_time=Disable,__easy_memory_limit=1G,schema_history_expire_time=1d,merge_thread_count=1,writing_throttling_trigger_percentage=70,_max_trx_size=2M,workers_per_cpu_quota=2,enable_separate_sys_clog=0,datafile_disk_percentage=50,__min_full_resource_pool_memory=536870912,system_memory=5G,memory_chunk_cache_size=128M,trace_log_slow_query_watermark=10s,writing_throttling_maximum_duration=1m,switchover_process_thread_count=1,datafile_size=10G,minor_freeze_times=500,stack_size=1536K,disk_io_thread_coun=1,config_additional_dir=/data/1/node2/obcc/etc3;/data/log1/node2/obcc/etc2"  

 

mgr3(zone3):

su - admin

cd /home/admin/node1/ && /home/admin/node1/bin/observer -i ens5f0 -p 3881 -P 3882 -z zone3 -d /home/admin/node1/store/obcc -r '172.16.80.57:3882:3881;172.16.80.58:3882:3881;172.16.80.59:3882:3881' -c 20210219 -n obcc -o "memory_limit=8G,cache_wash_threshold=1G,row_purge_thread_count=1,net_thread_count=1,enable_syslog_recycle=True,enable_merge_by_turn=FALSE,cpu_count=16,location_refresh_thread_count=2,max_syslog_file_count=3,major_freeze_duty_time=Disable,__easy_memory_limit=1G,schema_history_expire_time=1d,merge_thread_count=1,writing_throttling_trigger_percentage=70,_max_trx_size=2M,workers_per_cpu_quota=2,enable_separate_sys_clog=0,datafile_disk_percentage=50,__min_full_resource_pool_memory=536870912,system_memory=5G,memory_chunk_cache_size=128M,trace_log_slow_query_watermark=10s,writing_throttling_maximum_duration=1m,switchover_process_thread_count=1,datafile_size=10G,minor_freeze_times=500,stack_size=1536K,disk_io_thread_coun=1,config_additional_dir=/data/1/node1/obcc/etc3;/data/log1/node1/obcc/etc2"  

 

cd /home/admin/node2/ && /home/admin/node2/bin/observer -i ens5f0 -p 4881 -P 4882 -z zone3 -d /home/admin/node2/store/obcc -r '172.16.80.57:4882:4881;172.16.80.58:4882:4881;172.16.80.59:4882:4881' -c 20210219 -n obcc -o "memory_limit=8G,cache_wash_threshold=1G,row_purge_thread_count=1,net_thread_count=1,enable_syslog_recycle=True,enable_merge_by_turn=FALSE,cpu_count=16,location_refresh_thread_count=2,max_syslog_file_count=3,major_freeze_duty_time=Disable,__easy_memory_limit=1G,schema_history_expire_time=1d,merge_thread_count=1,writing_throttling_trigger_percentage=70,_max_trx_size=2M,workers_per_cpu_quota=2,enable_separate_sys_clog=0,datafile_disk_percentage=50,__min_full_resource_pool_memory=536870912,system_memory=5G,memory_chunk_cache_size=128M,trace_log_slow_query_watermark=10s,writing_throttling_maximum_duration=1m,switchover_process_thread_count=1,datafile_size=10G,minor_freeze_times=500,stack_size=1536K,disk_io_thread_coun=1,config_additional_dir=/data/1/node2/obcc/etc3;/data/log1/node2/obcc/etc2"  

6、bootstrap集群(集群搭建是否成功的关键步骤)

选择一个机器,直接不输入密码

mysql -h127.1 -uroot -P3881 -p

Enter password:

set session ob_query_timeout=1000000000;  

alter system bootstrap ZONE 'zone1' SERVER '172.16.80.57:3882', ZONE 'zone2' SERVER '172.16.80.58:3882', ZONE 'zone3' SERVER '172.16.80.59:3882' ;

alter user root identified by '******';

 

注意:

如果这一步失败报错了,其原因很可能就是三节点或单节点的 observer 进程启动参数有不对、observer 相关目录权限不对、日志目录空间不足一定比例(跟数据目录合用了大目录,空间被数据目录占用了)、三节点时间不同步、节点内存资源不足等等。请先排查这些问题点后,然后从【清理ob目录】开始重新初始化

7、验证集群初始化成功

mysql -h127.1 -uroot@sys -P3881 -p -c -A

show databases; --显示oceanbase即可

MySQL [(none)]> show databases;

+--------------------+

| Database           |

+--------------------+

| oceanbase          |

| information_schema |

| mysql              |

| SYS                |

| LBACSYS            |

| ORAAUDITOR         |

| test               |

+--------------------+

7 rows in set (0.00 sec)

8、扩容

alter system add server '172.16.80.57:4882' zone 'zone1';

alter system add server '172.16.80.58:4882' zone 'zone2';

alter system add server '172.16.80.59:4882' zone 'zone3' ;

9、验证主机资源

MySQL [(none)]> use oceanbase;

Database changed

select * from __all_server;

image.png

select a.zone,concat(a.svr_ip,':',a.svr_port) observer, cpu_total, (cpu_total-cpu_assigned) cpu_free,disk_total,(disk_total-disk_assigned) disk_free, round(mem_total/1024/1024/1024) mem_total_gb, round((mem_total-mem_assigned)/1024/1024/1024) mem_free_gb, usec_to_time(b.last_offline_time) last_offline_time, usec_to_time(b.start_service_time) start_service_time  

from __all_virtual_server_stat a join __all_server b on (a.svr_ip=b.svr_ip and a.svr_port=b.svr_port) order by a.zone, a.svr_ip;

image.png

select t1.name resource_pool_name, t2.`name` unit_config_name, t2.max_cpu, t2.min_cpu, round(t2.max_memory/1024/1024/1024) max_mem_gb, round(t2.min_memory/1024/1024/1024) min_mem_gb, t2.max_disk_size/1024/1024/1024 ,t2.max_session_num,t3.unit_id, t3.zone, concat(t3.svr_ip,':',t3.`svr_port`) observer,t4.tenant_id, t4.tenant_name

from __all_resource_pool t1 join __all_unit_config t2 on (t1.unit_config_id=t2.unit_config_id) join __all_unit t3 on (t1.`resource_pool_id` = t3.`resource_pool_id`)

left join __all_tenant t4 on (t1.tenant_id=t4.tenant_id)

order by t1.`resource_pool_id`, t2.`unit_config_id`, t3.unit_id;

image.png

10、创建租户

CREATE resource unit oracle_unit_config max_cpu=8, min_cpu=4, max_memory='1G', min_memory='1G', max_iops=10000, min_iops=1000, max_session_num=1000000, max_disk_size='100G';  

select * from __all_unit_config;

CREATE resource pool oracle_pool unit = 'oracle_unit_config', unit_num = 1;

select * from __all_resource_pool;

CREATE tenant oracle_cc resource_pool_list=('oracle_pool'), primary_zone='RANDOM',comment 'oracle tenant/instance', charset='utf8mb4' set ob_tcp_invited_nodes='%', ob_compatibility_mode='oracle';

select * from __all_tenant;

11、查询剩余资源

select a.zone,concat(a.svr_ip,':',a.svr_port) observer, cpu_total, (cpu_total-cpu_assigned) cpu_free,disk_total,(disk_total-disk_assigned) disk_free, round(mem_total/1024/1024/1024) mem_total_gb, round((mem_total-mem_assigned)/1024/1024/1024) mem_free_gb, usec_to_time(b.last_offline_time) last_offline_time, usec_to_time(b.start_service_time) start_service_time  

from __all_virtual_server_stat a join __all_server b on (a.svr_ip=b.svr_ip and a.svr_port=b.svr_port) order by a.zone, a.svr_ip;

image.png

select t1.name resource_pool_name, t2.`name` unit_config_name, t2.max_cpu, t2.min_cpu, round(t2.max_memory/1024/1024/1024) max_mem_gb, round(t2.min_memory/1024/1024/1024) min_mem_gb, t2.max_disk_size/1024/1024/1024 ,t2.max_session_num,t3.unit_id, t3.zone, concat(t3.svr_ip,':',t3.`svr_port`) observer,t4.tenant_id, t4.tenant_name

from __all_resource_pool t1 join __all_unit_config t2 on (t1.unit_config_id=t2.unit_config_id) join __all_unit t3 on (t1.`resource_pool_id` = t3.`resource_pool_id`)

left join __all_tenant t4 on (t1.tenant_id=t4.tenant_id)

order by t1.`resource_pool_id`, t2.`unit_config_id`, t3.unit_id;

image.png

12、初始化oracle租户的sys密码

由于oracle_cc的unit_num为1,且根据资源占用oracle的租户占用的是4882端口,所以要访问4881端口

obclient -h172.16.80.57 -usys@oracle_cc -P4881 -p -c -A

alter user sys identified by 123456;

13、创建普通用户和分区表

create user cc identified by ******;

grant dba to cc;

create table test_acid_a (id int, col1 char(10)) partition by hash(id) partitions 9;

insert into  test_acid_a  values(1,0),(2,0),(3,0),(4,0),(5,0),(6,0),(7,0),(8,0),(9,0),(10,0),(11,0),(12,0);

commit;

14、查看当前partition分布

SELECT  t.tenant_id, a.tenant_name, t.table_name, d.database_name,  tg.tablegroup_name , t.part_num , t2.partition_id, t2.ZONE, concat(t2.svr_ip,':',t2.svr_port)  

   , a.primary_zone      , IF(t.locality = '' OR t.locality IS NULL, a.locality, t.locality) AS locality    

FROM oceanbase.__all_tenant AS a  

   JOIN oceanbase.__all_virtual_database AS d ON ( a.tenant_id = d.tenant_id  )  

   JOIN oceanbase.__all_virtual_table AS t  ON (t.tenant_id = d.tenant_id AND t.database_id = d.database_id)  

   JOIN oceanbase.__all_virtual_meta_table t2 ON (t.tenant_id = t2.tenant_id AND (t.table_id=t2.table_id OR t.tablegroup_id=t2.table_id)  AND t2.ROLE IN (1) )

   LEFT JOIN oceanbase.__all_virtual_tablegroup AS tg ON (t.tenant_id = tg.tenant_id and  t.tablegroup_id = tg.tablegroup_id)  

WHERE t.table_type IN (3)    

ORDER BY t.tenant_id, tg.tablegroup_name, d.database_name, t.table_name, t2.partition_id

;

image.png

14、扩容oracle租户

(1)增大resource unit的内存

alter resource unit oracle_unit_config max_memory='2G';

alter resource unit oracle_unit_config min_memory='2G';

(2)增大unit的数量

alter resource pool oracle_pool unit_num=2;

 

OB 的租户扩容几乎是瞬间完成的。

当然生产环境有数据,扩容可能会引起数据负载均衡。

命令是立即返回,数据迁移是后台异步做的,根据数据量确定平滑迁移时间。这是 OB 独特之处

 

扩容后partition的分布(要等一段时间)

SELECT  t.tenant_id, a.tenant_name, t.table_name, d.database_name,  tg.tablegroup_name , t.part_num , t2.partition_id, t2.ZONE, concat(t2.svr_ip,':',t2.svr_port)  

   , a.primary_zone      , IF(t.locality = '' OR t.locality IS NULL, a.locality, t.locality) AS locality    

FROM oceanbase.__all_tenant AS a  

   JOIN oceanbase.__all_virtual_database AS d ON ( a.tenant_id = d.tenant_id  )  

   JOIN oceanbase.__all_virtual_table AS t  ON (t.tenant_id = d.tenant_id AND t.database_id = d.database_id)  

   JOIN oceanbase.__all_virtual_meta_table t2 ON (t.tenant_id = t2.tenant_id AND (t.table_id=t2.table_id OR t.tablegroup_id=t2.table_id)  AND t2.ROLE IN (1) )

   LEFT JOIN oceanbase.__all_virtual_tablegroup AS tg ON (t.tenant_id = tg.tenant_id and  t.tablegroup_id = tg.tablegroup_id)  

WHERE t.table_type IN (3)    

ORDER BY t.tenant_id, tg.tablegroup_name, d.database_name, t.table_name, t2.partition_id

;

image.png

(3)检查资源占用

select a.zone,concat(a.svr_ip,':',a.svr_port) observer, cpu_total, (cpu_total-cpu_assigned) cpu_free,disk_total,(disk_total-disk_assigned) disk_free, round(mem_total/1024/1024/1024) mem_total_gb, round((mem_total-mem_assigned)/1024/1024/1024) mem_free_gb, usec_to_time(b.last_offline_time) last_offline_time, usec_to_time(b.start_service_time) start_service_time  

from __all_virtual_server_stat a join __all_server b on (a.svr_ip=b.svr_ip and a.svr_port=b.svr_port) order by a.zone, a.svr_ip;

image.png

select t1.name resource_pool_name, t2.`name` unit_config_name, t2.max_cpu, t2.min_cpu, round(t2.max_memory/1024/1024/1024) max_mem_gb, round(t2.min_memory/1024/1024/1024) min_mem_gb, t2.max_disk_size/1024/1024/1024 ,t2.max_session_num,t3.unit_id, t3.zone, concat(t3.svr_ip,':',t3.`svr_port`) observer,t4.tenant_id, t4.tenant_name

from __all_resource_pool t1 join __all_unit_config t2 on (t1.unit_config_id=t2.unit_config_id) join __all_unit t3 on (t1.`resource_pool_id` = t3.`resource_pool_id`)

left join __all_tenant t4 on (t1.tenant_id=t4.tenant_id)

order by t1.`resource_pool_id`, t2.`unit_config_id`, t3.unit_id;

image.png

14、测试缩容unit

alter resource pool oracle_pool unit_num=1;

等待大概10秒钟,检查资源占用

select a.zone,concat(a.svr_ip,':',a.svr_port) observer, cpu_total, (cpu_total-cpu_assigned) cpu_free,disk_total,(disk_total-disk_assigned) disk_free, round(mem_total/1024/1024/1024) mem_total_gb, round((mem_total-mem_assigned)/1024/1024/1024) mem_free_gb, usec_to_time(b.last_offline_time) last_offline_time, usec_to_time(b.start_service_time) start_service_time  

from __all_virtual_server_stat a join __all_server b on (a.svr_ip=b.svr_ip and a.svr_port=b.svr_port) order by a.zone, a.svr_ip;

image.png

select t1.name resource_pool_name, t2.`name` unit_config_name, t2.max_cpu, t2.min_cpu, round(t2.max_memory/1024/1024/1024) max_mem_gb, round(t2.min_memory/1024/1024/1024) min_mem_gb, t2.max_disk_size/1024/1024/1024 ,t2.max_session_num,t3.unit_id, t3.zone, concat(t3.svr_ip,':',t3.`svr_port`) observer,t4.tenant_id, t4.tenant_name

from __all_resource_pool t1 join __all_unit_config t2 on (t1.unit_config_id=t2.unit_config_id) join __all_unit t3 on (t1.`resource_pool_id` = t3.`resource_pool_id`)

left join __all_tenant t4 on (t1.tenant_id=t4.tenant_id)

order by t1.`resource_pool_id`, t2.`unit_config_id`, t3.unit_id;

image.png

 

15、配置obproxy

mgr2主机安装obproxy

rpm -ivh obproxy-1.8.4.1-1916278.el7.x86_64.rpm

obproxy会被安装到/opt/taobao/install下,可以做个软连接到obproxy

ln -s obproxy-1.8.4.1 obproxy

su - admin

mkdir -p /home/admin/logs/obproxy/log

mkdir -p /home/admin/logs/obproxy/minidump

16、创建ob集群账户

OBProxy 需要跟后端 OBServer 节点保持通信,使用的是内部账户密码,需要提前在 OB 集群(随便找一台)的sys租户下为OBProxy 创建连接账户和密码。(请复制下面SQL不要改动)。

mysql -h127.1 -uroot@sys -P3881 -p -c -A

Enter password:

CREATE USER proxyro IDENTIFIED BY password '*e9c2bcdc178a99b7b08dd25db58ded2ee5bff050' ;

GRANT SELECT ON *.* to proxyro;

image.png

17、在mgr2上启动obproxy

su - admin

cd /opt/taobao/install/obproxy && bin/obproxy -r "172.16.80.57:3881;172.16.80.57:4881;172.16.80.58:3881;172.16.80.58:4881;172.16.80.59:3881;172.16.80.59:4881" -p 3883 -o "enable_strict_kernel_release=false,enable_cluster_checkout=false,enable_metadb_used=false" -c obcc

18、关闭启动测试

停observer

ps -ef|grep observer

image.png

kill -9 pid

启动observer

su - admin

for i in {1,2};    do \

echo $i; node="node"[$i]; \

cd /home/admin/$node && /home/admin/$node/bin/observer ; \

sleep 1; \

done

ps -ef|grep observer

 

19、添加observer扩容zone

三台机器创建目录

su - admin

for i in node3;    do \

echo $i; \

mkdir -p ~/$i/{admin,bin,etc}; cp ~/oceanbase/bin/* ~/$i/bin/;cd ~; \

cp ~/oceanbase/admin/* ~/$i/admin/;cd ~; \

cp -r ~/oceanbase/etc/* ~/$i/etc/;cd ~; \

rm -f ~/$i/etc/observer.config.bin;rm -f ~/$i/etc/observer.config.bin.history;cd ~; \

mkdir -p /data/1/$i/obcc/{etc3,sort_dir,sstable} /data/log1/$i/obcc/{clog,etc2,ilog,slog,oob_clog} ;\

mkdir -p ~/$i/store/obcc; \

for t in {etc3,sort_dir,sstable};do ln -s /data/1/$i/obcc/$t /home/admin/$i/store/obcc/$t; done; \

for t in {clog,etc2,ilog,slog,oob_clog};do ln -s /data/log1/$i/obcc/$t /home/admin/$i/store/obcc/$t; done; \

done

tree ~/node*

tree /data/{1,log1}/node*

 

mgr1(zone1):

su - admin

cd /home/admin/node3/ && /home/admin/node3/bin/observer -i ens5f0 -p 5881 -P 5882 -z zone1 -d /home/admin/node3/store/obcc -r '172.16.80.57:5882:5881;172.16.80.58:5882:5881;172.16.80.59:5882:5881' -c 20210219 -n obcc -o "memory_limit=8G,cache_wash_threshold=1G,row_purge_thread_count=1,net_thread_count=1,enable_syslog_recycle=True,enable_merge_by_turn=FALSE,cpu_count=16,location_refresh_thread_count=2,max_syslog_file_count=3,major_freeze_duty_time=Disable,__easy_memory_limit=1G,schema_history_expire_time=1d,merge_thread_count=1,writing_throttling_trigger_percentage=70,_max_trx_size=2M,workers_per_cpu_quota=2,enable_separate_sys_clog=0,datafile_disk_percentage=50,__min_full_resource_pool_memory=536870912,system_memory=5G,memory_chunk_cache_size=128M,trace_log_slow_query_watermark=10s,writing_throttling_maximum_duration=1m,switchover_process_thread_count=1,datafile_size=10G,minor_freeze_times=500,stack_size=1536K,disk_io_thread_coun=1,config_additional_dir=/data/1/node3/obcc/etc3;/data/log1/node3/obcc/etc2"

mgr2(zone2):

su - admin

cd /home/admin/node3/ && /home/admin/node3/bin/observer -i ens5f0 -p 5881 -P 5882 -z zone2 -d /home/admin/node3/store/obcc -r '172.16.80.57:5882:5881;172.16.80.58:5882:5881;172.16.80.59:5882:5881' -c 20210219 -n obcc -o "memory_limit=8G,cache_wash_threshold=1G,row_purge_thread_count=1,net_thread_count=1,enable_syslog_recycle=True,enable_merge_by_turn=FALSE,cpu_count=16,location_refresh_thread_count=2,max_syslog_file_count=3,major_freeze_duty_time=Disable,__easy_memory_limit=1G,schema_history_expire_time=1d,merge_thread_count=1,writing_throttling_trigger_percentage=70,_max_trx_size=2M,workers_per_cpu_quota=2,enable_separate_sys_clog=0,datafile_disk_percentage=50,__min_full_resource_pool_memory=536870912,system_memory=5G,memory_chunk_cache_size=128M,trace_log_slow_query_watermark=10s,writing_throttling_maximum_duration=1m,switchover_process_thread_count=1,datafile_size=10G,minor_freeze_times=500,stack_size=1536K,disk_io_thread_coun=1,config_additional_dir=/data/1/node3/obcc/etc3;/data/log1/node3/obcc/etc2"

mgr3(zone3):

su - admin

cd /home/admin/node3/ && /home/admin/node3/bin/observer -i ens5f0 -p 5881 -P 5882 -z zone3 -d /home/admin/node3/store/obcc -r '172.16.80.57:5882:5881;172.16.80.58:5882:5881;172.16.80.59:5882:5881' -c 20210219 -n obcc -o "memory_limit=8G,cache_wash_threshold=1G,row_purge_thread_count=1,net_thread_count=1,enable_syslog_recycle=True,enable_merge_by_turn=FALSE,cpu_count=16,location_refresh_thread_count=2,max_syslog_file_count=3,major_freeze_duty_time=Disable,__easy_memory_limit=1G,schema_history_expire_time=1d,merge_thread_count=1,writing_throttling_trigger_percentage=70,_max_trx_size=2M,workers_per_cpu_quota=2,enable_separate_sys_clog=0,datafile_disk_percentage=50,__min_full_resource_pool_memory=536870912,system_memory=5G,memory_chunk_cache_size=128M,trace_log_slow_query_watermark=10s,writing_throttling_maximum_duration=1m,switchover_process_thread_count=1,datafile_size=10G,minor_freeze_times=500,stack_size=1536K,disk_io_thread_coun=1,config_additional_dir=/data/1/node3/obcc/etc3;/data/log1/node3/obcc/etc2"

 

alter system add  server '172.16.80.57:5882' zone 'zone1';

alter system add  server '172.16.80.58:5882' zone 'zone2';

alter system add  server '172.16.80.59:5882' zone 'zone3';

 

alter system add/stop/start/delete server '172.16.80.57:5882' zone 'zone1';

alter system add/stop/start/delete server '172.16.80.58:5882' zone 'zone2';

alter system add/stop/start/delete server '172.16.80.59:5882' zone 'zone3' ;

转载地址:http://wmwmf.baihongyu.com/

你可能感兴趣的文章
FastDFS集群架构配置搭建(转载)
查看>>
HTM+CSS实现立方体图片旋转展示效果
查看>>
FFmpeg 命令操作音视频
查看>>
问题:Opencv(3.1.0/3.4)找不到 /opencv2/gpu/gpu.hpp 问题
查看>>
目的:使用CUDA环境变量CUDA_VISIBLE_DEVICES来限定CUDA程序所能使用的GPU设备
查看>>
问题:Mysql中字段类型为text的值, java使用selectByExample查询为null
查看>>
程序员--学习之路--技巧
查看>>
解决问题之 MySQL慢查询日志设置
查看>>
contOS6 部署 lnmp、FTP、composer、ThinkPHP5、docker详细步骤
查看>>
TP5.1模板布局中遇到的坑,配置完不生效解决办法
查看>>
PHPstudy中遇到的坑No input file specified,以及传到linux环境下遇到的坑,模板文件不存在
查看>>
TP5.1事务操作和TP5事务回滚操作多表
查看>>
composer install或composer update 或 composer require phpoffice/phpexcel 失败解决办法
查看>>
TP5.1项目从windows的Apache服务迁移到linux的Nginx服务需要注意几点。
查看>>
win10安装软件 打开时报错 找不到 msvcp120.dll
查看>>
PHPunit+Xdebug代码覆盖率以及遇到的问题汇总
查看>>
PHPUnit安装及使用
查看>>
PHP项目用xhprof性能分析(安装及应用实例)
查看>>
composer安装YII
查看>>
Sublime text3快捷键演示
查看>>