1.搭建流程
1.1 ss初始化及啟動
--->1節點:
cd /dm/bin
./dmdssinit path=/dm/data inst=ss1 port=35300 REGION_SIZE=2 DBF_SIZE=10240 RLOG_SIZE=128
./dmdss path=/dm/data/SS1/dss.ini
--->2節點:
。。。
--->3節點:
。。。
1.2 DCS 初始化及啟動
1.2.1 後臺庫DCS_DB初始化及原始資料構造
cd /dm/bin
./dminit path=/dm/data db_name=dcs_db instance_name=DCS_DB port_num=35200
./dmserver /dm/data/dcs_db/dm.ini
./disql SYSDBA/SYSDBA@192.168.0.152:35200
>SP_DFS_DCS_INIT(1); ---預設DSC埠3333
1.2.2啟動DCS並新增FD和SS
建立dcs.key
./dmdcs -init=1 USER=SYSDBA PASSWORD=SYSDBA PATH=dcs.key
啟動dcs
./dcsserver server=192.168.0.152:35200
啟動dmdcstool
./dmdcstool host=192.168.0.152 port_num=3333
>add micro fault domain fd1
>add micro fault domain fd2
>add micro fault domain fd3
>add micro storage server SS1 ('192.168.0.153':35300) in fd1
>add micro storage server SS1 ('192.168.0.153':35300) in fd2
>add micro storage server SS1 ('192.168.0.153':35300) in fd2
>alter storage server refresh size
>alter storage server open ---新增ss 。dmdcstool必須連線DCS,不是RS
1.3 新增組和RS
dmdcstool 執行:
>add group grp1
>add rlog server "DRS" ('192.168.0.152':3332) group grp1 --- rs與組一一對應;多rs建立多個組即可
1.4 啟動RS
配置drs.ini到/dm/data
啟動RS:
./dmdrs path=/dm/data/drs.ini
1.5 搭建兩節點rac
1.5.1 配置dmdcr_cfg.ini
1.5.2配置dmdfs.ini
1.5.3 使用dmasmcmd初始化
./dmasm dfs_ini=/dm/data/dsc/dmdfs.ini
>create emptyfile '/dm/data/asmdisks/dcr.asm' size 32
>create emptyfile '/dm/data/asmdisks/vtd.asm' size 32
>create dcrdisk '/dm/data/asmdisks/dcr.asm' 'dcr' 32
>create votedisk '/dm/data/asmdisks/vtd.asm' 'vtd' 32
>init dcrdisk '/dm/data/asmdisks/dcr.asm' from '/dm/data/dsc/dmdcr_cfg.ini' identified by 'hust4400'
>init votedisk '/dm/data/asmdisks/vtd.asm' from 'dm/data/dsc/dmdcr_cfg.ini'
>init ddfsdcr '$/dameng/dsc/asmdisks/dcr.asm' from '/dm/data/asmdisks/dcr.asm'
>init ddfsvtd '$/dameng/dsc/asmdisks/vtd.asm' from '/dm/data/asmdisks/vtd.asm'
1.5.4 準備 dminit.ini
儲存到/dm/data/dsc/目錄下
1.5.5 初始化庫
/dminit control=/dm/data/dsc/dminit.ini
1.5.6 向DMTDD新增前段資料庫
啟動dmdcstool 連線DCS
./dmdcstool host=192.168.0.152 port_num=3333
>add data server dsc0 group grp1 database db_dsc arch_dir '/dm/data/arch_dsc0'
>add data server dsc1 group grp1 database db_dsc arch_dir '/dm/data/arch_dsc1' ---必須連線DCS 不是DRS;
1.5.7 配置dmdcr.ini
DSC0 節點的dmdcr0.ini 儲存在/dm/data/dsc
DSC1 節點的dmdcr1.ini 儲存在/dm/data/dsc
1.5.8 啟動CSS
啟動CSS0
./dmcss dcr_ini=/dm/data/dsc/dmdcr0.ini dfs_ini=/dm/data/dsc/dmdfs.ini
啟動CSS1
./dmcss dcr_ini=/dm/data/dsc/dmdcr1.ini dfs_ini=/dm/data/dsc/dmdfs.ini
1.5.9 啟動dsc節點
./dmserver /dm/data/dsc/dsc0/dm.ini dcr_ini=/dm/data/dsc/dmdcr0.ini
./dmserver /dm/data/dsc/dsc1/dm.ini dcr_ini=/dm/data/dsc/dmdcr1.ini