1. 程式人生 > >RAC Cluster Verify Tools(CVU OR cluvf)

RAC Cluster Verify Tools(CVU OR cluvf)

故事豬腳:

Cluster Verification Utilit(CVU):

Oracle推薦的一種叢集檢驗工具。它能幫助使用者在Cluter部署的各個階段驗證叢集的重要元件,這些階段包括硬體(free disk space、儲存準備、網路通訊、memory, processes, and other important cluster components)、Cluster安裝前(CRS 完整性、multiple Oracle Cluster ware sub components、RDMBS 安裝前檢查等等。

豬腳如何塑造?

最新版本工具來自於 http://www.oracle.com/technetwork/database/clustering/downloads/cvu-download-homepage-099973.html

最新版 11g 的CVU是獨立於資料庫軟體外的一個款工具。

安裝前,基於java1.4.1,需要至少30M的free disk,其工作產生的CVU workspace預設會放到/tmp 目錄(linux/unix),windows下可以手動指定CV_DESTLOC 引數到特定的目錄中。

安裝後,檔案位置在ORACLE_HOME/bin/cluvfy 或者 CRS_HOME/bin/cluvfy 。

豬腳的具體技能

cvu 做檢查主要分為2類:元件(component)和階段(stage),有興趣的網友可以直接cluvfycomp|stage -list檢視),下面介紹幾個常用的技能

技能1.cluvfy comp acfs

Use the cluvfy comp acfs component verification command to check the integrity of Oracle ASM Cluster File System 
on all nodes in a cluster

技能2.cluvfy comp asm

check the integrity of Oracle Automatic Storage Management (Oracle ASM) on all nodes in the cluster. 
This check ensures that the ASM instances on the specified nodes are running from the same Oracle home and that asmlib, 
if it exists, has a valid version and ownership.

技能3.cluvfy comp crs

Run the cluvfy comp crs component verification command to check the integrity of the Cluster Ready Services (CRS) daemon
on the specified nodes.

技能4.cluvfy stage (絕技)

rac 搭建的過程,援引Maclean的圖來表達的一整個STAGE,借鑑下圖(圖下文字已註明出處)

cluvfy_stage_list

                 ----  圖片轉之 Maclean blog ------

技能4 之cluvfy stage -post hwos

perform network and storage verifications on the specified nodes in the cluster before installing Oracle software and also checks
for supported storage types and checks each one for sharing.

在RAC叢集中安裝rdbms軟體前,檢查作業系統、網路是否正常、儲存是否成功已被主機識別等。
syntax:
cluvfy stage -post hwos -n node_list [-s storageID_list] [-verbose]


技能4之 cluvfy stage -pre cfs

verify your cluster nodes are set up correctly before setting up OCFS2 or OCFS for Windows.
安裝windows平臺的叢集檔案系統(ocfs2和ocfs)檢查各節點是否能識別共享儲存,
syntax:
cluvfy stage -pre cfs -n node_list -s storageID_list [-verbose]

example:
cluvfy stage -pre cfs -n node1,node2,node3,node4 -s /dev/sdd5 --檢查3個節點是否能識別/DEV/SDD5 這個裝置


技能4 之 cluvfy stage [-pre | -post] crsinst (post 跳過)詳見:http://docs.oracle.com/cd/E11882_01/rac.112/e16794/cvu.htm#autoId33

check the specified nodes before installing Oracle Clusterware
安裝Clusterware軟體前對各節點做檢查,syntax:
cluvfy stage -pre crsinst -n node_list [-r {10gR1 | 10gR2 | 11gR1 | 11gR2}]
[-c ocr_location_list] [-q voting_disk_list] [-osdba osdba_group]
[-orainv orainventory_group] [-asm [-asmgrp asmadmin_group] [-asmdev asm_device_list]] 
[-crshome Grid_home] [-fixup [-fixupdir fixup_dir]
[-networks network_list]
[-verbose]]

技能4之 cluvfy stage -pre dbcfg

check the specified nodes before configuring an Oracle RAC database to verify whether your system meets all of the criteria
for creating a database or for making a database configuration change.

配置某個節點時,檢查是否引數滿足最低要求,syntax:

cluvfy stage -pre dbcfg -n node_list -d Oracle_home [-fixup [-fixupdir fixup_dir]][-verbose]

技能4之 cluvfy stage -pre dbinst

check the specified nodes before installing or creating an Oracle RAC database to verify that your system meets all of the criteria 
for installing or creating an Oracle RAC database.

建立叢集資料庫前檢查引數是否滿足,syntax:

cluvfy stage -pre dbinst -n node_list [-r {10gR1 | 10gR2 | 11gR1 | 11gR2}]
[-osdba osdba_group] [-d Oracle_home] [-fixup [-fixupdir fixup_dir] [-verbose]

技能4 之cluvfy stage [-pre | -post] nodeadd

verify the specified nodes are configured correctly before adding them to your existing cluster, and to verify the integrity 
of the cluster before you add the nodes.

RAC新增node 前檢查作業系統版本、需要的軟體patch、核心引數等等(是否和其他2個節點一致,至少要滿足最低要求)

Run this node on any node of the existing cluster,syntax:

cluvfy stage -pre nodeadd -n node_list 
[-vip vip_list] 
[-fixup [-fixupdir fixup_dir]] 
[-verbose]


技能4 之 cluvfy stage -post nodedel

verify that specific nodes have been successfully deleted from a cluster

檢查節點是否從叢集中刪除,重點檢查asm 例項是否cleanup 執行成功,syntax:

cluvfy stage -post nodedel -n node_list [-verbose]

CVU工具可以為我們提供以下功能(轉至Maclean blog):    

  1. 驗證Cluster叢集是否規範配置以便後續的RAC安裝、配置和操作順利
  2. 全型別的驗證
  3. 非破壞性的驗證
  4. 提供了易於使用的介面
  5. 支援各種平臺和配置的RAC,明確完善的統一行為方式

注意不要誤解cluvfy的作用,它僅僅是一個檢驗者,而不負責實際的配置或修復工作:

  1. cluvfy不支援任何型別的cluster或RAC操作
  2. 在檢驗到問題或失敗後,cluvfy不會採取任何修正行為
  3. cluvfy不是效能調優或監控工具
  4. cluvfy不會嘗試幫助你驗證RAC資料庫的內部結構

故事總結:

        豬腳(cvu)就像田徑跑道上的發令員,各運動員(各node)起步要一致,才算本次發令成功,如果誰搶跑,搶跑那個要麼給你次機會大家依然同一起跑(新節點重新配置和其他節點一致),不然你就得滾粗這個隊伍(Cluster)___(oracle rac 的node也是一個道理)。