ceph分布式存储-PG和PGP的区别

一、前言

首先来一段英文关于PG和PGP区别的解释:

PG = Placement Group
PGP = Placement Group for Placement purpose

pg_num = number of placement groups mapped to an OSD

When pg_num is increased for any pool, every PG of this pool splits into half, but they all remain mapped to their parent OSD.

Until this time, Ceph does not start rebalancing. Now, when you increase the pgp_num value for the same pool, PGs start to migrate from the parent to some other OSD, and cluster rebalancing starts. This is how PGP plays an important role.
By Karan Singh

以上是来自邮件列表的 Karan Singh 的PG和PGP的相关解释,他也是 Learning Ceph 和 Ceph Cookbook的作者,以上的解释没有问题,我们来看下具体在集群里面具体作用

二、实践

环境准备,因为是测试环境,我只准备了两台机器,每台机器4个OSD,所以做了一些参数的设置,让数据尽量散列

osd_crush_chooseleaf_type = 0

以上为修改的参数,这个是让我的环境故障域为OSD分组的

创建测试需要的存储池
我们初始情况只创建一个名为testpool包含6个PG的存储池


                
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值