Skip to content

Instantly share code, notes, and snippets.

Created February 24, 2015 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/9a7198db76d4612d23b8 to your computer and use it in GitHub Desktop.
Save anonymous/9a7198db76d4612d23b8 to your computer and use it in GitHub Desktop.
swift@saio:~$ swift-ring-builder /etc/swift/object.builder
/etc/swift/object.builder, build version 4
1024 partitions, 3.000000 replicas, 2 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 replication ip replication port name weight partitions balance meta
0 1 1 127.0.0.1 6010 127.0.0.1 6010 d1 1.00 768 0.00
1 1 2 127.0.0.1 6020 127.0.0.1 6020 d2 1.00 768 0.00
2 2 3 127.0.0.1 6030 127.0.0.1 6030 d3 1.00 768 0.00
3 2 4 127.0.0.1 6040 127.0.0.1 6040 d4 1.00 768 0.00
swift@saio:~$ swift-ring-builder /etc/swift/object.builder
/etc/swift/object.builder, build version 4
1024 partitions, 3.000000 replicas, 2 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 replication ip replication port name weight partitions balance meta
0 1 1 127.0.0.1 6010 127.0.0.1 6010 d1 1.00 768 0.00
1 1 2 127.0.0.1 6020 127.0.0.1 6020 d2 1.00 768 0.00
2 2 3 127.0.0.1 6030 127.0.0.1 6030 d3 1.00 768 0.00
3 2 4 127.0.0.1 6040 127.0.0.1 6040 d4 1.00 768 0.00
swift@saio:~$ swift-ring-builder /etc/swift/object.builder set_weight d0 0
d0r1z1-127.0.0.1:6010R127.0.0.1:6010/d1_"" weight set to 0.0
swift@saio:~$ swift-ring-builder /etc/swift/object.builder
/etc/swift/object.builder, build version 5
1024 partitions, 3.000000 replicas, 2 regions, 4 zones, 4 devices, 999.99 balance
The minimum number of hours before a partition can be reassigned is 1
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 127.0.0.1 6010 127.0.0.1 6010 d1 0.00 768 999.99
1 1 2 127.0.0.1 6020 127.0.0.1 6020 d2 1.00 768 -25.00
2 2 3 127.0.0.1 6030 127.0.0.1 6030 d3 1.00 768 -25.00
3 2 4 127.0.0.1 6040 127.0.0.1 6040 d4 1.00 768 -25.00
swift@saio:~$
swift@saio:~$
swift@saio:~$ swift-ring-builder /etc/swift/object.builder rebalance
No partitions could be reassigned.
Either none need to be or none can be due to min_part_hours [1].
swift@saio:~$ swift-ring-builder /etc/swift/object.builder
/etc/swift/object.builder, build version 5
1024 partitions, 3.000000 replicas, 2 regions, 4 zones, 4 devices, 999.99 balance
The minimum number of hours before a partition can be reassigned is 1
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
0 1 1 127.0.0.1 6010 127.0.0.1 6010 d1 0.00 768 999.99
1 1 2 127.0.0.1 6020 127.0.0.1 6020 d2 1.00 768 -25.00
2 2 3 127.0.0.1 6030 127.0.0.1 6030 d3 1.00 768 -25.00
3 2 4 127.0.0.1 6040 127.0.0.1 6040 d4 1.00 768 -25.00
swift@saio:~$ swift-ring-builder /etc/swift/object.builder pretend_min_part_hours_passed
swift@saio:~$
swift@saio:~$ swift-ring-builder /etc/swift/object.builder rebalance
Reassigned 768 (75.00%) partitions. Balance is now 0.00.
swift@saio:~$ swift-ring-builder /etc/swift/object.builder
/etc/swift/object.builder, build version 6
1024 partitions, 3.000000 replicas, 2 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 replication ip replication port name weight partitions balance meta
0 1 1 127.0.0.1 6010 127.0.0.1 6010 d1 0.00 0 0.00
1 1 2 127.0.0.1 6020 127.0.0.1 6020 d2 1.00 1024 0.00
2 2 3 127.0.0.1 6030 127.0.0.1 6030 d3 1.00 1024 0.00
3 2 4 127.0.0.1 6040 127.0.0.1 6040 d4 1.00 1024 0.00
swift@saio:~$ swift-ring-builder /etc/swift/object.builder remove d0
d0r1z1-127.0.0.1:6010R127.0.0.1:6010/d1_"" marked for removal and will be removed next rebalance.
swift@saio:~$
swift@saio:~$ swift-ring-builder /etc/swift/object.builder
/etc/swift/object.builder, build version 7
1024 partitions, 3.000000 replicas, 2 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 replication ip replication port name weight partitions balance meta
0 1 1 127.0.0.1 6010 127.0.0.1 6010 d1 0.00 0 0.00
1 1 2 127.0.0.1 6020 127.0.0.1 6020 d2 1.00 1024 0.00
2 2 3 127.0.0.1 6030 127.0.0.1 6030 d3 1.00 1024 0.00
3 2 4 127.0.0.1 6040 127.0.0.1 6040 d4 1.00 1024 0.00
swift@saio:~$
swift@saio:~$ swift-ring-builder /etc/swift/object.builder rebalance
No partitions could be reassigned.
Either none need to be or none can be due to min_part_hours [1].
swift@saio:~$ swift-ring-builder /etc/swift/object.builder
/etc/swift/object.builder, build version 7
1024 partitions, 3.000000 replicas, 2 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 replication ip replication port name weight partitions balance meta
0 1 1 127.0.0.1 6010 127.0.0.1 6010 d1 0.00 0 0.00
1 1 2 127.0.0.1 6020 127.0.0.1 6020 d2 1.00 1024 0.00
2 2 3 127.0.0.1 6030 127.0.0.1 6030 d3 1.00 1024 0.00
3 2 4 127.0.0.1 6040 127.0.0.1 6040 d4 1.00 1024 0.00
swift@saio:~$ swift-ring-builder /etc/swift/object.builder pretend_min_part_hours_passed
swift@saio:~$ swift-ring-builder /etc/swift/object.builder rebalance
Reassigned 10 (0.98%) partitions. Balance is now 0.00.
swift@saio:~$ swift-ring-builder /etc/swift/object.builder
/etc/swift/object.builder, build version 8
1024 partitions, 3.000000 replicas, 2 regions, 3 zones, 3 devices, 0.00 balance
The minimum number of hours before a partition can be reassigned is 1
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
1 1 2 127.0.0.1 6020 127.0.0.1 6020 d2 1.00 1024 0.00
2 2 3 127.0.0.1 6030 127.0.0.1 6030 d3 1.00 1024 0.00
3 2 4 127.0.0.1 6040 127.0.0.1 6040 d4 1.00 1024 0.00
swift@saio:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment