Ask Your Question

I am setting up swift with 2 VMs

asked 2013-03-31 12:29:55 -0500

anonymous user


updated 2013-04-01 09:14:46 -0500

My current setup is I have 2 VMs with swift. One VM runs 1 proxy nodes with 4 storage nodes, while the other VM is 4 storage nodes only. I have made all the config files necessary in /etc/swift and the VM with proxy is already working. My problem is I tried configuring the rings such that the storage nodes of the second VM would be recognised. However, when I upload, it does not distribute files onto VM2 and only uses storage nodes of VM1.

Example, in VM1, I have the following config /etc/swift/storage-server/d1.conf /etc/swift/storage-server/d2.conf /etc/swift/storage-server/d3.conf /etc/swift/storage-server/d4.conf

and in VM2 /etc/swift/storage-server/d5.conf /etc/swift/storage-server/d6.conf /etc/swift/storage-server/d7.conf /etc/swift/storage-server/d8.conf

Should I make VM1 and VM2 have the same configuration files?

edit retag flag offensive close merge delete


1) What's your expectation of swift to put object into drives? 2) Could you please paste the content of your builder file on? 3) Why do you run four storage nodes on a VM? Is that b/c the SAIO document ?

In my opinion, you can run 1 storage node in a VM with multiple workers and obtain 4 disks.

Hugo Kuo gravatar imageHugo Kuo ( 2013-04-01 05:01:59 -0500 )edit

To whoever downvoted, it's not constructive to downvote a valid question. What's obvious to one may not be obvious to another...the whole idea of this site is to share that sort of knowledge and help others. Just add a comment if you need more info.

briancline gravatar imagebriancline ( 2013-05-01 16:55:31 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-05-01 15:06:54 -0500

clayg gravatar image

updated 2013-05-01 16:59:07 -0500

smaffulli gravatar image

You need to add the devices from the second node to the ring and distribute the new ring to both nodes.

Read here first:

Then inspect your current ring structure with "swift-ring-builder":

$ swift-ring-builder /etc/swift/account.builder
/etc/swift/account.builder, build version 4
262144 partitions, 3.000000 replicas, 1 regions, 4 zones, 4 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 1
Devices:    id  region  zone      ip address  port      name weight partitions balance meta
             0       1     1  6012      sdb1   1.00     196608   0.00 
             1       1     2  6022      sdb2   1.00     196608   0.00 
             2       1     3  6032      sdb3   1.00     196608   0.00 
             3       1     4  6042      sdb4   1.00     196608   0.00

This example is the account ring (you'll need to make changes to container & object rings too).

The "remakerings" script has some general examples for adding new nodes/devices:

or run "swift-ring-builder" with out any args for more help, the man page is also great if you can get it installed or read past the weird man page formatting:

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2013-03-31 12:29:55 -0500

Seen: 358 times

Last updated: May 01 '13