Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to smoothly add / remove Storage in Swift capacity Management in SwiftStack

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

Editor to share with you how to smoothly add / delete storage in Swift capacity management in SwiftStack. I hope you will gain something after reading this article. Let's discuss it together.

Swift Capacity Management in SwiftStack is the capacity management of Swift, when in Swift server cluster

When deleting or adding storage, what should be done so that the system can make a smooth transition without causing the service after the delete or add storage operation

The emergence of the device takes up a lot of Ibank O as well as the problem of bandwidth and CPU resources.

Add Storage:

Add storage at one time-stupid practice:

If you add 3TB's hard disk storage when running Swift, the name is d16 and the node is 192.168.12.104

Then you need to add storage to ring.

$swift-ring-builder account.builder add Z1-192.168.12.104:6002/d16 3000

$swift-ring-builder container.builder add Z1-192.168.12.104:6001/d16 3000

$swift-ring-builder object.builder add Z1-192.168.12.104:6000/d16 3000

3000 is the weight stored in ring (weight), so it is convenient to use the capacity of storage (GB as a unit) as the weight.

Rebalance ring and retransmit all new ring.gz to other storage servers

$swift-ring-builder account.builder rebalance

$swift-ring-builder container.builder rebalance

$swift-ring-builder object.builder rebalance

Swift implemented the changes to ring, but can everyone really be happy?

Wrong! In doing so, the performance of the cluster will degrade sharply. Adding 3TB storage immediately will cause a large amount of data to be transferred in the cluster.

Rebalance ring means that each storage device has an equal load (according to weight). If there are 1.5T data in the cluster, it will be transferred to the new device.

That will cause 10GB's Ethernet card to reach 100% utilization in the next 20 minutes. The performance of the whole system will be terrible in a few hours.

Add storage smoothly-a smart thing to do:

When adding storage, start the weight from small: 3000-"25

$swift-ring-builder account.builder add Z1-192.168.12.104:6002/d16 25

$swift-ring-builder container.builder add Z1-192.168.12.104:6001/d16 25

$swift-ring-builder object.builder add Z1-192.168.12.104:6000/d16 25

$scp account.ring.gz swift-node-1:/etc/swift/account.ring.gz

$scp container.ring.gz swift-node-1:/etc/swift/container.ring.gz

$scp account.ring.gz swift-node-1:/etc/swift/account.ring.gz

$scp account.ring.gz swift-node-2:/etc/swift/account.ring.gz

$scp container.ring.gz swift-node-2:/etc/swift/container.ring.gz

$scp account.ring.gz swift-node-2:/etc/swift/account.ring.gz...

Rebalance ring and transfer the ring.gz file to all storage servers in the cluster

$swift-ring-builder account.builder rebalance

$swift-ring-builder container.builder rebalance

$swift-ring-builder object.builder rebalance

$scp account.ring.gz swift-node-1:/etc/swift/account.ring.gz

$scp container.ring.gz swift-node-1:/etc/swift/container.ring.gz

$scp account.ring.gz swift-node-1:/etc/swift/account.ring.gz

$scp account.ring.gz swift-node-2:/etc/swift/account.ring.gz

$scp container.ring.gz swift-node-2:/etc/swift/container.ring.gz

$scp account.ring.gz swift-node-2:/etc/swift/account.ring.gz...

After waiting for a period of time (say an hour) to reset the weight of the storage (25-> 50), reblance ring, and then transfer the ring.gz to all storage servers in the cluster

$swift-ring-builder account.builder set_weight Z1-192.168.12.104:6002/d16 50

$swift-ring-builder container.builder set_weight Z1-192.168.12.104:6001/d16 50

$swift-ring-builder object.builder set_weight Z1-192.168.12.104:6000/d16 50

$swift-ring-builder account.builder rebalance

$swift-ring-builder container.builder rebalance

$swift-ring-builder object.builder rebalance

$scp account.ring.gz...

Repeat until 120 hours later, the weight is 3000, and the device addition is considered a success.

Of course, you can write through the script to omit a large number of repeated steps!

Delete Stora

In the same way as adding storage, gradually reduce the weight of the storage and repeat the steps every hour or fixed time until the weight becomes 0.

At this time, the storage to be deleted can be removed from the server.

After reading this article, I believe you have a certain understanding of "how to smoothly add / remove storage in Swift capacity management in SwiftStack". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report