ceph集群存储池的资源配额

简介: 这篇文章讲解了如何在Ceph集群中为存储池设置资源配额,包括创建存储池、查看和设置存储池的最大对象数量和最大存储容量的限制。

一.存储池资源配额概述

ceph集群官方支持基于对象存储数量和数据存储的大小两种方式限制存储资源配额。

官网连接:
    https://docs.ceph.com/en/latest/rados/operations/pools/#setting-pool-quotas

二.存储池资源配额实战

1.创建存储池

[root@ceph143 ~]# ceph osd pool create yinzhengjie-p2 64 64
pool 'yinzhengjie-p2' created
[root@ceph143 ~]#

2.查看存储池的资源限制信息

[root@ceph143 ~]# ceph osd pool get-quota yinzhengjie-p2
quotas for pool 'yinzhengjie-p2':
  max objects: N/A
  max bytes  : N/A
[root@ceph143 ~]#

3.设置存储池的资源限制

    1 限制存储池最大上线有1500个对象
[root@ceph143 ~]# ceph osd pool set-quota yinzhengjie-p2  max_objects 1500
set-quota max_objects = 1500 for pool yinzhengjie-p2
[root@ceph143 ~]# 
[root@ceph143 ~]# ceph osd pool get-quota yinzhengjie-p2
quotas for pool 'yinzhengjie-p2':
  max objects: 1.50k objects
  max bytes  : N/A
[root@ceph143 ~]# 


    2 限制存储池最大存储10G大小
[root@ceph143 ~]# ceph osd pool set-quota yinzhengjie-p2  max_bytes 10737418240
set-quota max_bytes = 10737418240 for pool yinzhengjie-p2
[root@ceph143 ~]# 
[root@ceph143 ~]# ceph osd pool get-quota yinzhengjie-p2
quotas for pool 'yinzhengjie-p2':
  max objects: 1.50k objects
  max bytes  : 10 GiB
[root@ceph143 ~]# 

    3.清除资源限制
[root@ceph141 ~]# ceph osd pool get-quota yinzhengjie-p2
quotas for pool 'yinzhengjie-p2':
  max objects: 1.50k objects
  max bytes  : 10 GiB
[root@ceph141 ~]# 
[root@ceph141 ~]# ceph osd pool set-quota yinzhengjie-p2 max_objects 0 
set-quota max_objects = 0 for pool yinzhengjie-p2
[root@ceph141 ~]# 
[root@ceph141 ~]# ceph osd pool get-quota yinzhengjie-p2
quotas for pool 'yinzhengjie-p2':
  max objects: N/A
  max bytes  : 10 GiB
[root@ceph141 ~]# 
[root@ceph141 ~]# ceph osd pool set-quota yinzhengjie-p2 max_bytes 0
set-quota max_bytes = 0 for pool yinzhengjie-p2
[root@ceph141 ~]# 
[root@ceph141 ~]# ceph osd pool get-quota yinzhengjie-p2
quotas for pool 'yinzhengjie-p2':
  max objects: N/A
  max bytes  : N/A
[root@ceph141 ~]#
目录
相关文章
|
12月前
|
Kubernetes 容器 Perl
Kubernetes 节点的预留资源
Kubernetes 节点的预留资源
206 1
|
22天前
|
存储 Kubernetes Docker
Kubernetes节点资源耗尽状态的处理
Kubernetes节点资源耗尽状态的处理
|
16天前
|
存储 关系型数据库
ceph的存储池管理
本文介绍了Ceph存储池的管理,包括存储池的类型、PG数量的计算方法、创建和查看存储池、修改存储池信息以及删除存储池的操作步骤和注意事项。
39 2
|
20天前
|
存储 网络性能优化 块存储
OpenStack的块存储卷管理创建与配置
【8月更文挑战第27天】
36 3
|
4月前
|
Serverless API 文件存储
创建集群和准备资源
该内容介绍了创建ACK Serverless容器集群的步骤,包括准备NAS存储和数据库资源。首先,创建ACK Serverless集群,选择相应的版本。接着,配置并创建集群,强调了集群在Kubernetes架构中相当于控制平面的管理节点。然后,提到了API Server、Controller Manager、Scheduler和etcd等组件的作用。之后,讨论了准备资源的步骤,如准备WordPress应用镜像、创建NAS存储和云数据库MySQL。至此,集群创建和资源准备完成。
|
9月前
|
存储
cinder存储资源超售配置
cinder存储资源超售配置
81 0
|
存储 5G KVM
KVM存储池扩容
KVM存储池扩容
142 0
|
弹性计算 大数据 数据处理
集群类型之信息共享节点集群
集群类型之信息共享节点集群
141 0
|
Perl
EKS集群以及节点组注意事项
EKS集群以及节点组注意事项
291 0
|
存储 缓存 Linux
解决 Docker 服务器存储资源池不足问题
最近在执行 Docker 运行命令启动镜像时候,无法正常执行 Docker 启动镜像命令
1478 0
解决 Docker 服务器存储资源池不足问题