The contents of this wiki are no longer actively maintained. The most current documentation is available at http://ceph.com/docs.

Changing the number of PGs

From Ceph wiki

Revision as of 23:27, 17 August 2011 by Lxoliva (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You can change the number of placement groups in the OSD cluster. The easiest way to do this is to run

./ceph osd pool set <poolname> pg_num <value>

To see the current number of PGs in a pool, run:

./ceph osd pool get data pg_num

For example, if you want to set the number of placement groups for the data PG to 16, you would run this command:

./ceph osd pool set data pg_num 16

Support for expanding the number of PGs in the system needs more testing. For now it is only safe to do it when the pool is empty.

Once the splitting is complete, as shown in the osd status line, run:

./ceph osd pool set data pgp_num 16
Personal tools