Swift distributed storage adds storage nodes

Source: Internet
Author: User

Swift distributed storage add node requires new node information to be added to the ring record


1, add two nodes in the ring information

[Email protected]:/etc/swift> Export zone=4

[Email protected]:/etc/swift> Export storage_local_net_ip=192.168.1.215

[Email protected]:/etc/swift> Export weight=100

[Email protected]:/etc/swift> Export DEVICE=SDB1


[Email protected]:/etc/swift> sudo swift-ring-builder account.builder add z$zone-$STORAGE _local_net_ip:6002/$ DEVICE $WEIGHT


[Email protected]:/etc/swift> sudo swift-ring-builder container.builder add z$zone-$STORAGE _local_net_ip:6001/$ DEVICE $WEIGHT


[Email protected]:/etc/swift> sudo swift-ring-builder object.builder add z$zone-$STORAGE _local_net_ip:6000/$ DEVICE $WEIGHT


[Email protected]:/etc/swift> Export zone=5

[Email protected]:/etc/swift> Export storage_local_net_ip=192.168.1.216


[Email protected]:/etc/swift> sudo swift-ring-builder account.builder add z$zone-$STORAGE _local_net_ip:6002/$ DEVICE $WEIGHT


[Email protected]:/etc/swift> sudo swift-ring-builder container.builder add z$zone-$STORAGE _local_net_ip:6001/$ DEVICE $WEIGHT


[Email protected]:/etc/swift> sudo swift-ring-builder object.builder add z$zone-$STORAGE _local_net_ip:6000/$ DEVICE $WEIGHT


View the ring information

[Email protected]:/etc/swift> sudo swift-ring-builder account.builder

Account.builder, build version 38

262144 partitions, 3.000000 replicas, 1 regions, 5 zones, 5 devices, 100.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 m Eta

1 1 192.168.1.212 6002 192.168.1.212 6002 sdb1 100.00 262144 66.67

1 2 192.168.1.213 6002 192.168.1.213 6002 sdb1 100.00 262144 66.67

1 3 192.168.1.214 6002 192.168.1.214 6002 sdb1 100.00 262144 66.67

1 4 192.168.1.215 6002 192.168.1.215 6002 sdb1 100.00 0-100.00

1 5 192.168.1.216 6002 192.168.1.216 6002 sdb1 100.00 0-100.00


[Email protected]:/etc/swift> sudo swift-ring-builder container.builder

Container.builder, build version 13

262144 partitions, 3.000000 replicas, 1 regions, 5 zones, 5 devices, 100.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 m Eta

3 1 1 192.168.1.212 6001 192.168.1.212 6001 sdb1 100.00 262144 66.67

4 1 2 192.168.1.213 6001 192.168.1.213 6001 sdb1 100.00 262144 66.67

5 1 3 192.168.1.214 6001 192.168.1.214 6001 sdb1 100.00 262144 66.67

6 1 4 192.168.1.215 6001 192.168.1.215 6001 sdb1 100.00 0-100.00

7 1 5 192.168.1.216 6001 192.168.1.216 6001 sdb1 100.00 0-100.00


[Email protected]:/etc/swift> sudo swift-ring-builder object.builder

Object.builder, build version 13

262144 partitions, 3.000000 replicas, 1 regions, 5 zones, 5 devices, 100.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 m Eta

3 1 1 192.168.1.212 6000 192.168.1.212 6000 sdb1 100.00 262144 66.67

4 1 2 192.168.1.213 6000 192.168.1.213 6000 sdb1 100.00 262144 66.67

5 1 3 192.168.1.214 6000 192.168.1.214 6000 sdb1 100.00 262144 66.67

6 1 4 192.168.1.215 6000 192.168.1.215 6000 sdb1 100.00 0-100.00

7 1 5 192.168.1.216 6000 192.168.1.216 6000 sdb1 100.00 0-100.00


2. Balance Ring

[Email protected]:/etc/swift> sudo swift-ring-builder account.builder rebalance

Reassigned 262144 (100.00%) partitions. Balance is now 16.67.

-------------------------------------------------------------------------------

Note:balance of 16.67 indicates you should push this

Ring, wait at least 1 hours, and Rebalance/repush.

-------------------------------------------------------------------------------


[Email protected]:/etc/swift> sudo swift-ring-builder container.builder rebalance

Reassigned 262144 (100.00%) partitions. Balance is now 16.67.

-------------------------------------------------------------------------------

Note:balance of 16.67 indicates you should push this

Ring, wait at least 1 hours, and Rebalance/repush.

-------------------------------------------------------------------------------


[Email protected]:/etc/swift> sudo swift-ring-builder object.builder rebalance

Reassigned 262144 (100.00%) partitions. Balance is now 16.67.

-------------------------------------------------------------------------------

Note:balance of 16.67 indicates you should push this

Ring, wait at least 1 hours, and Rebalance/repush.

-------------------------------------------------------------------------------


[Email protected]:/etc/swift> sudo chown swift:swift *


Copy the ring file to all storage nodes


3. Configure the added storage node

Refer to previous articles configuring configuration 215 and 216, noting permissions for directories and files


Start Services 215 and 216


Then remember the other node restart service


Proxy node

[Email protected]:/etc/swift> sudo swift-init proxy restart

Signal Proxy-server pid:23568 signal:15

Proxy-server (23568) appears to has stopped

Starting proxy-server ... (/etc/swift/proxy-server.conf)


Storage node

# Swift-init All restart


Attention

server5:/# Chown-r SWIFT:SWIFT/SRV/NODE/SDB1

server6:/# Chown-r SWIFT:SWIFT/SRV/NODE/SDB1


Data on the first three storage nodes

[Email protected]:/srv/node/sdb1> du-sh *

16K accounts

356M async_pending

129M containers

5.0G objects

0 tmp


Data distribution After adding the next two storage nodes

[Email protected]:/srv/node/sdb1> du-sh *

16K accounts

197M async_pending

129M containers

2.5G objects

0 tmp


[Email protected]:/srv/node/sdb1> du-sh *

16K accounts

175M async_pending

129M containers

2.5G objects

0 tmp


[Email protected]:/srv/node/sdb1> du-sh *

0 accounts

244M async_pending

129M containers

3.0G objects

0 tmp


SERVER5:/SRV/NODE/SDB1 # Du-sh *

68M containers

2.7G objects

0 tmp


SERVER6:/SRV/NODE/SDB1 # Du-sh *

16K accounts

32K containers

2.8G objects

0 tmp



This article is from the "Xiaoxiaozhou" blog, make sure to keep this source http://xiaoxiaozhou.blog.51cto.com/4681537/1918648

Swift distributed storage adds storage nodes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.