Skip to content

Instantly share code, notes, and snippets.

@keshavab
Last active August 29, 2015 14:05
Show Gist options
  • Save keshavab/89457c24f35573e001f2 to your computer and use it in GitHub Desktop.
Save keshavab/89457c24f35573e001f2 to your computer and use it in GitHub Desktop.
#create ring
swift-ring-builder object.builder create 10 3 1
# 1 node and n disks
for n in {1..8}; do swift-ring-builder object.builder add z1-10.0.0.1:6000/sdb$n 100; done
#update rings
swift-ring-builder object.builder rebalance
# view placement
swift-get-nodes -a object.ring.gz account/cont/object
# i nodes and j disks
for i in {1..3}; do for j in {1..10}; do swift-ring-builder object.builder add z1-10.0.0.$i:6000/sdb$j 100; done; done
# with regions
for i in {10..13}; do for j in {1..5}; do swift-ring-builder object.builder add r2z1-10.0.0.$i:6000/sdb$j 100; done; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment