merged with trunk
This commit is contained in:
@@ -111,28 +111,28 @@ SEARCH_VALUE_HELP = '''
|
|||||||
'''.strip()
|
'''.strip()
|
||||||
|
|
||||||
CREATE_HELP = '''
|
CREATE_HELP = '''
|
||||||
ring_builder <builder_file> create <part_power> <replicas> <min_part_hours>
|
swift-ring-builder <builder_file> create <part_power> <replicas> <min_part_hours>
|
||||||
Creates <builder_file> with 2^<part_power> partitions and <replicas>.
|
Creates <builder_file> with 2^<part_power> partitions and <replicas>.
|
||||||
<min_part_hours> is number of hours to restrict moving a partition more
|
<min_part_hours> is number of hours to restrict moving a partition more
|
||||||
than once.
|
than once.
|
||||||
'''.strip()
|
'''.strip()
|
||||||
|
|
||||||
SEARCH_HELP = '''
|
SEARCH_HELP = '''
|
||||||
ring_builder <builder_file> search <search-value>
|
swift-ring-builder <builder_file> search <search-value>
|
||||||
Shows information about matching devices.
|
Shows information about matching devices.
|
||||||
|
|
||||||
%(SEARCH_VALUE_HELP)s
|
%(SEARCH_VALUE_HELP)s
|
||||||
'''.strip() % globals()
|
'''.strip() % globals()
|
||||||
|
|
||||||
ADD_HELP = '''
|
ADD_HELP = '''
|
||||||
ring_builder <builder_file> add z<zone>-<ip>:<port>/<device_name>_<meta> <wght>
|
swift-ring-builder <builder_file> add z<zone>-<ip>:<port>/<device_name>_<meta> <wght>
|
||||||
Adds a device to the ring with the given information. No partitions will be
|
Adds a device to the ring with the given information. No partitions will be
|
||||||
assigned to the new device until after running 'rebalance'. This is so you
|
assigned to the new device until after running 'rebalance'. This is so you
|
||||||
can make multiple device changes and rebalance them all just once.
|
can make multiple device changes and rebalance them all just once.
|
||||||
'''.strip()
|
'''.strip()
|
||||||
|
|
||||||
SET_WEIGHT_HELP = '''
|
SET_WEIGHT_HELP = '''
|
||||||
ring_builder <builder_file> set_weight <search-value> <weight>
|
swift-ring-builder <builder_file> set_weight <search-value> <weight>
|
||||||
Resets the device's weight. No partitions will be reassigned to or from the
|
Resets the device's weight. No partitions will be reassigned to or from the
|
||||||
device until after running 'rebalance'. This is so you can make multiple
|
device until after running 'rebalance'. This is so you can make multiple
|
||||||
device changes and rebalance them all just once.
|
device changes and rebalance them all just once.
|
||||||
@@ -141,7 +141,7 @@ ring_builder <builder_file> set_weight <search-value> <weight>
|
|||||||
'''.strip() % globals()
|
'''.strip() % globals()
|
||||||
|
|
||||||
SET_INFO_HELP = '''
|
SET_INFO_HELP = '''
|
||||||
ring_builder <builder_file> set_info <search-value>
|
swift-ring-builder <builder_file> set_info <search-value>
|
||||||
<ip>:<port>/<device_name>_<meta>
|
<ip>:<port>/<device_name>_<meta>
|
||||||
Resets the device's information. This information isn't used to assign
|
Resets the device's information. This information isn't used to assign
|
||||||
partitions, so you can use 'write_ring' afterward to rewrite the current
|
partitions, so you can use 'write_ring' afterward to rewrite the current
|
||||||
@@ -154,7 +154,7 @@ ring_builder <builder_file> set_info <search-value>
|
|||||||
'''.strip() % globals()
|
'''.strip() % globals()
|
||||||
|
|
||||||
REMOVE_HELP = '''
|
REMOVE_HELP = '''
|
||||||
ring_builder <builder_file> remove <search-value>
|
swift-ring-builder <builder_file> remove <search-value>
|
||||||
Removes the device(s) from the ring. This should normally just be used for
|
Removes the device(s) from the ring. This should normally just be used for
|
||||||
a device that has failed. For a device you wish to decommission, it's best
|
a device that has failed. For a device you wish to decommission, it's best
|
||||||
to set its weight to 0, wait for it to drain all its data, then use this
|
to set its weight to 0, wait for it to drain all its data, then use this
|
||||||
@@ -166,7 +166,7 @@ ring_builder <builder_file> remove <search-value>
|
|||||||
'''.strip() % globals()
|
'''.strip() % globals()
|
||||||
|
|
||||||
SET_MIN_PART_HOURS_HELP = '''
|
SET_MIN_PART_HOURS_HELP = '''
|
||||||
ring_builder <builder_file> set_min_part_hours <hours>
|
swift-ring-builder <builder_file> set_min_part_hours <hours>
|
||||||
Changes the <min_part_hours> to the given <hours>. This should be set to
|
Changes the <min_part_hours> to the given <hours>. This should be set to
|
||||||
however long a full replication/update cycle takes. We're working on a way
|
however long a full replication/update cycle takes. We're working on a way
|
||||||
to determine this more easily than scanning logs.
|
to determine this more easily than scanning logs.
|
||||||
@@ -176,11 +176,11 @@ ring_builder <builder_file> set_min_part_hours <hours>
|
|||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if len(argv) < 2:
|
if len(argv) < 2:
|
||||||
print '''
|
print '''
|
||||||
ring_builder %(MAJOR_VERSION)s.%(MINOR_VERSION)s
|
swift-ring-builder %(MAJOR_VERSION)s.%(MINOR_VERSION)s
|
||||||
|
|
||||||
%(CREATE_HELP)s
|
%(CREATE_HELP)s
|
||||||
|
|
||||||
ring_builder <builder_file>
|
swift-ring-builder <builder_file>
|
||||||
Shows information about the ring and the devices within.
|
Shows information about the ring and the devices within.
|
||||||
|
|
||||||
%(SEARCH_HELP)s
|
%(SEARCH_HELP)s
|
||||||
@@ -193,14 +193,14 @@ ring_builder <builder_file>
|
|||||||
|
|
||||||
%(REMOVE_HELP)s
|
%(REMOVE_HELP)s
|
||||||
|
|
||||||
ring_builder <builder_file> rebalance
|
swift-ring-builder <builder_file> rebalance
|
||||||
Attempts to rebalance the ring by reassigning partitions that haven't been
|
Attempts to rebalance the ring by reassigning partitions that haven't been
|
||||||
recently reassigned.
|
recently reassigned.
|
||||||
|
|
||||||
ring_builder <builder_file> validate
|
swift-ring-builder <builder_file> validate
|
||||||
Just runs the validation routines on the ring.
|
Just runs the validation routines on the ring.
|
||||||
|
|
||||||
ring_builder <builder_file> write_ring
|
swift-ring-builder <builder_file> write_ring
|
||||||
Just rewrites the distributable ring file. This is done automatically after
|
Just rewrites the distributable ring file. This is done automatically after
|
||||||
a successful rebalance, so really this is only useful after one or more
|
a successful rebalance, so really this is only useful after one or more
|
||||||
'set_info' calls when no rebalance is needed but you want to send out the
|
'set_info' calls when no rebalance is needed but you want to send out the
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ by number, beginning with 1.
|
|||||||
|
|
||||||
You can now start building the ring with::
|
You can now start building the ring with::
|
||||||
|
|
||||||
swift-ring_builder <builder_file> create <part_power> <replicas> <min_part_hours>
|
swift-ring-builder <builder_file> create <part_power> <replicas> <min_part_hours>
|
||||||
|
|
||||||
This will start the ring build process creating the <builder_file> with
|
This will start the ring build process creating the <builder_file> with
|
||||||
2^<part_power> partitions. <min_part_hours> is the time in hours before a
|
2^<part_power> partitions. <min_part_hours> is the time in hours before a
|
||||||
@@ -100,7 +100,7 @@ specific partition can be moved in succession (24 is a good value for this).
|
|||||||
|
|
||||||
Devices can be added to the ring with::
|
Devices can be added to the ring with::
|
||||||
|
|
||||||
swift-ring_builder <builder_file> add z<zone>-<ip>:<port>/<device_name>_<meta> <weight>
|
swift-ring-builder <builder_file> add z<zone>-<ip>:<port>/<device_name>_<meta> <weight>
|
||||||
|
|
||||||
This will add a device to the ring where <builder_file> is the name of the
|
This will add a device to the ring where <builder_file> is the name of the
|
||||||
builder file that was created previously, <zone> is the number of the zone
|
builder file that was created previously, <zone> is the number of the zone
|
||||||
@@ -114,7 +114,7 @@ Add each device that will be initially in the cluster.
|
|||||||
|
|
||||||
Once all of the devices are added to the ring, run::
|
Once all of the devices are added to the ring, run::
|
||||||
|
|
||||||
swift_ring_builder <builder_file> rebalance
|
swift-ring-builder <builder_file> rebalance
|
||||||
|
|
||||||
This will distribute the partitions across the drives in the ring. It is
|
This will distribute the partitions across the drives in the ring. It is
|
||||||
important whenever making changes to the ring to make all the changes
|
important whenever making changes to the ring to make all the changes
|
||||||
@@ -126,7 +126,7 @@ The above process should be done to make a ring for each storage serivce
|
|||||||
changes to the ring, so it is very important that these be kept and backed up.
|
changes to the ring, so it is very important that these be kept and backed up.
|
||||||
The resulting .tar.gz ring file should be pushed to all of the servers in the
|
The resulting .tar.gz ring file should be pushed to all of the servers in the
|
||||||
cluster. For more information about building rings, running
|
cluster. For more information about building rings, running
|
||||||
swift_ring_builder with no options will display help text with available
|
swift-ring-builder with no options will display help text with available
|
||||||
commands and options. More information on how the ring works internally
|
commands and options. More information on how the ring works internally
|
||||||
can be found in the :doc:`Ring Overview <overview_ring>`.
|
can be found in the :doc:`Ring Overview <overview_ring>`.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user