Active-Active Cluster for Scale-Out and High Availability
Introduction
This guide explains how to configure Fusion SMB in an active-active cluster. This configuration consists of two Fusion SMB installations with two separate server nodes, both active and serving the same SMB shares, allowing for uninterrupted operation if any of the nodes fail.
Please also take note that the setup instructions for Pacemaker are very minimal. Pacemaker is configured to monitor Fusion SMB for up/down state and to monitor IP. A two-node cluster cannot provide a quorum to avoid split-brain scenarios. Dependencies on the host system and environment that may be relevant in an overall HA architecture aren’t covered by this minimal setup. You may wish to explore Red Hat's discussion of HA administration at https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/high_availability_add-on_administration/index
Running Corosync and Pacemaker inside containers is generally not recommended or officially supported for production environments. While there are experimental setups and technology previews (e.g., Pacemaker bundles for Docker containers), these are often limited in scope and may not provide the reliability and stability required for high availability clusters. Tuxera does not own or maintain either Corosync or Pacemaker so these warnings are made by those who do.
Running Corosync and Pacemaker in containers introduces several risks that can compromise the reliability and functionality of your high availability (HA) cluster:
-
Networking Challenges: Containers often use virtualized networking, which can complicate the communication between cluster nodes. Corosync relies on low-latency, high-reliability communication, and containerized networking may introduce delays or packet loss.
-
Resource Constraints: Containers are designed to isolate resources, which might limit the performance of Corosync and Pacemaker. For example, CPU and memory limits could lead to resource starvation during high-load scenarios.
-
Storage and State Management: HA clusters require persistent storage for configuration and state data. Containers, by default, use ephemeral storage, which can lead to data loss if not properly managed.
-
Fencing and Recovery: Fencing (isolating a failed node) is critical in HA setups. Running these tools in containers might complicate fencing mechanisms, as the container runtime could interfere with the process.
-
Lack of Official Support: Most distributions and vendors do not officially support running Corosync and Pacemaker in containers for production environments. This means you might face challenges in troubleshooting and lack access to vendor-provided fixes or updates.
-
Increased Complexity: Managing HA clusters is already complex, and adding containerization introduces another layer of abstraction, making debugging and maintenance more challenging.
If you're considering containerized high availability solutions, it might be worth exploring Kubernetes-native tools like Kubeadm, KubeSpray, or other orchestration frameworks designed for containerized environments. You are also encouraged to explore how Redhat does support containerizing Pacemaker with PCS Bundles:
What You'll Learn in This Guide
By reading and following the instructions in this guide, you'll learn:
-
The Concept of an Active-Active Fusion SMB Cluster and its Benefits:
We will provide you with the necessary information to assess whether an active-active cluster is the right choice for your use case, as well as the benefits it offers your organization.
-
How to Configure an Active-Active Fusion SMB Cluster:
Step-by-step instructions will guide you through the process of setting up an active-active Fusion SMB cluster. This include setting up the servers, configuring essential settings, and preparing your cluster for evaluation and testing. You'll gain practical knowledge on how to get your cluster up and running quickly and efficiently.
-
How to Test and Validate Your Active-Active Fusion SMB Cluster:
Make sure your system is highly available and fault tolerant, by testing various failure modes and validating that the service is not interrupted. You will be able to assess the suitability of the installation for your production environment.
-
Optimizing Your Cluster's Performance:
Learn how to optimize your Fusion SMB cluster for better performance, without sacrificing availability and uptime. We will provide you with tips and best practices to tune your cluster and ensure it is running at its best.
The Use Case Described in this Guide
This guide provides steps for quickly setting up an active-active Fusion SMB cluster for continuous availability. It describes a simple use case, however can be easily adapted to your specific requirements.
The described use case is comprised of the following:
-
Two Server Nodes:
The cluster consists of two server nodes, running Ubuntu 22.04. The choice of operating system is arbitrary and can be replaced with your preferred distribution, although some commands (e.g., package installation) may differ. The number of nodes can be increased to provide additional redundancy and network capacity.
-
Active Directory Integration:
The cluster in this example is integrated with Active Directory for user authentication, and the Fusion SMB nodes are configured to join the domain.
-
One Share, Just to Get Started:
The cluster is configured with a single share, which is used to demonstrate high availability. You can easily expand the configuration to include more shares, as needed.
-
A Windows Client for Testing:
To validate the setup, and run tests, the guide includes steps for testing cluster using a Windows client. This involves connecting to the share from a Windows machine, performing basic file operations, and verifying that the access to the share continues sealmessly after a node failure.
What is an Active-Active Cluster?
Active-active is a clustering configuration for Fusion SMB that provides all three benefits of clustering: continuous availability, scale-out, and high availability. In this mode, multiple servers operate simultaneously as a cluster, distributing connections and workloads across all nodes. This approach leverages the combined networking bandwidth of all servers. In the event of a node failure, only a subset of clients is affected, as their connections are automatically resumed on another server, virtually eliminating downtime.
This configuration is ideal for environments requiring minimal downtime, with scalability to handle increased loads by adding additional servers. However, it is more complex to configure and manage compared to active-passive clustering.
Common use cases for active-active clustering include:
-
Business-Critical Applications in Larger Environments:
Active-active clustering is often used in large environments where downtime is costly and a single SMB server cannot handle the workload.
-
Environments with High Bandwidth and Low Latency Demands:
Active-active clustering is commonly deployed where bandwidth demands are high. Examples include:
- Video Production: Enables multiple users to work on different projects simultaneously, requiring substantial bandwidth.
- Low-Latency Media Streaming: Allows to support a large number of clients, requiring high bandwidth and cannot tolerate buffering delays.
Installing Tuxera Fusion SMB
Fusion SMB is distributed as a compressed archive containing essential binary files and configuration templates. Typically, the archive's name resembles tuxera-smb-3024.3.22.1-r1-x86_64-jammy-user-evaluation-cluster.tgz.
Package Contents
| File | Description |
|---|---|
smb/bin/tsmb-server | The main Fusion SMB executable. |
smb/tools/tsmb-privilege | A utility for managing the privilege database. |
smb/tools/tsmb-status | A utility for displaying server status and statistics. |
smb/tools/tsmb-acls | A utility for managing Access Control Lists (ACLs). |
smb/tools/tsmb-passwd | A utility for manipulating the user database. |
smb/tools/tsmb-cfg | A utility for managing the configuration at runtime. |
smb/conf/tsmb.conf | A configuration file template. |
smb/README.SMB | A README file with additional information. |
smb/LICENSES.SMB | A file containing license information for third-party components. |
VERSION-INFO | A file detailing the version of the package. |
Installation
To install Fusion SMB, extract the contents of the archive and place them in the relevant system directories:
In this example, the files are placed in the following directories:
- The main Fusion SMB executable is placed in
/usr/sbin - The utilities are placed in
/usr/bin
These paths are typical for Linux server setups and are included in most users' $PATH environment variable. However, you can adjust the installation directories to suit your environment.
-
Extract the archive:
tar -xzf tuxera-smb-3024.3.22.1-r1-x86_64-jammy-user-evaluation-cluster.tgz -
Navigate to the extracted directory:
cd tuxera-smb-3024.3.22.1-r1-x86_64-jammy-user-evaluation-cluster -
Copy the Tuxera Fusion SMB binary to
/usr/sbin, or a location of your choice:sudo cp -af smb/bin/tsmb-server /usr/sbin/tsmb-server -
Copy the utilities to
/usr/bin, or a location of your choice:sudo cp -af smb/tools/* /usr/bin/
Prerequisites
Before you begin the installation and configuration of Fusion SMB, there are a few prerequisites you should be mindful of.
Active Directory
This guide assumes that you have an Active Directory domain:
- The Fusion SMB cluster nodes will be joined to this domain for user authentication.
- It is expected that Active Directory would use Kerberos for authentication.
Server Nodes
This are the machines where you will install Fusion SMB.
-
Operating System: Linux.
noteWhile the instructions in this guide are based on Ubuntu 22.04, you can use any Linux distribution that meets the following requirements, and make the necessary adjustments to the commands and package names.
-
Network:
- Ensure TCP port 445 is open in any firewalls between the server and the client machine.
- Ensure that the server can communicate with the domain controller over the network for LDAP and RFC2307 queries.
- It is recommended (but not strictly required) that the server nodes will be connected to two separate networks: one solely for SMB traffic, and another for everything else (e.g., storage, SSH, etc.). See Network Separation in the Fusion SMB Clustering guide for more details.
-
Shared Storage:
- The server nodes should have access to shared storage, such as a SAN or NAS, to store user data, configuration, and continuous availability-related files.
noteActive-active clustering requires that the shared storage is mounted on both nodes at boot time, which requires a clustering or distributed file system, such as GlusterFS or NFS.
For more information on shared storage requirements and options, see the Shared Storage and Persistent State section of the Fusion SMB Clustering guide.
-
DNS:
- Ensure that the server nodes' DNS settings point to the domain's DNS server.
- Configure round-robin DNS so for load balancing.
-
Active Directory:
- Ensure that you have the necessary Administrator credentials to join the server nodes to the domain.
-
NTP:
- Ensure that the domain controller and server nodes have properly configured NTP, since Kerberos requires a time skew of no more than 5 minutes between the client and the server.
Client
This is the machine from which you will access the SMB share served by Fusion SMB.
- Operating system: Windows 10, 11, or Windows Server 2016, 2019, 2022 connected to the same network as the server.
- Network:
- Ensure TCP port 445 is open in any firewalls between the client and the server.
- Active Directory:
- The client machine should be joined to the same Active Directory domain as the Fusion SMB cluster.
[Optional] Configuring the Secondary Network Interfaces
As mentioned previously, it is recommended, but not strictly required, that the server nodes will be connected to two separate networks: one for the client traffic, and one for the cluster communication.
In this example, we will configure a secondary network interface on each node, that will connect to the cluster communication network:
- Our primary client network is on
ens18. This interface uses DHCP to obtain an IP address. - Our secondary, SMB-only network, is on
ens19.- This interface will have a static IP address for both nodes:
- On
fusion-srv1:10.13.0.100. - On
fusion-srv2:10.13.0.101.
- On
- This interface will also be assigned floating IPs addresses of the cluster:
10.13.0.10and10.13.0.11, that will be distributed among the active nodes.
- This interface will have a static IP address for both nodes:
This guide is based on Ubuntu 22.04 and uses netplan
Edit the /etc/netplan/01-netcfg.yaml file to add the secondary network interface configuration:
network:
version: 2
renderer: networkd
ethernets:
ens18:
dhcp4: yes
ens19:
addresses: [10.13.0.100/16]
Apply the changes:
sudo netplan apply
Edit the /etc/netplan/01-netcfg.yaml file to add the secondary network interface configuration:
network:
version: 2
renderer: networkd
ethernets:
ens18:
dhcp4: yes
ens19:
addresses: [10.13.0.101/16]
Apply the changes:
sudo netplan apply
Joining the Domain and Adding UPN
Before you begin the cluster setup, you need to join the cluster nodes to the Active Directory domain. This will be achieved by using SSSD and
adcli. (net from the Samba suite is also supported, but not covered in this guide.)
-
Install the necessary packages:
sudo apt -y update && sudo apt upgrade -ysudo apt -y install sssd-ad sssd-tools realmd adcli krb5-user sssd-krb5 -
On each server, set the hostname to the FQDN of the server (we will use
fusion-srv1.acme.localandfusion-srv2.acme.localas examples):On fusion-srv1:
sudo hostnamectl set-hostname fusion-srv1.acme.localOn fusion-srv2:
sudo hostnamectl set-hostname fusion-srv2.acme.local -
Configure Kerberos by editing the /etc/krb5.conf file. Note that the
default_realmshould match the domain name in uppercase:[libdefaults]default_realm = ACME.LOCALrdns = false -
Confirm domain discovery by running the following command:
sudo adcli info acme.localThe output should be similar to:
[domain]domain-name = acme.localdomain-short = ACMEdomain-forest = acme.localdomain-controller = DC1.acme.localdomain-controller-site = Default-First-Site-Namedomain-controller-flags = pdc gc ldap ds kdc timeserv closest writable full-secret ads-webdomain-controller-usable = yesdomain-controllers = DC1.acme.local[computer]computer-site = Default-First-Site-Name
-
Create SSSD configuration at /etc/sssd/sssd.conf, replacing
acme.localwith your domain name, with thekrb5_realmparameter in uppercase:[sssd]domains = acme.localconfig_file_version = 2services = nss[domain/acme.local]ad_domain = acme.localkrb5_realm = ACME.LOCALcache_credentials = Trueid_provider = adkrb5_store_password_if_offline = Trueldap_id_mapping = Trueuse_fully_qualified_names = falseaccess_provider = ad -
Set the permissions on the SSSD configuration file:
sudo chmod 600 /etc/sssd/sssd.conf -
Create a computer account and a krb5.keytab file for the cluster. We will use
fusion-srv(without a number) as the cluster's computer account name. The domain and the computer name must be in uppercase:sudo adcli join --domain ACME.LOCAL --service-name=cifs --computer-name FUSION-SRV --host-fqdn fusion-srv.ACME.LOCAL -vnoteThe
--computer-nameand the--host-fqdnparameters should refer to the name the entire cluster should be known as in the domain. Hence, it's okay that it doesn't match the node's hostname. It is important however that the--host-fqdnthe domain name portion of the FQDN matches the node's hostname's domain name (albeit in uppercase). -
Enable and restart the SSSD service:
sudo systemctl enable sssdsudo systemctl restart sssd -
Confirm that the computer is part of the domain and is albe to query the domain controller, by querying for information about a user (e.g.,
johndoe):id johndoeThe output should be similar to:
uid=1414601123(johndoe) gid=1414600513(domain users)groups=1414600513(domain users),1414601115(testgroup) -
Copy the krb5.keytab file and the SSSD configuration to the other cluster node:
noteFor the following command to work, the public SSH key from the first node must be added to ~root/.ssh/authorized_keys on the second node.
sudo scp /etc/sssd/sssd.conf fusion-srv2:/etc/sssd/sssd.confsudo scp /etc/krb5.keytab fusion-srv2:/etc/krb5.keytab
-
Open the Active Directory Users and Computers console, right click on the
FUSION-SRVcomputer account, and click on Properties:
-
Open the Attribute Editor tab, and find the
userPrincipalNameattribute. Click on Edit:
noteIf you don't see the Attribute Editor tab, you may need to enable it by clicking on View > Advanced Features in the Active Directory Users and Computers console.
-
Make sure the
userPrincipalNameattribute is set to the tocifs/[email protected](replace the domain name and the computer name with your own), and click OK.
Alternatively, you can use PowerShell:
Set-ADComputer -Identity FUSION-SRV -UserPrincipalName cifs/[email protected]
Enabling Round-Robin DNS
In order for the cluster nodes to be able to serve the SMB shares in an active-active configuration, the DNS server should be configured to return multiple IP addresses for the same fusion-srv hostname. This is known as round-robin DNS.
-
In the DNS Manager snap-in, right-click on the DNS server and select Properties:

-
Under the Advanced tab, make sure the Enable round robin checkbox is checked, and click OK:

-
Make sure your that in your View menu, Advanced is enabled:

-
Navigate to the Forward Lookup Zones > acme.local zone and aclick on Action > New Host (A or AAAA):

-
In the New Host dialog, enter the
fusion-srvhostname and the IP address of the first node. Also, set the TTL to 0:0:0:0:
-
Then, repeat the action for the second node's IP address, setting the TTL as well:

Configuring Tuxera Fusion SMB
Now that the cluster nodes are configured to operate in the domain environment, we can proceed with the configuration of the Fusion SMB cluster.
The following steps assume that the shared storage is already mounted on /mnt/shared on the node where you are performing the configuration. If the shared storage is mounted on a different path, adjust the paths accordingly.
As mentioned before (and in the Shared Storage and Persistent State section Clustering guide), for the configuration and the persistent state to be available on both nodes, we will store it on the shared storage that is mounted on both nodes. In this guide, we will assume that it's mounted on /mnt/shared. This directory would also contain the files shared by the SMB server.
The directory structure for the shared storage volume for this example would hence be as follows:
/mnt/shared
├── .tsmb # The configuration and persistent state directory, not visible to SMB clients, containing
│ ├── ca # - The persistent file handle database
│ ├── etc # - The configuration file
│ ├── privilegedb # - The privilege database
│ └ ── tcp_tickle # - The connection recovery database
└── sh1 # The data directory for the `SH1` share, visible to SMB clients
-
Create the directory structure for the Fusion SMB configuration and persistent state, the runtime state directory, and the data directory on the shared storage volume:
sudo mkdir -p /mnt/shared/.tsmb/{ca,etc,privilegedb,tcp_tickle}sudo mkdir /var/lib/tsmbsudo mkdir /mnt/shared/sh1 -
Create the configuration file at
/mnt/shared/.tsmb/etc/tsmb.conf:### GLOBAL CONFIGURATION ###[global]# The runtime state directoryrunstate_dir = /var/lib/tsmb# Enable scale-out, as we are configuring an active-active clusterscale_out = true# Perform authentication with Active Directoryuserdb_type = ad# The domain namedomain = acme.local# The computer account name that clients will use to connect to SMB sharesserver_name = fusion-srv# Enable the persistent file handle databaseca = true# Path to the persistent file handle databaseca_path = /mnt/shared/.tsmb/ca# Path to the privilege databaseprivilegedb = /mnt/shared/.tsmb/privilegedb# Enable connection recovery via TCP tickle and set the path to the databasetcp_tickle = truetcp_tickle_params = path=/mnt/shared/.tsmb/tcp_tickle# Enable logs at log level 4, and log to the specified filelog_level = 4log_destination = filelog_params = path=/var/lib/tsmb/tsmb.log# Listen on port 445 on the SMB-only network interfacelisten = ens19,0.0.0.0,IPv4,445,DIRECT_TCP[/global]### SHARE CONFIGURATION #### Define the `SH1` share[share]# The share's namenetname = SH1# The comment that will be displayed in the share's propertiesremark = Test Share# The path to the share's data directorypath = /mnt/shared/sh1# The share's permissions (we're testing, so we're giving full access to everyone)permissions = everyone:full[/share]In the annotated example above, we have configured the following:
-
The
scale_outparameter is set totrue:As we are configuring an active-active cluster, we must enable scale-out. This parameter is used to enable or disable the scale-out feature, which allows multiple Fusion SMB nodes to serve the same shares.
-
The
userdb_typeparameter is set toad:This indicates that we are using Active Directory for user authentication.
-
The
domainparameter is set toacme.local:This indicates the domain name. Replace this with your own domain name.
-
The
server_nameparameter is set tofusion-srv:This is the computer account name we've chosen when joining the cluster to Active Directory. That is the name clients will use to connect to SMB shares.
-
The
ca_path,privilegedb,tcp_tickle, andtcp_tickle_paramsparameters are set to the paths to the persistent file handle database, privilege database, and connection recovery database, respectively. -
The
log_level,log_destination, andlog_paramsparameters are set to log level 4, log to a file, and the path to the log file, respectively. These can be changed later, but for now, we've set them to log level 4, so that we can make verify the configuration and test some functionality. -
The
listenparameter is set toens19,0.0.0.0,IPv4,445,DIRECT_TCPThis indicates that the server will listen on port 445 on the
ens19network interface, which is the SMB-only network interface. -
The share
SH1is defined with:- The
netnameparameter set toSH1. - The
remarkparameter set toTest Share. - The
pathparameter set to/mnt/shared/sh1. - The
permissionsparameter set toeveryone:full.
Additional share configuration is possible. For more advanced share configuration parameters, see the SMB Features and Setting and Authorization and Access Management sections where some topics are relevant to specific share behavior, or refer to the share configuration reference for a copmlete list of share configuration parameters.
It is also possible to set the
caandca_paramsparameters for individual shares, if you want to disable continuous availability for a specific share, or to use a different path for this share's persistent file handle database respectively. - The
-