mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
ceph-volume util.prepare add other ln helpers for bluestore
Signed-off-by: Alfredo Deza <adeza@redhat.com>
This commit is contained in:
parent
211c38f591
commit
555b664882
@ -98,15 +98,37 @@ def mount_osd(device, osd_id):
|
||||
process.run(command)
|
||||
|
||||
|
||||
def link_journal(journal_device, osd_id):
|
||||
journal_path = '/var/lib/ceph/osd/%s-%s/journal' % (
|
||||
def _link_device(device, device_type, osd_id):
|
||||
"""
|
||||
Allow linking any device type in an OSD directory. ``device`` must the be
|
||||
source, with an absolute path and ``device_type`` will be the destination
|
||||
name, like 'journal', or 'block'
|
||||
"""
|
||||
device_path = '/var/lib/ceph/osd/%s-%s/%s' % (
|
||||
conf.cluster,
|
||||
osd_id
|
||||
osd_id,
|
||||
device_type
|
||||
)
|
||||
command = ['sudo', 'ln', '-s', journal_device, journal_path]
|
||||
command = ['sudo', 'ln', '-s', device, device_path]
|
||||
process.run(command)
|
||||
|
||||
|
||||
def link_journal(journal_device, osd_id):
|
||||
_link_device(journal_device, 'journal', osd_id)
|
||||
|
||||
|
||||
def link_block(block_device, osd_id):
|
||||
_link_device(block_device, 'block', osd_id)
|
||||
|
||||
|
||||
def link_wal(wal_device, osd_id):
|
||||
_link_device(wal_device, 'wal', osd_id)
|
||||
|
||||
|
||||
def link_db(db_device, osd_id):
|
||||
_link_device(db_device, 'db', osd_id)
|
||||
|
||||
|
||||
def get_monmap(osd_id):
|
||||
"""
|
||||
Before creating the OSD files, a monmap needs to be retrieved so that it
|
||||
|
Loading…
Reference in New Issue
Block a user