• 达梦DSC部署


    1. DSC描述

    DMDSC集群是一个多实例、单数据库的系统。多个数据库实例可以同时访问、修改同一个数据库的数据。数据文件、控制文件在集群系统中只有一份,不论有几个节点,这些节点都平等地使用这些文件,这些文件保存在共享存储上。每个节点有自己独立的联机日志和归档日志,其中联机日志保存在共享存储上,归档日志可以保存在本地存储上也可以保存在共享存储上。

    总体架构:

    null

    2. 环境规划准备

    2.1. IP规划

    主机名

    私有IP

    公用IP

    实例名

    节点用途

     

    testDB01

    192.168.1.137

    10.79.180.37

    DSC0

    DSC节点1

     

    testDB02

    192.168.1.138

    10.79.180.38

    DSC1

    DSC节点2

     

    2.2. 端口规划

    实例名

    实例端

    MAL系统端

    CSS端

    ASM端

    ASM的MAL端

    DCR检查实例端口

    守护进程端口

    实例对守护进程监听端口

    DSC1

    5236

    9236

    9341

    9349

    9340

    9741

    3567

    4567

    DSC2

    5236

    9236

    9343

    9351

    9341

    9741

    3567

    4567

    2.3. 存储规划

    查看磁盘大小:

    blockdev --getsize64 /dev/dm/asmdiskdcr

    磁盘

    裸设备名/用途

    /dev/dm/asmdiskdcr  (200M)

    /dev/dm/asmdiskdcr (DCR磁盘)

    /dev/dm/asmdiskvote (200M)

    /dev/dm/asmdiskvote (vote磁盘)

    /dev/dm/asmdiskredo (10G)

    /dev/dm/asmdiskredo (redo日志磁盘)

    /dev/dm/asmdiskdata1 (20G)

    /dev/dm/asmdiskdata1(数据磁盘)

    /dev/dm/asmdiskdata2 (20G)

    /dev/dm/asmdiskdata2(数据磁盘)

    3. 服务器配置

    3.1. 配置打开文件数:

    vim /etc/security/limits.conf

    dmdba soft nice 0

    dmdba hard nice 0

    dmdba soft as unlimited

    dmdba hard as unlimited

    dmdba soft fsize unlimited

    dmdba hard fsize unlimited

    dmdba soft nproc 131072

    dmdba hard nproc 131072

    dmdba soft nofile 131072

    dmdba hard nofile 131072

    dmdba soft core unlimited

    dmdba hard core unlimited

    dmdba soft data unlimited

    dmdba hard data unlimited

    dmdba soft memlock unlimited #数据库创建线程失败时的解决方案

    dmdba hard memlock unlimited #数据库创建线程失败时的解决方案

    3.2. 配置IO调度

    磁盘IO调度算法建议设置为deadline,不需要配置。

    [root@testDB01 mnt]# cat /sys/block/dm-11/queue/scheduler

    noop [deadline] cfq

    [root@testDB01 mnt]# cat /sys/block/dm-12/queue/scheduler

    noop [deadline] cfq

    [root@testDB01 mnt]# cat /sys/block/dm-2/queue/scheduler

    noop [deadline] cfq

    [root@testDB01 mnt]# cat /sys/block/dm-9/queue/scheduler

    noop [deadline] cfq

    [root@testDB01 mnt]# cat /sys/block/dm-6/queue/scheduler

    noop [deadline] cfq

    [root@testDB01 mnt]#

    --设备方法

    echo deadline > /sys/block/dm-11/queue/scheduler

    3.3. 关闭selinux

    vim /etc/sysconfig/selinux 

    SELINUX=disabled

    3.4. 关闭防火墙firewalld

    [root@testDB01 ~]# systemctl stop firewalld

    [root@testDB01 ~]# systemctl disable firewalld

    3.5. 创建用户

    建议使用dmdba用户安装数据库软件

    [root@testDB01 home]# groupadd -g 12349 dinstall

    [root@testDB01 home]# useradd -u 12345 -g dinstall -m -d /home/dmdba -s /bin/bash  dmdba

    [root@testDB01 home]# passwd dmdba

    3.6. 配置环境变量

    编辑dmdba用户的环境变量(.bash_profile)文件

    export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/dmdba/dmdbms/bin"

    export DM_HOME="/opt/dmdba/dmdbms"

    export PATH=.:$DM_HOME/bin/:$PATH

    4. 部署步骤

    4.1. 软件安装(所有节点执行)

    4.1.1. 挂载软件ISO镜像

    [root@testDB02 ~]# mkdir /dm8

    [root@testDB02 ~]# mount /opt/dm8_soft/dm          

    [root@testDB02 ~]# mount /opt/dm8_soft/dm8_***********.iso /dm8

    mount: /dm8: WARNING: source write-protected, mounted read-only.

    [root@testDB02 ~]#

    4.1.2. 命令行安装(-i参数)  

    使用dmdba用户安装。软件安装过程如下:

    [dmdba@testDB01 dm8]$ ./DMInstall.bin -i

    请选择安装语言(C/c:中文 E/e:英文) [C/c]:e

    Extract install files.........

    core file size          (blocks, -c) unlimited

    data seg size           (kbytes, -d) unlimited

    scheduling priority             (-e) 0

    file size               (blocks, -f) unlimited

    pending signals                 (-i) 2088142

    max locked memory       (kbytes, -l) 64

    max memory size         (kbytes, -m) unlimited

    open files                      (-n) 1024

    pipe size            (512 bytes, -p) 8

    POSIX message queues     (bytes, -q) 819200

    real-time priority              (-r) 0

    stack size              (kbytes, -s) 8192

    cpu time               (seconds, -t) unlimited

    max user processes              (-u) 2088142

    virtual memory          (kbytes, -v) unlimited

    file locks                      (-x) unlimited

    The max number of open files is too little, suggest to set 65536 or more to number of open files.

    Welcome to DM DBMS Installer

    Whether to input the path of Key File? (Y/y:Yes N/n:No) [Y/y]:y

    Please Input the Path of the Key File [dm.key]:/opt/dm8_soft/dm7E041213.key

    /tmp/DMInstall/install/install.sh:行234: 警告:命令替换:忽略输入中的 null 字节

    Expiration Date: 2021-12-25

    Server Series: Enterprise Version

    Server Type: Trial Version

    Customer Name: 达梦公司产品试用

    Authorized User Number: unlimited

    Concurrency User Number: unlimited

    Whether to Set The TimeZone? (Y/y:Yes N/n:No) [Y/y]:y

    TimeZone:

    [ 1]: GTM-12=West Date Line

    [ 2]: GTM-11=Samoa

    [ 3]: GTM-10=Hawaii

    [ 4]: GTM-09=Alaska

    [ 5]: GTM-08=Pacific(America and Canada)

    [ 6]: GTM-07=Arizona

    [ 7]: GTM-06=Central(America and Canada)

    [ 8]: GTM-05=East(America and Canada)

    [ 9]: GTM-04=Atlantic(America and Canada)

    [10]: GTM-03=Brasilia

    [11]: GTM-02=Middle Atlantic

    [12]: GTM-01=Azores

    [13]: GTM=Greenwich Mean Time

    [14]: GTM+01=Sarajevo

    [15]: GTM+02=Cairo

    [16]: GTM+03=Moscow

    [17]: GTM+04=AbuDhabi

    [18]: GTM+05=Islamabad

    [19]: GTM+06=Dakar

    [20]: GTM+07=BangKok,Hanoi

    [21]: GTM+08=China

    [22]: GTM+09=Seoul

    [23]: GTM+10=Guam

    [24]: GTM+11=Solomon

    [25]: GTM+12=Fiji

    [26]: GTM+13=Nukualofa

    [27]: GTM+14=Kiribati

    Please Select the TimeZone [21]:21

    Installation Type:

    1 Typical

    2 Server

    3 Client

    4 Custom

    Please Input the number of the Installation Type [1 Typical]:1

    Require Space: 1094M

    Please Input the install path [/home/dmdba/dmdbms]:/opt/dmdba/dmdbms

    No write permission!

    Please Input the install path [/home/dmdba/dmdbms]:/opt/dmdba/dmdbms

    Available Space:49200M

    Please Confirm the install path(/opt/dmdba/dmdbms)? (Y/y:Yes N/n:No) [Y/y]:y

    Pre-Installation Summary

    Installation Location: /opt/dmdba/dmdbms

    Require Space: 1094M

    Available Space: 49200M

    Version Information: Enterprise Version

    Expire Date: 2021-12-25

    Installation Type: Typical

    Confirm to Install? (Y/y:Yes N/n:No):y

    2021-07-19 10:16:45

    [INFO] Installing DM DBMS...

    2021-07-19 10:16:46

    [INFO] Installing BASE Module...

    2021-07-19 10:16:47

    [INFO] Installing SERVER Module...

    2021-07-19 10:16:47

    [INFO] Installing CLIENT Module...

    2021-07-19 10:16:48

    [INFO] Installing DRIVERS Module...

    2021-07-19 10:16:48

    [INFO] Installing MANUAL Module...

    2021-07-19 10:16:48

    [INFO] Installing SERVICE Module...

    2021-07-19 10:16:49

    [INFO] Move log file to log directory.

    2021-07-19 10:16:49

    [INFO] Installed DM DBMS completely.

    Please execute the commands by root:

    /opt/dmdba/dmdbms/script/root/root_installer.sh

    End

    4.1.3. 使用Root注册DmAPService服务:  

    [root@testDB01 ~]#  /opt/dmdba/dmdbms/script/root/root_installer.sh

    Move /opt/dmdba/dmdbms/bin/dm_svc.conf to /etc

    Modify the files' mode of DM Server

    Create the DmAPService service

    Created symlink /etc/systemd/system/multi-user.target.wants/DmAPService.service → /usr/lib/systemd/system/DmAPService.service.

    Finished to create the service (DmAPService)

    Start the DmAPService service

    [root@testDB01 ~]#

    4.2. 裸设备配置(所有节点)

    4.2.1. udev 方式绑定裸设备

    通过udev绑定存储与raw关系:

    vim /etc/udev/rules.d/90-raw.rules

    ACTION=="add|change", ENV{DM_UUID}=="mpath-36a4bdc4100cdf55d02bda34100000004", SYMLINK+="dm/asmdiskdcr", GROUP="dinstall", OWNER="dmdba", MODE="0660"

    ACTION=="add|change", ENV{DM_UUID}=="mpath-36a4bdc4100cdf55d02bdb4c100000005", SYMLINK+="dm/asmdiskvote", GROUP="dinstall", OWNER="dmdba", MODE="0660"

    ACTION=="add|change", ENV{DM_UUID}=="mpath-36a4bdc4100cdf55d02be0bad00000008", SYMLINK+="dm/asmdiskredo", GROUP="dinstall", OWNER="dmdba", MODE="0660"

    ACTION=="add|change", ENV{DM_UUID}=="mpath-36a4bdc4100cdf55d02be489f0000000b", SYMLINK+="dm/asmdiskdata1", GROUP="dinstall", OWNER="dmdba", MODE="0660"

    ACTION=="add|change", ENV{DM_UUID}=="mpath-36a4bdc4100cdf55d02be375f0000000a", SYMLINK+="dm/asmdiskdata2", GROUP="dinstall", OWNER="dmdba", MODE="0660

    重新加载raw配置。

    [root@testDB02 ~]# /sbin/udevadm control --reload

    [root@testDB02 ~]# /sbin/udevadm trigger --type=devices --action=change

    检查是否生效(所有节点都要检查):

    [root@testDB02 ~]# ll /dev/dm/

    总用量 0

    lrwxrwxrwx 1 root root 8  7月 21 11:14 asmdiskdata2 -> ../dm-11

    lrwxrwxrwx 1 root root 8  7月 21 11:14 asmdiskdata1 -> ../dm-12

    lrwxrwxrwx 1 root root 7  7月 21 11:14 asmdiskdcr -> ../dm-2

    lrwxrwxrwx 1 root root 7  7月 21 11:14 asmdiskredo -> ../dm-9

    lrwxrwxrwx 1 root root 7  7月 21 11:14 asmdiskvote -> ../dm-6

    4.3. DSC部署

    4.3.1. DMASM磁盘配置

    4.3.1.1. 创建ASM磁盘(某个节点执行即可)

    在dmdba用户下执行:./dmasmcmd

    ASM>create dcrdisk '/dev/dm/asmdiskdcr' 'dcr'

    [Trace]The ASM initialize dcrdisk /dev/dm/asmdiskdcr to name DMASMdcr

    Used time: 9.151(ms).

    ASM>create votedisk '/dev/dm/asmdiskvote' 'vote'

    [Trace]The ASM initialize votedisk /dev/dm/asmdiskvote to name DMASMvote

    Used time: 8.974(ms).

    ASM>create asmdisk '/dev/dm/asmdiskredo' 'LOG0'

    [Trace]The ASM initialize asmdisk /dev/dm/asmdiskredo to name DMASMDATA0

    Used time: 4.454(ms).

    ASM>create asmdisk '/dev/dm/asmdiskdata1' 'DATA0'

    [Trace]The ASM initialize asmdisk /dev/dm/asmdiskdata1 to name DMASMDATA0

    Used time: 4.454(ms).

    ASM>create asmdisk '/dev/dm/asmdiskdata2' 'DATA_2'

    [Trace]The ASM initialize asmdisk /dev/dm/asmdiskdata2 to name DMASMDATA_2

    Used time: 4.454(ms).

    检查ASM是否创建成功

    ASM>listdisks '/dev/dm'

    [/dev/dm/asmdiskdata1]: unused ASM disk, name:[DMASMDATA0], size:[2097151M]

    [/dev/dm/asmdiskdata2]: unused ASM disk, name:[DMASMDATA_2], size:[2097151M]

    [/dev/dm/asmdiskredo]: unused ASM disk, name:[DMASMLOG0], size:[51199M]

    [/dev/dm/asmdiskvote]: used ASM disk, name:[DMASMvote], size:[1023M], group_id:[0], disk_id:[0]

    [/dev/dm/asmdiskdcr]: used ASM disk, name:[DMASMdcr], size:[1023M], group_id:[0], disk_id:[0]

    Used time: 1.051(ms).

    4.3.1.2. 配置ASM磁盘(某个节点执行即可)

    创建初始化配置目录:

    [dmdba@testDB01bin]$ mkdir -p /opt/dmdba/config

    配置dmdcr_cfg.ini

    DCR_N_GRP = 3

    DCR_VTD_PATH = /dev/dm/asmdiskvote

    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.1.137

    DCR_EP_PORT = 9341

    [GRP_CSS]

    DCR_EP_NAME = CSS1

    DCR_EP_HOST = 192.168.1.138

    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 = 192.168.1.137

    DCR_EP_PORT = 9349

    DCR_EP_ASM_LOAD_PATH = /dev/dm

    [GRP_ASM]

    DCR_EP_NAME = ASM1

    DCR_EP_SHM_KEY = 93361

    DCR_EP_SHM_SIZE = 10

    DCR_EP_HOST = 192.168.1.138

    DCR_EP_PORT = 9351

    DCR_EP_ASM_LOAD_PATH = /dev/dm

    [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 = 5236

    DCR_CHECK_PORT = 9741

    [GRP_DSC]

    DCR_EP_NAME = DSC1

    DCR_EP_SEQNO = 1

    DCR_EP_PORT = 5236

    DCR_CHECK_PORT = 9742

    初始化ASM磁盘组:

    [dmdba@testDB01 bin]$ ./dmasmcmd

    DMASMCMD V8

    ASM>init dcrdisk '/dev/dm/asmdiskdcr' from '/opt/dmdba/config/dmdcr_cfg.ini' identified by 'abcd'

    [Trace]DG 126 allocate 4 extents for file 0xfe000002.

    Used time: 75.959(ms).

    ASM>init votedisk '/dev/dm/asmdiskvote' from '/opt/dmdba/config/dmdcr_cfg.ini'

    [Trace]DG 125 allocate 4 extents for file 0xfd000002.

    Used time: 23.757(ms).

    ASM>

    4.3.2. 配置dmasvrmal.ini(所有节点)

    所有DSC节点完全一致

    [MAL_INST1]

     MAL_INST_NAME = ASM0

     MAL_HOST = 192.168.1.137

     MAL_PORT = 7236

    [MAL_INST2]

     MAL_INST_NAME = ASM1

     MAL_HOST = 192.168.1.138

     MAL_PORT = 7237

    4.3.3. 配置dmdcr.ini(所有节点)

    配置dcr文件:

    DMDCR_PATH = /dev/dm/asmdiskdcr

    DMDCR_MAL_PATH =/opt/dmdba/config/dmasvrmal.ini #dmasmsvr 使用的 MAL 配置文件路径

    DMDCR_SEQNO = 0   #每个节点的seqno不同(0,1,2)

    #ASM 重启参数,命令行方式启动

    DMDCR_ASM_RESTART_INTERVAL = 60 #(若为1,则为自动拉起dmasmsvr服务,只启动dmcss,等待拉起dmasmsvr即可)

    DMDCR_ASM_STARTUP_CMD = /opt/dmdba/dmdbms/bin/dmasmsvr dcr_ini=/opt/dmdba/config/dmdcr.ini

    #DB 重启参数,命令行方式启动

    DMDCR_DB_RESTART_INTERVAL = 60 #(若为1,则为自动拉起dmserver服务,只启动dmcss,等待拉起dmserver即可)

    DMDCR_DB_STARTUP_CMD = /opt/dmdba/dmdbms/bin/dmserver path=/opt/dmdba/config/data/dsc0_config/dm.ini   dcr_ini=/opt/dmdba/config/dmdcr.ini

    启动dmcss,验证dcr配置文件是否正确:

    [dmdba@testDB01 bin]# ./dmcss DCR_INI=/opt/dmdba/config/dmdcr.ini

    DMCSS V8.1.0.147-Build(2019.03.27-104581)ENT

    DMCSS IS READY

    [CSS]: 设置EP CSS0[0]为控制节点

    [ASM]: 设置EP ASM0[0]为控制节点

    [ASM]: 设置命令[START NOTIFY], 目标站点 ASM0[0], 命令序号[2]

    [ASM]: 设置命令[EP START], 目标站点 ASM0[0], 命令序号[3]

    [ASM]: 设置命令[NONE], 目标站点 ASM0[0], 命令序号[0]

    启动dmasmsrv

    [dmdba@testDB01 bin]# ./dmasmsvr DCR_INI=/opt/dmdba/config/dmdcr.ini

    ASM SELF EPNO:0

    DMASMSVR V8.1.0.147-Build(2019.03.27-104581)ENT

    dmasmsvr task worker thread startup

    the ASM server is Ready.

    check css cmd: START NOTIFY, cmd_seq: 2

    check css cmd: EP START, cmd_seq: 3

    ASM Control Node EPNO:0

    check css cmd: EP OPEN, cmd_seq: 8

    4.3.4. 创建磁盘组(某个节点执行即可)

    [dmdba@testDB01 bin]# ./dmasmtool DCR_INI=/opt/dmdba/config/dmdcr.ini

    DMASMTOOL V8.1.0.147-Build(2019.03.27-104581)ENT

    ASM>create diskgroup 'DMLOG' asmdisk '/dev/dm/asmdiskredo'

    Used time: 765.229(ms).

    ASM>create diskgroup 'DMDATA' asmdisk '/dev/dm/asmdiskdata1'

    Used time: 727.360(ms).

    ASM>create diskgroup 'DMBAK' asmdisk '/dev/dm/asmdiskdata2'

    4.3.5. 配置dminit.ini(某个节点执行即可)

    实例初始化配置文件:

    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/dm/asmdiskdcr #dcr 磁盘路径,目前不支持 asm,只能是裸设备

    dcr_seqno = 0

    auto_overwrite = 1

    CHARSET=1

    PAGE_SIZE=32

    LENGTH_IN_CHAR=0

    LOG_SIZE=2048

    [DSC0] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应

    config_path = /opt/dmdba/config/data/dsc0_config

    port_num = 5236

    mal_host = 192.168.1.137

    mal_port = 9340

    log_path = +DMLOG/log/dsc0_log01.log

    log_path = +DMLOG/log/dsc0_log02.log

    [DSC1] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应

    config_path = /opt/dmdba/config/data/dsc1_config

    port_num = 5236

    mal_host = 192.168.1.138

    mal_port = 9341

    log_path = +DMLOG/log/dsc1_log01.log

    log_path = +DMLOG/log/dsc1_log02.log

    4.3.6. 初始化数据库(某个节点执行即可)

    [dmdba@testDB01bin]# ./dminit control=/opt/dmdba/config/dminit.ini

    initdb V8.1.0.147-Build(2019.03.27-104581)ENT

    db version: 0x7000a

    file dm.key not found, use default license!

    License will expire in 14 day(s) on 2021-07-15

     log file path: +DMLOG/log/dsc0_log01.log

     log file path: +DMLOG/log/dsc0_log02.log

     log file path: +DMLOG/log/dsc1_log01.log

     log file path: +DMLOG/log/dsc1_log02.log

    write to dir [+DMDATA/data/dsc].

    create dm database success. 2021-07-01 20:05:45

    4.3.7. 拷贝配置文件到远程节点

    把dsc1_config的配置文件拷贝到远程节点相对应的目录下

    比如:testDB02:/opt/dmdba/config/data/dsc1_config

    4.3.8. 启动数据库实例

    如果DM CSS 配置有自动拉起 dmserver 的功能,可以等待 DM CSS 自动拉起实例,不需要手动启动asm和dmserver。

    如果需要手动启动,可参考下面的操作步骤:

    1、启动css

    /opt/dmdba/dmdbms/bin/dmcss DCR_INI=/opt/dmdba/config/dmdcr.ini

    2、启动asm

    /opt/dmdba/dmdbms/bin/dmasmsvr DCR_INI=/opt/dmdba/config/dmdcr.ini

    3、启动instance

    --节点1

    [dmdba@testDB01 bin]$ ./dmserver /opt/dmdba/config/data/dsc0_config/dm.ini dcr_ini=/opt/dmdba/config/dmdcr.ini

    --节点2

    [dmdba@testDB02 bin]$ ./dmserver /opt/dmdba/config/data/dsc1_config/dm.ini dcr_ini=/opt/dmdba/config/dmdcr.ini

    4.3.9. DMCSSM监视器(任意一个节点)

    配置监视器配置文件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.1.137:9341

    CSSM_CSS_IP = 192.168.1.138:9343

    CSSM_LOG_PATH =/opt/dmdba/dmdbms/data/logs#监视器日志文件存放路径

    CSSM_LOG_FILE_SIZE = 32 #每个日志文件最大 32M

    CSSM_LOG_SPACE_LIMIT = 0 #不限定日志文件总占用空间

    启动

    [root@testDB01bin]# ./dmcssm ini_path=/opt/dmdba/config/dmcssm.ini

    至此DSC部署完成。

    5. 使用root注册OS服务(所有节点)

    1、ASM、dmserver服务是由CSS自动拉起,只需要注册css服务和守护进程服务即可。

    2、守护进程依赖dmserver服务启动,当服务器重启后需要手动启动守护进程。

    服务器名

    服务名

    备注

    服务启动/关闭

    testDB01

    Css服务

    [root@testDB01 root]# ./dm_service_installer.sh -t dmcss -p dmcss0 -dcr_ini /opt/dmdba/config/dmdcr.ini

    /opt/dmdba/dmdbms/bin/DmCSSServicedmcss0 start|stop|status

    testDB01

    asm服务

    [root@testDB01 root]# ./dm_service_installer.sh -t dmasmsvr -p Asm0 -dcr_ini /opt/dmdba/config/dmdcr.ini -y DmCSSServicedmcss0

    Created symlink /etc/systemd/system/multi-user.target.wants/DmASMSvrServiceAsm0.service → /usr/lib/systemd/system/DmASMSvrServiceAsm0.service.

    Finished to create the service (DmASMSvrServiceAsm0)

    /opt/dmdba/dmdbms/bin/DmASMSvrServiceAsm0 start|stop|status

    testDB01

    数据库实例

    [root@testDB01 root]# ./dm_service_installer.sh -t dmserver -p dsc0 -dm_ini /opt/dmdba/config/data/dsc0_config/dm.ini -dcr_ini /opt/dmdba/config/dmdcr.ini -y DmASMSvrServiceAsm0

    Created symlink /etc/systemd/system/multi-user.target.wants/DmServicedsc0.service → /usr/lib/systemd/system/DmServicedsc0.service.

    Finished to create the service (DmServicedsc0)

    /opt/dmdba/dmdbms/bin/DmServicedsc0 start|stop|status

    testDB02

    Css服务

    [root@testDB02 root]#  ./dm_service_installer.sh -t dmcss -p dmcss1 -dcr_ini   /opt/dmdba/config/dmdcr.ini

    /opt/dmdba/dmdbms/bin/DmCSSServicedmcss1 start|stop|status

    testDB02

    asm服务

    [root@testDB02 root]# ./dm_service_installer.sh -t dmasmsvr -p Asm1 -dcr_ini /opt/dmdba/config/dmdcr.ini -y DmCSSServicedmcss1

    Created symlink /etc/systemd/system/multi-user.target.wants/DmASMSvrServiceAsm1.service → /usr/lib/systemd/system/DmASMSvrServiceAsm1.service.

    Finished to create the service (DmASMSvrServiceAsm1)

    /opt/dmdba/dmdbms/bin/DmASMSvrServiceAsm1 start|stop|status

    testDB02

    数据库实例

    [root@testDB02 root]# ./dm_service_installer.sh -t dmserver -p dsc1 -dm_ini /opt/dmdba/config/data/dsc1_config/dm.ini -dcr_ini /opt/dmdba/config/dmdcr.ini -y DmASMSvrServiceAsm1

    Created symlink /etc/systemd/system/multi-user.target.wants/DmServicedsc1.service → /usr/lib/systemd/system/DmServicedsc1.service.

    Finished to create the service (DmServicedsc1)

    /opt/dmdba/dmdbms/bin/DmServicedsc1 start|stop|status

    注册完CSS、ASM、DB服务后,禁用ASM、DB服务随机启动。

    [root@testDB02 ~]# systemctl disable DmServicedsc1.service

    [root@testDB02 ~]# systemctl disable DmASMSvrServiceAsm1.service

    [root@testDB02 ~]# systemctl list-unit-files |grep Dm

    DmAPService.service                        enabled        

    DmASMSvrServiceAsm1.service                disabled       

    DmCSSServicedmcss1.service                 enabled        

    DmServicedsc1.service                      disabled

    6. 高可用配置

    Vim /etc/dm_svc.conf配置。

    只需在客户端置即可。

    # 以#开头的行表示是注释

    # 全局配置区

    DMDSC=(10.79.180.37:5236,10.79.180.38:5236)

    TIME_ZONE=(+480) #表示+8:00 时区

    LOGIN_ENCRYPT=(0)

    DIRECT=(Y)

    # 服务配置区

    [DMDSC]

    CLUSTER=(DSC) #表示集群为DSC集群

    EP_SELECTOR=(0) #表示第一节点正常时只连第一个节点

    AUTO_RECONNECT=(1)#第一个节点故障恢复后自动重连第一个节点

    SWITCH_TIME=(30) #在服务器之间切换的次数

    SWITCH_INTERVAL=(200) #在服务器之间切换的时间间隔,单位为毫秒

    更多资讯请上达梦技术社区了解: https://eco.dameng.com

    24小时免费服务热线:400 991 6599

  • 相关阅读:
    Jmeter中的几个重要测试指标释义
    Hibernate无主键配置文件编写
    Hibernate各种主键生成策略与配置详解
    安装禅道的基本步骤
    使用Jmeter进行http接口测试
    myeclipse如何修改Web项目名称
    oracle中根据时间获取最新的一条数据
    JQuery之滑动幻灯片插件Easy Slider初体验
    比较实用的JavaScript库
    UBUNTU下SUBLIME TEXT3的安装+破解+汉化+中文输入
  • 原文地址:https://www.cnblogs.com/last-one/p/15169460.html
Copyright © 2020-2023  润新知