Chapter 7. Managing Clusters
Heketi allows administrators to add and remove storage capacity by managing either a single or multiple Red Hat Gluster Storage clusters.
7.1. Increasing Storage Capacity Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
You can increase the storage capacity using any of the following ways:
- Adding devices
- Increasing cluster size
- Adding an entirely new cluster.
7.1.1. Adding New Devices Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
You can add more devices to existing nodes to increase storage capacity. When adding more devices, you must ensure to add devices as a set. For example, when expanding a distributed replicated volume with a replica count of replica 2, then one device should be added to at least two nodes. If using replica 3, then at least one device should be added to at least three nodes.
You can add a device either using CLI, or the API, or by updating the topology JSON file. The sections ahead describe using heketi CLI and updating topology JSON file. For information on adding new devices using API, see Heketi API https://github.com/heketi/heketi/wiki/API#device_add
7.1.1.1. Using Heketi CLI Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Register the specified device. The following example command shows how to add a device
/dev/sde to node d6f2c22f2757bf67b1486d868dcb7794:
heketi-cli device add --name=/dev/sde --node=d6f2c22f2757bf67b1486d868dcb7794 OUTPUT: Device added successfully
# heketi-cli device add --name=/dev/sde --node=d6f2c22f2757bf67b1486d868dcb7794
OUTPUT:
Device added successfully
7.1.1.2. Updating Topology File Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
You can add the new device to the node description in your topology JSON used to set up the cluster. Then rerun the command to load the topology.
Following is an example where a new
/dev/sde drive added to the node:
In the file:
Load the topology file:
7.1.2. Increasing Cluster Size Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Another way to add storage to Heketi, is to add new nodes to the cluster. Like adding devices, you can add a new node to an existing cluster by either using CLI or the API or by updating the topology JSON file. When you add a new node to the cluster, then you must register new devices to that node.
The sections ahead describe using heketi CLI and updating topology JSON file. For information on adding new devices using API, see Heketi API: https://github.com/heketi/heketi/wiki/API#node_add
7.1.2.1. Using Heketi CLI Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Following shows an example of how to add new node in
zone 1 to 597fceb5d6c876b899e48f599b988f54 cluster using the CLI:
The following example command shows how to register
/dev/sdb and /dev/sdc devices for 095d5f26b56dc6c64564a9bc17338cbf node:
7.1.2.2. Updating Topology File Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
You can expand a cluster by adding a new node to your topology JSON file. When adding the new node you must add this node information
after the existing ones so that the Heketi CLI identifies on which cluster this new node should be part of.
Following shows an example of how to add a new node and devices:
Load the topology file:
7.1.3. Adding a New Cluster Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
Storage capacity can also be increased by adding new clusters of GlusterFS. Just as before, there are three ways to add a new cluster to Heketi. One way is to use the API (https://github.com/heketi/heketi/wiki/API#clusters), another is to use heketi-cli, but the easiest way is to create another topology JSON file which defines the new nodes and devices which will compose the cluster.
7.1.3.1. Updating Topology file Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
You can add a new cluster to your topology JSON file which defines the new nodes and devices which will compose the cluster.
Following is an example showing how to add a new node and devices:
Load the topology file: