cda747a94d
As per bug, the swift-ring-builder add command has updated syntax which is simpler than the old syntax. This patch updated instances of this command in the install guide to the new, simpler syntax. Change-Id: I6892589e4209dab5ef34abae57f7e45b83939dc0 Closes-Bug: #1161928
235 lines
14 KiB
XML
235 lines
14 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<section xmlns="http://docbook.org/ns/docbook"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
version="5.0"
|
|
xml:id="swift-initial-rings">
|
|
<title>Create initial rings</title>
|
|
<para>Before starting the Object Storage services, you must create
|
|
the initial account, container, and object rings. The ring builder
|
|
creates configuration files that each node uses to determine and
|
|
deploy the storage architecture. For simplicity, this guide uses one
|
|
region and zone with 2^10 (1024) maximum partitions, 3 replicas of each
|
|
object, and 1 hour minimum time between moving a partition more than
|
|
once. For Object Storage, a partition indicates a directory on a storage
|
|
device rather than a conventional partition table. For more information,
|
|
see the
|
|
<link xlink:href="http://docs.openstack.org/developer/swift/deployment_guide.html"
|
|
>Deployment Guide</link>.</para>
|
|
<section xml:id="swift-initial-rings-account">
|
|
<title>Account ring</title>
|
|
<para>The account server uses the account ring to maintain lists
|
|
of containers.</para>
|
|
<procedure>
|
|
<title>To create the ring</title>
|
|
<note>
|
|
<para>Perform these steps on the controller node.</para>
|
|
</note>
|
|
<step>
|
|
<para>Change to the <literal>/etc/swift</literal> directory.</para>
|
|
</step>
|
|
<step>
|
|
<para>Create the base <filename>account.builder</filename> file:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder create 10 3 1</userinput></screen>
|
|
<note>
|
|
<para>This command provides no output.</para>
|
|
</note>
|
|
</step>
|
|
<step>
|
|
<para>Add each storage node to the ring:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder \
|
|
add --region 1 --zone 1 --ip <replaceable>STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable> --port 6002 \
|
|
--device <replaceable>DEVICE_NAME</replaceable> --weight <replaceable>DEVICE_WEIGHT</replaceable></userinput></screen>
|
|
<para>Replace
|
|
<replaceable>STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable>
|
|
with the IP address of the management network on the storage node.
|
|
Replace <replaceable>DEVICE_NAME</replaceable> with a storage
|
|
device name on the same storage node. For example, using the first
|
|
storage node in
|
|
<xref linkend="swift-install-storage-node"/> with the
|
|
<literal>/dev/sdb1</literal> storage device and weight of 100:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder add \
|
|
--region 1 --zone 1 --ip 10.0.0.51 --port 6002 --device sdb1 --weight 100</userinput></screen>
|
|
<para>Repeat this command for each storage device on each storage
|
|
node. In the example architecture, use the command in four variations:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder add \
|
|
--region 1 --zone 1 --ip 10.0.0.51 --port 6002 --device sdb1 --weight 100</userinput>
|
|
<computeroutput>Device d0r1z1-10.0.0.51:6002R10.0.0.51:6002/sdb1_"" with 100.0 weight got id 0</computeroutput>
|
|
<prompt>#</prompt> <userinput>swift-ring-builder account.builder add \
|
|
--region 1 --zone 2 --ip 10.0.0.51 --port 6002 --device sdc1 --weight 100</userinput>
|
|
<computeroutput>Device d1r1z2-10.0.0.51:6002R10.0.0.51:6002/sdc1_"" with 100.0 weight got id 1</computeroutput>
|
|
<prompt>#</prompt> <userinput>swift-ring-builder account.builder add \
|
|
--region 1 --zone 3 --ip 10.0.0.52 --port 6002 --device sdb1 --weight 100</userinput>
|
|
<computeroutput>Device d2r1z3-10.0.0.52:6002R10.0.0.52:6002/sdb1_"" with 100.0 weight got id 2</computeroutput>
|
|
<prompt>#</prompt> <userinput>swift-ring-builder account.builder add \
|
|
--region 1 --zone 4 --ip 10.0.0.52 --port 6002 --device sdc1 --weight 100</userinput>
|
|
<computeroutput>Device d3r1z4-10.0.0.52:6002R10.0.0.52:6002/sdc1_"" with 100.0 weight got id 3</computeroutput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Verify the ring contents:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder</userinput>
|
|
<computeroutput>account.builder, build version 4
|
|
1024 partitions, 3.000000 replicas, 1 regions, 4 zones, 4 devices, 100.00 balance, 0.00 dispersion
|
|
The minimum number of hours before a partition can be reassigned is 1
|
|
The overload factor is 0.00% (0.000000)
|
|
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
|
|
0 1 1 10.0.0.51 6002 10.0.0.51 6002 sdb1 100.00 0 -100.00
|
|
1 1 2 10.0.0.51 6002 10.0.0.51 6002 sdc1 100.00 0 -100.00
|
|
2 1 3 10.0.0.52 6002 10.0.0.52 6002 sdb1 100.00 0 -100.00
|
|
3 1 4 10.0.0.52 6002 10.0.0.52 6002 sdc1 100.00 0 -100.00</computeroutput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Rebalance the ring:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder account.builder rebalance</userinput>
|
|
<computeroutput>Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00</computeroutput></screen>
|
|
</step>
|
|
</procedure>
|
|
</section>
|
|
<section xml:id="swift-initial-rings-container">
|
|
<title>Container ring</title>
|
|
<para>The container server uses the container ring to maintain lists
|
|
of objects. However, it does not track object locations.</para>
|
|
<procedure>
|
|
<title>To create the ring</title>
|
|
<note>
|
|
<para>Perform these steps on the controller node.</para>
|
|
</note>
|
|
<step>
|
|
<para>Change to the <literal>/etc/swift</literal> directory.</para>
|
|
</step>
|
|
<step>
|
|
<para>Create the base <filename>container.builder</filename>
|
|
file:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder create 10 3 1</userinput></screen>
|
|
<note>
|
|
<para>This command provides no output.</para>
|
|
</note>
|
|
</step>
|
|
<step>
|
|
<para>Add each storage node to the ring:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder \
|
|
add --region 1 --zone 1 --ip <replaceable>STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable> --port 6001 \
|
|
--device <replaceable>DEVICE_NAME</replaceable> --weight <replaceable>DEVICE_WEIGHT</replaceable></userinput></screen>
|
|
<para>Replace
|
|
<replaceable>STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable>
|
|
with the IP address of the management network on the storage node.
|
|
Replace <replaceable>DEVICE_NAME</replaceable> with a storage
|
|
device name on the same storage node. For example, using the first
|
|
storage node in
|
|
<xref linkend="swift-install-storage-node"/> with the
|
|
<literal>/dev/sdb1</literal> storage device and weight of 100:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder add \
|
|
--region 1 --zone 1 --ip 10.0.0.51 --port 6001 --device sdb1 --weight 100</userinput></screen>
|
|
<para>Repeat this command for each storage device on each storage
|
|
node. In the example architecture, use the command in four variations:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder add \
|
|
--region 1 --zone 1 --ip 10.0.0.51 --port 6001 --device sdb1 --weight 100</userinput>
|
|
<computeroutput>Device d0r1z1-10.0.0.51:6001R10.0.0.51:6001/sdb1_"" with 100.0 weight got id 0</computeroutput>
|
|
<prompt>#</prompt> <userinput>swift-ring-builder container.builder add \
|
|
--region 1 --zone 2 --ip 10.0.0.51 --port 6001 --device sdc1 --weight 100</userinput>
|
|
<computeroutput>Device d1r1z2-10.0.0.51:6001R10.0.0.51:6001/sdc1_"" with 100.0 weight got id 1</computeroutput>
|
|
<prompt>#</prompt> <userinput>swift-ring-builder container.builder add \
|
|
--region 1 --zone 3 --ip 10.0.0.52 --port 6001 --device sdb1 --weight 100</userinput>
|
|
<computeroutput>Device d2r1z3-10.0.0.52:6001R10.0.0.52:6001/sdb1_"" with 100.0 weight got id 2</computeroutput>
|
|
<prompt>#</prompt> <userinput>swift-ring-builder container.builder add \
|
|
--region 1 --zone 4 --ip 10.0.0.52 --port 6001 --device sdc1 --weight 100</userinput>
|
|
<computeroutput>Device d3r1z4-10.0.0.52:6001R10.0.0.52:6001/sdc1_"" with 100.0 weight got id 3</computeroutput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Verify the ring contents:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder</userinput>
|
|
<computeroutput>container.builder, build version 4
|
|
1024 partitions, 3.000000 replicas, 1 regions, 4 zones, 4 devices, 100.00 balance, 0.00 dispersion
|
|
The minimum number of hours before a partition can be reassigned is 1
|
|
The overload factor is 0.00% (0.000000)
|
|
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
|
|
0 1 1 10.0.0.51 6001 10.0.0.51 6001 sdb1 100.00 0 -100.00
|
|
1 1 2 10.0.0.51 6001 10.0.0.51 6001 sdc1 100.00 0 -100.00
|
|
2 1 3 10.0.0.52 6001 10.0.0.52 6001 sdb1 100.00 0 -100.00
|
|
3 1 4 10.0.0.52 6001 10.0.0.52 6001 sdc1 100.00 0 -100.00</computeroutput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Rebalance the ring:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder container.builder rebalance</userinput>
|
|
<computeroutput>Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00</computeroutput></screen>
|
|
</step>
|
|
</procedure>
|
|
</section>
|
|
<section xml:id="swift-initial-rings-object">
|
|
<title>Object ring</title>
|
|
<para>The object server uses the object ring to maintain lists
|
|
of object locations on local devices.</para>
|
|
<procedure>
|
|
<title>To create the ring</title>
|
|
<note>
|
|
<para>Perform these steps on the controller node.</para>
|
|
</note>
|
|
<step>
|
|
<para>Change to the <literal>/etc/swift</literal> directory.</para>
|
|
</step>
|
|
<step>
|
|
<para>Create the base <filename>object.builder</filename> file:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder create 10 3 1</userinput></screen>
|
|
<note>
|
|
<para>This command provides no output.</para>
|
|
</note>
|
|
</step>
|
|
<step>
|
|
<para>Add each storage node to the ring:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder \
|
|
add --region 1 --zone 1 --ip <replaceable>STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable> --port 6000 /
|
|
--device <replaceable>DEVICE_NAME</replaceable> --weight <replaceable>DEVICE_WEIGHT</replaceable></userinput></screen>
|
|
<para>Replace
|
|
<replaceable>STORAGE_NODE_MANAGEMENT_INTERFACE_IP_ADDRESS</replaceable>
|
|
with the IP address of the management network on the storage node.
|
|
Replace <replaceable>DEVICE_NAME</replaceable> with a storage
|
|
device name on the same storage node. For example, using the first
|
|
storage node in
|
|
<xref linkend="swift-install-storage-node"/> with the
|
|
<literal>/dev/sdb1</literal> storage device and weight of 100:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder add r1z1-10.0.0.51:6000/sdb1 100</userinput></screen>
|
|
<para>Repeat this command for each storage device on each storage
|
|
node. In the example architecture, use the command in four variations:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder add \
|
|
--region 1 --zone 1 --ip 10.0.0.51 --port 6000 --device sdb1 --weight 100</userinput>
|
|
<computeroutput>Device d0r1z1-10.0.0.51:6000R10.0.0.51:6000/sdb1_"" with 100.0 weight got id 0</computeroutput>
|
|
<prompt>#</prompt> <userinput>swift-ring-builder object.builder add \
|
|
--region 1 --zone 2 --ip 10.0.0.51 --port 6000 --device sdc1 --weight 100</userinput>
|
|
<computeroutput>Device d1r1z2-10.0.0.51:6000R10.0.0.51:6000/sdc1_"" with 100.0 weight got id 1</computeroutput>
|
|
<prompt>#</prompt> <userinput>swift-ring-builder object.builder add \
|
|
--region 1 --zone 3 --ip 10.0.0.52 --port 6000 --device sdb1 --weight 100</userinput>
|
|
<computeroutput>Device d2r1z3-10.0.0.52:6000R10.0.0.52:6000/sdb1_"" with 100.0 weight got id 2</computeroutput>
|
|
<prompt>#</prompt> <userinput>swift-ring-builder object.builder add \
|
|
--region 1 --zone 4 --ip 10.0.0.52 --port 6000 --device sdc1 --weight 100</userinput>
|
|
<computeroutput>Device d3r1z4-10.0.0.52:6000R10.0.0.52:6000/sdc1_"" with 100.0 weight got id 3</computeroutput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Verify the ring contents:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder</userinput>
|
|
<computeroutput>object.builder, build version 4
|
|
1024 partitions, 3.000000 replicas, 1 regions, 4 zones, 4 devices, 100.00 balance, 0.00 dispersion
|
|
The minimum number of hours before a partition can be reassigned is 1
|
|
The overload factor is 0.00% (0.000000)
|
|
Devices: id region zone ip address port replication ip replication port name weight partitions balance meta
|
|
0 1 1 10.0.0.51 6000 10.0.0.51 6000 sdb1 100.00 0 -100.00
|
|
1 1 2 10.0.0.51 6000 10.0.0.51 6000 sdc1 100.00 0 -100.00
|
|
2 1 3 10.0.0.52 6000 10.0.0.52 6000 sdb1 100.00 0 -100.00
|
|
3 1 4 10.0.0.52 6000 10.0.0.52 6000 sdc1 100.00 0 -100.00</computeroutput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Rebalance the ring:</para>
|
|
<screen><prompt>#</prompt> <userinput>swift-ring-builder object.builder rebalance</userinput>
|
|
<computeroutput>Reassigned 1024 (100.00%) partitions. Balance is now 0.00. Dispersion is now 0.00</computeroutput></screen>
|
|
</step>
|
|
</procedure>
|
|
</section>
|
|
<section xml:id="swift-initial-rings-distribute">
|
|
<title>Distribute ring configuration files</title>
|
|
<para>Copy the <filename>account.ring.gz</filename>,
|
|
<filename>container.ring.gz</filename>, and
|
|
<filename>object.ring.gz</filename> files to the
|
|
<literal>/etc/swift</literal> directory on each storage node and
|
|
any additional nodes running the proxy service.</para>
|
|
</section>
|
|
</section>
|