dmdsc的搭建

1.划分磁盘
fdisk -l
fdisk -l /dev/sdb
partprobe /dev/sdb
2.绑定裸设备
通过设备号绑定裸设备
cat /etc/udev/rules.d/60-raw.rules
ACTION==“add”, KERNEL==“sdb1”, RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION==“add”, KERNEL==“sdb2”, RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION==“add”, KERNEL==“sdb3”, RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION==“add”, KERNEL==“sdb4”, RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION==“add”, KERNEL==“raw[1-4]”, OWNER=“dmdba”, GROUP=“dinstall”, MODE=“660”
查看裸设备大小
blockdev --getsize /dev/raw/raw*
start_udev #centos7(systemctl restart systemd-udev-trigger.service)
systemctl start systemd-udevd
partprobe /dev/sdb
ll /dev/raw/

3.创建用户
4.安装数据库软件

5.配置dmdcr_cfg.ini
cd /home/dmdba/dmdbms/config
vi dmdcr_cfg.ini

DCR_N_GRP = 3
DCR_VTD_PATH = /dev/raw/raw2
DCR_OGUID = 63635

[GRP]
DCR_GRP_TYPE = CSS
DCR_GRP_NAME = GRP_CSS
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60 #磁盘心跳机制,故障检测时间,单位秒,缺省60S
[GRP_CSS]
DCR_EP_NAME = CSS0
DCR_EP_HOST = 192.168.6.73
DCR_EP_PORT = 9341
[GRP_CSS]
DCR_EP_NAME = CSS1
DCR_EP_HOST = 192.168.6.74
DCR_EP_PORT = 9343

[GRP]
DCR_GRP_TYPE = ASM
DCR_GRP_NAME = GRP_ASM
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_ASM]
DCR_EP_NAME = ASM0
DCR_EP_SHM_KEY = 93360
DCR_EP_SHM_SIZE = 10
DCR_EP_HOST = 10.0.0.1#业务IP
DCR_EP_PORT = 9349
DCR_EP_ASM_LOAD_PATH = /dev/raw
[GRP_ASM]
DCR_EP_NAME = ASM1
DCR_EP_SHM_KEY = 93361
DCR_EP_SHM_SIZE = 10
DCR_EP_HOST = 10.0.0.2#业务IP
DCR_EP_PORT = 9351
DCR_EP_ASM_LOAD_PATH = /dev/raw

[GRP]
DCR_GRP_TYPE = DB
DCR_GRP_NAME = GRP_DSC
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_DSC]
DCR_EP_NAME = DSC0
DCR_EP_SEQNO = 0 #组内序号,CSS/ASM不能配置
DCR_EP_PORT = 5236
DCR_CHECK_PORT = 9741
[GRP_DSC]
DCR_EP_NAME = DSC1
DCR_EP_SEQNO = 1
DCR_EP_PORT = 5236 #DB的DCR_EP_PORT 与dm.ini中的PORT_NUM不一致
时,DB端口以 DCR_EP_PORT为准。
DCR_CHECK_PORT = 9742 #DCR检查端口号。检查实例是否活动的时候用,各实
例不能冲突

6.使用dmasmcmd工具初始化磁盘(rac1)
./dmasmcmd

create dcrdisk ‘/dev/raw/raw1’ ‘dcr’
create votedisk ‘/dev/raw/raw2’ ‘vote’
create asmdisk ‘/dev/raw/raw3’ ‘LOG0’
create asmdisk ‘/dev/raw/raw4’ ‘DATA0’
init dcrdisk ‘/dev/raw/raw1’ from ‘/home/dmdba/dmdbms/config/dmdcr_cfg.ini’ identified by ‘abcd’
init votedisk ‘/dev/raw/raw2’ from ‘/home/dmdba/dmdbms/config/dmdcr_cfg.ini’

7.准备dmasm的mal配置文件 dmasvrmal.ini (配置所有节点)
[MAL_INST1]
MAL_INST_NAME = ASM0
MAL_HOST = 192.168.6.73
MAL_PORT = 7236
[MAL_INST2]
MAL_INST_NAME = ASM1
MAL_HOST = 192.168.6.74
MAL_PORT = 7237

8.准备配置dmdcr.ini(/home/data)
DMASM 的两个节点分别配置 dmdcr.ini,dmdcr_path 相同,dmasvrmal.ini 文 件内容也相同,dmdcr_seqo分别为0和1

DMDCR_PATH = /dev/raw/raw1
DMDCR_MAL_PATH = /home/dmdba/dmdbms/config/dmasvrmal.ini
DMDCR_SEQNO = 0

#ASM重启参数,命令行方式启动
#DMDCR_ASM_RESTART_INTERVAL = 30 #DMCSS 认定 DMASM 节点故障重启的时间间隔,默认60S
#DMDCR_ASM_STARTUP_CMD = /home/dmdba/dmdbms/bin/DmASMSvrService_DSC0 start

#DB重启参数,命令行方式启动
#DMDCR_DB_RESTART_INTERVAL = 60 #DMCSS 认定 DMDSC 节点故障重启的时间间隔
#DMDCR_DB_STARTUP_CMD = /home/dmdba/dmdbms/bin/DmService_DSC0 start

