swift扩容

swift扩容有增加node节点的硬盘和增加node节点2种方式。

牡丹ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为成都创新互联公司的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:13518219792(备注:SSL证书合作)期待与您的合作!

本文基于上篇http://fire7758.blog.51cto.com/993821/1374190

一、Node中增加硬盘

如node2中增加硬盘扩容,这里以增加/dev/sdc为例。

1)Node2操作

#parted /dev/sdc mklabel gpt

#parted /dev/sdc mkpart primary 0% 100%

#mkfs.xfs -i size=1024 /dev/sdc1

#mkdir -p /srv/node/sdc1

#echo "/dev/sdc1 /srv/node/sdc1 xfsnoatime,nodiratime,nobarrier,logbufs=8 0 0" >> /etc/fstab

#mount /srv/node/sdc1

#chown -R swift:swift /srv/node/sdc1

2)ProxyNode操作

给Node2添加ring

swift-ring-builder account.builder add z2-192.168.1.228:6002/sdc1100

swift-ring-builder container.builder add z2-192.168.1.228:6001/sdc1100

swift-ring-builder object.builder add z2-192.168.1.228:6000/sdc1100

确认ring内容

swift-ring-builder /etc/swift/account.builder

swift-ring-builder /etc/swift/container.builder

swift-ring-builder /etc/swift/object.builder

       Rebalancethe rings

swift-ring-builder account.builder rebalance

swift-ring-builder container.builder rebalance

swift-ring-builder object.builder rebalance

复制account.ring.gz, container.ring.gz, andobject.ring.gz到其他proxy Node及Storage Node

# scp *.ring.gz swift1:/etc/swift

# scp *.ring.gz swift2:/etc/swift

# scp *.ring.gz swift3:/etc/swift

所有node检查/etc/swift权限,owner修改为swift

#chown -R swift:swift /etc/swift/

二、添加新机器

如增加节点node4

在node4上做如下设置:(上篇的章节)

General Installation Steps for All Nodes

General Installation Steps for All Swift Nodes(includeproxy)

时间同步

修改hosts文件

Swift Storage Node安装步骤

在proxy Node上做如下设置

给node4添加ring

swift-ring-builder account.builder add z3-192.168.1.229:6002/loop100

swift-ring-builder container.builder add z3-192.168.1.229:6001/loop100

swift-ring-builder object.builder add z3-192.168.1.229:6000/loop100

确认ring内容

swift-ring-builder /etc/swift/account.builder

swift-ring-builder /etc/swift/container.builder

swift-ring-builder /etc/swift/object.builder

Rebalancethe rings

swift-ring-builder account.builder rebalance

swift-ring-builder container.builder rebalance

swift-ring-builder object.builder rebalance

复制account.ring.gz, container.ring.gz, andobject.ring.gz到其他proxy Node及Storage Node

# scp *.ring.gz swift1:/etc/swift

# scp *.ring.gz swift2:/etc/swift

# scp *.ring.gz swift3:/etc/swift

# scp *.ring.gz swift4:/etc/swift

所有node检查/etc/swift权限,owner修改为swift

#chown -R swift:swift /etc/swift/

重启动proxy Node

#swift-init proxy restart

启动Node4

#swift-init all start


网站题目:swift扩容
转载注明:http://ybzwz.com/article/jegjpc.html