After Deprec

openstack_cloud_computing_cookbook

Issue link: https://read.uberflip.com/i/1334488

Contents of this Issue

Navigation

Page 108 of 317

Installing OpenStack Storage 98 How it works... Creation of the rings is done using the swift-ring-builder command and involves the following steps, repeated for each ring type (Object, Container, and Account): 1. Creating the ring (of type Object, Container, or Account). 2. Assigning a device to the ring. 3. Rebalancing the ring. Creating the ring To create the ring, we use the following syntax: swift-ring-builder builder_file create part_power replicas min_part_hours Creation of the ring specifies a builder file to create three parameters: part_power, replicas, and min_part_hours. This means 2^part_power (18 is used in this instance) is the number of partitions to create, replicas are the number of replicas (3 is used in this case) of the data within the ring, and min_part_hours (1 is specified in this case) is the time in hours before a specific partition can be moved in succession. Assigning a device to the ring To assign a device to a ring, we use the following syntax: swift-ring-builder builder_file add zzone-ip:port/device_name weight Adding a node to the ring specifies the same builder_file created in the first step. We then specify a zone (for example, 1, prefixed with z) that the device will be in, ip (127.0.0.1) is the IP address of the server that the device is in, port (for example, 6010) is the port number that the server is running on, and device_name is the name of the device on the server (for example, sdb1). The weight is a float weight that determines how many partitions are put on the device, relative to the rest of the devices in the cluster. Rebalancing the ring To rebalance the ring, we use the following syntax within the /etc/swift directory: swift-ring-builder builder_file rebalance This command will distribute the partitions across the drives in the ring. The previous process is run for each of the rings: object, container, and account. www.it-ebooks.info

Articles in this issue

Links on this page

Archives of this issue

view archives of After Deprec - openstack_cloud_computing_cookbook