]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
[RM-19266] add the opportunity to specify block.db and block.wal in bluestore 434/head
authorAndrey Parfenov <aparfenov@virtuozzo.com>
Mon, 13 Mar 2017 08:41:29 +0000 (11:41 +0300)
committerAndrey Parfenov <aparfenov@virtuozzo.com>
Mon, 13 Mar 2017 10:15:45 +0000 (13:15 +0300)
ceph_deploy/osd.py

index bbd5eaf8f80bab2cfc4f2f905784c49a72be83da..41da89e1a76a068548ec3c71a458f748b50494b5 100644 (file)
@@ -187,7 +187,9 @@ def prepare_disk(
         fs_type,
         dmcrypt,
         dmcrypt_dir,
-        storetype):
+        storetype,
+        block_wal,
+        block_db):
     """
     Run on osd node, prepares a data disk for use.
     """
@@ -204,6 +206,13 @@ def prepare_disk(
         if dmcrypt_dir is not None:
             args.append('--dmcrypt-key-dir')
             args.append(dmcrypt_dir)
+    if storetype == 'bluestore':
+        if block_wal:
+            args.append('--block.wal')
+            args.append(block_wal)
+        if block_db:
+            args.append('--block.db')
+            args.append(block_db)
     if storetype:
         args.append('--' + storetype)
     args.extend([
@@ -328,6 +337,8 @@ def prepare(args, cfg, activate_prepared_disk):
                 dmcrypt=args.dmcrypt,
                 dmcrypt_dir=args.dmcrypt_key_dir,
                 storetype=storetype,
+                block_wal=args.block_wal,
+                block_db=args.block_db
             )
 
             # give the OSD a few seconds to start
@@ -699,6 +710,16 @@ def make(parser):
         action='store_true', default=None,
         help='bluestore objectstore',
         )
+    osd_create.add_argument(
+        '--block-db',
+        default=None,
+        help='bluestore block.db path'
+        )
+    osd_create.add_argument(
+        '--block-wal',
+        default=None,
+        help='bluestore block.wal path'
+        )
     osd_create.add_argument(
         'disk',
         nargs='+',
@@ -741,6 +762,16 @@ def make(parser):
         action='store_true', default=None,
         help='bluestore objectstore',
         )
+    osd_prepare.add_argument(
+        '--block-db',
+        default=None,
+        help='bluestore block.db path'
+        )
+    osd_prepare.add_argument(
+        '--block-wal',
+        default=None,
+        help='bluestore block.wal path'
+        )
     osd_prepare.add_argument(
         'disk',
         nargs='+',
@@ -831,6 +862,16 @@ def make_disk(parser):
         action='store_true', default=None,
         help='bluestore objectstore',
         )
+    disk_prepare.add_argument(
+        '--block-db',
+        default=None,
+        help='bluestore block.db path'
+        )
+    disk_prepare.add_argument(
+        '--block-wal',
+        default=None,
+        help='bluestore block.wal path'
+        )
     disk_prepare.add_argument(
         'disk',
         nargs='+',