[Openstack] (Juno) Multiple rings Swift
christian.schwede at enovance.com
Tue Dec 23 10:56:57 UTC 2014
On 23.12.14 11:05, dhanesh1212121212 wrote:
> Is it possible to expand the partition of the above set up.
> Scenario : Disk sda1 is 100% utilized.
Do you mean to extend a partition on a disk or the Swift region/zone?
You could extend the partition on the disk if you're using something
like LVM; however most setups I know about simply use a single large
partition per disk without any volume manager.
If you want to add more capacity to the region/zone/cluster, you simply
add more disks to the ring later, for example:
swift-ring-builder object-1.builder add r1z5-192.168.1.1:6000/sdb1_ 3000
However, make sure the weights in your regions/zones are equally
distributed to ensure replicas are equally distributed as well.
Please not that you should avoid to run a Swift cluster close to 100%
> On Tue, Dec 23, 2014 at 1:43 PM, Christian Schwede
> <christian.schwede at enovance.com <mailto:christian.schwede at enovance.com>>
> On 22.12.14 21:00, Amit Anand wrote:
> > Thanks Christian I think thats exactly what I needed - I will try and
> > make 2 new rings and see how that works. You wouldnt per chance know
> > how I would limit the replicas, ie 2 in the Paris region and 1 at HQ?
> > I only want one replica to goto the HQ region... ... Also, if you
> > notice i my command for the name i gave hq-ip# - do I have to use the
> > naming convention r#z#-ip when I add?
> Yes, the naming convention tells Swift in which region/zone the device
> is located. For example:
> swift-ring-builder object-1.builder add r1z5-192.168.1.1:6000/sda1_ 3000
> r1: Region 1
> z5: Zone 5
> 3000: weight of the device
> Here is a small example with two regions, the first with two replicas,
> the second region with one. The important thing is to assign 2/3 of the
> total cluster weight to one region, and 1/3 to the other.
> swift-ring-builder object-1.builder create 14 3 1
> swift-ring-builder object-1.builder add r1z1-192.168.1.1:6000/sda1_ 3000
> swift-ring-builder object-1.builder add r1z2-192.168.1.2:6000/sda1_ 3000
> swift-ring-builder object-1.builder add r2z1-192.168.2.1:6000/sda1_ 3000
> swift-ring-builder object-1.builder rebalance
> swift-ring-builder object-1.builder list_parts r1
> swift-ring-builder object-1.builder list_parts r2
> This example is a perfect match (ie all partitions store two replicas in
> region 1 and one replica in region 2); however due to roundings during
> the calculation it might happen that there are a few partitions that
> have two replicas in the smaller region. You can see the partition and
> replica count using the "list_parts" command; you might need to tweak
> your weight numbers a little bit depending on your setup.
> Mailing list:
> Post to : openstack at lists.openstack.org
> <mailto:openstack at lists.openstack.org>
> Unsubscribe :
More information about the Openstack