您好,登錄后才能下訂單哦!
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
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。