Sun Cluster Data Service for Samba Guide for Solaris OS

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

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. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Register the following resource types.


    # clresourcetype register SUNW.HAStoragePlus
    # clresourcetype register SUNW.gds
    
  3. Create a failover resource group for Samba.


    Note –

    Refer to Restriction for multiple Samba instances that require winbind for more information on the nodelist entry.



    # clresourcegroup create -n nodelist samba-resource-group
    
  4. Create a resource for the Samba Logical Hostname.


    # clreslogicalhostname create -g samba-resource-group \
    > -h samba-logical-hostname \
    > samba-logical-hostname-resource
    
  5. Create a resource for the Samba Disk Storage.

    1. If a ZFS highly available local file system is being used


      # clresource create -g samba-resource-group  \
      > -t SUNW.HAStoragePlus  \
      > -p Zpools=samba-zspool \
      > samba-hastorage-resource
      
    2. If a cluster file system or any other non-ZFS highly available local file system is being used


      # clresource create -g samba-resource-group  \
      > -t SUNW.HAStoragePlus  \
      > -p FilesystemMountPoints=samba-filesystem-mountpoint \
      > samba-hastorage-resource
      
  6. Bring online the failover resource group for Samba that now includes the HA Storage and Logical Hostname resources.


    # clresourcegroup online -M samba-resource-group
    
  7. 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" is specified. 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 B, Deployment Example: Installing Samba from http://www.samba.org.


    Vigor5# cat > /var/tmp/winbind_config <<-EOF
    #+++ Resource Specific Parameters +++
    RS=winbind
    RG=samba-rg
    RS_LH=samba-lh
    RS_HAS=sambaZFS-has
    SERVICES="winbindd"
    
    #+++ Common Parameters +++
    BINDIR=/opt/samba/bin
    SBINDIR=/opt/samba/sbin
    CFGDIR=/local/samba/smb1
    LDPATH=/opt/samba/lib
    FMUSER=homer
    
    #+++ SMBD & NMBD Specific Parameters (See Note 1) +++
    SAMBA_LOGDIR=
    SAMBA_FMPASS=
    SAMBA_FMDOMAIN=
    
    #+++ WINBIND Specific Parameters (See Note 2) +++
    WINBIND_DISCACHE=FALSE
    WINBIND_SINGLEMODE=FALSE
    
    #+++ Zone Specific Parameters (See Note 3) +++
    RS_ZONE=
    LHOST=
    PROJECT=default
    TIMEOUT=30
    EOF
    

    Vigor5# /opt/SUNWscsmb/util/samba_register -f /var/tmp/winbind_config
    
  8. If winbind is required enable the resource.


    # clresource enable winbind-resource
    
  9. 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" is specified. 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 B, Deployment Example: Installing Samba from http://www.samba.org.


    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"
    
    #+++ Common Parameters +++
    BINDIR=/opt/samba/bin
    SBINDIR=/opt/samba/sbin
    CFGDIR=/local/samba/smb1
    LDPATH=/opt/samba/lib
    FMUSER=homer
    
    #+++ SMBD & NMBD Specific Parameters (See Note 1) +++
    SAMBA_LOGDIR=/local/samba/smb1/logs
    SAMBA_FMPASS=smb4#ads
    SAMBA_FMDOMAIN=
    
    #+++ WINBIND Specific Parameters (See Note 2) +++
    WINBIND_DISCACHE=
    WINBIND_SINGLEMODE=
    
    #+++ Zone Specific Parameters (See Note 3) +++
    RS_ZONE=
    LHOST=
    PROJECT=default
    TIMEOUT=30
    EOF
    

    Vigor5# /opt/SUNWscsmb/util/samba_register -f /var/tmp/samba_config
    
  10. If winbind is used, ensure Samba is dependent on winbind.


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


    # clresource enable samba-resource
    
Next Steps

See Verifying the Sun Cluster HA for Samba Installation and Configuration