CLUVFY工具(一)

不一樣的天空w發表於2017-01-19

如果安裝過10g以後的RAC環境,應該對這個工具並不陌生。在安裝ClusterDatabase之前通常會執行runcluvfy.sh指令碼來檢查當前系統是否滿足安裝條件。

這篇介紹comp相關選項。

 

 

在安裝RAC時,由於cluvfy工具還沒有被安裝,而runcluvfy.shcluvfy工具的功能在shell中實現,並和安裝盤一起提供,使得使用者在資料庫和CLUSTER安裝之前就可以利用這個工具的功能。

這個工具的主要作用就是驗證系統是否滿足安裝的條件。

這個工具擁有眾多的選項,因此不可能也沒有必要詳細的描述所有的選項,如果從大類上分,這個工具可以分成兩個大類選項:comp用來驗證元件的功能;stage用來驗證部署功能。

可以透過comp –list來列出所有cluvfy工具支援驗證的元件:

bash-2.03$ cluvfy comp -list


USAGE:
cluvfy comp  <component-name> <component-specific options>  [-verbose]

Valid components are:
        nodereach : checks reachability between nodes
        nodecon   : checks node connectivity
        ssa       : checks shared storage accessibility
        space     : checks space availability
        sys       : checks minimum system requirements
        clu       : checks cluster integrity
        clumgr    : checks cluster manager integrity
        ocr       : checks OCR integrity
        crs       : checks CRS integrity
        nodeapp   : checks node applications existence
        admprv    : checks administrative privileges
        peer      : compares properties with peers

其中nodereachnodeconsys等元件都是安裝Cluster環境必不可少的檢查選項:

bash-2.03$ cluvfy comp nodereach -n racnode1,racnode2        

Verifying node reachability

Checking node reachability...
Node reachability check passed from node "racnode2".


Verification of node reachability was successful.

其中-n選項中指定節點列表,在節點列表中的逗號前後都不能包括空格,否則會報錯。

bash-2.03$ cluvfy comp nodereach -n racnode1,racnode2 -verbose

Verifying node reachability

Checking node reachability...

Check: Node reachability from node "racnode2"
  Destination Node                      Reachable?             
  ------------------------------------  ------------------------
  racnode1                              yes                    
  racnode2                              yes                    
Result: Node reachability check passed from node "racnode2".


Verification of node reachability was successful.

使用-verbose會得到更加詳細的資訊。

bash-2.03$ cluvfy comp nodecon -n racnode1,racnode2 -verbose

Verifying node connectivity

Checking node connectivity...


Interface information for node "racnode2"
  Interface Name                  IP Address                      Subnet         
  ------------------------------  ------------------------------  ----------------
  ce0                             172.25.198.223                  172.25.0.0     
  ce0                             172.25.198.225                  172.25.198.0   
  ce1                             10.0.0.2                        10.0.0.0       


Interface information for node "racnode1"
  Interface Name                  IP Address                      Subnet         
  ------------------------------  ------------------------------  ----------------
  ce0                             172.25.198.222                  172.25.0.0     
  ce0                             172.25.198.224                  172.25.198.0   
  ce1                             10.0.0.1                        10.0.0.0       


Check: Node connectivity of subnet "172.25.0.0"
  Source                          Destination                     Connected?     
  ------------------------------  ------------------------------  ----------------
  racnode2:ce0                    racnode1:ce0                    yes            
Result: Node connectivity check passed for subnet "172.25.0.0" with node(s) racnode2,racnode1.

Check: Node connectivity of subnet "172.25.198.0"
  Source                          Destination                     Connected?     
  ------------------------------  ------------------------------  ----------------
  racnode2:ce0                    racnode1:ce0                    yes            
Result: Node connectivity check passed for subnet "172.25.198.0" with node(s) racnode2,racnode1.

Check: Node connectivity of subnet "10.0.0.0"
  Source                          Destination                     Connected?     
  ------------------------------  ------------------------------  ----------------
  racnode2:ce1                    racnode1:ce1                    yes            
Result: Node connectivity check passed for subnet "10.0.0.0" with node(s) racnode2,racnode1.

Suitable interfaces for the private interconnect on subnet "172.25.0.0":
racnode2 ce0:172.25.198.223
racnode1 ce0:172.25.198.222

Suitable interfaces for the private interconnect on subnet "172.25.198.0":
racnode2 ce0:172.25.198.225
racnode1 ce0:172.25.198.224

Suitable interfaces for the private interconnect on subnet "10.0.0.0":
racnode2 ce1:10.0.0.2
racnode1 ce1:10.0.0.1

ERROR:
Could not find a suitable set of interfaces for VIPs.

Result: Node connectivity check failed.


Verification of node connectivity was unsuccessful on all the nodes.

其中導致監測失敗的原因是OraclebugOracle認為172.25開頭的IP地址無法作為PUBLIC地址,這個在以前安裝RAC的時候提到過很多次了。

