From: Alfredo Deza Date: Wed, 30 Aug 2017 18:05:22 +0000 (-0400) Subject: ceph-volume lvm.activate use the partuuid of a partition to link the journal X-Git-Tag: v12.2.1~94^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3e8f2cc2a57351c990836792256af899bc233b1a;p=ceph.git ceph-volume lvm.activate use the partuuid of a partition to link the journal Signed-off-by: Alfredo Deza (cherry picked from commit a1080f833b35c5de30d7b577deabf0a0e82fbbf2) --- diff --git a/src/ceph-volume/ceph_volume/devices/lvm/activate.py b/src/ceph-volume/ceph_volume/devices/lvm/activate.py index a68959afb68b..d7271e3f6dfc 100644 --- a/src/ceph-volume/ceph_volume/devices/lvm/activate.py +++ b/src/ceph-volume/ceph_volume/devices/lvm/activate.py @@ -2,7 +2,7 @@ from __future__ import print_function import argparse from textwrap import dedent from ceph_volume import process, conf, decorators -from ceph_volume.util import system +from ceph_volume.util import system, disk from ceph_volume.systemd import systemctl from . import api @@ -17,12 +17,11 @@ def activate_filestore(lvs): # blow up with a KeyError if this doesn't exist osd_fsid = osd_lv.tags['ceph.osd_fsid'] if not osd_journal_lv: - # must be a pv, by quering lvm by the uuid we are ensuring that the + # must be a disk partition, by quering blkid by the uuid we are ensuring that the # device path is always correct - osd_journal_pv = api.get_pv(pv_uuid=osd_lv.tags['ceph.journal_uuid']) - osd_journal = osd_journal_pv.pv_name + osd_journal = disk.get_device_from_partuuid(osd_lv.tags['ceph.journal_uuid']) else: - osd_journal = osd_journal.lv_path + osd_journal = osd_lv.tags['ceph.journal_device'] if not osd_journal: raise RuntimeError('unable to detect an lv or device journal for OSD %s' % osd_id)