1 文檔概要css
2 禁用/啓用HAIPnode
3 修改cluster_interconnects參數數據庫
# /opt/app/11.2.0/grid/bin/crsctl modify res ora.cluster_interconnect.haip -attr "ENABLED=0" -init
啓用HAIP資源:
若是以後想從新使用HAIP資源,能夠啓用:oracle
# /opt/app/11.2.0/grid/bin/crsctl modify res ora.cluster_interconnect.haip -attr "ENABLED=1" -init
在實際處理的案例中,發現其中一個節點始終沒法啓動HAIP,在另外節點能夠啓用HAIP,但這樣是沒法啓動集羣的,因此在能夠啓動HAIP的節點直接禁用HAIP,這樣全部節點都使用真實的私網地址就能夠正常啓動成功。但須要注意在有些場景下,單純禁用HAIP會致使ASM沒法啓動,這是因爲ASM資源的相關依賴關係致使。app
查看當前ASM資源的關聯關係:測試
[root@jyrac2 ~]# crsctl stat res ora.asm -p -init NAME=ora.asm TYPE=ora.asm.type ACL=owner:grid:rw-,pgrp:oinstall:rw-,other::r--,user:grid:rwx ACTION_FAILURE_TEMPLATE= ACTION_SCRIPT= ACTIVE_PLACEMENT=0 AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX% AUTO_START=restore CARDINALITY=1 CHECK_ARGS= CHECK_COMMAND= CHECK_INTERVAL=1 CHECK_TIMEOUT=30 CLEAN_ARGS= CLEAN_COMMAND= DAEMON_LOGGING_LEVELS= DAEMON_TRACING_LEVELS= DEFAULT_TEMPLATE= DEGREE=1 DESCRIPTION="ASM instance" DETACHED=true ENABLED=1 FAILOVER_DELAY=0 FAILURE_INTERVAL=3 FAILURE_THRESHOLD=5 GEN_USR_ORA_INST_NAME=+ASM2 HOSTING_MEMBERS= LOAD=1 LOGGING_LEVEL=1 NOT_RESTARTING_TEMPLATE= OFFLINE_CHECK_INTERVAL=0 ORA_VERSION=11.2.0.4.0 PID_FILE= PLACEMENT=balanced PROCESS_TO_MONITOR= PROFILE_CHANGE_TEMPLATE= RESTART_ATTEMPTS=5 SCRIPT_TIMEOUT=600 SERVER_POOLS= SPFILE= START_ARGS= START_COMMAND= START_DEPENDENCIES=hard(ora.cssd,ora.cluster_interconnect.haip,ora.ctssd)pullup(ora.cssd,ora.cluster_interconnect.haip,ora.ctssd)weak(ora.drivers.acfs) START_TIMEOUT=600 STATE_CHANGE_TEMPLATE= STOP_ARGS= STOP_COMMAND= STOP_DEPENDENCIES=hard(intermediate:ora.cssd,shutdown:ora.cluster_interconnect.haip) STOP_TIMEOUT=600 UNRESPONSIVE_TIMEOUT=180 UPTIME_THRESHOLD=1h USR_ORA_ENV= USR_ORA_INST_NAME= USR_ORA_OPEN_MODE=mount USR_ORA_OPI=false USR_ORA_STOP_MODE=immediate VERSION=11.2.0.3.0
能夠看到ASM資源和HAIP資源的依賴關係。rest
修改ASM的關聯關係@all nodes:code
crsctl modify resource ora.asm -attr "START_DEPENDENCIES='hard(ora.cssd,ora.ctssd)pullup(ora.cssd,ora.ctssd)weak(ora.drivers.acfs)'" -f -init crsctl modify resource ora.asm -attr "STOP_DEPENDENCIES=hard(intermediate:ora.cssd)" -f –init
改回ASM的關聯關係:ip
crsctl modify resource ora.asm -attr "START_DEPENDENCIES='hard(ora.cssd, ora.cluster_interconnect.haip, ora.ctssd)pullup(ora.cssd, ora.cluster_interconnect.haip, ora.ctssd)weak(ora.drivers.acfs)'" -f -init crsctl modify resource ora.asm -attr "STOP_DEPENDENCIES=hard(intermediate:ora.cssd)" -f –init
SQL> alter system set cluster_interconnects='10.10.10.50' scope=spfile sid='+ASM1'; SQL> alter system set cluster_interconnects='10.10.10.52' scope=spfile sid='+ASM2';
改回默認值爲空,示例以下:資源
SQL> alter system set cluster_interconnects='' scope=spfile sid='+ASM1'; SQL> alter system set cluster_interconnects='' scope=spfile sid='+ASM2';
SQL> alter system set cluster_interconnects='10.10.10.50' scope=spfile sid='jyzhao1'; SQL> alter system set cluster_interconnects='10.10.10.52' scope=spfile sid='jyzhao2';
改回默認值爲空,示例以下:
SQL> alter system set cluster_interconnects='' scope=spfile sid='jyzhao1'; SQL> alter system set cluster_interconnects='' scope=spfile sid='jyzhao2';
在實際的一個案例中,客戶是11g版本的GI環境,實際有2塊私網網卡,使用了HAIP特性,同時安裝有11g RAC和10g RAC,11g RAC使用HAIP正常,10g RAC因爲沒法使用HAIP,因此獲取到的是真實的私網地址,可是數據庫沒法在全部節點同時open,這種狀況,直接把10g RAC實例的cluster_interconnects參數修改爲其中一個網卡的真實私網地址,便可正常在全部節點open。
這類場景是最適合修改參數解決,不影響其餘正常使用HAIP的11g環境。
# /opt/app/11.2.0/grid/bin/crsctl stop has # /opt/app/11.2.0/grid/bin/crsctl start has
SQL> show parameter cluster_interconnects