大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

swift扩容-创新互联

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

创新互联专注于大足企业网站建设,自适应网站建设,商城网站制作。大足网站建设公司,为大足等地区提供建站服务。全流程按需设计网站,专业设计,全程项目跟踪,创新互联专业和态度为您提供的服务

本文基于上篇 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

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网站题目:swift扩容-创新互联
当前链接:http://dzwzjz.com/article/dhiggd.html
在线咨询
服务热线
服务热线:028-86922220
TOP