美文网首页Ceph
Ceph多数据中心(容灾)

Ceph多数据中心(容灾)

作者: 习惯了沉默乄 | 来源:发表于2020-04-17 14:25 被阅读0次
# A集群操作
# 创建realm
docker exec mon radosgw-admin realm create --rgw-realm=earth –default
# 删除默认zonegroup
docker exec mon radosgw-admin zonegroup delete --rgw-zonegroup=default
# 创建zonegroup
docker exec mon radosgw-admin zonegroup create --rgw-zonegroup=chian --endpoints=http://10.36.3.113:8080 --rgw-realm=earth --master –default
# 删除默认zone
docker exec mon radosgw-admin zone delete --rgw-zone=default
# 创建zone
docker exec mon radosgw-admin zone create --rgw-zonegroup=china --rgw-zone=huabei --master --default --endpoints=http://10.36.3.113:8080
# 创建系统用户
docker exec mon radosgw-admin user create --uid="synchronization-user" --display-name="Synchronization User" –system
"keys": [
        {
            "user": "synchronization-user",
            "access_key": "WCR8GIZBL38KW5SYIX6N",
            "secret_key": "8OJGJl5LUVNZfQBtErMpmYVXIkiZBboceUlULXQT"
        }
]
# 将系统用户添加到zone
docker exec mon radosgw-admin zone modify --rgw-zone=huabei --access-key=WCR8GIZBL38KW5SYIX6N --secret=8OJGJl5LUVNZfQBtErMpmYVXIkiZBboceUlULXQT
# 更新period
docker exec mon radosgw-admin period update –commit
# 更新ceph配置文件(添加以下内容到ceph.conf)
[client.rgw.localhost]
host = 10.36.3.113
rgw frontends = "civetweb port=8080"
rgw_zone=huabei
# 重启rgw
docker restart rgw

# B集群操作
# 拉取realm配置
docker exec mon radosgw-admin realm pull --url=10.36.3.113:8080 --access-key=WCR8GIZBL38KW5SYIX6N --secret=8OJGJl5LUVNZfQBtErMpmYVXIkiZBboceUlULXQT
# 创建zone
docker exec mon radosgw-admin zone create --rgw-zonegroup=china  --rgw-zone=huadong --access-key=WCR8GIZBL38KW5SYIX6N --secret=8OJGJl5LUVNZfQBtErMpmYVXIkiZBboceUlULXQT --endpoints=http://10.36.3.118:8080
# 更新ceph配置文件(添加以下内容到ceph.conf)
[client.rgw.localhost]
host = 10.36.3.118
rgw frontends = "civetweb port=8080"
rgw_zone=huadong
# 更新period
docker exec mon radosgw-admin period update –commit
# 重启rgw
docker restart rgw
# 查看同步状态
[root@localhost ~]# docker exec mon radosgw-admin sync status
          realm 9bdae7af-607c-4971-806b-46b893a3d64e (earth)
      zonegroup 71196f2b-1553-4395-9be9-9b0cb067af85 (china)
           zone f789a036-ee6b-423d-b1b1-5fbc1d36837a (huadong)
  metadata sync syncing
                full sync: 0/64 shards
                incremental sync: 64/64 shards
                metadata is caught up with master
      data sync source: 31670021-85a9-407e-9925-750a7422cad7 (huabei)
                        syncing
                        full sync: 0/128 shards
                        incremental sync: 128/128 shards
                        data is caught up with source
# 在A集群创建普通用户
docker exec mon radosgw-admin user create --uid="testuser" --display-name="First User"
"keys": [
        {
            "user": "testuser",
            "access_key": "SFNK9L679F3WI9QYC7RY",
            "secret_key": "iradWyXS82R64nmyIsqg8mzNeyKofCXgYpNcCMtL"
        }
]

# 在A集群创建桶测试
s3cmd mb s3://test
# 在A集群与B集群上都创建了test桶
# 在A集群上传文件测试
[root@localhost ~]# s3cmd put a.txt s3://test/a.txt
upload: 'a.txt' -> 's3://test/a.txt'  [1 of 1]
 3 of 3   100% in    1s     2.32 B/s  done
# 在B集群下载测试
[root@localhost ~]# s3cmd ls s3://test
2020-03-17 06:11         3   s3://test/a.txt
[root@localhost ~]# s3cmd get s3://test/a.txt a.txt
download: 's3://test/a.txt' -> 'a.txt'  [1 of 1]
 3 of 3   100% in    0s   107.13 B/s  done
[root@localhost ~]# cat a.txt 
ss

# 参考文档
https://docs.ceph.com/docs/master/radosgw/multisite/

相关文章

  • Ceph多数据中心(容灾)

  • 异地容灾备份-UCACHE云灾备免费使用

    1、同城容灾 同城容灾是在同城或相近区域内(≤200KM)建立两个数据中心:一个为数据中心,负责日常生产运行;另一...

  • 分布式存储上的灾备数据管理

    基于区块链技术的容灾备份系统,可以为数据中心的灾备提供更高的可用性。还可以根据需要建立行业性灾备联盟链,通过相互协...

  • Ceph Multisite

    说明:多数据中心(multisite)功能oNest v6.1新增的功能,旨在实现异地双活,提供了备份容灾的能力。...

  • 趣解 ceph rgw multisite data sync

    multisite是ceph rgw对象数据异地容灾备份的一个有效方案,笔者希望深入理解该技术,并应用于生产环...

  • Ceph RGW multisite异地容灾备份方案

    1.前言 容灾 (Disaster Recovery),即容灾备份或灾备,是业务连续性系统的一个子集,用于保障 I...

  • RocketMQ

    windows下RocketMQ安装部署 - 简书 三分钟掌握数据中心“容灾和备份的区别”_IDC运维管理_中国I...

  • 常见的容灾手段有哪些?

    是什么是容灾? 容灾是指在相隔较远的两地或者多地, 配备两套或者多套软件系统, 在某地发生意外(火灾, 地震)停止...

  • ceph分布式存储-全局Ceph节点宕机处理

    4. 全局Ceph节点宕机处理 在极端情况下,如数据中心断电,造成 Ceph 存储集群全局宕机,可以按照本节所示流...

  • 容灾

    备份主要说的是数据:冷备:是在主服务器丢失的情况下才使用的备份服务器。冷备份服务器基本上只在软件安装和配置的情况下...

网友评论

    本文标题:Ceph多数据中心(容灾)

    本文链接:https://www.haomeiwen.com/subject/ibzevhtx.html