bash-2.03$ cluvfy comp sys -n racnode1,racnode2 -p database -r 10gR2 -osdba dba

Verifying system requirement

Checking system requirements for 'database'...
Total memory check passed.
Free disk space check passed.
Swap space check passed.
System architecture check passed.
Operating system version check passed.
Operating system patch check failed for "112760-05".
Check failed on nodes:
        racnode2,racnode1
Operating system patch check passed for "108993-45".
Operating system patch check failed for "112763-13".
Check failed on nodes:
        racnode2,racnode1
Package existence check passed for "SUNWarc".
Package existence check passed for "SUNWbtool".
Package existence check passed for "SUNWhea".
Package existence check passed for "SUNWlibm".
Package existence check passed for "SUNWlibms".
Package existence check passed for "SUNWsprot".
Package existence check passed for "SUNWsprox".
Package existence check passed for "SUNWtoo".
Package existence check passed for "SUNWi1of".
Package existence check passed for "SUNWi1cs".
Package existence check passed for "SUNWi15cs".
Package existence check passed for "SUNWxwfnt".
Package existence check passed for "SUNWlibC".
Kernel parameter check failed for "noexec_user_stack".
Check failed on nodes:
        racnode2,racnode1
Kernel parameter check passed for "SEMMNI".
Kernel parameter check passed for "SEMMNS".
Kernel parameter check passed for "SEMMSL".
Kernel parameter check passed for "SEMVMX".
Kernel parameter check passed for "SHMMAX".
Kernel parameter check passed for "SHMMIN".
Kernel parameter check passed for "SHMMNI".
Kernel parameter check passed for "SHMSEG".
Group existence check passed for "dba".
User existence check passed for "nobody".

System requirement failed for 'database'

Verification of system requirement was unsuccessful on all the nodes.

除了檢查常規的安裝檢查元件外,還可以驗證ocrclu以及crs的完整性:

bash-2.03$ cluvfy comp clu -n racnode1,racnode2 -verbose

Verifying cluster integrity

Checking cluster integrity...

  Node Name                          
  ------------------------------------
  racnode1                           
  racnode2                           

Cluster integrity check passed


Verification of cluster integrity was successful.
bash-2.03$ cluvfy comp ocr -n racnode1,racnode2 -verbose

Verifying OCR integrity

Checking OCR integrity...

Checking the absence of a non-clustered configuration...
All nodes free of non-clustered, local-only configurations.

Uniqueness check for OCR device passed.

Checking the version of OCR...
OCR of correct Version "2" exists.

Checking data integrity of OCR...
Data integrity check for OCR passed.

OCR integrity check passed.

Verification of OCR integrity was successful.
bash-2.03$ cluvfy comp crs -n racnode1,racnode2 -verbose

Verifying CRS integrity

Checking CRS integrity...

Checking daemon liveness...

Check: Liveness for "CRS daemon"
  Node Name                             Running                
  ------------------------------------  ------------------------
  racnode2                              yes                    
  racnode1                              yes                    
Result: Liveness check passed for "CRS daemon".

Checking daemon liveness...

Check: Liveness for "CSS daemon"
  Node Name                             Running                
  ------------------------------------  ------------------------
  racnode2                              yes                    
  racnode1                              yes                    
Result: Liveness check passed for "CSS daemon".

Checking daemon liveness...

Check: Liveness for "EVM daemon"
  Node Name                             Running                
  ------------------------------------  ------------------------
  racnode2                              yes                    
  racnode1                              yes                    
Result: Liveness check passed for "EVM daemon".

Liveness of all the daemons
  Node Name     CRS daemon                CSS daemon                EVM daemon
  ------------  ------------------------  ------------------------  ----------
  racnode2      yes                       yes                       yes      
  racnode1      yes                       yes                       yes      

Checking CRS health...

Check: Health of CRS
  Node Name                             CRS OK?                
  ------------------------------------  ------------------------
  racnode2                              yes                    
  racnode1                              yes                    
Result: CRS health check passed.

CRS integrity check passed.

Verification of CRS integrity was successful.

bash-2.03$ cluvfy comp nodeapp -n racnode1,racnode2 -verbose

Verifying node application existence

Checking node application existence...


Checking existence of VIP node application
  Node Name     Required                  Status                    Comment  
  ------------  ------------------------  ------------------------  ----------
  racnode2      yes                       exists                    passed   
  racnode1      yes                       exists                    passed   
Result: Check passed.

Checking existence of ONS node application
  Node Name     Required                  Status                    Comment  
  ------------  ------------------------  ------------------------  ----------
  racnode2      no                        exists                    passed   
  racnode1      no                        exists                    passed   
Result: Check passed.

Checking existence of GSD node application
  Node Name     Required                  Status                    Comment  
  ------------  ------------------------  ------------------------  ----------
  racnode2      no                        exists                    passed   
  racnode1      no                        exists                    passed   
Result: Check passed.

利用cluvfy不僅可以檢查是否滿足安裝要求,還可以驗證元件是否工作正常。

 

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

相關文章