Add bluestore support for OSD's
Add support for use of experimental bluestore storage format for Ceph Jewel or later. This will be exposed in the charms via a new configuration option. Change-Id: I36f7aa9d7b96ec5c9eaa7a3a970593f9ca14cb34
This commit is contained in:
parent
43e7a3c691
commit
f2b0fcf9e8
@ -1355,16 +1355,17 @@ def find_least_used_journal(journal_devices):
|
||||
|
||||
|
||||
def osdize(dev, osd_format, osd_journal, reformat_osd=False,
|
||||
ignore_errors=False, encrypt=False):
|
||||
ignore_errors=False, encrypt=False, bluestore=False):
|
||||
if dev.startswith('/dev'):
|
||||
osdize_dev(dev, osd_format, osd_journal,
|
||||
reformat_osd, ignore_errors, encrypt)
|
||||
reformat_osd, ignore_errors, encrypt,
|
||||
bluestore)
|
||||
else:
|
||||
osdize_dir(dev, encrypt)
|
||||
|
||||
|
||||
def osdize_dev(dev, osd_format, osd_journal, reformat_osd=False,
|
||||
ignore_errors=False, encrypt=False):
|
||||
ignore_errors=False, encrypt=False, bluestore=False):
|
||||
if not os.path.exists(dev):
|
||||
log('Path {} does not exist - bailing'.format(dev))
|
||||
return
|
||||
@ -1392,9 +1393,16 @@ def osdize_dev(dev, osd_format, osd_journal, reformat_osd=False,
|
||||
if osd_format:
|
||||
cmd.append('--fs-type')
|
||||
cmd.append(osd_format)
|
||||
|
||||
if reformat_osd:
|
||||
cmd.append('--zap-disk')
|
||||
|
||||
# NOTE(jamespage): enable experimental bluestore support
|
||||
if cmp_pkgrevno('ceph', '10.2.0') >= 0 and bluestore:
|
||||
cmd.append('--bluestore')
|
||||
|
||||
cmd.append(dev)
|
||||
|
||||
if osd_journal:
|
||||
least_used = find_least_used_journal(osd_journal)
|
||||
cmd.append(least_used)
|
||||
|
Loading…
Reference in New Issue
Block a user