基於Admin-managed刪除節點
第一步:檢視RAC的server pool是基於admin-managed還是基於policy-managed
[grid@node2 ~]$ srvctl config database -d prod
Database unique name: prod
Database name: prod
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +ORADATA/prod/spfileprod.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: prod
Database instances: prod1,prod2
Disk Groups: ORADATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed
第二步,刪除節點上的例項
[oracle@node2 ~]$ dbca -silent -deleteInstance -nodeList node1 -gdbName prod -instanceName prod1 -sysDBAUserName sys -sysDBAPassword oracle
Deleting instance
1% complete
oracle@node1's password:
2% complete
6% complete
13% complete
20% complete
26% complete
33% complete
40% complete
46% complete
53% complete
60% complete
66% complete
Completing instance management.
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/prod.log" for further details.
檢視一下RAC資料庫配置資訊
[grid@node2 ~]$ srvctl config database -d prod
Database unique name: prod
Database name: prod
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +ORADATA/prod/spfileprod.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: prod
Database instances: prod2
Disk Groups: ORADATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed
第三步,刪除RAC軟體
1、停止要刪除節點的監聽
[oracle@node2 ~]$ srvctl disable listener -l LISTENER -n node1
[oracle@node2 ~]$ srvctl stop listener -l LISTENER -n node1
PRCC-1017 : LISTENER was already stopped on node1
PRCR-1005 : Resource ora.LISTENER.lsnr is already stopped
2、在要刪除的節點上更新inventory的資訊,位置$ORACLE_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=Oracle_home_location "CLUSTER_NODES={name_of_node_to_delete}" -local
3、在要刪除的節點上,對於nonshared home,解除安裝oracle RAC
$ORACLE_HOME/deinstall/deinstall -local
4、在仍然存在的節點上更新inventory資訊
[oracle@node2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 "CLUSTER_NODES={node2}"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 3999 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
第四步,刪除叢集節點
刪除完資料例項和oracle rac軟體之後,就可以開始刪除節點
1、確定Grid_home是安裝叢集件的目錄
2、執行下列命令確定要刪除的節點是否是unpinned和active狀態
$olsnodes -s -t
如果是Pinned狀態,執行crsctl unpin css命令
3、失效要刪除的節點的叢集件應用和監控,在要刪除節點的目錄Grid_home/crs/install使用root執行下列命令
執行之前先關閉dbconsole
emctl stop dbconsole
如果使用的是11.2.0.1或者是11.2.0.2,則在執行rootcrs.pl的時候不包括-deinstall標誌
#./rootcrs.pl -deconfig -deinstall -force
如果要刪除多個節點,在每個要刪除的節點執行上述命令
如果要刪除所有節點,加上-lastnode選項,用於清除OCR和voting disks的資訊
# ./rootcrs.pl -deconfig -deinstall -force -lastnode
Note: If you do not use the -force option in the preceding
command or the node you are deleting is not accessible for you to
execute the preceding command, then the VIP resource remains
running on the node. You must manually stop and remove the VIP
resource using the following commands as root from any node that
you are not deleting:
# srvctl stop vip -i vip_name -f
# srvctl remove vip -i vip_name -f
Where vip_name is the VIP for the node to be deleted. If you specify
multiple VIP names, then separate the names with commas and
surround the list in double quotation marks ("").
4、從不需要刪除的節點上執行以下命令,使用root,在目錄Grid_home/bin
crsctl delete node -n node_to_be_deleted
5、在要刪除的節點上,在Grid_home/oui/bin目錄下執行下列命令
$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES={node_to_be_deleted}" CRS=TRUE -silent -local
6、對於noshared home的,刪除oracle叢集件的目錄
$ Grid_home/deinstall/deinstall –local
Caution: If you do not specify the -local flag, then the command
removes the Grid Infrastructure home from every node in the cluster.
7、在任何一個沒有被刪除的節點,在 Grid_home/oui/bin目錄下執行下列命令,多個節點用逗號隔開,例如"node1,node2"
$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES=
{remaining_nodes_list}" CRS=TRUE -silent
Notes:
■ You must run this command a second time where ORACLE_
HOME=ORACLE_HOME, and CRS=TRUE -silent is omitted from
the syntax, as follows:
$ ./runInstaller -updateNodeList ORACLE_HOME=ORACLE_HOME
"CLUSTER_NODES={remaining_nodes_list}"
■ If you have a shared Oracle Grid Infrastructure home, then
append the -cfs option to the command example in this step and
provide a complete path location for the cluster file system.
例如:
[grid@node2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/11.2.0/grid/ "CLUSTER_NODES={node2}"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 3962 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
8、執行CVU命令驗證節點是否被刪除
[grid@node2 bin]$ cluvfy stage -post nodedel -n node1
[grid@node2 ~]$ srvctl config database -d prod
Database unique name: prod
Database name: prod
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +ORADATA/prod/spfileprod.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: prod
Database instances: prod1,prod2
Disk Groups: ORADATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed
第二步,刪除節點上的例項
[oracle@node2 ~]$ dbca -silent -deleteInstance -nodeList node1 -gdbName prod -instanceName prod1 -sysDBAUserName sys -sysDBAPassword oracle
Deleting instance
1% complete
oracle@node1's password:
2% complete
6% complete
13% complete
20% complete
26% complete
33% complete
40% complete
46% complete
53% complete
60% complete
66% complete
Completing instance management.
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/prod.log" for further details.
檢視一下RAC資料庫配置資訊
[grid@node2 ~]$ srvctl config database -d prod
Database unique name: prod
Database name: prod
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +ORADATA/prod/spfileprod.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: prod
Database instances: prod2
Disk Groups: ORADATA
Mount point paths:
Services:
Type: RAC
Database is administrator managed
第三步,刪除RAC軟體
1、停止要刪除節點的監聽
[oracle@node2 ~]$ srvctl disable listener -l LISTENER -n node1
[oracle@node2 ~]$ srvctl stop listener -l LISTENER -n node1
PRCC-1017 : LISTENER was already stopped on node1
PRCR-1005 : Resource ora.LISTENER.lsnr is already stopped
2、在要刪除的節點上更新inventory的資訊,位置$ORACLE_HOME/oui/bin
./runInstaller -updateNodeList ORACLE_HOME=Oracle_home_location "CLUSTER_NODES={name_of_node_to_delete}" -local
3、在要刪除的節點上,對於nonshared home,解除安裝oracle RAC
$ORACLE_HOME/deinstall/deinstall -local
4、在仍然存在的節點上更新inventory資訊
[oracle@node2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 "CLUSTER_NODES={node2}"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 3999 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
第四步,刪除叢集節點
刪除完資料例項和oracle rac軟體之後,就可以開始刪除節點
1、確定Grid_home是安裝叢集件的目錄
2、執行下列命令確定要刪除的節點是否是unpinned和active狀態
$olsnodes -s -t
如果是Pinned狀態,執行crsctl unpin css命令
3、失效要刪除的節點的叢集件應用和監控,在要刪除節點的目錄Grid_home/crs/install使用root執行下列命令
執行之前先關閉dbconsole
emctl stop dbconsole
如果使用的是11.2.0.1或者是11.2.0.2,則在執行rootcrs.pl的時候不包括-deinstall標誌
#./rootcrs.pl -deconfig -deinstall -force
如果要刪除多個節點,在每個要刪除的節點執行上述命令
如果要刪除所有節點,加上-lastnode選項,用於清除OCR和voting disks的資訊
# ./rootcrs.pl -deconfig -deinstall -force -lastnode
Note: If you do not use the -force option in the preceding
command or the node you are deleting is not accessible for you to
execute the preceding command, then the VIP resource remains
running on the node. You must manually stop and remove the VIP
resource using the following commands as root from any node that
you are not deleting:
# srvctl stop vip -i vip_name -f
# srvctl remove vip -i vip_name -f
Where vip_name is the VIP for the node to be deleted. If you specify
multiple VIP names, then separate the names with commas and
surround the list in double quotation marks ("").
4、從不需要刪除的節點上執行以下命令,使用root,在目錄Grid_home/bin
crsctl delete node -n node_to_be_deleted
5、在要刪除的節點上,在Grid_home/oui/bin目錄下執行下列命令
$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES={node_to_be_deleted}" CRS=TRUE -silent -local
6、對於noshared home的,刪除oracle叢集件的目錄
$ Grid_home/deinstall/deinstall –local
Caution: If you do not specify the -local flag, then the command
removes the Grid Infrastructure home from every node in the cluster.
7、在任何一個沒有被刪除的節點,在 Grid_home/oui/bin目錄下執行下列命令,多個節點用逗號隔開,例如"node1,node2"
$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES=
{remaining_nodes_list}" CRS=TRUE -silent
Notes:
■ You must run this command a second time where ORACLE_
HOME=ORACLE_HOME, and CRS=TRUE -silent is omitted from
the syntax, as follows:
$ ./runInstaller -updateNodeList ORACLE_HOME=ORACLE_HOME
"CLUSTER_NODES={remaining_nodes_list}"
■ If you have a shared Oracle Grid Infrastructure home, then
append the -cfs option to the command example in this step and
provide a complete path location for the cluster file system.
例如:
[grid@node2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/app/11.2.0/grid/ "CLUSTER_NODES={node2}"
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 3962 MB Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
8、執行CVU命令驗證節點是否被刪除
[grid@node2 bin]$ cluvfy stage -post nodedel -n node1
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29802484/viewspace-2063641/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- networkx基礎用法:新增節點、新增邊、刪除節點、刪除邊、計算度、賦權重
- XML DOM 刪除節點概述XML
- onnx 增刪改查,修改節點,刪除節點,修改input,output
- DOM節點刪除方法小結
- mongodb副本集新增刪除節點MongoDB
- redis cluster節點/新增刪除操作Redis
- JZ18刪除表的節點
- js中dom節點刪除remove方法JSREM
- 刪除連結串列中等於給定值 val 的所有節點。
- JavaScript刪除元素節點程式碼例項JavaScript
- oracle11g_RAC新增刪除節點Oracle
- 一體機HDATA節點新增和刪除
- [Kubernetes]node節點pod無法啟動/節點刪除網路重置
- 工作293:調節刪除順序刪除
- leetcode----刪除連結串列中的節點LeetCode
- 二叉搜尋樹如何刪除節點
- Hyperledger Fabric節點的動態新增和刪除
- 11.2.0.4 RAC生產環境刪除故障節點與增加新服務節點
- 牛客(刪除連結串列中重複節點)
- k8s叢集刪除和新增node節點K8S
- 二分搜尋樹系列之[ 節點刪除 (remove) ]REM
- 二分搜尋樹系列之「 節點刪除 (remove) 」REM
- 13. O(1)時間刪除連結串列節點
- 節點操作(刪除,複製)/案例1:刪除留言板的留言 /案例2:動態生成表格
- JZ76 刪除連結串列中重複的節點
- Oracle叢集軟體管理-新增和刪除叢集節點Oracle
- layer彈框刪除ztree節點非阻塞問題解決
- 0011 刪除連結串列的倒數第N個節點
- 怎樣新增、刪除、移動、複製、建立、查詢節點
- 【RAC】Oracle10g rac新增刪除節點命令參考Oracle
- LeetCode每日一題:刪除連結串列中的節點(No.237)LeetCode每日一題
- 劍指offer-----刪除連結串列中的重複節點
- 全網最詳bpmn.js教材-編輯、刪除節點篇JS
- echart關係圖平分節點刪除時自動平衡問題
- 基於回收站臨時刪除塊裝置
- 【連結串列問題】刪除單連結串列的中間節點
- LeetCode- 19 刪除連結串列的倒數第N個節點LeetCode
- 題19. 刪除連結串列的倒數第N個節點
- Leetcode No.19 刪除連結串列的倒數第N個節點LeetCode