Sun Cluster Data Service for Samba Guide for Solaris OS

Registering and Configuring Sun Cluster HA for Samba

This section contains the procedures you need to configure Sun Cluster HA for Samba.

How to Register and Configure Sun Cluster HA for Samba as a Failover 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 using the scinstall Utility.

  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:


    # 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_SBIN - name of the Winbind sbin directory. Used in Samba 3.
    #   WB_INST - name of the Winbind configuration directory
    #    NTUSER - name of the NT fault monitor user
    #WB_LIB_PATH- name of library paths to LD_LIBRARY_PATH
    #WB_DISCACHE - Should winbind cache be disabled. Used in Samba 3.
    #WB_SINGLEMODE - Should winbind run in single mode. Used in Samba 3.
    #        LH - name of the LogicalHostname SC resource
    #    HAS_RS - name of the Winbind HAStoragePlus SC resource

    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/SAMBA1
    NTUSER=samba
    WB_LIB_PATH=/usr/lib:/usr/local/lib
    WB_DISCACHE=FALSE
    WB_SINGLEMODE=FALSE
    LH=smb-lh-res
    HAS_RS=wb-has-res
    

    After editing winbind_config, you must register the resource.


    # ./winbind_register
    
  9. Enable the Winbind resource (if the 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:.


    # 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) 
    #SMB_LIB_PATH - name of library paths to LD_LIBRARY_PATH
    #    FMUSER - name of the Samba fault monitor user
    #    FMPASS - name of the Samba fault monitor user password
    #  FMDOMAIN - name of the NT-domain faultmonitor user is configured on.
    #             ( This should be used if faultmonitor user is not configured
    #               on the same NT-domain Samba is member to )
    #        LH - name of the LogicalHostname SC resource
    #    HAS_RS - name of the Samba HAStoragePlus SC resource

    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
    SMB_LIB_PATH=/usr/lib:/usr/local/lib
    FMUSER=samba
    FMPASS=samba
    FMDOMAIN=
    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 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
    

How to Register and Configure Sun Cluster HA for Samba as a Failover Service with Winbind as a Scalable 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 using the scinstall Utility.

  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 for the shared network address.


    # scrgadm -a -g Winbind-failover-resource-group
    
  5. Create a resource for the Winbind Logical Hostname.


    # scrgadm -a -S -j Winbind-lh-resource  \
    -g Winbind-failover-resource-group  \
    -l Winbind-logical-hostname
    
  6. Create a scalable resource group for the scalable winbind resource.


    # scrgadm -a -g Winbind-scalable-resource-group \
    -y Maximum_primaries=<number of nodes with Sun Cluster> \
    -y Desired_primaries=<number of nodes with Sun Cluster> \
    -y RG_dependencies=Winbind-failover-resource-group
    
  7. Create a resource for the Winbind Disk Storage.


    # scrgadm -a -j Winbind-has-resource  \
    -g Winbind-scalable-resource-group   \
    -t SUNW.HAStoragePlus  \
    -x FilesystemMountPoints=Winbind-instance-mount-point \
    -x AffinityOn=FALSE
    
  8. Enable the failover and scalable resource group that now includes the Winbind Disk Storage and Logical Hostname resources.


    # scswitch -Z -g Winbind-failover-resource-group
    # scswitch -Z -g Winbind-scalable-resource-group
    
  9. Create and register Samba as a failover data service.

    Follow Steps 4, 5, 6, 7, 10, and 11 in How to Register and Configure Sun Cluster HA for Samba as a Failover Service to create a failover Samba service. You then complete this last step to ensure that the Failover Samba Resource Group is start-dependent on the Scalable Winbind Resource Group.


    # scrgadm -c -g Samba-failover-resource-group \
    -y RG_dependencies=Winbind-sclable-resource-group
    
  10. Create and register winbind as a scalable data service.


    # cd /opt/SUNWscsmb/winbind/util
    

    Edit the winbind_config file and follow the comments within that file:.


    # 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_SBIN - name of the Winbind sbin directory. Used in Samba 3.
    #   WB_INST - name of the Winbind configuration directory
    #    NTUSER - name of the NT fault monitor user
    #WB_LIB_PATH- name of library paths to LD_LIBRARY_PATH
    #WB_DISCACHE - Should winbind cache be disabled. Used in Samba 3.
    #WB_SINGLEMODE - Should winbind run in single mode. Used in Samba 3.
    #        LH - name of the LogicalHostname SC resource
    #    HAS_RS - name of the Winbind HAStoragePlus SC resource

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


    RS=wb-res
    RG=wb-scalable-rg
    WB_BIN=/global/samba/bin
    WB_INST=/global/samba/winbind
    NTUSER=samba
    WB_LIB_PATH=/usr/lib:/usr/local/lib
    WB_DISCACHE=FALSE
    WB_SINGLEMODE=FALSE
    LH=wmb-lh-res
    HAS_RS=wb-has-res
    

    After editing winbind_config, you must register the resource.


    # ./winbind_register
    
  11. Enable the Winbind resource.


    # scstat 
    # scswitch -e -j Winbind-resource