ceph rgw java_ceph rgw multisite基本用法

Realm: Zonegroup: 理解为数据中心,由一个或多个Zone组成,每个Realm有且仅有 一个Master Zonegroup,用于处理系统变更,其他的称为Slave Zonegroup,元数据与Master Zonegroup保持一致;

Zone: Zone是一个逻辑概念,包含一个或者多个RGW实例。每个Zonegroup有且仅有一个Master Zone,用于处理bucket和user等元数据变更。

Period: 保存realm当前的配置信息,使用epoch维护版本信息。

Metadata Sync:Zone是一个逻辑概念,包含一个或者多个RGW实例。每个Zonegroup有且仅有一个Master Zone,用于处理bucket和user等元数据变更。

systemctl restart ceph-radosgw@rgw.hostname

创建realm:

A realm contains the notion of periods. Each period represents the state of the zone group and zone configuration in time.Each time you make a change to a zonegroup or zone, update the period and commit it.

realm里所有的元数据名称都是全局唯一的,无法创建同名的用户(uid)和bucket, container;

radosgw-admin realm create --rgw-realm=Giant --default

查看存在的realm:

radosgw-admin realm list

创建Master zonegroup:

删除 Default ZoneGroup并创建Master ZoneGroup

为了前向兼容,所以会存在默认的zonegroup,需要删除

radosgw-admin zonegroup delete --rgw-zonegroup=default

radosgw-admin zonegroup create --rgw-zonegroup=beijing --endpoints=beijing.com --master --default

查看zonegroup相关信息:

radosgw-admin zonegroup list

radosgw-amdin zonegroup get {zonegroup name}

创建Master zone:

删除default Zone 并创建Master Zone

为了前向兼容,所以默认存在zone,需要删除

radosgw-admin zone delete --rgw-zone=default

#创建Master zone,并指定zonegroup

radosgw-admin zone create --rgw-zonegroup=beijing --rgw-zone=beijing --endpoints=beijing.com --access-key=admin --secret=admin --default --master

Secondary Zones:

You must execute metadata operations, such as user creation, on a host within the master zone. The master zone and the secondary zone can receive bucket operations, but the secondary zone redirects bucket operations to the master zone. If the master zone is down, bucket operations will fail.

Bucket Sharding

主要为了解决.rgw.buckets.index pool的性能问题;该pool下存放了bucket index data;

rgw_override_bucket_index_max_shards

default: 0 #不启用分片

推荐值: {number of objects expected in a bucket / 100,000}

max value: 7877

The default value for rgw_max_objs_per_shard is 100k objects per shard.

动态修改sharding值: rgw_dynamic_reshading = true

rgw_reshard_num_logs: The number of shards for the resharding log. The default value is 16.

rgw_reshard_bucket_lock_duration: The duration of the lock on a bucket during resharding. The default value is 120 seconds.

rgw_dynamic_resharding: Enables or disables dynamic resharding. The default value is true.

rgw_max_objs_per_shard: The maximum number of objects per shard. The default value is 100000 objects per shard.

rgw_reshard_thread_interval: The maximum time between rounds of reshard thread processing. The default value is 600 seconds.

将bucket加入resharding 队列:

radosgw-admin bucket reshard add --bucket --num-shards

查看resharding队列:

radosgw-admin bucket reshard list

手动执行reshard:

radosgw-admin bucket reshard process

取消在bucket resharding期间取消resharding:

radosgw-admin bucket reshard cancel --bucket

压缩:compression

压缩插件: zlib: 支持 snappy, zstd: 预览版

radosgw-admin zone placement modify --rgw-zone=default --placement-id=default-placement --compression=zlib

After enabling or disabling compression, restart the Ceph Object Gateway instance so the change will take effect.

$ radosgw-admin bucket stats --bucket= { ... "usage": { "rgw.main": { "size": 1075028, "size_actual": 1331200, "size_utilized": 592035, "size_kb": 1050, "size_kb_actual": 1300, "size_kb_utilized": 579, "num_objects": 104 } }, ... }

The size_utilized and size_kb_utilized fields represent the total size of compressed data in bytes and kilobytes respectively.

Quota 管理:

Quotas include the maximum number of objects in a bucket and the maximum storage size in megabytes.

IMPORT: Buckets with a large number of objects can cause serious performance issues.

The recommended maximum number of objects in a one bucket is 100,000. To increase this number,

configure bucket index sharding

Set User Quotas:

