Increase number of PG/PGP for ceph cluster – ceph error : too few PGs per OSD

If ceph cluster starts to complain in ceph -s with below error

 #  ceph -s 
    cluster 311a432d-40bd-46fe-97e2-32d70b1d2612
     health HEALTH_WARN
            too few PGs per OSD (25 < min 30)
     monmap e1: 3 mons at {gprfc053=,gprfc054=,gprfc055=}
            election epoch 56, quorum 0,1,2 gprfc053,gprfc054,gprfc055
     osdmap e232: 20 osds: 20 up, 20 in
      pgmap v501: 256 pgs, 1 pools, 0 bytes data, 0 objects
            729 MB used, 5486 GB / 5487 GB avail
                 256 active+clean

then it is necessary to increase number of PG/PGP for pool in question

 # ceph osd pool set rbd pg_num 4096
 # ceph osd pool set rbd pgp_num 4096

After this it should be fine. The values specified in <strong<ceph.conf will only affect pools which are created by processes in case they are creating their own pools. If ceph pool is created from command line, then pg_num and pgp_num must be specified. More about placement groups – in ceph documentation

#ceph, #ceph-placement-groups, #fedora-2, #pgp_num, #pg_num