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

Procedure如何在次要叢集上建立 NFS 應用程式資源群組

開始之前

請確定您已完成了如何在主要叢集上建立 NFS 應用程式資源群組中的步驟。

步驟
  1. 以超級使用者身份存取 nodeC

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


    nodeC# scrgadm -a -t SUNW.nfs
    
  3. 如果尚未將 SUNW.HAStoragePlus 註冊為資源類型,請進行註冊。


    nodeC# scrgadm -a -t SUNW.HAStoragePlus
    
  4. devicegroup 建立應用程式資源群組。


    nodeC# scrgadm -a -g nfs-rg \
    -y Pathprefix=/global/etc \
    -y Auto_start_on_new_cluster=False \
    -y RG_dependencies=devicegroup-stor-rg
    
    nfs-rg

    應用程式資源群組的名稱。

    Pathprefix=/global/etc

    指定群組中的資源可以寫入管理檔案的目錄。

    Auto_start_on_new_cluster=False

    指定應用程式資源群組並非自動啟動。

    RG_dependencies=devicegroup-stor-rg

    指定應用程式資源群組所依賴的資源群組。在此範例中,應用程式資源群組依賴複製資源群組。

    如果將應用程式資源群組切換保護移轉至新的主要節點,將自動切換保護移轉複製資源群組。但是,如果將複製資源群組切換保護移轉至新的主要節點,則必須手動切換保護移轉應用程式資源群組。

  5. SUNW.HAStoragePlus 資源增加至應用程式資源群組。


    nodeC# scrgadm -a -j nfs-dg-rs -g nfs-rg \
    -t SUNW.HAStoragePlus \
    -x FileSystemMountPoints=/global/mountpoint \
    -x AffinityOn=True
    
    nfs-dg-rs

    為 NFS 應用程式的 HAStoragePlus 資源的名稱。

    -x FileSystemMountPoints=/global/

    指定檔案系統的掛載點為全域掛載點。

    -t SUNW.HAStoragePlus

    指定資源的類型為 SUNW.HAStoragePlus

    -x AffinityOn=True

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

    如需有關這些延伸特性的更多資訊,請參閱 SUNW.HAStoragePlus(5) 線上手冊。

  6. 將邏輯主機名稱資源加入至應用程式資源群組。


    nodeC# /usr/cluster/bin/scrgadm -a -L -j lhost-nfsrg-sec -g nfs-rg \
    -l lhost-nfsrg-sec
    

    lhost-nfsrg-sec 為次要叢集上的應用程式資源群組之邏輯主機名稱。

  7. 將 NFS 資源增加至應用程式資源群組。


    nodeC# /usr/cluster/bin/scrgadm -a -g nfs-rg \
    -j nfs-rs -t SUNW.nfs -y Resource_dependencies=nfs-dg-rs
    
  8. 確定應用程式資源群組未在 nodeC 上連線。


    nodeC# /usr/cluster/bin/scswitch -n -j nfs-rs
    nodeC# /usr/cluster/bin/scswitch -n -j nfs-dg-rs
    nodeC# /usr/cluster/bin/scswitch -n -j lhost-nfsrg-sec
    nodeC# /usr/cluster/bin/scswitch -z -g nfs-rg -h ""
    

    在重新開機後,此資源群組仍然處於離線狀態,這是因為 Auto_start_on_new_cluster=False

  9. 如果整體容體掛載於主要叢集上,則從次要叢集上卸載該整體容體。


    nodeC# umount /global/mountpoint
    

    如果容體掛載於次要叢集上,同步化將失敗。

接下來的步驟

請移至如何啟用資料複製的範例