radosgw-admin quota set --quota-scope=user --uid= [--max-objects=] [--max-size=]

eg:

radosgw-admin quota set --quota-scope=user --uid=johndoe --max-objects=1024 --max-size=1024

A negative value for num objects and / or max size means that the specific quota attribute check is disabled.

Ebable and Disable User Quotas:

#radosgw-admin quota enable --quota-scope=user --uid=

#radosgw-admin quota disable --quota-scope=user --uid=

Set Bucket Quotas:

#radosgw-admin quota set --uid= --quota-scope=bucket [--max-objects=] [--max-size=

Enable and Disable Bucket Quotas

#radosgw-amdin quota enable --quota-scope=bucket --uid=

#radosgw-admin quota-disable --quota-scope=bucket --uid=

Get Quota Settings

#radosgw-admin user info --uid=

Update Quota Stats

#radosgw-admin user stats --uid= --sync-stats

Get User Quota Usage Stats

#radosgw-admin user stats --uid=

Quota Cache:

rgw bucket quota ttl, rgw user quota bucket sync interval, rgw user quota sync interval.

统计用户

#radosgw-admin usage show --uid=johndeo --start-data=2012-03-01 --end-date=2012-04-01

#radosgw-amdin usage show --show-log-entri

清理孤儿对象:

create a new log pool:

1、rados mkpool .log

2、radosgw-admin orphans find --pool= --job-id= [--num-shards=] [--orphan-stale-secs=]

3、radosgw-admin orphans find --pool=.rgw.buckets --job-id=abc123

4、Clean up the search data:

radosgw-amdin orphans finish --job-id=abc123

Zones:

Ceph Object Gateway supports the notion of zones. A zone defines a logical group consisting of one or more Ceph Object Gateway instances.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/364690.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Python基础-Hello Word!

老师说,学习语言一定要有仪式感,So... print (“Hello Word”) 哈哈,好牛叉! 一、 Python安装 Windows 1、 下载安装包 https://www.python.org/downloads/ 2、 安装 默认安装路径: C:\Users\admin\AppData\Local\Programs\Python…

微信小程序 request请求封装

