Sun Cluster 3.1 Data Service for Samba Guide

How to Register and Configure Sun Cluster HA for Samba as a Failover Service

Use this procedure to configure Sun Cluster HA for Samba as a failover data service. This procedure assumes that you installed the data service packages during your initial Sun Cluster installation.

If you did not install the Sun Cluster HA for Samba packages as part of your initial Sun Cluster installation, go to How to Install the Sun Cluster HA for Samba Packages by using the scinstall Utility.

Otherwise, use this procedure to configure the Sun Cluster HA for Samba data service as a failover service.

  1. Become superuser on one of the nodes in the cluster that will host Samba.

  2. Register the SUNW.gds resource type.


    # scrgadm -a -t SUNW.gds
    
  3. Register the SUNW.HAStoragePlus resource type.


    # scrgadm -a -t SUNW.HAStoragePlus
    
  4. Create a failover resource group .


    # scrgadm -a -g Samba-failover-resource-group
    
  5. Create a resource for the Samba Disk Storage.


    # scrgadm -a -j Samba-has-resource  \
    -g Samba-failover-resource-group   \
    -t SUNW.HAStoragePlus  \
    -x FilesystemMountPoints=Samba- instance-mount-points
    
  6. Create a resource for the Samba Logical Hostname.


    # scrgadm -a -L -j Samba-lh-resource  \
    -g Samba-failover-resource-group  \
    -l Samba-logical-hostname
    
  7. Enable the failover resource group that now includes the Samba Disk Storage and Logical Hostname resources.


    # scswitch -Z -g Samba-failover-resource-group
    
  8. Create and register Winbind as a failover data service (if required)


    # cd /opt/SUNWscsmb/winbind/util
    

    Edit the winbind_config file and follow the comments within that file, ie


    # 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

    Note –

    The following is an example for a Winbind instance with Samba installed from http://www.samba.org.



    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
    

    After editing winbind_config you must now register the resource.


    # ./winbind_register
    
  9. Enable the Winbind resource (if previous step was done)


    # scstat 
    # scswitch -e -j Winbind-resource
    
  10. Create and register Samba as a failover data service


    # cd /opt/SUNWscsmb/samba/util
    

    Edit the samba_config file and follow the comments within that file, i.e.


    # 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

    The following is an example for Samba instance SAMBA1 with Samba installed from http://www.samba.org


    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

    The following is an example for Samba instance SMB1 with Samba installed from Solaris 9


    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
    

    After editing samba_config you must now register the resource.


    # ./samba_register
    
  11. Enable each Samba resource.

    Repeat this step for each Samba instance, if multiple instances were created.


    # scstat 
    # scswitch -e -j Samba-resource