vm: oracle vm 5.2.8 r121009 (Qt5.6.2)
os: centos7.4
db: oracle 12.2.0.1 + gi + asm
ip 规划
nodea nodeb
pub 192.168.56.100 192.168.56.200
priv 192.168.156.100 192.168.156.200
vip 192.168.56.101 192.168.56.201
scan 192.168.56.110
参考<
注意创建的目录
下载linuxx64_12201_grid_home.zip 上传到 nodea 的 /tmp 下
切换到grid用户,解压到grid用户下的$ORACLE_HOME
安装 cvuqdisk
# cd /u01/app/grid/product/12.2.0/grid_1/cv/rpm
# rpm -ivh cvuqdisk-1.0.10-1.rpm
运行预检查
$ cd /u01/app/grid/product/12.2.0/grid_1/
$ ./runcluvfy.sh stage -pre crsinst -n nodea,nodeb -verbose
$ ./runcluvfy.sh stage -pre dbinst -n nodea,nodeb -verbose
Verifying Single Client Access Name (SCAN) ...FAILED
Verifying DNS/NIS name service 'node-scan' ...FAILED
PRVG-1101 : SCAN name "node-scan" failed to resolve
SCAN 如果使用hosts方式的话,可以忽略
修正后,运行 gridSetup.sh
Configure Oracle Grid Infrastructure for a New Cluster
Configure an Oracle Standalone Cluster
Cluster Name : node-cluster
SCAN Name : node-scan
SCAN Port : 1521
role:HUB LEAF
GIMR data
at least 39,152MB
DNS/NIS
最后以root运行两个脚本
# /u01/app/gridbase/12.2.0/oraInventory/orainstRoot.sh
# /u01/app/grid/product/12.2.0/grid_1/root.sh
运行后再次检查
$ cd /u01/app/grid/product/12.2.0/grid_1/
$ ./runcluvfy.sh stage -post crsinst -n nodea,nodeb -verbose
下载 linuxx64_12201_database.zip 解压后安装
Install database software only
Oracle Real Application Cluster database installation
最后以root运行脚本
# /u01/app/oracle/product/12.2.0/db_1/root.sh
接下来用 dbca 创建数据库
Global database name : rac0
SID Prefix: rac0
em port:5500
URL=https://node-scan:5500/em
查看一些信息
# /u01/app/grid/product/12.2.0/grid_1/bin/crsctl get css
Usage:
crsctl get css
Displays the value of a Cluster Synchronization Services parameter
clusterguid
diagwait
disktimeout
misscount
reboottime
noautorestart
priority
crsctl get css ipmiaddr
Displays the IP address of the local IPMI device as set in the Oracle registry
# /u01/app/grid/product/12.2.0/grid_1/bin/crsctl get css diagwait
CRS-4678: Successful get diagwait 0 for Cluster Synchronization Services.
# /u01/app/grid/product/12.2.0/grid_1/bin/crsctl get css disktimeout
CRS-4678: Successful get disktimeout 200 for Cluster Synchronization Services.
# /u01/app/grid/product/12.2.0/grid_1/bin/crsctl get css misscount
CRS-4678: Successful get misscount 30 for Cluster Synchronization Services.
# /u01/app/grid/product/12.2.0/grid_1/bin/crsctl get css reboottime
CRS-4678: Successful get reboottime 3 for Cluster Synchronization Services.
# /u01/app/grid/product/12.2.0/grid_1/bin/crsctl lsmodules crs
List CRSD Debug Module: AGENT
List CRSD Debug Module: AGFW
List CRSD Debug Module: CLSCAL
List CRSD Debug Module: CLSCEVT
List CRSD Debug Module: CLSFRAME
List CRSD Debug Module: CLSINET
List CRSD Debug Module: CLSO
List CRSD Debug Module: CLSVER
List CRSD Debug Module: CLUCLS
List CRSD Debug Module: COMMCRS
List CRSD Debug Module: COMMNS
List CRSD Debug Module: CRSAPP
List CRSD Debug Module: CRSCCL
List CRSD Debug Module: CRSCEVT
List CRSD Debug Module: CRSCOMM
List CRSD Debug Module: CRSD
List CRSD Debug Module: CRSEVT
List CRSD Debug Module: CRSMAIN
List CRSD Debug Module: CRSOCR
List CRSD Debug Module: CRSPE
List CRSD Debug Module: CRSPLACE
List CRSD Debug Module: CRSRES
List CRSD Debug Module: CRSRPT
List CRSD Debug Module: CRSRTI
List CRSD Debug Module: CRSSE
List CRSD Debug Module: CRSSEC
List CRSD Debug Module: CRSTIMER
List CRSD Debug Module: CRSUI
List CRSD Debug Module: CSSCLNT
List CRSD Debug Module: OCRAPI
List CRSD Debug Module: OCRASM
List CRSD Debug Module: OCRCAC
List CRSD Debug Module: OCRCLI
List CRSD Debug Module: OCRMAS
List CRSD Debug Module: OCRMSG
List CRSD Debug Module: OCROSD
List CRSD Debug Module: OCRRAW
List CRSD Debug Module: OCRSRV
List CRSD Debug Module: OCRUTL
List CRSD Debug Module: SuiteTes
List CRSD Debug Module: UiServer
# /u01/app/grid/product/12.2.0/grid_1/bin/crsctl check has
CRS-4638: Oracle High Availability Services is online
# /u01/app/grid/product/12.2.0/grid_1/bin/crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
# /u01/app/grid/product/12.2.0/grid_1/bin/crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
ONLINE ONLINE nodea STABLE
ONLINE ONLINE nodeb STABLE
ora.DG_DATA01.dg
ONLINE ONLINE nodea STABLE
ONLINE ONLINE nodeb STABLE
ora.LISTENER.lsnr
ONLINE ONLINE nodea STABLE
ONLINE ONLINE nodeb STABLE
ora.MGMT.dg
ONLINE ONLINE nodea STABLE
ONLINE ONLINE nodeb STABLE
ora.net1.network
ONLINE ONLINE nodea STABLE
ONLINE ONLINE nodeb STABLE
ora.ons
ONLINE ONLINE nodea STABLE
ONLINE ONLINE nodeb STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE nodeb STABLE
ora.MGMTLSNR
1 OFFLINE OFFLINE STABLE
ora.asm
1 ONLINE ONLINE nodea Started,STABLE
2 ONLINE ONLINE nodeb Started,STABLE
3 OFFLINE OFFLINE STABLE
ora.cvu
1 ONLINE ONLINE nodeb STABLE
ora.nodea.vip
1 ONLINE ONLINE nodea STABLE
ora.nodeb.vip
1 ONLINE ONLINE nodeb STABLE
ora.qosmserver
1 ONLINE ONLINE nodeb STABLE
ora.rac0.db
1 ONLINE ONLINE nodea Open,HOME=/u01/app/o
racle/product/12.2.0
/db_1,STABLE
2 ONLINE ONLINE nodeb Open,HOME=/u01/app/o
racle/product/12.2.0
/db_1,STABLE
ora.scan1.vip
1 ONLINE ONLINE nodeb STABLE
--------------------------------------------------------------------------------
# ./crsctl stat res -t -init
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
1 ONLINE ONLINE nodea STABLE
ora.cluster_interconnect.haip
1 ONLINE ONLINE nodea STABLE
ora.crf
1 ONLINE ONLINE nodea STABLE
ora.crsd
1 ONLINE ONLINE nodea STABLE
ora.cssd
1 ONLINE ONLINE nodea STABLE
ora.cssdmonitor
1 ONLINE ONLINE nodea STABLE
ora.ctssd
1 ONLINE ONLINE nodea ACTIVE:0,STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.evmd
1 ONLINE ONLINE nodea STABLE
ora.gipcd
1 ONLINE ONLINE nodea STABLE
ora.gpnpd
1 ONLINE ONLINE nodea STABLE
ora.mdnsd
1 ONLINE ONLINE nodea STABLE
ora.storage
1 ONLINE ONLINE nodea STABLE
--------------------------------------------------------------------------------
查看一些进程
# ps -fu root|grep -i init
root 714 1 0 09:06 ? 00:00:00 /usr/sbin/alsactl -s -n 19 -c -E ALSA_CONFIG_PATH=/etc/alsa/alsactl.conf --initfile=/lib/alsa/ini/00main rdaemon
root 15922 2408 0 10:19 pts/0 00:00:00 grep --color=auto -i init
root 17917 1 0 09:31 ? 00:00:00 /bin/sh /etc/init.d/init.tfa run >/dev/null 2>&1 /dev/null 2>&1
# ps -fu root|grep -i grid_1
root 15517 2408 0 10:17 pts/0 00:00:00 grep --color=auto -i grid_1
root 17975 1 0 09:31 ? 00:00:25 /u01/app/grid/product/12.2.0/grid_1/jdk/jre/bin/java -Xms128m -Xmx512m oracle.rat.tfa.TFAMain /u01/app/grid/product/12.2.0/grid_1/tfa/nodea/tfa_home
root 20790 1 0 09:33 ? 00:00:08 /u01/app/grid/product/12.2.0/grid_1/bin/ohasd.bin reboot _ORA_BLOCKING_STACK_LOCALE=AMERICAN_AMERICA.AL32UTF8
root 20889 1 0 09:33 ? 00:00:04 /u01/app/grid/product/12.2.0/grid_1/bin/orarootagent.bin
root 21110 1 0 09:33 ? 00:00:02 /u01/app/grid/product/12.2.0/grid_1/bin/cssdmonitor
root 21128 1 0 09:33 ? 00:00:02 /u01/app/grid/product/12.2.0/grid_1/bin/cssdagent
root 21261 1 0 09:34 ? 00:00:07 /u01/app/grid/product/12.2.0/grid_1/bin/octssd.bin reboot
root 21493 1 0 09:34 ? 00:00:15 /u01/app/grid/product/12.2.0/grid_1/bin/osysmond.bin
root 21521 1 0 09:34 ? 00:00:16 /u01/app/grid/product/12.2.0/grid_1/bin/crsd.bin reboot
root 21681 1 0 09:34 ? 00:00:12 /u01/app/grid/product/12.2.0/grid_1/bin/orarootagent.bin
root 21722 1 0 09:34 ? 00:00:13 /u01/app/grid/product/12.2.0/grid_1/bin/ologgerd -M
root 22562 21493 0 09:35 ? 00:00:03 /u01/app/grid/product/12.2.0/grid_1/perl/bin/perl /u01/app/grid/product/12.2.0/grid_1/bin/diagsnap.pl start
# ps -fu grid
UID PID PPID C STIME TTY TIME CMD
grid 23914 1 0 09:37 ? 00:00:00 /u01/app/grid/product/12.2.0/grid_1/bin/tnslsnr LISTENER_SCAN1 -no_crs_notify -inherit
grid 24064 1 0 09:37 ? 00:00:02 /u01/app/grid/product/12.2.0/grid_1/bin/scriptagent.bin
grid 24100 1 0 09:37 ? 00:00:07 /u01/app/grid/product/12.2.0/grid_1/jdk/bin/java -server -Xms128M -Xmx384M -Djava.awt.headless=tru
grid 24451 1 0 09:37 ? 00:00:03 /u01/app/grid/product/12.2.0/grid_1/jdk/bin/java -classpath /u01/app/grid/product/12.2.0/grid_1/jd
grid 21783 1 0 09:34 ? 00:00:14 /u01/app/grid/product/12.2.0/grid_1/bin/oraagent.bin
grid 21807 1 0 09:34 ? 00:00:00 /u01/app/grid/product/12.2.0/grid_1/opmn/bin/ons -d
grid 21808 21807 0 09:34 ? 00:00:00 /u01/app/grid/product/12.2.0/grid_1/opmn/bin/ons -d
grid 23439 1 0 09:36 ? 00:00:00 /u01/app/grid/product/12.2.0/grid_1/bin/tnslsnr ASMNET1LSNR_ASM -no_crs_notify -inherit
grid 881 1 0 09:50 ? 00:00:00 /u01/app/grid/product/12.2.0/grid_1/bin/tnslsnr LISTENER -no_crs_notify -inherit
grid 20960 1 0 09:33 ? 00:00:07 /u01/app/grid/product/12.2.0/grid_1/bin/oraagent.bin
grid 20979 1 0 09:33 ? 00:00:01 /u01/app/grid/product/12.2.0/grid_1/bin/mdnsd.bin
grid 20982 1 0 09:33 ? 00:00:07 /u01/app/grid/product/12.2.0/grid_1/bin/evmd.bin
grid 21011 1 0 09:33 ? 00:00:02 /u01/app/grid/product/12.2.0/grid_1/bin/gpnpd.bin
grid 21058 20982 0 09:33 ? 00:00:02 /u01/app/grid/product/12.2.0/grid_1/bin/evmlogger.bin -o /u01/app/grid/product/12.2.0/grid_1/log/[
grid 21070 1 0 09:33 ? 00:00:05 /u01/app/grid/product/12.2.0/grid_1/bin/gipcd.bin
grid 21141 1 0 09:33 ? 00:00:08 /u01/app/grid/product/12.2.0/grid_1/bin/ocssd.bin
grid 21386 1 0 09:34 ? 00:00:00 asm_pmon_+ASM1
grid 21388 1 0 09:34 ? 00:00:00 asm_clmn_+ASM1
grid 21390 1 0 09:34 ? 00:00:00 asm_psp0_+ASM1
grid 21392 1 1 09:34 ? 00:00:27 asm_vktm_+ASM1
grid 21402 1 0 09:34 ? 00:00:00 asm_gen0_+ASM1
grid 21405 1 0 09:34 ? 00:00:00 asm_mman_+ASM1
grid 21409 1 0 09:34 ? 00:00:00 asm_gen1_+ASM1
grid 21413 1 0 09:34 ? 00:00:01 asm_diag_+ASM1
grid 21415 1 0 09:34 ? 00:00:00 asm_ping_+ASM1
grid 21417 1 0 09:34 ? 00:00:00 asm_pman_+ASM1
grid 21419 1 0 09:34 ? 00:00:04 asm_dia0_+ASM1
grid 21421 1 0 09:34 ? 00:00:02 asm_lmon_+ASM1
grid 21423 1 0 09:34 ? 00:00:02 asm_lmd0_+ASM1
grid 21425 1 0 09:34 ? 00:00:05 asm_lms0_+ASM1
grid 21428 1 0 09:34 ? 00:00:02 asm_lmhb_+ASM1
grid 21431 1 0 09:34 ? 00:00:00 asm_lck1_+ASM1
grid 21433 1 0 09:34 ? 00:00:00 asm_dbw0_+ASM1
grid 21435 1 0 09:34 ? 00:00:00 asm_lgwr_+ASM1
grid 21437 1 0 09:34 ? 00:00:00 asm_ckpt_+ASM1
grid 21439 1 0 09:34 ? 00:00:00 asm_smon_+ASM1
grid 21441 1 0 09:34 ? 00:00:00 asm_lreg_+ASM1
grid 21443 1 0 09:34 ? 00:00:00 asm_pxmn_+ASM1
grid 21445 1 0 09:34 ? 00:00:00 asm_rbal_+ASM1
grid 21447 1 0 09:34 ? 00:00:00 asm_gmon_+ASM1
grid 21449 1 0 09:34 ? 00:00:00 asm_mmon_+ASM1
grid 21451 1 0 09:34 ? 00:00:00 asm_mmnl_+ASM1
grid 21453 1 0 09:34 ? 00:00:03 asm_imr0_+ASM1
grid 21455 1 0 09:34 ? 00:00:00 asm_lck0_+ASM1
grid 21459 1 0 09:34 ? 00:00:02 asm_gcr0_+ASM1
grid 12134 1 0 10:02 ? 00:00:00 asm_ppa7_+ASM1
grid 21602 1 0 09:34 ? 00:00:00 asm_asmb_+ASM1
grid 21558 1 0 09:34 ? 00:00:01 oracle+ASM1_crf (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 21604 1 0 09:34 ? 00:00:00 oracle+ASM1_asmb_+asm1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 21628 1 0 09:34 ? 00:00:00 oracle+ASM1_ocr (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 23530 1 0 09:36 ? 00:00:00 oracle+ASM1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
grid 23564 1 0 09:36 ? 00:00:00 oracle+ASM1 (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
# ps -fu oracle
UID PID PPID C STIME TTY TIME CMD
oracle 2029 1 0 19:19 ? 00:00:00 ora_w005_rac02
oracle 2340 1 0 19:20 ? 00:00:00 ora_w004_rac02
oracle 4239 1 0 18:05 ? 00:00:10 /u01/app/grid/product/12.2.0/grid_1
oracle 4427 1 0 18:06 ? 00:00:00 ora_pmon_rac02
oracle 4429 1 0 18:06 ? 00:00:00 ora_clmn_rac02
oracle 4431 1 0 18:06 ? 00:00:01 ora_psp0_rac02
oracle 4434 1 0 18:06 ? 00:00:01 ora_ipc0_rac02
oracle 4436 1 0 18:06 ? 00:01:02 ora_vktm_rac02
oracle 4442 1 0 18:06 ? 00:00:00 ora_gen0_rac02
oracle 4444 1 0 18:06 ? 00:00:00 ora_mman_rac02
oracle 4448 1 0 18:06 ? 00:00:01 ora_gen1_rac02
oracle 4452 1 0 18:06 ? 00:00:04 ora_diag_rac02
oracle 4454 1 0 18:06 ? 00:00:00 ora_ofsd_rac02
oracle 4458 1 0 18:06 ? 00:00:02 ora_dbrm_rac02
oracle 4460 1 0 18:06 ? 00:00:00 ora_vkrm_rac02
oracle 4462 1 0 18:06 ? 00:00:00 ora_ping_rac02
oracle 4464 1 0 18:06 ? 00:00:00 ora_svcb_rac02
oracle 4466 1 0 18:06 ? 00:00:00 ora_acms_rac02
oracle 4468 1 0 18:06 ? 00:00:00 ora_pman_rac02
oracle 4470 1 0 18:06 ? 00:00:12 ora_dia0_rac02
oracle 4472 1 0 18:06 ? 00:00:08 ora_lmon_rac02
oracle 4474 1 0 18:06 ? 00:00:22 ora_lms0_rac02
oracle 4477 1 0 18:06 ? 00:00:09 ora_lmd0_rac02
oracle 4480 1 0 18:06 ? 00:00:01 ora_rmv0_rac02
oracle 4482 1 0 18:06 ? 00:00:00 ora_rms0_rac02
oracle 4485 1 0 18:06 ? 00:00:06 ora_lmhb_rac02
oracle 4487 1 0 18:06 ? 00:00:00 ora_lck1_rac02
oracle 4491 1 0 18:06 ? 00:00:00 ora_dbw0_rac02
oracle 4493 1 0 18:06 ? 00:00:00 ora_lgwr_rac02
oracle 4495 1 0 18:06 ? 00:00:02 ora_ckpt_rac02
oracle 4497 1 0 18:06 ? 00:00:00 ora_smon_rac02
oracle 4499 1 0 18:06 ? 00:00:00 ora_smco_rac02
oracle 4501 1 0 18:06 ? 00:00:00 ora_reco_rac02
oracle 4505 1 0 18:06 ? 00:00:00 ora_lreg_rac02
oracle 4509 1 0 18:06 ? 00:00:00 ora_pxmn_rac02
oracle 4511 1 0 18:06 ? 00:00:00 ora_rbal_rac02
oracle 4513 1 0 18:06 ? 00:00:00 ora_asmb_rac02
oracle 4515 1 0 18:06 ? 00:00:05 ora_fenc_rac02
oracle 4517 1 0 18:06 ? 00:00:14 ora_mmon_rac02
oracle 4519 1 0 18:06 ? 00:00:01 ora_mmnl_rac02
oracle 4521 1 0 18:06 ? 00:00:00 ora_d000_rac02
oracle 4523 1 0 18:06 ? 00:00:00 ora_s000_rac02
oracle 4525 1 0 18:06 ? 00:00:08 ora_imr0_rac02
oracle 4528 1 0 18:06 ? 00:00:03 ora_scm0_rac02
oracle 4532 1 0 18:06 ? 00:00:01 ora_lck0_rac02
oracle 4536 1 0 18:06 ? 00:00:00 ora_mark_rac02
oracle 4538 1 0 18:06 ? 00:00:00 ora_rsmn_rac02
oracle 4540 1 0 18:06 ? 00:00:00 ora_tmon_rac02
oracle 4548 1 0 18:06 ? 00:00:09 ora_gcr0_rac02
oracle 4620 1 0 18:06 ? 00:00:00 ora_tt00_rac02
oracle 4622 1 0 18:06 ? 00:00:00 ora_tt01_rac02
oracle 4624 1 0 18:06 ? 00:00:00 ora_tt02_rac02
oracle 4657 1 0 18:06 ? 00:00:00 ora_gtx0_rac02
oracle 4660 1 0 18:06 ? 00:00:00 ora_rcbg_rac02
oracle 4663 1 0 18:06 ? 00:00:00 ora_aqpc_rac02
oracle 4685 1 0 18:06 ? 00:00:03 ora_p000_rac02
oracle 4687 1 0 18:06 ? 00:00:03 ora_p001_rac02
oracle 4689 1 0 18:06 ? 00:00:00 ora_p002_rac02
oracle 4692 1 0 18:06 ? 00:00:00 ora_p003_rac02
oracle 4735 1 0 18:06 ? 00:00:00 ora_qm02_rac02
oracle 4737 1 0 18:06 ? 00:00:03 ora_qm05_rac02
oracle 4749 1 0 18:06 ? 00:00:00 ora_q004_rac02
oracle 5002 1 0 18:06 ? 00:00:07 ora_cjq0_rac02
oracle 13707 1 0 20:00 ? 00:00:00 ora_w003_rac02
oracle 14389 1 0 20:01 ? 00:00:00 ora_w000_rac02
oracle 14893 1 0 20:03 ? 00:00:00 ora_w001_rac02
oracle 15155 1 0 20:04 ? 00:00:00 ora_w006_rac02
oracle 16891 1 0 20:10 ? 00:00:00 ora_ppa7_rac02
oracle 17337 1 0 18:20 ? 00:00:05 ora_o000_rac02
oracle 18513 1 0 20:16 ? 00:00:00 ora_w002_rac02
oracle 18520 1 0 20:16 ? 00:00:00 ora_w007_rac02
oracle 19695 1 0 20:21 ? 00:00:00 ora_gcr1_rac02
oracle 21031 1 0 18:33 ? 00:00:00 ora_q005_rac02
oracle 21042 1 0 18:33 ? 00:00:05 ora_o001_rac02
oracle 24722 1 0 20:26 ? 00:00:00 ora_p004_rac02
oracle 24891 1 0 20:26 ? 00:00:00 ora_p005_rac02
oracle 5019 1 0 18:06 ? 00:00:01 oraclerac02 (DESCRIPTION=(LOCAL=YES
oracle 5021 1 0 18:06 ? 00:00:00 oraclerac02 (DESCRIPTION=(LOCAL=YES
oracle 5029 1 0 18:06 ? 00:00:00 oraclerac02 (DESCRIPTION=(LOCAL=YES