preface
This article is about the deployment of DMDSC environment. I hope it can help you.
This deployment uses a hard disk for testing
1, DSC deployment preparation
1.1 installing database software
Referring to the stand-alone deployment, install the database software first, and there is no need to initialize and register services. And modify relevant system parameters. The directories of the two servers are consistent
1.2 raw device binding Division
The zones are as follows:
1) fdisk /dev/sdb 2) Input in sequence n –>p-> 1 ->enter-> +100M-> Press enter to complete the partition of the first disk 3) Input in sequence n –>p-> 2 ->enter-> +100M-> Partition disk, enter 4) Input in sequence n –>p-> 3 ->enter-> + 2048M -> Press enter to complete the partition of the third disk 5) Input in sequence n –>p-> 4 ->enter->enter->Press enter to complete the partition of the fourth disk 6) input w Save the configuration and exit
Edit / etc / udev / rules d/60-raw. rules
cd /etc/udev/rules.d/60-raw.rules Vi 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"
Execute the order to take effect
/sbin/udevadm control --reload /sbin/udevadm trigger --type=devices --action=change
Execute the following command to check whether the configuration is successful
ll /dev/raw/raw*
If the configured raw device cannot be viewed, the server needs to be restarted
2, Deploy DSC
2.1 editing dmdcr_cfg.ini file
Create a new config directory under the dmdbms directory to store DSC configuration files for easy management
The code is as follows (example):
vi dmdcr_cfg.ini DCR_N_GRP = 3 DCR_VTD_PATH = /dev/raw/raw1 #Voting Disk path DCR_OGUID = 63635 [GRP] DCR_GRP_TYPE = CSS DCR_GRP_NAME = GRP_CSS DCR_GRP_N_EP = 2 DCR_GRP_DSKCHK_CNT = 60 [GRP_CSS] DCR_EP_NAME = CSS0 DCR_EP_HOST = 192.168.3.212 DCR_EP_PORT = 9341 [GRP_CSS] DCR_EP_NAME = CSS1 DCR_EP_HOST = 192.168.3.213 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 = 20 DCR_EP_HOST = 192.168.3.212 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 = 20 DCR_EP_HOST = 192.168.3.213 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 DCR_EP_PORT = 5136 #Instance port DCR_CHECK_PORT = 9741 [GRP_DSC] DCR_EP_NAME = DSC1 DCR_EP_SEQNO = 1 DCR_EP_PORT = 5136 #Instance port DCR_CHECK_PORT = 9742
2.2 initialization using DMASMCMD tool
The installation path is executed under the bin directory
The code is as follows (example):
./dmasmcmd create dcrdisk '/dev/raw/raw1' 'vote' create votedisk '/dev/raw/raw2' 'dcr' create asmdisk '/dev/raw/raw4' 'LOG0' create asmdisk '/dev/raw/raw3' 'DATA0' init dcrdisk '/dev/raw/raw2' from '/dm/cj/dmdbms/config/dmdcr_cfg.ini'identified by 'abcd' init votedisk '/dev/raw/raw1' from '/dm/cj/dmdbms/config/dmdcr_cfg.ini'
2.3 edit dmasvrmal INI file
Edit dmasvrmal.config in the dmdbms/config directory ini
The code is as follows (example):
vi dmasvrmal.ini [MAL_INST1] MAL_INST_NAME = ASM0 MAL_HOST = 192.168.3.212 MAL_PORT = 7236 [MAL_INST2] MAL_INST_NAME = ASM1 MAL_HOST = 192.1668.3.213 MAL_PORT = 7237
2.4 edit dmdcr INI file
Edit dmdcr.config in the dmdbms/config directory ini
The code is as follows (example):
vi dmdcr.ini DMDCR_PATH = /dev/raw/raw2 DMDCR_MAL_PATH =/dm/cj/dmdbms/config/dmasvrmal.ini #MAL profile path used by dmasmsvr DMDCR_SEQNO = 0 #ASM restart parameter, start in command line mode DMDCR_ASM_RESTART_INTERVAL = 15 DMDCR_ASM_STARTUP_CMD =/dm/cj/dmdbms/bin/dmasmsvr dcr_ini=/dm/cj/dmdbms/config/dmdcr.ini #DB restart parameter, start in command line mode DMDCR_DB_RESTART_INTERVAL = 35 DMDCR_DB_STARTUP_CMD =/dm/cj/dmdbms/bin/dmserver path=/dm/cj/dmdbms/config/dsc0_config/dm.ini dcr_ini=/dm/cj/dmdbms/config/dmdcr.ini
Note: copy the files of 2.1 – 2.4 to another node before execution
Put another node dmdcr.ini Document DMDCR_DB_STARTUP_CMD =/dm/cj/dmdbms/bin/dmserver path=/dm/cj/dmdbms/config/dsc0_config/dm.ini dcr_ini=/dm/cj/dmdbms/config/dmdcr.ini Commands in dsc0_config Change to dsc1_config
2.5 start DMCSS and DMASM service procedures
Execute in the bin directory of the installation path, so all nodes execute (copy the files of 2.1 – 2.4 to all nodes before execution)
Manually start the dmcss command:
./dmcss DCR_INI=/dm/cj/dmdbms/config/dmdcr.ini
Manually start the dmasmsvr command: for example, when configuring dmdcr INI file, you do not need to execute this command manually
./dmasmsvr DCR_INI=/dm/cj/dmdbms/config/dmdcr.ini
Refer to the official documents for specific parameter descriptions:
https://eco.dameng.com/docs/zh-cn/pm/configuration-instructions.html
2.6 creating a DMASM disk group using the dmasmtool tool
Select a node and enter the installation bin directory:
./dmasmtool DCR_INI=/dm/cj/dmdbms/config/dmdcr.ini #Create log disk group create diskgroup 'DMLOG' asmdisk '/dev/raw/raw4' #Create data disk group create diskgroup 'DMDATA' asmdisk '/dev/raw/raw3'
2.7 edit dminit INI file
Edit dminit.config in the dmdbms/config directory ini
The code is as follows (example):
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/raw2 #dcr disk path, which currently does not support asm, can only be a bare device dcr_seqno = 0 auto_overwrite = 1 [DSC0] #inst_ Dcname and DMR_ cfg. Ini DB type DCR in group_ EP_ Name correspondence config_path = dm/cj/dmdbms/config/dsc0_config port_num = 5136 mal_host = 192.168.3.212 mal_port = 9340 log_path = +DMLOG/log/dsc0_log01.log log_path = +DMLOG/log/dsc0_log02.log [DSC1] #inst_name and dmdcr_cfg.ini DB type DCR in group_ EP_ Name correspondence config_path = dm/cj/dmdbms/config/dsc1_config port_num = 5136 mal_host = 192.168.3.213 mal_port = 9341 log_path = +DMLOG/log/dsc1_log01.log log_path = +DMLOG/log/dsc1_log02.log
2.8 initialize DB environment with dminit
Select a node to initialize
The code is as follows (example):
./dminit control=/dm/cj/dmdbms/config/dminit.ini
After initialization, there is dsc0 under config_ Config and dsc1_config folder, put dsc1_ Copy config to another node
2.9 start database service
Both nodes start the service
If dmdcr is configured If auto start is configured in the. INI file, there is no need to start the service manually and wait for DMCSS to automatically pull up the instance
Manual start:
1 node
./dmserver /dm/cj/dmdbms/config/dsc0_config/dm.ini dcr_ini=/dm/cj/dmdbms/config/dmdcr.ini
2 nodes
./dmserver /dm/cj/dmdbms/config/dsc1_config/dm.ini dcr_ini=/dm/cj/dmdbms/config/dmdcr.ini
2.10 configuration monitor file dmcssm ini
Edit dmcssm. In the installation directory bin ini
vi dmcssm.ini #Dmdcr_ cfg. DCR in ini_ Oguid is consistent CSSM_OGUID = 63635 #Configure the connection information of all CSS, #Dmdcr_ cfg. DCR of CSS configuration item in ini_ EP_ Host and DCR_ EP_ Consistent with port CSSM_CSS_IP = 192.168.3.212:9341 CSSM_CSS_IP = 192.168.3.213:9343 CSSM_LOG_PATH =/dm/cj/dmdbms/log#Storage path of monitor log file CSSM_LOG_FILE_SIZE = 32 #32M maximum per log file CSSM_LOG_SPACE_LIMIT = 0 #Unlimited total log file space
2.11 start monitor
./dmcssm INI_PATH=/dm/chenji/dmdbms/bin/dmcssm.ini---
2.12 background startup of registration service
Both nodes need to register services
Code examples are as follows:
[root@dsc1 config]# /dm/dmdba/dmdbms/script/root/dm_service_installer.sh -t dmcss -p csscj1 -dcr_ini /dm/cj/dmdbms/config/dmdcr.ini Create service(DmCSSServicecss1)complete [root@dsc1 config]# /dm/dmdba/dmdbms/script/root/dm_service_installer.sh -t dmasmsvr -p asmcj1 -dcr_ini /dm/cj/dmdbms/config/dmdcr.ini dmasmsvr(RAC)Service needs to set dependent service(dmcss)! [root@dsc1 config]# /dm/dmdba/dmdbms/script/root/dm_service_installer.sh -t dmasmsvr -p asmcj1 -dcr_ini /dm/cj/dmdbms/config/dmdcr.ini -y DmCSSServicecsscj1 Create service(DmASMSvrServiceasm1)complete [root@dsc1 mapper]# /home/dmdba/dmdbms/script/root/dm_service_installer.sh -t dmserver -p DMCJ1 -dm_ini /dm/cj/dmdbms/config/dsc0_config/dm.ini -dcr_ini /dm/cj/dmdbms/config/dmdcr.ini -y DmASMSvrServiceasmcj1
Note: the service name is modified according to the actual registered
For more information, please visit the official website of Dameng database
https://eco.dameng.com