Setting minimum and maximum number of placement groups for pools

Specify the minimum and maximum value of placement groups (PGs) in order to limit the auto-scaling range.

If a minimum value is set, Ceph does not automatically reduce, or recommend to reduce, the number of PGs to a value below the set minimum value.

If a minimum value is set, Ceph does not automatically increase, or recommend to increase, the number of PGs to a value above the set maximum value.

The minimum and maximum values can be set together, or separately.

In addition to the this procedure, the ceph osd pool create command has two command-line options that can be used to specify the minimum or maximum PG count at the time of pool creation.

Syntax

ceph osd pool create --pg-num-min NUMBER
ceph osd pool create --pg-num-max NUMBER

Example

ceph osd pool create --pg-num-min 50
ceph osd pool create --pg-num-max 150

Prerequisites

  • A running IBM Storage Ceph cluster

  • Root-level access to the node

Procedure

  • Set the minimum number of PGs for a pool.

    Syntax

      ceph osd pool set POOL_NAME pg_num_min NUMBER

    Example

      [ceph: root@host01 /]# ceph osd pool set testpool pg_num_min 50
  • Set the maximum number of PGs for a pool.

    Syntax

      ceph osd pool set POOL_NAME pg_num_max NUMBER

    Example

      [ceph: root@host01 /]# ceph osd pool set testpool pg_num_max 150