]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/FSCommand: set pg_num_min via 'fs new', not in mgr/volumes 29180/head
authorSage Weil <sage@redhat.com>
Mon, 22 Jul 2019 20:30:50 +0000 (15:30 -0500)
committerSage Weil <sage@redhat.com>
Tue, 23 Jul 2019 14:23:58 +0000 (09:23 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/FSCommands.cc
src/pybind/mgr/volumes/fs/volume.py

index 38f677d417f95f0768bb62bd46c59e4869139262..67eaf543f9b411874adde379566e097d04b1be6a 100644 (file)
@@ -257,6 +257,9 @@ class FsNewHandler : public FileSystemCommandHandler
     mon->osdmon()->do_set_pool_opt(metadata,
                                   pool_opts_t::RECOVERY_PRIORITY,
                                   static_cast<int64_t>(5));
+    mon->osdmon()->do_set_pool_opt(metadata,
+                                  pool_opts_t::PG_NUM_MIN,
+                                  static_cast<int64_t>(16));
     mon->osdmon()->do_set_pool_opt(metadata,
                                   pool_opts_t::PG_AUTOSCALE_BIAS,
                                   static_cast<double>(4.0));
index b97a8f88ed93e3d34e09f1fa8210561ae497e169..b1ba85bbde93f81df2ac1040d3277d6ade5ae3a9 100644 (file)
@@ -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)