Project

General

Profile

Actions

Feature #16361

open

usability: allow decreasing pg_num when pg_num > pgp_num

Added by Dan van der Ster almost 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
OSD
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Ceph should allow an administrator to decrease pg_num as long as pg_num > pgp_num. I assume that this will be more simple to implement than the general case of merging PGs.

Use-case: an operator increases pg_num for a pool, but soon afterwards they realize that they set it too high (perhaps indicated by the "too many PGs per OSD" warning). In this case, it would be good to allow the operator to decrease pg_num to a better value.

Here's how I would expect this to work:

# ceph osd pool create testsplit 8
pool 'testsplit' created 
# ceph health
HEALTH_OK
# ceph osd pool set testsplit pg_num 16
set pool 116 pg_num to 16
# ceph health
HEALTH_WARN too many PGs per OSD (301 > max 300); pool testsplit pg_num 16 > pgp_num 8

Now the current behaviour if I try to decrease:

# ceph osd pool set testsplit pg_num 8
Error EEXIST: specified pg_num 8 <= current 16

But I propose that ceph should allow this:

# ceph osd pool set testsplit pg_num 8
set pool 116 pg_num to 8

... then also delete the extra, never-used PGs.

No data to display

Actions

Also available in: Atom PDF