Expand Swarm Capacity
This guide describes how to increase the storage capacity of a Swarm, for example when a node has 10 disks in service and you want to bring it to 16, or when you want to add entirely new servers to the Swarm. In this guide, node and server mean the same thing: one physical or virtual machine, running one agent per disk.
Registration in the dashboard only adds records. The state of the deployment changes in two moments: the Ansible recipe run (Step 3) and the Expand action (Step 5).
How capacity expansion works
A Swarm stores data in Rings, and each Ring belongs to a Redundancy Class that defines the redundancy parameters (local N + K, geographical N + K, and the anti-affinity group, AAG). See What is a Swarm? for the full model.
Two facts drive the expansion procedure:
- One agent corresponds to one disk. Each node runs multiple containerized agents, and each agent manages exactly one disk, exposed on its own port. When you add a disk, you deploy a new agent for it: registration never reconfigures or restarts the existing ones.
- New capacity comes from new Rings created on the same Redundancy Class. The Expand action creates as many new Rings as possible from the agents that are free, and reuses the class parameters (local and geographical N + K, anti-affinity group) without you having to enter them again.
Adding agents increases the raw capacity of the Swarm, but an agent's disk joins a Ring of a Redundancy Class only if the class requirements are satisfied. An agent is free for a Redundancy Class when it is online, belongs to one of the class availability zones, and is not already part of a Ring of that class: a disk that serves another class still counts as free here. To form one new Ring you need (local N + K) × (geographical N + K) free agents: local N + K of them available in each of the geographical N + K availability zones of the class, with no machine contributing more agents than the AAG to the same Ring.
For example, a class with local 8+4 and geographical 2+1 spans 3 availability zones (2 + 1 = 3), and each new Ring needs 12 free agents per zone (36 in total). If you add 10 disks to servers in one zone only, those disks stay free: the class capacity grows only when a whole new Ring can be formed.
The procedure is the same whether you add disks to an existing node or add entirely new servers, because every disk is managed by its own agent:
- Install the disks on the server
- Register the new agents in the dashboard, by adding disks to an existing node or by adding one or more new nodes
- Download and run the Ansible recipe generated by the dashboard, which installs and configures the new agents on the target servers
- Verify that the new agents are online
- Expand the Redundancy Class
Prerequisites
Before you start, make sure that:
- The agents of the Swarm are online and healthy. Expansion only considers online agents: a disk that is offline does not count as free, so bring the affected agents back online before expanding.
- The new disks are physically installed and visible to the operating system of the server. On a hotplug-capable server you can add them while it runs; otherwise plan a maintenance window for the insertion.
- Each server has enough resources for the new disks: the Hardware guidelines require one thread and 1 GB of RAM per disk.
- You have enough free agents to form at least one new Ring, following the rule explained above. If the free agents are not enough for one Ring, there is nothing to expand yet.
- New disks are the same size as the existing ones. The capacity contributed by a new Ring is determined by the smallest disk included in it, so mixing in smaller disks reduces the capacity of every Ring that uses them.
- Each new agent gets a unique mountpoint and port on its node: note the values already used by the node's existing agents. Each port must also be reachable from the outside on the node's public IP address, so check firewall and NAT rules before deploying.
The Deploy nodes flow adds servers to an existing Nexus (availability zone) of the Swarm. A Redundancy Class cannot be expanded with agents from a Nexus different from the ones selected when the class was created: the Expand action only uses free agents from the class's own availability zones. Capacity added in a new location becomes usable through a new Redundancy Class that includes that location, which Tenants select when connecting to the Swarm. See What is a Swarm? for how Nexuses and Redundancy Classes interact.
Step 1: Install and identify the new disks
Insert the disks into the storage nodes and verify the operating system can see them, for example with:
lsblk
Make a note of the device name of each new disk (for example /dev/sdj), especially if your disks do not follow a uniform prefix. If you are adding new servers, have them ready: the playbook must find the disks you declare during registration already installed.
Step 2: Register the new agents in the dashboard
In the dashboard, open the Swarm. How you register the agents depends on what you are adding:
- Adding disks to an existing node: use the node's Deploy agents flow, described first.
- Adding one or more new servers: use the Deploy nodes flow, which creates the node and its agents in one operation.
Add disks to an existing node
In the swarm sidebar, select Nexus, open the nexus the node belongs to, open the node from the Nodes list, and switch to the Agents tab.

