Oracle 常用指令 & SQL - Cluster & Service 篇 (Cluster & Service section)

Cluster & Service 相關指令

-- 停止cluster crs失敗或卡住時,手動kill服務

# ps -fea | grep ohasd.bin | grep -v grep
root 13783 1 0 Oct25 ? 00:01:41 <Grid Infrastructure Home>/bin/ohasd.bin reboot
# ps -fea | grep gipcd.bin | grep -v grep
oracle 13938 1 0 Oct25 ? 00:00:01 <Grid Infrastructure Home>/bin/gipcd.bin
# ps -fea | grep mdnsd.bin | grep -v grep
oracle 13943 1 0 Oct25 ? 00:00:05 <Grid Infrastructure Home>/bin/mdnsd.bin
# ps -fea | grep gpnpd.bin | grep -v grep
oracle 14178 1 0 Oct25 ? 00:00:03 <Grid Infrastructure Home>/bin/gpnpd.bin
# ps -fea | grep evmd.bin | grep -v grep
oracle 14481 1 0 Oct25 ? 00:00:02 <Grid Infrastructure Home>/bin/evmd.bin
# ps -fea | grep crsd.bin | grep -v grep
root 14684 1 0 Oct25 ? 00:05:31 <Grid Infrastructure Home>/bin/crsd.bin reboot
# kill -9 13783 13938 13943 14178 14481 14684
-- 解除 QUARANTINED 狀態

# <Grid Infrastructure Home>/bin/crsctl query cluster site -all
Site 'sitea' identified by GUID 'e735d4b7d4f8ff65ff8a20e52218df7e' in state 'ENABLED' contains nodes 'oraext1,oraext2' and disks 'DATA02_1(DATADG),FRA02_1(FRADG),OCR01_1(OCRDG)'.
Site 'siteb' identified by GUID '4dc847ffea985f92bf0fd5612413b7c8' in state 'QUARANTINED' contains nodes 'oraext3,oraext4' and disks 'DATA01_2(DATADG),FRA01_2(FRADG),OCR01_2(OCRDG)'.
Site 'sitec' identified by GUID 'a870c9114d954f81ff3aa4fe849d712c' in state 'ENABLED' contains no nodes and no disks can be discovered from this site

# <Grid Infrastructure Home>/bin/crsctl modify cluster site siteb -s rejuvenate

# <Grid Infrastructure Home>/bin/crsctl query cluster site -all
Site 'sitea' identified by GUID 'e735d4b7d4f8ff65ff8a20e52218df7e' in state 'ENABLED' contains nodes 'oraext1,oraext2' and disks 'DATA02_1(DATADG),FRA02_1(FRADG),OCR01_1(OCRDG)'.
Site 'siteb' identified by GUID '4dc847ffea985f92bf0fd5612413b7c8' in state 'ENABLED' contains nodes 'oraext3,oraext4' and disks 'DATA01_2(DATADG),DATA02_2(DATADG),FRA01_2(FRADG),OCR01_2(OCRDG)'.
Site 'sitec' identified by GUID 'a870c9114d954f81ff3aa4fe849d712c' in state 'ENABLED' contains no nodes and no disks can be discovered from this site
-- 查詢 votedisk 狀態

# <Grid Infrastructure Home>/bin/crsctl query css votedisk
-- 查詢 cluster 主節點 by grid

$ cd $ORACLE_BASE/diag/crs/$HOSTNAME/crs/trace/
$ cat ocssd* | grep 'master node' | tail -1
2022-02-25 16:03:50.747 :    CSSD:3302745856: [     INFO] clssgmCMReconfig: reconfiguration successful, incarnation 541270262 with 4 nodes, local node number 2, master node oraext1, number 1

張貼留言

0 留言