#共享集群配置文件
共享集群配置文件列示YashanDB服务端数据库相关信息,以及由多实例所组成的逻辑集群架构信息。
其中,与参数相关的配置信息分为如下两部分:
- 建库参数:这些参数用于控制创建数据库实例时的相关信息,在[[group]]实例组级别进行配置,即每个实例组内的多个实例创建一致的数据库。
- 配置参数:每个数据库实例的配置参数信息,在[[group.node]]实例级别进行配置。
示例:(yashandb.toml)
# 以下内容以实际展示结果为准
cluster = "yashandb" #安装后修改也不会生效,除非重新安装
create_simple_schema = false #为true部署完会执行示例的sql,若改为true需要在deploy时指定sys-password参数
uuid = "64f1568f4f6b033e58a015a833f0ad9e" #系统自动生成,不建议修改
yas_type = "CE" #部署模式,安装后修改也不会生效,除非重新安装
[[group]]
group_type = "ce" #节点组类型,安装后修改也不会生效,除非重新安装
name = "ceg1" #节点组名称,安装后修改也不会生效,除非重新安装
[group.config] #可配置所有建库参数,不配置时采用默认值
CHARACTER_SET = "utf8"
ISARCHIVELOG = true
REDO_FILE_NUM = 4
REDO_FILE_SIZE = "128M"
[group.cedisk]
vote = "/dev/mapper/storraid10" #投票盘,安装后不可修改,除非重新安装
ycr = "/dev/mapper/storraid0" #ycr盘,安装后不可修改,除非重新安装
[group.yfsconfig] #YFS配置参数,不配置时采用默认值
LOG_LEVEL = "DEBUG"
RECY_INTERVAL = "86400"
SHM_POOL_SIZE = "64M"
SYS_AREA_SIZE = "256M"
YFS_PACKET_SIZE = "1M"
[group.ycsconfig] # YCS配置参数,不配置时使用默认值
DISK_HB_KEEP_ALIVE = 30
LOG_LEVEL = "DEBUG"
LOG_NUMBER = 10
LOG_SIZE = "20M"
NETWORK_HB_TIMEOUT = 30
RESTART_INTERVAL = 30
RESTART_TIMES = 3
WAIT_STOP_FIN_TIME = 90
[[group.diskgroup]] # 磁盘组信息
au_size = "1M" # 分配磁盘空间时的AU大小
disk_size = "" # 指定可以由diskgroup进行管理的disk大小,可省略,则默认为该disk的总大小
name = "DG0" # 磁盘组的名称
redundancy = "EXTERNAL" # 磁盘组的冗余度
yfs_force_create = false # 强制格式化磁盘
[[group.diskgroup.failgroup]]
name = "DG0_0"
disk = ["/dev/sde", "/dev/sdh"]
[[group.node]] #节点配置
data_path = "/data/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 = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/ce-1-1/run"
SHARE_POOL_SIZE = "1G"
SLOW_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/ce-1-1/slow"
SQL_POOL_PARTS = 8
[[group.node]]
data_path = "/data/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:1788"
LISTEN_ADDR = "192.168.1.3:1688"
REDO_BUFFER_PARTS = 8
REDO_BUFFER_SIZE = "64M"
RUN_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/ce-1-2/run"
SHARE_POOL_SIZE = "1G"
SLOW_LOG_FILE_PATH = "/data/yashan/yasdb_home/yashandb/23.2.1.100/log/yashandb/ce-1-2/slow"
SQL_POOL_PARTS = 8