Sun Cluster 軟體安裝指南 (適用於 Solaris 作業系統)

建立複製資源群組

本節說明了在主要叢集與次要叢集上建立複製資源群組的方式。

如何在主要叢集上建立複製資源群組
  1. 以超級使用者身份存取 nodeA

  2. SUNW.HAStoragePlus 註冊為資源類型。


    nodeA# /usr/cluster/bin/scrgadm -a -t SUNW.HAStoragePlus
    
  3. 為磁碟裝置群組建立複製資源群組。


    nodeA# /usr/cluster/bin/scrgadm -a -g devicegroup-stor-rg -h nodeA,nodeB
    
    devicegroup

    磁碟裝置群組的名稱。

    devicegroup-stor-rg

    複製資源群組的名稱。

    -h nodeA, nodeB

    指定可以主控複製資源群組的叢集節點。

  4. SUNW.HAStoragePlus 資源加入至複製資源群組。


    nodeA# /usr/cluster/bin/scrgadm -a -j devicegroup-stor \
    -g devicegroup-stor-rg -t SUNW.HAStoragePlus \
    -x GlobalDevicePaths=devicegroup \
    -x AffinityOn=True
    
    devicegroup-stor

    複製資源群組的 HAStoragePlus 資源。

    -x GlobalDevicePaths=

    指定 Sun StorEdge Availability Suite 軟體依賴的延伸屬性。

    -x AffinityOn=True

    指定 SUNW.HAStoragePlus 資源必須為由 -x GlobalDevicePaths= 定義的整體裝置與叢集檔案系統執行親合性切換保護移轉。因此,當複製資源群組發生故障轉移或切換保護移轉時,將對關聯的裝置群組執行切換保護移轉。

    如需有關這些延伸屬性的詳細資訊,請參閱 SUNW.HAStoragePlus(5) 線上說明手冊。

  5. 將邏輯主機名稱資源加入至複製資源群組。


    nodeA# /usr/cluster/bin/scrgadm -a -L \
    -j lhost-reprg-prim -g devicegroup-stor-rg -l lhost-reprg-prim
    

    其中,lhost-reprg-prim 是主要叢集上複製資源群組的邏輯主機名稱。

  6. 啟用資源、管理資源群組,並使資源群組上線。


    nodeA# /usr/cluster/bin/scswitch -Z -g devicegroup-stor-rg
    nodeA# /usr/cluster/bin/scswitch -z -g devicegroup-stor-rg -h nodeA
    
  7. 驗證資源群組是否處於線上狀態。


    nodeA# /usr/cluster/bin/scstat -g
    

    檢查資源群組狀態欄位,以確認 nodeAnodeB 上的複製資源群組處於線上狀態。

如何在次要叢集上建立複製資源群組

    請重複執行如何在主要叢集上建立複製資源群組中的程序,但下列情況除外︰

    • nodeC 替代 nodeA

    • 不使用 nodeB

    • lhost-reprg-sec 替代對 lhost-reprg-prim 的參考。