• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

openstack-r版(rocky)搭建基于centos7.4的openstackswift对象存储服务三

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

openstack-r版(rocky)搭建基于centos7.4 的openstack swift对象存储服务 一

openstack-r版(rocky)搭建基于centos7.4 的openstack swift对象存储服务 二

openstack-r版(rocky)搭建基于centos7.4 的openstack swift对象存储服务 三

openstack-r版(rocky)搭建基于centos7.4 的openstack swift对象存储服务 四

以下操作在控制节点执行controller

##进入/etc/swift目录

cd /etc/swift

##创建基本文件 account

swift-ring-builder account.builder create 10 3 1

##3个节点添加到ring中
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6202 --device sdb --weight 100
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6202 --device sdc --weight 100
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6202 --device sdc --weight 100
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6202 --device sdd --weight 100
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6202 --device sdb --weight 100
swift-ring-builder account.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6202 --device sdc --weight 100
##验证内容
swift-ring-builder account.builder

##重新平衡

swift-ring-builder account.builder rebalance
##创建基本文件 container
swift-ring-builder container.builder create 10 3 1
##3个节点添加到ring中
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6201 --device sdb --weight 100
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6201 --device sdc --weight 100
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6201 --device sdc --weight 100
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6201 --device sdd --weight 100
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6201 --device sdb --weight 100
swift-ring-builder container.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6201 --device sdc --weight 100
##验证内容
swift-ring-builder container.builder
##重新平衡
swift-ring-builder container.builder rebalance

##创建基本文件 object
swift-ring-builder object.builder create 10 3 1
##3个节点添加到ring中
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6200 --device sdb --weight 100
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.51 --port 6200 --device sdc --weight 100
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6200 --device sdc --weight 100
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.52 --port 6200 --device sdd --weight 100
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6200 --device sdb --weight 100
swift-ring-builder object.builder add --region 1 --zone 1 --ip 192.168.2.53 --port 6200 --device sdc --weight 100
##验证内容
swift-ring-builder object.builder
##重新平衡
swift-ring-builder object.builder rebalance

##将 .gz文件发送到3个节点中
scp *.gz compute:/etc/swift/
scp *.gz cinder:/etc/swift/
scp *.gz swift:/etc/swift/
##获取配置文件,配置文件/etc/swift/swift.conf 
curl -o /etc/swift/swift.conf \
  https://git.openstack.org/cgit/openstack/swift/plain/etc/swift.conf-sample?h=stable/rocky
[swift-hash]
...
swift_hash_path_suffix = HASH_PATH_SUFFIX
swift_hash_path_prefix = HASH_PATH_PREFIX

[storage-policy:0]
...
name = Policy-0
default = yes

##将文件发送到其他3节点
scp swift.conf compute:/etc/swift/
scp swift.conf cinder:/etc/swift/
scp swift.conf swift:/etc/swift/
##在所有节点上执行权限操作
chown -R root:swift /etc/swift

##在控制节点执行启动服务命令
systemctl enable openstack-swift-proxy.service memcached.service
systemctl start openstack-swift-proxy.service memcached.service
##在存储节点执行启动服务命令
systemctl enable openstack-swift-account.service openstack-swift-account-auditor.service \
  openstack-swift-account-reaper.service openstack-swift-account-replicator.service

systemctl start openstack-swift-account.service openstack-swift-account-auditor.service \ openstack-swift-account-reaper.service openstack-swift-account-replicator.service
systemctl status openstack-swift-account.service openstack-swift-account-auditor.service  openstack-swift-account-reaper.service openstack-swift-account-replicator.service

systemctl enable openstack-swift-container.service \ openstack-swift-container-auditor.service openstack-swift-container-replicator.service \ openstack-swift-container-updater.service
systemctl start openstack-swift-container.service \ openstack-swift-container-auditor.service openstack-swift-container-replicator.service \ openstack-swift-container-updater.service systemctl status openstack-swift-container.service openstack-swift-container-auditor.service openstack-swift-container-replicator.service openstack-swift-container-updater.service

systemctl enable openstack-swift-object.service openstack-swift-object-auditor.service \ openstack-swift-object-replicator.service openstack-swift-object-updater.service
systemctl start openstack-swift-object.service openstack-swift-object-auditor.service \ openstack-swift-object-replicator.service openstack-swift-object-updater.service
systemctl status openstack-swift-object.service openstack-swift-object-auditor.service openstack-swift-object-replicator.service openstack-swift-object-updater.service



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Swift中基本类型的转换发布时间:2022-07-13
下一篇:
IOS开发从OC到swift入门与修炼 - s9zhao发布时间:2022-07-13
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap