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叢集軟體管理-新增和刪除叢集節點Oracle
- 修改Oracle資料庫字符集(zt)Oracle資料庫
- Oracle叢集軟體管理-OCR和Voting Files管理Oracle
- netty叢集(一)-服務註冊發現Netty
- Oracle叢集檔案系統(OCFS2)使用者指南(zt)Oracle
- 沃趣微講堂 | Oracle叢集技術(四):叢集初始化資源層Oracle
- 阿里雲註冊叢集+Prometheus 解決多雲容器叢集運維痛點阿里Prometheus運維
- oracle的靜態註冊和動態註冊Oracle
- Spring Cloud Eureka 註冊中心叢集搭建,Greenwich 最新版!SpringCloud
- 給自己的軟體製作註冊碼
- npm註冊源的配置NPM
- 資料庫叢集伺服器系統效能瓶頸分析(zt)資料庫伺服器
- 基於Docker + Consul + Registrator的服務註冊與發現叢集搭建Docker
- Spring Cloud:使用Eureka叢集搭建高可用服務註冊中心SpringCloud
- Oracle叢集技術 | 叢集的自啟動系列(一)Oracle
- weblogic手工建立簡單域的方法(包含節點,叢集)Web
- oracle enqueue(zt)OracleENQ
- Centos7手工安裝Kubernetes叢集CentOS
- CRM中介軟體裡CRM local changes的註冊管理
- 小知識:使用oracle使用者檢視RAC叢集資源狀態Oracle
- Oracle叢集時間同步Oracle
- ORACLE MTS的介紹(zt)Oracle
- ORACLE LARGE MEMORY(zt)Oracle
- oracle event 2 (zt)Oracle
- oracle job管理(zt)Oracle
- 訊息型中介軟體之RabbitMQ叢集MQ
- Data Guardian for Mac(mac資料加密軟體) v5.1.4註冊版Mac加密
- 大型Kubernetes叢集的資源編排最佳化
- Oracle的三種高可用叢集方案Oracle
- 開源大資料叢集部署(十一)Ranger 整合Hadoop叢集大資料RangerHadoop
- SecureCRT 註冊碼啟用資源附完整教程Securecrt
- 使用 C# 獲取 Kubernetes 叢集資源資訊C#
- oracle time_zone(zt)Oracle
- AUTO START ORACLE ON LINUX(zt)OracleLinux
- 替換OCR和表決磁碟後,重啟叢集,資料庫資源的叢集狀態為OFFLINE資料庫
- 純手工搭建k8s叢集-(2)核心模組部署K8S
- Hadoop 系列(二)—— 叢集資源管理器 YARNHadoopYarn
- 開源軟體映象站的使用:騰訊軟體源、阿里軟體源、浙大軟體源阿里