Blog

Configure replication in Openstack

  • (4.0)

CONFIGURING  REPLICATION

As recommended by a highly redundant and adaptable object storage system, replication is  of fundamental concern.The reason behind creating multiple directories of greater lengths (named in a particular way) is to set up replication in the midst of these “devices” using rsync.
Rsync is responsible for carrying out the replication of the objects stored in our OpenStack Object Storage environment.

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

Getting Started

Assure that you are logged into your swift virtual machine. To accomplish this , run :


How to achieve it…

Configuring Replication in OpenStack Object Storage system means configuring the rsync service.The subsequent steps are used to build synchronization modules configured to represent the different ports which is ultimately used to configure our OpenStack Object Storage service.As we’re using only a single server , we use different paths and different ports to mimic multiple servers.If you have a close glimpse at the name and ports designated below ,you can get a picture in your head of what we are  talking all the while long. Moreover , as you continue more and have a look you observe that these names and ports are being used over and over again.
1. We initially create our /etc/rsyncd.conf file in its entirety , as follows:

uid = swift gid = swift
log file = /var/log/rsyncd.log pid file = /var/run/rsyncd.pid address = 127.0.0.1
[accont6012]
max connections = 25 path = /srv/1/node/ read only = false
lock file = /var/lock/account6012.lock
[accoun6022]
max connections = 25 path = /srv/2/node/ read only = false
lock file = /var/lock/account6022.lock
[accoun6032]
max connections = 25 path = /srv/3/node/ read only = false
lock file = /var/lock/account6032.lock
[accoun6042]
max connections = 25 path = /srv/4/node/ read only = false
lock file = /var/lock/account6042.lock
[container6011]
max connections = 25 path = /srv/1/node/ read only = false
lock file = /var/lock/account6011.lock
[container6021]
max connections = 25 path = /srv/2/node/ read only = false
lock file = /var/lock/account6021.lock
[container6031]
max connections = 25 path = /srv/3/node/ read only = false
lock file = /var/lock/account6031.lock
[container6041]
max connections = 25 path = /srv/4/node/ read only = false
lock file = /var/lock/account6041.lock
[object6010]
max connections = 25 path = /srv/1/node/ read only = false
lock file = /var/lock/account6010.lock
[object6020]
max connections = 25 path = /srv/2/node/ read only = false
lock file = /var/lock/account6020.lock
[object6030]
max connections = 25 path = /srv/3/node/ read only = false
lock file = /var/lock/account6030.lock
[object6040]
max connections = 25 path = /srv/4/node/ read only = false
lock file = /var/lock/account6040.lock

2. Once completed , we will enable the rsync and start the device as follows :
            sudo sed -I ‘s/=false/=true/’ /etc/default/rsync sudo service rsync start

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

How it works…

The majority of this section deals with appropriate configuring of rsyncd.conf. We have configured various rsync modules that become targets on our rsync server.
For instance , the object6020 module would be accessed using the command
rsync localhost::object 6020
It would store the contents /srv/node/3/ in it.
Moreover , each section of the rsyncd.conf file has a number of configuration directives such as max connections , read only and lock file . Although , most of these values are distinct , it is also essential to consider max connection values . In our test environment , this is not set to overwhelm the small server we are running . However , in reality you would want to tune the max connection values as per the guidance provided in the official rsync documentation.

HTTP:://DOCS.OPENSTACK.ORG/DEVELOPER/SWIFT/OVERVIEW_REPLICATION.HTML

 

Related Pages:
Openstack Tutorial

Interview Questions:
Openstack Interview Questions

 


Popular Courses in 2018

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