[root@dm1 raw]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.137.156 dm2-priv
192.168.137.155 dm1-priv
192.168.31.170 dm1
192.168.31.171 dm2
[root@dm1 ~]# cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
[root@dm1 ~]# cat /home/dmdba/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export DM_HOME="/dm/dmdbms"
export LD_LIBRARY_PATH="/dm/dmdbms/bin:$LD_LIBRARY_PATH"
export PATH="/dm/dmdbms/bin:$PATH"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/dm/dmdbms/bin"
export DM_HOME="/dm/dmdbms"
[root@dm1 raw]# cat /usr/lib/udev/rules.d/60-raw.rules
#
# Enter raw device bindings here.
#
# An example would be:
# ACTION=="add", KERNEL=="sda", RUN+="/usr/bin/raw /dev/raw/raw1 %N"
# to bind /dev/raw/raw1 to /dev/sda, or
# ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="1", RUN+="/usr/bin/raw /dev/raw/raw2 %M %m"
# to bind /dev/raw/raw2 to the device with major 8, minor 1.
:$
ACTION=="add", KERNEL=="sdb", RUN+="/usr/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc", RUN+="/usr/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd", RUN+="/usr/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde", RUN+="/usr/bin/raw /dev/raw/raw4 %N"
KERNEL=="raw1", OWNER="dmdba" GROUP="dinstall", MODE="0660"
KERNEL=="raw2", OWNER="dmdba" GROUP="dinstall", MODE="0660"
KERNEL=="raw3", OWNER="dmdba" GROUP="dinstall", MODE="0660"
KERNEL=="raw4", OWNER="dmdba" GROUP="dinstall", MODE="0660"
[root@dm1 raw]# blockdev --getsize64 /dev/raw/raw1
2147483648
[dmdba@dm1 ~]$ dmasmcmd
DMASMCMD V8
ASM>create dcrdisk '/dev/raw/raw1' 'dcr'
[Trace]The ASM initialize dcrdisk /dev/raw/raw1 to name DMASMdcr
Used time: 4.244(ms).
ASM>create votedisk '/dev/raw/raw2' 'vote'
[Trace]The ASM initialize votedisk /dev/raw/raw2 to name DMASMvote
Used time: 28.654(ms).
ASM>create asmdisk '/dev/raw/raw3' 'LOG0'
[Trace]The ASM initialize asmdisk /dev/raw/raw3 to name DMASMLOG0
Used time: 39.026(ms).
ASM>create asmdisk '/dev/raw/raw4' 'DATA0'
[Trace]The ASM initialize asmdisk /dev/raw/raw4 to name DMASMDATA0
Used time: 00:00:02.238.
ASM>init dcrdisk '/dev/raw/raw1' from '/dm/dmdbms/data/dmdcr_cfg.ini'identified by 'abcd'
[Trace]DG 126 allocate 4 extents for file 0xfe000002.
Used time: 410.431(ms).
ASM>init votedisk '/dev/raw/raw2' from '/dm/dmdbms/data/dmdcr_cfg.ini'
[Trace]DG 125 allocate 4 extents for file 0xfd000002.
Used time: 00:00:02.112.
1号与2号一样
Cat /dm/dmdbms/data/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
[GRP_CSS]
DCR_EP_NAME = CSS0
DCR_EP_HOST = dm1-priv
DCR_EP_PORT = 9341
[GRP_CSS]
DCR_EP_NAME = CSS1
DCR_EP_HOST = dm2-priv
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 = dm1-priv
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 = dm2-priv
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 = 5236
DCR_CHECK_PORT = 9741
[GRP_DSC]
DCR_EP_NAME = DSC1
DCR_EP_SEQNO = 1
DCR_EP_PORT = 5236
DCR_CHECK_PORT = 9742
1号与2号一样
[dmdba@dm1 data]$ cat dmasvrmal.ini
[MAL_INST1]
MAL_INST_NAME = ASM0
MAL_HOST = dm1
MAL_PORT = 7236
[MAL_INST2]
MAL_INST_NAME = ASM1
MAL_HOST = dm2
MAL_PORT = 7237
1号主机
[dmdba@dm1 data]$ cat dmdcr.ini
DMDCR_PATH = /dev/raw/raw1
DMDCR_MAL_PATH =/dm/dmdbms/data/dmasvrmal.ini
DMDCR_SEQNO = 0
DMDCR_ASM_RESTART_INTERVAL = 0
DMDCR_ASM_STARTUP_CMD = /dm/dmdbms/bin/dmasmsvr dcr_ini= /dm/dmdbms/data/dmdcr.ini
DMDCR_DB_RESTART_INTERVAL = 0
DMDCR_DB_STARTUP_CMD = /dm/dmdbms/bin/dmserver path=/dm/dmdbms/data/dsc0_config/dm.ini dcr_ini=/dm/dmdbms/data/dmdcr.ini
2号主机
[dmdba@dm2 data]$ cat dmdcr.ini
DMDCR_PATH = /dev/raw/raw1
DMDCR_MAL_PATH =/dm/dmdbms/data/dmasvrmal.ini
DMDCR_SEQNO = 1
DMDCR_ASM_RESTART_INTERVAL = 0
DMDCR_ASM_STARTUP_CMD = /dm/dmdbms/bin/dmasmsvr dcr_ini= /dm/dmdbms/data/dmdcr.ini
DMDCR_DB_RESTART_INTERVAL = 0
DMDCR_DB_STARTUP_CMD = /dm/dmdbms/bin/dmserver path=/dm/dmdbms/data/dsc0_config/dm.ini dcr_ini=/dm/dmdbms/data/dmdcr.ini
[dmdba@dm1 bin]$ dmcss DCR_INI=/dm/dmdbms/data/dmdcr.ini
DMCSS V8
DMCSS IS READY
[CSS]: Set EP CSS0[0] as Control node
show
css current time:2020-03-05 20:40:04
======= group[name = GRP_CSS, seq = 0, type = CSS, Control Node = 0] ===================
ep: inst_name seqno port mode sys_status vtd_status is_ok active guid ts
CSS0 0 9341 Control Node OPEN WORKING OK TRUE 608719087 608719333
CSS1 1 9343 Normal Node OPEN WORKING OK TRUE 608739297 608739495
self css info:
[ASM0] auto restart = FALSE
[DSC0] auto restart = FALSE
======= group[name = GRP_ASM, seq = 1, type = ASM, Control Node = 255] ===================
ep: inst_name seqno port mode sys_status vtd_status is_ok active guid ts
ASM0 0 9349 Normal Node SHUTDOWN UNKNOWN OK FALSE 0 0
ASM1 1 9351 Normal Node SHUTDOWN UNKNOWN OK FALSE 0 0
===================================================================================
n_ok_ep = 2
(0, 0)
(1, 1)
sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL
===================================================================================
======= group[name = GRP_DSC, seq = 2, type = DB, Control Node = 255] ===================
ep: inst_name seqno port mode sys_status vtd_status is_ok active guid ts
DSC0 0 5236 Normal Node SHUTDOWN UNKNOWN OK FALSE 0 0
DSC1 1 5236 Normal Node SHUTDOWN UNKNOWN OK FALSE 0 0
===================================================================================
n_ok_ep = 2
(0, 0)
(1, 1)
sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL
===================================================================================
在DM1执行dmasmsvr DCR_INI=/dm/dmdbms/data/dmdcr.ini
[dmdba@dm1 data]$ dmasmsvr DCR_INI=/dm/dmdbms/data/dmdcr.ini
ASM SELF EPNO:0
showDMASMSVR V8
show
dmasmsvr task worker thread startup
the ASM server is Ready.
invalid command.
invalid command.
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: 10
[Trace]atsk_process_connect success, client_is_local=1
[ASM]: Set EP ASM0[0] as Control node
[ASM]: CSS set cmd START NOTIFY, dest_ep ASM0 seqno = 0, cmd_seq = 2
[ASM]: CSS set cmd EP START, dest_ep ASM0 seqno = 0, cmd_seq = 3
[ASM]: CSS set cmd NONE, dest_ep ASM0 seqno = 0, cmd_seq = 0
[ASM]: CSS set cmd EP START, dest_ep ASM1 seqno = 1, cmd_seq = 5
[ASM]: CSS set cmd NONE, dest_ep ASM1 seqno = 1, cmd_seq = 0
[ASM]: CSS set cmd EP OPEN, dest_ep ASM0 seqno = 0, cmd_seq = 10
[ASM]: CSS set cmd EP OPEN, dest_ep ASM1 seqno = 1, cmd_seq = 11
[ASM]: CSS set cmd NONE, dest_ep ASM0 seqno = 0, cmd_seq = 0
[ASM]: CSS set cmd NONE, dest_ep ASM1 seqno = 1, cmd_seq = 0
show
css current time:2020-03-05 20:52:29
======= group[name = GRP_CSS, seq = 0, type = CSS, Control Node = 0] ===================
ep: inst_name seqno port mode sys_status vtd_status is_ok active guid ts
CSS0 0 9341 Control Node OPEN WORKING OK TRUE 608719087 608719705
CSS1 1 9343 Normal Node OPEN WORKING OK TRUE 608739297 608739867
self css info:
[ASM0] auto restart = FALSE
[DSC0] auto restart = FALSE
======= group[name = GRP_ASM, seq = 1, type = ASM, Control Node = 0] ===================
ep: inst_name seqno port mode sys_status vtd_status is_ok active guid ts
ASM0 0 9349 Control Node OPEN WORKING OK TRUE 608928040 608928176
ASM1 1 9351 Normal Node OPEN WORKING OK TRUE 608931076 608931204
===================================================================================
n_ok_ep = 2
(0, 0)
(1, 1)
sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL
crash process over flag is TRUE
===================================================================================
======= group[name = GRP_DSC, seq = 2, type = DB, Control Node = 255] ===================
ep: inst_name seqno port mode sys_status vtd_status is_ok active guid ts
DSC0 0 5236 Normal Node SHUTDOWN UNKNOWN OK FALSE 0 0
DSC1 1 5236 Normal Node SHUTDOWN UNKNOWN OK FALSE 0 0
===================================================================================
n_ok_ep = 2
(0, 0)
(1, 1)
sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL
[dmdba@dm1 ~]$ dmasmtool DCR_INI=/dm/dmdbms/data/dmdcr.ini
DMASMTOOL V8
ASM>create diskgroup 'DMLOG' asmdisk '/dev/raw/raw3'
Used time: 00:00:09.396.
ASM>create diskgroup 'DMDATA' asmdisk '/dev/raw/raw4'
Used time: 00:00:09.795.
ASM>lsdg
total 4 groups......
1 disk_group:
name: DMLOG
id: 0
au_size: 1.00 MB
extent_size: 4
total_size: 3.00 GB
free_size: 2.99 GB
total_file_num: 1
2 disk_group:
name: DMDATA
id: 1
au_size: 1.00 MB
extent_size: 4
total_size: 3.00 GB
free_size: 2.99 GB
total_file_num: 1
3 disk_group:
name: VOTE
id: 125
au_size: 1.00 MB
extent_size: 4
total_size: 2.00 GB
free_size: 1.98 GB
total_file_num: 2
4 disk_group:
name: DCR
id: 126
au_size: 1.00 MB
extent_size: 4
total_size: 2.00 GB
free_size: 1.98 GB
total_file_num: 2
Used time: 404.623(ms).
[dmdba@dm1 data]$ cat 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/raw/raw1 #dcr 磁盘路径,目前不支持 asm,只能是裸设备
dcr_seqno = 0
auto_overwrite = 1
[DSC0] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应
config_path = /dm/dmdbms/data/dsc0_config
port_num = 5236
mal_host = dm1-priv
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 = /dm/dmdbms/data/dsc1_config
port_num = 5237
mal_host = dm2-priv
mal_port = 9341
log_path = +DMLOG/log/dsc1_log01.log
log_path = +DMLOG/log/dsc1_log02.log
[dmdba@dm1 data]$ dminit control=/dm/dmdbms/data/dminit.ini
initdb V8
db version: 0x7000a
file dm.key not found, use default license!
License will expire on 2020-11-21
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. 2020-03-05 21:01:55
[dmdba@dm1 data]$ ls
DAMENG dmasvrmal.ini dmdcr_cfg.ini dmdcr.ini dminit.ini dmsql.buf1583131272125552.buf dsc0_config dsc1_config
[dmdba@dm1 data]$ ls -ltr
total 24
-rw-r--r-- 1 dmdba dinstall 22 Mar 2 14:41 dmsql.buf1583131272125552.buf
drwxr-xr-x. 6 dmdba dinstall 4096 Mar 5 19:47 DAMENG
-rw-r--r-- 1 dmdba dinstall 942 Mar 5 19:53 dmdcr_cfg.ini
-rw-r--r-- 1 dmdba dinstall 138 Mar 5 20:11 dmasvrmal.ini
-rw-r--r-- 1 dmdba dinstall 355 Mar 5 20:31 dmdcr.ini
-rw-r--r-- 1 dmdba dinstall 874 Mar 5 20:59 dminit.ini
drwxr-xr-x 2 dmdba dinstall 55 Mar 5 21:00 dsc1_config
drwxr-xr-x 2 dmdba dinstall 87 Mar 5 21:00 dsc0_config
复制到2号主机
[dmdba@dm1 data]$ scp dsc1_config/ dm2:/dm/dmdbms/data/.
dmdba@dm2's password:
dsc1_config: not a regular file
[dmdba@dm1 data]$
[dmdba@dm1 ~]$ dmserver /dm/dmdbms/data/dsc0_config/dm.ini dcr_ini=/dm/dmdbms/data/dmdcr.ini
file dm.key not found, use default license!
version info: develop
Use normal os_malloc instead of HugeTLB
Use normal os_malloc instead of HugeTLB
DM Database Server x64 V8 1-1-45-19.11.21-116030-ENT startup...
Database mode = 0, oguid = 0
License will expire on 2020-11-21
check CSS cmd: START NOTIFY, cmd_seq: 2
Control Node change from 255 to 254
check CSS cmd: DCR_LOAD, cmd_seq: 3
check CSS cmd: EP START, cmd_seq: 6
Control Node change from 254 to 0
file lsn: 0
check CSS cmd: EP START2, cmd_seq: 11
ndct db load finished
ckpt2_exec_immediately begin.
checkpoint: buffer pages flushing...
ckpt_lsn, ckpt_fil, ckpt_off are set as (2, 0, 4608)
checkpoint: 1 pages flushed.
checkpoint finished, rlog free space, used space is (536862208, 512)
checkpoint: buffer pages flushing...
ckpt_lsn, ckpt_fil, ckpt_off are set as (3, 0, 4608)
checkpoint: 1 pages flushed.
checkpoint finished, rlog free space, used space is (536862208, 512)
ckpt_lsn, ckpt_fil, ckpt_off are set as (4, 0, 5120)
checkpoint: 0 pages flushed.
checkpoint finished, rlog free space, used space is (536862720, 0)
ckpt_lsn, ckpt_fil, ckpt_off are set as (4, 0, 5120)
checkpoint: 0 pages flushed.
checkpoint finished, rlog free space, used space is (536862720, 0)
ndct fill fast pool finished
iid page's trxid[1002]
NEXT TRX ID = 1003
pseg_collect_items, collect 0 active_trxs, 0 cmt_trxs, 0 pre_cmt_trxs, 0 active_pages, 0 cmt_pages, 0 pre_cmt_pages
pseg_process_collect_items end, 0 active trx, 0 active pages, 0 committed trx, 0 committed pages
total 0 active crash trx, pseg_crash_trx_rollback begin ...
pseg_crash_trx_rollback end
purg2_crash_cmt_trx end, total 0 page purged
set EP[0]'s pseg state to inactive
pseg recv finished
nsvr_startup end.
aud sys init success.
aud rt sys init success.
trx: 2004 purged 1 pages
trx: 2042 purged 1 pages
trx: 2044 purged 1 pages
trx: 2046 purged 1 pages
trx: 2048 purged 1 pages
trx: 2070 purged 1 pages
trx: 2310 purged 1 pages
trx: 2348 purged 1 pages
trx: 2350 purged 1 pages
trx: 2352 purged 1 pages
trx: 2354 purged 1 pages
trx: 2356 purged 1 pages
trx: 2358 purged 1 pages
trx: 2362 purged 1 pages
trx: 2366 purged 1 pages
trx: 2372 purged 1 pages
trx: 2384 purged 1 pages
trx: 2404 purged 1 pages
trx: 2450 purged 1 pages
trx: 3150 purged 1 pages
trx: 3174 purged 1 pages
trx: 3580 purged 1 pages
trx: 3582 purged 1 pages
trx: 3584 purged 1 pages
trx: 3586 purged 1 pages
trx: 3634 purged 1 pages
trx: 3636 purged 1 pages
trx: 3638 purged 1 pages
trx: 3640 purged 1 pages
trx: 3664 purged 1 pages
trx: 3668 purged 1 pages
trx: 3670 purged 1 pages
trx: 3672 purged 1 pages
trx: 3682 purged 21 pages
trx: 3736 purged 1 pages
trx: 3738 purged 1 pages
trx: 3740 purged 1 pages
trx: 3742 purged 1 pages
trx: 3754 purged 1 pages
trx: 3758 purged 1 pages
trx: 3762 purged 1 pages
trx: 3772 purged 1 pages
trx: 3782 purged 1 pages
trx: 3792 purged 1 pages
trx: 3796 purged 1 pages
trx: 3802 purged 1 pages
trx: 3806 purged 1 pages
trx: 3822 purged 1 pages
trx: 3824 purged 1 pages
trx: 3826 purged 1 pages
trx: 3828 purged 1 pages
trx: 3830 purged 1 pages
trx: 3832 purged 1 pages
trx: 3834 purged 1 pages
trx: 3836 purged 1 pages
trx: 3838 purged 1 pages
trx: 3844 purged 1 pages
trx: 3846 purged 1 pages
trx: 3848 purged 1 pages
trx: 3850 purged 1 pages
trx: 3852 purged 1 pages
trx: 3854 purged 1 pages
trx: 3856 purged 1 pages
trx: 3858 purged 1 pages
trx: 3860 purged 1 pages
trx: 3862 purged 1 pages
trx: 3864 purged 1 pages
trx: 3866 purged 1 pages
trx: 3870 purged 1 pages
trx: 3872 purged 1 pages
trx: 4170 purged 1 pages
trx: 4176 purged 8 pages
trx: 4680 purged 1 pages
checkpoint for flush ts[65535] buffer...
checkpoint for flush ts[65535] buffer end
systables desc init success.
ndct_db_load_info success.
nsvr_process_before_open begin.
EP(0) slot ctl page(1, 0, 16) trxid[4010], pseg_state[1]
nsvr_process_before_open success.
check CSS cmd: EP OPEN, cmd_seq: 16
iid page's trxid[5014]
EP(0) slot ctl page(1, 0, 16) trxid[4010], pseg_state[1]
NEXT TRX ID = 5015.
check CSS cmd: EP REAL OPEN, cmd_seq: 19
total 0 active crash trx, pseg_crash_trx_rollback begin ...
pseg_crash_trx_rollback end
SYSTEM IS READY.
[dmdba@dm2 ~]$ dmserver /dm/dmdbms/data/dsc1_config/dm.ini dcr_ini=/dm/dmdbms/data/dmdcr.ini
file dm.key not found, use default license!
version info: develop
Use normal os_malloc instead of HugeTLB
Use normal os_malloc instead of HugeTLB
DM Database Server x64 V8 1-1-45-19.11.21-116030-ENT startup...
Database mode = 0, oguid = 0
License will expire on 2020-11-21
check CSS cmd: DCR_LOAD, cmd_seq: 4
Control node start status: OPEN
check CSS cmd: EP START, cmd_seq: 8
Control Node change from 255 to 0
file lsn: 0
mal_tsk_process_g_crash_lsn_bro, ep_seqno(0), crash_lsn(0)
mal_tsk_process_g_crash_lsn_bro, ep_seqno(1), crash_lsn(0)
check CSS cmd: EP START2, cmd_seq: 13
ndct db load finished
ckpt2_exec_immediately begin.
ckpt_lsn, ckpt_fil, ckpt_off are set as (0, 0, 4096)
checkpoint: 0 pages flushed.
checkpoint finished, rlog free space, used space is (536861696, 1024)
checkpoint: buffer pages flushing...
ckpt_lsn, ckpt_fil, ckpt_off are set as (38328, 0, 5120)
checkpoint: 2 pages flushed.
checkpoint finished, rlog free space, used space is (536862720, 0)
ckpt_lsn, ckpt_fil, ckpt_off are set as (38328, 0, 5120)
checkpoint: 0 pages flushed.
checkpoint finished, rlog free space, used space is (536862720, 0)
ndct fill fast pool finished
pseg recv finished
nsvr_startup end.
aud sys init success.
aud rt sys init success.
systables desc init success.
ndct_db_load_info success.
nsvr_process_before_open begin.
nsvr_process_before_open success.
SYSTEM IS READY.
check CSS cmd: EP OPEN, cmd_seq: 17
iid page's trxid[6017]
EP(0) slot ctl page(1, 0, 16) trxid[4010], pseg_state[1]
NEXT TRX ID = 6018.
check CSS cmd: EP REAL OPEN, cmd_seq: 20
total 0 active crash trx, pseg_crash_trx_rollback begin ...
pseg_crash_trx_rollback end
启动完成看状态显示
show
css current time:2020-03-05 21:10:42
======= group[name = GRP_CSS, seq = 0, type = CSS, Control Node = 0] ===================
ep: inst_name seqno port mode sys_status vtd_status is_ok active guid ts
CSS0 0 9341 Control Node OPEN WORKING OK TRUE 608719087 608720251
CSS1 1 9343 Normal Node OPEN WORKING OK TRUE 608739297 608740413
self css info:
[ASM0] auto restart = FALSE
[DSC0] auto restart = FALSE
======= group[name = GRP_ASM, seq = 1, type = ASM, Control Node = 0] ===================
ep: inst_name seqno port mode sys_status vtd_status is_ok active guid ts
ASM0 0 9349 Control Node OPEN WORKING OK TRUE 608928040 608928722
ASM1 1 9351 Normal Node OPEN WORKING OK TRUE 608931076 608931750
===================================================================================
n_ok_ep = 2
(0, 0)
(1, 1)
sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL
crash process over flag is TRUE
===================================================================================
======= group[name = GRP_DSC, seq = 2, type = DB, Control Node = 0] ===================
ep: inst_name seqno port mode sys_status vtd_status is_ok active guid ts
DSC0 0 5236 Control Node OPEN WORKING OK TRUE 1767218722 1767218861
DSC1 1 5236 Normal Node OPEN WORKING OK TRUE 1767233299 1767233427
===================================================================================
n_ok_ep = 2
(0, 0)
(1, 1)
sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL
crash process over flag is TRUE
===================================================================================
[root@dm1 root]# ./dm_service_installer.sh -t dmcss -dcr_ini /dm/dmdbms/data/dmdcr.ini -p dm1
Created symlink from /etc/systemd/system/multi-user.target.wants/DmCSSServicedm1.service to /usr/lib/systemd/system/DmCSSServicedm1.service.
Finished to create the service (DmCSSServicedm1)
[root@dm1 root]# systemctl enable DmCSSServicedm1
[root@dm1 root]# ./dm_service_installer.sh -t dmasmsvr -dcr_ini /dm/dmdbms/data/dmdcr.ini -y DmCSSServicedm1 -p dm1
Created symlink from /etc/systemd/system/multi-user.target.wants/DmASMSvrServicedm1.service to /usr/lib/systemd/system/DmASMSvrServicedm1.service.
Finished to create the service (DmASMSvrServicedm1)
[root@dm1 root]# systemctl enable DmASMSvrServicedm1
[root@dm1 root]# ./dm_service_installer.sh -t dmserver -dm_ini /dm/dmdbms/data/dsc0_config/dm.ini -dcr_ini /dm/dmdbms/data/dmdcr.ini -y DmASMSvrServicedm1 -p dsc
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServicedsc.service to /usr/lib/systemd/system/DmServicedsc.service.
Finished to create the service (DmServicedsc)
[root@dm1 root]# systemctl start DmServicedsc
[root@dm2 root]# ./dm_service_installer.sh -t dmcss -dcr_ini /dm/dmdbms/data/dmdcr.ini -p dm2
Created symlink from /etc/systemd/system/multi-user.target.wants/DmCSSServicedm2.service to /usr/lib/systemd/system/DmCSSServicedm2.service.
Finished to create the service (DmCSSServicedm2)
[root@dm2 root]# systemctl enable DmCSSServicedm2
[root@dm2 root]# ./dm_service_installer.sh -t dmasmsvr -dcr_ini /dm/dmdbms/data/dmdcr.ini -y DmCSSServicedm2 -p dm2
Created symlink from /etc/systemd/system/multi-user.target.wants/DmASMSvrServicedm2.service to /usr/lib/systemd/system/DmASMSvrServicedm2.service.
Finished to create the service (DmASMSvrServicedm2)
[root@dm2 root]# ./dm_service_installer.sh -t dmserver -dm_ini /dm/dmdbms/data/dsc1_config/dm.ini -dcr_ini /dm/dmdbms/data/dmdcr.ini -y DmASMSvrServicedm2 -p dsc
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServicedsc.service to /usr/lib/systemd/system/DmServicedsc.service.
Finished to create the service (DmServicedsc)
[root@dm2 root]# systemctl start DmServicedsc
[dmdba@dm1 ~]$ cat /etc/dm_svc.conf
rac=(dm1:5236,dm2:5236)
SWITCH_TIME=(10000)
SWITCH_INTERVAL=(10)
TIME_ZONE=(480)
LANGUAGE=(en)
[dmdba@dm1 ~]$ disql SYSDBA/SYSDBA@rac
Server[dm2:5236]:mode is normal, state is open
login used time: 48.098(ms)
disql V8
SQL> select instance_name from v$instance;
LINEID INSTANCE_NAME
---------- -------------
1 DSC1
used time: 6.726(ms). Execute id is 2.
SQL> select * from v$dsc_ep_info;
LINEID EP_NAME EP_SEQNO EP_GUID EP_TIMESTAMP EP_MODE EP_STATUS
---------- ------- ----------- -------------------- -------------------- ------------ ---------
1 DSC0 0 1767218722 1767218957 Control Node OK
2 DSC1 1 1767233299 1767233524 Normal Node OK
used time: 3.282(ms). Execute id is 3.
[root@dm1 root]# cat /dm/dmdbms/cssm/dmcssm.ini
#和 dmdcr_cfg.ini 中的 DCR_OGUID 保持一致
CSSM_OGUID = 63635
#配置所有 CSS 的连接信息,
#和 dmdcr_cfg.ini 中 CSS 配置项的 DCR_EP_HOST 和 DCR_EP_PORT 保持一致
CSSM_CSS_IP = dm1-priv:9341
CSSM_CSS_IP = dm2-priv:9343
CSSM_LOG_PATH =/dm/dmdbms/cssm/log #监视器日志文件存放路径
CSSM_LOG_FILE_SIZE = 32 #每个日志文件最大 32M
CSSM_LOG_SPACE_LIMIT = 0 #不限定日志文件总占用空间
[root@dm1 root]# ./dm_service_installer.sh -t dmcssm -cssm_ini /dm/dmdbms/cssm/dmcssm.ini -p dm1
Created symlink from /etc/systemd/system/multi-user.target.wants/DmCSSMonitorServicedm1.service to /usr/lib/systemd/system/DmCSSMonitorServicedm1.service.
systemctl start DmCSSMonitorServicedm1.service
[dmdba@dm1 cssm]$ dmcssm
[monitor] 2020-03-05 22:09:24: CSS MONITOR V8
[monitor] 2020-03-05 22:09:25: CSS MONITOR SYSTEM IS READY.
[monitor] 2020-03-05 22:09:25: Wait CSS Control Node choosed...
[monitor] 2020-03-05 22:09:29: Wait CSS Control Node choosed succeed.
show
monitor current time:2020-03-05 22:09:32, n_group:3
=================== group[name = GRP_CSS, seq = 0, type = CSS, Control Node = 1] ========================================
[CSS0] global info:
[ASM0] auto restart = FALSE
[DSC0] auto restart = FALSE
[CSS1] global info:
[ASM1] auto restart = FALSE
[DSC1] auto restart = FALSE
ep: css_time inst_name seqno port mode inst_status vtd_status is_ok active guid ts
2020-03-05 22:09:29 CSS0 0 9341 Normal Node OPEN WORKING OK TRUE 609935085 609935205
2020-03-05 22:09:29 CSS1 1 9343 Control Node OPEN WORKING OK TRUE 609925000 609925144
=================== group[name = GRP_ASM, seq = 1, type = ASM, Control Node = 255] ========================================
n_ok_ep = 2
ok_ep_arr(index, seqno):
(0, 0)
(1, 1)
sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL
crash process over flag is FALSE
ep: css_time inst_name seqno port mode inst_status vtd_status is_ok active guid ts
2020-03-05 22:09:29 ASM0 0 9349 Normal Node SHUTDOWN SHUTDOWN OK FALSE 608928040 608928896
2020-03-05 22:09:29 ASM1 1 9351 Normal Node SHUTDOWN SHUTDOWN OK FALSE 608931076 608931925
=================== group[name = GRP_DSC, seq = 2, type = DB, Control Node = 255] ========================================
n_ok_ep = 2
ok_ep_arr(index, seqno):
(0, 0)
(1, 1)
sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL
crash process over flag is FALSE
ep: css_time inst_name seqno port mode inst_status vtd_status is_ok active guid ts
2020-03-05 22:09:29 DSC0 0 5236 Normal Node SHUTDOWN WORKING OK FALSE 1767218722 1767219031
2020-03-05 22:09:29 DSC1 1 5236 Normal Node SHUTDOWN WORKING OK FALSE 1767233299 1767233598
==================================================================================================================