將Standard標準叢集修改為Flex叢集

lhrbest發表於2020-02-28

將Standard標準叢集修改為Flex叢集


Oracle12C支援兩種叢集模式:Standard和Flex。
11G即是Standard的;Flex是12C的新特性。

當將Standard修改為Flex時,出現如下問題:

# crsctl set cluster mode flex
CRS-4937: Unable to set the cluster mode.

檢視 官方文件,發現需要配置GNS,Standard模式下不需要GNS,但是Flex模式是需要的。


下面是官方文件(加入翻譯)。

1. Run the following command to determine the current mode of the cluster:

確認當前叢集模式:

$ crsctl get cluster mode status
2. Run the following command to ensure that the Grid Naming Service (GNS) is configured with a fixed VIP:

確認GNS配置。

$ srvctl config gns

This procedure cannot succeed unless GNS is configured with a fixed VIP. If there is no GNS, then, as root, create one, as follows:
GNS需要配置flexed-VIP的,如果沒有配置,需要使用root使用者建立一個。

# srvctl add gns -vip vip_name | ip_address

注意:ip_address要與叢集公網在同一個網段。


Run the following command as root to start GNS:
啟動GNS。

# srvctl start gns
3. Use the Oracle Automatic Storage Management Configuration Assistant (ASMCA) to enable Oracle Flex ASM in the cluster before you change the cluster mode.

使用asmca將ASM儲存轉換為Flex ASM。

4. Run the following command as root to change the mode of the cluster to be an Oracle Flex Cluster:

以root身份,配置叢集模式為flex的。

# crsctl set cluster mode flex
5. Stop Oracle Clusterware by running the following command as root on each node in the cluster:

以root身份在一個節點執行停止crs的命令。

# crsctl stop crs
6. Start Oracle Clusterware by running the following command as root on each node in the cluster:

以root身份在一個節點執行啟動crs的命令,即重啟叢集。

# crsctl start crs -wait

Note: Use the -wait option to display progress and status messages.




可以把Standard ASM 轉化為 Flex ASM ,但這個轉化是不可逆的。這樣做的目的可能是為了推廣這個特性。

 

先轉換ASM flex ,然後再轉換叢集到 flex

1 、檢視叢集當前模式

crsctl get cluster mode status

crsctl get cluster mode config

 

2 、檢視叢集節點成員角色

crsctl get node role status -all

 

3 、把 ASM 轉換成 flex ASM

# grid 使用者

asmcmd showclustermode

 

asmca  # 推薦圖形轉換,也可以用命令: asmca -silent -convertToFlexASM -asmNetworks eth1/172.16.0.0 -asmListenerPort   1522

 

/u01/app/grid/cfgtoollogs/asmca/scripts/converttoFlexASM.sh   #root 使用者只在 host03 上執行,該指令碼會重啟叢集

asmcmd showclustermode

 

 



 

4 、檢視是否使用 GNS 解析。 Standard 模式下不需要 GNS ,但是 Flex 模式是需要的配置 GNS 的,否則在執行“ crsctl set cluster mode flex ”時會報錯:“ CRS-4937: Unable to set the cluster mode. ”。

srvctl status gns

srvctl config gns

轉換成GNS 解析的命令:

-- srvctl add gns -vip 192.0.2.155 -domain cluster01.example.com

GNS 需要配置 flexed-VIP 的,如果沒有配置,需要使用 root 使用者建立一個

-- srvctl add gns -vip vip_name | ip_address

注意:ip_address 要與叢集公網在同一個網段。

[root@raclhr-12cR1-N1 ~]# crsctl set cluster mode flex

CRS-4937: Unable to set the cluster mode.

[root@raclhr-12cR1-N1 ~]# oerr crs 4937

4937, 1, "Unable to set the cluster mode."

// *Cause: An attempt was made to set the cluster mode to 'flex' but Grid Naming Service(GNS) was not configured.

// *Action: Configure GNS and try again to set the cluster mode to 'flex'.

[root@raclhr-12cR1-N1 ~]# srvctl add gns -vip 192.168.59.165

[root@raclhr-12cR1-N1 ~]#

[root@raclhr-12cR1-N1 ~]#

[root@raclhr-12cR1-N1 ~]#

[root@raclhr-12cR1-N1 ~]# srvctl config gns

GNS is enabled.

GNS VIP addresses: 192.168.59.165

Domain served by GNS: N_FWD

[root@raclhr-12cR1-N1 ~]#

[root@raclhr-12cR1-N1 ~]#

[root@raclhr-12cR1-N1 ~]# srvctl status gns

GNS is not running.

GNS is enabled.

[root@raclhr-12cR1-N1 ~]# crsctl set cluster mode flex

CRS-4933: Cluster mode set to "flex"; restart Oracle High Availability Services on all nodes for cluster to run in "flex" mode.

[root@raclhr-12cR1-N1 ~]#

 

5 、轉換標準叢集為 flex 叢集

# 等待上一個步驟做完,所有狀態是正常的

crsctl stat res -t

#root 使用者

crsctl set cluster mode flex

 

crsctl stop cluster -all

crsctl start cluster -all

crsctl get cluster mode status

crsctl stat res -t

 

轉換完成後,需要保證所有的叢集資源狀態都為ONLINE 狀態。

 





About Me

........................................................................................................................

● 本文作者:小麥苗,部分內容整理自網路,若有侵權請聯絡小麥苗刪除

● 本文在itpub、部落格園、CSDN和個人微 信公眾號( xiaomaimiaolhr)上有同步更新

● 本文itpub地址: http://blog.itpub.net/26736162

● 本文部落格園地址: http://www.cnblogs.com/lhrbest

● 本文CSDN地址: https://blog.csdn.net/lihuarongaini

● 本文pdf版、個人簡介及小麥苗雲盤地址: http://blog.itpub.net/26736162/viewspace-1624453/

● 資料庫筆試面試題庫及解答: http://blog.itpub.net/26736162/viewspace-2134706/

● DBA寶典今日頭條號地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

........................................................................................................................

● QQ群號: 230161599 、618766405

● 微 信群:可加我微 信,我拉大家進群,非誠勿擾

● 聯絡我請加QQ好友 646634621 ,註明新增緣由

● 於 2020-02-01 06:00 ~ 2020-02-31 24:00 在西安完成

● 最新修改時間:2020-02-01 06:00 ~ 2020-02-31 24:00

● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解

● 版權所有,歡迎分享本文,轉載請保留出處

........................................................................................................................

小麥苗的微店https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

小麥苗出版的資料庫類叢書http://blog.itpub.net/26736162/viewspace-2142121/

小麥苗OCP、OCM、高可用網路班http://blog.itpub.net/26736162/viewspace-2148098/

小麥苗騰訊課堂主頁https://lhr.ke.qq.com/

........................................................................................................................

使用 微 信客戶端掃描下面的二維碼來關注小麥苗的微 信公眾號( xiaomaimiaolhr)及QQ群(DBA寶典)、新增小麥苗微 信, 學習最實用的資料庫技術。

........................................................................................................................

歡迎與我聯絡

 

 



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2677716/,如需轉載,請註明出處,否則將追究法律責任。

相關文章