Managing swift cluster capacity – OpenStack

  • (4.0)

Because Swift is a distributed system that is controlled by software, does not rely on RAID, and writes multiple copies of each object (file), operating a Swift cluster is fundamentally different from operating traditional storage systems such as storage area networks (SAN) or using network-attached storage (NAS) equipment.

We consider, a zone as a group of nodes that is as isolated as possible from other nodes (separate servers, network, power, even geography). A Swift ring functions like a cereal box decoder ring, allowing the swift services to locate each objects. The ring guarantees that every replica is stored in a separate zone. To increase capacity in our environment, we can add an extra zone, to which data will then replicate. In this example, we will add an extra storage node with IP, with its second disk, /dev/sdb, used for our OpenStack with IP Storage. This node makes up the only node in this zone.

To add additional capacity to existing zones, we repeat the instructions for each existing zone in our cluster. For example, the following steps assume zone 5 (z5) does not exist, so this gets created when we build the rings. To simply add additional capacity to existing zones, we specify the new servers in the existing zones (zones 1-4). The instructions remain the same throughout.

To gain in-depth knowledge and be on par with practical experience, then explore  OpenStack Training course.

Getting started

Log in to the OpenStack Object storage Proxy Server node as well as a new storage node (that will form the basis of our new zone).

How to achieve it…

To add an extra zone to our OpenStack Object Storage cluster, carry out the following steps:

Proxy Server

  • Add the following entries to the ring where STORAGE_LOCAL_NET_IP is the IP address of our new node and ZONE is our new zone:


  • Ensure you run these commands while in the /etc/swift directory.


  • We need to verify the contents of the rings by issuing the following commands:


  • Finally, we rebalance the Rings, which could take some time to run:


  • Once this has finished, we need to copy ring.gz, container.ring.gz, and object.ring.gz over to our new storage node and all other storage nodes:


Storage Node

  • We first move the copied ring.gz, container.ring.gz, and object.ring.gz files to the /etc/swift directory and ensure they’re owned by swift:


Prepare the storage on this node, as described in the section Preparing Drives FOR Openstack Object Storage.

  • Edit the /etc/swift/swift.conf file, so that the [swift-hash] section matches that of all other nodes, as follows:


  • We now need to create the appropriate the /etc/rsyncd.conf file with the following contents:


  • Enable and start rsync, as follows:


  • We need to create the /etc/swift/account-server.conf file with the following contents:


  • Also create the /etc/swift/container-server.conf file with the following contents:


  • Finally, create the /etc/swift/object-server.conf file with the following contents:


  • We can now start this storage node, which we have configured to be in our fifth zone, as follows:


Explore OpenStack Sample Resumes! Download & Edit, Get Noticed by Top Employers!  Download Now!

How it works…

Adding extra capacity by adding additional nodes or zones is done in the following two steps:

Configuring the zones and nodes on the proxy server

Configuring the storage node(s)

For each storage node and the devices on those storage nodes, we run the following command, which adds the storage node and device to our new zone:

Once this has been configured on our proxy node, we rebalance the rings. This updates the object, account, and container rings. We copy the updated gzipped files as well as the swift hash key used within our environment, to all our storage node(s).
On the storage node, we simply run through the following steps:

* Configure the disk (partition and format with XFS)

Configure and start rsyncd

Configure the account, container, and object services

Start the OpenStack Object Storage services on the storage node(s)

Data is then redistributed within our OpenStack Object Storage environment onto this new zone’s node.


Related Pages:
Openstack Tutorial

Interview Questions:
Openstack Interview Questions


Popular Courses in 2018

Get Updates on Tech posts, Interview & Certification questions and training schedules