Go to main content

Oracle® Solaris Cluster Data Service for Samba Guide

Exit Print View

Updated: February 2020
 
 

Planning the HA for Samba Installation and Configuration

This section contains the information you need to plan your HA for Samba installation and configuration.

Throughout this section, references are made to the Samba instance and winbind instance. The HA for Samba data service consists of the components smbd, nmbd, and winbindd.

  • The smbd and optional nmbd components are created within a single resource. This is referred to as the Samba instance or Samba resource.

  • The winbindd component is created as a separate resource. This is referred to as the winbind instance or winbind resource.

For conceptual information about failover data services and scalable data services, see Concepts for Oracle Solaris Cluster 4.4.

This section contains the following configuration requirements and restrictions for the HA for Samba data service.


Caution

Caution  -  Your data service configuration might not be supported if you do not observe these guidelines.


Supported Configurations of Samba

HA for Samba supports Samba software in the following configurations.

  • Primary Domain Controller (PDC).

  • Backup Domain Controller (BDC) to a Samba PDC.

  • NT4 domain member server, with or without winbind.

  • Active Directory domain member server, with or without winbind.

  • Standalone configuration.

HA for Samba is supported in the following Oracle Solaris Cluster configurations:

  • The smbd, winbindd, and nmbd components can only be configured to run within a failover resource group.

  • All components must run in the global zone or in a zone cluster. See Multiple Samba Instances That Require winbind for more information.

Location of Samba Files

The Samba files are where the Samba shares and smb.conf files are stored. The HA for Samba data service requires that these files be stored within a configuration directory that reflects the NetBIOS name for the Samba or winbind instance. The Samba files must be placed on shared storage, using either a cluster file system or a highly available local file system.

Requirements and Restrictions for Samba smb.conf File

The Samba smb.conf file is a configuration file that is used by the Samba and winbind instances.

The HA for Samba data service requires that such files be located at configuration-directory/lib/smb.conf. The following guidelines apply:

  • Each Samba instance requires a unique configuration-directory that reflects the NetBIOS name of the Samba instance.

  • A winbind instance can share a Samba instance configuration-directory and subsequent smb.conf file, together with the NetBIOS name of the Samba instance, if the Samba and winbind instances are both deployed in the same failover resource group.

  • Each Samba instance smb.conf file must have a [scmondir] share. The HA for Samba fault monitor uses smbclient to access the directory specified within [scmondir] to verify that smnd is operating correctly. The following is an example of the [scmondir] share in an smb.conf file.

    [scmondir]
    comment = Monitor directory for Oracle Solaris Cluster
    path = /tmp
    browseable = No

    The Samba instances run as failover services within separate failover resource groups on highly available local file systems with their own unique configuration-directories.

      The following example uses the following component names:

    • The NetBIOS name for the Samba instances are smb1 and smb2.

    • The NetBIOS name for the winbind instance is winbind.

    • The Samba instance smb1 has its configuration directory as /local/samba/config/smb1.

    • The Samba instance smb2 has its configuration directory as /local/samba/config/smb2.

    • The winbind instance winbind has its configuration directory as /global/samba/config/winbind.

    • The Samba instance smb1 has its smb.conf file located at /local/samba/config/smb1/lib/smb.conf.

    • The Samba instance smb2 has its smb.conf file located at /local/samba/config/smb2/lib/smb.conf.

    • The winbind instance winbind has its smb.conf file located at /global/samba/config/winbind/lib/smb.conf.

    phys-schost# ls -l /global/samba/config
    total 2
    drwxrwx---   2 root     root     512 Jul 13 11:20 winbind
    
    phys-schost# ls -l /local/samba/config
    total 4
    drwxrwx---   2 root     root     512 Jul 13 11:25 smb1
    drwxrwx---   2 root     root     512 Jul 13 11:25 smb2

Multiple Samba Instances That Require winbind

The HA for Samba data service can support multiple Samba instances. However, only one winbind instance is supported per global zone or zone cluster.

If you intend to deploy multiple Samba instances that also require winbind, winbind needs to be a failover service. The following discussion will help you determine how to deploy single or multiple Samba instances with winbind. Disregard any reference to winbind if it is not required.

    Each example includes the following information:

  • The zone cluster samba-zc is configured on two nodes of the global cluster, node1 and node2.

  • Benefits and drawbacks are listed within each example.

Example 1  Running All Samba Instances and a winbind Instance Within the Same Failover Resource Group

This example creates a single failover resource group that contains all the Samba instances and a winbind instance in zone cluster samba-zc on global-cluster nodes node1 and node2.

node1# clresourcegroup create -Z samba-zc RG1
Benefits

Only one non-global zone per node is required.

Drawbacks

All Samba/winbind instances do not have independent failover as they are all within the same failover resource group.

Example 2  Running Each Samba or winbind Instance Within Separate Failover Resource Groups

Create multiple failover resource groups that will each contain one Samba or winbind instance in dedicated zone-cluster nodes across global-cluster nodes.

node1# clresourcegroup create -Z samba-zc1 RG1
node1# clresourcegroup create -Z samba-zc2 RG2
node1# clresourcegroup create -Z samba-zcN RGn
Benefits

All Samba or winbind instances have independent failover in separate failover resource groups.

All Samba or winbind instances are isolated within their own dedicated zone-cluster nodes.

Drawbacks

Each resource group requires a unique zone cluster.

Dependencies Between HA for Samba Components

If your Samba resource requires winbind, you must configure a start dependency on the winbind resource. After you create the Samba and winbind resources, you set this dependency in Registering and Configuring HA for Samba.

Table 2, Samba Components and Their Dependencies list the various dependencies.

Table 2  Samba Components and Their Dependencies
Component
Dependencies
Samba resource
(smbd and nmbd)
winbind resource, if the Samba resource requires winbind services
smbd logical host resource
smbd HAStoragePlus resource
winbind resource
(winbindd)
winbindd logical host resource
winbindd HAStoragePlus resource

Note -  Dependencies against the relevant component's logical host or HAStoragePlus resource are set for you when you register the Samba and winbind resources.

Required Parameters for the Samba smb.conf File

This section contains the following lists of required parameters for the Samba smb.conf file that is located within each configuration directory:

Refer to the smb.conf(5) man page for complete configuration information about Samba smb.conf file parameters.

Samba Parameters Required in smb.conf

  • bind interfaces only – Must be set to yes.

  • interfaces – Must be defined to the logical hostname.

  • lock dir – Must include the samba-configuration-directory in its path.

  • netbios name – Must be set to the NetBIOS name by which the Samba server is known.

  • pid directory – Must include the samba-configuration-directory in its path.

  • security – Specifies the security mode under which the Samba instance will run.

  • smb passwd file – Must include the samba-configuration-directory in its path.

winbind Parameters Required in smb.conf

  • bind interfaces only – Must be set to yes.

  • idmap-related variables – Must be set to the same value as the Samba smb.conf entry.

  • interfaces – Must be defined to the logical hostname.

  • lock dir – Must include the samba-configuration-directory in its path.

  • netbios name – Must be set to the NetBIOS name by which the winbind server is known.

  • password server – Must be set to the same value as the Samba smb.conf entry.

  • pid directory – Must include the samba-configuration-directory in its path.

  • template homedir – Must be set to the same value as the Samba smb.conf entry.

  • template shell – Must be set to the same value as the Samba smb.conf entry.

  • winbind enum groups – Must be set to the same value as the Samba smb.conf entry.

  • winbind enum users – Must be set to the same value as the Samba smb.conf entry.

  • winbind use default domain – Must be set to yes.

  • workgroup – Must be set to the same value as the Samba smb.conf entry.