Sun Cluster Data Service for Samba Guide for Solaris OS

ProcedureHow to Register and Configure Sun Cluster HA for Samba in a failover zone

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.


Note –

Perform this procedure on one node of the cluster only.


  1. Create a failover resource group for Samba.

    Follow steps 1, 2, 3, 4, 5 and 6 in How to Register and Configure Sun Cluster HA for Samba in a failover resource group.

  2. Register the failover zone in the failover resource group for Samba.

    Refer to Sun Cluster Data Service for Solaris Containers Guide for complete information about failover zones.

    Edit the sczbt_config file and follow the comments within that file. Ensure that you specify the samba-resource-group for the RG= parameter within sczbt_config.

    After you have edited sczbt_config, you must register the resource.


    # cd /opt/SUNWsczone/sczbt/util
    # vi sczbt_config
    # ./sczbt_register
    

    The following deployment example has been taken from Appendix C, Deployment Example: Installing Samba in a Failover Zone.


    Vigor5# cat > /var/tmp/sczbt_config <<-EOF
    RS=sambaFOZ
    RG=samba-rg
    PARAMETERDIR=/zones
    SC_NETWORK=true
    SC_LH=samba-lh
    FAILOVER=true
    HAS_RS=sambaSVM-has,sambaZFS-has
    
    Zonename=failover
    Zonebootopt=
    Milestone=multi-user-server
    Mounts=/local
    EOF
    Vigor5#
    Vigor5# /opt/SUNWsczone/sczbt/util/sczbt_register -f /var/tmp/sczbt_config
    
  3. Enable the failover zone resource


    # clresource enable samba-failover-zone-resource
    
  4. If winbind is required, create and register a winbind resource

    If Samba was dynamically linked and is being used as an Active Directory Server member you must configure the LDPATH variable to point to the Samba lib directory.

    Edit the samba_config file and follow the comments within that file. Ensure that SERVICES="winbindd" and the RS_ZONE variable specifies the Sun Cluster resource for the failover zone. After you have edited samba_config, you must register the resource.


    # cd /opt/SUNWscsmb/util
    # vi samba_config
    # ./samba_register
    
  5. If winbind is required, enable the winbind resource.


    # clresource enable winbind-resource
    
  6. Create and register a Samba resource

    If Samba was dynamically linked and is being used as an Active Directory Server member you must configure the LDPATH variable to point to the Samba lib directory.

    Edit the samba_config file and follow the comments within that file. Ensure that SERVICES="smbd" or SERVICES="smbd,nmbd" and the RS_ZONE variable specifies the Sun Cluster resource for the failover zone. After you have edited samba_config, you must register the resource.


    # cd /opt/SUNWscsmb/util
    # vi samba_config
    # ./samba_register
    

    The following deployment example has been taken from Appendix C, Deployment Example: Installing Samba in a Failover Zone.


    Vigor5# cat > /var/tmp/samba_config <<-EOF
    #+++ Resource Specific Parameters +++
    RS=samba
    RG=samba-rg
    RS_LH=samba-lh
    RS_HAS=sambaZFS-has
    SERVICES="smbd,nmbd"
    
    #+++ Common Parameters +++
    BINDIR=/usr/sfw/bin
    SBINDIR=/usr/sfw/sbin
    CFGDIR=/local/samba/smb1
    LDPATH=/usr/sfw/lib
    FMUSER=homer
    
    #+++ SMBD & NMBD Specific Parameters (See Note 1) +++
    SAMBA_LOGDIR=/local/samba/smb1/logs
    SAMBA_FMPASS=samba
    SAMBA_FMDOMAIN=
    
    #+++ WINBIND Specific Parameters (See Note 2) +++
    WINBIND_DISCACHE=FALSE
    WINBIND_SINGLEMODE=FALSE
    
    #+++ Zone Specific Parameters (See Note 3) +++
    RS_ZONE=sambaFOZ
    LHOST=192.168.1.132
    PROJECT=default
    TIMEOUT=30
    EOF
    Vigor5#
    Vigor5# /opt/SUNWscsmb/util/samba_register -f /var/tmp/samba_config
    
  7. If winbind is used, ensure Samba is dependent on winbind.


    # clresource set -p Resource_dependencies=winbind-resource{local_node} samba-resource
    
  8. Enable the Samba resource.


    # clresource enable samba-resource
    
Next Steps

See Verifying the Sun Cluster HA for Samba Installation and Configuration