From: Sage Weil Date: Mon, 22 Jul 2019 20:30:50 +0000 (-0500) Subject: mon/FSCommand: set pg_num_min via 'fs new', not in mgr/volumes X-Git-Tag: v15.1.0~2095^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=08ffd10039fdee164ac2a5e374de3aaf7eb3426e;p=ceph.git mon/FSCommand: set pg_num_min via 'fs new', not in mgr/volumes Signed-off-by: Sage Weil --- diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index 38f677d417f9..67eaf543f9b4 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -257,6 +257,9 @@ class FsNewHandler : public FileSystemCommandHandler mon->osdmon()->do_set_pool_opt(metadata, pool_opts_t::RECOVERY_PRIORITY, static_cast(5)); + mon->osdmon()->do_set_pool_opt(metadata, + pool_opts_t::PG_NUM_MIN, + static_cast(16)); mon->osdmon()->do_set_pool_opt(metadata, pool_opts_t::PG_AUTOSCALE_BIAS, static_cast(4.0)); diff --git a/src/pybind/mgr/volumes/fs/volume.py b/src/pybind/mgr/volumes/fs/volume.py index b97a8f88ed93..b1ba85bbde93 100644 --- a/src/pybind/mgr/volumes/fs/volume.py +++ b/src/pybind/mgr/volumes/fs/volume.py @@ -200,11 +200,9 @@ class VolumeClient(object): """ return ve.to_tuple() - def create_pool(self, pool_name, pg_num, pg_num_min=None): + def create_pool(self, pool_name, pg_num): # create the given pool command = {'prefix': 'osd pool create', 'pool': pool_name, 'pg_num': pg_num} - if pg_num_min: - command['pg_num_min'] = pg_num_min r, outb, outs = self.mgr.mon_command(command) if r != 0: return r, outb, outs @@ -253,7 +251,7 @@ class VolumeClient(object): """ metadata_pool, data_pool = self.gen_pool_names(volname) # create pools - r, outs, outb = self.create_pool(metadata_pool, 16, pg_num_min=16) + r, outs, outb = self.create_pool(metadata_pool, 16) if r != 0: return r, outb, outs r, outb, outs = self.create_pool(data_pool, 8)