request 只用 POST,只封装了 POST,等有用到 GET再重写,接口用的 ThinkPHP5.0主要代码 var apiurl "xxxxx"; function http_post(controller,data,cb){wx.request({url:apiurl controller,data:data,method:post,header:{Content-…

MySQL基本语句

MySQL基本语句 数据库语句介绍: 语言分类: DDL:数据库和表 DML:表中的数据 DQL:查询表中的数据 DCL:(授权) DDL: 1、操作数据库 创建数据库: create database 数据库名; 创建数据库,…

使用Java注解不正确的方法

几乎没有什么Deprecated没有适当的文档看到Deprecated方法更令人生气的了。 我感到失落。 我应该仍然使用该方法吗? 可能这不是开发人员的意图,这就是为什么他/她添加了弃用注释。 我应该使用其他东西吗? 所以…。 使用Deprecated的规则是什…

easypanel mysql错误_Easypanel v1.6(虚拟主机控制面板)图文使用教程

一、Easypanel软件简介:Easypanel是一款虚拟主机管理工具,它支持php(windows系统还支持asp、asp.net)、磁盘配额、在线文件管理、在线web软件安装,是一款集虚拟主机、ftp、mysql等功能为一体的管理系统,本身还集成了kangle web服务…

游戏、脑洞大开1(密码简单破译)

“二八”妙龄写密码,看谁聪明“爱死他”。 密文:766C7273626F76706A5E6F715F7271766C72706D626B71716C6C71666A62 注意:(1)此题由正心41上课的同学做 (2)第一个提交,答案&#xff1a…

html-字体属性

<!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><title>Title</title><style>* {margin: 0;padding: 0;}/*font-family 字体类型浏览器默认的字体是微软雅黑&#xff0c;字体中有多个字体的时候&…

thinkPHP利用ajax异步上传图片并显示、删除

近来学习tp5的过程中&#xff0c;项目中有个发帖功能&#xff0c;选择主题图片。如下&#xff1a; 利用原始的文件上传处理&#xff0c;虽然通过原始js语句能实时显示上传图片&#xff0c;但是这样的话会涉及很多兼容问题。使用ajax技术&#xff0c;实现选择性删除所选图片功能…

我喜欢构建器模式的三个原因

有三种方法可以用Java编程语言创建新对象&#xff1a; 伸缩构造函数&#xff08;反&#xff09;模式 Javabeans模式 建造者模式 与其他两种方法相比&#xff0c;我更喜欢使用构建器模式。 为什么&#xff1f; Joshua Bloch描述了构建器模式以及在Effective Java中使用它的…

表单php跳转页面跳转,form表单页面跳转方式提交练习

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼//form表单提交练习/*新建一个form.html网页用来书写前端HTML表单*/表单提交练习姓名:年龄:电话:地址:QQ:自我评价://以上功能可自己添加或修改/*在form.html网页的基础上新建一个foms.php网页关联之前的form.html网页并书写php测试…

.NetCore模拟Postman的BasicAuth生成Authrization

一、思路 BasicAuth 是一种简单权限&#xff0c;传输UserName<userName>,Password<password> 1.用:连接Username,Password 2.进行Base64编码 3."Basic空格"拼接 二、代码示例 string authorization $"{userName}:{password}"; var authorizat…

Vue项目页面跳转时候的,浏览器窗口上方的进度条显示

1.安装&#xff1a; cnpm install --save nprogress 2.在main.js中引入&#xff1a; 1 import NProgress from nprogress 2 import nprogress/nprogress.css 3.在main.js中进行配置&#xff1a; 1 NProgress.configure({ 2 easing: ease, // 动画方式 3 spee…

使用Spring跟踪应用程序异常

几周前&#xff0c;一位同事要求我花一个星期的时间做后援&#xff0c;因为他需要一个掩护&#xff0c;而他度过了一个赚钱的假期&#xff0c;而他找不到其他人。 当我刚完成一个特别复杂的编码项目并感到有些疲倦时&#xff0c;我说“是”。 毕竟&#xff0c;改变对我有好处。…

php redis.dll php5.6,在Windows 64位下为PHP5.6.14安装redis扩展

一.php安装redis扩展1.使用phpinfo()查看当前版本的信息2.根据PHP版本号&#xff0c;编译器版本号和CPU架构选择php_redis-2.2.5-5.6-nts-vc11-x64.zip和php_igbinary-1.2.1-5.5-nts-vc11-x64.zip下载地址&#xff1a;http://windows.php.net/downloads/pecl/snaps/redis/2.2.5…

js sort方法根据数组中对象的某一个属性值进行排序(实用方法)

js sort方法根据数组中对象的某一个属性值进行排序 sort方法接收一个函数作为参数&#xff0c;这里嵌套一层函数用来接收对象属性名&#xff0c;其他部分代码与正常使用sort方法相同. var arr [{name:zopp,age:0},{name:gpp,age:18},{name:yjj,age:8} ];function compare(pr…

洛谷 P1018乘积最大

题目描述 今年是国际数学联盟确定的“20002000――世界数学年”&#xff0c;又恰逢我国著名数学家华罗庚先生诞辰9090周年。在华罗庚先生的家乡江苏金坛&#xff0c;组织了一场别开生面的数学智力竞赛的活动&#xff0c;你的一个好朋友XZXZ也有幸得以参加。活动中&#xff0c;主…

matrix derivatives

来源&#xff1a;cs229 stanford Machine Learning Notes转载于:https://www.cnblogs.com/pertinencec/p/10082965.html

Project Student:维护Webapp(只读)

这是Project Student的一部分。 其他职位包括带有Jersey的 Web服务 客户端&#xff0c;带有Jersey的 Web服务服务器 &#xff0c; 业务层 &#xff0c; 具有Spring数据的持久性 &#xff0c;分片集成测试数据 &#xff0c; Webservice集成和JPA标准查询 。 当我开始这个项目时…

基于vue的无缝滚动组件

vue-seamless-scroll A simple, Seamless scrolling for Vue.js 在awesome上一直没有发现vue的无缝滚动组件&#xff0c;在工作之余写了个组件&#xff0c;分享出来希望大家一起学习进步。Demo https://github.com/chenxuan0000/vue-seamless-scroll/index.html Installatio…

教务管理及教材订购系统设计文档

教务管理及教材订购系统设计文档目录 一、概述 1.1 开发背景 1.2 使用技术 1.3运行环境 1.4 设计目标 1.4.1权限管理 1.4.2信息管理 1.4.3选课管理 1.4.4 成绩管理 1.4.5教材订购 二、功能分析划分 2.1信息管理 2.1.1班级信息管理 2.1.2专业信息管理 2.1.3课程信息管理 2.1.4学…