Sun Cluster 3.1 データサービス (Samba 編)

フェイルオーバーサービスとしての Sun Cluster HA for Samba の登録および構成方法

次の手順で、Sun Cluster HA for Samba をフェイルオーバーデータサービスとして構成します。この手順では、Sun Cluster の初期インストール時にデータサービスパッケージをインストールしている場合を想定しています。

Sun Cluster のインストール時に Sun Cluster HA for Samba をインストールしていない場合は、Sun Cluster HA for Samba パッケージのインストール方法 へ進んでください。

それ以外の場合は、次の手順で、フェイルオーバーサービスとして Sun Cluster HA for Samba データサービスを構成します。

  1. Samba のホストとなるクラスタノードの 1 つで、スーパーユーザーになります。

  2. SUNW.gds というリソースタイプを登録します。


    # scrgadm -a -t SUNW.gds
    
  3. SUNW.HAStoragePlus というリソースタイプを登録します。


    # scrgadm -a -t SUNW.HAStoragePlus
    
  4. フェイルオーバーリソースグループを作成します。


    # scrgadm -a -g Samba-failover-resource-group
    
  5. Samba ディスク記憶装置に対応するリソースを作成します。


    # scrgadm -a -j Samba-has-resource  \
    -g Samba-failover-resource-group   \
    -t SUNW.HAStoragePlus  \
    -x FilesystemMountPoints=Samba- instance-mount-points
    
  6. Samba 論理ホスト名に対応するリソースを作成します。


    # scrgadm -a -L -j Samba-lh-resource  \
    -g Samba-failover-resource-group  \
    -l Samba-logical-hostname
    
  7. Samba ディスク記憶装置と 論理ホスト名のリソースが組み込まれたフェイルオーバーリソースグループを有効にします。


    # scswitch -Z -g Samba-failover-resource-group
    
  8. フェイルオーバーデータサービスとして Winbind を作成し、登録します。


    # cd /opt/SUNWscsmb/winbind/util
    

    winbind_config ファイルを編集し、ファイルの中の次のようなコメントに従います。


    # These parameters can be customized in (key=value) form
    #
    #        RS - name of the resource for the application
    #        RG - name of the resource group containing RS
    #    WB_BIN - name of the Winbind bin directory
    #   WB_INST - name of the Winbind configuration directory
    #    NTUSER - name of the NT fault monitor user
    #        LH - name of the LogicalHostname SC resource
    #    HAS_RS - name of the Winbind HAStoragePlus SC resource

    注 –

    http://www.samba.org から Samba をインストールした場合の、Winbind インスタンスの例を示します。



    RS=wb-res
    RG=smb-failover-rg
    WB_BIN=/global/samba/bin
    WB_INST=/global/samba/winbind
    NTUSER=samba
    LH=smb-lh-res
    HAS_RS=wb-has-res
    

    winbind_config の編集後、リソースを登録する必要があります。


    # ./winbind_register
    
  9. Winbind リソース (前の手順で登録した場合) を有効にします。


    # scstat 
    # scswitch -e -j Winbind-resource
    
  10. フェイルオーバーデータサービスとして Samba を作成して登録します。


    # cd /opt/SUNWscsmb/samba/util
    

    samba_config ファイルを編集し、ファイルの中の次のようなコメントに従います。


    # These parameters can be customized in (key=value) form
    #
    #        RS - name of the resource for the application
    #        RG - name of the resource group containing RS
    #   SMB_BIN - name of the Samba bin directory
    #  SMB_SBIN - name of the Samba sbin directory
    #              (If no sbin then specify the bin directory)
    #  SMB_INST - name of the Samba configuration directory
    #   SMB_LOG - name of the Samba log directory
    #               for log.smbd and log.nmbd
    #              (If not specified will default
    #               to $SMB_INST/logs)
    #    FMUSER - name of the Samba fault monitor user
    #    FMPASS - name of the Samba fault monitor user password
    #        LH - name of the LogicalHostname SC resource
    #    HAS_RS - name of the Samba HAStoragePlus SC resource, plus the
    #              name of the Winbind resource if Winbind is configured
    #              as a failover service

    http://www.samba.org から Samba をインストールした場合の、Samba インスタンス SAMBA1 の例を示します。


    RS=smb-res
    RG=smb-failover-rg
    SMB_BIN=/global/samba/bin
    SMB_SBIN=/global/samba/sbin or /global/samba/bin
    SMB_INST=/global/samba/SAMBA1
    SMB_LOG=/global/samba/SAMBA1/logs
    FMUSER=samba
    FMPASS=samba
    LH=smb-lh-res
    HAS_RS=smb-has-res or 
    HAS_RS=smb-has-res,wb-res if failover winbind is being used

    Solaris 9 から Samba をインストールした場合の、Samba インスタンス SMB1 の例を示します。


    RS=smb-res
    RG=smb-failover-rg
    SMB_BIN=/usr/sfw/bin
    SMB_SBIN=/usr/sfw/sbin
    SMB_INST=/local/samba/SMB1
    SMB_LOG=/local/samba/SMB1/logs
    FMUSER=samba
    FMPASS=samba
    LH=smb-lh-res
    HAS_RS=smb-has-res
    

    samba_config の編集後、リソースを登録する必要があります。


    # ./samba_register
    
  11. 各 Samba リソースを有効にします。

    複数のインスタンスを作成した場合は、Samba インスタンスごとにこの手順を繰り返します。


    # scstat 
    # scswitch -e -j Samba-resource