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

openstackswift节点安装手册3-最后的安装配置及验证

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

以下步骤都在controller节点上执行

1、远程获取/etc/swift/swift.conf文件:

curl -o /etc/swift/swift.conf https://git.openstack.org/cgit/openstack/swift/plain/etc/swift.conf-sample?h=stable/newton

2、修改/etc/swift/swift.conf配置文件:

[swift-hash]
...
swift_hash_path_suffix = HASH_PATH_SUFFIX
swift_hash_path_prefix = HASH_PATH_PREFIX
[storage-policy:0]
name = Policy-0
default = yes
注意:storage-policy:0这个配置项下面只保留上述几行,其他的注释掉

3、把/etc/swift/swift.conf这个文件从controller节点拷贝到每一个swift节点,然后在各个swift节点上执行以下命令:

 chown -R root:swift /etc/swift

4、启动服务:
在controller节点执行:

systemctl enable openstack-swift-proxy.service memcached.service
# systemctl start openstack-swift-proxy.service memcached.service

在swift节点执行:

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 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 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

安装验证:

先给节点赋予权限 chcon -R system_u:object_r:swift_data_t:s0 /srv/node
然后在controller节点执行source /root/demo-openrc.sh ,初始化相关的环境变量
再执行swift stat命令,查看是否有相关信息
执行openstack container create container1查看是否可以创建目录,如果失败,可以查看swift节点上的log。
如果遇到提示说是无权限,在swift节点执行restorecon -R /srv/node命令然后重启服务即可
 



鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
ModuleSystemofSwift(简析Swift的模块系统)发布时间:2022-07-13
下一篇:
Swift:Initialization-2发布时间: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