#指定参数后,如果超过指定时间节点实例还未启动,DMCSS 自动将未启动节点踢出集群环境,变为 ERROR 节点,之后其他活动 OK 节点可以正常启动
#DMDCR_AUTO_OPEN_CHECK=60

9.两个节点分别启动dmcss dmasmsvr
./dmcss DCR_INI=/home/dmdba/dmdbms/config/dmdcr.ini
./dmasmsvr DCR_INI=/home/dmdba/dmdbms/config/dmdcr.ini

10.创建DMASM磁盘组(rac1-启动dmasmtool工具,先启动ASM服务的节点)
./dmasmtool DCR_INI=/home/dmdba/dmdbms/config/dmdcr.ini
创建日志磁盘组
create diskgroup ‘DMLOG’ asmdisk ‘/dev/raw/raw3’
创建数据磁盘组
create diskgroup ‘DMDATA’ asmdisk ‘/dev/raw/raw4’

11.准备dminit.ini配置文件(rac1)
#全局参数
db_name = dsc
system_path = +DMDATA/data
system = +DMDATA/data/dsc/system.dbf
system_size = 128
roll = +DMDATA/data/dsc/roll.dbf
roll_size = 128
main = +DMDATA/data/dsc/main.dbf
main_size = 128
ctl_path = +DMDATA/data/dsc/dm.ctl
ctl_size = 8
log_size = 256
dcr_path = /dev/raw/raw1
dcr_seqno = 0
auto_overwrite = 0

PAGE_SIZE = 8
CASE_SENSITIVE = 1
CHARSET = 1
#节点参数
[DSC0]
config_path = /home/dmdba/dmdbms/config/dsc0_config
port_num = 5236
mal_host = 192.168.6.73
mal_port = 9340
log_path = +DMLOG/log/dsc0_log01.log
log_path = +DMLOG/log/dsc0_log02.log

[DSC1]
config_path = /home/dmdba/dmdbms/config/dsc1_config
port_num = 5236
mal_host = 192.168.6.74
mal_port = 9341
log_path = +DMLOG/log/dsc1_log01.log
log_path = +DMLOG/log/dsc1_log02.log

12.使用dminit初始化DB环境 选择一个节点(DSC1)
./dminit control=/home/dmdba/dmdbms/config/dminit.ini
#生成dsc0_config ,dsc1_config
scp -r dsc1_config dmdba@192.168.6.75:/home/dmdba/dmdbms/config/dsc1_config

13配置远程归档

14启动数据库服务器
节点一:
./dmserver /home/dmdba/dmdbms/config/dsc0_config/dm.ini dcr_ini=/home/dmdba/dmdbms/config/dmdcr.ini
节点二:
./dmserver /home/dmdba/dmdbms/config/dsc1_configi/dm.ini dcr_ini=/home/dmdba/dmdbms/config/dmdcr.ini

15.注册后台脚本(DSC1/DSC2)
DMCSS后台服务脚本
./dm_service_installer.sh -t dmcss -p DSC0 -dcr_ini /home/dmdba/dmdbms/config/dmdcr.ini
./dm_service_installer.sh -t dmcss -p DSC1 -dcr_ini /home/dmdba/dmdbms/config/dmdcr.ini
DMASM后台服务脚本
./dm_service_installer.sh -t dmasmsvr -p DSC0 -dcr_ini /home/dmdba/dmdbms/config/dmdcr.ini -y DmCSSServiceDSC0
./dm_service_installer.sh -t dmasmsvr -p DSC1 -dcr_ini /home/dmdba/dmdbms/config/dmdcr.ini -y DmCSSServiceDSC1
数据库实例DMSERVER后台启动脚本
./dm_service_installer.sh -t dmserver -p DSC0 -dm_ini /home/dmdba/dmdbms/config/dsc0_config/dm.ini -dcr_ini /home/dmdba/dmdbms/config/dmdcr.ini -y DmASMSvrServiceDSC0
./dm_service_installer.sh -t dmserver -p DSC1 -dm_ini /home/dmdba/dmdbms/config/dsc1_config/dm.ini -dcr_ini /home/dmdba/dmdbms/config/dmdcr.ini -y DmASMSvrServiceDSC1

DSC1/DSC2
启动CSS服务
./DmCSSServiceDSC0 start
./DmCSSServiceDSC1 start
启动ASM服务
./DmASMSvrServiceDSC0 start
./DmASMSvrServiceDSC1 start
启动数据库服务
./DmServiceDSC0 start
./DmServiceDSC1 start

vi dmcssm.ini
#和 dmdcr_cfg.ini 中的 DCR_OGUID 保持一致
CSSM_OGUID = 63635
#配置所有 CSS 的连接信息,
#和 dmdcr_cfg.ini 中 CSS 配置项的 DCR_EP_HOST 和 DCR_EP_PORT 保持一致
CSSM_CSS_IP = 192.168.6.73:9341
CSSM_CSS_IP = 192.168.6.74:9343
CSSM_LOG_PATH =/home/dmdba/dmdbms/config/log #监视器日志文件存放路径
CSSM_LOG_FILE_SIZE = 32 #每个日志文件最大 32M
CSSM_LOG_SPACE_LIMIT = 1024

./dmcssm INI_PATH=/home/dmdba/dmdbms/config/dmcssm.ini

没有问题的话,将dmdcr.ini下注释的行取消注释

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值