Oracle 叢集軟體資源的手工註冊(zt)
1. 登出crs本身自帶的ons、gsd、vip資源
root@rac01 # crs_stop -all
Attempting to stop `ora.rac01.gsd` on member `rac01`
Attempting to stop `ora.rac01.ons` on member `rac01`
Attempting to stop `ora.rac02.gsd` on member `rac02`
Attempting to stop `ora.rac02.ons` on member `rac02`
Stop of `ora.rac02.gsd` on member `rac02` succeeded.
Stop of `ora.rac02.ons` on member `rac02` succeeded.
Stop of `ora.rac01.gsd` on member `rac01` succeeded.
Stop of `ora.rac01.ons` on member `rac01` succeeded.
Attempting to stop `ora.rac01.vip` on member `rac01`
Attempting to stop `ora.rac02.vip` on member `rac02`
Stop of `ora.rac02.vip` on member `rac02` succeeded.
Stop of `ora.rac01.vip` on member `rac01` succeeded.
root@rac01 # crs_unregister ora.rac01.gsd
root@rac01 # crs_unregister ora.rac01.ons
root@rac01 # crs_unregister ora.rac01.vip
root@rac01 # crs_unregister ora.rac02.vip
root@rac01 # crs_unregister ora.rac02.ons
root@rac01 # crs_unregister ora.rac02.gsd
root@rac01 # crs_stat -t
CRS-0202: No resources are registered.
2.建立虛擬IP資源:
root@rac01 # crs_profile -create havip -t application -a /oracle/crs/bin/usrvip \
-o i=e1000g0,ov=10.198.94.139,on=255.255.248.0
root@rac01 # crs_register havip
root@rac01 # crs_setperm havip -o root
root@rac01 # crs_setperm havip -u user:oracle:r-x
root@rac01 # crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ha_vip application 0/1 0/0 OFFLINE OFFLINE
root@rac01 # crs_start havip
root@rac01 # crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
havip application 0/1 0/0 ONLINE ONLINE rac01
對crs_profile命令中的選項和引數做簡單說明:
(1) 選項-r定義了該資源所依賴的資源,在下面的例子中,資源oradata_mount啟動時依賴於
disk_group先 啟動,需要停止disk_group的時候必須先停止資源oradata_mount,
資源orcl_db的啟動則同時依賴於oradata_mount/disk_group/havip/listener;
(2) 引數-o 包括:ci的意思是crs對資源狀態的監測間隔(check interval),單位為秒;
ra : crs重啟資源的嘗試次數,RESTART_ATTEMPTS,次數到達以後將重新分配;
fi : 資源狀態出現錯誤以後,crs的嘗試間隔,FAILURE_INTERVAL,單位是秒;
ft : 資源狀態出現錯誤以後,crs的嘗試次數,FAILURE_THRESHOLD;
這些引數可以使用預設值,分別是60秒/1/0秒/0。
(3) 引數-a 是指ACTION_SCRIPT,引數值為資源啟動、關閉、監測的指令碼,指令碼固定的三個引數為
start/stop/check;
管理資料庫監聽的部分:
修改$ORACLE_HOME/network/admin/listener.ora檔案,
將其中(HOST = rac01 )部分修改成(HOST = 10.198.94.139 ) (虛擬IP地址)
crs_profile -create listener -t application -a /oracle/crs/crs/public/lsnr.sh -r havip -o \
ci=180,ra=6,ft=2,fi=12
crs_register listener
crs_setperm listener -o root
crs_setperm listener -u user:oracle:r-x
crs_start listener
管理磁碟組和邏輯卷的部分:
crs_profile -create disk_group -t application -a /oracle/crs/crs/public/dg.sh -r havip -o \
ci=180,ra=6,ft=2,fi=12
crs_register disk_group
crs_setperm disk_group -o root
crs_setperm disk_group -u user:oracle:r-x
注:本身磁碟組的啟動並不依賴於虛擬IP的啟動,這裡之所以設定兩者的依賴關係,
是為了防止虛擬IP在一個節點啟動,而磁碟組在另外一個節點啟動,造成資源不一致的情況出現。
管理檔案系統的部分:
crs_profile -create oradata_mount -t application -a /oracle/crs/crs/public/fs.sh -r disk_group -o \
ci=180,ra=6,ft=2,fi=12
crs_register oradata_mount
crs_setperm oradata_mount -o root
crs_setperm oradata_mount -u user:oracle:r-x
管理資料庫例項的部分:
crs_profile -create orcl_db -t application -a /oracle/crs/crs/public/db.sh -r \
"oradata_mount listener" -o ci=180,ra=6,ft=2,fi=12
crs_register orcl_db
crs_setperm orcl_db -o root
crs_setperm orcl_db -u user:oracle:r-x
crs_start orcl_db
4.確保指令碼具有執行屬性,並把public 和profile的內容拷到第二個節點上
# chmod +x /oracle/crs/crs/public/*
# rcp -r -p /oracle/crs/crs/public/* rac02:/oracle/crs/crs/public/
5.啟動所有的資源
下面可以看到,在crs啟動和關閉資源的過程中,其順序是按照前面定義的資源依賴關係進行的:
root@rac01 # crs_stop -all
Attempting to stop `orcl_db` on member `rac01`
Stop of `orcl_db` on member `rac01` succeeded.
Attempting to stop `oradata_mount` on member `rac01`
Stop of `oradata_mount` on member `rac01` succeeded.
Attempting to stop `disk_group` on member `rac01`
Stop of `disk_group` on member `rac01` succeeded.
Attempting to stop `listener` on member `rac01`
Stop of `listener` on member `rac01` succeeded.
Attempting to stop `havip` on member `rac01`
Stop of `havip` on member `rac01` succeeded.
root@rac01 # crs_start -all
Attempting to start `havip` on member `rac01`
Start of `havip` on member `rac01` succeeded.
Attempting to start `listener` on member `rac01`
Start of `listener` on member `rac01` succeeded.
Attempting to start `disk_group` on member `rac01`
Start of `disk_group` on member `rac01` succeeded.
Attempting to start `oradata_mount` on member `rac01`
Start of `oradata_mount` on member `rac01` succeeded.
Attempting to start `orcl_db` on member `rac01`
Start of `orcl_db` on member `rac01` succeeded.
檢查資源狀態是否正常:
oracle@rac01 $ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
disk_group application ONLINE ONLINE rac01
havip application ONLINE ONLINE rac01
listener application ONLINE ONLINE rac01
oradata_mount application ONLINE ONLINE rac01
orcl_db application ONLINE ONLINE rac01
全文連結:
http://www.itpub.net/viewthread.php?tid=941389&extra=&page=1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/756652/viewspace-321801/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORACLE的動態註冊行為 ztOracle
- 5 管理oracle叢集軟體元件Oracle元件
- Oracle叢集軟體管理-新增和刪除叢集節點Oracle
- netty叢集(一)-服務註冊發現Netty
- 如何手工刪除oracle資料庫和軟體Oracle資料庫
- 靜態註冊和動態註冊總結(zt)
- 叢集的應用例項(zt)
- 阿里雲註冊叢集+Prometheus 解決多雲容器叢集運維痛點阿里Prometheus運維
- Oracle叢集軟體管理-OCR和Voting Files管理Oracle
- oracle grid 叢集軟體設定資料庫不自動起來Oracle資料庫
- 理解Oracle9i中的監聽動態註冊(zt)Oracle
- AIX 刪除資料庫及叢集軟體AI資料庫
- 沃趣微講堂 | Oracle叢集技術(四):叢集初始化資源層Oracle
- Oracle RAC 10g叢集節點刪除[zt]Oracle
- 給自己的軟體製作註冊碼
- 【RAC】刪除RAC資料庫節點(七)——刪除Oracle叢集軟體資料庫Oracle
- Spring Cloud Eureka 註冊中心叢集搭建,Greenwich 最新版!SpringCloud
- oracle 11gR2 grid 叢集資源設定跟隨叢集自動啟動Oracle
- oracle的靜態註冊和動態註冊Oracle
- DATAGUARD手工註冊歸檔日誌(轉載)
- .NET Core中介軟體的註冊和管道的構建(2)---- 用UseMiddleware擴充套件方法註冊中介軟體類套件
- .NET Core中介軟體的註冊和管道的構建(1)---- 註冊和構建原理
- Oracle系列:Oracle RAC叢集體系結構Oracle
- Oracle學習系列—Window作業系統下Oracle資料庫的手工建立(zt)Oracle作業系統資料庫
- Oracle資料庫日常維護手冊 (zt)Oracle資料庫
- 基於Docker + Consul + Registrator的服務註冊與發現叢集搭建Docker
- Spring Cloud:使用Eureka叢集搭建高可用服務註冊中心SpringCloud
- 修改Oracle資料庫字符集(zt)Oracle資料庫
- ORACLE字符集(zt)Oracle
- ORACLE RAC環境下某節點的+ASM註冊到CRS資源中OracleASM
- CRM中介軟體裡CRM local changes的註冊管理
- 第七章-尋找軟體的註冊碼
- Oracle 11g靜默安裝軟體+手工建立資料庫Oracle資料庫
- windows_vmware_rhel 5u4_oracle10g_rac_手工註冊到racWindowsOracle
- Oracle叢集檔案系統(OCFS2)使用者指南(zt)Oracle
- Oracle監聽的靜態註冊和動態註冊Oracle
- Oracle監聽的動態註冊與靜態註冊Oracle
- 訊息型中介軟體之RabbitMQ叢集MQ