From fff93c894267113e0ae28f3760ec58b26dd49fa7 Mon Sep 17 00:00:00 2001 From: Andrey Parfenov Date: Mon, 13 Mar 2017 11:41:29 +0300 Subject: [PATCH] [RM-19266] add the opportunity to specify block.db and block.wal in bluestore --- ceph_deploy/osd.py | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/ceph_deploy/osd.py b/ceph_deploy/osd.py index bbd5eaf..41da89e 100644 --- a/ceph_deploy/osd.py +++ b/ceph_deploy/osd.py @@ -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='+', -- 2.47.3