Click Deploy agents and fill in the form:
- Disks per node*: how many new agents to create on this node (one per new disk).
- Mountpoint: the mountpoint of the first new agent, for example
/data/agent10. Continue the numbering already used by the node: if you leave the field empty, the dashboard starts again from/data/agent00. The following mountpoints are generated by incrementing the first one. - Disk identifier*: the first new disk, written in full (for example
/dev/sdk). The following disks are generated by incrementing the last letter: 6 disks from/dev/sdkgive/dev/sdkup to/dev/sdp. The auto-increment is only guaranteed for/dev/sdXnames: with different devices, for example NVMe, enter them explicitly, comma-separated. - Port(s)*: the port exposed by each new agent. Either list all ports explicitly (for example
4010,4011,4012,4013,4014,4015) or enter the first port only (4010) and the following ones are assigned automatically. Ports must not collide with those already used by the node.

Submit the form to create the agents.
Add one or more new nodes
In the swarm sidebar, select Nexus, open the nexus that will host the new servers, and click Deploy nodes in the Nodes list.
Fill in the two steps of the form. The first step describes the servers:

- Nodes*: how many servers you are adding.
- Public IP*: the public IP of each new server, as a comma-separated list of IPs, a CIDR range, or a single IP (in which case the following ones are assigned automatically).
- Private IP: the private IP addresses of the servers, used for the internal cluster traffic. If you leave the field empty, it defaults to the Public IP: behind NAT, set it to the real internal address of the servers.
- Name: optionally a name for the new servers; you can enter a single prefix, which the dashboard numbers automatically (prefix-0, prefix-1, ...), or a comma-separated list of names.
- Label: optionally a label to make the new servers easier to find and manage in bulk.
The second step describes their disks, with the same fields as the Deploy agents flow: Disks per node*, Mountpoint, Disk identifier* and Port(s)*. All the new servers in one deployment must share the same disk topology; if they do not, run the flow once per topology.

Submit the form to create the nodes and their agents.
Step 3: Download and apply the Ansible recipe
The download from the dashboard is an Ansible recipe: the Ansible playbook plus the inventory of the target nodes and the configuration files of their agents, pre-filled with the secrets, disks, mountpoints and ports generated during registration.
Generate the recipe once you have finished registering the agents in the Nexus: it contains the configuration of every agent of the selected nodes, old and new alike, so a single run covers all your changes, no matter how many nodes you touched. There are two ways to get it:
- Right after a registration, the dashboard shows the download step. This is convenient when you changed a single node and want to apply immediately.
- From the Nodes list of the Nexus, at any later time. Select the nodes that have changes, either new agents or entirely new servers, then click Deploy nodes: the dashboard opens the download step and generates a single recipe that covers all of them. You can also use Deploy in the node panel, which preselects that node.
With no nodes selected, the Deploy nodes button starts the node-creation wizard instead of the recipe download. Select the nodes first.

Click Download Ansible recipe and save the archive on a machine with Ansible installed and SSH access to the target servers: the playbook runs from there, towards all the nodes included in the recipe, following the instructions in the README.md file inside the archive.
The recipe embeds the secret of every agent of the selected nodes. Transfer it over a secure channel, keep its permissions restrictive, and delete it once the run is complete.
If the dashboard warns about duplicated disks or mountpoints when you download, stop and fix the registration first: unlike ports, which are rejected on submit, mountpoint collisions are not blocked earlier, and two agents would end up on the same mountpoint.
tar -xf cubbit-agent-playbook-<nexus-name>.tar
cd cubbit-agent-playbook-<nexus-name>
cat README.md
Step 4: Verify the new agents are online
When the playbook completes, each new agent starts, announces itself to the Swarm and registers its disk.
Open the Agents tab of each node and confirm that the new rows are there and online (green indicator) and that each reports the expected disk name and mount point. If you added new nodes, they appear in the Nodes list with all their agents.

If an agent stays Pending or Offline, check the Swarm Troubleshooting page: the most common causes are a port mismatch, an incorrect agent secret, or a disk mounted at a different location than at first start.
Step 5: Expand the Redundancy Class
Now that the new disks are online agents of the Swarm, expand the class that should use them. If you had the class page open while deploying, reload it first: the state of the Expand button is checked when the page loads.
In the swarm sidebar, open Redundancy class.
Open the class you want to expand with Manage, then click Expand. The action runs immediately, with no additional confirmation step.

The expansion keeps the class parameters: local N + K, geographical N + K and anti-affinity group, plus the same availability zones. All the free agents of the class's zones are used to create as many new Rings as possible.
If the button is disabled, the tooltip reports one of two conditions:
- Not enough free disks: the class needs a whole new Ring, that is (local N + K) × (geographical N + K) free disks, with local N + K in each of the geographical N + K availability zones.
- Not enough servers with free disks: the free disks must meet the anti-affinity group parameter in all availability zones. With anti-affinity group a, one server contributes at most a agents to a Ring: to gather local N + K agents, each zone needs at least (local N + K) ÷ a servers with free disks, rounded up.
When the expansion completes, the dashboard confirms it and the class page shows the new capacity and the agents involved in the new Rings. Existing data is not redistributed: the agents simply have more Rings to write to.