#共享集群配置文件
共享集群配置文件列示YashanDB服务端各节点上的数据库相关信息,以及由多节点所组成的逻辑集群架构信息。
其中,与参数相关的配置信息分为如下两部分:
- 建库参数:这些参数用于控制创建数据库实例时的相关信息,在[[group]]节点组级别进行配置,即每个节点组内的多个节点创建一致的数据库实例。
- 配置参数:每个数据库实例的配置参数信息,在[[group.node]]节点级别进行配置。
示例:(yashandb.toml)
# 以下内容以实际展示结果为准
cluster = "yashandb" #安装后修改也不会生效,除非重新安装
create_simple_schema = false #为true部署完会执行示例的sql,若改为true需要在deploy时指定sys-password参数
uuid = "64f1568f4f6b033e58a015a833f0ad9e" #系统自动生成,不建议修改
yas_type = "CE" #部署模式,安装后修改也不会生效,除非重新安装
[CEDisks]
data = "/dev/mapper/storraid5" #安装过程中创建的初始数据库的系统数据盘,安装后不可修改,除非重新建库
vote = "/dev/mapper/storraid10" #投票盘,安装后不可修改,除非重新安装
ycr = "/dev/mapper/storraid0" #ycr盘,安装后不可修改,除非重新安装
[YFSConfig] #YFS配置参数,不配置时采用默认值
LOG_LEVEL = "DEBUG"
RECY_INTERVAL = "86400"
SHM_POOL_SIZE = "64M"
SYS_AREA_SIZE = "256M"
YFS_PACKET_SIZE = "1M"
[[group]]
group_type = "ce" #节点组类型,安装后修改也不会生效,除非重新安装
name = "ceg1" #节点组名称,安装后修改也不会生效,除非重新安装
[group.config] #可配置所有建库参数,不配置时采用默认值
CHARACTER_SET = "utf8"
ISARCHIVELOG = true
REDO_FILE_NUM = 4
REDO_FILE_SIZE = "128M"
YFS_FORCE_CREATE = false
[[group.node]] #节点配置
data_path = "/home/yashan/yasdb_data" #为DATA目录,安装后修改也不会生效,除非重新安装
hostid = "host0001" #节点所在主机标识,安装后修改也不会生效,除非重新安装
role = 1 #数据库主备角色,共享集群的节点没有主备概念,不支持修改
[group.node.config] #可配置所有数据库参数,不配置时采用默认值,安装后修改也不会生效,除非重新安装
CLUSTER_DATABASE = "TRUE"
CLUSTER_INTERCONNECT = "192.168.1.2:1689"
DATA_BUFFER_SIZE = "1G"
HA_ELECTION_TIMEOUT = 18
HA_HEARTBEAT_INTERVAL = 6
INTER_URL = "192.168.1.2:1788"
LISTEN_ADDR = "192.168.1.2:1688"
REDO_BUFFER_PARTS = 8
REDO_BUFFER_SIZE = "64M"
RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/23.1.0.2/log/yashandb/ce-1-1/run"
SHARE_POOL_SIZE = "1G"
SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/23.1.0.2/log/yashandb/ce-1-1/slow"
SQL_POOL_PARTS = 8
[[group.node]]
data_path = "/home/yashan/yasdb_data"
hostid = "host0002"
role = 2
[group.node.config]
CLUSTER_DATABASE = "TRUE"
CLUSTER_INTERCONNECT = "192.168.1.3:1691"
DATA_BUFFER_SIZE = "1G"
HA_ELECTION_TIMEOUT = 18
HA_HEARTBEAT_INTERVAL = 6
INTER_URL = "192.168.1.3:1789"
LISTEN_ADDR = "192.168.1.3:1690"
REDO_BUFFER_PARTS = 8
REDO_BUFFER_SIZE = "64M"
RUN_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/23.1.0.2/log/yashandb/ce-1-2/run"
SHARE_POOL_SIZE = "1G"
SLOW_LOG_FILE_PATH = "/home/yashan/yasdb_home/yashandb/23.1.0.2/log/yashandb/ce-1-2/slow"
SQL_POOL_PARTS = 8